@subiz/widget-v4 4.1.198 → 4.1.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/img/default_avatar.png +0 -0
- package/assets/img/default_logo.png +0 -0
- package/assets/img/default_logo.svg +5 -0
- package/assets/less/avatar.less +2 -2
- package/assets/less/message.less +6 -1
- package/assets/less/widget.less +1 -1
- package/assets/less/widget_header.less +2 -1
- package/compiled_src/bot.js +3 -18
- package/compiled_src/chatbox/Event.js +1 -1
- package/compiled_src/chatbox/Events.js +3 -1
- package/compiled_src/chatbox/Header.js +2 -2
- package/compiled_src/chatbox/QuickReplies.js +2 -1
- package/compiled_src/chatbox/Widget.js +2 -1
- package/compiled_src/lib.js +2 -1
- package/compiled_src/plugin.js +1 -0
- package/compiled_src/store/store.js +26 -18
- package/compiled_src/util/common.js +27 -14
- package/compiled_src/util/common.test.js +43 -133
- package/dist/132.js +21 -21
- package/dist/185.js +49 -49
- package/dist/{19bbfd5aa77.132.js → 19c2dd58182.132.js} +1 -1
- package/dist/19c2dd58182.185.js +1 -0
- package/dist/19c2dd58182.278.js +1 -0
- package/dist/19c2dd58182.339.js +1 -0
- package/dist/19c2dd58182.459.js +1 -0
- package/dist/19c2dd58182.app.js +1 -0
- package/dist/{19bbfd5aa77.chat.html → 19c2dd58182.chat.html} +1 -1
- package/dist/19c2dd58182.chat.js +1 -0
- package/dist/{19bbfd5aa77.form.html → 19c2dd58182.form.html} +1 -1
- package/dist/19c2dd58182.form.js +1 -0
- package/dist/{19bbfd5aa77.index.html → 19c2dd58182.index.html} +1 -1
- package/dist/{19bbfd5aa77.library.html → 19c2dd58182.library.html} +1 -1
- package/dist/19c2dd58182.library.js +1 -0
- package/dist/{19bbfd5aa77.preview.html → 19c2dd58182.preview.html} +1 -1
- package/dist/19c2dd58182.preview.js +1 -0
- package/dist/19c2dd58182.webview.js +1 -0
- package/dist/459.js +11 -11
- package/dist/74.js +1 -0
- package/dist/HASH +1 -1
- package/dist/assets/img/default_avatar.e449b04.png +0 -0
- package/dist/assets/img/default_logo.dd13a2b.svg +5 -0
- package/dist/screenshoot.js +3053 -3038
- package/package.json +13 -12
- package/src/bot.js +4 -14
- package/src/chatbox/Event.js +1 -1
- package/src/chatbox/Events.js +3 -2
- package/src/chatbox/Header.js +2 -2
- package/src/chatbox/QuickReplies.js +10 -10
- package/src/chatbox/Widget.js +3 -2
- package/src/lib.js +3 -1
- package/src/plugin.js +1 -0
- package/src/store/store.js +23 -13
- package/src/util/common.js +31 -16
- package/src/util/common.test.js +108 -193
- package/dist/19bbfd5aa77.185.js +0 -1
- package/dist/19bbfd5aa77.278.js +0 -1
- package/dist/19bbfd5aa77.339.js +0 -1
- package/dist/19bbfd5aa77.459.js +0 -1
- package/dist/19bbfd5aa77.app.js +0 -1
- package/dist/19bbfd5aa77.chat.js +0 -1
- package/dist/19bbfd5aa77.form.js +0 -1
- package/dist/19bbfd5aa77.library.js +0 -1
- package/dist/19bbfd5aa77.preview.js +0 -1
- package/dist/19bbfd5aa77.webview.js +0 -1
- package/dist/assets/img/default_avatar.5b74dc1.png +0 -0
- /package/dist/{19bbfd5aa77.127.js → 19c2dd58182.127.js} +0 -0
- /package/dist/{19bbfd5aa77.27.js → 19c2dd58182.27.js} +0 -0
- /package/dist/{19bbfd5aa77.490.js → 19c2dd58182.490.js} +0 -0
- /package/dist/{19bbfd5aa77.74.js → 19c2dd58182.74.js} +0 -0
- /package/dist/{19bbfd5aa77.997.js → 19c2dd58182.997.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var t,e,n={318(t){var e="Content-Type",n="application/x-www-form-urlencoded",i="application/json; charset=utf-8";function r(t,e){return Object.assign(t.clone(),e)}var o={code:"network_error,retry",number:"SBZ-EQNETWORK",message:{En_US:"Can not connect to the server. Please check your internet connection.",Vi_VN:"Không thể kết nối tới máy chủ. Vui lòng kiểm tra lại kết nối mạng."}},s={code:"invalid_response,retry",number:"SBZ-EQRESPONSE",message:{En_US:"Server error, please try again later",Vi_VN:"Lỗi máy chủ, vui lòng thử lại sau"}},a={code:"not_200,retry",number:"SBZ-EQCN200",message:{En_US:"Error while connecting to the server, please try again later",Vi_VN:"Lỗi kết nối với máy chủ, vui lòng thử lại sau"}};function p(t){return(t||"").trim()}function l(t){return t&&"[object Function]"==={}.toString.call(t)}function c(t,e,n){if(!t||0===t.length)return n(e);var i=t.shift();if(!l(i))return c(t,e,n);i(e,function(i){return!1===i?n(e):c(t,e,n)})}function d(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)})}function m(t){if(!t)return"";for(var e=Object.keys(t),n=[],i=0;i<e.length;i++){var r=e[i],o="",s=t[r];if(void 0!==s){if(null===s)o=d(r);else if(Array.isArray(s)){for(var a=[],p=0;p<s.length;p++)void 0!==s[p]&&(a.push(h(r,s[p],a.length)),a.push(n));o=a.join("&")}else o=d(r)+"="+d(s);o.length>0&&n.push(o)}}return n.join("&")}function h(t,e){return null===e?d(t):[d(t),"=",d(e)].join("")}var u,g=(u={parser:"",beforehooks:[],afterhooks:[],baseurl:"",query:{},clone:function(){return Object.assign({},this,{query:Object.assign({},this.query)})},addQuery:function(t,e){var n=this.clone();return n.query[t]=e,n},removeQuery:function(t){var e=this.clone();return void 0!==e.query[t]&&(e.query[t]=void 0),e},withCredentials:function(t){return r(this,{_withCredentials:t})},setQuery:function(t){return r(this,{query:t})},clearHooks:function(){return r(this,{beforehooks:[],afterhooks:[]})},beforeHook:function(t){var e=this.beforehooks.slice();return e.push(t),r(this,{beforehooks:e})},afterHook:function(t){var e=this.afterhooks.slice();return e.push(t),r(this,{afterhooks:e})},setHeader:function(t){return(t=Object.assign({},this.headers,t))[e]=void 0,r(this,{headers:t})}},["put","head","patch","delete","post","get"].map(function(t){u[t]=function(d,h,u){return function(t,r,p){p=p||function(){},l(r)&&(p=r,r=void 0);var d,h=new Promise(function(t){d=function(e){try{p(e.error,e.body,e.code)}catch(t){}t(e)}});return r&&((t=t.clone()).body=r,t.content_type===i&&(t.body=b.Jsonify(r)),t.content_type===n&&(t.body=m(r))),c(t.beforehooks.slice(),{request:t},function(n){if(n.error)return d({body:{error:bq.error},code:0,error:n.error});!function(t,n){let i=m(t.query);if(i&&(i="?"+i),!b.XMLHttpRequest)return function(t,n,i){var r=Object.assign({},t.headers);t.content_type&&(r[e]=t.content_type);var o=0;fetch(t.baseurl+i,{method:t.method,headers:r,credentials:t._withCredentials,body:t.body}).then(function(t){return o=t.status,t.text()}).then(function(t){n(void 0,t,o)}).catch(function(t){n("network_error",t,-1)})}(t,n,i);var r=new b.XMLHttpRequest;for(var o in t.xhr=r,r.onreadystatechange=function(t){4===r.readyState&&(0===r.status?n("network_error",r.responseText,r.status):n(void 0,r.responseText,r.status))},r.open(t.method,t.baseurl+i),r.withCredentials=t._withCredentials,t.headers)r.setRequestHeader(o,t.headers[o]);t.content_type&&r.setRequestHeader(e,t.content_type),r.send(t.body)}(n.request,function(e,n,i){c(t.afterhooks.slice(),{request:t,code:i,body:n,err:e},function(e){var n=e.body;if("network_error"==r)return d({body:{error:o},code:e.code,error:o});if("json"==t.parser&&e.body)try{n=b.ParseJson(e.body)}catch(t){return d({body:{error:s,origin_body:e.body},code:e.code,error:s})}var r=e.err;if("network_error"==r)return d({body:{error:o},code:e.code,error:o});!r&&(i<200||i>299)&&(r=n&&n.error?n.error:a),d({body:r?n||{error:r}:n,code:e.code,error:r})})})}),h}(r(this,{method:t,baseurl:(g=this.baseurl,f=d,g=p(g),(f=p(f))&&g?f.startsWith("http://")||f.startsWith("https://")||f.startsWith("//")?f:(g.endsWith("/")||(g+="/"),f.startsWith("/")&&(f=f.substring(1)),g+f):g+f)}),h,u);var g,f}}),u.setBaseUrl=function(t){return r(this,{baseurl:t})},u.contentTypeJson=function(){return r(this,{content_type:i})},u.contentTypeForm=function(){return r(this,{content_type:n})},u.setContentType=function(t){return r(this,{content_type:p(t)})},u.setParser=function(t){return r(this,{parser:p(t)})},u.setBody=function(t){return r(this,{body:t})},u),b={Jsonify:JSON.stringify,ParseJson:JSON.parse};g.env=b,g.waterfall=c,t.exports=g},9(t,e,n){var i=n(9143);t.exports=function(t,e,n){var r=[],o="idle",s=function(t){var e=t.map(function(t){return t.payload}),i=n(e);i&&i.then||(i=Promise.resolve(i));var r=t.map(function(t){return t.rs});return new Promise(function(t){i.then(function(e){r.map(function(t,n){t(e&&e[n])}),t()})})},a=function(){"executing"!==o&&(o="executing",i(function(){if(r.length<=t)return Promise.resolve(!1);var e=r.splice(0,t);return s(e).then(function(){return!0})}).then(function(){if(0!==r.length){var t=e-(Date.now()-r[0].created);if(t>=1){if(o="idle",r[0].settedTimeout)return;return r[0].settedTimeout=!0,void setTimeout(a,t)}var n=r;r=[],s(n).then(function(){o="idle",a()})}else o="idle"}))};return this.push=function(t,e){return new Promise(function(n){r.push({payload:t,priority:e,created:Date.now(),rs:n}),a()})},this}},9096(t){t.exports={map:function(t,e){if(!t)return[];e||(e=function(t){return t});var n=[];if(Array.isArray(t)){for(var i=0;i<t.length;i++)n.push(e(t[i],i));return n}if("object"==typeof t){var r=Object.keys(t);for(i=0;i<r.length;i++){var o=r[i];n.push(e(t[o],o))}return n}return n}}},8193(t,e,n){var i=n(9798),r=n(9143),o=n(5219),s=n(9);t.exports={sleep:i,loop:r,map:o,batch:s}},9143(t){t.exports=function t(e){var n=e();if(!n||!n.then){var i=n;n={then:function(t){t(i)}}}return n.then(function(n){return n?t(e):Promise.resolve()})}},5219(t,e,n){var i=n(9096);t.exports=function(t,e,n){if("number"==typeof e){let t=n;n=e,e=t}e||(e=function(){}),("number"!=typeof n||n<=0)&&(n=1);var r={};if(i.map(t,function(t,e){r[e]=t}),n<=0&&(n=1),0===Object.keys(r).length)return Promise.resolve([]);Object.keys(r).length<n&&(n=Object.keys(r).length);var o={};return new Promise(function(t){let s=Object.keys(r).length;for(var a=function(){var n=Object.keys(r);if(0!==n.length){var p=n.shift(),l=r[p];delete r[p];var c=e(l,p);c&&c.then||(c=Promise.resolve(c)),c.then(function(e){if(o[p]=e,Object.keys(o).length===s)return t(i.map(o));a()})}},p=0;p<n;p++)setTimeout(a,1)})}},9798(t){t.exports=function(t){return new Promise(function(e){setTimeout(e,t)})}},7695(t){function e(t){return t<10?`0${t}`:`${t}`}var n=function(t,e,n,i){if("undefined"==typeof XMLHttpRequest)return function(t,e,n,i){let r={};n&&(r["content-type"]="text/plain"),fetch(e,{method:t,headers:r,body:n}).then(t=>t.text().then(e=>i&&i(e,t.status))).catch(t=>i&&i(t,-1))}(t,e,n,i);var r=new XMLHttpRequest;r.onreadystatechange=function(t){4===r.readyState&&(i&&i(r.responseText,r.status),i=void 0)},r.onerror=function(){i&&i(r.responseText,-1),i=void 0},r.open(t,e),n&&r.setRequestHeader("content-type","text/plain"),r.send(n)};t.exports={xhrsend:n,parseJSON:function(t){try{return JSON.parse(t)}catch(t){}},Pubsub:function(){var t={};this.emit=function(e){for(var n=[],i=1;i<arguments.length;i++)n.push(arguments[i]);var r=t[e];if(r)for(i=0;i<r.length;i++)r[i].apply(void 0,n)},this.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)}},randomString:function(t,e){var n,i="";(!t||t<1)&&(t=10);for(var r=0;r<t;r++)e?i+=e[Math.floor(Math.random()*e.length)]:(n=Math.floor(25*Math.random()+97),i+=String.fromCharCode(n));return i},logError:function(t,i,r,o){let s=function(t){let n=t.getUTCFullYear().toString().substr(2,2),i=t.getUTCMonth()+1,r=t.getUTCDate(),o=t.getUTCHours(),s=t.getUTCMinutes(),a=t.getUTCSeconds();return`${n}-${e(i)}-${e(r)} ${e(o)}:${e(s)}:${e(a)}`}(new Date),a=JSON.stringify({id:Date.now(),class:400,code:"frontend_error",number:o.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join(""),fields:{message:JSON.stringify(r),user_id:i,url:JSON.stringify(location.href)}});n("POST","https://track.subiz.net/collect",`${s} app ERROR dashboard ${t} ${o} ${a}`)}}},2839(t,e,n){var i=n(8193),{xhrsend:r,parseJSON:o,Pubsub:s}=n(7695);function a(t,e,n,s,a,d){a=a||r,e=e||{};var m="";d||(d="");var h=!1,u=!1,g=!0,b=function(e){h||a("get",t+"poll?token="+m+"&v=5&account-id="+d,void 0,function(n,i){if(!h){if(p(i))return u=!0,setTimeout(b,function(t){if(!t||-1===t)return 0;var e=1e3*Math.pow(1.5,t);return Math.min(1e4,e)}(e),e+1);if(200!==i)return u=!0,v("poll");u=!1,(n=o(n)||{}).host&&(t=c(n.host));var r=n.sequential_token;return r?(m=r,s(n.events||[]),b(0)):v("poll")}})},f=i.batch(50,100,function(n){if(h)return Promise.resolve(l("dead",n.length));if(n.length<=0)return Promise.resolve([]);var r,s=new Promise(t=>{r=t}),u=!1;return setTimeout(function(){u||h||(g=!0)},4e3),setTimeout(()=>{u||(u=!0,g=!0,r(l("dead",n.length)),h||v("subs"))},6e4),i.loop(function(){return new Promise(function(i){if(h)return r(l("dead",n.length)),i(!1);var s="?token="+m;e.getAccessToken().then(function(f){if(h)return r(l("dead",n.length)),i(!1);e.user_ref?s+="&user_ref="+encodeURIComponent(e.user_ref):e.user_mask?s+="&user-mask="+encodeURIComponent(e.user_mask):f&&(s+="&access-token="+f);var _=t+"subs"+s+"&v=5&account-id="+encodeURIComponent(d||e.account_id);a("post",_,JSON.stringify({events:n}),function(e,s){if(!u){if(h)return r(l("dead",n.length)),i(!1);if(p(s))return g=!0,setTimeout(i,3e3,!0);if(200!==s)return v("subs"),r(l("dead",n.length)),i(!1);if(g=!1,u=!0,m)return r(n),i(!1);var a=(e=o(e)||{}).initial_token;return a?(e.host&&(t=c(e.host)),m=a,b(0),r(n),i(!1)):(v("subs"),r(l("dead",n.length)),i(!1))}})})})}),s});this.subscribe=f.push.bind(f),this.getStatus=function(){return h?"dead":g||u?"connecting":"active"};var v=function(t){h=!0,n(t)};this.kill=v}function p(t){return t>=500&&t<600||0===t||-1===t||429===t}function l(t,e){for(var n=[],i=0;i<e;i++)n.push(t);return n}function c(t){return(t=t||"").startsWith("//")?"https:"+t:t}t.exports=function(t,e,n,i,r){("string"==typeof t||t instanceof String)&&(t=[t]),(e=e||{}).getAccessToken||(e.getAccessToken=function(){return Promise.resolve("")}),i||(i=e.account_id||"");var o=new s,p={};this.stop=function(){l&&(l.kill(),l=void 0,o.emit("interrupted"))},this.onEvent=function(t){return o.on("event",t)},this.onInterrupted=function(t){return o.on("interrupted",t)},this.getStatus=function(){return l?l.getStatus():"dead"};var l,c=function(t){if(!l)return Promise.resolve({error:"dead"});if("string"==typeof t&&(t=[t]),!Array.isArray(t))return Promise.resolve({error:"param should be an array or string"});for(var e=[],n=0;n<t.length;n++){var i=t[n];i&&(p[i]||(p[i]=!0,e.push(l.subscribe(i))))}return 0===e.length?Promise.resolve({}):Promise.all(e).then(function(){return l&&"dead"!=l.getStatus()?{}:{error:"dead"}})};this.subscribe=c;var d=function(){var s=t[Math.floor(Math.random()*t.length)];l&&l.kill();var m=new a(s,e,function(t,e,n){void 0!==l&&m==l&&(l=void 0,o.emit("interrupted",t,e,n),r||setTimeout(d,2e3))},function(t){if(m==l)for(var e=0;e<t.length;e++)o.emit("event",t[e])},n,i);l=m;var h=Object.keys(p);return p={},c(h)};this.reconnect=d,d()}},5180(t){t.exports={ApiURL:"https://api.sbz.vn/4.0",RealtimeURL:"https://api.sbz.vn/rts/0/",FileURL:"https://vcdn.subiz-cdn.com/file/",BaseURL:"https://widget.sbz.vn"}},2959(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(5922),r=n(2840),o=n(172);class s extends r.Mw{render(){var t=this.props.emojiCode;if(i.A.size(t)<3)return null;var e=t.replace(/:/g,"");return(0,o.h)("i",{"data-tooltip":t,class:`emoji emoji--${e}`})}}},7072(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5922),r=n(2959),o=n(2840),s=n(172);class a extends o.Mw{constructor(t){super(t)}renderBlock(t){if(0==i.A.size(t))return null;let e={style:""};if(t.style&&i.A.map(t.style,(t,n)=>{e.style+=n+": "+t+";"}),e.attrs={},""!=t.title&&(e.attrs.title=t.title),""!=t.href&&(e.attrs.href=t.href),e.class=t.class,i.A.map(t.attrs,(t,n)=>{e.attrs[n]=t}),"bullet_list"!=t.type&&"ordered_list"!=t.type||("bullet_list"==t.type?e.tag="ul":e.tag="ol"),"list_item"==t.type&&(e.tag="li"),"heading"==t.type&&(t.level<1&&(t.level=1),t.level>6&&(t.level=6),e.tag="h"+t.level),"paragraph"!=t.type&&"section"!=t.type&&"div"!=t.type||(e.tag="div"),e.text=t.text,""!=t.type&&"text"!=t.type&&"dynamic-field"!=t.type||(e.tag="span",t.bold&&(e.tag="b"),t.italic&&("b"==e.tag?e.style+="font-style: italic;":e.tag="em"),t.underline&&(e.Style+="text-decoration:underline;"),t.strike_through&&(e.Style+="text-decoration: line-through;")),"dynamic-field"==t.type){let n=i.A.get(t.attrs,"key");e.text=i.A.get(this.props.data,[n],e.text)}if("link"==t.type&&(e.tag="a",e.attrs.href=t.href,e.attrs.target=t.target,e.attrs.title=t.title),"mention-agent"==t.type||"mention"==t.type){e.tag="span",e.class="mention";let n=t.attrs.id="";if("*"!=t.attrs.id&&"all"!=t.attrs.id||(e.text="@"+this.$t("all")),n.startsWith("ag")){let t=store.matchAgent(n),r=i.A.getAgentDisplayName(t,insert.mention.fullname);e.text="@"+r}}if("horizontal_rule"==t.type&&(e.tag="hr"),"emoji"==t.type){let n="";i.A.size(t.attrs)>0&&(n=t.attrs.code),""==n&&(n=t.Text),""!=n&&(e.tag="Emoji",e.attrs.emojiCode=n)}if("table"==t.type)return null;"image"===t.type&&(e.tag="img",e.attrs.src=i.A.get(t,"image.url"),e.attrs.alt=t.alt_text);let n=null;switch(n=i.A.size(t.content)?i.A.map(t.content,t=>this.renderBlock(t)):"text"===t.type?i.A.extractText(e.text).map(t=>{if("link"===t.type){let e=t.text||"";return e.startsWith("//")||e.startsWith("https://")||e.startsWith("http://")||e.startsWith("data:")||(e="//"+e),(0,s.h)("a",{href:e,target:"_blank",onClick:t=>this.props.onLink(t,e)},t.text)}return"phone"===t.type?(0,s.h)("a",{href:"tel:"+t.text},t.text):"email"===t.type?(0,s.h)("a",{href:"mailto:"+t.text},t.text):t.text}):e.text,e.tag){case"img":return(0,s.h)("a",{class:this.props.textMessage?"message-text-inline-image-wrapper":"",href:i.A.get(e,"attrs.src"),target:"_blank"},(0,s.h)("img",{class:this.props.textMessage?"message-text-inline-image":"",src:i.A.get(e,"attrs.src"),alt:i.A.get(e,"attrs.alt")||""}));case"div":return(0,s.h)("div",null,n);case"h1":return(0,s.h)("h1",null,n);case"h2":return(0,s.h)("h2",null,n);case"h3":return(0,s.h)("h3",null,n);case"h4":return(0,s.h)("h4",null,n);case"h5":return(0,s.h)("h5",null,n);case"h6":return(0,s.h)("h6",null,n);case"ol":return(0,s.h)("ol",{class:this.props.textMessage?"text-message-ol":""},n);case"ul":return(0,s.h)("ul",{class:this.props.textMessage?"text-message-ul":""},n);case"li":return(0,s.h)("li",{class:this.props.textMessage?"text-message-li":""},n);case"span":return(0,s.h)("span",null,n);case"em":return(0,s.h)("em",null,n);case"b":return(0,s.h)("b",null,n);case"hr":return(0,s.h)("hr",null);case"a":return(0,s.h)("a",{class:this.props.textMessage?"message-text-link":"",href:e.attrs.href,target:this.props.textMessage?"_blank":e.attrs.target,title:e.attrs.title},n);case"Emoji":return(0,s.h)(r.A,{emojiCode:e.attrs.emojiCode})}return null}render(){return this.renderBlock(this.props.block)}}},9278(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i});const i=n(8113)},2988(t,e,n){"use strict";n.d(e,{A:()=>r});var i=n(5922);const r=class{constructor(t){this.duration=t.duration||100,this.breakingV=t.breakingV||7,this.maxY=t.maxY||500,this.minY=t.minY||0}play(t,e,n){var r;this.stop();var o=s=>{s||(s=(new i.A.Date).getTime());var a=s-r,[p,l]=this.calcY(t,e,a);if(n(p),l)return this.stop();this.animationframe=window.requestAnimationFrame(o)};this.animationframe=window.requestAnimationFrame(t=>{r=t||(new i.A.Date).getTime(),o(r)})}calcY(t,e,n){var i,r=function(t,e,n,i){if(o(t,e))return t;var r=t+(e-t)/i*n;return(t<e&&r>e||e<t&&r<e)&&(r=e),r}(e,i=e>this.maxY?this.maxY:e<this.minY?this.minY:Math.abs(t)<this.breakingV?Math.abs(this.maxY-e)<Math.abs(this.minY-e)?this.maxY:this.minY:t<0?this.maxY:this.minY,n,this.duration);return[r,o(r,i)]}stop(){window.cancelAnimationFrame(this.animationframe)}};function o(t,e){return Math.abs(t-e)<=.001}},4188(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(2840),r=n(172);const o=n(6973);class s extends i.Mw{render(){(this.props.mode+"").toLowerCase();let t=this.props.size||14,e=(Math.ceil(t/14),`width: ${t}px !important;height: ${t}px !important;`);return this.props.center?(0,r.h)("div",{class:"loading"},(0,r.h)("img",{alt:"loading",style:e,src:o})):(0,r.h)("img",{alt:"loading",style:e,src:o})}}},1620(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5922),r=n(2840),o=n(172),s=new i.A.Pubsub;i.A.setInterval(()=>s.publish("time"),2e4);class a extends r.Mw{constructor(t){super(t),this.setState({t:"",langCode:"en_US"})}updateTime(){var t="";let e="";this.props.t&&this.props.t.locale&&"function"==typeof this.props.t.locale&&(e=this.props.t.locale()),this.props.ago?(this.props.short,!t&&this.props.time>0&&(t=function(t,e,n){let i={s:"%d sec",m:"1 min",mm:"%d mins",h:"1 hour",hh:"%d hours",d:"1 day",dd:"%d days",M:"1 month",MM:"%d months",y:"1 year",yy:"%d years"};n&&(i={s:`%d ${n("second_short")}`,m:`1 ${n("minute_short")}`,mm:`%d ${n("minutes_short")}`,h:`1 ${n("hour_short")}`,hh:`%d ${n("hours_short")}`,d:`1 ${n("day_short")}`,dd:`%d ${n("days_short")}`,M:`1 ${n("month_short")}`,MM:`%d ${n("months_short")}`,y:`1 ${n("year_short")}`,yy:`%d ${n("years_short")}`});const r=i,o=[{l:"s",r:44,d:1e3},{l:"m",r:89},{l:"mm",r:44,d:6e4},{l:"h",r:89},{l:"hh",r:21,d:36e5},{l:"d",r:35},{l:"dd",r:25,d:864e5},{l:"M",r:45},{l:"MM",r:10,d:2592e6},{l:"y",r:17},{l:"yy",d:31536e6}],s=o.length;let a,p;for(let n=0;n<s;n+=1){let i=o[n];i.d&&(a=(t-e)/i.d);let s=Math.round(Math.abs(a));if(s<=i.r||!i.r){s<=1&&n>0&&(i=o[n-1]),p=r[i.l].replace("%d",s);break}}return p}(this.props.time,(new i.A.Date).getTime(),this.props.t))):t=i.A.shortTime(this.props.time,this.props.tzoffset,i.A.Date.now(),e),this.props.uppercase&&(t=t.toUpperCase()),t!==this.state.t&&this.setState({t})}componentDidMount(){s.on2(this,"time",()=>this.updateTime()),this.updateTime()}render(){let t=i.A.get(navigator,"languages.0","en-US");this.props.t&&this.props.t.locale&&"function"==typeof this.props.t.locale&&(t=this.props.t.locale());let e=new Date(this.props.time).toLocaleString(t);return(0,o.h)("span",{class:this.props.class,style:this.props.style,title:e},this.state.t)}}},2840(t,e,n){"use strict";n.d(e,{Dy:()=>c,JK:()=>a,Mw:()=>o,r9:()=>p,tW:()=>s});var i=n(172),r=n(5922);class o extends i.uA{constructor(t){super(t),this._isMounted=!0,r.A.setTimeout(()=>{if(this.componentWillUnmount){let t=this.componentWillUnmount.bind(this);this.componentWillUnmount=()=>{t(),this._isMounted=!1}}},10)}}class s extends o{constructor(t){super(t),this.setWrapperRef=this.setWrapperRef.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){document.addEventListener("mousedown",this.onClick)}componentWillUnmount(){document.removeEventListener("mousedown",this.onClick)}setWrapperRef(t){this.wrapperRef=t}onClick(t){this.wrapperRef&&!this.wrapperRef.contains(t.target)&&this.props.onClickaway&&this.props.onClickaway()}render(){return(0,i.h)("div",{ref:this.setWrapperRef},this.props.children)}}const a=(t,e)=>{e||(e="");let n=r.A.find(t.locales,t=>t.toLowerCase().trim()===e.toLowerCase().trim());return n||(n=r.A.find(t.locales,t=>(t=t.replace("-","_").split("_")[0].trim().toLowerCase())==e.replace("-","_").split("_")[0].trim().toLowerCase()),n||t.locale||"en-US")};let p={},l=!1;function c(t,e,n){if(l)return new Promise(i=>r.A.setTimeout(()=>c(t,e,n).then(i),100));let i;return l=!0,"debug"===e||p[e]&&!n?(l=!1,Promise.resolve()):t.getLocaleContent(e).then(t=>{l=!1,i=r.A.get(t,"body.messages",[]),p[e]=i})}},450(t){var e={},n={};e.length=0,e.cache=n,e.getItem=function(t){return t in n?n[t]:null},e.setItem=function(t,i){void 0===i?e.removeItem(t):(Object.prototype.hasOwnProperty.call(n,t)||e.length++,n[t]=i)},e.removeItem=function(t){Object.prototype.hasOwnProperty.call(n,t)&&(delete n[t],e.length--)},e.key=function(t){return Object.keys(n)[t]||null},e.clear=function(){n={},e.length=0},t.exports=e},3078(t,e,n){"use strict";n.r(e),n.d(e,{trackAreaClicked:()=>s,trackExitIntent:()=>r,trackInactivity:()=>a,trackScrollingPercentage:()=>o,trackTimeOnPage:()=>l});var i=n(9917);function r(t){let e=n=>{n.clientY>10||(t&&t(),document.removeEventListener("mouseout",e))};document.addEventListener("mouseout",e)}function o(t,e){let n=i=>{let r=i.srcElement.scrollingElement?i.srcElement.scrollingElement.scrollTop:i.srcElement.scrollTop,o=i.srcElement.scrollingElement?i.srcElement.scrollingElement.scrollHeight:i.srcElement.scrollHeight;r>0&&o>0&&(r+window.innerHeight)/o>=t&&(e&&e(),window.removeEventListener("scroll",n,!1))};window.addEventListener("scroll",n,!1)}function s(t,e){t&&(t=t||"",i.map(t.split("\n"),t=>{(t=i.trim(t))&&function(t,e,n){document.addEventListener("click",function(t){let i=document.querySelectorAll(e),r=t.target;for(let e=0,o=i.length;e<o;e++){let o=r,s=i[e];for(;o&&o!==document;){if(o===s)return n.call(s,t);o=o.parentNode}}})}(0,t,e)}))}function a(t=0,e){let n=["scroll","keyup","keydown","mousemove","mousewheel","mouseenter","mouseover","mousedown","touchstart","touchmove","touchenter"],r=0,o=()=>{r=0},s=i.setInterval(()=>{if(r++,!(r<t)){e&&e();for(let t of n)document.removeEventListener(t,o,!1);i.clearInterval(s)}},1e3);for(let t of n)document.addEventListener(t,o,!1)}let p=i.Date.now();function l(t=0,e){if(t<1)return i.setTimeout(function(){e(t)},100);let n=i.setInterval(()=>{let r=(i.Date.now()-p)/1e3;r<t||(e&&e(r),i.clearInterval(n))},200)}},9917(t,e,n){"use strict";n.r(e),n.d(e,{DEFVAL:()=>gt,DEF_CHAT_BUTTON_BACKGROUND_IMAGE_URL:()=>ut,Date:()=>y,XMLHttpRequest:()=>I,agentsOfConvo:()=>O,blockToText:()=>Rt,checkRunConditions:()=>vt,clearInterval:()=>A,clearTimeout:()=>z,cloneDeep:()=>E,convoOfEv:()=>S,convoToEv:()=>D,detectLang:()=>Dt,diffDay:()=>At,diffYear:()=>zt,each:()=>U,extract:()=>m,extractEmails:()=>c,extractEmojis:()=>p,extractLinks:()=>l,extractPhones:()=>d,extractText:()=>u,filter:()=>P,find:()=>V,formatCurrency:()=>Et,getAgentDisplayName:()=>it,getDayName:()=>_t,getMs:()=>St,getUrlParameter:()=>jt,getUserAttr:()=>st,hslToRgb:()=>a,includes:()=>N,isBlockEmpty:()=>Ut,isConvoSeen:()=>F,isEmail:()=>et,isEmptyBlock:()=>Gt,isEmptyMessage:()=>Ht,isNumber:()=>tt,isPhone:()=>X,isURL:()=>K,isUserBanned:()=>rt,js2css:()=>bt,last:()=>nt,map:()=>R,merge:()=>T,noop:()=>pt,norm:()=>at,offsetToMin:()=>kt,orderBy:()=>Y,orderByF:()=>Q,parseJSON:()=>g,pipeExtracts:()=>h,preloadImg:()=>wt,preloadWebfonts:()=>xt,randomString:()=>L,replaceAll:()=>B,replaceCssVariable:()=>dt,replaceCssVariablePlugin:()=>ct,requestAnimationFrame:()=>x,rgbToHsl:()=>s,sameDay:()=>It,scrollIntoViewIfNeeded:()=>Pt,setCss:()=>ht,setInterval:()=>k,setTimeout:()=>w,setUserAttr:()=>ot,shortTime:()=>Ct,size:()=>H,sleep:()=>Tt,startsWith:()=>G,stringify:()=>v,throttle:()=>$,tokenize:()=>mt,trim:()=>Z,trimStart:()=>q,unicodeToAscii:()=>Lt,unixSec:()=>Mt,usersOfConvo:()=>W});var r=n(3259);const o=n(318);function s(t,e,n){t/=255,e/=255,n/=255;var i,r,o=Math.max(t,e,n),s=Math.min(t,e,n),a=(o+s)/2;if(o==s)i=r=0;else{var p=o-s;switch(r=a>.5?p/(2-o-s):p/(o+s),o){case t:i=(e-n)/p+(e<n?6:0);break;case e:i=(n-t)/p+2;break;case n:i=(t-e)/p+4}i/=6}return[i,r,a]}function a(t,e,n){var i,r,o;if(0==e)i=r=o=n;else{function p(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=p(a,s,t+1/3),r=p(a,s,t),o=p(a,s,t-1/3)}return[255*i,255*r,255*o]}function p(t){for(var e=[],n=0;n<t.length;n++)for(var i=0;i<Ot.length;i++)if(t.indexOf(Ot[i],n)===n){e.push({index:n,length:Ot[i].length}),n+=Ot[i].length-1;break}return e}function l(t){t=t||"";for(var e,n=/(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z()]{2,6}\b([-a-zA-Z0-9@:%_\+.,~#?&//=]*)/gim,i=[];e=n.exec(t);){const t=5;n.lastIndex-e.index>t+1&&i.push({index:e.index,length:n.lastIndex-e.index})}return i}function c(t){t=t||"";for(var e,n=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gim,i=[];e=n.exec(t);)i.push({index:e.index,length:n.lastIndex-e.index});return i}function d(t){t=t||"";for(var e="",n={},i=0;i<t.length;i++){var r=t.charAt(i);if("."===r||"-"===r||" "===r){var o=i>0?t.charAt(i-1):"-",s=i<t.length-1?t.charAt(i+1):"-";-1!=="0123456789".indexOf(o)&&-1!=="0123456789".indexOf(s)||(n[(e+=r).length-1]=i)}else n[(e+=r).length-1]=i}for(var a,p=/([0-9]{8,13})/gim,l=[];a=p.exec(e);)l.push({index:n[a.index],length:n[p.lastIndex-1]-n[a.index]+1});return l}function m(t,e,n){if(!t)return[];var i=[],r=0,o=e(t);if(0===H(o))return[{type:"text",text:t}];U(o,e=>{i.push({type:"text",text:t.substr(r,e.index-r)}),i.push({type:n,text:t.substr(e.index,e.length)}),r=e.index+e.length});var s=nt(o);return i.push({type:"text",text:t.substr(s.index+s.length,t.length-s.index+s.length)}),P(i,t=>""!==t.text)}function h(t,e){var n=[];if(0===H(e))return[{type:"text",text:t}];var i=e.shift();return U(m(t,i,i.type),t=>{if("text"!==t.type)return n.push(t);n=n.concat(h(t.text,e.slice()))}),n}function u(t){var e=l;e.type="link";var n=c;n.type="email";var i=d;i.type="phone";var r=p;return r.type="emoji",h(t,[e,n,i,r])}function g(t){try{return _(t)}catch(t){}}var b=document.createElement("iframe");b.style.display="none",document.documentElement.appendChild(b);const f=b.contentDocument.createElement("div");b.contentDocument.body.appendChild(f);var v=b.contentWindow.JSON.stringify,_=b.contentWindow.JSON.parse,y=b.contentWindow.Date,x=b.contentWindow.requestAnimationFrame,w=b.contentWindow.setTimeout.bind(b.contentWindow),k=b.contentWindow.setInterval.bind(b.contentWindow),A=b.contentWindow.clearInterval.bind(b.contentWindow),z=b.contentWindow.clearTimeout.bind(b.contentWindow),I=b.contentWindow.XMLHttpRequest;const C=I.prototype.open,M=I.prototype.send;function S(t){return t?r.get(t,"data.conversation.id",r.get(t,"data.message.conversation_id")):""}function D(t,e){if(!e)return"";switch(e.type){case"message_sent":case"message_updated":case"message_deleted":case"message_pong":return r.set(e,"data.message.conversation_id",t);case"ticket_updated":return r.set(e,"data.ticket.conversation_id",t);default:return r.set(e,"data.conversation.id",t)}}function j(t){return t&&"object"==typeof t&&!Array.isArray(t)}function T(t,...e){if(!e.length)return t;const n=e.shift();if(j(t)&&j(n))for(const e in n)j(n[e])?(t[e]||Object.assign(t,{[e]:{}}),T(t[e],n[e])):Object.assign(t,{[e]:n[e]});return T(t,...e)}function E(t){if(t!==Object(t))return t;var e=v(t);return void 0!==e?_(e):void 0}function L(t){var e,n="";(!t||t<1)&&(t=10);for(var i=0;i<t;i++)e=Math.floor(25*Math.random()+97),n+=String.fromCharCode(e);return n}function P(t,e){if(!t)return[];if(!e)return t;var n=[];if(Array.isArray(t)){for(let i=0;i<t.length;i++)e(t[i],i)&&n.push(t[i]);return n}if("object"==typeof t){var i=Object.keys(t);for(let o=0;o<i.length;o++){var r=i[o];e(t[r],r)&&n.push(t[r])}return n}return n}function N(t,e){if(!t)return!1;var n="string"==typeof t||t instanceof String;return!(!Array.isArray(t)&&!n)&&t.includes(e)}function R(t,e){if(!t)return[];e||(e=t=>t);var n=[];if(Array.isArray(t)){for(let i=0;i<t.length;i++)n.push(e(t[i],i));return n}if("object"==typeof t){var i=Object.keys(t);for(let o=0;o<i.length;o++){var r=i[o];n.push(e(t[r],r))}return n}return n}function U(t,e){return R(t,e)}function W(t){return t?R(P(t.members,t=>"user"===t.type),t=>t.id):[]}function F(t,e){if("ended"===t.state)return!0;let n=t.last_message_sent;if(!n)return!0;if(r.get(n,"by.id")===e)return!0;let i=V(t.members,t=>t.id===e);return!i||St(n.created)<St(i.seen_at)}function O(t,e){return t?R(P(t.members,t=>e?"agent"===t.type||"bot"===t.type:"agent"===t.type),t=>t.id):[]}function G(t,e){return((t||"")+"").startsWith(e)}function H(t){return t?void 0!==t.length?t.length:Object.keys(t).length:0}function B(t,e,n){return(t||"").split(e).join(n)}function Z(t,e){return((t||"")+"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function q(t,e){for(t=(t||"")+"";t.charAt(0)===e;)t=t.substr(1);return t}function $(t,e,n){var i,r,o,s=null,a=0;n||(n={});var p=function(){a=!1===n.leading?0:(new y).getTime(),s=null,o=t.apply(i,r),s||(i=r=null)};return function(){var l=(new y).getTime();a||!1!==n.leading||(a=l);var c=e-(l-a);return i=this,r=arguments,c<=0||c>e?(s&&(z(s),s=null),a=l,o=t.apply(i,r),s||(i=r=null)):s||!1===n.trailing||(s=w(p,c)),o}}function V(t,e){if(t)return t[J(t,e)]}function J(t,e){if(!t)return-1;if(!e)return-1;if(Array.isArray(t)){for(let n=0;n<t.length;n++)if(e(t[n],n))return n;return-1}if("object"==typeof t){var n=Object.keys(t);for(let r=0;r<n.length;r++){var i=n[r];if(e(t[i],i))return i}}return-1}function Y(t,e,n){var i=[];return U(t,t=>i.push(t)),i.sort((t,i)=>{if(t[e]===i[e])return 0;var r=t[e]<i[e]?-1:1;return"desc"===n?-r:r}),i}function Q(t,e,n){var i=[];return U(t,t=>i.push(t)),i.sort((t,i)=>{let r=e(t),o=e(i);if(r===o)return 0;var s=r<o?-1:1;return"desc"===n?-s:s}),i}function X(t){return/^[\+]?[(]?[0-9]{2,3}[)]?[-\s\.]?[0-9]{3,4}[-\s\.]?[0-9]{4,6}$/im.test(String(t))}function K(t){return/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi.test(String(t).toLowerCase())}function tt(t){return/^\d+$/.test(String(t))}function et(t){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}function nt(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}function it(t,e){return r.get(e,"fullname")||r.get(e,"email")||r.get(t,"name")||"Agent"}function rt(t){return st(t,"is_ban","boolean")}function ot(t,e){if(t&&r.get(e,"key")){t.attributes=t.attributes||[];var n=J(t.attributes,t=>t&&t.key===e.key);-1!==n?t.attributes[n]=e:t.attributes.push(e)}}function st(t,e,n){if(!t||!t.attributes)return;let i;return U(t.attributes,t=>{t&&t.key===e&&("datetime"===n&&(i=t.datetime),"boolean"===n&&(i=t.boolean),"number"===n&&(i=t.number),"text"===n&&(i=t.text),"list"===n&&(i=[t.text].concat(t.other_values)))}),i}function at(t){return(t=t||"").trim().toLowerCase()}function pt(){}function lt(t){return("string"==typeof t||t instanceof String)&&(t=t.trim().replace(/;+$/,"")),t}function ct(t,e){var n=[t];let i=e.spacer||10;e=Object.assign({},e,{spacer:i+"px",spacer0:i/2+"px",spacer2:2*i+"px",spacer3:3*i+"px"}),n=mt(n,"'@font_family'"),n=mt(n,"'@font_size'"),n=mt(n,"'@text_color'"),n=mt(n,"'@faded_text_color'"),n=mt(n,"'@primary_color'"),n=mt(n,"'@background'"),n=mt(n,"'@spacer'"),n=mt(n,"'@spacer0'"),n=mt(n,"'@spacer2'"),n=mt(n,"'@spacer3'");let o=Ft(r.get(e,"primary_color")||r.get(gt,"primary_color"));o||(o={red:238,blue:238,green:238});let p=s(o.red,o.green,o.blue)[0],[l,c,d]=a(p,.25,.95);gt.primary_color_faded=`rgb(${l},${c},${d})`;for(var m=[],h=0;h<n.length;h++){var u=n[h];if("string"!=typeof u){var g=u.type.substr(2,u.type.length-3),b=r.get(e,g)||r.get(gt,g)||"";m.push(b)}else m.push(u)}return m.join("")}function dt(t,e){var n=[t];n=mt(n,"'@primary_color'"),n=mt(n,"'@primary_color_faded'"),n=mt(n,"@esc-primary-color-esc"),n=mt(n,"'@secondary_color'"),n=mt(n,"'@background'"),n=mt(n,"'@text_color'"),n=mt(n,"'@width'"),n=mt(n,"'@height'"),n=mt(n,"'@desktop_button.width'"),n=mt(n,"'@desktop_button.height'"),n=mt(n,"'@desktop_button.background'"),n=mt(n,"'@desktop_button.border_radius'"),n=mt(n,"'@desktop_button.margin_x'"),n=mt(n,"'@desktop_button.margin_y'"),n=mt(n,"'@desktop_widget_max_height'"),n=mt(n,"'@preview_max_width'"),n=mt(n,"'@mobile_button.width'"),n=mt(n,"'@mobile_button.height'"),n=mt(n,"'@mobile_button.background'"),n=mt(n,"'@mobile_button.border_radius'"),n=mt(n,"'@mobile_button.margin_x'"),n=mt(n,"'@mobile_button.margin_y'"),n=mt(n,"'@widget_position'"),n=mt(n,"'@z_index'"),n=mt(n,"'@z_index_2'"),n=mt(n,"'@z_index_3'"),n=mt(n,"'@z_index_4'"),n=mt(n,"'@z_index_5'"),n=mt(n,"'@form_background_color'"),n=mt(n,"'@form_header_font_size'"),n=mt(n,"'@form_header_font_family'"),n=mt(n,"'@form_desc_font_size'"),n=mt(n,"'@form_desc_font_family'"),n=mt(n,"'@form_input_label_font_size'"),n=mt(n,"'@form_input_label_font_family'");let i=Ft(r.get(e,"primary_color")||r.get(gt,"primary_color"));i||(i={red:238,blue:238,green:238});let o=s(i.red,i.green,i.blue)[0],[p,l,c]=a(o,.25,.95);gt.primary_color_faded=`rgb(${p},${l},${c})`;for(var d=[],m=0;m<n.length;m++){var h=n[m];if("string"!=typeof h)if("@esc-primary-color-esc"!==h.type)if("'@z_index_2'"!==h.type)if("'@z_index_3'"!==h.type)if("'@z_index_4'"!==h.type)if("'@z_index_5'"!==h.type){var u=h.type.substr(2,h.type.length-3);g=lt(g=r.get(e,u)||r.get(gt,u)||""),["mobile_button.width","mobile_button.height","mobile_button.margin_x","mobile_button.margin_y","desktop_button.width","desktop_button.height","desktop_button.margin_x","desktop_button.margin_y","form_header_font_size","form_desc_font_size","form_input_label_font_size","width","height"].includes(u)&&(g+="px"),"height"!==u||"full"!==r.get(e,"window_mode")?d.push(g):d.push("100%")}else g=r.get(e,"z_index")||r.get(gt,"z_index"),d.push(g+5);else g=r.get(e,"z_index")||r.get(gt,"z_index"),d.push(g+4);else{var g=r.get(e,"z_index")||r.get(gt,"z_index");d.push(g+3)}else{g=r.get(e,"z_index")||r.get(gt,"z_index");d.push(g+2)}else{g=r.get(e,"primary_color")||r.get(gt,"primary_color");d.push(encodeURIComponent(lt(g)))}else d.push(h)}return d.join("")}function mt(t,e){if(!t||!t.length)return[];var n=[];for(let o=0;o<t.length;o++){var i=t[o];if("string"==typeof i){var r=i.split(e);for(let t=0;t<r.length;t++)n.push(r[t]),n.push({type:e});n.pop()}else n.push(i)}return n}function ht(t,e,n){n=B(n,"#sbz92","#"+t),e.styleSheet?e.styleSheet.cssText=n:(e.innerHTML="",e.appendChild(document.createTextNode(n)))}I.prototype.open=function(t,e,n,i,r){return this._url=e,C.apply(this,arguments)},I.prototype.send=function(t){let e=this.onreadystatechange;return this.onreadystatechange=function(t,n,i){4==this.readyState&&((this.status>=400||0==this.status)&&"object"==typeof sbz_logs&&sbz_logs.push({type:"xhrfailed",url:this._url,status:this.status,response:this.responseText}),"function"==typeof e&&e(t,n,i))},M.apply(this,arguments)},o.env.XMLHttpRequest=I;const ut="https://vcdn.subiz-cdn.com/file/bubble_11.svg?v=5",gt={primary_color:"#0265FF",secondary_color:"#555555",background:"linear-gradient(280.16deg, #0053d3 22.03%, #0265ff 78.2%)",text_color:"white",width:375,height:705,window_mode:"mini",desktop_button:{width:.3,height:.3,border_radius:"100%",background_mask_url:ut,margin_x:.3,margin_y:.3},mobile_button:{width:.3,height:.3,border_radius:"100%",background_mask_url:ut,margin_x:.3,margin_y:.3},widget_position:"fixed",z_index:2e9};function bt(t,e,n){var i={};for(var r in t)t.hasOwnProperty(r)&&(e&&e.length>0&&-1===e.indexOf(r)||("string"==typeof t[r]?i[r]=Z(t[r]):i[r]=t[r]));t=i;let o="";for(var r in t)if(t.hasOwnProperty(r)){var s="";if(t.blur&&(s+="blur("+t.blur+") "),t.grayscale&&(s+="grayscale("+t+") "),s&&(o+="filter: "+s+"!important;"),void 0!==t.rotate&&(o+="transform:rotate("+t.rotate+") !important;"),void 0!==t[r]){let e=t[r]+"";R(n,(t,n)=>{-1!==e.indexOf(n)&&(e=B(e,n,t))}),o+=B(r,"_","-")+":"+e+" !important;","color"===r&&(o+="-webkit-text-fill-color: "+e+" !important;")}}return o}function ft(){var t=!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,e="undefined"!=typeof InstallTrigger,n=(/constructor/i.test(window.HTMLElement)||(!window.safari||"undefined"!=typeof safari&&window.safari.pushNotification).toString(),!!document.documentMode),i=!n&&!!window.StyleMedia,r=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime);r||(r=navigator.userAgent.indexOf("Chrome"));var o=r&&-1!=navigator.userAgent.indexOf("Edg"),s=(r||t)&&!!window.CSS;return t?"opera":e?"firefox":n?"ie":i||o?"edge":r?"chrome":s?"blink":"unknown"}function vt(t,e,n,i){var o=i.matchAccount()||{},s=i.matchLocation()||{};if(!function(t,e){return!(e&&(r.get(t,"once_per_user")||r.get(t,"once_per_session")&&It(e.created,y.now())||r.get(t,"interval_sec")&&r.get(t,"interval_sec")>(y.now()-e.created)/1e3))}(t,n))return!1;for(let t=0;t<H(e);t++){var a=e[t];switch(a.key){case"url":let t=P(a.exclude_urls,t=>at(t));if(H(t)>0&&V(t,t=>at(window.location.href).indexOf(at(t))>-1))return!1;let e=P(a.urls,t=>at(t));if(H(e)>0&&!V(e,t=>at(window.location.href).indexOf(at(t))>-1))return!1;break;case"url_path":let n=P(a.exclude_url_paths,t=>at(t));if(H(n)>0){let t=new URL(window.location.href).pathname||"";if("string"==typeof t&&t.endsWith("/")&&(t=t.substring(0,t.length-1)),V(n,e=>("string"==typeof e&&e.endsWith("/")&&(e=e.substring(0,e.length-1)),t===e)))return!1}let d=P(a.url_paths,t=>at(t));if(H(d)>0){let t=new URL(window.location.href).pathname||"";if("string"==typeof t&&t.endsWith("/")&&(t=t.substring(0,t.length-1)),!V(d,e=>("string"==typeof e&&e.endsWith("/")&&(e=e.substring(0,e.length-1)),t===e)))return!1}break;case"browser":if(H(a.browsers)>0){var p=ft();if(!V(a.browsers,t=>at(t)===at(p)))return!1}break;case"location":if(H(a.exclude_locations)>0&&V(a.exclude_locations,t=>!(!t.city_name||!t.country_code||t.city_name!==s.city_name||t.country_code!==s.country_code)||!(!t.city_name||t.country_code||t.city_name!==s.city_name)||!(t.city_name||!t.country_code||t.country_code!==s.country_code)||void 0))return!1;if(H(a.locations)>0&&!V(a.locations,t=>!(!t.city_name||!t.country_code||t.city_name!==s.city_name||t.country_code!==s.country_code)||!(!t.city_name||t.country_code||t.city_name!==s.city_name)||!(t.city_name||!t.country_code||t.country_code!==s.country_code)||void 0))return!1;break;case"returning_visitor":if(a.returning_visitor&&i.new_visitor)return!1;if(!a.returning_visitor&&!i.new_visitor)return!1;break;case"user_is_a_contact":let m=r.get(i.matchUser(),"attributes",[]),h=V(m,t=>"emails"===t.key&&attr.text&&"related_email"===t.key&&attr.text),u=V(m,t=>"phones"===t.key&&attr.text&&"related_phone"===t.key&&attr.text),b=h||u;if(a.user_is_a_contact&&!b)return!1;if(!a.user_is_a_contact&&b)return!1;break;case"device_type":if(H(a.device_types)>0){let t="desktop";if(i.isMobile()&&(t="mobile"),i.isTablet()&&(t="tablet"),!V(a.device_types,e=>at(e)===at(t)))return!1}break;case"referer":if(H(a.exclude_referers)>0&&V(a.exclude_referers,t=>at(document.referrer).indexOf(at(t))>-1))return!1;if(H(a.urls)>0&&!V(a.referers,t=>at(document.referrer).indexOf(at(t))>-1))return!1;break;case"source":if(H(a.sources)>0){let t=i.matchTrafficSource()||"direct";if(!V(a.sources,e=>at(e)===at(t)))return!1}break;case"user_attribute":case"user":let f,v=r.get(i.matchUser(),"attributes",[]),_=r.get(a,"user.operator");U(v,t=>{t&&t.key===r.get(a,"user.key")&&(f=t.datetime||t.boolean||t.number||t.text||t.list)});let x=!0;switch(_){case"cons":let t=g(a.value)||[];if(0===H(t))return!1;x=!!V(t,t=>at(f).indexOf(at(t))>-1);break;case"notEmpty":x=!!f;break;case"empty":x=!f;break;case"true":x=!0===f||"true"===f;break;case"false":x=!f||!1===f||"false"===f}if(!x)return!1;break;case"timming":if("in"===a.business_hour&&!o.is_in_business_hour)return!1;if("notIn"===a.business_hour&&o.is_in_business_hour)return!1;if(H(a.days_of_week)>0&&!V(a.days_of_week,t=>at(_t((new y).getDay()))===at(t)))return!1;if(H(a.minutes_of_day)>0&&H(a.minutes_of_day)%2==0){var l=new y,c=l.getMinutes()+60*l.getHours();let t=!1;for(let e=0;e<a.minutes_of_day.length;e+=2){if(a.minutes_of_day[e]<=c&&c<=a.minutes_of_day[e+1]){t=!0;break}if(a.minutes_of_day[e]>a.minutes_of_day[e+1]&&(c>=a.minutes_of_day[e]||c<=a.minutes_of_day[e+1])){t=!0;break}}if(!t)return!1}break;case"offline":if(!o.is_online!=!!a.offline)return!1}}return!0}function _t(t){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t]}let yt={};function xt(t,e){for(var n=0;n<t.length;n++){let e=t[n];if(e&&!yt[e]){yt[e]=!0;for(var i=0;i<2;i++){let t=[400,500][i],n=document.createElement("div");n.innerHTML="@!-/#Chào mỪng1",n.style.position="absolute",n.style.display="block",n.style.opacity="0.1",n.style.color="transparent",n.style.fontSize="20px",n.style.height="0px",n.style.top="0px",n.style.width="0px",n.style.fontWeight=t,n.setAttribute("subiz-preload",e+":"+t),document.body.appendChild(n),n.style.fontFamily=e,w(()=>n.remove(),3e3)}}}}function wt(t,e){if(e||(e=()=>{}),!t)return e(),Promise.resolve(!0);let n=new Image;return t=function(t){let e="https://vcdn.subiz-cdn.com/file/";return t?G(t,"/")||G(t,"data:")?t:(G(t,"http://")||G(t,"https://")||G(t,"//")||(t=Z(e)+"/"+q(t,"/")),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("https://file-subiz.com/",e)).replace("http://file-subiz.com/",e)).replace("https://file-v4.subiz.com/",e)).replace("http://file-v4.subiz.com/",e)).replace("https://filev4.subiz.com/",e)).replace("http://filev4.subiz.com/",e)).replace("https://filev4-1.subiz.com/",e)).replace("http://filev4-1.subiz.com/",e)).replace("https://file.subiz.com/",e)).replace("http://file.subiz.com/",e)).replace("https://file.mysubiz.com/",e)).replace("http://file.mysubiz.com/",e)):""}(t),n.src=t,new Promise(t=>{n.onload=()=>{e(),t()}})}function kt(t){if(!t)return 0;t.length<=2&&(t+=":00");let e=t.split(":");if(2!==e.length)return 0;let n=parseInt(e[0]);if(n<0||n>23)return 0;let i=parseInt(e[1]);return i<0||i>59?0:60*n+i}function At(t,e,n){var i=-(new y).getTimezoneOffset();n&&(i=kt(n));var r=new y(t).getTime(),o=new y(e).getTime(),s=Math.ceil((r/60/1e3+i)/60/24),a=Math.ceil((o/60/1e3+i)/60/24);return Math.abs(s-a)}function zt(t,e,n){var i=-(new y).getTimezoneOffset(),r=-(new y).getTimezoneOffset();n&&(r=kt(n));var o=new y(t).getTime()+60*(r-i)*1e3,s=new y(e).getTime()+60*(r-i)*1e3;return Math.abs(new y(o).getYear()-new y(s).getYear())}function It(t,e,n){return 0===At(t,e,n)}function Ct(t,e,n,i){var o=-(new y).getTimezoneOffset(),s=o;e&&(s=kt(e));var a=new y(St(t));let p=new y(a);p.setMinutes(a.getMinutes()+s-o),n||(n=new y);let l=p.getHours(),c=p.getMinutes(),d=r.get(navigator,"languages.0","en-US");i&&(d=i);let m=p.toLocaleDateString(d,{weekday:"long"}),h=p.getFullYear(),u=p.getMonth()+1,g=p.toLocaleDateString(d,{month:"long"}),b=p.getDate();return l<10&&(l="0"+l),c<10&&(c="0"+c),It(a,n,e)?l+":"+c:At(a,n,e)<=5?m+", "+l+":"+c:0===zt(a,n,e)?"vi-VN"===d?b+" "+g+", "+l+":"+c:g+" "+b+", "+l+":"+c:"vi-VN"===d?b+"/"+u+"/"+h+", "+l+":"+c:h+"/"+u+"/"+b+", "+l+":"+c}function Mt(t){return Math.floor(St(t)/1e3)}function St(t){return t?"number"!=typeof t&&(t=new y(t).getTime()):t=0,t>1e18?Math.floor(t/1e6):t>1e15?Math.floor(t/1e3):t>1e12?t:1e3*t}function Dt(){let t=jt("sbz_locale"),e=document.getElementsByTagName("html")[0].getAttribute("xml:lang")||document.getElementsByTagName("html")[0].getAttribute("lang"),n=navigator.language;return t||e||n}function jt(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))}var Tt=t=>new Promise(e=>w(e,t));function Et(t,e="VND"){let n=Nt.find(t=>t.code===e)||{name:"Dong",code:"VND",symbol:"₫"},i="",r="";return"VND"===e?(i="",r=" "+n.symbol):(i=n.symbol+" ",r=""),t?i+(t=Math.round(t)).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")+r:`${i}0${r}`}function Lt(t){return(t=(t+="").replaceAll("đ","d").replaceAll("Đ","D")).normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Pt(t){centerIfNeeded=0===arguments.length||!!centerIfNeeded;var e=t.parentNode,n=window.getComputedStyle(e,null),i=parseInt(n.getPropertyValue("border-top-width")),r=parseInt(n.getPropertyValue("border-left-width")),o=t.offsetTop-e.offsetTop<e.scrollTop,s=t.offsetTop-e.offsetTop+t.clientHeight-i>e.scrollTop+e.clientHeight,a=t.offsetLeft-e.offsetLeft<e.scrollLeft,p=t.offsetLeft-e.offsetLeft+t.clientWidth-r>e.scrollLeft+e.clientWidth,l=o&&!s;(o||s)&¢erIfNeeded&&(e.scrollTop=t.offsetTop-e.offsetTop-e.clientHeight/2-i+t.clientHeight/2),(a||p)&¢erIfNeeded&&(e.scrollLeft=t.offsetLeft-e.offsetLeft-e.clientWidth/2-r+t.clientWidth/2),(o||s||a||p)&&!centerIfNeeded&&t.scrollIntoView(l)}const Nt=[{code:"USD",symbol:"$"},{code:"VND",symbol:"₫"}];function Rt(t){return function(t){if(!t||!t.type)return"";let e="";if("bullet_list"==t.type||"ordered_list"==t.type)return R(t.content,n=>{preifx="\n* ","ordered_list"==t.type&&(prefix=i+"\n. "),e+=prefix+Rt(n).trim()}),e;if("heading"!=t.type&&"paragraph"!=t.type||(e+="\n"),""==t.type||"text"==t.type||"link"==t.type||"mention-agent"==t.type||"dynamic-field"==t.type)return e+t.text;if("horizontal_rule"==t.type)return e+"\n---\n";if("emoji"==t.type){let n;if(H(t.attrs)>0&&(n=t.attrs.code),""==n&&(n=t.text),""!=n){let t=V(LEXICAL_EMOJI_LIST,t=>t.code===n);r.get(t,"text",n)}return e}return R(t.content,t=>{e+=Rt(t)}),e}(t).trim()}function Ut(t){return Wt(t)}function Wt(t={}){if(!H(t.content))return!(t.text||"").trim();let e=!0;return R(t.content,t=>{e=e&&Wt(t)}),e}function Ft(t){if(!t||!t.split)return"";f.style.color=t;const e=b.contentWindow.getComputedStyle(f).color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/);return e?{red:parseInt(e[1]),green:parseInt(e[2]),blue:parseInt(e[3])}:null}let Ot=["like","unlike","wink","tongue-out","tired","surprised","smiling","sleepy","sad","neutral","heart-eyes","grinning","crying","confused","angry","cry","heart_eyes","neutral_face","emoji--disappointed","smile","open_mouth","tired_face","stuck_out_tongue","moyai","thumbsdown","dislike","thumbsup","ok_hand","octopus","pig2","wave","mouse","mouse2","rat"];function Gt(t){if(!t||!t.type)return!0;let e=H(P(R(t.content,t=>Gt(t)),t=>!t))>0;return!Z(t.text)&&!e}function Ht(t){return!t||!(t.text||!Gt(t.block)||!function(t){return!t||!H(t.attachments)||0==H(P(t.attachments,t=>"quick_replies"!=t.type||H(P(t.quick_replies,t=>H(Z(t))>0))>0))}(t))}Ot=R(Ot,t=>":"+t+":")},1139(t,e,n){"use strict";n.d(e,{A:()=>i});class i{constructor(t){this.isOpen=!0===t,this.cbs=[]}open(){this.isOpen=!0;let t=[];this.cbs.forEach(e=>{this.isOpen?e():t.push(e)}),this.cbs=t}close(){this.isOpen=!1}entry(t,e){return this.isOpen?(e&&(this.isOpen=!1),t&&t(),Promise.resolve()):new Promise(n=>{this.cbs.push(()=>{e&&(this.isOpen=!1),t&&t(),n()})})}}},5922(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(9917),r=n(3078),o={};(o=Object.assign(o,i)).Gate=n(1139).A,o.Mutex=n(5369).A;var s=n(3259);o.get=s.get,o.set=s.set,o.take=s.take,o.Pubsub=n(6463).A;const a=o=Object.assign(o,r)},5369(t,e,n){"use strict";n.d(e,{A:()=>i});class i{constructor(){this.isOpen=!0,this.cbs=[]}_check(){if(!this.isOpen)return;let t=this.cbs.pop();t&&(this.isOpen=!1,t())}lock(){return new Promise(t=>{this.cbs.push(t),this._check()})}unlock(){this.isOpen||(this.isOpen=!0,this._check())}}},3259(t,e,n){"use strict";n.r(e),n.d(e,{get:()=>a,set:()=>p,take:()=>l});var i=Object.prototype.toString,r=Array.isArray||function(t){return"[object Array]"===i.call(t)};function o(t){var e=parseInt(t);return e.toString()===t?e:t}function s(t,e){if(function(t,e){return"number"==typeof e&&r(t)||function(t,e){return null!=t&&Object.prototype.hasOwnProperty.call(t,e)}(t,e)}(t,e))return t[e]}function a(t,e,n){if("number"==typeof e&&(e=[e]),!e||0===e.length)return t;if(null==t)return n;if("string"==typeof e)return a(t,e.split("."),n);var i=o(e[0]),r=s(t,i);return void 0===r?n:1===e.length?r:a(t[i],e.slice(1),n)}function p(t,e,n){if("number"==typeof e&&(e=[e]),!e||0===e.length)return t;if("string"==typeof e)return p(t,e.split(".").map(o),n);var i=e[0],r=s(t,i);return 1===e.length?(t[i]=n,r):(void 0===r&&(t[i]="number"==typeof e[1]?[]:{}),p(t[i],e.slice(1),n))}function l(t,e=1){if(!Array.isArray(t))return[];let n=t.length;if("number"!=typeof n||n<=0)return[];if(e<=0)return[];let i=Math.min(e,n);return t.slice(0,i)}},6463(t,e,n){"use strict";n.d(e,{A:()=>o});var{filter:i,map:r}=n(9917);class o{constructor(){this.listeners={}}publish(t,e,n,o){this.listeners[t]=i(this.listeners[t],t=>t.obj._isMounted),r(this.listeners[t],({cb:t})=>t(e,n,o))}on2(t,e,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({obj:t,cb:n})}}},5672(t){t.exports=function(){"use strict";var t=function(){return t.get.apply(t,arguments)},e=t.utils={isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isPlainObject:function(t){return!!t&&"[object Object]"===Object.prototype.toString.call(t)},toArray:function(t){return Array.prototype.slice.call(t)},getKeys:Object.keys||function(t){var e=[],n="";for(n in t)t.hasOwnProperty(n)&&e.push(n);return e},encode:function(t){return String(t).replace(/[,;"\\=\s%]/g,function(t){return encodeURIComponent(t)})},decode:function(t){return decodeURIComponent(t)},retrieve:function(t,e){return null==t?e:t}};return t.defaults={},t.expiresMultiplier=86400,t.set=function(t,n,i){if(e.isPlainObject(t))for(var r in t)t.hasOwnProperty(r)&&this.set(r,t[r],n);else{var o=void 0!==(i=e.isPlainObject(i)?i:{expires:i}).expires?i.expires:this.defaults.expires||"",s=typeof o;"string"===s&&""!==o?o=new Date(o):"number"===s&&(o=new Date(+new Date+1e3*this.expiresMultiplier*o)),""!==o&&"toUTCString"in o&&(o=";expires="+o.toUTCString());var a=i.path||this.defaults.path;a=a?";path="+a:"";var p=i.domain||this.defaults.domain;p=p?";domain="+p:"";var l=i.secure||this.defaults.secure?";secure":"";!1===i.secure&&(l="");var c=i.sameSite||this.defaults.sameSite;c=c?";SameSite="+c:"",null===i.sameSite&&(c=""),document.cookie=e.encode(t)+"="+e.encode(n)+o+a+p+l+c}return this},t.setDefault=function(n,i,r){if(e.isPlainObject(n)){for(var o in n)void 0===this.get(o)&&this.set(o,n[o],i);return t}if(void 0===this.get(n))return this.set.apply(this,arguments)},t.remove=function(t){for(var n=0,i=(t=e.isArray(t)?t:e.toArray(arguments)).length;n<i;n++)this.set(t[n],"",-1);return this},t.removeSpecific=function(t,n){if(!n)return this.remove(t);t=e.isArray(t)?t:[t],n.expires=-1;for(var i=0,r=t.length;i<r;i++)this.set(t[i],"",n);return this},t.empty=function(){return this.remove(e.getKeys(this.all()))},t.get=function(t,n){var i=this.all();if(e.isArray(t)){for(var r={},o=0,s=t.length;o<s;o++){var a=t[o];r[a]=e.retrieve(i[a],n)}return r}return e.retrieve(i[t],n)},t.all=function(){if(""===document.cookie)return{};for(var t=document.cookie.split("; "),n={},i=0,r=t.length;i<r;i++){var o=t[i].split("="),s=e.decode(o.shift()),a=e.decode(o.join("="));n[s]=a}return n},t.enabled=function(){if(navigator.cookieEnabled)return!0;var e="_"===t.set("_","_").get("_");return t.remove("_"),e},t}()},8113(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>It});var i=n(6314),r=n.n(i),o=n(4417),s=n.n(o),a=n(5457),p=n.n(a),l=n(5007),c=n.n(l),d=n(2729),m=n.n(d),h=n(1389),u=n.n(h),g=n(9658),b=n.n(g),f=n(3284),v=n.n(f),_=n(8226),y=n.n(_),x=n(6129),w=n.n(x),k=n(2420),A=n.n(k),z=n(7987),I=n.n(z),C=n(102),M=n.n(C),S=n(4681),D=n.n(S),j=n(2338),T=n.n(j),E=n(1196),L=n.n(E),P=n(4777),N=n.n(P),R=n(7435),U=n.n(R),W=n(4865),F=n.n(W),O=n(6501),G=n.n(O),H=n(9521),B=n.n(H),Z=n(7698),q=n.n(Z),$=n(8362),V=n.n($),J=n(3970),Y=n.n(J),Q=n(8268),X=n.n(Q),K=n(6120),tt=n.n(K),et=r()(function(t){return t[1]}),nt=s()(p()),it=s()(c()),rt=s()(m()),ot=s()(u()),st=s()(b()),at=s()(v()),pt=s()(y()),lt=s()(w()),ct=s()(A()),dt=s()(I()),mt=s()(M()),ht=s()(D()),ut=s()(T()),gt=s()(L()),bt=s()(N()),ft=s()(U()),vt=s()(F()),_t=s()(G()),yt=s()(B()),xt=s()(q()),wt=s()(V()),kt=s()(Y()),At=s()(X()),zt=s()(tt());et.push([t.id,"#sbz92 * {\n all: unset !important;\n}\n.sbz_no_scroll {\n overflow: hidden !important;\n overflow-x: hidden !important;\n overflow-y: hidden !important;\n}\n#sbz92 {\n /* Handle on hover */\n /*\n.widget-header--button-close {\n\tdisplay: flex;\n\tborder-radius: 6px;\n\tjustify-self: flex-end;\n\talign-items: center;\n\talign-self: flex-start;\n\n\tfilter: brightness(0.95);\n\t&:hover {\n\t\topacity: 1;\n\t\tfilter: brightness(1.1);\n\t\tscale: 1.1;\n\t}\n}\n*/\n /*\n[data-tooltip]::after {\n\ttext-align: center;\n\tmin-width: 60px;\n\tmax-width: 350px;\n\n\ttransform: translate3d(0, 0, 0);\n\t-webkit-backface-visibility: hidden;\n\tbackface-visibility: hidden;\n\twill-change: transform;\n\topacity: 0;\n\tpointer-events: none;\n\ttransition: opacity @tooltip-transition-duration @tooltip-transition-easing @tooltip-transition-delay;\n\tposition: absolute;\n\tbox-sizing: border-box;\n\tz-index: @z-index + 2000;\n\ttransform-origin: top;\n\twhite-space: pre-wrap;\n\twidth: 100%;\n\n\tbackground: @black;\n\tborder-radius: 5px;\n\n\t.color(@white);\n\n\tcontent: attr(data-tooltip);\n\tfont-size: @tooltip-font-size;\n\tfont-weight: @tooltip-font-weight;\n\ttext-transform: @tooltip-text-transform;\n\tpadding: 0.5em;\n\tbox-sizing: content-box;\n}\n\n[data-tooltip]:hover::after,\n[data-tooltip]:focus::after {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n// ------------------------------------------------\n// [2] Position Modifiers\n// ------------------------------------------------\n\n[data-tooltip][data-tooltip-position|='top']::after {\n\tmargin-bottom: @tooltip-margin;\n\ttransform: translate3d(-50%, -5px, 0);\n\tbottom: 100%;\n\tleft: 50%;\n}\n\n// ------------------------------------------------\n// [2.1] Top Left\n// ------------------------------------------------\n[data-tooltip][data-tooltip-position='top-left']::after {\n\ttransform: translate3d(~'calc(-100% + 16px)', -5px, 0);\n\tbottom: 100%;\n}\n\n// ------------------------------------------------\n// [2.2] Top Right\n// ------------------------------------------------\n[data-tooltip][data-tooltip-position='top-right']::after {\n\ttransform: translate3d(~'calc(0% + -16px)', -5px, 0);\n\tbottom: 100%;\n}\n\n// ------------------------------------------------\n// [2.3] Bottom\n// ------------------------------------------------\n\n[data-tooltip][data-tooltip-position|='bottom']::after,\n[data-tooltip]:not([data-tooltip-position])::after {\n\ttransform: translate3d(-50%, 0, 0);\n\tmargin-top: @tooltip-margin;\n\tleft: 50%;\n\ttop: 100%;\n}\n\n// ------------------------------------------------\n// [2.4] Bottom Left\n// ------------------------------------------------\n[data-tooltip][data-tooltip-position='bottom-left']::after {\n\ttransform: translate3d(~'calc(-100% + 16px)', 0, 0);\n}\n\n// ------------------------------------------------\n// [2.5] Bottom Right\n// ------------------------------------------------\n[data-tooltip][data-tooltip-position='bottom-right']::after {\n\ttransform: translate3d(~'calc(0% + -16px)', 0, 0);\n}\n\n// ------------------------------------------------\n// [2.6] Left\n// ------------------------------------------------\n[data-tooltip][data-tooltip-position='left']::after {\n\tbottom: auto;\n\tleft: auto;\n\tright: 100%;\n\ttop: 50%;\n\ttransform: translate3d(0, -50%, 0);\n\tmargin-right: @tooltip-margin;\n}\n\n// ------------------------------------------------\n// [2.7] Right\n// ------------------------------------------------\n[data-tooltip][data-tooltip-position='right']::after {\n\tbottom: auto;\n\tleft: 100%;\n\ttop: 50%;\n\ttransform: translate3d(0, -50%, 0);\n\tmargin-left: @tooltip-margin;\n}\n\n*/\n}\n#sbz92 *,\n#sbz92 *::before,\n#sbz92 *::after {\n box-sizing: border-box !important;\n}\n#sbz92 [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0 !important;\n}\n#sbz92 b,\n#sbz92 strong {\n font-weight: 500 !important;\n}\n#sbz92 a {\n color: #020202 !important;\n text-decoration: none !important;\n background-color: transparent !important;\n font-weight: 600 !important;\n}\n#sbz92 a:hover {\n cursor: pointer !important;\n color: #000000 !important;\n text-decoration: underline !important;\n}\n#sbz92 a:not([href]) {\n color: inherit !important;\n text-decoration: none !important;\n}\n#sbz92 a:not([href]):hover {\n color: inherit !important;\n text-decoration: none !important;\n}\n#sbz92 img {\n vertical-align: middle !important;\n border-style: none !important;\n}\n#sbz92 svg {\n overflow: hidden !important;\n vertical-align: middle !important;\n}\n#sbz92 label {\n display: inline-block !important;\n}\n#sbz92 button {\n border-radius: 0 !important;\n}\n#sbz92 button:focus {\n outline: 1px dotted !important;\n outline: 5px auto -webkit-focus-ring-color !important;\n}\n#sbz92 input,\n#sbz92 button,\n#sbz92 select,\n#sbz92 optgroup,\n#sbz92 textarea {\n margin: 0 !important;\n}\n#sbz92 button,\n#sbz92 input {\n overflow: visible !important;\n}\n#sbz92 button,\n#sbz92 select {\n text-transform: none !important;\n}\n#sbz92 select {\n word-wrap: normal !important;\n}\n#sbz92 button,\n#sbz92 [type=\"button\"],\n#sbz92 [type=\"reset\"],\n#sbz92 [type=\"submit\"] {\n -webkit-appearance: button !important;\n}\n#sbz92 button:not(:disabled),\n#sbz92 [type='button']:not(:disabled),\n#sbz92 [type='reset']:not(:disabled),\n#sbz92 [type='submit']:not(:disabled) {\n cursor: pointer !important;\n}\n#sbz92 button::-moz-focus-inner,\n#sbz92 [type='button']::-moz-focus-inner,\n#sbz92 [type='reset']::-moz-focus-inner,\n#sbz92 [type='submit']::-moz-focus-inner {\n padding: 0 !important;\n border-style: none !important;\n}\n#sbz92 input[type='radio'],\n#sbz92 input[type='checkbox'] {\n box-sizing: border-box !important;\n padding: 0 !important;\n}\n#sbz92 input[type='date'],\n#sbz92 input[type='time'],\n#sbz92 input[type='datetime-local'],\n#sbz92 input[type='month'] {\n -webkit-appearance: listbox !important;\n}\n#sbz92 textarea {\n overflow: auto !important;\n resize: vertical !important;\n}\n#sbz92 [type='number']::-webkit-inner-spin-button,\n#sbz92 [type='number']::-webkit-outer-spin-button {\n height: auto !important;\n}\n#sbz92 [hidden] {\n display: none !important;\n}\n#sbz92 ::-webkit-input-placeholder {\n /* Edge */\n color: #777 !important;\n}\n#sbz92 :-ms-input-placeholder {\n /* Internet Explorer 10-11 */\n color: #777 !important;\n}\n#sbz92 ::placeholder {\n color: #777 !important;\n}\n#sbz92 div {\n display: block !important;\n text-rendering: geometricPrecision !important;\n -webkit-font-smoothing: antialiased !important;\n -moz-osx-font-smoothing: grayscale !important;\n}\n#sbz92 ::-webkit-scrollbar {\n width: 7px !important;\n height: 7px !important;\n}\n#sbz92 ::-webkit-scrollbar-track {\n border-radius: 10px !important;\n}\n#sbz92 ::-webkit-scrollbar-thumb {\n border-radius: 10px !important;\n background: #d6d6d6 !important;\n}\n#sbz92 ::-webkit-scrollbar-thumb:hover {\n background: #aaa !important;\n}\n#sbz92 .badge {\n padding: 2px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n border-radius: 6px !important;\n display: inline-flex !important;\n align-items: center !important;\n}\n#sbz92 .badge.badge--success {\n color: #28a745 !important;\n -webkit-text-fill-color: #28a745 !important;\n background: #28a74526 !important;\n}\n#sbz92 .dot {\n width: 8px !important;\n height: 8px !important;\n border-radius: 4px !important;\n flex-shrink: 0 !important;\n background: #000 !important;\n}\n#sbz92 .dot.dot--success {\n background: #28a745 !important;\n}\n#sbz92 * {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;\n -webkit-tap-highlight-color: transparent !important;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;\n font-size: 16px !important;\n -webkit-box-sizing: border-box !important;\n -moz-box-sizing: border-box !important;\n box-sizing: border-box !important;\n margin: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n vertical-align: baseline !important;\n}\n#sbz92 button:focus {\n outline: none !important;\n}\n#sbz92 img {\n overflow: hidden !important;\n flex-shrink: 0 !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n background-size: 100% 100% !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -o-user-select: none !important;\n user-select: none !important;\n -webkit-user-drag: none !important;\n}\n#sbz92 .pos-relative {\n position: relative !important;\n}\n#sbz92 .flex-row {\n flex-direction: row !important;\n}\n#sbz92 .flex-column {\n flex-direction: column !important;\n}\n#sbz92 .flex-grow-1 {\n flex-grow: 1 !important;\n}\n#sbz92 .align-self-end {\n align-self: flex-end !important;\n}\n#sbz92 .align-items-end {\n align-items: flex-end !important;\n}\n#sbz92 .justify-content-center {\n justify-content: center !important;\n}\n#sbz92 .h-full {\n height: 100% !important;\n}\n#sbz92 .w-full {\n width: 100% !important;\n}\n#sbz92 .text-muted {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n#sbz92 .text-lg {\n font-size: 18px !important;\n}\n#sbz92 .text-xl {\n font-size: 20px !important;\n}\n#sbz92 .text-sm {\n font-size: 14px !important;\n}\n#sbz92 .text-center {\n text-align: center !important;\n}\n#sbz92 .text-danger {\n color: #ea3d2f !important;\n}\n#sbz92 .text-italic {\n font-style: italic !important;\n}\n#sbz92 .d-none {\n display: none !important;\n}\n#sbz92 .d-flex {\n display: flex !important;\n}\n#sbz92 .d-inline-block {\n display: inline-block !important;\n}\n#sbz92 .ml-1 {\n margin-left: 7.5px !important;\n}\n#sbz92 .pl-2 {\n padding-left: 15px !important;\n}\n#sbz92 .pr-2 {\n padding-right: 15px !important;\n}\n#sbz92 .pb-2 {\n padding-bottom: 15px !important;\n}\n#sbz92 .mt-1 {\n margin-top: 7.5px !important;\n}\n#sbz92 .mt-2 {\n margin-top: 15px !important;\n}\n#sbz92 .ml-2 {\n margin-left: 15px !important;\n}\n#sbz92 .mr-1 {\n margin-right: 7.5px !important;\n}\n#sbz92 .mr-2 {\n margin-right: 15px !important;\n}\n#sbz92 .pt-3 {\n padding-top: 22.5px !important;\n}\n#sbz92 .pl-3 {\n padding-left: 22.5px !important;\n}\n#sbz92 .pr-3 {\n padding-right: 22.5px !important;\n}\n#sbz92 .pb-3 {\n padding-bottom: 22.5px !important;\n}\n#sbz92 .mt-3 {\n margin-top: 22.5px !important;\n}\n#sbz92 .ml-3 {\n margin-left: 22.5px !important;\n}\n#sbz92 .mr-3 {\n margin-right: 22.5px !important;\n}\n#sbz92 .mb-3 {\n margin-bottom: 22.5px !important;\n}\n#sbz92 .mb-2 {\n margin-bottom: 15px !important;\n}\n#sbz92 .mb-1 {\n margin-bottom: 7.5px !important;\n}\n#sbz92 .muted {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n#sbz92 .i {\n font-style: italic !important;\n}\n#sbz92 .align-items-center {\n align-items: center !important;\n}\n#sbz92 .text-truncate {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n}\n#sbz92 .flex_1 {\n flex: 1 !important;\n flex-shrink: 0 !important;\n}\n#sbz92 .justify-content-between {\n justify-content: space-between !important;\n}\n#sbz92 .no-shrink {\n flex-shrink: 0 !important;\n}\n#sbz92 .loading {\n flex: 1 !important;\n align-items: center !important;\n justify-content: center !important;\n display: flex !important;\n flex-direction: column !important;\n background: white !important;\n}\n#sbz92 .avatar-container {\n text-align: center !important;\n}\n#sbz92 .avatar {\n position: relative !important;\n object-fit: cover !important;\n display: inline-block !important;\n}\n#sbz92 .group-avatar--primary .avatar {\n width: 40px !important;\n height: 40px !important;\n border-radius: 35px !important;\n}\n#sbz92 .group-avatar--secondary .avatar {\n position: relative !important;\n width: 35px !important;\n height: 35px !important;\n border-radius: 35px !important;\n}\n#sbz92 .avatar.avatar__account {\n width: 38px !important;\n height: 38px !important;\n border-radius: 38px !important;\n margin-right: 7.5px !important;\n}\n#sbz92 .group-avatar--primary .group-avatar--agent-middle {\n width: 50px !important;\n height: 50px !important;\n margin-left: -10px !important;\n z-index: 3 !important;\n position: relative !important;\n}\n#sbz92 .group-avatar--primary .group-avatar--agent-left {\n z-index: 2 !important;\n}\n#sbz92 .group-avatar--primary .group-avatar--agent-right {\n z-index: 2 !important;\n margin-left: -10px !important;\n}\n#sbz92 .group-avatar--secondary .group-avatar--agent-left {\n z-index: 3 !important;\n}\n#sbz92 .group-avatar--secondary .group-avatar--agent-middle {\n z-index: 2 !important;\n margin-left: -15px !important;\n}\n#sbz92 .group-avatar--secondary .group-avatar--agent-right {\n z-index: 1 !important;\n margin-left: -15px !important;\n}\n#sbz92 .widget-header {\n z-index: -1 !important;\n position: relative !important;\n transition: height 0.2s !important;\n border-radius: 15px 15px 0px 0px !important;\n background: '@background' !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n width: 100% !important;\n}\n#sbz92 .widget-header .widget-header--total-unread-convo {\n font-size: 13px !important;\n font-weight: 500 !important;\n background: #ef000d !important;\n display: flex !important;\n border-radius: 50% !important;\n justify-content: center !important;\n align-items: center !important;\n width: 20px !important;\n height: 20px !important;\n position: absolute !important;\n cursor: pointer !important;\n right: -8px !important;\n top: -4px !important;\n}\n#sbz92 .widget-header--collapsed {\n height: auto !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--collapsed {\n height: auto !important;\n padding: 15px 22.5px !important;\n position: relative !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--collapsed .widget-header--title {\n white-space: nowrap !important;\n overflow: hidden !important;\n font-weight: 500 !important;\n text-overflow: ellipsis !important;\n font-size: 16px !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--collapsed .widget-header--description {\n font-size: 14px !important;\n overflow: hidden !important;\n opacity: 0.7 !important;\n flex: 1 !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n margin-top: 2.5px !important;\n position: relative !important;\n line-height: 1.5 !important;\n}\n#sbz92 .mobile .widget-header {\n border-radius: 0px !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--expanded {\n height: 224px !important;\n padding: 15px 22.5px !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--expanded .widget-header--top-wrapper {\n display: flex !important;\n flex-direction: row !important;\n align-items: center !important;\n margin-bottom: 10px !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--expanded .widget-header--avatar-wrapper {\n display: flex !important;\n flex-direction: column !important;\n align-items: center !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--expanded .widget-header--title {\n white-space: nowrap !important;\n overflow: hidden !important;\n font-weight: 500 !important;\n text-overflow: ellipsis !important;\n flex: 1 !important;\n font-size: 16px !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--expanded .widget-header--description {\n color: red !important;\n position: relative !important;\n text-align: center !important;\n margin-top: 15px !important;\n white-space: pre-wrap !important;\n display: -webkit-box !important;\n -webkit-box-orient: vertical !important;\n -webkit-line-clamp: 2 !important;\n overflow: hidden !important;\n line-height: 1.5 !important;\n}\n#sbz92 .widget-header--convo-expanded {\n height: 224px !important;\n}\n#sbz92 .widget-header--inner {\n position: absolute !important;\n top: 0 !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n width: 100% !important;\n opacity: 1 !important;\n display: flex !important;\n}\n#sbz92 .widget-header--inner.widget-header--inner--hidden {\n opacity: 0 !important;\n transform: scale(0) !important;\n animation-duration: 0.05s !important;\n animation-name: hide !important;\n}\n#sbz92 .widget-header--title-container {\n min-width: 0 !important;\n flex: 1 !important;\n display: flex !important;\n flex-direction: column !important;\n z-index: 1 !important;\n}\n#sbz92 .widget-header--button-close {\n display: flex !important;\n border-radius: 6px !important;\n justify-self: flex-end !important;\n align-items: center !important;\n align-self: flex-start !important;\n opacity: 0.6 !important;\n transition: opacity 0.15s ease, scale 0.15s ease, filter 0.15s ease !important;\n filter: brightness(0.95) !important;\n}\n#sbz92 .widget-header--button-close:hover {\n opacity: 1 !important;\n filter: brightness(1.1) !important;\n scale: 1.1 !important;\n}\n#sbz92 .widget-header--button-close-icon {\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9ImZlYXRoZXIgZmVhdGhlci14Ij48bGluZSB4MT0iMTgiIHkxPSI2IiB4Mj0iNiIgeTI9IjE4Ij48L2xpbmU+PGxpbmUgeDE9IjYiIHkxPSI2IiB4Mj0iMTgiIHkyPSIxOCI+PC9saW5lPjwvc3ZnPgo=') !important;\n background-size: contain !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n width: 24px !important;\n height: 24px !important;\n display: block !important;\n cursor: pointer !important;\n}\n#sbz92 .widget-header--button-back {\n background-image: url('data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9IndoaXRlIiAgc3Ryb2tlLXdpZHRoPSIyIiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiAgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggc3Ryb2tlPSJub25lIiBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTQgNmwxNiAwIiAvPjxwYXRoIGQ9Ik00IDEybDE2IDAiIC8+PHBhdGggZD0iTTQgMThsMTYgMCIgLz48L3N2Zz4K') !important;\n background-size: contain !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n background-size: 24px 24px !important;\n width: 24px !important;\n height: 24px !important;\n display: block !important;\n position: relative !important;\n}\n#sbz92 .widget-header--wrap-button-back {\n display: flex !important;\n position: relative !important;\n margin-right: 7.5px !important;\n cursor: pointer !important;\n scale: 1 !important;\n opacity: 0.6 !important;\n transition: opacity 0.15s ease, scale 0.15s ease, filter 0.15s ease !important;\n filter: brightness(0.95) !important;\n}\n#sbz92 .widget-header--wrap-button-back:hover {\n opacity: 1 !important;\n filter: brightness(1.1) !important;\n scale: 1.1 !important;\n}\n#sbz92 .fade-enter-active,\n#sbz92 .fade-leave-active {\n transition: opacity 0.5s ease-out 0.2s !important;\n}\n#sbz92 .fade-enter,\n#sbz92 .fade-leave-to {\n opacity: 0 !important;\n}\n#sbz92 .slide-fade-enter-active {\n transition: all 0.3s ease !important;\n}\n#sbz92 .slide-fade-leave-active {\n transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1) !important;\n}\n#sbz92 .slide-fade-enter,\n#sbz92 .slide-fade-leave-to {\n transform: translateX(10px) !important;\n opacity: 0 !important;\n}\n#sbz92 .widget_header__body {\n padding-bottom: 70px !important;\n}\n#sbz92 .widget_header__body.widget_header__body__social {\n display: flex !important;\n}\n#sbz92 .social__account_logo {\n height: 90px !important;\n width: 90px !important;\n margin-right: 15px !important;\n border-radius: 15px !important;\n object-fit: cover !important;\n}\n#sbz92 .social__introduction {\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n max-height: 72px !important;\n overflow: hidden !important;\n display: -webkit-box !important;\n -webkit-box-orient: vertical !important;\n -webkit-line-clamp: 3 !important;\n}\n#sbz92 .social__links {\n display: flex !important;\n flex-direction: row !important;\n}\n#sbz92 .social__links-logo {\n height: 30px !important;\n width: 30px !important;\n border-radius: 50% !important;\n margin-right: 10px !important;\n margin-top: 5px !important;\n background-size: contain !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n display: block !important;\n}\n#sbz92 .social__links-logo--facebook {\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%2215%22%20r%3D%2215%22%20fill%3D%22%230264FF%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M17.2944%2029.8252C16.5464%2029.9404%2015.7803%2030%2015%2030C14.0962%2030%2013.2109%2029.9199%2012.3511%2029.7666V18.4775H10V14.4287H12.3511V11.8086C12.3511%209.93457%2013.2744%207%2017.3384%207L21%207.01465V10.9453H18.3433C17.9075%2010.9453%2017.2947%2011.1553%2017.2947%2012.0488V14.4326H20.989L20.5571%2018.4775H17.2944V29.8252Z%22%20fill%3D%22white%22/%3E%3C/svg%3E') !important;\n}\n#sbz92 .social__links-logo--messenger {\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Crect%20width%3D%2230%22%20height%3D%2230%22%20rx%3D%2215%22%20fill%3D%22%23007FFF%22/%3E%3Crect%20x%3D%224.28564%22%20y%3D%226%22%20width%3D%2221.4286%22%20height%3D%2218.8571%22%20fill%3D%22white%22/%3E%3Cpath%20d%3D%22M14.9478%2014.5713C14.8228%2014.5917%2014.6974%2014.6104%2014.5715%2014.6276C14.6974%2014.6104%2014.8228%2014.5917%2014.9478%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.7507%2014.5713C14.691%2014.5823%2014.6313%2014.5923%2014.5715%2014.6026C14.6313%2014.5923%2014.691%2014.5823%2014.7507%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M15.0126%2014.5713C14.8663%2014.5878%2014.7192%2014.6024%2014.5715%2014.6148C14.7192%2014.6024%2014.8663%2014.5878%2015.0126%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.783%2014.5713C14.7128%2014.5807%2014.642%2014.5894%2014.5715%2014.5976C14.642%2014.5894%2014.7128%2014.5807%2014.783%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.7299%2014.5713C14.6773%2014.5825%2014.6244%2014.5937%2014.5715%2014.6045C14.6244%2014.5937%2014.6773%2014.5825%2014.7299%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.6992%2014.5713C14.6567%2014.5834%2014.6141%2014.5949%2014.5715%2014.6068C14.6141%2014.5949%2014.6567%2014.5834%2014.6992%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.7107%2014.5713C14.6645%2014.5834%2014.618%2014.5958%2014.5715%2014.6075C14.618%2014.5958%2014.6645%2014.5836%2014.7107%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.7194%2014.5713C14.6704%2014.5827%2014.621%2014.5935%2014.5715%2014.6045C14.621%2014.5935%2014.6704%2014.5827%2014.7194%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.8087%2014.5713C14.7297%2014.5779%2014.6507%2014.5839%2014.5715%2014.5891C14.6507%2014.5839%2014.7297%2014.5779%2014.8087%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M15.0417%2014.5713C14.8856%2014.5814%2014.7288%2014.5894%2014.5715%2014.5946C14.7288%2014.5894%2014.8856%2014.5814%2015.0417%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.8206%2014.5713C14.7377%2014.574%2014.6546%2014.5761%2014.5715%2014.5775C14.6546%2014.5761%2014.7377%2014.574%2014.8206%2014.5713Z%22%20fill%3D%22black%22/%3E%3Cpath%20d%3D%22M14.1547%2012.3174L9.29419%2017.4636L13.7176%2015.0365L16.0288%2017.4636L20.8621%2012.3174L16.4877%2014.7019L14.1547%2012.3174Z%22%20fill%3D%22%23448AFF%22/%3E%3Cpath%20d%3D%22M15%200C6.717%200%200%206.717%200%2015C0%2023.283%206.717%2030%2015%2030C23.283%2030%2030%2023.283%2030%2015C30%206.717%2023.283%200%2015%200ZM15.1172%2023.0294C14.1886%2023.0294%2013.2923%2022.8983%2012.4491%2022.6554L9.42421%2024.375V21.14C7.39815%2019.5982%206.10428%2017.2501%206.10428%2014.6203C6.10428%209.97581%2010.1395%206.21094%2015.1172%206.21094C20.0951%206.21094%2024.1301%209.97581%2024.1301%2014.6203C24.1301%2019.2643%2020.0951%2023.0294%2015.1172%2023.0294V23.0294Z%22%20fill%3D%22%23007FFF%22/%3E%3C/svg%3E') !important;\n}\n#sbz92 .social__links-logo--email {\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M22.6875%2012.9688C21.9375%2013.5625%2020.3125%2014.75%2017.875%2016.5L17.5625%2016.75C17.0625%2017.125%2016.6875%2017.4062%2016.375%2017.5625C15.875%2017.875%2015.4062%2018%2015%2018C14.5625%2018%2014.125%2017.875%2013.625%2017.5938C13.3125%2017.4375%2012.9375%2017.1562%2012.4375%2016.7812L12.125%2016.5C9.59375%2014.6875%208%2013.5%207.3125%2012.9688C7.25%2012.9375%207.15625%2012.9375%207.09375%2012.9688C7.03125%2013%207%2013.0625%207%2013.125V19.5C7%2019.9375%207.125%2020.2812%207.4375%2020.5625C7.71875%2020.875%208.0625%2021%208.5%2021H21.5C21.9062%2021%2022.25%2020.875%2022.5625%2020.5625C22.8438%2020.2812%2023%2019.9375%2023%2019.5V13.125C23%2013.0625%2022.9375%2013%2022.875%2012.9375C22.8125%2012.9062%2022.75%2012.9062%2022.6875%2012.9688ZM15%2017C14.7188%2017%2014.375%2016.875%2014%2016.625C13.75%2016.5%2013.4375%2016.2812%2013.0312%2015.9375L12.7188%2015.7188C10.1562%2013.8438%208.40625%2012.5625%207.5%2011.8438L7.28125%2011.6875C7.09375%2011.5625%207%2011.3438%207%2011.0938V10.5C7%2010.0938%207.125%209.75%207.4375%209.4375C7.71875%209.15625%208.0625%209%208.5%209H21.5C21.9062%209%2022.25%209.15625%2022.5625%209.4375C22.8438%209.75%2023%2010.0938%2023%2010.5V11.0938C23%2011.3438%2022.9062%2011.5625%2022.7188%2011.6875L22.5625%2011.8125C21.6562%2012.5312%2019.9062%2013.8438%2017.2812%2015.7188L16.9688%2015.9375C16.5312%2016.2812%2016.2188%2016.5%2016%2016.625C15.5938%2016.875%2015.25%2017%2015%2017Z%22%20fill%3D%22white%22/%3E%3C/svg%3E') !important;\n}\n#sbz92 .social__links-logo--zalo {\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M29.9999%2014.9385C29.9669%206.68262%2023.2639%200%2015%200C6.7157%200%200%206.71582%200%2015C0%2023.2842%206.7157%2030%2015%2030C23.2639%2030%2029.9669%2023.3174%2029.9999%2015.0615C29.9999%2015.041%2030%2015.0205%2030%2015C30%2014.9795%2029.9999%2014.959%2029.9999%2014.9385Z%22%20fill%3D%22white%22/%3E%3Cpath%20d%3D%22M24.5612%2017.4695C22.9394%2017.4726%2021.6242%2016.1862%2021.6279%2014.6005C21.6316%2013.0345%2022.9474%2011.7445%2024.5473%2011.7383C26.1556%2011.732%2027.4826%2013.0349%2027.4786%2014.6162C27.4746%2016.1926%2026.1719%2017.4665%2024.5612%2017.4695ZM22.8416%2014.6183C22.8459%2015.5573%2023.6166%2016.3004%2024.5777%2016.2923C25.5165%2016.2845%2026.2699%2015.5301%2026.2673%2014.6005C26.2646%2013.6712%2025.51%2012.9317%2024.56%2012.9277C23.6012%2012.9237%2022.8373%2013.6751%2022.8416%2014.6183Z%22%20fill%3D%22%230068FE%22/%3E%3Cpath%20d%3D%22M19.5054%2010.0762H20.795V17.4217H19.9447C19.7021%2017.4217%2019.5054%2017.225%2019.5054%2016.9823V10.0762Z%22%20fill%3D%22%230068FE%22/%3E%3Cpath%20d%3D%22M18.5227%2011.8907H17.2881V12.2935C16.5767%2011.8601%2015.8509%2011.6775%2015.06%2011.831C14.2526%2011.9876%2013.6164%2012.4043%2013.167%2013.0917C12.4538%2014.1826%2012.5894%2015.5904%2013.4938%2016.5431C14.3504%2017.4454%2015.8628%2017.8178%2017.2815%2016.9247C17.2835%2016.934%2017.286%2016.9422%2017.2881%2016.9511V16.9826C17.2881%2017.2252%2017.4849%2017.422%2017.7275%2017.422H18.5227V11.8907V11.8907ZM15.5853%2016.2787C14.6636%2016.268%2013.8924%2015.5006%2013.8986%2014.6004C13.9048%2013.692%2014.6716%2012.9481%2015.602%2012.9479C16.5427%2012.9477%2017.2871%2013.6781%2017.2882%2014.6026C17.2893%2015.5333%2016.521%2016.2896%2015.5853%2016.2787Z%22%20fill%3D%22%230068FE%22/%3E%3Cpath%20d%3D%22M8.0481%2016.2438C9.39854%2014.5856%2010.6939%2012.9885%2011.9984%2011.3989C12.2464%2011.0968%2012.3662%2010.7671%2012.3731%2010.3807C12.3761%2010.2135%2012.3261%2010.1646%2012.1596%2010.165C11.6056%2010.1666%206.41195%2010.165%206.41195%2010.165V11.4709H10.4978C10.4424%2011.543%207.83556%2014.7218%206.57932%2016.2403C6.37112%2016.4919%206.26503%2016.7645%206.25401%2017.0936C6.24628%2017.3242%206.28864%2017.4139%206.52267%2017.4211V17.4217H11.9356C12.1782%2017.4217%2012.3749%2017.225%2012.3749%2016.9823V16.2487V16.2438H8.0481V16.2438Z%22%20fill%3D%22%230068FE%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.948%2026.1338C6.03613%2027.1172%207.26917%2027.9424%208.61108%2028.5752V26.1338H4.948ZM0.00268555%2014.7119C0.0775146%2010.7393%201.69666%207.14453%204.28479%204.50293C4.0459%204.98242%203.83435%205.47949%203.64661%205.99121C2.58862%208.87598%202.31299%2011.8506%202.69116%2014.8916C2.95862%2017.042%203.55518%2019.0869%204.63391%2020.9775C4.8269%2021.3154%205.02271%2021.6582%205.26489%2021.9609C5.76672%2022.5879%205.80981%2023.2725%205.59888%2024.0049C5.4873%2024.3926%205.32227%2024.75%205.11304%2025.082C4.95691%2025.3291%204.77612%2025.5635%204.57434%2025.7842C1.81921%2023.1201%200.0819092%2019.4102%200.00280762%2015.2939C0.000976562%2015.1963%200%2015.0986%200%2015C0%2014.9033%200.000854492%2014.8076%200.00268555%2014.7119Z%22%20fill%3D%22%230068FE%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M24.8226%2026.3367C22.191%2028.6189%2018.7568%2029.9998%2015%2029.9998C11.1449%2029.9998%207.62952%2028.5457%204.97241%2026.156C6.32458%2026.1921%207.61877%2025.9031%208.86353%2025.3464C8.97681%2025.2957%209.06262%2025.3113%209.16443%2025.364C12.2258%2026.9646%2015.5131%2027.5125%2018.926%2027.3962C20.9574%2027.3269%2022.9333%2027.0046%2024.8226%2026.3367Z%22%20fill%3D%22%23015BDF%22/%3E%3C/svg%3E') !important;\n}\n@keyframes hide {\n 100% {\n opacity: 0;\n transform: scale(0);\n }\n}\n#sbz92 .widget-header-expand-container {\n width: 100% !important;\n}\n#sbz92 .message-input {\n width: 100% !important;\n border-top: 1px solid #e3e3e3 !important;\n display: flex !important;\n flex-direction: row !important;\n padding: 15px 22.5px !important;\n}\n#sbz92 .message-input--disabled {\n background: #f0f0f0 !important;\n opacity: 0.6 !important;\n filter: grayscale(1) !important;\n}\n#sbz92 textarea[disabled='disabled']::-webkit-input-placeholder {\n color: #a4a4a4 !important;\n -webkit-text-fill-color: #a4a4a4 !important;\n}\n#sbz92 textarea[disabled='disabled']:-ms-input-placeholder {\n color: #a4a4a4 !important;\n -webkit-text-fill-color: #a4a4a4 !important;\n}\n#sbz92 textarea[disabled='disabled']::placeholder {\n color: #a4a4a4 !important;\n -webkit-text-fill-color: #a4a4a4 !important;\n}\n#sbz92 .message-input--input {\n word-wrap: break-word !important;\n resize: none !important;\n flex: 1 !important;\n align-self: center !important;\n margin-right: 7.5px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n}\n#sbz92 .message-input--input::placeholder {\n opacity: 0.5 !important;\n /* Firefox */\n}\n#sbz92 .message-input--input::-ms-input-placeholder {\n /* Edge 12 -18 */\n opacity: 0.5 !important;\n /* Firefox */\n}\n#sbz92 .message-input--emoji-button {\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImdyYXkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLXNtaWxlIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCI+PC9jaXJjbGU+PHBhdGggZD0iTTggMTRzMS41IDIgNCAyIDQtMiA0LTIiPjwvcGF0aD48bGluZSB4MT0iOSIgeTE9IjkiIHgyPSI5LjAxIiB5Mj0iOSI+PC9saW5lPjxsaW5lIHgxPSIxNSIgeTE9IjkiIHgyPSIxNS4wMSIgeTI9IjkiPjwvbGluZT48L3N2Zz4K') !important;\n}\n#sbz92 .message-input--button {\n background-size: 70% !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n width: 32px !important;\n height: 32px !important;\n display: block !important;\n cursor: pointer !important;\n position: relative !important;\n border-radius: 20px !important;\n transition: background-color 0.2s !important;\n}\n#sbz92 .message-input--button:hover {\n background-color: #eeeeee !important;\n}\n#sbz92 .message-input--disabled .message-input--button {\n cursor: default !important;\n}\n#sbz92 .message-input--disabled .message-input--button {\n cursor: default !important;\n}\n#sbz92 .message-input--attachment-button {\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImdyYXkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLXBhcGVyY2xpcCI+PHBhdGggZD0iTTIxLjQ0IDExLjA1bC05LjE5IDkuMTlhNiA2IDAgMCAxLTguNDktOC40OWw5LjE5LTkuMTlhNCA0IDAgMCAxIDUuNjYgNS42NmwtOS4yIDkuMTlhMiAyIDAgMCAxLTIuODMtMi44M2w4LjQ5LTguNDgiPjwvcGF0aD48L3N2Zz4K') !important;\n}\n#sbz92 .message-input--send-button {\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2225%22%20height%3D%2225%22%20viewBox%3D%220%200%2024%2024%22%20stroke-width%3D%221.5%22%20stroke%3D%22@esc-primary-color-esc%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22/%3E%3Cpath%20d%3D%22M4.698%204.034l16.302%207.966l-16.302%207.966a.503%20.503%200%200%201%20-.546%20-.124a.555%20.555%200%200%201%20-.12%20-.568l2.468%20-7.274l-2.468%20-7.274a.555%20.555%200%200%201%20.12%20-.568a.503%20.503%200%200%201%20.546%20-.124z%22%20fill%3D%22@esc-primary-color-esc%22/%3E%3Cpath%20d%3D%22M6.5%2012h14.5%22%20/%3E%3C/svg%3E') !important;\n background-size: 82% !important;\n}\n#sbz92 .message-input--preform {\n justify-content: center !important;\n padding: 11px !important;\n @spacer 2;\n}\n#sbz92 .btn--preform {\n border-radius: 7px !important;\n padding-left: 32px !important;\n padding-right: 32px !important;\n height: 40px !important;\n color: #fff !important;\n -webkit-text-fill-color: #fff !important;\n font-size: 14px !important;\n line-height: 20px !important;\n text-align: center !important;\n background: '@primary_color' !important;\n width: 60% !important;\n}\n#sbz92 .widget-body.embed-chat .message-input {\n border: 1px solid #e3e3e3 !important;\n border-radius: 8px !important;\n margin-bottom: 20px !important;\n}\n#sbz92 .form-label {\n margin-top: 15px !important;\n}\n#sbz92 .form {\n border: 1px solid #eeeeee !important;\n box-sizing: border-box !important;\n box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15) !important;\n border-radius: 7px !important;\n}\n#sbz92 textarea.form-control {\n resize: none !important;\n word-wrap: break-word !important;\n}\n#sbz92 .form-control--container {\n position: relative !important;\n}\n#sbz92 input.form-control[disabled] {\n background: #f9f9f9 !important;\n}\n#sbz92 .form-control--container .form-control--check {\n position: absolute !important;\n right: 10px !important;\n top: 10px !important;\n background-size: 100% 100% !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n width: 20px !important;\n height: 20px !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM1QkFBMUQiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWNoZWNrIj48cG9seWxpbmUgcG9pbnRzPSIyMCA2IDkgMTcgNCAxMiI+PC9wb2x5bGluZT48L3N2Zz4K') !important;\n}\n#sbz92 .form-control--valid-input--error {\n color: #dc3545 !important;\n -webkit-text-fill-color: #dc3545 !important;\n font-size: 14px !important;\n padding-top: 5px !important;\n}\n#sbz92 input[type='text'].form-control.input--error,\n#sbz92 input[type='number'].form-control.input--error,\n#sbz92 input[type='date'].form-control.input--error,\n#sbz92 textarea.form-control.input--error,\n#sbz92 select.form-control.input--error {\n border: 1px solid #dc3545 !important;\n background: #dd41500f !important;\n}\n#sbz92 input[type='text'].form-control,\n#sbz92 input[type='number'].form-control,\n#sbz92 input[type='date'].form-control,\n#sbz92 textarea.form-control,\n#sbz92 select.form-control {\n width: 100% !important;\n border: 1px solid #c4c4c4 !important;\n border-radius: 8px !important;\n transition: all 100ms ease !important;\n padding: 10px 12px !important;\n}\n#sbz92 input[type='text'].form-control:hover,\n#sbz92 input[type='number'].form-control:hover,\n#sbz92 input[type='date'].form-control:hover,\n#sbz92 textarea.form-control:hover,\n#sbz92 select.form-control:hover {\n border: 1px solid #6c757d !important;\n}\n#sbz92 input[type='text'].form-control.input--error:hover,\n#sbz92 input[type='number'].form-control.input--error:hover,\n#sbz92 input[type='date'].form-control.input--error:hover,\n#sbz92 textarea.form-control.input--error:hover,\n#sbz92 select.form-control.input--error:hover {\n border: 1px solid #dc3545 !important;\n}\n#sbz92 select.form-control {\n padding: 1px 8px !important;\n}\n#sbz92 input[type='date'].form-control {\n height: 40px !important;\n width: 100% !important;\n background-color: #fff !important;\n}\n#sbz92 .form-wrapper-attachment input[type='date'].form-control {\n height: 32px !important;\n padding-top: 6px !important;\n padding-bottom: 6px !important;\n}\n#sbz92 input[type='text'].form-control:focus,\n#sbz92 input[type='number'].form-control:focus,\n#sbz92 input[type='date'].form-control:focus,\n#sbz92 textarea.form-control:focus,\n#sbz92 select.form-control:focus {\n border: 1px solid '@primary_color' !important;\n}\n#sbz92 input[type='text'].form-control.input--error:focus,\n#sbz92 input[type='number'].form-control.input--error:focus,\n#sbz92 input[type='date'].form-control.input--error:focus,\n#sbz92 textarea.form-control.input--error:focus,\n#sbz92 select.form-control.input--error:focus {\n border: 1px solid #dc3545 !important;\n}\n#sbz92 .label {\n display: block !important;\n padding-bottom: 6px !important;\n margin-top: 8px !important;\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n font-size: 14px !important;\n font-weight: 500 !important;\n}\n#sbz92 .form--btn-submit {\n border-radius: 7px !important;\n padding-left: 32px !important;\n padding-right: 32px !important;\n width: 100% !important;\n}\n#sbz92 .form .radio {\n display: block !important;\n position: relative !important;\n width: 100% !important;\n margin-top: 5px !important;\n}\n#sbz92 .form .radio:first-of-type {\n margin-top: 0 !important;\n}\n#sbz92 .form input[type='radio'] {\n position: absolute !important;\n visibility: hidden !important;\n}\n#sbz92 .form .radio--label {\n padding-left: 22px !important;\n display: block !important;\n position: relative !important;\n z-index: 9 !important;\n cursor: pointer !important;\n}\n#sbz92 .form .radio--check {\n display: block !important;\n position: absolute !important;\n border: 1px solid #aaa !important;\n border-radius: 100% !important;\n height: 16px !important;\n width: 16px !important;\n top: 0px !important;\n left: 0px !important;\n z-index: 5 !important;\n transition: border 0.15s linear !important;\n -webkit-transition: border 0.15s linear !important;\n}\n#sbz92 .form .radio--check:hover {\n border: 1px solid #888 !important;\n}\n#sbz92 .form .radio--check::before {\n display: block !important;\n position: absolute !important;\n content: '' !important;\n border-radius: 100% !important;\n height: 10px !important;\n width: 10px !important;\n top: 2px !important;\n left: 2px !important;\n margin: auto !important;\n transition: background 0.15s linear !important;\n -webkit-transition: background 0.15s linear !important;\n}\n#sbz92 .form input[type='radio']:checked ~ .radio--check {\n border: 1px solid '@primary_color' !important;\n}\n#sbz92 .form input[type='radio']:checked ~ .radio--check::before {\n background: '@primary_color' !important;\n}\n#sbz92 .form .checkbox {\n display: block !important;\n position: relative !important;\n width: 100% !important;\n margin-top: 5px !important;\n}\n#sbz92 .form .checkbox:first-of-type {\n margin-top: 0 !important;\n}\n#sbz92 .form input[type='checkbox'] {\n position: absolute !important;\n visibility: hidden !important;\n}\n#sbz92 .form .checkbox--label {\n padding-left: 22px !important;\n display: block !important;\n position: relative !important;\n z-index: 9 !important;\n cursor: pointer !important;\n}\n#sbz92 .form .checkbox--check {\n display: block !important;\n position: absolute !important;\n border: 1px solid #aaa !important;\n border-radius: 4 px !important;\n height: 16px !important;\n width: 16px !important;\n top: 0px !important;\n left: 0px !important;\n z-index: 5 !important;\n transition: border 0.15s linear !important;\n -webkit-transition: border 0.15s linear !important;\n}\n#sbz92 .form .checkbox--check:hover {\n border: 1px solid #888 !important;\n}\n#sbz92 .form .checkbox--check::before {\n display: block !important;\n position: absolute !important;\n content: '' !important;\n height: 100% !important;\n width: 100% !important;\n margin: auto !important;\n transition: background 0.15s linear !important;\n -webkit-transition: background 0.15s linear !important;\n}\n#sbz92 .form input[type='checkbox']:checked ~ .checkbox--check {\n border: 1px solid '@primary_color' !important;\n}\n#sbz92 .form input[type='checkbox']:checked ~ .checkbox--check::before {\n background: '@primary_color' !important;\n}\n#sbz92 .form .select .form-control {\n padding-right: 20px !important;\n}\n#sbz92 .form select {\n /*background: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjQxMDU4IDYuOTExMDdDNC43MzYwMiA2LjU4NTYzIDUuMjYzNjYgNi41ODU2MyA1LjU4OTA5IDYuOTExMDdMOS45OTk4NCAxMS4zMjE4TDE0LjQxMDYgNi45MTEwN0MxNC43MzYgNi41ODU2MyAxNS4yNjM3IDYuNTg1NjMgMTUuNTg5MSA2LjkxMTA3QzE1LjkxNDUgNy4yMzY1MSAxNS45MTQ1IDcuNzY0MTQgMTUuNTg5MSA4LjA4OTU4TDEwLjU4OTEgMTMuMDg5NkMxMC4yNjM3IDEzLjQxNSA5LjczNjAyIDEzLjQxNSA5LjQxMDU4IDEzLjA4OTZMNC40MTA1OCA4LjA4OTU4QzQuMDg1MTQgNy43NjQxNCA0LjA4NTE0IDcuMjM2NTEgNC40MTA1OCA2LjkxMTA3WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+\") no-repeat right;*/\n}\n#sbz92 .form-require-info--list {\n background: #fff !important;\n overflow-y: auto !important;\n overflow-x: hidden !important;\n}\n#sbz92 .form-require-info--title {\n font-size: 18px !important;\n line-height: 20px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n background: #fff !important;\n border-bottom: 1px solid #f0f0f0 !important;\n}\n#sbz92 .form-require-info--item {\n border-bottom: 1px solid #f0f0f0 !important;\n}\n#sbz92 .form-require-info--item:hover {\n cursor: pointer !important;\n background: #e0e0e0 !important;\n}\n#sbz92 input[type='checkbox'] {\n background-color: initial !important;\n cursor: default !important;\n -webkit-appearance: checkbox !important;\n box-sizing: border-box !important;\n margin: 3px 3px 3px 4px !important;\n padding: initial !important;\n border: initial !important;\n}\n#sbz92 input[type='radio'] {\n background-color: initial !important;\n cursor: default !important;\n -webkit-appearance: radio !important;\n box-sizing: border-box !important;\n margin: 3px 3px 0px 5px !important;\n padding: initial !important;\n border: initial !important;\n}\n#sbz92 option {\n font-weight: normal !important;\n display: block !important;\n white-space: pre !important;\n min-height: 1.2em !important;\n padding: 0px 2px 1px !important;\n}\n#sbz92 select {\n -webkit-writing-mode: horizontal-tb !important;\n text-rendering: auto !important;\n color: -internal-light-dark-color(black, white) !important;\n letter-spacing: normal !important;\n word-spacing: normal !important;\n text-transform: none !important;\n text-indent: 0px !important;\n text-shadow: none !important;\n display: inline-block !important;\n text-align: start !important;\n -webkit-appearance: menulist !important;\n box-sizing: border-box !important;\n align-items: center !important;\n white-space: pre !important;\n -webkit-rtl-ordering: logical !important;\n background-color: -internal-light-dark-color(white, black) !important;\n cursor: default !important;\n margin: 0em !important;\n font: 400 13.3333px Arial !important;\n border-radius: 0px !important;\n border-width: 1px !important;\n border-style: solid !important;\n border-color: #a9a9a9 !important;\n border-image: initial !important;\n}\n#sbz92 select {\n position: relative !important;\n display: inline-block !important;\n border: 2px #cccc solid !important;\n border-radius: 5px !important;\n height: 36px !important;\n line-height: 34px !important;\n padding: 0 12px !important;\n font-size: 14px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n}\n#sbz92 .custom-select--wrap-selected {\n display: flex !important;\n position: relative !important;\n justify-content: space-between !important;\n cursor: pointer !important;\n border: 1px solid #d8d8d8 !important;\n border-radius: 5px !important;\n padding: 5px !important;\n}\n#sbz92 .custom-select--selected-items {\n display: flex !important;\n align-items: center !important;\n flex-wrap: wrap !important;\n}\n#sbz92 .custom-select--selected-item {\n display: flex !important;\n align-items: center !important;\n margin: 3px 3px !important;\n padding: 1px 6px !important;\n border-radius: 5px !important;\n border: 1px solid #d8d8d8 !important;\n font-size: 14px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n vertical-align: top !important;\n}\n#sbz92 .icn-delete:before {\n display: flex !important;\n justify-items: center !important;\n font-size: 12px !important;\n margin-left: 5px !important;\n opacity: 0.5 !important;\n content: '\\2715' !important;\n}\n#sbz92 .custom-select--wrap-options {\n display: flex !important;\n flex-direction: column !important;\n position: absolute !important;\n left: 0 !important;\n top: 100% !important;\n border: 1px solid #dadce0 !important;\n -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;\n border-radius: 5px !important;\n width: 100% !important;\n background: #fff !important;\n z-index: 11 !important;\n max-height: 200px !important;\n overflow-y: auto !important;\n}\n#sbz92 .custom-select--input-search {\n font-size: 15px !important;\n padding: 8px !important;\n border-bottom: 1px solid #d8d8d8 !important;\n}\n#sbz92 .custom-select--items-options {\n margin: 0 !important;\n display: flex !important;\n flex-direction: column !important;\n}\n#sbz92 .custom-select--item-options {\n padding: 10px !important;\n cursor: pointer !important;\n}\n#sbz92 .custom-select--item-options:hover {\n background-color: '@primary_color' !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n}\n#sbz92 .custom-select--icon-dropdown {\n margin-left: auto !important;\n float: right !important;\n cursor: pointer !important;\n}\n#sbz92 .custom-select--icon-dropdown path {\n d: path('M 7 9.5 L 12 14.5 L 17 9.5 H 7 Z') !important;\n fill: black !important;\n}\n#sbz92 .form-component {\n margin-bottom: 15px !important;\n}\n#sbz92 .form-component:last-child {\n margin-bottom: 0 !important;\n}\n#sbz92 .form-component.submitted {\n margin-bottom: 8px !important;\n}\n#sbz92 .form-component.form-component-submit-button {\n margin-top: 20px !important;\n}\n#sbz92 .form-wrapper.form {\n padding: 20px !important;\n background-color: #fff !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form {\n padding: 12px 15px !important;\n margin-top: 5px !important;\n box-shadow: 0 0 0 1px #eeeeee !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form input[type='text'].form-control,\n#sbz92 .form-wrapper.form-wrapper-attachment.form input[type='number'].form-control,\n#sbz92 .form-wrapper.form-wrapper-attachment.form input[type='date'].form-control,\n#sbz92 .form-wrapper.form-wrapper-attachment.form select.form-control,\n#sbz92 .form-wrapper.form-wrapper-attachment.form textarea.form-control {\n padding: 6px 10px !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-component {\n margin-bottom: 12px !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-component:last-child {\n margin-bottom: 0 !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-component.submitted {\n margin-bottom: 5px !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-component.submitted:last-child {\n margin-bottom: 0 !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-component:first-child .label {\n margin-top: 0 !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-component.form-component-submit-button {\n margin-top: 16px !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .label {\n padding-bottom: 4px !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .form-control--valid-input--error {\n padding-top: 3px !important;\n}\n#sbz92 .form-wrapper.form-wrapper-attachment.form .btn--start-convo {\n height: 36px !important;\n}\n#sbz92 select.form-control.form-control--empty {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n@media only screen and (min-width: 968px) {\n #sbz92 .form-radios-wrapper.horizontal {\n display: flex;\n flex-wrap: wrap;\n }\n #sbz92 .form-radios-wrapper.horizontal .radio {\n margin-right: 10px;\n width: 300px;\n }\n #sbz92 .form-radios-wrapper.horizontal .radio:first-child {\n margin-top: 0;\n }\n #sbz92 .form-radios-wrapper.horizontal .radio:nth-child(2) {\n margin-top: 0;\n }\n #sbz92 .form-radios-wrapper.horizontal .radio:nth-child(2n) {\n margin-right: 0;\n }\n #sbz92 .form-checkboxes-wrapper.horizontal {\n display: flex;\n flex-wrap: wrap;\n }\n #sbz92 .form-checkboxes-wrapper.horizontal .checkbox {\n margin-right: 10px;\n width: 300px;\n }\n #sbz92 .form-checkboxes-wrapper.horizontal .checkbox:first-child {\n margin-top: 0;\n }\n #sbz92 .form-checkboxes-wrapper.horizontal .checkbox:nth-child(2) {\n margin-top: 0;\n }\n #sbz92 .form-checkboxes-wrapper.horizontal .checkbox:nth-child(2n) {\n margin-right: 0;\n }\n}\n#sbz92 .form-ratings-wrapper {\n display: inline-flex !important;\n}\n#sbz92 .star {\n width: 32px !important;\n height: 30px !important;\n background-image: url("+nt+") !important;\n background-position: 0px 0px !important;\n background-size: cover !important;\n}\n#sbz92 .form-wrapper-attachment .star-wrapper {\n padding-right: 12px !important;\n}\n#sbz92 .star-wrapper {\n cursor: pointer !important;\n padding-right: 20px !important;\n}\n#sbz92 .star-wrapper:last-child {\n padding-right: 0 !important;\n}\n#sbz92 .star-wrapper.hovering .star {\n background-position: -32px 0 !important;\n}\n#sbz92 .star-wrapper.selected {\n cursor: auto !important;\n}\n#sbz92 .star-wrapper.selected .star {\n background-position: -64px 0 !important;\n}\n#sbz92 .widget-body--events-container {\n overflow-x: hidden !important;\n overflow-y: auto !important;\n display: flex !important;\n flex-direction: column !important;\n flex: 1 !important;\n padding-left: 22.5px !important;\n padding-right: 22.5px !important;\n}\n#sbz92 .widget-body--events {\n padding-top: 20px !important;\n flex: 1 !important;\n}\n#sbz92 .mobile .widget-body--events {\n display: flex !important;\n flex-direction: column !important;\n justify-content: flex-end !important;\n padding-bottom: 15px !important;\n}\n#sbz92 .widget-body--events-container.widget-body--events-container__error {\n align-items: center !important;\n justify-content: center !important;\n}\n#sbz92 .convo-event {\n position: relative !important;\n}\n#sbz92 .convo-event-time {\n text-align: center !important;\n margin-top: 15px !important;\n}\n#sbz92 .convo-event-time span {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n#sbz92 .file-attachment {\n padding: 10px !important;\n border-radius: 10px !important;\n cursor: pointer !important;\n margin: 5px 0 0 0 !important;\n}\n#sbz92 .file-attachment--agent {\n background-color: '@primary_color' !important;\n width: fit-content !important;\n}\n#sbz92 .file-attachment--user {\n background-color: #eeeeee !important;\n align-self: flex-end !important;\n}\n#sbz92 .file-attachment--link {\n display: flex !important;\n flex-direction: row !important;\n align-items: center !important;\n width: fit-content !important;\n}\n#sbz92 .file-attachment--agent .file-attachment--filename {\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n text-decoration: underline !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n max-width: 200px !important;\n}\n#sbz92 .file-attachment--user .file-attachment--filename {\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n text-decoration: underline !important;\n text-overflow: ellipsis !important;\n overflow: hidden !important;\n white-space: nowrap !important;\n max-width: 200px !important;\n}\n#sbz92 .file-attachment--download {\n width: 24px !important;\n height: 24px !important;\n border-radius: 30px !important;\n display: inline-block !important;\n}\n#sbz92 .file-attachment--agent .file-attachment--download {\n background: '@text_color' !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMjY1RkYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWFycm93LWRvd24iPjxsaW5lIHgxPSIxMiIgeTE9IjUiIHgyPSIxMiIgeTI9IjE5Ij48L2xpbmU+PHBvbHlsaW5lIHBvaW50cz0iMTkgMTIgMTIgMTkgNSAxMiI+PC9wb2x5bGluZT48L3N2Zz4K') !important;\n background-size: 15px 15px !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n}\n#sbz92 .file-attachment--user .file-attachment--download {\n background: #c4c4c4 !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9ImZlYXRoZXIgZmVhdGhlci1hcnJvdy1kb3duIj48bGluZSB4MT0iMTIiIHkxPSI1IiB4Mj0iMTIiIHkyPSIxOSI+PC9saW5lPjxwb2x5bGluZSBwb2ludHM9IjE5IDEyIDEyIDE5IDUgMTIiPjwvcG9seWxpbmU+PC9zdmc+Cg==') !important;\n background-size: 15px 15px !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n}\n#sbz92 .message-text--user {\n line-height: 1.5 !important;\n margin: 5px 0 0 !important;\n display: inline-block !important;\n font-weight: 500 !important;\n background-color: '@primary_color' !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n padding: 12px 16px 12px 16px !important;\n}\n#sbz92 .message-text--user.just-focused {\n box-shadow: 0 0 0 2px #000 !important;\n}\n#sbz92 .message-text--agent.just-focused {\n box-shadow: 0 0 0 2px #000 !important;\n}\n#sbz92 .message-text--user.message-user--error {\n background-color: #dc3545 !important;\n}\n#sbz92 .message-text--agent.message-text--deleted {\n opacity: 0.7 !important;\n font-style: italic !important;\n}\n#sbz92 .message-text--agent {\n line-height: 1.5 !important;\n white-space: pre-wrap !important;\n display: inline-block !important;\n background: '@primary_color_faded' !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n padding: 12px 16px 12px 16px !important;\n}\n#sbz92 .message-agent.message-text--agent {\n max-width: 100% !important;\n margin-top: 0 !important;\n}\n#sbz92 .message-user__container {\n display: flex !important;\n flex-direction: row !important;\n align-items: flex-end !important;\n justify-content: flex-end !important;\n}\n#sbz92 .sending_dot.sending_dot__hide {\n opacity: 0 !important;\n background-color: #000 !important;\n}\n#sbz92 .sending_dot {\n width: 15px !important;\n height: 15px !important;\n margin-right: 5px !important;\n border-radius: 50% !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM3NzciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWNsb2NrIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCI+PC9jaXJjbGU+PHBvbHlsaW5lIHBvaW50cz0iMTIgNiAxMiAxMiAxNiAxNCI+PC9wb2x5bGluZT48L3N2Zz4K') !important;\n background-size: contain !important;\n background-repeat: no-repeat !important;\n}\n#sbz92 .message-user {\n border-radius: 18px !important;\n border-bottom-right-radius: 4px !important;\n max-width: 85% !important;\n align-self: flex-end !important;\n word-break: break-word !important;\n position: relative !important;\n white-space: pre-wrap !important;\n}\n#sbz92 .message-user.message-user-images-container {\n width: 85% !important;\n display: flex !important;\n justify-content: flex-end !important;\n}\n#sbz92 .message-user.message-user-audio {\n flex: 1 !important;\n}\n#sbz92 .message-agent {\n border-radius: 18px !important;\n border-bottom-left-radius: 4px !important;\n max-width: 85% !important;\n word-break: break-word !important;\n position: relative !important;\n}\n#sbz92 a.message_error {\n color: #dc3545 !important;\n -webkit-text-fill-color: #dc3545 !important;\n opacity: 0.8 !important;\n display: block !important;\n text-align: end !important;\n font-size: 13px !important;\n margin-top: 5px !important;\n margin-bottom: 10px !important;\n}\n#sbz92 a.message_error:hover {\n opacity: 1 !important;\n color: #dc3545 !important;\n -webkit-text-fill-color: #dc3545 !important;\n}\n#sbz92 .message_error__text {\n display: inline-block !important;\n vertical-align: text-top !important;\n}\n#sbz92 .message_error__icon {\n display: inline-block !important;\n vertical-align: bottom !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSIjZGMzNTQ1IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWFsZXJ0LWNpcmNsZSI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiPjwvY2lyY2xlPjxsaW5lIHgxPSIxMiIgeTE9IjgiIHgyPSIxMiIgeTI9IjEyIj48L2xpbmU+PGxpbmUgeDE9IjEyIiB5MT0iMTYiIHgyPSIxMi4wMSIgeTI9IjE2Ij48L2xpbmU+PC9zdmc+Cgo=') !important;\n background-size: contain !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n width: 20px !important;\n height: 20px !important;\n}\n#sbz92 .image-attachment__img {\n width: 100% !important;\n margin: 5px 0 0 0 !important;\n border-radius: 7px !important;\n border: 1px solid #eeeeee !important;\n}\n#sbz92 .audio-attachment {\n width: 100% !important;\n margin: 5px 0 0 0 !important;\n height: 45px !important;\n display: inline !important;\n}\n#sbz92 .audio-attachment__audio {\n all: inherit !important;\n width: 100% !important;\n}\n#sbz92 .video-attachment {\n border-radius: 7px !important;\n width: 100% !important;\n margin: 5px 0 0 0 !important;\n}\n#sbz92 .video-attachment__video {\n all: inherit !important;\n width: 100% !important;\n}\n#sbz92 .info-message {\n text-align: center !important;\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n margin: 10px !important;\n}\n#sbz92 .message-sender {\n margin-top: 10px !important;\n}\n#sbz92 .message-sender-avatar {\n border-radius: 50% !important;\n width: 25px !important;\n height: 25px !important;\n margin-right: 10px !important;\n}\n#sbz92 .message-sender-name {\n color: #495057 !important;\n -webkit-text-fill-color: #495057 !important;\n vertical-align: middle !important;\n}\n#sbz92 .message-system {\n text-align: center !important;\n margin: 10px !important;\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n#sbz92 .form-attachment {\n display: flex !important;\n flex-direction: column !important;\n padding: 10px !important;\n -webkit-box-shadow: 0 0 10px #dee2e6 !important;\n box-shadow: 0 0 10px #dee2e6 !important;\n border-radius: 7px !important;\n margin-top: 10px !important;\n}\n#sbz92 .form-attachment-field {\n display: flex !important;\n flex-direction: column !important;\n margin-bottom: 0px !important;\n}\n#sbz92 .form-attachment-field__title {\n color: #4c4c4c !important;\n -webkit-text-fill-color: #4c4c4c !important;\n}\n#sbz92 .form-attachment-field__text {\n width: 100% !important;\n border: 1px solid #dbdbdb !important;\n padding: 10px !important;\n margin: 3px 0px 0px 0px !important;\n border-radius: 7px !important;\n}\n#sbz92 .input--error {\n border: 1px solid red !important;\n}\n#sbz92 .input--success {\n background-color: #f9f9f9 !important;\n pointer-events: none !important;\n}\n#sbz92 .form-attachment-field__error {\n color: brown !important;\n -webkit-text-fill-color: brown !important;\n float: right !important;\n}\n#sbz92 .form-attachment-field__checkbox {\n width: 100% !important;\n all: inherit !important;\n -webkit-appearance: textfield !important;\n margin-right: 8px !important;\n}\n#sbz92 .form-attachment-field__checkbox:hover {\n cursor: pointer !important;\n}\n#sbz92 .form-attachment-field__list-item {\n display: flex !important;\n align-items: center !important;\n margin: 4px !important;\n margin-left: 0px !important;\n}\n#sbz92 .form-attachment-field__radio {\n width: 100% !important;\n all: inherit !important;\n -webkit-appearance: textfield !important;\n margin-right: 8px !important;\n}\n#sbz92 .form-attachment-field__datetime {\n width: 100% !important;\n border: 1px solid #dbdbdb !important;\n padding: 10px !important;\n margin: 3px 0px 0px 0px !important;\n border-radius: 7px !important;\n}\n#sbz92 .form-attachment--submit-btn {\n background-color: '@primary_color' !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n width: 100% !important;\n margin-top: 10px !important;\n border-radius: 7px !important;\n padding: 10px !important;\n text-align: center !important;\n font-size: 16px !important;\n}\n#sbz92 .form-attachment--submit-btn:hover {\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n}\n#sbz92 .red {\n color: #dc3545 !important;\n -webkit-text-fill-color: #dc3545 !important;\n}\n#sbz92 .typing {\n background-color: #f4f5f7 !important;\n color: #7a7a7b !important;\n -webkit-text-fill-color: #7a7a7b !important;\n padding: 10px !important;\n opacity: 1 !important;\n transition: all 0.2s !important;\n position: absolute !important;\n bottom: 0px !important;\n left: 0px !important;\n width: 100% !important;\n}\n#sbz92 .typing--hidden {\n opacity: 0 !important;\n display: none !important;\n}\n#sbz92 .markdown-message img {\n max-width: 100% !important;\n margin-top: 10px !important;\n}\n#sbz92 .button-attachments {\n display: block !important;\n margin-top: 5px !important;\n}\n#sbz92 .url-button-attachment:first-child {\n border-top-left-radius: 7px !important;\n border-top-right-radius: 7px !important;\n}\n#sbz92 .url-button-attachment:last-child {\n border-bottom-left-radius: 7px !important;\n border-bottom-right-radius: 7px !important;\n border-bottom: 1px solid '@primary_color' !important;\n}\n#sbz92 .agent-message .url-button-attachment {\n text-decoration: none !important;\n padding: 10px 18px !important;\n display: block !important;\n text-align: center !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n border: 1px solid #000 !important;\n border-radius: 12px !important;\n text-overflow: ellipsis !important;\n overflow: hidden !important;\n font-weight: 500 !important;\n white-space: nowrap !important;\n}\n#sbz92 .agent-message .url-button-attachment:hover {\n color: '@primary_color' !important;\n -webkit-text-fill-color: '@primary_color' !important;\n border-color: '@primary_color' !important;\n}\n#sbz92 .message_quick_replies {\n display: flex !important;\n flex-wrap: wrap !important;\n flex-direction: column !important;\n}\n#sbz92 .message_quick_reply {\n cursor: pointer !important;\n position: relative !important;\n padding: 10px 18px !important;\n margin-top: 8px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n border-radius: 12px !important;\n user-select: none !important;\n overflow: hidden !important;\n white-space: nowrap !important;\n width: fit-content !important;\n font-weight: 500 !important;\n max-width: 100% !important;\n text-overflow: ellipsis !important;\n border: 1px solid #000 !important;\n transition: all 100ms ease !important;\n}\n#sbz92 .message_quick_reply:hover {\n background: '@primary_color' !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n border-color: '@primary_color' !important;\n}\n#sbz92 .generic-attachment-container {\n position: relative !important;\n margin-top: 10px !important;\n}\n#sbz92 .generic-attachments {\n display: block !important;\n}\n#sbz92 .generic-attachment {\n display: flex !important;\n width: 100% !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n user-select: none !important;\n cursor: grab !important;\n}\n#sbz92 .generic-attachment--element-content {\n flex: 1 !important;\n}\n#sbz92 .generic-attachment--element {\n border: 1px solid #d8d8d8 !important;\n background: white !important;\n border-radius: 7px !important;\n overflow: hidden !important;\n width: 220px !important;\n margin-right: 10px !important;\n vertical-align: top !important;\n display: flex !important;\n flex-direction: column !important;\n flex-shrink: 0 !important;\n}\n#sbz92 .generic-attachment--element:last-child {\n margin-right: 0 !important;\n}\n#sbz92 .generic-attachment--element .generic-attachment--element-img {\n width: 100% !important;\n height: 150px !important;\n object-fit: cover !important;\n}\n#sbz92 .generic-attachment--element .url-button-attachment:first-child {\n border-radius: 0 !important;\n}\n#sbz92 .generic-attachment--element .url-button-attachment {\n padding: 10px !important;\n display: block !important;\n padding-top: 9px !important;\n padding-button: 9px !important;\n text-align: center !important;\n border: none !important;\n border-top: 1px solid #d8d8d8 !important;\n width: 100% !important;\n color: #0d6efd !important;\n -webkit-text-fill-color: #0d6efd !important;\n}\n#sbz92 .generic-attachment--element .url-button-attachment:hover {\n color: #024dbc !important;\n -webkit-text-fill-color: #024dbc !important;\n border-color: #d8d8d8 !important;\n}\n#sbz92 .generic-attachment--element .generic-attachment--element-title {\n padding: 0px 13px !important;\n margin-top: 13px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n font-weight: 600 !important;\n font-size: 16px !important;\n line-height: 20px !important;\n white-space: normal !important;\n}\n#sbz92 .generic-attachment--element .generic-attachment--element-subtitle {\n padding: 0px 13px !important;\n color: gray !important;\n -webkit-text-fill-color: gray !important;\n margin-top: 5px !important;\n white-space: pre-wrap !important;\n display: -webkit-box !important;\n -webkit-line-clamp: 4 !important;\n -webkit-box-orient: vertical !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n}\n#sbz92 .generic-attachment--element.clickable {\n cursor: pointer !important;\n}\n#sbz92 .widget_body__events__error_msg {\n margin-top: 50px !important;\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n text-align: center !important;\n}\n#sbz92 .widget_body__events__error_retry {\n margin-top: 10px !important;\n}\n#sbz92 .generic-attachment-navigator {\n position: absolute !important;\n top: 50% !important;\n transform: translateY(-50%) !important;\n cursor: pointer !important;\n width: 20px !important;\n font-size: 80px !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n color: rgba(255, 255, 255, 0.85) !important;\n -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;\n text-shadow: 0 10px 25px rgba(0, 0, 0, 0.75) !important;\n z-index: 999 !important;\n user-select: none !important;\n}\n#sbz92 .generic-attachment-navigator:hover {\n text-shadow: 0 10px 20px rgba(0, 0, 0, 0.75) !important;\n color: #ffffff !important;\n -webkit-text-fill-color: #ffffff !important;\n}\n#sbz92 .generic-attachment-navigator.generic-attachment-navigator--disabled {\n display: none !important;\n}\n#sbz92 .generic-attachment-navigator.generic-attachment-navigator--left {\n left: 2px !important;\n}\n#sbz92 .generic-attachment-navigator.generic-attachment-navigator--right {\n right: 2px !important;\n}\n#sbz92 .generic-attachment-navigator-icon {\n font-size: 80px !important;\n}\n#sbz92 .order_attachment__product_img {\n width: 40px !important;\n height: 40px !important;\n margin-right: 10px !important;\n border-radius: 5px !important;\n flex-shrink: 0 !important;\n display: block !important;\n object-fit: contain !important;\n background: whitesmoke !important;\n}\n#sbz92 .order_attachment__product_name {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n color: black !important;\n -webkit-text-fill-color: black !important;\n}\n#sbz92 .order_attachment__header {\n padding-bottom: 5px !important;\n border-bottom: 1px solid #ccc !important;\n margin-bottom: 5px !important;\n display: flex !important;\n align-items: center !important;\n justify-content: space-between !important;\n}\n#sbz92 .order_attachment__product_desc {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n color: #999 !important;\n -webkit-text-fill-color: #999 !important;\n font-size: 13px !important;\n}\n#sbz92 .order_attachment__product {\n display: flex !important;\n align-items: center !important;\n margin-top: 5px !important;\n margin-bottom: 5 !important;\n}\n#sbz92 .order_attachment__text_sm {\n font-size: 13px !important;\n}\n#sbz92 .order_attachment__text_muted {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n#sbz92 .order_attachment__text_truncate {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n}\n#sbz92 .order_attachment {\n margin-top: 10px !important;\n color: black !important;\n -webkit-text-fill-color: black !important;\n border: 1px solid #aaa !important;\n background: white !important;\n border-radius: 8px !important;\n width: 220px !important;\n overflow-y: auto !important;\n overflow-x: hidden !important;\n padding: 10px !important;\n}\n#sbz92 .order_attachment__footer {\n margin-top: 10px !important;\n padding-top: 10px !important;\n border-top: 1px solid #ccc !important;\n}\n#sbz92 .order_attachment__total {\n font-size: 16px !important;\n}\n#sbz92 .order_attachment__label {\n font-size: 13px !important;\n color: #777 !important;\n -webkit-text-fill-color: #777 !important;\n margin-top: 10px !important;\n}\n#sbz92 .order_attachment__label.no_margin {\n margin-top: 0 !important;\n}\n#sbz92 .order_attachment.order_attachment__user {\n margin-right: 50px !important;\n align-self: flex-end !important;\n margin-right: 0 !important;\n margin-left: 50px !important;\n align-self: flex-start !important;\n}\n#sbz92 .product_attachment {\n margin-top: 10px !important;\n border: 1px solid #d8d8d8 !important;\n background: white !important;\n border-radius: 7px !important;\n overflow: hidden !important;\n width: 200px !important;\n display: inline-block !important;\n vertical-align: top !important;\n transition: all 0.1s !important;\n}\n#sbz92 .product_attachment.product_attachment__user {\n margin-right: 50px !important;\n align-self: flex-end !important;\n margin-right: 0 !important;\n margin-left: 50px !important;\n align-self: flex-start !important;\n}\n#sbz92 .product_attachment__img {\n width: 200px !important;\n height: 200px !important;\n border-bottom: 1px solid #d8d8d8 !important;\n object-fit: cover !important;\n display: block !important;\n}\n#sbz92 .product_attachment__price {\n padding-left: 10px !important;\n}\n#sbz92 .product_attachment__btns {\n margin-top: 5px !important;\n}\n#sbz92 .product_attachment__btn {\n border-top: 1px solid #d8d8d8 !important;\n display: flex !important;\n padding: 8px 10px !important;\n align-items: center !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n justify-content: center !important;\n cursor: pointer !important;\n text-transform: capitalize !important;\n}\n#sbz92 .product_attachment__btn:last-child {\n margin-right: 0 !important;\n}\n#sbz92 .product_attachment__btn:hover {\n color: '@primary_color' !important;\n -webkit-text-fill-color: '@primary_color' !important;\n}\n#sbz92 a.product_attachment__title {\n display: block !important;\n padding: 8px 10px 0 10px !important;\n font-weight: 500 !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n word-break: break-word !important;\n margin-bottom: 5px !important;\n}\n#sbz92 .product_attachment__subtitle {\n white-space: pre-wrap !important;\n display: -webkit-box !important;\n -webkit-line-clamp: 3 !important;\n -webkit-box-orient: vertical !important;\n overflow: hidden !important;\n padding: 5px 10px !important;\n color: #aaa !important;\n -webkit-text-fill-color: #aaa !important;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n margin-bottom: 5px !important;\n}\n#sbz92 .product_attachment__btn_external_link {\n width: 16px !important;\n height: 16px !important;\n margin-left: 5px !important;\n margin-top: -2px !important;\n}\n#sbz92 .agent-convo-event-wrapper {\n max-width: 85% !important;\n margin-top: 5px !important;\n}\n#sbz92 .agent-convo-event-wrapper.full {\n max-width: 100% !important;\n}\n#sbz92 .agent-convo-event-inner {\n position: relative !important;\n display: inline-block !important;\n max-width: 100% !important;\n}\n#sbz92 .message-event-actions {\n position: absolute !important;\n bottom: -10px !important;\n opacity: 0.7 !important;\n left: calc(100% - 25px) !important;\n display: none !important;\n border: 1px solid #dee2e6 !important;\n background-color: white !important;\n border-radius: 4px !important;\n z-index: 10 !important;\n}\n#sbz92 .message-event-actions.ended {\n bottom: 14px !important;\n}\n#sbz92 .message-event-actions:hover {\n opacity: 1 !important;\n}\n#sbz92 .agent-convo-event-inner:hover .message-event-actions {\n display: flex !important;\n}\n#sbz92 .message-event-actions-static {\n display: none !important;\n margin-top: 2px !important;\n border: none !important;\n padding: 0 !important;\n gap: 4px !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-actions {\n display: none !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-actions-static {\n display: flex !important;\n position: absolute !important;\n bottom: -30px !important;\n left: 0 !important;\n z-index: 2 !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn {\n padding: 0 !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn .message-event-action-btn-svg {\n width: 24px !important;\n height: 24px !important;\n background-position: 2px 2px !important;\n background-size: 20px 20px !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn.message-event-action-btn__dev {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n padding-right: 10px !important;\n border-radius: 5px !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn.message-event-action-btn__dev .message-event-action-btn-svg {\n width: 24px !important;\n height: 24px !important;\n background-position: 2px 2px !important;\n background-size: 20px 20px !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn.message-event-action-btn__dev:hover {\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn.message-event-action-btn__dev.message-event-action-btn_like.active {\n color: #34c759 !important;\n -webkit-text-fill-color: #34c759 !important;\n}\n#sbz92 .agent-convo-event-inner.last .message-event-action-btn.message-event-action-btn__dev.message-event-action-btn_like.active {\n color: #34c759 !important;\n -webkit-text-fill-color: #34c759 !important;\n}\n#sbz92 .message-event-action-btn.message-event-action-btn__dev:hover {\n background-color: unset !important;\n}\n#sbz92 .message-event-action-btn {\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n cursor: pointer !important;\n padding: 2px !important;\n}\n#sbz92 .message-event-action-btn:hover {\n background-color: #ececec !important;\n}\n#sbz92 .message-event-action-btn.active:hover {\n background-color: #dbfde3 !important;\n}\n#sbz92 .message-event-action-btn.message-event-action-btn__dev {\n padding: 0px !important;\n}\n#sbz92 .message-event-action-btn.message-event-action-btn__dev:hover {\n background-color: unset !important;\n}\n#sbz92 .message-event-action-btn.message-event-action-btn__dev.active:hover {\n background-color: unset !important;\n}\n#sbz92 .message-event-action-btn .message-event-action-btn-svg {\n width: 20px !important;\n height: 20px !important;\n border-radius: 4px !important;\n background-position: 2px 2px !important;\n background-size: 16px 16px !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n}\n#sbz92 .message-event-action-btn-svg.like {\n background-image: url('data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9IiM2Yzc1N2QiICBzdHJva2Utd2lkdGg9IjIiICBzdHJva2UtbGluZWNhcD0icm91bmQiICBzdHJva2UtbGluZWpvaW49InJvdW5kIiAgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItdGh1bWItdXAiPjxwYXRoIHN0cm9rZT0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik03IDExdjhhMSAxIDAgMCAxIC0xIDFoLTJhMSAxIDAgMCAxIC0xIC0xdi03YTEgMSAwIDAgMSAxIC0xaDNhNCA0IDAgMCAwIDQgLTR2LTFhMiAyIDAgMCAxIDQgMHY1aDNhMiAyIDAgMCAxIDIgMmwtMSA1YTIgMyAwIDAgMSAtMiAyaC03YTMgMyAwIDAgMSAtMyAtMyIgLz48L3N2Zz4K') !important;\n}\n#sbz92 .message-event-action-btn-svg.dislike {\n background-image: url('data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9IiM2Yzc1N2QiICBzdHJva2Utd2lkdGg9IjIiICBzdHJva2UtbGluZWNhcD0icm91bmQiICBzdHJva2UtbGluZWpvaW49InJvdW5kIiAgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItdGh1bWItZG93biI+PHBhdGggc3Ryb2tlPSJub25lIiBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTcgMTN2LThhMSAxIDAgMCAwIC0xIC0xaC0yYTEgMSAwIDAgMCAtMSAxdjdhMSAxIDAgMCAwIDEgMWgzYTQgNCAwIDAgMSA0IDR2MWEyIDIgMCAwIDAgNCAwdi01aDNhMiAyIDAgMCAwIDIgLTJsLTEgLTVhMiAzIDAgMCAwIC0yIC0yaC03YTMgMyAwIDAgMCAtMyAzIiAvPjwvc3ZnPgo=') !important;\n}\n#sbz92 .message-event-action-btn-svg.info {\n background-image: url('data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIyNCIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgZmlsbD0ibm9uZSIKICBzdHJva2U9IiM2Yzc1N2QiCiAgc3Ryb2tlLXdpZHRoPSIyIgogIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIKICBzdHJva2UtbGluZWpvaW49InJvdW5kIgo+CiAgPHBhdGggZD0iTTMgMTJhOSA5IDAgMSAwIDE4IDBhOSA5IDAgMCAwIC0xOCAwIiAvPgogIDxwYXRoIGQ9Ik0xMiA5aC4wMSIgLz4KICA8cGF0aCBkPSJNMTEgMTJoMXY0aDEiIC8+Cjwvc3ZnPgo=') !important;\n}\n#sbz92 .message-event-action-btn:hover .message-event-action-btn-svg.like {\n background-image: url('data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9ImJsYWNrIiAgc3Ryb2tlLXdpZHRoPSIyIiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiAgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgIGNsYXNzPSJpY29uIGljb24tdGFibGVyIGljb25zLXRhYmxlci1vdXRsaW5lIGljb24tdGFibGVyLXRodW1iLXVwIj48cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNNyAxMXY4YTEgMSAwIDAgMSAtMSAxaC0yYTEgMSAwIDAgMSAtMSAtMXYtN2ExIDEgMCAwIDEgMSAtMWgzYTQgNCAwIDAgMCA0IC00di0xYTIgMiAwIDAgMSA0IDB2NWgzYTIgMiAwIDAgMSAyIDJsLTEgNWEyIDMgMCAwIDEgLTIgMmgtN2EzIDMgMCAwIDEgLTMgLTMiIC8+PC9zdmc+Cg==') !important;\n}\n#sbz92 .message-event-action-btn:hover .message-event-action-btn-svg.dislike {\n background-image: url('data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9ImJsYWNrIiAgc3Ryb2tlLXdpZHRoPSIyIiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiAgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgIGNsYXNzPSJpY29uIGljb24tdGFibGVyIGljb25zLXRhYmxlci1vdXRsaW5lIGljb24tdGFibGVyLXRodW1iLWRvd24iPjxwYXRoIHN0cm9rZT0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik03IDEzdi04YTEgMSAwIDAgMCAtMSAtMWgtMmExIDEgMCAwIDAgLTEgMXY3YTEgMSAwIDAgMCAxIDFoM2E0IDQgMCAwIDEgNCA0djFhMiAyIDAgMCAwIDQgMHYtNWgzYTIgMiAwIDAgMCAyIC0ybC0xIC01YTIgMyAwIDAgMCAtMiAtMmgtN2EzIDMgMCAwIDAgLTMgMyIgLz48L3N2Zz4K') !important;\n}\n#sbz92 .message-event-action-btn:hover .message-event-action-btn-svg.info {\n background-image: url('data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIyNCIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgZmlsbD0ibm9uZSIKICBzdHJva2U9IiMwMDAiCiAgc3Ryb2tlLXdpZHRoPSIyIgogIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIKICBzdHJva2UtbGluZWpvaW49InJvdW5kIgo+CiAgPHBhdGggZD0iTTMgMTJhOSA5IDAgMSAwIDE4IDBhOSA5IDAgMCAwIC0xOCAwIiAvPgogIDxwYXRoIGQ9Ik0xMiA5aC4wMSIgLz4KICA8cGF0aCBkPSJNMTEgMTJoMXY0aDEiIC8+Cjwvc3ZnPgo=') !important;\n}\n#sbz92 .message-event-action-btn.active .message-event-action-btn-svg.like {\n background-image: url('data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9IiMzNEM3NTkiICBjbGFzcz0iaWNvbiBpY29uLXRhYmxlciBpY29ucy10YWJsZXItZmlsbGVkIGljb24tdGFibGVyLXRodW1iLXVwIj48cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTMgM2EzIDMgMCAwIDEgMi45OTUgMi44MjRsLjAwNSAuMTc2djRoMmEzIDMgMCAwIDEgMi45OCAyLjY1bC4wMTUgLjE3NGwuMDA1IC4xNzZsLS4wMiAuMTk2bC0xLjAwNiA1LjAzMmMtLjM4MSAxLjYyNiAtMS41MDIgMi43OTYgLTIuODEgMi43OGwtLjE2NCAtLjAwOGgtOGExIDEgMCAwIDEgLS45OTMgLS44ODNsLS4wMDcgLS4xMTdsLjAwMSAtOS41MzZhMSAxIDAgMCAxIC41IC0uODY1YTIuOTk4IDIuOTk4IDAgMCAwIDEuNDkyIC0yLjM5N2wuMDA3IC0uMjAydi0xYTMgMyAwIDAgMSAzIC0zeiIgLz48cGF0aCBkPSJNNSAxMGExIDEgMCAwIDEgLjk5MyAuODgzbC4wMDcgLjExN3Y5YTEgMSAwIDAgMSAtLjg4MyAuOTkzbC0uMTE3IC4wMDdoLTFhMiAyIDAgMCAxIC0xLjk5NSAtMS44NWwtLjAwNSAtLjE1di03YTIgMiAwIDAgMSAxLjg1IC0xLjk5NWwuMTUgLS4wMDVoMXoiIC8+PC9zdmc+Cg==') !important;\n}\n#sbz92 .message-event-action-btn.active .message-event-action-btn-svg.dislike {\n background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI0ODBfOTUpIj4KPHBhdGggZD0iTTEzIDIxLjAwNzlDMTMuNzY1IDIxLjAwOCAxNC41MDEyIDIwLjcxNTcgMTUuMDU3OSAyMC4xOTFDMTUuNjE0NyAxOS42NjYyIDE1Ljk0OTkgMTguOTQ4NiAxNS45OTUgMTguMTg0OUwxNiAxOC4wMDc5VjE0LjAwNzlIMThDMTguNzM1MSAxNC4wMDggMTkuNDQ0NyAxMy43MzgyIDE5Ljk5NCAxMy4yNDk3QzIwLjU0MzQgMTIuNzYxMiAyMC44OTQyIDEyLjA4OCAyMC45OCAxMS4zNTc5TDIwLjk5NSAxMS4xODQ5TDIxIDExLjAwNzlMMjAuOTggMTAuODExOUwxOS45NzQgNS43Nzk5MkMxOS41OTMgNC4xNTQ5MiAxOC40NzIgMi45ODM5MiAxNy4xNjQgMi45OTk5MkwxNyAzLjAwNzkySDlDOC43NTQ5MSAzLjAwNzk4IDguNTE4MzggMy4wOTgwNCA4LjMzNTMzIDMuMjYxMDFDOC4xNTIyNyAzLjQyMzk3IDguMDM1NDMgMy42NDg0OSA4LjAwNyAzLjg5MTkyTDggNC4wMDc5Mkw4LjAwMSAxMy41NDM5QzguMDAxIDEzLjcxOTUgOC4wNDcyMSAxMy44OTE5IDguMTM0OTggMTQuMDQzOUM4LjIyMjc1IDE0LjE5NTkgOC4zNDg5OCAxNC4zMjIyIDguNTAxIDE0LjQwOTlDOC45MjcyOSAxNC42NTYxIDkuMjg2NCAxNS4wMDM1IDkuNTQ2NjEgMTUuNDIxM0M5LjgwNjgyIDE1LjgzOTIgOS45NjAxMyAxNi4zMTQ3IDkuOTkzIDE2LjgwNTlMMTAgMTcuMDA3OVYxOC4wMDc5QzEwIDE4LjgwMzYgMTAuMzE2MSAxOS41NjY2IDEwLjg3ODcgMjAuMTI5MkMxMS40NDEzIDIwLjY5MTggMTIuMjA0NCAyMS4wMDc5IDEzIDIxLjAwNzlaIiBmaWxsPSIjMzMzMzMzIi8+CjxwYXRoIGQ9Ik01IDE0LjAwODFDNS4yNDQ5MyAxNC4wMDggNS40ODEzNCAxMy45MTgxIDUuNjY0MzcgMTMuNzU1M0M1Ljg0NzQxIDEzLjU5MjYgNS45NjQzNCAxMy4zNjgzIDUuOTkzIDEzLjEyNTFMNiAxMy4wMDgxVjQuMDA4MDZDNS45OTk5NyAzLjc2MzEyIDUuOTEwMDQgMy41MjY3MiA1Ljc0NzI4IDMuMzQzNjhDNS41ODQ1MyAzLjE2MDY1IDUuMzYwMjUgMy4wNDM3MSA1LjExNyAzLjAxNTA2TDUgMy4wMDgwNkg0QzMuNDk1MSAzLjAwNzkzIDMuMDA4ODQgMy4xOTg3OCAyLjYzODgxIDMuNTQyMjlDMi4yNjg3OCAzLjg4NTc5IDIuMDQyMzYgNC4zNTY1NCAyLjAwNSA0Ljg2MDA2TDIgNS4wMTAwNlYxMi4wMTAxQzIuMDAwMDkgMTIuNTE0NSAyLjE5MDc3IDEzLjAwMDIgMi41MzM4NCAxMy4zN0MyLjg3NjkgMTMuNzM5NyAzLjM0NzAyIDEzLjk2NjIgMy44NSAxNC4wMDQxTDQgMTQuMDA5MUw1IDE0LjAwODFaIiBmaWxsPSIjMzMzMzMzIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMjQ4MF85NSI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K') !important;\n}\n#sbz92 .inline-time {\n font-size: 13px !important;\n margin-top: 6px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n font-weight: 500 !important;\n opacity: 0.4 !important;\n}\n#sbz92 .message-text-inline-image-wrapper {\n display: block !important;\n margin-top: 8px !important;\n margin-bottom: 8px !important;\n max-width: 100% !important;\n}\n#sbz92 .message-text-inline-image {\n width: 100% !important;\n}\n#sbz92 .text-message-ul {\n display: block !important;\n list-style-type: disc !important;\n margin-block-start: 8px !important;\n margin-block-end: 8px !important;\n padding-inline-start: 20px !important;\n}\n#sbz92 .text-message-ol {\n display: block !important;\n list-style-type: decimal !important;\n margin-block-start: 8px !important;\n margin-block-end: 8px !important;\n padding-inline-start: 20px !important;\n}\n#sbz92 .text-message-li {\n display: list-item !important;\n}\n#sbz92 .agent-message .text-message-link {\n color: #0d6efd !important;\n -webkit-text-fill-color: #0d6efd !important;\n font-weight: 400 !important;\n}\n#sbz92 .agent-message .text-message-link:hover {\n color: #024dbc !important;\n -webkit-text-fill-color: #024dbc !important;\n}\n#sbz92 .user-message .text-message-link {\n text-decoration: underline !important;\n text-decoration-color: rgba(255, 255, 255, 0.6) !important;\n text-underline-offset: 4px !important;\n}\n#sbz92 .user-message .text-message-link:hover {\n text-decoration-color: #fff !important;\n background-color: rgba(255, 255, 255, 0.08) !important;\n}\n#sbz92 .message-quote {\n padding: 6px 10px !important;\n border-left: 3px solid '@primary_color' !important;\n background-color: #dfdfdf !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-bottom: 8px !important;\n max-width: 100% !important;\n}\n#sbz92 .message-quote-title {\n font-weight: 600 !important;\n font-size: 14px !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n}\n#sbz92 .message-quote-content {\n opacity: 0.7 !important;\n color: '@secondary_color' !important;\n -webkit-text-fill-color: '@secondary_color' !important;\n font-size: 14px !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n}\n#sbz92 .message-quote-inner-img {\n width: 36px !important;\n height: 36px !important;\n object-fit: cover !important;\n}\n#sbz92 .message-quote-inner {\n margin-left: 15px !important;\n flex: 1 !important;\n overflow: hidden !important;\n}\n#sbz92 .image-attachment.just-focused {\n box-shadow: 0 0 0 2px #000 !important;\n}\n#sbz92 .file-attachment.just-focused {\n box-shadow: 0 0 0 2px #000 !important;\n}\n#sbz92 .widget_body_empty_img {\n max-width: 150px !important;\n max-height: 150px !important;\n}\n#sbz92 .emoji {\n position: relative !important;\n width: 20px !important;\n height: 20px !important;\n background-size: 100% !important;\n background-repeat: no-repeat !important;\n border: none !important;\n display: inline-block !important;\n vertical-align: text-bottom !important;\n}\n#sbz92 .emoji--angry {\n background-image: url("+it+") !important;\n}\n#sbz92 .emoji--confused {\n background-image: url("+rt+") !important;\n}\n#sbz92 .emoji--crying,\n#sbz92 .emoji--cry {\n background-image: url("+ot+") !important;\n}\n#sbz92 .emoji--grinning {\n background-image: url("+st+") !important;\n}\n#sbz92 .emoji--heart_eyes,\n#sbz92 .emoji--heart-eyes {\n background-image: url("+at+") !important;\n}\n#sbz92 .emoji--neutral_face,\n#sbz92 .emoji--neutral {\n background-image: url("+pt+") !important;\n}\n#sbz92 .emoji--disappointed,\n#sbz92 .emoji--sad {\n background-image: url("+lt+") !important;\n}\n#sbz92 .emoji--sleepy {\n background-image: url("+ct+") !important;\n}\n#sbz92 .emoji--smile,\n#sbz92 .emoji--smiling {\n background-image: url("+dt+") !important;\n}\n#sbz92 .emoji--open_mouth,\n#sbz92 .emoji--surprised {\n background-image: url("+mt+") !important;\n}\n#sbz92 .emoji--tired_face,\n#sbz92 .emoji--tired {\n background-image: url("+ht+") !important;\n}\n#sbz92 .emoji--stuck_out_tongue,\n#sbz92 .emoji--tongue-out {\n background-image: url("+ut+") !important;\n}\n#sbz92 .emoji--wink {\n background-image: url("+gt+") !important;\n}\n#sbz92 .emoji--moyai {\n background-image: url("+bt+") !important;\n}\n#sbz92 .emoji--dislike,\n#sbz92 .emoji--unlike,\n#sbz92 .emoji--thumbsdown {\n background-image: url("+ft+") !important;\n}\n#sbz92 .emoji--like,\n#sbz92 .emoji--thumbsup {\n background-image: url("+vt+") !important;\n}\n#sbz92 .emoji--ok_hand {\n background-image: url("+_t+") !important;\n}\n#sbz92 .emoji--octopus {\n background-image: url("+yt+") !important;\n}\n#sbz92 .emoji--pig2 {\n background-image: url("+xt+") !important;\n}\n#sbz92 .emoji--wave {\n background-image: url("+wt+") !important;\n}\n#sbz92 .emoji--mouse {\n background-image: url("+kt+") !important;\n}\n#sbz92 .emoji--mouse2 {\n background-image: url("+At+") !important;\n}\n#sbz92 .emoji--rat {\n background-image: url("+zt+") !important;\n}\n#sbz92 .emoji-picker {\n display: flex !important;\n flex-direction: row !important;\n z-index: 20 !important;\n position: absolute !important;\n max-width: 240px !important;\n background: #fff !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n border-radius: 10px !important;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15) !important;\n right: 15px !important;\n bottom: 55px !important;\n flex-wrap: wrap !important;\n padding: 10px !important;\n justify-content: space-between !important;\n align-items: center !important;\n}\n#sbz92 .emoji-picker--item {\n background-size: 100% !important;\n width: 30px !important;\n height: 30px !important;\n position: relative !important;\n background-repeat: no-repeat !important;\n display: inline-block !important;\n vertical-align: text-bottom !important;\n margin: 5px !important;\n cursor: pointer !important;\n transition: background-color 0.2s !important;\n}\n#sbz92 .emoji-picker-background-item {\n background-size: 50% !important;\n width: 40px !important;\n height: 40px !important;\n border-radius: 100% !important;\n}\n#sbz92 .emoji-picker-background-item:hover {\n background-color: #dee2e6 !important;\n}\n#sbz92 .convo-list {\n display: flex !important;\n flex-direction: column !important;\n flex: 1 !important;\n width: 100% !important;\n justify-content: space-between !important;\n overflow: auto !important;\n margin-top: -60px !important;\n padding-left: 22.5px !important;\n padding-right: 22.5px !important;\n}\n#sbz92 .convo-list--list {\n background: #fff !important;\n overflow-y: auto !important;\n overflow-x: hidden !important;\n}\n#sbz92 .convo-list--title {\n font-weight: 500 !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n background: #fff !important;\n border-bottom: 1px solid #f0f0f0 !important;\n padding: 15px !important;\n}\n#sbz92 .convo-list--container {\n border-radius: 10px !important;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1) !important;\n overflow: auto !important;\n display: flex !important;\n flex-direction: column !important;\n user-select: none !important;\n}\n#sbz92 .convo-list--footer {\n display: flex !important;\n flex-direction: column !important;\n align-items: center !important;\n margin-top: 22.5px !important;\n}\n#sbz92 .convo-list--convo-last-info {\n overflow: hidden !important;\n white-space: nowrap !important;\n justify-content: center !important;\n display: flex !important;\n flex-direction: column !important;\n flex: 1 !important;\n margin-left: 15px !important;\n}\n#sbz92 .convo-list--convo-last-message {\n font-weight: normal !important;\n flex: 1 !important;\n cursor: pointer !important;\n display: flex !important;\n width: 100% !important;\n overflow: hidden !important;\n align-items: center !important;\n}\n#sbz92 .convo-list--convo-last-mes {\n text-overflow: ellipsis !important;\n opacity: 0.6 !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n font-weight: normal !important;\n}\n#sbz92 .convo-list--convo-title {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n font-weight: 500 !important;\n}\n#sbz92 .convo-list--convo-completed {\n width: 14px !important;\n}\n#sbz92 .convo-list--convo-name {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n flex: 1 !important;\n margin-right: 16px !important;\n cursor: pointer !important;\n}\n#sbz92 .convo-list--item {\n cursor: pointer !important;\n border-bottom: 1px solid '@primary_color_faded' !important;\n padding: 15px !important;\n display: flex !important;\n flex-direction: row !important;\n transition: background 0.15s ease !important;\n}\n#sbz92 .convo-list--item:hover {\n background: '@primary_color_faded' !important;\n}\n#sbz92 .convo-list--convo-time span {\n font-size: 14px !important;\n line-height: 20px !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n opacity: 0.6 !important;\n min-width: 70px !important;\n cursor: pointer !important;\n}\n#sbz92 .convo-list--item-unread {\n width: 8px !important;\n height: 8px !important;\n background: #dc3545 !important;\n border-radius: 50% !important;\n margin-left: 15px !important;\n align-self: center !important;\n}\n#sbz92 .convo-list--item-avatar {\n width: 32px !important;\n height: 32px !important;\n}\n#sbz92 .widget-body--empty {\n display: flex !important;\n flex: 1 !important;\n justify-content: center !important;\n align-items: center !important;\n flex-direction: column !important;\n}\n#sbz92 .widget-body--empty-text {\n color: #343a40 !important;\n -webkit-text-fill-color: #343a40 !important;\n margin-top: 30px !important;\n text-align: center !important;\n}\n#sbz92 .widget-body--empty-icon {\n width: 128px !important;\n height: 128px !important;\n -webkit-mask-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cg%20data-name%3D%22Layer%202%22%3E%3Cpath%20d%3D%22M130.9%20366.9a9.9%209.9%200%200%200-2.9%207.1%2010.33%2010.33%200%200%200%202.9%207.1%209.73%209.73%200%200%200%207.1%202.9%2010.33%2010.33%200%200%200%207.1-2.9%209.73%209.73%200%200%200%202.9-7.1%2010.52%2010.52%200%200%200-2.9-7.1%209.9%209.9%200%200%200-7.1-2.9%2010.33%2010.33%200%200%200-7.1%202.9zM483.7%20282a183.07%20183.07%200%200%200%2028.3-98C512%2082.5%20429.5%200%20328%200a183.16%20183.16%200%200%200-96%2027%2010%2010%200%200%200%2010.5%2017.1A162.67%20162.67%200%200%201%20328%2020c90.4%200%20164%2073.6%20164%20164a162.73%20162.73%200%200%201-27.9%2091.5%2010.07%2010.07%200%200%200%20.3%2011.6l11%2040.9-44-11.8a10%2010%200%200%200-8.4%201.5%20164.32%20164.32%200%200%201-151.8%2020.2%20138.68%20138.68%200%200%200-97.1-97.1%20164.31%20164.31%200%200%201%2014.5-143.2%2010%2010%200%200%200-17-10.6%20184%20184%200%200%200-19.9%20149.6c-4.5-.4-9.1-.7-13.7-.7C61.9%20236%200%20297.9%200%20374a136.88%20136.88%200%200%200%2022.9%2076.1L12.2%20490a10%2010%200%200%200%2012.3%2012.3l40.9-11a137.71%20137.71%200%200%200%20146.5-.8%2010%2010%200%200%200-10.7-16.9%20118.09%20118.09%200%200%201-128.6-1.5%209.73%209.73%200%200%200-8.1-1.3L36%20478.5l7.4-27.7a10%2010%200%200%200-1.5-8.4%20117.95%20117.95%200%201%201%20207-28%2010%2010%200%200%200%2018.8%206.8%20137.72%20137.72%200%200%200%208.3-47.3%20124.44%20124.44%200%200%200-.7-13.7%20183.93%20183.93%200%200%200%20155.3-23.6l56.2%2015.1a10%2010%200%200%200%2012.3-12.3zm-246%20162.2a10.52%2010.52%200%200%200-7.1%202.9%209.73%209.73%200%200%200-2.9%207.1%2010.33%2010.33%200%200%200%202.9%207.1%209.73%209.73%200%200%200%207.1%202.9%2010.52%2010.52%200%200%200%207.1-2.9%209.73%209.73%200%200%200%202.9-7.1%209.9%209.9%200%200%200-10-10zM205.3%2070.7a10.52%2010.52%200%200%200%207.1-2.9%209.73%209.73%200%200%200%202.9-7.1%2010.14%2010.14%200%200%200-2.9-7.1%209.9%209.9%200%200%200-7.1-2.9%2010.52%2010.52%200%200%200-7.1%202.9%209.9%209.9%200%200%200-2.9%207.1%2010.52%2010.52%200%200%200%202.9%207.1%209.9%209.9%200%200%200%207.1%202.9zm-19.4%20296.2a9.9%209.9%200%200%200-2.9%207.1%2010.33%2010.33%200%200%200%202.9%207.1%209.73%209.73%200%200%200%207.1%202.9%2010.33%2010.33%200%200%200%207.1-2.9%209.73%209.73%200%200%200%202.9-7.1%2010.33%2010.33%200%200%200-2.9-7.1%209.9%209.9%200%200%200-7.1-2.9%2010.33%2010.33%200%200%200-7.1%202.9zm210.8-201.1a9.8%209.8%200%200%200%205.2-1.5l1.3-.8a9.92%209.92%200%200%200%203.3-13.7%2010.06%2010.06%200%200%200-13.8-3.3l-1.3.8a10%2010%200%200%200%205.3%2018.5zm-68.1%20107.4a58%2058%200%200%200%2057.9-57.9%207%207%200%200%200-7-7H277.7a7%207%200%200%200-7%207%2058%2058%200%200%200%2057.9%2057.9zm-43.5-50.9h87.1l-1%203.7a43.93%2043.93%200%200%201-85.2%200zm-25.8-56.5a9.8%209.8%200%200%200%205.2-1.5l1.3-.8a9.92%209.92%200%200%200%203.3-13.7%2010.06%2010.06%200%200%200-13.8-3.3l-1.3.8a10%2010%200%200%200%205.3%2018.5zM75.9%20366.9A9.9%209.9%200%200%200%2073%20374a10.33%2010.33%200%200%200%202.9%207.1A9.73%209.73%200%200%200%2083%20384a10.33%2010.33%200%200%200%207.1-2.9A9.73%209.73%200%200%200%2093%20374a10.33%2010.33%200%200%200-2.9-7.1A9.9%209.9%200%200%200%2083%20364a10.33%2010.33%200%200%200-7.1%202.9z%22%20fill%3D%22%234285f4%22%20data-name%3D%22Capa%201%22/%3E%3C/g%3E%3C/svg%3E') !important;\n border-radius: 0 !important;\n background-color: '@primary_color' !important;\n}\n#sbz92 .mobile .widget-container {\n border-radius: 0px !important;\n max-height: 100% !important;\n margin-bottom: 0 !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n width: 100% !important;\n height: 100% !important;\n opacity: 1 !important;\n transition: opacity 0.15s cubic-bezier(1, 0.5, 0.8, 1) !important;\n}\n#sbz92 .mobile .widget-container.widget-container--left {\n left: 0 !important;\n right: 0 !important;\n}\n#sbz92 .mobile .widget-container.widget-container--right {\n right: 0 !important;\n left: 0 !important;\n}\n#sbz92 .mobile .widget-container.widget-container--hide {\n top: -100vh !important;\n opacity: 0 !important;\n transition: opacity 0.15s cubic-bezier(1, 0.5, 0.8, 1), bottom 0.15s cubic-bezier(1, 0.5, 0.8, 1) !important;\n}\n#sbz92 .widget-container.widget-container--left {\n left: '@desktop_button.margin_x' !important;\n right: unset !important;\n}\n#sbz92 .widget-container.widget-container--right {\n right: '@desktop_button.margin_x' !important;\n left: unset !important;\n}\n#sbz92 .widget-container {\n max-height: 100% !important;\n max-height: '@desktop_widget_max_height' !important;\n max-width: 100% !important;\n background: #fff !important;\n z-index: '@z_index_3' !important;\n border-radius: 15px !important;\n box-shadow: 0 5px 25px 0 rgba(0, 0, 0, 0.13) !important;\n display: flex !important;\n flex-direction: column !important;\n align-items: center !important;\n position: '@widget_position' !important;\n margin-bottom: '@desktop_button.margin_y' !important;\n width: '@width' !important;\n height: '@height' !important;\n bottom: 0 !important;\n opacity: 1 !important;\n transform: translateY(0) !important;\n transition: transform 0.15s cubic-bezier(1, 0.5, 0.8, 1), opacity 0.2s cubic-bezier(1, 0.5, 0.8, 1), scale 0.15s ease !important;\n visibility: visible !important;\n overflow: hidden !important;\n}\n#sbz92 .widget-container.widget-container--full {\n max-height: 100% !important;\n height: 100% !important;\n margin-bottom: 0 !important;\n}\n#sbz92 .widget-container.widget-container--hide {\n opacity: 0 !important;\n transform: translateY(20px) !important;\n visibility: hidden !important;\n transition: transform 0.15s cubic-bezier(1, 0.5, 0.8, 1), opacity 0.1s cubic-bezier(1, 0.5, 0.8, 1), visibility 0.1s cubic-bezier(1, 0.5, 0.8, 1) !important;\n}\n#sbz92 .btn--start-convo {\n border-radius: 7px !important;\n flex-shrink: 0 !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n padding-left: 32px !important;\n padding-right: 32px !important;\n height: 42px !important;\n color: '@text_color' !important;\n -webkit-text-fill-color: '@text_color' !important;\n font-size: 16px !important;\n font-weight: 500 !important;\n line-height: 20px !important;\n text-align: center !important;\n background: '@primary_color' !important;\n width: 100% !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n transition: filter 250ms ease !important;\n}\n#sbz92 .btn--start-convo::after {\n display: none !important;\n}\n#sbz92 .btn--start-convo:hover {\n filter: brightness(1.1) !important;\n}\n#sbz92 .btn--start-convo:disabled {\n opacity: 0.5 !important;\n cursor: default !important;\n pointer-events: none !important;\n}\n#sbz92 .widget-body.widget-body--none {\n display: none !important;\n}\n#sbz92 .widget-body {\n flex: 1 !important;\n flex-grow: 1 !important;\n z-index: -1 !important;\n width: 100% !important;\n overflow-y: auto !important;\n flex-direction: column !important;\n display: flex !important;\n position: relative !important;\n}\n#sbz92 .embed-chat .widget-body--events {\n width: 600px !important;\n margin: 0 auto !important;\n max-width: 100% !important;\n}\n#sbz92 .embed-chat .message-input {\n max-width: 600px !important;\n margin: 20px auto !important;\n}\n#sbz92 .embed-chat .widget-header--inner {\n max-width: 100% !important;\n width: 600px !important;\n}\n#sbz92 .embed-chat .widget-body--content {\n width: 600px !important;\n margin: 0 auto !important;\n max-width: 100% !important;\n}\n#sbz92 .embed-chat .convo-list {\n width: 600px !important;\n margin: 0 auto !important;\n max-width: 100% !important;\n}\n#sbz92 .widget-body--content {\n overflow-y: auto !important;\n overflow-x: hidden !important;\n flex: 1 !important;\n display: flex !important;\n flex-direction: column !important;\n position: relative !important;\n min-height: 0 !important;\n}\n#sbz92 .poweredby {\n margin-bottom: 15px !important;\n text-align: center !important;\n}\n#sbz92 .poweredby .poweredby--text {\n text-decoration: none !important;\n font-size: 13px !important;\n color: #7c7c7c !important;\n -webkit-text-fill-color: #7c7c7c !important;\n vertical-align: baseline !important;\n}\n#sbz92 .poweredby .poweredby--text .poweredby--subiz-logo {\n opacity: 0.7 !important;\n margin-top: -1px !important;\n height: 12px !important;\n}\n#sbz92 .poweredby .poweredby--text:hover {\n color: #333 !important;\n -webkit-text-fill-color: #333 !important;\n}\n#sbz92 .poweredby .poweredby--text:hover .poweredby--subiz-logo {\n opacity: 1 !important;\n}\n#sbz92 .empty-container {\n display: flex !important;\n justify-content: center !important;\n flex-direction: column !important;\n margin-top: 30px !important;\n margin-bottom: 30px !important;\n}\n#sbz92 .empty-desc {\n text-align: center !important;\n margin: 30px !important;\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n}\n#sbz92 .chat-button--white-bg {\n display: none !important;\n z-index: -1 !important;\n}\n#sbz92 .chat-button--white-bg--mask-only {\n background: white !important;\n width: 66px !important;\n height: 66px !important;\n top: 2px !important;\n left: 2px !important;\n position: absolute !important;\n border-radius: 50% !important;\n display: block !important;\n}\n#sbz92 .mobile .chat-button--default {\n width: '@mobile_button.width' !important;\n height: '@mobile_button.height' !important;\n background: '@background' !important;\n border-radius: '@mobile_button.border_radius' !important;\n}\n#sbz92 .mobile .widget-layout {\n bottom: '@mobile_button.margin_y' !important;\n}\n#sbz92 .mobile .widget-layout.widget-layout--left {\n left: '@mobile_button.margin_x' !important;\n right: unset !important;\n}\n#sbz92 .mobile .widget-layout.widget-layout--right {\n right: '@mobile_button.margin_x' !important;\n left: unset !important;\n}\n#sbz92 .mobile .chat-button--img {\n min-width: '@mobile_button.width' !important;\n}\n#sbz92 .chat-button {\n cursor: pointer !important;\n position: relative !important;\n scale: 1 !important;\n transition: filter 250ms ease, opacity 0.15s ease-in, scale 0.125s ease-in-out, transform 0.2s ease-in-out !important;\n}\n#sbz92 .chat-button.hidden {\n opacity: 0 !important;\n}\n#sbz92 .chat-button:hover {\n filter: brightness(1.1) !important;\n scale: 1.05 !important;\n}\n#sbz92 .chat-button--img {\n opacity: 0 !important;\n min-width: '@desktop_button.width' !important;\n display: block !important;\n}\n#sbz92 .chat-button.chat-button--left {\n float: left !important;\n}\n#sbz92 .chat-button.chat-button--right {\n float: right !important;\n}\n#sbz92 .widget-layout {\n z-index: '@z_index_2' !important;\n position: '@widget_position' !important;\n bottom: '@desktop_button.margin_y' !important;\n transition: opacity 150ms !important;\n opacity: 1 !important;\n}\n#sbz92 .widget-layout.widget-layout--hidden {\n opacity: 0 !important;\n pointer-events: none !important;\n}\n#sbz92 .widget-layout.widget-layout--left {\n left: '@desktop_button.margin_x' !important;\n right: unset !important;\n}\n#sbz92 .widget-layout.widget-layout--right {\n right: '@desktop_button.margin_x' !important;\n left: unset !important;\n}\n#sbz92 .chat-button--unread {\n position: absolute !important;\n right: 0px !important;\n top: -5px !important;\n background: #dc3545 !important;\n padding-left: 5px !important;\n padding-right: 5px !important;\n padding-top: 2px !important;\n padding-bottom: 2px !important;\n border-radius: 5px !important;\n color: #fff !important;\n -webkit-text-fill-color: #fff !important;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15) !important;\n}\n#sbz92 .widget-preview {\n z-index: '@z_index_3' !important;\n background: #fff !important;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15) !important;\n border-radius: 15px !important;\n max-width: 100% !important;\n width: 340px !important;\n margin-bottom: 20px !important;\n}\n#sbz92 .widget-preview.widget-preview--hidden {\n display: none !important;\n}\n#sbz92 .widget-preview--btn-close {\n cursor: pointer !important;\n opacity: 0.5 !important;\n align-self: flex-start !important;\n background-color: #e5e5e5 !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXIteCI+PGxpbmUgeDE9IjE4IiB5MT0iNiIgeDI9IjYiIHkyPSIxOCI+PC9saW5lPjxsaW5lIHgxPSI2IiB5MT0iNiIgeDI9IjE4IiB5Mj0iMTgiPjwvbGluZT48L3N2Zz4K') !important;\n background-size: 16px 16px !important;\n background-repeat: no-repeat !important;\n background-position: center !important;\n width: 24px !important;\n height: 24px !important;\n display: block !important;\n border-radius: 100% !important;\n transition: background-color 0.2s !important;\n}\n#sbz92 .widget-preview--btn-close:hover {\n opacity: 1 !important;\n}\n#sbz92 .widget-preview--avatar {\n width: 45px !important;\n height: 45px !important;\n border: 1px solid rgba(31, 54, 90, 0.1) !important;\n border-radius: 100% !important;\n margin-right: 15px !important;\n}\n#sbz92 .widget-preview--body {\n display: flex !important;\n padding: 15px !important;\n}\n#sbz92 .widget-preview--title {\n display: block !important;\n font-size: 15px !important;\n color: black !important;\n -webkit-text-fill-color: black !important;\n margin-bottom: 5px !important;\n opacity: 0.7 !important;\n}\n#sbz92 .widget-preview--content {\n cursor: pointer !important;\n flex: 1 !important;\n overflow: hidden !important;\n}\n#sbz92 .widget-preview--message {\n white-space: pre-wrap !important;\n word-wrap: break-word !important;\n font-weight: 500 !important;\n font-size: 16px !important;\n display: block !important;\n margin: 0 !important;\n margin-bottom: 0px !important;\n max-height: 78px !important;\n overflow: hidden !important;\n}\n#sbz92 .widget-preview--action {\n border-top: 1px solid #f0f0f0 !important;\n cursor: pointer !important;\n padding: 13px !important;\n}\n#sbz92 .widget-preview--action-text {\n display: block !important;\n text-align: center !important;\n font-weight: 500 !important;\n font-size: 16px !important;\n color: '@primary_color' !important;\n -webkit-text-fill-color: '@primary_color' !important;\n margin: 0 !important;\n}\n#sbz92 .widget-internet-status {\n position: absolute !important;\n bottom: 0 !important;\n left: 0 !important;\n width: 100% !important;\n font-size: 14px !important;\n z-index: 10 !important;\n text-align: center !important;\n padding: 6px 5px !important;\n}\n#sbz92 .widget-internet-status.negative {\n background-color: #212325 !important;\n color: #fff !important;\n}\n#sbz92 .widget-internet-status.positive {\n background-color: #19b600 !important;\n color: #fff !important;\n}\n#sbz92 .widget-preview-text-message--header {\n display: flex !important;\n overflow: hidden !important;\n align-items: center !important;\n width: 100% !important;\n}\n#sbz92 .widget-preview-text-message--header .widget-preview--avatar {\n width: 24px !important;\n height: 24px !important;\n flex-shrink: 0 !important;\n margin-right: 10px !important;\n}\n#sbz92 .widget-preview-text-message--author {\n flex: 1 !important;\n overflow: hidden !important;\n display: flex !important;\n align-items: center !important;\n}\n#sbz92 .widget-preview-text-message--author .badge {\n margin-left: 10px !important;\n}\n#sbz92 .widget-preview-text-message--author-text {\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n line-height: 1.5 !important;\n color: '@secondary_color' !important;\n -webkit-text-fill-color: '@secondary_color' !important;\n}\n#sbz92 .widget-preview-text-message--content {\n margin-top: 10px !important;\n white-space: pre-wrap !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper {\n z-index: '@z_index_3' !important;\n width: 100% !important;\n margin-bottom: 15px !important;\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper.right {\n align-items: flex-end !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper.horizontal {\n flex-direction: row !important;\n flex-wrap: wrap !important;\n align-items: center !important;\n gap: 10px !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper.horizontal.right {\n justify-content: flex-end !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper.horizontal.left {\n justify-content: flex-start !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper.horizontal .widget-preview-quick-reply-item {\n margin: 0 !important;\n max-width: 200px !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n padding: 6px 15px !important;\n}\n#sbz92 .widget-preview-quick-reply-wrapper.horizontal .widget-preview-quick-reply-item:last-child {\n margin-bottom: 0 !important;\n}\n#sbz92 .widget-preview-quick-reply-item {\n border-radius: 20px !important;\n padding: 8px 20px !important;\n background: #fff !important;\n border: 1.5px solid !important;\n border-color: '@primary_color' !important;\n color: '@primary_color' !important;\n -webkit-text-fill-color: '@primary_color' !important;\n margin-bottom: 15px !important;\n cursor: pointer !important;\n transition: 0.3s ease !important;\n position: relative !important;\n}\n#sbz92 .widget-preview-quick-reply-item:last-child {\n margin-bottom: 0 !important;\n}\n#sbz92 .widget-preview-quick-reply-item:hover {\n color: #fff !important;\n -webkit-text-fill-color: #fff !important;\n background-color: '@primary_color' !important;\n}\n#sbz92 .widget-preview-image-wrapper {\n z-index: '@z_index_3' !important;\n width: 100% !important;\n margin-bottom: 15px !important;\n display: flex !important;\n flex-direction: column !important;\n align-items: flex-start !important;\n}\n#sbz92 .widget-preview-image-wrapper.right {\n align-items: flex-end !important;\n}\n#sbz92 .widget-preview-image-item {\n max-width: 300px !important;\n border-radius: 15px !important;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15) !important;\n border: 1px solid #dee2e6 !important;\n overflow: hidden !important;\n cursor: pointer !important;\n}\n#sbz92 .widget-preview-image-item img {\n width: 100% !important;\n max-height: 300px !important;\n object-fit: cover !important;\n}\n#sbz92 .widget-preview-text-message {\n z-index: '@z_index_3' !important;\n background: #fff !important;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15) !important;\n border: 1px solid #dee2e6 !important;\n border-radius: 15px !important;\n max-width: 100% !important;\n min-width: 210px !important;\n margin-bottom: 15px !important;\n padding: 15px 20px !important;\n positive: relative !important;\n cursor: pointer !important;\n}\n#sbz92 .widget-preview-text-message.right {\n border-bottom-right-radius: 8px !important;\n}\n#sbz92 .widget-preview-text-message.left {\n border-bottom-left-radius: 8px !important;\n}\n#sbz92 .widget-preview-new-wrapper {\n max-width: '@preview_max_width' !important;\n position: relative !important;\n opacity: 1 !important;\n transition: opacity 0.15s ease-in, transform 0.15s ease-in !important;\n transform: translateY(0) !important;\n}\n#sbz92 .widget-preview-new-wrapper.hidden {\n transform: translateY(20px) !important;\n transition: opacity 0.15s ease-out, transform 0.15s ease-out !important;\n opacity: 0 !important;\n}\n#sbz92 .widget-preview-new-wrapper:hover .widget-preview-x-wrapper {\n display: flex !important;\n}\n#sbz92 .widget-preview-x-wrapper {\n display: none !important;\n justify-content: flex-start !important;\n width: calc(100% + 40px) !important;\n position: absolute !important;\n padding: 15px 20px !important;\n left: -20px !important;\n bottom: 100% !important;\n}\n#sbz92 .widget-preview-x-wrapper.mobile {\n display: flex !important;\n}\n#sbz92 .widget-preview-x-wrapper.right {\n justify-content: flex-end !important;\n left: unset !important;\n right: -20px !important;\n}\n#sbz92 .widget-preview-x-wrapper .widget-preview--btn-close {\n opacity: 1 !important;\n width: 32px !important;\n height: 32px !important;\n border: 1px solid #ececec !important;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15) !important;\n background-color: #00000040 !important;\n background-size: 16px 16px !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNlY2VjZWMiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXIteCI+PGxpbmUgeDE9IjE4IiB5MT0iNiIgeDI9IjYiIHkyPSIxOCI+PC9saW5lPjxsaW5lIHgxPSI2IiB5MT0iNiIgeDI9IjE4IiB5Mj0iMTgiPjwvbGluZT48L3N2Zz4K') !important;\n}\n#sbz92 .widget-preview-x-wrapper .widget-preview--btn-close:hover {\n border-color: #fff !important;\n background-color: #00000066 !important;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXIteCI+PGxpbmUgeDE9IjE4IiB5MT0iNiIgeDI9IjYiIHkyPSIxOCI+PC9saW5lPjxsaW5lIHgxPSI2IiB5MT0iNiIgeDI9IjE4IiB5Mj0iMTgiPjwvbGluZT48L3N2Zz4K') !important;\n}\n#sbz92 .rating--overlay {\n position: absolute !important;\n height: 100% !important;\n width: 100% !important;\n background: black !important;\n opacity: 0.3 !important;\n top: 0 !important;\n left: 0 !important;\n border-bottom-left-radius: 15px !important;\n border-bottom-right-radius: 15px !important;\n z-index: 9 !important;\n}\n#sbz92 .rating {\n border-top-left-radius: 10px !important;\n border-top-right-radius: 10px !important;\n overflow: hidden !important;\n position: absolute !important;\n height: 400px !important;\n max-height: 80% !important;\n width: 100% !important;\n bottom: 0 !important;\n /* centering */\n left: 0 !important;\n background: white !important;\n border-bottom-left-radius: 15px !important;\n border-bottom-right-radius: 15px !important;\n z-index: 10 !important;\n}\n#sbz92 .rating .rating--comment {\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n resize: none !important;\n margin-left: 20px !important;\n margin-right: 20px !important;\n border: 2px solid lightgray !important;\n border-radius: 5px !important;\n padding: 10px !important;\n height: 60px !important;\n min-height: 60px !important;\n}\n#sbz92 .rating .rating--close-btn {\n right: 20px !important;\n top: -2px !important;\n width: 22px !important;\n height: 22px !important;\n position: absolute !important;\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23acacac%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-x%22%3E%3Cline%20x1%3D%2218%22%20y1%3D%226%22%20x2%3D%226%22%20y2%3D%2218%22%3E%3C/line%3E%3Cline%20x1%3D%226%22%20y1%3D%226%22%20x2%3D%2218%22%20y2%3D%2218%22%3E%3C/line%3E%3C/svg%3E') !important;\n cursor: pointer !important;\n}\n#sbz92 .rating .rating--close-btn:hover {\n background-image: url('data:image/svg+xml,%3C?xml%20version%3D%221.0%22%20?%3E%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23a0a0a0%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-x%22%3E%3Cline%20x1%3D%2218%22%20y1%3D%226%22%20x2%3D%226%22%20y2%3D%2218%22%3E%3C/line%3E%3Cline%20x1%3D%226%22%20y1%3D%226%22%20x2%3D%2218%22%20y2%3D%2218%22%3E%3C/line%3E%3C/svg%3E') !important;\n}\n#sbz92 .rating .rating--handle:hover .rating--thumb {\n background: #e0e0e0 !important;\n}\n#sbz92 .rating .rating--thumb {\n width: 70px !important;\n height: 6px !important;\n background: #eaeaea !important;\n border-radius: 5px !important;\n margin: 0 auto !important;\n cursor: grabbing !important;\n margin-top: 8px !important;\n margin-bottom: 20px !important;\n}\n#sbz92 .rating .rating--content {\n display: flex !important;\n flex: 1 !important;\n flex-grow: 1 !important;\n height: calc(100% - 40px) !important;\n flex-direction: column !important;\n justify-content: space-between !important;\n}\n#sbz92 .rating .rating--heading {\n margin: 0 !important;\n font-weight: 500 !important;\n font-size: 20px !important;\n line-height: 20px !important;\n text-align: center !important;\n flex-grow: 1 !important;\n position: relative !important;\n}\n#sbz92 .rating .rating--description {\n text-align: center !important;\n flex-grow: 1 !important;\n font-size: 15px !important;\n padding-left: 20px !important;\n padding-right: 20px !important;\n display: flex !important;\n align-items: center !important;\n margin-top: 10px !important;\n margin-bottom: 15px !important;\n}\n#sbz92 .rating .rating-faces-container {\n flex: 5 !important;\n display: flex !important;\n justify-content: space-around !important;\n align-items: center !important;\n margin: 10px 10px !important;\n}\n#sbz92 .rating .rating-face-container {\n padding: 15px !important;\n display: flex !important;\n flex-direction: column !important;\n align-items: center !important;\n cursor: pointer !important;\n border-radius: 10px !important;\n user-select: none !important;\n -webkit-transition: all 0.1s !important;\n transition: all 0.1s !important;\n}\n#sbz92 .rating .rating-face-container:hover {\n box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1) !important;\n}\n#sbz92 .rating .rating-face--text {\n margin-top: 10px !important;\n margin-bottom: 0px !important;\n font-size: 13px !important;\n color: #4d4d4d !important;\n -webkit-text-fill-color: #4d4d4d !important;\n}\n#sbz92 .rating .rating-no-thanks {\n flex: 10 !important;\n text-align: center !important;\n cursor: pointer !important;\n display: flex !important;\n justify-content: center !important;\n align-items: flex-end !important;\n color: #acacac !important;\n -webkit-text-fill-color: #acacac !important;\n}\n#sbz92 .rating .rating-no-thanks:hover {\n color: black !important;\n -webkit-text-fill-color: black !important;\n}\n#sbz92 .text__danger {\n color: #dc3545 !important;\n}\n#sbz92 .extension--close-btn {\n background: #00000088 !important;\n border-radius: 8px !important;\n color: #ffffffaa !important;\n -webkit-text-fill-color: #ffffffaa !important;\n right: 10px !important;\n top: -35px !important;\n font-size: 14px !important;\n position: absolute !important;\n padding: 5px 15px !important;\n cursor: pointer !important;\n}\n#sbz92 .extension--close-btn:hover {\n background: #000000 !important;\n color: #ffffff !important;\n -webkit-text-fill-color: #ffffff !important;\n}\n#sbz92 .extension--handle {\n margin-bottom: 10px !important;\n}\n#sbz92 .extension--handle:hover .extension--thumb {\n background: #e0e0e0 !important;\n}\n#sbz92 .extension--thumb {\n width: 70px !important;\n cursor: grabbing !important;\n margin: 0 auto !important;\n height: 6px !important;\n background: #eaeaea !important;\n border-radius: 5px !important;\n flex: 1 !important;\n margin-top: 5px !important;\n}\n#sbz92 .extension {\n border-top-left-radius: 10px !important;\n position: absolute !important;\n border-top-right-radius: 10px !important;\n width: 100% !important;\n bottom: 0 !important;\n /* centering */\n left: 0 !important;\n border-bottom-left-radius: 15px !important;\n border-bottom-right-radius: 15px !important;\n display: flex !important;\n flex-direction: column !important;\n background: white !important;\n z-index: 10 !important;\n}\n#sbz92 .extension--overlay {\n position: absolute !important;\n height: 100% !important;\n width: 100% !important;\n background: black !important;\n opacity: 0.3 !important;\n top: 0 !important;\n left: 0 !important;\n border-bottom-left-radius: 15px !important;\n border-bottom-right-radius: 15px !important;\n z-index: 9 !important;\n}\n#sbz92 .order__footer {\n margin-top: 40px !important;\n color: #888 !important;\n -webkit-text-fill-color: #888 !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n margin-bottom: 20px !important;\n}\n#sbz92 .order__footer_delimiter {\n width: 1px !important;\n height: 15px !important;\n border-right: 1px solid #bbb !important;\n}\n#sbz92 .order__footer_link {\n padding: 0 10px !important;\n font-size: 14px !important;\n cursor: pointer !important;\n}\n#sbz92 .order__footer_link:hover {\n text-decoration: none !important;\n color: #555 !important;\n -webkit-text-fill-color: #555 !important;\n}\n#sbz92 .desktop.order {\n border-radius: 0 !important;\n width: 780px !important;\n margin: 0 auto !important;\n height: 100% !important;\n}\n#sbz92 .desktop.order .order_section__line {\n display: none !important;\n}\n#sbz92 .desktop.order .desktop_order__heading {\n line-height: 20px !important;\n}\n#sbz92 .desktop.order .order_attachment__product_img {\n width: 50px !important;\n height: 50px !important;\n}\n#sbz92 .desktop.order .order_label {\n font-weight: 500 !important;\n margin-top: 30px !important;\n margin-bottom: 10px !important;\n font-size: 16px !important;\n}\n#sbz92 .desktop.order .order_label:first-child {\n margin-top: 0 !important;\n}\n#sbz92 .desktop.order .order_recap {\n margin-top: 0px !important;\n background: #f4f4f4 !important;\n margin-top: 20px !important;\n width: 270px !important;\n box-shadow: 0 0 0 1px hsla(0, 0%, 69%, 0.2), 0 15px 35px 0 rgba(49, 49, 93, 0.08), 0 5px 15px 0 rgba(0, 0, 0, 0.06) !important;\n border-radius: 6px !important;\n background-color: #fff !important;\n padding: 32px 32px 20px !important;\n}\n#sbz92 .desktop.order .order_acc_header {\n display: flex !important;\n align-items: center !important;\n margin-top: 20px !important;\n}\n#sbz92 .desktop.order .order_acc_logo {\n height: 50px !important;\n}\n#sbz92 .desktop.order .order_acc_name {\n font-size: 16px !important;\n margin-left: 10px !important;\n border-left: 1px solid #aaa !important;\n padding-left: 10px !important;\n}\n#sbz92 .desktop.order .order_summary_line {\n align-items: center !important;\n overflow: hidden !important;\n padding: 5px 0 !important;\n display: flex !important;\n justify-content: space-between !important;\n}\n#sbz92 .desktop_order__content {\n display: flex !important;\n}\n#sbz92 .order {\n width: 100% !important;\n display: flex !important;\n flex-direction: column !important;\n background: white !important;\n z-index: 10 !important;\n}\n#sbz92 .order .ship_card {\n display: flex !important;\n align-items: center !important;\n overflow: hidden !important;\n width: 190px !important;\n cursor: pointer !important;\n padding: 10px 15px !important;\n box-shadow: none !important;\n border: 2px solid #eee !important;\n color: #777 !important;\n -webkit-text-fill-color: #777 !important;\n margin-top: 5px !important;\n border-radius: 8px !important;\n background: white !important;\n transition: all 150ms ease-out !important;\n}\n#sbz92 .order .ship_card:hover {\n color: #555 !important;\n -webkit-text-fill-color: #555 !important;\n border: 2px solid #aaa !important;\n}\n#sbz92 .order .ship_card.ship_card__active {\n color: #333 !important;\n -webkit-text-fill-color: #333 !important;\n border: 2px solid #777 !important;\n background: #fafafa !important;\n}\n#sbz92 .order .order_ship_icon {\n margin-top: -3px !important;\n width: 15px !important;\n height: 15px !important;\n opacity: 0.6 !important;\n}\n#sbz92 .order .card_section {\n margin-top: 20px !important;\n max-width: 500px !important;\n box-shadow: 0 0 0 1px hsla(0, 0%, 69%, 0.2), 0 15px 35px 0 rgba(49, 49, 93, 0.08), 0 5px 15px 0 rgba(0, 0, 0, 0.06) !important;\n border-radius: 6px !important;\n background-color: #fff !important;\n padding: 32px !important;\n}\n#sbz92 .order input[type='text'].form-control,\n#sbz92 .order input[type='number'].form-control,\n#sbz92 .order input[type='date'].form-control,\n#sbz92 .order textarea.form-control,\n#sbz92 .order select.form-control {\n background: #f4f4f4 !important;\n border: 1px solid transparent !important;\n padding: 7px 10px !important;\n}\n#sbz92 .order input[type='text'].form-control:hover,\n#sbz92 .order input[type='number'].form-control:hover,\n#sbz92 .order input[type='date'].form-control:hover,\n#sbz92 .order textarea.form-control:hover,\n#sbz92 .order select.form-control:hover {\n background: #f0f0f0 !important;\n}\n#sbz92 .order input[type='text'].form-control:focus,\n#sbz92 .order input[type='number'].form-control:focus,\n#sbz92 .order input[type='date'].form-control:focus,\n#sbz92 .order textarea.form-control:focus,\n#sbz92 .order select.form-control:focus,\n#sbz92 .order input[type='text'].form-control:active,\n#sbz92 .order input[type='number'].form-control:active,\n#sbz92 .order input[type='date'].form-control:active,\n#sbz92 .order textarea.form-control:active,\n#sbz92 .order select.form-control:active {\n background: #eee !important;\n}\n#sbz92 .order input[type='text'].form-control.err,\n#sbz92 .order input[type='number'].form-control.err,\n#sbz92 .order input[type='date'].form-control.err,\n#sbz92 .order textarea.form-control.err,\n#sbz92 .order select.form-control.err {\n background: #ffe6e6 !important;\n border: 1px solid #ff8a8a !important;\n}\n#sbz92 .order .form {\n box-shadow: none !important;\n border: none !important;\n padding: 0 !important;\n}\n#sbz92 .order .form .radio {\n height: unset !important;\n}\n#sbz92 .order .order--content {\n display: flex !important;\n flex: 1 !important;\n flex-direction: column !important;\n}\n#sbz92 .order .order--content-content {\n flex: 1 !important;\n overflow: auto !important;\n}\n#sbz92 .order .order--heading {\n margin: 0 !important;\n margin-top: 20px !important;\n padding-left: 20px !important;\n padding-right: 20px !important;\n padding-bottom: 8px !important;\n line-height: 20px !important;\n position: relative !important;\n}\n#sbz92 .order .order--header-desc {\n color: #6c757d !important;\n -webkit-text-fill-color: #6c757d !important;\n font-size: 13px !important;\n}\n#sbz92 .order .order__product_line {\n display: flex !important;\n overflow: hidden !important;\n}\n#sbz92 .order .order--footer {\n text-align: k center !important;\n cursor: pointer !important;\n display: flex !important;\n justify-content: center !important;\n align-items: flex-end !important;\n color: #acacac !important;\n -webkit-text-fill-color: #acacac !important;\n}\n#sbz92 .order .order--footer:hover {\n color: black !important;\n -webkit-text-fill-color: black !important;\n}\n#sbz92 .order .order_section_label {\n color: #444 !important;\n -webkit-text-fill-color: #444 !important;\n margin-bottom: 5px !important;\n text-transform: uppercase !important;\n font-size: 13px !important;\n font-weight: 500 !important;\n}\n#sbz92 .order .order_label {\n color: #444 !important;\n -webkit-text-fill-color: #444 !important;\n margin-bottom: 5px !important;\n text-transform: uppercase !important;\n font-size: 13px !important;\n font-weight: 500 !important;\n}\n#sbz92 .order .order_section {\n padding-left: 20px !important;\n padding-right: 20px !important;\n padding-bottom: 15px !important;\n padding-top: 15px !important;\n}\n#sbz92 .order .order_section__line {\n border-top: 4px solid #eee !important;\n width: 100% !important;\n}\n#sbz92 .order .order_summary_line {\n overflow: hidden !important;\n padding: 3px 0 !important;\n display: flex !important;\n justify-content: space-between !important;\n}\n#sbz92 .order .order_btn {\n width: 100% !important;\n}\n#sbz92 .order .order_tracking_link {\n text-decoration: underline !important;\n cursor: pointer !important;\n}\n#sbz92 .order .order_tracking_link:hover {\n color: '@primary_color' !important;\n -webkit-text-fill-color: '@primary_color' !important;\n}\n#sbz92 .order .order_tracking_link_icon {\n margin-top: -3px !important;\n width: 15px !important;\n height: 15px !important;\n}\n#sbz92 .order .order_shipping_provider_logo {\n width: 32px !important;\n height: 32px !important;\n margin-right: 10px !important;\n}\n#sbz92 .order .order_btn.order__btn__light {\n background: #f0f0f0 !important;\n color: black !important;\n -webkit-text-fill-color: black !important;\n border-radius: 6px !important;\n text-align: center !important;\n padding: 8px !important;\n cursor: pointer !important;\n}\n#sbz92 .order .order_btn.order__btn__light:hover {\n color: black !important;\n -webkit-text-fill-color: black !important;\n background: #ddd !important;\n}\n#sbz92 div.order__card {\n display: flex !important;\n padding: 15px !important;\n box-shadow: none !important;\n border: 2px solid #eee !important;\n margin-top: 10px !important;\n border-radius: 8px !important;\n background: #fafafa !important;\n}\n#sbz92 div.order__card.order__card__active {\n border: 2px solid #777 !important;\n background: white !important;\n}\n#sbz92 .order_form_label {\n margin-top: 10px !important;\n margin-bottom: 4px !important;\n}\n#sbz92 .btn-confirm-order {\n width: 100% !important;\n background: '@primary_color' !important;\n display: flex !important;\n align-items: center !important;\n border-radius: 5px !important;\n color: #fff !important;\n -webkit-text-fill-color: #fff !important;\n padding: 15px 10px !important;\n cursor: pointer !important;\n justify-content: center !important;\n font-weight: 500 !important;\n margin-top: 10px !important;\n}\n#sbz92 .btn-confirm-order:hover {\n background: #0053d4 !important;\n}\n#sbz92 .order__total {\n font-weight: 500 !important;\n font-size: 20px !important;\n color: '@primary_color' !important;\n -webkit-text-fill-color: '@primary_color' !important;\n}\n#sbz92 .btn-cancel-order {\n color: #666 !important;\n -webkit-text-fill-color: #666 !important;\n text-decoration: underline !important;\n display: inline-block !important;\n margin-top: 10px !important;\n cursor: pointer !important;\n}\n#sbz92 .btn-cancel-order:hover {\n color: #333 !important;\n -webkit-text-fill-color: #333 !important;\n}\n#sbz92 .order_status {\n text-transform: uppercase !important;\n background: black !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n display: inline-block !important;\n border-radius: 4px !important;\n padding: 6px 6px 4px 6px !important;\n line-height: 1 !important;\n font-weight: 500 !important;\n font-size: 12px !important;\n}\n#sbz92 .order_status.order_status__canceled {\n background: whitesmoke !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n}\n#sbz92 .order_status.order_status__cancel {\n background: whitesmoke !important;\n color: #000 !important;\n -webkit-text-fill-color: #000 !important;\n}\n#sbz92 .order_status.order_status__confirmed {\n background: '@primary_color' !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n}\n#sbz92 .order_status.order_status__shipping {\n background: #000 !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n}\n#sbz92 .order_status.order_status__fullfilled {\n background: #28a745 !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n}\n#sbz92 .order_status.order_status__hold {\n background: #dc3545 !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n}\n#sbz92 .order_status.order_status__draft {\n background: #ffc107 !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n}\n#sbz92 .order_status.order_status__open {\n background: #ffc107 !important;\n color: white !important;\n -webkit-text-fill-color: white !important;\n}\n#sbz92 .order_error {\n display: flex !important;\n flex-direction: column !important;\n align-items: center !important;\n justify-content: center !important;\n height: 100% !important;\n width: 100% !important;\n}\n#sbz92 .order_attachment__note {\n font-size: 14px !important;\n white-space: pre-wrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n display: -webkit-box !important;\n -webkit-line-clamp: 3 !important;\n -webkit-box-orient: vertical !important;\n}\n#sbz92 .dropdown_select {\n position: absolute !important;\n background: white !important;\n -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;\n border-radius: 5px !important;\n width: 150px !important;\n z-index: 20 !important;\n overflow: hidden !important;\n}\n#sbz92 .dropdown_select__overlay {\n top: 0 !important;\n overflow: hidden !important;\n position: absolute !important;\n background: #000000aa !important;\n z-index: 19 !important;\n left: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n}\n#sbz92 .dropdown_select__item {\n padding: 7px 10px !important;\n cursor: pointer !important;\n}\n#sbz92 .dropdown_select__item:hover {\n background: '@primary_color' !important;\n color: #fff !important;\n -webkit-text-fill-color: #fff !important;\n}\n#sbz92 .dropdown_select_filter {\n padding: 8px 10px !important;\n border-bottom: 1px solid #eee !important;\n position: relative !important;\n}\n#sbz92 .dropdown_select_filter:hover .dropdown_select_filter__icon {\n opacity: 1 !important;\n}\n#sbz92 .dropdown_select_filter_input {\n border-radius: 5px !important;\n width: 100% !important;\n display: block !important;\n background: #f4f4f4 !important;\n border: none !important;\n padding: 7px 10px !important;\n padding-left: 35px !important;\n}\n#sbz92 .dropdown_select_filter_input:hover {\n background: #f0f0f0 !important;\n}\n#sbz92 .dropdown_select_filter_input:focus,\n#sbz92 .dropdown_select_filter_input:active {\n background: #eee !important;\n}\n#sbz92 .dropdown_select_input {\n border-radius: 5px !important;\n overflow: hidden !important;\n cursor: pointer !important;\n flex-wrap: nowrap !important;\n display: flex !important;\n background: #f4f4f4 !important;\n border: 1px solid trasparent !important;\n padding: 7px 10px !important;\n height: 32px !important;\n min-width: 120px !important;\n width: 100% !important;\n}\n#sbz92 .dropdown_select_input:hover {\n background: #f0f0f0 !important;\n}\n#sbz92 .dropdown_select_input:focus,\n#sbz92 .dropdown_select_input:active {\n background: #eee !important;\n}\n#sbz92 .dropdown_select_input.err {\n background: #ffe6e6 !important;\n border: 1px solid #ff8a8a !important;\n}\n#sbz92 .dropdown_select__items {\n max-height: 300px !important;\n min-height: 100px !important;\n overflow-x: hidden !important;\n overflow-y: auto !important;\n}\n#sbz92 .dropdown_select_filter__icon {\n width: 22px !important;\n height: 15px !important;\n position: absolute !important;\n z-index: 2 !important;\n top: 15px !important;\n left: 18px !important;\n border-right: 1px solid #aaa !important;\n padding-right: 7px !important;\n opacity: 0.5 !important;\n}\n#sbz92 .dropdown_select_filter__empty {\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n flex-direction: column !important;\n}\n#sbz92 .dropdown_select_filter__empty_img {\n height: 50px !important;\n margin-top: 10px !important;\n margin-bottom: 10px !important;\n}\n#sbz92 .dropdown_select__caret {\n width: 14px !important;\n margin-top: 3px !important;\n opacity: 0.6 !important;\n height: 15px !important;\n}\ndiv#sbz92 {\n all: initial;\n}\nbody div#sbz92 {\n all: initial !important;\n}\n",""]);const It=et},6314(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n}).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var p=[].concat(t[a]);i&&r[p[0]]||(n&&(p[2]?p[2]="".concat(n," and ").concat(p[2]):p[2]=n),e.push(p))}},e}},4417(t){"use strict";t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},1108(t,e,n){t.exports=n.p+"assets/img/bubble_default.7d5e4ab.svg"},1370(t,e,n){t.exports=n.p+"assets/img/convos_empty.2353007.svg"},2876(t,e,n){t.exports=n.p+"assets/img/default.06e6ee0.jpg"},2538(t,e,n){t.exports=n.p+"assets/img/default_avatar.e449b04.png"},3763(t,e,n){t.exports=n.p+"assets/img/default_logo.dd13a2b.svg"},9150(t,e,n){t.exports=n.p+"assets/img/done_gray.d7e8203.svg"},6120(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_23.529_58.824.d5faf14.png"},8268(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_23.529_60.784.1420241.png"},7698(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_25.490_0.000.1e6b2c0.png"},3970(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_25.490_45.098.3dfbc08.png"},9521(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_25.490_5.882.4b49e94.png"},8362(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_27.451_72.549.7114f58.png"},6501(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_27.451_84.314.231e2b7.png"},4865(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_27.451_96.078.ddbb008.png"},7435(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_29.412_5.882.61f3359.png"},2338(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_100.000.6df72bc.png"},4777(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_45.098.3d7a7ad.png"},9658(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_47.059.0f4d6e2.png"},7987(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_54.902.65724c1.png"},1196(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_64.706.9da3cba.png"},3284(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_72.549.edca5cf.png"},8226(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_78.431.f910f2a.png"},2729(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_58.824_88.235.def4e71.png"},1389(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_60.784_11.765.49c03d0.png"},2420(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_60.784_27.451.46b54e5.png"},4681(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_60.784_29.412.e36d284.png"},6129(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_60.784_3.922.bb191b0.png"},102(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_60.784_35.294.af7b927.png"},5007(t,e,n){t.exports=n.p+"assets/img/emoji/messenger/sub_60.784_7.843.98f2a99.png"},9419(t,e,n){t.exports=n.p+"assets/img/empty.29bed2d.svg"},3266(t,e,n){t.exports=n.p+"assets/img/external-link.90577cc.svg"},3582(t,e,n){t.exports=n.p+"assets/img/image_default.be0698b.png"},6973(t,e,n){t.exports=n.p+"assets/img/loading_static.a27f0ac.svg"},7134(t,e,n){t.exports=n.p+"assets/img/rating--average.1ea492c.svg"},940(t,e,n){t.exports=n.p+"assets/img/rating--great.e3d712e.svg"},9801(t,e,n){t.exports=n.p+"assets/img/rating--poor.2938a25.svg"},8506(t,e,n){t.exports=n.p+"assets/img/send.6db52a9.svg"},5457(t,e,n){t.exports=n.p+"assets/img/stars_v2.79cf728.png"},9529(t,e,n){t.exports=n.p+"assets/img/subiz-mono.8fbc067.svg"},172(t,e,n){"use strict";n.d(e,{FK:()=>_,XX:()=>W,_3:()=>v,h:()=>b,uA:()=>y});var i,r,o,s,a,p,l,c={},d=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function u(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,n){var r,o,s,a={};for(s in e)"key"==s?r=e[s]:"ref"==s?o=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return f(t,a,r,o,null)}function f(t,e,n,i,s){var a={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++o:s,__i:-1,__u:0};return null==s&&null!=r.vnode&&r.vnode(a),a}function v(){return{current:null}}function _(t){return t.children}function y(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function k(t){(!t.__d&&(t.__d=!0)&&s.push(t)&&!A.__r++||a!==r.debounceRendering)&&((a=r.debounceRendering)||p)(A)}function A(){var t,e,n,i,o,a,p,c,d;for(s.sort(l);t=s.shift();)t.__d&&(e=s.length,i=void 0,a=(o=(n=t).__v).__e,c=[],d=[],(p=n.__P)&&((i=u({},o)).__v=o.__v+1,r.vnode&&r.vnode(i),E(p,i,o,n.__n,void 0!==p.ownerSVGElement,32&o.__u?[a]:null,c,null==a?x(o):a,!!(32&o.__u),d),i.__.__k[i.__i]=i,L(c,i,d),i.__e!=a&&w(i)),s.length>e&&s.sort(l));A.__r=0}function z(t,e,n,i,r,o,s,a,p,l,m){var h,u,g,b,f,v=i&&i.__k||d,_=e.length;for(n.__d=p,I(n,e,v),p=n.__d,h=0;h<_;h++)null!=(g=n.__k[h])&&"boolean"!=typeof g&&"function"!=typeof g&&(u=-1===g.__i?c:v[g.__i]||c,g.__i=h,E(t,g,u,r,o,s,a,p,l,m),b=g.__e,g.ref&&u.ref!=g.ref&&(u.ref&&N(u.ref,null,g),m.push(g.ref,g.__c||b,g)),null==f&&null!=b&&(f=b),65536&g.__u||u.__k===g.__k?p=C(g,p,t):"function"==typeof g.type&&void 0!==g.__d?p=g.__d:b&&(p=b.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=p,n.__e=f}function I(t,e,n){var i,r,o,s,a,p=e.length,l=n.length,c=l,d=0;for(t.__k=[],i=0;i<p;i++)null!=(r=t.__k[i]=null==(r=e[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?f(null,r,null,null,r):h(r)?f(_,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?f(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=t,r.__b=t.__b+1,a=M(r,n,s=i+d,c),r.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?d++:a>s?c>p-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==i+d&&(r.__u|=65536))):(o=n[i])&&null==o.key&&o.__e&&(o.__e==t.__d&&(t.__d=x(o)),R(o,o,!1),n[i]=null,c--);if(c)for(i=0;i<l;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),R(o,o))}function C(t,e,n){var i,r;if("function"==typeof t.type){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=C(i[r],e,n));return e}return t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e),e&&e.nextSibling}function M(t,e,n,i){var r=t.key,o=t.type,s=n-1,a=n+1,p=e[n];if(null===p||p&&r==p.key&&o===p.type)return n;if(i>(null==p||131072&p.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((p=e[s])&&!(131072&p.__u)&&r==p.key&&o===p.type)return s;s--}if(a<e.length){if((p=e[a])&&!(131072&p.__u)&&r==p.key&&o===p.type)return a;a++}}return-1}function S(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||m.test(e)?n:n+"px"}function D(t,e,n,i,r){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||S(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||S(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=Date.now(),t.addEventListener(e,o?T:j,o)):t.removeEventListener(e,o?T:j,o);else{if(r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function j(t){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(r.event?r.event(t):t)}function T(t){return this.l[t.type+!0](r.event?r.event(t):t)}function E(t,e,n,i,o,s,a,p,l,c){var d,m,g,b,f,v,x,w,k,A,I,C,M,S,D,j=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),s=[p=e.__e=n.__e]),(d=r.__b)&&d(e);t:if("function"==typeof j)try{if(w=e.props,k=(d=j.contextType)&&i[d.__c],A=d?k?k.props.value:d.__:i,n.__c?x=(m=e.__c=n.__c).__=m.__E:("prototype"in j&&j.prototype.render?e.__c=m=new j(w,A):(e.__c=m=new y(w,A),m.constructor=j,m.render=U),k&&k.sub(m),m.props=w,m.state||(m.state={}),m.context=A,m.__n=i,g=m.__d=!0,m.__h=[],m._sb=[]),null==m.__s&&(m.__s=m.state),null!=j.getDerivedStateFromProps&&(m.__s==m.state&&(m.__s=u({},m.__s)),u(m.__s,j.getDerivedStateFromProps(w,m.__s))),b=m.props,f=m.state,m.__v=e,g)null==j.getDerivedStateFromProps&&null!=m.componentWillMount&&m.componentWillMount(),null!=m.componentDidMount&&m.__h.push(m.componentDidMount);else{if(null==j.getDerivedStateFromProps&&w!==b&&null!=m.componentWillReceiveProps&&m.componentWillReceiveProps(w,A),!m.__e&&(null!=m.shouldComponentUpdate&&!1===m.shouldComponentUpdate(w,m.__s,A)||e.__v===n.__v)){for(e.__v!==n.__v&&(m.props=w,m.state=m.__s,m.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(t){t&&(t.__=e)}),I=0;I<m._sb.length;I++)m.__h.push(m._sb[I]);m._sb=[],m.__h.length&&a.push(m);break t}null!=m.componentWillUpdate&&m.componentWillUpdate(w,m.__s,A),null!=m.componentDidUpdate&&m.__h.push(function(){m.componentDidUpdate(b,f,v)})}if(m.context=A,m.props=w,m.__P=t,m.__e=!1,C=r.__r,M=0,"prototype"in j&&j.prototype.render){for(m.state=m.__s,m.__d=!1,C&&C(e),d=m.render(m.props,m.state,m.context),S=0;S<m._sb.length;S++)m.__h.push(m._sb[S]);m._sb=[]}else do{m.__d=!1,C&&C(e),d=m.render(m.props,m.state,m.context),m.state=m.__s}while(m.__d&&++M<25);m.state=m.__s,null!=m.getChildContext&&(i=u(u({},i),m.getChildContext())),g||null==m.getSnapshotBeforeUpdate||(v=m.getSnapshotBeforeUpdate(b,f)),z(t,h(D=null!=d&&d.type===_&&null==d.key?d.props.children:d)?D:[D],e,n,i,o,s,a,p,l,c),m.base=e.__e,e.__u&=-161,m.__h.length&&a.push(m),x&&(m.__E=m.__=null)}catch(t){e.__v=null,l||null!=s?(e.__e=p,e.__u|=l?160:32,s[s.indexOf(p)]=null):(e.__e=n.__e,e.__k=n.__k),r.__e(t,e,n)}else null==s&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=P(n.__e,e,n,i,o,s,a,l,c);(d=r.diffed)&&d(e)}function L(t,e,n){e.__d=void 0;for(var i=0;i<n.length;i++)N(n[i],n[++i],n[++i]);r.__c&&r.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){r.__e(t,e.__v)}})}function P(t,e,n,r,o,s,a,p,l){var d,m,u,b,f,v,_,y=n.props,w=e.props,k=e.type;if("svg"===k&&(o=!0),null!=s)for(d=0;d<s.length;d++)if((f=s[d])&&"setAttribute"in f==!!k&&(k?f.localName===k:3===f.nodeType)){t=f,s[d]=null;break}if(null==t){if(null===k)return document.createTextNode(w);t=o?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,w.is&&w),s=null,p=!1}if(null===k)y===w||p&&t.data===w||(t.data=w);else{if(s=s&&i.call(t.childNodes),y=n.props||c,!p&&null!=s)for(y={},d=0;d<t.attributes.length;d++)y[(f=t.attributes[d]).name]=f.value;for(d in y)f=y[d],"children"==d||("dangerouslySetInnerHTML"==d?u=f:"key"===d||d in w||D(t,d,null,f,o));for(d in w)f=w[d],"children"==d?b=f:"dangerouslySetInnerHTML"==d?m=f:"value"==d?v=f:"checked"==d?_=f:"key"===d||p&&"function"!=typeof f||y[d]===f||D(t,d,f,y[d],o);if(m)p||u&&(m.__html===u.__html||m.__html===t.innerHTML)||(t.innerHTML=m.__html),e.__k=[];else if(u&&(t.innerHTML=""),z(t,h(b)?b:[b],e,n,r,o&&"foreignObject"!==k,s,a,s?s[0]:n.__k&&x(n,0),p,l),null!=s)for(d=s.length;d--;)null!=s[d]&&g(s[d]);p||(d="value",void 0!==v&&(v!==t[d]||"progress"===k&&!v||"option"===k&&v!==y[d])&&D(t,d,v,y[d],!1),d="checked",void 0!==_&&_!==t[d]&&D(t,d,_,y[d],!1))}return t}function N(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){r.__e(t,n)}}function R(t,e,n){var i,o;if(r.unmount&&r.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||N(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){r.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&R(i[o],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function U(t,e,n){return this.constructor(t,n)}function W(t,e,n){var o,s,a,p;r.__&&r.__(t,e),s=(o="function"==typeof n)?null:n&&n.__k||e.__k,a=[],p=[],E(e,t=(!o&&n||e).__k=b(_,null,[t]),s||c,c,void 0!==e.ownerSVGElement,!o&&n?[n]:s?null:e.firstChild?i.call(e.childNodes):null,a,!o&&n?n:s?s.__e:e.firstChild,o,p),L(a,t,p)}i=d.slice,r={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(e){t=e}throw t}},o=0,y.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=u({},this.state),"function"==typeof t&&(t=t(u({},n),this.props)),t&&u(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},y.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},y.prototype.render=_,s=[],p="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(t,e){return t.__v.__b-e.__v.__b},A.__r=0}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,exports:{}};return n[t].call(i.exports,i,i.exports,o),i.exports}o.m=n,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce((e,n)=>(o.f[n](t,e),e),[])),o.u=t=>"19c2dd58182."+t+".js",o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@subiz/widget-v4:",o.l=(n,i,r,s)=>{if(t[n])t[n].push(i);else{var a,p;if(void 0!==r)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var d=l[c];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==e+r){a=d;break}}a||(p=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",e+r),a.src=n),t[n]=[i];var m=(e,i)=>{a.onerror=a.onload=null,clearTimeout(h);var r=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach(t=>t(i)),e)return e(i)},h=setTimeout(m.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=m.bind(null,a.onerror),a.onload=m.bind(null,a.onload),p&&document.head.appendChild(a)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.p="https://vcdn.subiz-cdn.com/widget-v4/public/",(()=>{var t={60:0,278:0};o.f.j=(e,n)=>{var i=o.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise((n,r)=>i=t[e]=[n,r]);n.push(i[2]=r);var s=o.p+o.u(e),a=new Error;o.l(s,n=>{if(o.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,i[1](a)}},"chunk-"+e,e)}};var e=(e,n)=>{var i,r,[s,a,p]=n,l=0;if(s.some(e=>0!==t[e])){for(i in a)o.o(a,i)&&(o.m[i]=a[i]);p&&p(o)}for(e&&e(n);l<s.length;l++)r=s[l],o.o(t,r)&&t[r]&&t[r][0](),t[r]=0},n=self.webpackChunk_subiz_widget_v4=self.webpackChunk_subiz_widget_v4||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),(()=>{"use strict";var t=o(5922);function e(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const n=o(318);function i(e,n){let i=e.request;"text/plain"===i.content_type&&void 0!==i.body&&(i.body=t.A.stringify(i.body)),n(!0)}let r=0,s=(e,n)=>{if("undefined"==typeof sbz_info)return n(!0);let i=e.request;r++,i._id=r,sbz_info["ajax."+r]={created:t.A.Date.now(),method:i.method,baseurl:i.baseurl,query:i.query},n(!0)},a=(e,n)=>{if("undefined"==typeof sbz_info)return n(!0);let i=e.request._id;sbz_info["ajax."+i]||(sbz_info["ajax."+i]={created:0}),sbz_info["ajax."+i].out={duration:t.A.Date.now()-sbz_info["ajax."+i].created,code:e.code,err:e.err},n(!0)};const p=class{constructor(r,o){e(this,"sendBugReport",t=>this.bugReq.post("/bugs",t)),e(this,"listConversations",t=>this.apireq.addQuery("user_id",this.uid).addQuery("integration_id",`${this.accid}.subizv4.subikon`).get(`/accounts/${this.accid}/conversations`)),e(this,"listMessages",(t,e,n)=>this.apireq.addQuery("limit",e).addQuery("start_id",n).get(`/accounts/${this.accid}/conversations/${t}/messages`)),e(this,"ajax",n),e(this,"start",(e,n,i,r)=>{let o=Object.assign({},e);return o.touchpoint||(o.touchpoint={}),o.touchpoint.channel||(o.touchpoint.channel="subiz"),o.touchpoint.source||(o.touchpoint.source="web"),o.source=t.A.get(document,"location.href"),this.apireq.post(`/accounts/${this.accid}/conversations`,o)}),e(this,"sendConvoEvent",(e,n)=>this.apireq.addQuery("x-referer",t.A.get(location,"origin","")).post(`/accounts/${this.accid}/conversations/${e}/events`,n)),e(this,"createPostback",(t,e)=>this.apireq.post(`/accounts/${this.accid}/conversations/${t}/postbacks`,e)),e(this,"markAsReceived",(t,e)=>this.apireq.post(`/accounts/${this.accid}/conversations/${t}/messages/${e}/receive`)),e(this,"markAsSeen",(t,e)=>this.apireq.post(`/accounts/${this.accid}/conversations/${t}/messages/${e}/seen`)),e(this,"getConversation",t=>this.apireq.get(`/accounts/${this.accid}/conversations/${t}`)),e(this,"getLocaleContent",t=>this.apireq.get(`/accounts/${this.accid}/languages/${t}`)),e(this,"sendEvent",e=>this.apireq.addQuery("shorten",!0).addQuery("x-referer",t.A.get(location,"origin","")).post(`/accounts/${this.accid}/users/${this.uid}/events`,e)),e(this,"submitForm",(e,n,i,r,o)=>this.apireq.addQuery("x-referer",t.A.get(location,"origin","")).post(`/accounts/${this.accid}/users/${this.uid}/events`,{by:{id:this.uid,device:i},type:"form_submitted",data:{user:o,form_submission:{user_id:this.uid,form_id:e,page_url:n,submitted_at:t.A.Date.now(),values:r}}})),e(this,"sendTyping",t=>this.apireq.post(`/accounts/${this.accid}/conversations/${t}/typing`)),e(this,"sendLostFocus",()=>this.apireq.post(`/accounts/${this.accid}/focuses/${this.uid}/delete`)),e(this,"uploadToS3",async e=>{let n=e.name.replace(/\s+/g,"_");var{body:i,error:r}=await this.apireq.setBaseUrl("https://api5.subiz.com.vn/4.1").setQuery({"account-id":this.accid,description:"upload\n user-client: web-widget",name:n,presign:!0,size:e.size,type:e.type}).post("/files");if(r)return{body:i,error:r};let o=i.signed_url,s=i.id,a=await new Promise(n=>{const i=new t.A.XMLHttpRequest;i.open("PUT",o,!0),i.setRequestHeader("Content-Type",e.mimetype),i.onload=function(){200===i.status?n():n(new Error(`Upload failed: ${i.statusText}`))},i.onerror=function(){n(new Error("Network error during upload."))},i.send(e)});if(a)return{error:a};var{body:i,error:r}=await this.apireq.setBaseUrl("https://api5.subiz.com.vn/4.1").setQuery({"account-id":this.accid}).post(`/files/${s}/uploaded`);return r?{error:r}:{url:t.A.get(i,"file.url","")}}),e(this,"uploadToS32",async e=>{var{body:i,error:r}=await n.setBaseUrl("https://api5.subiz.com.vn/4.1").withCredentials(!0).setQuery({"account-id":this.accid,description:"upload\n user-client: web-widget",name:e.name.replace(/\s+/g,"_"),size:e.size,type:e.type}).setParser("json").beforeHook((t,e)=>{if(this.token_generator){let n=this.profile_id;return void this.token_generator().then(i=>n!=this.profile_id?e(!0):i?"error"==i?e(!1):(t.request=t.request.addQuery("x-access-token",i),e(!0)):e(!1))}return this.ref?t.request=t.request.addQuery("x-user-ref",this.ref):this.mask&&(t.request=t.request.addQuery("x-user-mask",this.mask)),e(!0)}).post("/files",e);return r?{body:i,error:r}:{url:t.A.get(i,"file.url")}}),e(this,"time",t=>n.setBaseUrl(this.ApiURL).withCredentials(!0).setParser("json").get("/time")),e(this,"updateUser",t=>this.apireq.post(`/accounts/${this.accid}/users/${this.uid}`,t)),e(this,"getUser",t=>this.apireq.get(`/accounts/${this.accid}/users/${this.uid}`)),e(this,"getAccountSetting",e=>{let n=t.A.get(document,"location.href");return e&&e.bot_id?this.apireq.addQuery("url",n).addQuery("bot_id",e.bot_id).get(`/accounts/${this.accid}/settings`):this.apireq.addQuery("url",n).get(`/accounts/${this.accid}/settings`)}),e(this,"sendImpression",t=>this.apireq.post(`/accounts/${this.accid}/campaigns/${t.campaign_id}/impressions`,t)),e(this,"sendConversion",t=>this.apireq.post(`/accounts/${this.accid}/campaigns/${t.campaign_id}/conversions`,t)),e(this,"lookupOrder",t=>n.setBaseUrl(this.ApiURL).setContentType("text/plain").beforeHook(i).setParser("json").addQuery("x-signed-key",t).get("/orders/123")),e(this,"getOrder",t=>this.apireq.get(`/accounts/${this.accid}/orders/`+t)),e(this,"updateOrder",t=>this.apireq.post(`/accounts/${this.accid}/orders/`+t.id,t)),e(this,"fetchShippingAddresses",()=>this.apireq.get(`/accounts/${this.accid}/users/${this.uid}/shipping-addresses`)),e(this,"createShippingAddress",t=>this.apireq.post(`/accounts/${this.accid}/users/${this.uid}/shipping-addresses`,t)),e(this,"list_provinces",()=>this.apireq.get(`/accounts/${this.accid}/provinces`)),e(this,"list_districts",t=>this.apireq.setQuery(t).get(`/accounts/${this.accid}/districts`)),e(this,"list_wards",t=>this.apireq.setQuery(t).get(`/accounts/${this.accid}/wards`)),e(this,"checkFormToken",(t,e)=>this.api41.addQuery("account-id",t).get(`/submissions/${e}`)),e(this,"submitForm2",(t,e,n)=>this.api41.addQuery("account-id",t).post(`/submissions/${e}`,n)),e(this,"suggest_address",t=>this.apireq.setQuery({keyword:t}).get(`/accounts/${this.accid}/addresses`)),e(this,"create_ticket",t=>this.apireq.post(`/accounts/${this.accid}/tickets`,t)),this.refreshLock=new t.A.Mutex,this.FileURL=o,this.ApiURL=r,this.bugReq=n.setBaseUrl("https://api5.subiz.com.vn/4.1").setContentType("text/plain"),this.api41=n.setBaseUrl("https://api.sbz.vn/4.1").withCredentials(!0).setContentType("text/plain").beforeHook(i).afterHook(a).beforeHook(s).setParser("json"),this.apireq=n.setBaseUrl(r).withCredentials(!0).addQuery("v","6").setContentType("text/plain").beforeHook(i).afterHook(a).setParser("json").beforeHook(s).beforeHook((t,e)=>{if(this.token_generator){let n=this.profile_id;return void this.token_generator().then(i=>n!=this.profile_id?e(!0):i?"error"==i?e(!1):(t.request=t.request.addQuery("x-access-token",i),e(!0)):e(!1))}return this.ref?t.request=t.request.addQuery("x-user-ref",this.ref):this.mask&&(t.request=t.request.addQuery("x-user-mask",this.mask)),e(!0)})}setAgentId(t){this.agentid=t}async setAuth(e){if(e.accid&&(this.accid=e.accid),e.ref&&(this.ref=e.ref),this.mask=e.mask,this.profile_id=e.profile_id,e.ref){let e;for(let i=0;e=await n.setBaseUrl(this.ApiURL).withCredentials(!0).afterHook(a).beforeHook(s).addQuery("v","6").addQuery("x-user-ref",this.ref).setParser("json").get(`/accounts/${this.accid}/users/${this.ref}`),-1==t.A.get(e,"body.error.code","").indexOf("locked_account");i++){if(-1==t.A.get(e,"body.error.code","").indexOf("user_is_banned")){if(!t.A.get(e,"body.id")){let e=Math.min(2e3+400*i,6e4);await t.A.sleep(e);continue}break}await t.A.sleep(12e4)}return e.error?t.A.get(e.body.code)?{error:e.body.code}:e:(this.uid=e.body.id,e.body)}if(e.tokenGenerator){let i=e.tokenGenerator;this.tokensession=this.tokensession||0,this.tokensession++;let r=this.tokensession;if(!this.accid||!t.A.startsWith(this.accid,"ac"))return{error:"invalid_account_id"};if(!this.profile_id)return{error:"invalid_profile_id"};if("function"!=typeof i)return{error:"invalid_token_generator"};let o,p=this.profile_id;this.token_generator=async e=>{if(await this.refreshLock.lock(),r!=this.tokensession)return void this.refreshLock.unlock();let n,o,s=(t.A.Date.now()-(this.last_token_at||0))/1e3;if(!e&&this.last_token&&s<1800)return this.refreshLock.unlock(),this.last_token;if(!e&&this.last_token&&s<3e3)return this.token_generator&&t.A.setTimeout(async()=>{let e,n;try{e=await i(p)}catch(t){n=t}r==this.tokensession?(this.last_token=n?"error":e,this.last_token_at=t.A.Date.now(),this.refreshLock.unlock()):this.refreshLock.unlock()}),this.last_token;try{n=await i(p)}catch(t){o=t}if(r==this.tokensession)return this.last_token=o?"error":n,this.last_token_at=t.A.Date.now(),this.refreshLock.unlock(),this.last_token;this.refreshLock.unlock()};for(let e=0;await this.token_generator(!0),r==this.tokensession;e++){if(o=await n.setBaseUrl(this.ApiURL).withCredentials(!0).addQuery("v","6").afterHook(a).beforeHook(s).addQuery("x-access-token",this.last_token).setParser("json").get(`/accounts/${this.accid}/users/${p}`),!t.A.get(o,"body.id")){let n=Math.min(2e3+100*e,12e4);await t.A.sleep(n);continue}break}return o.error?t.A.get(o.body.code)?{error:o.body.code}:o:(this.uid=o.body.id,o.body)}if(this.mask){let t=this.mask.split("@");return this.uid=t[1],{id:this.uid}}return{error:"invalid_auth"}}sendContentView(t,e,n,i,r,o){return i||(i=void 0),r||(r=void 0),this.sendEvent({by:{id:this.uid,device:t},type:"content_viewed",data:{product:{id:i,source_id:r,url:e,name:n,title:n,sku:o}}})}};let l=o(450),c="undefined"!=typeof window?window.requestIdleCallback:null;c||(c=t=>t());const d=class{constructor(t,e){if(this.localStorage=l,this.inmem=e,this.allkeys={},!e)try{window.localStorage.setItem("sbzstore1029","?"),window.localStorage.removeItem("sbzstore1029"),this.localStorage=window.localStorage}catch(t){}this.schema=t}all(e){let n=[];for(var i=0;i<this.localStorage.length;i++){let r=this.localStorage.key(i);r.startsWith(this.schema+"#"+e+"#")&&(this.allkeys[r]=!0,this.inmem?n.push(this.localStorage.getItem(r)):n.push(t.A.parseJSON(this.localStorage.getItem(r))))}return n}removes(t,e){for(var n=0;n<e.length;n++)delete this.allkeys[this.schema+"#"+t+"#"+e[n]],this.localStorage.removeItem(this.schema+"#"+t+"#"+e[n])}clear(t){for(var e=[],n=0;n<this.localStorage.length;n++){let i=this.localStorage.key(n);i.startsWith(this.schema+"#"+t+"#")&&e.push(i)}for(n=0;n<e.length;n++)this.localStorage.removeItem(e[n]);this.allkeys={}}put(t,e,n){if(this.allkeys[this.schema+"#"+t+"#"+e]=!0,this.inmem)return this.localStorage.setItem(this.schema+"#"+t+"#"+e,n);Object.keys(this.allkeys).length>80&&this.clear(t),c(()=>{try{this.localStorage.setItem(this.schema+"#"+t+"#"+e,void 0===(i=n)?"null":JSON.stringify(i))}catch(e){this.clear(t)}var i})}};class m{constructor(t,e,n){this.schema=e+"_chain",this.dead=!1,this.db=t,this.anchorCache={},this.cache={},this.init()}init(){let t={};this.db.all("items").map(e=>{t[e.chain]=t[e.chain]||{},t[e.chain][e.id]={id:e.id,chain:e.chain,full_id:e.full_id,index:e.index,value:e.value}}),u(t,(e,n)=>{if(g(e)<50)return;let i=(r=u(e),o=["index"],s=[],u(r,t=>s.push(t)),s.sort((t,e)=>{if(t[o]===e[o])return 0;var n=t[o]<e[o]?-1:1;return-n}),s);var r,o,s;let a=[];for(var p=50;p<i.length;p++)a.push(i[p].full_id),delete e[i[p].id];this.db.removes("items",a),t[n]=e}),this.cache=t}destroy(){this.db.clear("items"),this.dead=!0,this.cache={},this.anchorCache={},this.db=void 0}put(t,e,n,i){if(this.dead)return;let r=this.cache[t]||{},o=(h(r)||{}).index||"z";0==g(r)&&(o="");let s={id:e,index:n,value:i,chain:t,full_id:t+":"+e};delete r[s.id],o>s.index+""||(r[s.id]=s,this.cache[t]=r,this.db.put("items",s.full_id,s))}listM(t){if(this.dead)return{};let e=this.cache[t]||{},n={};return u(e,(t,e)=>{n[e]=t.value}),n}async fetchMore(t,e=20,n){if(this.dead)return{error:"dead"};if(!n)return{error:"no api"};let i=this.anchorCache[t]||"";var[r,o,s]=await n(t,i,e);if(s)return{error:s};if(this.dead)return{error:"dead"};let a=this.cache[t]||{};return 0===r.length?{end:!0}:(r.forEach(e=>{e.chain=t,e.full_id=t+":"+e.id,a[e.id]=e,this.db.put("items",e.full_id,e)}),this.anchorCache[t]=o,this.cache[t]=a,{})}del(t,e){if(this.dead)return;let n=t+":"+e;delete(this.cache[t]||{})[e],this.db.removes("items",[n])}match(t,e){return this.listM(t)[e]}async reload(t,e){if(this.dead)return;let n=function(t){if(!t)return;let e=Object.keys(t);if(!e.length)return;let n=-1/0,i=Object.keys(t)[0];for(var r=0;r<e.length;r++){let o=t[e[r]]&&t[e[r]].index||-1/0;o>n&&(n=o,i=e[r])}return t[e[i]]}(this.listM(t))||{},i=n.index;i||(i=Date.now());for(var r="",o={};;){if(this.dead)return;let[n,s,a]=await e(t,r,50);if(a)return;if(this.dead)return;if(n.map(e=>{o[e.id]=Object.assign({},e,{chain:t,full_id:t+":"+e.id})}),0===n.length||s===r)break;if(o.length>=200){let e=this.cache[t]||{},n=[];u(e,e=>{e.chain===t&&n.push(e.full_id)}),this.db.removes("items",n),this.cache[t]={};break}if((h(o)||{}).index<=i){r=this.anchorCache[t]||s;break}r=s}for(var s=0;s<Object.keys(o).length;s++){let t=o[Object.keys(o)[s]];this.db.put("items",t.full_id,t),this.cache[t.chain]=this.cache[t.chain]||{},this.cache[t.chain][t.id]=t}this.anchorCache[t]=r}}function h(t){if(!t)return;let e=Object.keys(t);if(!e.length)return;let n=1/0,i=Object.keys(t)[0];for(var r=0;r<e.length;r++){let o=t[e[r]]&&t[e[r]].index||1/0;o<n&&(n=o,i=e[r])}return t[i]}function u(t,e){if(!t)return[];if(!e)return t;var n=[];if(Array.isArray(t)){for(let i=0;i<t.length;i++)n.push(e(t[i],i));return n}if("object"==typeof t){var i=Object.keys(t);for(let o=0;o<i.length;o++){var r=i[o];n.push(e(t[r],r))}return n}return n}function g(t){return t?void 0!==t.length?t.length:Object.keys(t).length:0}const f=class{constructor(t,e){this.name=e,e+="_kv",this.dead=!1,this.db=t,this.cache={},this.initialized=!1,this.init()}refreshCache(){if(this.dead)return;let t={};this.db.all("items").forEach(function(e){t[e.key]=e.value}),this.cache=t}init(){if(this.initialized)return;let t={};this.db.all("items").forEach(function(e){t[e.key]=e.value}),this.cache=t;let e=Object.keys(this.cache);if(e.length>500){let t=250/e.lenth,i=[];for(var n=0;n<500;n++){if(Math.random()<=t)continue;let r=e[n];delete this.cache[r],i.push(r)}this.db.removes("items",[i])}this.initialized=!0}all(){return this.dead?[]:this.initialized?this.cache:[]}match(t){if(!this.dead&&this.initialized&&t)return this.cache[t]}put(t,e){if(t){if(this.dead)return[];if(!this.initialized)throw new Error("uninitialized");this.cache[t]=e,this.db.put("items",t,{key:t,value:e})}}del(t){if(!this.dead){if(!this.initialized)throw new Error("uninitialized");delete this.cache[t],this.db.removes("items",[t])}}destroy(){this.db.clear("items"),this.dead=!0,this.db=void 0,this.cache=void 0,this.initialized=!1}};function v(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const _=o(318);function y(e,n){let i=e.request;"text/plain"===i.content_type&&void 0!==i.body&&(i.body=t.A.stringify(i.body)),n(!0)}const x=Promise.resolve({code:200}),w=class{constructor(e,n){v(this,"listConversations",t=>{let e=k(this.accid,"csqwudlkftltnbebvq",this.uid,this.agentid);return Promise.resolve({body:{anchor:"",conversations:[e]},code:200})}),v(this,"listMessages",(t,e,n)=>{let i=function(t,e,n,i){let r=t+".subizv4.subikon",o={type:"user",id:n,last_page_view_url:"https://subiz.com.vn/",conversation_id:e,membership:"active",invited_by:{id:n,type:"user"}},s={type:"agent",conversation_id:e,id:i,membership:"active",invited_by:{id:n,type:"user"}};return[{id:"evqyiyjmxrjsylftvnrghrfmq",account_id:t,created:1616213202264,type:"conversation_invited",by:{id:n,type:"user"},data:{conversation:{id:e,account_id:t,members:[o],state:"pending"}}},{id:"evqyiyjmyqdgrouswczzawuzp",account_id:t,created:1616213202559,type:"conversation_invited",by:{id:n,type:"user"},data:{conversation:{id:e,account_id:t,members:[s],state:"pending",source:"https://subiz.com.vn/vi/"}}},{id:"evqyiyjmyzjpyehnngvmcyauf",account_id:t,created:1616213202668,type:"conversation_state_updated",by:{id:n,type:"user"},data:{conversation:{id:e,account_id:t,state:"active"}}},{id:"evqyiyjmzaozvqgbkljbwywdl",account_id:t,created:1616213202683,type:"conversation_joined",by:{id:n,type:"user"},data:{conversation:{id:e,members:[o]}}},{id:"evqyiyjmzatvtgpdmmpzwnwgn",account_id:t,created:1616213202685,type:"message_sent",by:{id:n,client_id:"clsubizapi",type:"user"},data:{message:{conversation_id:e,text:"Xin chào",format:"plaintext",idempotency_key:"wrueysyjbhqrkiwhsejpqrwqrdkkyaibajdw",integration_id:r,pongs:[{member_id:n,type:"seen",created:1616213203068}]}}},{id:"evqyiyjrhsfyuxtetszmvkkke",account_id:t,created:1616213237491,type:"conversation_joined",by:{id:n,type:"user"},data:{conversation:{id:e,members:[s]}}},{id:"evqyiyjrhtroknjyakrlrwhgr",account_id:t,created:1616213237508,type:"message_sent",by:{id:i,client_id:"dashboard",type:"agent"},data:{message:{conversation_id:e,text:"chào bạn, mình có thể giúp gì được cho bạn :grinning:",format:"plaintext",integration_id:r,pongs:[{member_id:n,type:"receive",created:1616213237742},{member_id:n,type:"seen",created:1616213240057}]}}},{id:"evqyiyjuvjinmclneroerxmrl",account_id:t,created:1616213265805,type:"message_sent",by:{id:n,client_id:"clsubizapi",type:"user"},data:{message:{conversation_id:e,text:"mình muốn hỏi giá sản phẩm IPhone X",format:"plaintext",integration_id:r,pongs:[{member_id:n,type:"seen",created:1616213267090}]}}},{id:"evqyiyjzjxzfcsexshcjbbnnf",account_id:t,created:1616213302432,type:"message_sent",by:{id:i,client_id:"dashboard",type:"agent"},data:{message:{conversation_id:e,text:"IPhone X hiện đang được bán tại cửa hàng với giá 12tr đồng nha bạn",format:"plaintext",integration_id:r,pongs:[{member_id:n,type:"receive",created:1616213302698},{member_id:n,type:"seen",created:1616213305071}]}}},{id:"evqyiykaoizbwnkaecwphttwk",account_id:t,created:1616213311830,type:"message_sent",by:{id:n,client_id:"clsubizapi",type:"user"},data:{message:{conversation_id:e,text:"ok cám ơn!",format:"plaintext",integration_id:r,pongs:[{member_id:n,type:"seen",created:1616213312110}]}}}]}(this.accid,"csqwudlkftltnbebvq",this.uid,this.agentid);return Promise.resolve({body:i,code:200})}),v(this,"ajax",_),v(this,"start",t=>x),v(this,"sendConvoEvent",(t,e)=>x),v(this,"createPostback",(t,e)=>x),v(this,"markAsReceived",(t,e)=>x),v(this,"markAsSeen",(t,e)=>x),v(this,"getConversation",t=>Promise.resolve({body:k(this.accid,"csqwudlkftltnbebvq",this.uid,this.agentid),code:200})),v(this,"getLocaleContent",t=>this.apireq.get(`/accounts/${this.accid}/locales/${t}`)),v(this,"sendEvent",t=>x),v(this,"submitForm",(t,e,n,i,r)=>x),v(this,"sendTyping",t=>x),v(this,"sendPresence",t=>x),v(this,"sendContent",t=>x),v(this,"sendLostFocus",t=>x),v(this,"sendContentView",t=>x),v(this,"uploadToS3",async t=>x),v(this,"time",e=>Promise.resolve({code:200,body:(new t.A.Date).toISOString()})),v(this,"updateUser",t=>x),v(this,"getUser",t=>Promise.resolve({code:200,body:{id:"usqzgtgfake",attributes:[{key:"fullname",text:"Kiều Thanh"}]}})),v(this,"getAccountSetting",()=>this.apireq.get(`/accounts/${this.accid}/settings`)),v(this,"sendImpression",t=>x),v(this,"sendConversion",t=>x),this.FileURL=n,this.apireq=_.setBaseUrl(e).setContentType("text/plain").beforeHook(y).setParser("json")}setAgentId(t){this.agentid=t}setAuth(t){return this.accid=t.accid,this.mask=t.mask,this.uid=t.uid,{account_id:this.accid,id:"usqzgtgfake",attributes:[{key:"fullname",text:"Kiều Thanh"}]}}};function k(t,e,n,i){return{id:e,account_id:t,created:1610452894916,members:[{type:"user",id:n,membership:"active",invited_by:{id:n,type:"user"}},{type:"agent",id:i,conversation_id:e,membership:"active",invited_by:{id:n,type:"user"}}],ended:1610454875505,state:"ended",actived:1610453070259,last_message_sent:{id:"evqyiykaoizbwnkaecwphttwk",account_id:t,created:1616213311830,type:"message_sent",by:{id:n,client_id:"clsubizapi",type:"user"},data:{message:{conversation_id:e,text:"ok cám ơn!",format:"plaintext",integration_id:t+".subizv4.subikon",pongs:[{member_id:n,type:"seen",created:1616213312110}]}}},assigned_to:{},first_message:"Xin chào",subject:"Chúc một ngày tốt lành",source:"https://subiz.com.vn/"}}const A=class{onEvent(){}onInterrupted(){}subscribe(){}stop(){}getStatus(){return"active"}reconnect(){}};function z(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var I=o(8193),C=o(2839),M=o(5672);M.defaults.path="/",M.expiresMultiplier=86400,M.defaults.expires=3650;let S=o(450);const D=t.A.Date.now(),j=["acqsulrowbxiugvginhw","acryguzgwxmamhzmqlyx"];class T{constructor(e,n,i,r,o){if(z(this,"inmem",!1),z(this,"cookie",M),z(this,"getConnectionStatus",()=>this.connectionStatus),z(this,"_currentViewingProduct",{}),z(this,"new_visitor",!0),z(this,"matchUser",()=>{if(this.cache)return this._touchAcc(),this.cache.match("user")}),z(this,"suggest_addresses",t=>this.api.suggest_address(t)),z(this,"matchAccount",()=>this.cache.match("account")),z(this,"matchPaymentMethods",()=>this.cache.match("payment_methods")),z(this,"matchUnread",()=>{let e=this.matchUser();if(!e||!e.id)return;let n=this.matchConvo("*"),i=0;return t.A.map(n,n=>{t.A.isConvoSeen(n,e.id)||i++}),i}),z(this,"matchPlugin",()=>{if(this.is_embed_chat_mode){let e=this.cache.match("plugin");t.A.size(this.forcePlugins)>0&&(e=this.forcePlugins);let n=t.A.filter(e,(t,e)=>t&&"chatbox"===t.type);if(0===t.A.size(n))return void console.error("no chatbox found.");let i=t.A.find(n,t=>!!t);return i||(i=n[0]),i=t.A.cloneDeep(i),i.triggers=void 0,{[i.id]:i}}return t.A.size(this.forcePlugins)>0?t.A.cloneDeep(this.forcePlugins):t.A.cloneDeep(this.cache.match("plugin"))||{}}),z(this,"device",{}),z(this,"browserVisibility","visible"),z(this,"matchAgent",t=>{let e=this.cache.match("agent")||{};return"*"===t?e:e[t]}),z(this,"matchConvo",e=>{if(e)return"*"===e?(this._touchAcc(),t.A.filter(this.cache.all(),(t,e)=>e.startsWith("convo_")).concat(t.A.map(this.lightConvos))):e.startsWith("cslight")?this.lightConvos[e]:(this.isInsync(e)||this.fetchConvo(e),this.cache.match("convo_"+e))}),z(this,"fetchConvo",async t=>{if(!t)return;if(t.startsWith("cslight"))return;if(this._die)return W;if(await this.readyGate.entry(),await this.reconnectGate.entry(void 0,!0),this.isInsync(t))return this.reconnectGate.open();this.markSync(t);let{body:e,error:n}=await this.api.getConversation(t);return e&&!n&&this._setConvo(e),this.reconnectGate.open()}),z(this,"list_provinces",()=>this.api.list_provinces()),z(this,"list_districts",t=>this.api.list_districts(t)),z(this,"list_wards",t=>this.api.list_wards(t)),z(this,"outofmsgM",{}),z(this,"listEvents",e=>{if(e&&"*"!==e&&"string"==typeof e)return e.startsWith("cslight")?t.A.get(this.lightConvos,[e,"events"],[]):this.chain.listM(e)}),z(this,"fetchMoreEvents",async t=>{if(t){if(t.startsWith("cslight"))return[[],""];if(!this.isInsync("events"+t)){if(await this.readyGate.entry(),await this.reconnectGate.entry(void 0,!0),this.isInsync("events"+t))return this.reconnectGate.open(),{};this.markSync("events"+t),await this.chain.reload(t,()=>[[],""]);let e=await this._doFetchMsg(t);return this.reconnectGate.open(),e}return this._doFetchMsg(t)}}),z(this,"reloadConvoEvents",async t=>{await this.chain.reload(t,()=>[[],""]);let{error:e}=await this.chain.fetchMore(t,150,async(e,n,i)=>{let[r,o,s,a]=await this.listmessageapi(e,n,i);return a&&(this.outofmsgM[t]=!0),[r,o,s]});return{error:e}}),z(this,"_doFetchMsg",async t=>{let{error:e}=await this.chain.fetchMore(t,150,async(e,n,i)=>{if(this.outofmsgM[t])return[[],""];let[r,o,s,a]=await this.listmessageapi(e,n,i);return a&&(this.outofmsgM[t]=!0),[r,o,s]});return this.pubsub.publish("account"),{error:e}}),z(this,"matchLocation",()=>this.cache.match("location")||{}),z(this,"matchBot",()=>this.cache.match("bot")||{}),z(this,"readyGate",new t.A.Gate),z(this,"convoGate",new t.A.Gate(!0)),z(this,"reconnectGate",new t.A.Gate(!0)),z(this,"wsGate",new t.A.Gate(!0)),z(this,"matchLastview",()=>this.kv.match("lastview")||{}),z(this,"matchIsOpen",()=>!!this.kv.match("isopen")),z(this,"matchClosePreviewAt",()=>this.kv.match("close_preview_at")||0),z(this,"checkFormToken",(t,e)=>this.api.checkFormToken(t,e)),z(this,"submitForm2",(t,e,n)=>this.api.submitForm2(t,e,n)),z(this,"sendPresence",t.A.throttle(async()=>this._die?W:(await this.readyGate.entry(),t.A.get(this.cache.match("user"),"id")&&!t.A.isUserBanned(this.cache.match("user"))&&this._track_page_view?"visible"===this.browserVisibility&&document.hasFocus()?void this.api.sendContentView(this.device,location.href,document.title,this._currentViewingProduct.id,this._currentViewingProduct.source_id,this._currentViewingProduct.sku):this.api.sendLostFocus():void 0),1e3,{leading:!1})),z(this,"now",()=>t.A.Date.now()+this.timeDiff),z(this,"seenQueue",[]),z(this,"matchTrafficSource",()=>this.kv.match("traffic_source")),z(this,"sendBugReport",t=>this.api.sendBugReport(t)),z(this,"matchDebugAccountIds",()=>j),z(this,"sbzListConversations",()=>this.api.listConversations()),z(this,"sbzListMessages",t=>this.api.listMessages(t,100,"")),z(this,"listAgentRealtimeMessageSent",()=>this.agent_rt_message_sent_dict),z(this,"_alreadyReceived",{}),z(this,"_typing",t.A.throttle(t=>this.api.sendTyping(t),3e3,{trailing:!1})),z(this,"onConvoEvent",(t,e)=>this.pubsub.on2(t,"events",e)),z(this,"onWidgetClose",(t,e)=>this.pubsub.on2(t,"sbz_close_widget",e)),z(this,"onMessageUpdated",(t,e)=>this.pubsub.on2(t,"message_updated",e)),z(this,"seenConvo",t=>{t&&"create"!==t&&this.seenQueue.push(t)}),z(this,"onUpdate",(t,e)=>this.pubsub.on2(t,"account",e)),z(this,"onDestroyed",(t,e)=>this.pubsub.on2(t,"destroy",e)),z(this,"onConnection",(t,e)=>this.pubsub.on2(t,"connection",e)),z(this,"onResetCSS",(t,e)=>this.pubsub.on2(t,"resetCSS",e)),z(this,"onHighlight",(t,e)=>this.pubsub.on2(t,"highlight",e)),z(this,"closePreview",()=>this.kv.put("close_preview_at",(new t.A.Date).getTime())),z(this,"updateLastview",t=>{let e=this.cache.match("user")||{};if(!e.id)return;let n=this.matchLastview()||{},i={...n,...t,user_id:e.id};this.kv.put("lastview",i),this.pubsub.publish("lastview",i,n)}),z(this,"onLastview",(t,e)=>this.pubsub.on2(t,"lastview",e)),z(this,"timeDiff",0),this.connectionStatus="active",this.CONNECTION_CHECK_INTERVAL=3e3,this.reconnectTimestamp=0,this.g_sync={},this.agent_rt_message_sent_dict={},this._die=!1,this.forceDevice=null,this.forcePlugins={},this.forceAcc={},this.forceChatbox={},this.RealtimeURL=i,this.fake=o,this.FileURL=n,this._track_page_view=!0,this.device_type="desktop",this.fake?this.api=new w(e,n):this.api=new p(e,n),!r)try{document.cookie,localStorage}catch(t){r=!0}r&&(this.inmem=r,this.cookie=L),N(),this.pubsub=new t.A.Pubsub,this.kv=new f(new d("sbz2023",this.inmem),"kv"),this.cache=new f(new d("sbz2023",!0),"kv"),this.chain=new m(new d("cbz2023",!0),"ch"),this.getLocaleContent=this.api.getLocaleContent,this.g_haveSentSeenM={},this.last_focused=this.now(),window.addEventListener("blur",()=>{this.last_focused=this.now(),this.sendPresence()}),window.addEventListener("focus",()=>{this.last_focused=0,this.sendPresence()}),window.addEventListener("beforeunload",()=>this.api.sendLostFocus()),this.doNotStartBot=()=>{this._donotstartbot=!0},this.autoStartBot=()=>{this._donotstartbot=!1},this.matchAutoStartBot=()=>!this._donotstartbot,this._presenceInterval1=t.A.setInterval(()=>{if(this._die)return t.A.clearInterval(this._presenceInterval1);"visible"===this.browserVisibility&&document.hasFocus()&&this.sendPresence()},2e4),this._presenceInterval2=t.A.setInterval(()=>{if(this._die)return t.A.clearInterval(this._presenceInterval2);"visible"===this.browserVisibility&&document.hasFocus()||this.last_focused&&this.now()-this.last_focused>18e5||this.sendPresence()},6e4),function(t){var e="hidden";function n(n){var i="visible",r="hidden",o={focus:i,focusin:i,pageshow:i,blur:r,focusout:r,pagehide:r};(n=n||window.event).type in o?t(o[n.type]):t(this[e]?"hidden":"visible")}e in document?document.addEventListener("visibilitychange",n):(e="mozHidden")in document?document.addEventListener("mozvisibilitychange",n):(e="webkitHidden")in document?document.addEventListener("webkitvisibilitychange",n):(e="msHidden")in document?document.addEventListener("msvisibilitychange",n):"onfocusin"in document?document.onfocusin=document.onfocusout=n:window.onpageshow=window.onpagehide=window.onfocus=window.onblur=n,void 0!==document[e]&&n({type:document[e]?"blur":"focus"})}(t=>{this._die||(this.browserVisibility=t,this.sendPresence())}),this.loopTime(),this.device=this.getDeviceInfo();const s=t.A.setInterval(()=>{let e=this.cache.match("user")||{};if(!e.id)return;var n=this.getDeviceInfo();if(!n.ga_tracking_ids||!n.ga_client_id)return;t.A.clearInterval(s),this.device=n;let i=n.ga_client_id;i!==t.A.getUserAttr(e,"ga_client_id","text")&&this.setUser({attributes:[{type:"text",text:i,key:"ga_client_id"}]})},2e3);this.loopCheckConnectionStatus()}async loopCheckConnectionStatus(){for(;!this._die;){if(await t.A.sleep(this.CONNECTION_CHECK_INTERVAL),!this.realtime)continue;if(!this.realtime.getStatus||!this.realtime.reconnect)continue;this.connectionStatus;let e=this.connectionStatus;this.connectionStatus=this.realtime.getStatus(),e!==this.connectionStatus&&(console.log("publish connectionStatus",this.connectionStatus),this.pubsub.publish("connection"))}}linkProduct(t){t?(t.id&&(this._currentViewingProduct.id=(t.id+"").trim()),t.source_id&&(this._currentViewingProduct.source_id=(t.source_id+"").trim()),t.sku&&(this._currentViewingProduct.sku=(t.sku+"").trim())):this._currentViewingProduct={}}getTrackPageview(){return this._track_page_view}setTrackPageview(t){this._track_page_view=!!t}getLinkedProduct(){return t.A.cloneDeep(this._currentViewingProduct)}isInsync(e){return t.A.Date.now()-(this.g_sync[e]||0)<6e5}async fetchShippingAddresses(){let t=await this.api.fetchShippingAddresses();if(t.error)return null;this.cache.put("shipping_address",t.body.shipping_addresses)}matchShippingAddresses(){return this.cache.match("shipping_address")}updateOrder(t){return this.api.updateOrder(t)}createShippingAddress(t){return this.api.createShippingAddress(t)}createTicket(t){return this.api.create_ticket(t)}overrideWelcomeMessage(e){t.A.map(this.lightConvos,(n,i)=>{n.last_message_sent&&(n.last_message_sent.data.message=e,n.last_message_sent.data.message.conversation_id=i);let r=t.A.get(n.events,"0");r.data.message=e,r.data.message.conversation_id=i,this.pubsub.publish("events",r)})}async overrideAcc(e){this.forceAcc=t.A.cloneDeep(e),await this.readyGate.entry(),this.reconnect()}async overrideBotId(t){this.forceBotId=t,await this.readyGate.entry()}async overrideChatbox(e){this.forceChatbox=e,await this.readyGate.entry(),await this.reconnect(),t.A.setTimeout(this.pubsub.publish("resetCSS"),10)}onShowMessageInfo(t){this.pubsub.publish("events",{type:"show_event_info",id:t})}getDeviceInfo(){let t={screen_resolution:window.screen.width+"x"+window.screen.height,source_referrer:document.referrer,platform:window.navigator.platform,language:navigator.language,page_url:document.URL,page_title:document.title},e=function(){if(!window.ga)return;if(!window.ga.getAll)return;var t=window.ga.getAll()||[];let e="";return t.forEach(function(t){e=t.get("clientId")}),e}();e&&(t.ga_client_id=e);let n=(i=[],window.ga&&window.ga.getAll?window.ga&&window.ga.getAll?((window.ga.getAll()||[]).forEach(function(t){var e=t.get("trackingId");e&&i.push(e)}),i):[]:i);var i;return n.length>0&&(t.ga_tracking_ids=n),t}highlight(t,e){this.pubsub.publish("highlight",t,e)}emitConvoEvent(t){this.pubsub.publish("events",t)}setAIDevMode(t){this.ai_dev_mode=t}setEmbebedChatMode(){this.is_embed_chat_mode=!0}isAIDevMode(){return this.ai_dev_mode}isEmbededChatMode(){return this.is_embed_chat_mode}overrideDeviceType(t){this.forceDevice=t,this.pubsub.publish("account")}isMobile(){return this.forceDevice?"mobile"===this.forceDevice:"mobile"==this.device_type||t.A.get(window,"screen.width",1e3)<576}isTablet(){return this.forceDevice?"tablet"===this.forceDevice:"tablet"==this.device_type}isDesktop(){return this.forceDevice?"desktop"===this.forceDevice:!this.isMobile()&&!this.isTable()}disconnect(t){this.g_sync[t]=0}pageLoaded(){return D}overridePlugin(e){if(this._die)return W;if(!Array.isArray(e))throw"plugins must be be an array";let n={};t.A.map(e,function(t){n[t.id]=t}),this.forcePlugins=n,this.pubsub.publish("account"),this.pubsub.publish("resetCSS")}markSync(e){this.g_sync[e]=t.A.Date.now()}async _touchAcc(){this.isInsync("account")||(await this.readyGate.entry(),this.isInsync("account")||this.reconnect())}async init(e,n,i,r){if(this.g_sync={},"undefined"!=typeof sbz_info&&(sbz_info.store_0=!0),r&&r.use_subdomain_cookie||window&&window.location&&window.location.hostname&&(M.defaults.domain="."+window.location.hostname),"undefined"!=typeof sbz_info&&(sbz_info.store_1=!0),!i){try{i=this.cookie.get("__sbref","")}catch(t){}if("undefined"!=typeof sbz_info&&(sbz_info.store_2=!0),!i){if(!n)try{n=this.cookie.get("__sbmask","")}catch(t){}n?(n.split("@")[0]!=e&&(i=t.A.randomString(40),this.new_visitor=!0),this.new_visitor=!1,this.cookie.set("__sbmask",n)):(i=t.A.randomString(40),this.new_visitor=!0)}}return"undefined"!=typeof sbz_info&&(sbz_info.store_3=!0),this.cookie.get("__sbref",i)!=i&&(R(),this.clearBrowserData()),"undefined"!=typeof sbz_info&&(sbz_info.store_4=!0),this.api.setAuth({accid:e}),"undefined"!=typeof sbz_info&&(sbz_info.store_5=!0),i&&this.cookie.set("__sbref",i),"undefined"!=typeof sbz_info&&(sbz_info.store_6=!0),this._initResource(e,{accid:e,mask:n,ref:i},{account_id:e,user_ref:i,user_mask:n})}standardlizeLastview(){let e=this.kv.match("lastview")||{},n=this.cache.match("user")||{};if(n.id||(e={}),e.user_id!=n.id&&(e={}),e.screen||(e.screen="preview","list"!==e.view&&"chat"!==e.view||(e.screen="widget")),this.isMobile()){e.screen="preview";let n=this.matchPlugin()||{},i=t.A.find(n,t=>"chatbox"===t.type)||{};t.A.get(i,"chatbox.greeting.mobile_disabled")&&(e.screen="button")}this.kv.put("lastview",e)}async _initResource(t,e,n){this.g_sync={},this._current_acc_id=t;let i=await this.api.setAuth(e);return"undefined"!=typeof sbz_info&&(sbz_info.store_7=!0),i.error?(console.error(i),i):(this.readyGate.close(),t=(t||"").trim(),this.lightConvos=this.kv.match("light_convos")||{},this.cache=new f(new d("sbz2023",!0),"kv"),this.realtime&&this.realtime.stop(),this.fake?this.realtime=new A:this.realtime=new C(this.RealtimeURL,n,U,t),this.realtime.onEvent(this.onWs.bind(this)),this.realtime.onInterrupted(async()=>{await this.reconnectWs(t,i.id),this.reconnect()}),"undefined"!=typeof sbz_info&&(sbz_info.store_8=!0),this.seenLoop(),"undefined"!=typeof sbz_info&&(sbz_info.store_9=!0),await this.reconnect({user:i}),this.standardlizeLastview(),"undefined"!=typeof sbz_info&&(sbz_info.store_10=!0),this.readyGate.open(),this.reconnectWs(t,i.id),i)}async login(t,e,n){return this._die?W:(R(),this.clearBrowserData(),this.new_visitor=!1,this._initResource(t,{accid:t,profile_id:e,tokenGenerator:n},{getAccessToken:()=>this.api.token_generator()}))}logout(t){return this.api.setAuth({ref:t})}seenLoop(){this.seenQueue=[],t.A.clearInterval(this._seenInterval),this._seenInterval=t.A.setInterval(()=>{if(this._die)return t.A.clearInterval(this._seenInterval);if(!this.cache)return;this.seenQueue=[...new Set(this.seenQueue)];let e=this.cache.match("user")||{};t.A.map(this.seenQueue,n=>{var i=this.listEvents(n);if(!i)return;if(0===t.A.size(i))return;var r=(i=t.A.filter(i,t=>"message_sent"===t.type))[t.A.size(i)-1];if(!r)return;if(this.g_haveSentSeenM[r.id])return;if(r.id===r.data.message.idempotency_key)return;if(this.pubsub.publish("events",{created:this.now(),type:"message_pong",by:{type:"user"},data:{message:{conversation_id:n,id:"*",pongs:[{type:"seen",created:this.now()}]}}}),n.startsWith("cslight")){let e=this.lightConvos[n],i=this.matchUser();if(!e)return;let o=t.A.find(e.members,t=>"user"==t.type&&t.id==i.id);return o&&(o.seen_at=this.now()),this.kv.put("light_convos",this.lightConvos),void(this.g_haveSentSeenM[r.id]=!0)}this.api.markAsSeen(n,r.id);let o=this.cache.match("convo_"+n)||{},s=t.A.find(o.members,t=>t.id===e.id);s&&(s.seen_at=this.now()),this._setConvo(o),this.g_haveSentSeenM[r.id]=!0}),this.seenQueue=[]},1e3)}async reconnectWs(t,e){await this.realtime.subscribe([`conversation_state_updated.account.${t}.user.${e}`,`conversation_joined.account.${t}.user.${e}`,`conversation_typing.account.${t}.user.${e}`,`message_sent.account.${t}.user.${e}`,`message_pong.account.${t}.user.${e}`,`conversation_rating_requested.account.${t}.user.${e}`,`conversation_rated.account.${t}.user.${e}`,`conversation_events.account.${t}.user.${e}`]),await this.readyGate.entry()}async reconnect(e){if(this._die)return;await this.reconnectGate.entry(void 0,!0),this.markSync("account");let n=e&&e.user?Promise.resolve({body:e.user}):this.api.getUser(),i=await Promise.all([n,this.api.getAccountSetting({bot_id:this.forceBotId})]),r=t.A.find(i,t=>t.error);if(r)return console.error(r);let o=i[1].body;o.user=i[0].body,await this._setSetting(o);let s=await this.api.listConversations();r=s.error;let a=s.body;if(!r){let e=t.A.get(a,"conversations",[]);t.A.map(this.cache.all(),(e,n)=>{n.startsWith("convo_")&&this.now()-t.A.getMs(t.A.get(e,"actived"))>12096e5&&this.cache.del(n)}),t.A.map(e,t=>this._setConvo(t))}return this.reconnectGate.open()}async submitForm(t,e,n){return await this.readyGate.entry(),n&&await this.setUser(n),this.api.submitForm(t,document.URL,this.device,e,n)}async setUser(t){if(t)return await this.readyGate.entry(),this._setUser(t),this.api.updateUser(t)}async setUserDiff(t){if(!t)return;await this.readyGate.entry();let e=await this.api.updateUser(t);e&&200==e.code&&e.body.id&&this._setUser(e.body)}_setUser(e){e=t.A.cloneDeep(e);let n=this.cache.match("user")||{};var i=n.account_id||e.account_id,r=n.id||e.id;t.A.each(e.attributes,e=>{e&&(n.attributes=t.A.filter(n.attributes,t=>!!t&&t.key!==e.key))}),n.attributes=n.attributes||[],n.attributes=n.attributes.concat(e.attributes),n.account_id=i,n.id=r,this.cache.put("user",n),this.pubsub.publish("account")}async setSetting(t){if(t)return await this.readyGate.entry(),this._setSetting(t)}async _setSetting(e){(e=t.A.cloneDeep(e)||{}).account=Object.assign({},e.account,this.forceAcc),e.account.logo_url||(e.account.logo_url="https://vcdn.subiz-cdn.com/widget-v4/public/assets/img/default_logo.dd13a2b.svg"),e.user&&(e.user.account_id=e.account.id,delete e.user.session,this._setUser(e.user)),e.account&&(e.account.is_online=e.is_online,e.account.is_in_business_hour=e.is_in_business_hour,this.cache.put("account",e.account),delete e.account);let n=t.A.get(e,"location",[]);this.cache.put("location",n);let i=t.A.get(e,"bots",[]),r={};t.A.map(i,t=>{r[t.id]=t}),this.cache.put("bot",r),this.device_type=e.device_type||"desktop";let o=t.A.get(e,"plugins",[]),s={};t.A.map(o,e=>{"chatbox"===e.type&&(e=t.A.merge(e,this.forceChatbox)),s[e.id]=e}),this.cache.put("plugin",s);var a=t.A.get(e,"agents",[]);if(t.A.size(a)>0){let e={};this.api.setAgentId(a[0].id),t.A.map(a,t=>{e[t.id]=t}),this.cache.put("agent",e)}let p=t.A.get(e,"payment_methods",[]);this.cache.put("payment_methods",p),this.pubsub.publish("account")}async track(){let e=await this.api.sendContentView(this.device,location.href,document.title,this._currentViewingProduct.id,this._currentViewingProduct.source_id,this._currentViewingProduct.sku),n=t.A.get(e,"body.by.device.source","");n&&this.kv.put("traffic_source",n)}async onWs(t){await this.wsGate.entry(),this.wsGate.close(),await this._onWs(t),this.wsGate.open()}handleLogCompare(e){j.includes(this._current_acc_id)&&"message_sent"===e.type&&"user"!==t.A.get(e,"by.type")&&(this.agent_rt_message_sent_dict[e.id]=e)}async _onWs(e){if(this.handleLogCompare(e),this._die)return;if(!e||!e.type)return;if(e.created=t.A.getMs(e.created),"user_info_updated"===e.type)return;if("message_deleted"===e.type)return void this.pubsub.publish("message_updated",e);let n,i=this.cache.match("user")||{},r=t.A.convoOfEv(e),o=!1;if(r&&!r.startsWith("cslight")&&(n=this.cache.match("convo_"+r),!n||!n.id)){let{body:t,error:e}=await this.api.getConversation(r);if(!t)return;n=t,o=!0,this._setConvo(n)}if(r&&r.startsWith("cslight")){if(n=this.lightConvos[r],!n)return;return n.events.push(e),n.last_message_sent=e,this.kv.put("light_convos",this.lightConvos),void this.pubsub.publish("events",e)}if(n){if(this.pubsub.publish("events",e),"conversation_joined"===e.type){let i=t.A.get(e,"data.conversation.members",[]);if(t.A.find(i,t=>t.id===this.cache.match("user").id)&&!o){let{body:t}=await this.api.getConversation(r);t&&(n=t,this._setConvo(n)),this.pubsub.publish("account")}}return"message_sent"===e.type&&t.A.get(e,"by.id")!==i.id&&(this._alreadyReceived[e.id]||(this._alreadyReceived[e.id]=!0,this.api.markAsReceived(r,e.id))),t.A.startsWith(e.type,"message_")||t.A.startsWith(e.type,"conversation_")?(this.restConvoEvent(e),void("message_sent"===e.type&&t.A.get(e,"by.id")!==i.id&&P("SUBIZ Chat","Received","User"))):void 0}}async restConvoEvent(e){let n=this.cache.match("user"),i=t.A.convoOfEv(e),r=this.cache.match("convo_"+i)||{};if("conversation_state_updated"===e.type){if(!t.A.get(r,"id")){let{body:t,error:e}=await this.api.getConversation(i);if(e)return}r=Object.assign(r,t.A.get(e,"data.conversation"))}if("message_pong"===e.type){var o=t.A.get(e,"data.message.id"),s=this.chain.match(i,o);if(!t.A.get(s,"data.message"))return;var a=t.A.get(s,"data.message.pongs",[]);let p=t.A.get(e,"data.message.pongs",[])||[];if(a=a.concat(p),1===p.length){let t=p[0].type;"like"!==t&&"remove_dislike"!==t||(a=a.filter(t=>"dislike"!==t.type)),"dislike"!==t&&"remove_like"!==t||(a=a.filter(t=>"like"!==t.type))}s.data.message.pongs=a,t.A.map(a,e=>{if(e.member_id==n.id&&"seen"===e.type){let i=t.A.find(r.members,t=>t.id===n.id);i&&(i.seen_at=e.created)}}),this.chain.put(i,s.id,t.A.getMs(s.created),s),this.pubsub.publish("events",s)}if("message_pong"!==e.type&&"conversation_typing"!==e.type){if("message_sent"===e.type){let n=t.A.get(e,"data.message.idempotency_key"),o=t.A.find(this.listEvents(i),t=>t.id===n);o&&(this.chain.del(i,o.id),e.created=o.created),r.last_message_sent=e}this.chain.put(i,e.id,t.A.getMs(e.created),e)}this._setConvo(r),this.pubsub.publish("account")}emitCloseWidgetEvent(){this.pubsub.publish("sbz_close_widget",{type:"chatbox_closed"})}typing(t){t&&(t.startsWith("cslight")||this._typing(t))}deleteLightConvo(t){delete this.lightConvos[t],this.kv.put("light_convos",this.lightConvos)}startLightConvo(e,n,i,r,o){let s="cslight"+e+"_"+this.now(),a=this.cache.match("user")||{},p=this.lightConvos[s];if(p)return{convo:p};let l=this.now(),c={},d=t.A.map(n,(t,n)=>{let i={};return i.created=l,i.event_time=l,i.id="evfake"+l+n,i.type="message_sent",i.by={id:e,type:"bot"},i.data={message:t},i.data.message.conversation_id=s,c=i,i}),m={id:s,locale:i,initial_by:e,created:l,actived:l,last_message_sent:c,members:[{type:"user",id:a.id},{type:"bot",id:e,membership:"active"}],state:"active",touchpoint:{id:s,channel:"subiz",source:"web"},traffic_source:"direct",events:d,is_testing:r,bot_versio:o};return this.lightConvos[s]=m,this.kv.put("light_convos",this.lightConvos),this.pubsub.publish("events",c),{convo:m}}async startConvo(t){t||(t={}),await this.readyGate.entry(),this.convoGate.close(),t.source||(t.source=document.location.href);let{body:e,error:n}=await this.api.start(t);return this.convoGate.open(),n?{error:n}:(this._setConvo(e),{convo:e})}fetchOrder(t){return this.api.getOrder(t)}lookupOrder(t){return this.api.lookupOrder(t)}createPostback(t,e){if(!t||!t.startsWith("cslight"))return this.api.createPostback(t,e)}sendReaction(t,e){if(!t||!t.startsWith("cslight"))return this.api.sendConvoEvent(t,e)}async sendConvoEvent(e,n,i){await this.readyGate.entry();var r=t.A.randomString(36),o={id:r,by:{id:(this.cache.match("user")||{}).id,type:"user",device:this.device},data:i,type:n,created:this.now()};t.A.convoToEv(e,o);let s=[];if("message_sent"===n&&(o.data.message.idempotency_key=r,o.data.message.conversation_id=e,await I.map(o.data.message.attachments,2,async(t,e)=>{var n;if("file"===t.type&&t._file&&(s.push(t),E.includes(t._file.type))){let{width:e,height:i,url:r}=await(n=t._file,new Promise(t=>{var e=new window.FileReader;e.onload=e=>{let n=e.target.result,i=new Image;i.onload=()=>{t({url:n,width:i.width,height:i.height})},i.src=n},e.readAsDataURL(n)}));t.url=r,t.width=e,t.height=i}})),this.onWs(o),await this.convoGate.entry(),await I.map(s,1,async e=>{const{body:n,url:i,error:r}=await this.api.uploadToS3(e._file);"invalid_field_size"==t.A.get(n,"code")&&(o._error_message="cannot_send_too_big_file"),o._error=r,e.url=i}),o._error)return this.onWs(o);if(e&&e.startsWith("cslight"))return;let{body:a,error:p}=await this.api.sendConvoEvent(e,o);return p?(o._error=p,void this.onWs(o)):(this.onWs(a),P("SUBIZ Chat","Sent","User"),this.kv.match("last_msg_sent")||(window.dataLayer||[]).push({event:"SUBIZ Chat",event_action:"Sent",event_label:"User",first_interaction:1}),this.kv.put("last_msg_sent",this.now()),a)}_setConvo(e){this.cache.match("user");let n=t.A.get(e,"touchpoint.channel","");if(n&&"subiz"!=n)return;let i={};if(t.A.map(this.cache.all(),(t,e)=>{e.startsWith("convo_")&&(i[e]=t)}),t.A.size(i)>18){i=t.A.orderBy(t.A.map(i),"created","desc");for(var r=18;r<t.A.size(i);r++){let t=i[r];this.cache.del("convo_"+t.id)}}this.markSync(e.id),this.pubsub.publish("account"),this.cache.put("convo_"+e.id,e)}matchLastPluginRun(t){return(this.kv.match("plugin_run_logs")||{})[t]}matchLastBotRun(t){return(this.kv.match("bot_run_logs")||{})[t]}logBotRun(t){let e=this.kv.match("bot_run_logs")||{};e[t]={bot_id:t,created:this.now()},this.kv.put("bot_run_logs",e)}sendImpression(t){let e=this.cache.match("user")||{},n=this.kv.match("plugin_run_logs")||{};return n[t]={web_plugin_id:t,created:this.now()},this.kv.put("plugin_run_logs",n),this.api.sendImpression({account_id:e.account_id,campaign_id:t,web_plugin_id:t,user_id:e.id,url:window.location.href,device:this.device})}sendConversion(e,n,i){let r=this.cache.match("user")||{},o={account_id:r.account_id,user_id:r.id,fields:n},s=this.kv.match("conversions")||{};return s[e]=!0,this.kv.put("conversions",s),this.api.sendConversion({account_id:r.account_id,web_plugin_id:e,campaign_id:e,user_id:t.A.get(r,"id"),url:window.location.href,device:this.device,submission:o,impression_token:i})}isConverted(t){return(this.kv.match("conversions")||{})[t]}async listmessageapi(e,n,i){let r=e;if(r&&r.startsWith("cslight"))return[fakeevents,"",void 0,!0];let{body:o,code:s,error:a}=await this.api.listMessages(r,-i,n);if(a||200!==s)return[[],n,a];n=t.A.get(t.A.last(o),"id"),o=t.A.map(o,e=>(e.created=t.A.getMs(e.created),{id:e.id,index:e.created,value:e}));let p=this.cache.match("user")||{};for(let e=0;e<o.length;e++){let n=o[e].value;if("message_sent"===n.type&&t.A.get(n,"by.id")!==p.id){if(t.A.find(t.A.get(n,"data.message.pongs"),t=>t.member_id===p.id))break;this._alreadyReceived[n.id]||(this._alreadyReceived[n.id]=!0,this.api.markAsReceived(r,n.id));break}}return[o,n,void 0,t.A.size(o)<i]}async loopTime(){if(this._die)return;let e=this.now();if(!this.cache||!t.A.get(this.cache.match("user"),"id"))return t.A.setTimeout(()=>this.loopTime(),24e4);let{body:n,error:i}=await this.api.time();if(i)return t.A.setTimeout(()=>this.loopTime(),3e4);var r=Math.abs(this.now()-e)/2,o=new t.A.Date(n).getTime()+r,s=this.now();this.timeDiff=Math.floor(o-s),t.A.setTimeout(()=>this.loopTime(),24e4)}replaceFileUrl(e){return e?t.A.startsWith(e,"/")||t.A.startsWith(e,"data:")?e:(t.A.startsWith(e,"http://")||t.A.startsWith(e,"https://")||t.A.startsWith(e,"//")||(e=t.A.trim(this.FileURL,"/")+"/"+t.A.trimStart(e,"/")),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace("https://file-subiz.com/",this.FileURL)).replace("http://file-subiz.com/",this.FileURL)).replace("https://file-v4.subiz.com/",this.FileURL)).replace("http://file-v4.subiz.com/",this.FileURL)).replace("https://filev4.subiz.com/",this.FileURL)).replace("http://filev4.subiz.com/",this.FileURL)).replace("https://filev4-1.subiz.com/",this.FileURL)).replace("http://filev4-1.subiz.com/",this.FileURL)).replace("https://file.subiz.com/",this.FileURL)).replace("http://file.subiz.com/",this.FileURL)).replace("https://file.mysubiz.com/",this.FileURL)).replace("http://file.mysubiz.com/",this.FileURL)):""}clearBrowserData(){t.A.each(this.cookie.all(),(t,e)=>{(e||"").startsWith("__sb")&&this.cookie.remove(e)}),this.kv&&this.kv.destroy(),this.kv=new f(new d("sbz2023",this.inmem),"kv"),this.chain&&this.chain.destroy(),this.chain=new m(new d("cbz2023",!0),"ch"),this.realtime&&this.realtime.stop(),this.cache&&this.cache.destroy(),this.pubsub.publish("destroy")}destroy(){this._die=!0,this.clearBrowserData(),t.A.clearInterval(this._seenInterval),this.realtime&&this.realtime.stop(),this.readyGate.close(),window.removeEventListener("blur",this.sendPresence),window.removeEventListener("focus",this.sendPresence)}}const E=["image/gif","image/jpeg","image/png","image/svg+xml"],L={data:{},get(t,e){return this.data[t]||e},set(t,e){return this.data[t]=t},all(){return this.data},remove(t){delete this.data[t]}};function P(t,e,n){document.dispatchEvent(new CustomEvent("subiz",{detail:{category:t,action:e,label:n}})),function(t,e,n){window.sbz_no_gtag?console.log("SKIPSENT.",t,e,n):((window.dataLayer||[]).push({event:t,event_action:e,event_label:n}),window.gtag&&window.gtag("event",t,{Action:e,Label:n}),window.ga&&window.ga.getAll&&(window.ga.getAll()||[]).forEach(function(i){const r=i.get("name");window.ga(r+".send","event",t,e,n)}))}(t,e,n),function(t,e,n){window.fbq&&window.fbq("trackCustom",t,{action:e,label:n})}(t,e,n)}let N=()=>{try{localStorage}catch(t){return}t.A.setTimeout(()=>{for(var t in localStorage)t&&(t.startsWith("cbz2020")||t.startsWith("sbz2020"))&&(localStorage.removeItem(t),S.removeItem(t))})},R=()=>{try{localStorage}catch(t){return}t.A.setTimeout(()=>{for(var t in localStorage)t&&(t.startsWith("cbz2020")||t.startsWith("sbz2020")||t.startsWith("sbz2022")||t.startsWith("sbz2023"))&&(localStorage.removeItem(t),S.removeItem(t))})};var U=function(e,n,i,r){if(void 0===t.A.XMLHttpRequest)return function(t,e,n,i){let r={};n&&(r["content-type"]="text/plain"),fetch(e,{method:t,headers:r,body:n}).then(t=>t.text().then(e=>i&&i(e,t.status))).catch(t=>i&&i(t,-1))}(e,n,i,r);var o=new t.A.XMLHttpRequest;o.onreadystatechange=function(t){4===o.readyState&&(r&&r(o.responseText,o.status),r=void 0)},o.onerror=function(){r&&r(o.responseText,-1),r=void 0},o.open(e,n),i&&o.setRequestHeader("content-type","text/plain"),o.send(i)};const W=new Error("sdk unloaded");var F=o(2840),O=o(172),G=o(2959),H=o(7072),B=o(1108);let Z=o(2538);class q extends F.Mw{constructor(e){super(e),this.state={hasPreviewDom:!1,previewExtraCls:"hidden",previewEvent:{},ready:!1},this.readyGate=new t.A.Gate,this.prepareButtonImage(),this.props.store.onUpdate(this,t=>this.forceUpdate()),this.props.store.onConvoEvent(this,e=>{if("message_sent"!==t.A.get(e,"type"))return;let n=t.A.get(e,"by.type");if("system"!==n&&"agent"!==n&&"bot"!==n)return;let i=!1;t.A.map(t.A.get(e,"data.message.attachments",[]),t=>{t&&"quick_replies"===t.type&&(i=!0)});let r=t.A.get(e,"data.message.format"),o=t.A.get(e,"data.message.block");if(o||"block"==r){if(t.A.isBlockEmpty(o)&&i)return}else if(!t.A.get(e,"data.message.text")&&i)return;let s=t.A.get(this.props.store.matchLastview(),"screen"),a=t.A.get(this.props.store.matchLastview(),"minimized");if("widget"!==s&&!(a&&Date.now()-a<$)){if(this.props.store.isMobile()&&t.A.get(this.props.plugin,"chatbox.greeting.mobile_disabled"))return this.props.store.updateLastview({screen:"button",previewEvent:e}),void this.forceUpdate();if("acsbdpjwipneldivgwcr"===t.A.get(this.props.store.matchAccount(),"id")){let n=t.A.convoOfEv(e);n&&this.props.onNewMessageShowWidget&&this.props.onNewMessageShowWidget(n)}else this.props.store.updateLastview({screen:"preview",previewEvent:e});this.forceUpdate()}}),this.props.store.onLastview(this,()=>{let e=t.A.get(this.props.store.matchLastview(),"screen"),n=t.A.get(this.props.store.matchLastview(),"previewEvent")||{};"preview"===e&&t.A.size(n)>0?this.makeAnimateShowPreview(n):this.makeAnimateHidePreview()}),this.loadGreeting()}fixMissingSetting(e){return e=t.A.cloneDeep(e),t.A.get(e,"desktop_button.background_image_url")&&(e.desktop_button.background_image_url=this.props.store.replaceFileUrl(e.desktop_button.background_image_url)),t.A.get(e,"desktop_button.background_mask_url")&&(e.desktop_button.background_mask_url=this.props.store.replaceFileUrl(e.desktop_button.background_mask_url)),t.A.get(e,"mobile_button.background_image_url")&&(e.mobile_button.background_image_url=this.props.store.replaceFileUrl(e.mobile_button.background_image_url)),t.A.get(e,"mobile_button.background_mask_url")&&(e.mobile_button.background_mask_url=this.props.store.replaceFileUrl(e.mobile_button.background_mask_url)),e}render(){let e=this.props.plugin.chatbox,n=t.A.get(e,"desktop_button.position")||"right";if(this.props.store.isMobile()&&(n=t.A.get(e,"mobile_button.position")||n,t.A.get(e,"mobile_button.hidden")))return null;if(t.A.get(e,"desktop_button.hidden"))return null;let i="widget-layout widget-layout--"+n;return this.props.isShow||(i+=" widget-layout--hidden"),(0,O.h)("div",{class:i},this.renderPreview(),this.renderButton())}pickBestGreeting(){let e=this.props.store.matchConvo("*"),n=t.A.filter(e,e=>!t.A.isConvoSeen(e,this.props.store.matchUser().id)).sort((e,n)=>t.A.get(n,"last_message_sent.created",0)-t.A.get(e,"last_message_sent.created",0));if(0==t.A.size(n)){if(this.props.store.isMobile()&&"acqjeefqeaoiagyfprap"===t.A.get(this.props.plugin,"chatbox.account_id",{}))return;let e=t.A.get(this.props.plugin,"chatbox.greeting",{}),n=this.props.store.matchAgent("*"),i=e.agent_id;i||(i=function(e){var n=t.A.filter(e,t=>"agent"===t.type);return n[Math.floor(Math.random()*t.A.size(n))]||{}}(n).id);let r=this.props.t.i18n(t.A.get(e,"greeting",{}))||e.message;return r?{by:{id:i,type:"agent"},data:{message:{text:r,format:"plaintext"}}}:{}}return n[0].last_message_sent}showPreview(t){this.props.store.updateLastview({screen:"preview",previewEvent:t})}async makeAnimateShowPreview(e){await this.readyGate.entry();let n=this.getAgentOfPreviewEvent(e);if(await t.A.preloadImg(n.avatar_url),this.state.hasPreviewDom)return this.setState({previewExtraCls:"hidden"}),this._animateTimeout&&clearTimeout(this._animateTimeout),void(this._animateTimeout=setTimeout(()=>{this.setState({previewExtraCls:"",previewEvent:e})},200));this.setState({hasPreviewDom:!0,previewExtraCls:"hidden",previewEvent:{}}),this._animateTimeout&&clearTimeout(this._animateTimeout),this._animateTimeout=setTimeout(()=>{this.setState({previewExtraCls:"",previewEvent:e})},200)}makeAnimateHidePreview(){this._animateTimeout&&clearTimeout(this._animateTimeout),this.setState({previewExtraCls:"hidden"}),this._animateTimeout=setTimeout(()=>{this.setState({hasPreviewDom:!1,previewEvent:{}})},200)}ShowGreeting(){let t=this.pickBestGreeting();this.showPreview(t)}HideGreeting(){this.props.store.updateLastview({screen:"button",minimized:Date.now(),previewEvent:{}})}loadGreeting(){let e=t.A.get(this.props.store.matchLastview(),"minimized");if("preview"!==t.A.get(this.props.store.matchLastview(),"screen"))return;if(e&&Date.now()-e<$)return;let n=t.A.get(this.props.store.matchLastview(),"previewEvent")||{};if(t.A.size(n)>0)return void this.showPreview(n);let i=this.props.plugin.chatbox,r=t.A.get(i,"greeting",{}),o=this.props.t.i18n(t.A.get(r,"greeting",{}))||r.message,s=r.enabled,a=this.props.store.isMobile()&&r.mobile_disabled;o&&s&&!a&&this.ShowGreeting()}onClick(){let e=this.props.store.matchLastview();return t.A.get(e,"view")&&("list"!==e.view||t.A.size(this.props.store.matchConvo("*"))>0)&&("chat"!=e.view||t.A.get(e,"opts.cid"))?this.props.onClick&&this.props.onClick(Object.assign({},e.opts,{view:e.view})):this.onPreviewClick()}onPreviewClick(e){let n=t.A.get(this.props.store.matchLastview(),"previewEvent")||{},i=t.A.convoOfEv(n);if(!i){let e=t.A.map(this.props.store.matchConvo("*")),n=t.A.find(e,e=>!t.A.isConvoSeen(e,this.props.store.matchUser().id));n||(n=e[0]||{}),i=n.id}this.props.onClick&&this.props.onClick({view:"chat",cid:i})}renderUnread(){let t=this.props.store.matchUnread();return 0===t?null:(0,O.h)("div",{class:"chat-button--unread"},t)}getAgentOfPreviewEvent(e){let n=this.props.store.matchAccount(),i=this.props.plugin.chatbox,r=e,s=t.A.get(r,"by.display_id",t.A.get(r,"by.id")),a=this.props.store.matchAgent(s);return a||(a=this.props.store.matchAgent("*")[s]||{}),a=t.A.cloneDeep(a),a.fullname=a.fullname||t.A.get(n,"name")||this.props.t("agent"),a.avatar_url=a.avatar_url||n.logo_url||o(3582),i&&i.hide_agent_profile&&(a=Object.assign({},n,{avatar_url:n.logo_url||o(3582),fullname:n.name||this.props.t("agent")})),a}renderPreview(){if(!this.state.hasPreviewDom)return;let e=this.state.previewEvent,n=this.getAgentOfPreviewEvent(e),i=(this.props.store.matchAccount(),this.props.plugin.chatbox),r=t.A.get(i,"desktop_button.position")||"right";this.props.store.isMobile()&&(r=t.A.get(i,"mobile_button.position")||r);let o=this.renderMessagePreview(e),s=t.A.get(e,"data.message.attachments")||[],a=t.A.find(s,t=>"quick_replies"===t.type);a=t.A.get(a,"quick_replies")||[],a=t.A.take(a,10),t.A.get(i,"greeting.hide_quick_replies")&&(a=[]);let p=t.A.find(s,e=>t.A.includes(e.mimetype,"image")&&e.url),l=t.A.get(p,"url")||"";return!l||l.startsWith("https://")||l.startsWith("http://")||l.startsWith("content://")||l.startsWith("data:")||(l=this.props.store.FileURL+l),(0,O.h)("div",{class:`widget-preview-new-wrapper ${this.state.previewExtraCls}`},(0,O.h)("div",{class:`widget-preview-x-wrapper ${r} ${this.props.store.isMobile()?"mobile":""}`},(0,O.h)("div",{class:"widget-preview--btn-close",onClick:t=>this.closePreview(t)})),(0,O.h)("div",{class:`widget-preview-text-message ${r}`,onClick:t=>this.onPreviewClick(t)},(0,O.h)("div",{class:"widget-preview-text-message--header"},(0,O.h)("img",{alt:"widget avatar",class:"widget-preview--avatar",src:this.props.store.replaceFileUrl(n.avatar_url)}),(0,O.h)("div",{class:"widget-preview-text-message--author"},(0,O.h)("div",{class:"widget-preview-text-message--author-text"},n.fullname),i.is_online&&(0,O.h)("div",{class:"badge badge--success"},(0,O.h)("div",{class:"dot dot--success mr-1"}),"ONLINE"))),(0,O.h)("div",{class:"widget-preview-text-message--content"},o)),l&&(0,O.h)("div",{class:`widget-preview-image-wrapper ${r}`},(0,O.h)("div",{class:"widget-preview-image-item",onClick:()=>this.onPreviewClick()},(0,O.h)("img",{src:l}))),t.A.size(a)>0&&(0,O.h)("div",{class:`widget-preview-quick-reply-wrapper ${r} ${t.A.size(a)>4?"horizontal":""}`},t.A.map(a,n=>{if((n.title||"").trim())return(0,O.h)("div",{title:n.title,class:"widget-preview-quick-reply-item",onClick:()=>{this.props.onSelectQuickReply({text:n.title,format:"plaintext",conversation_id:t.A.convoOfEv(e),attachments:[{type:"postback",postback:{event_id:e.id,payload:n.payload}}]})}},n.title)})))}async prepareButtonImage(){let e=this.props.plugin.chatbox;e=this.fixMissingSetting(e);let n=t.A.get(e,"desktop_button.background_image_url")||t.A.get(e,"desktop_button.background_mask_url")||B;this.props.store.isMobile()&&(n=t.A.get(e,"mobile_button.background_image_url")||t.A.get(e,"mobile_button.background_mask_url")||n),n=this.props.store.replaceFileUrl(n),await t.A.preloadImg(n),this.setState({ready:!0}),this.readyGate.open()}renderButton(){"undefined"!=typeof sbz_info&&(sbz_info.render_chatbox_button=t.A.Date.now());let e=this.props.plugin.chatbox;e=this.fixMissingSetting(e);let n=t.A.get(e,"desktop_button.background_image_url")||t.A.get(e,"desktop_button.background_mask_url")||B,i=t.A.get(e,"background")||J,r=t.A.get(e,"desktop_button.position")||"right",o=t.A.get(e,"desktop_button.background_image_url"),s=t.A.get(e,"desktop_button.background_mask_url"),a=t.A.get(e,"desktop_button.width")||70,p=t.A.get(e,"desktop_button.height")||70;if(this.props.store.isMobile()){n=t.A.get(e,"mobile_button.background_image_url")||t.A.get(e,"mobile_button.background_mask_url")||n,r=t.A.get(e,"mobile_button.position")||r;let i=t.A.get(e,"mobile_button.background_image_url"),l=t.A.get(e,"mobile_button.background_mask_url");a=t.A.get(e,"mobile_button.width")||70,p=t.A.get(e,"mobile_button.height")||70,(i||l)&&(o=i,s=l)}let l="chat-button--white-bg";!o&&s&&(l+=" chat-button--white-bg--mask-only");let c="";o=this.props.store.replaceFileUrl(o),n=this.props.store.replaceFileUrl(n),s=this.props.store.replaceFileUrl(s),o||s||(l+=" chat-button--white-bg--mask-only",c=`\n\t\t\t\t-webkit-mask-image: url("${encodeURI(V)}") !important;\n\t\t\t\t-o-mask-image: url("${encodeURI(V)}") !important;\n\t\t\t\t-moz-mask-image: url("${encodeURI(V)}") !important;\n\t\t\t\tmask-image: url("${encodeURI(V)}") !important;\n\t\t\t\theight: ${p}px !important;\n\t\t\t\twidth: ${a}px !important;\n\t\t\t\tbackground: ${i} !important;\n\t\t\t\tbackground: ${i} !important;\n mask-size: cover !important;\n -webkit-mask-size: cover !important;\n -o-mask-size: cover !important;\n -moz-mask-size: cover !important;\n mask-size: cover !important;\n\t\t\t`),o&&s&&(c=`\n\t\t\t\t-webkit-mask-image: url("${encodeURI(s)}") !important;\n\t\t\t\t-o-mask-image: url("${encodeURI(s)}") !important;\n\t\t\t\t-moz-mask-image: url("${encodeURI(s)}") !important;\n\t\t\t\tmask-image: url("${encodeURI(s)}") !important;\n\t\t\t\tbackground-image: url("${encodeURI(o)}") !important;\n\t\t\t\tbackground-repeat: no-repeat !important;\n -webkit-mask-size: cover !important;\n -o-mask-size: cover !important;\n -moz-mask-size: cover !important;\n mask-size: cover !important;\n\t\t\t`),o&&!s&&(c=`\n\t\t\t\tbackground-image: url("${encodeURI(o)}") !important;\n\t\t\t\tbackground-repeat: no-repeat !important;\n\t\t\t`),!o&&s&&(c=`\n\t\t\t\t-webkit-mask-image: url("${encodeURI(s)}") !important;\n\t\t\t\t-o-mask-image: url("${encodeURI(s)}") !important;\n\t\t\t\t-moz-mask-image: url("${encodeURI(s)}") !important;\n\t\t\t\tmask-image: url("${encodeURI(s)}") !important;\n\t\t\t\theight: ${p}px !important;\n\t\t\t\twidth: ${a}px !important;\n\t\t\t\tbackground: ${i} !important;\n -webkit-mask-size: cover !important;\n -o-mask-size: cover !important;\n -moz-mask-size: cover !important;\n mask-size: cover !important;\n\t\t\t`);let d="chat-button chat-button--"+r,m=`\n\t\t\twidth: ${a-4}px !important;\n\t\t\theight: ${p-4}px !important;\n\n `;return this.state.ready||(d+=" hidden"),(0,O.h)("div",{class:d,onClick:t=>this.onClick(t)},(0,O.h)("div",{class:l,style:m}),(0,O.h)("div",{class:"chat-button--img-container",style:c},(0,O.h)("img",{width:"70",height:"70",alt:"chat button",class:"chat-button--img",src:n})),this.renderUnread())}onProfileError(t){t.target.src=Z,this.onProfileReady()}onChatButtonError(t){this._onChatButtonErrorExecuted||(this._onChatButtonErrorExecuted=!0,t.target.src=B)}renderMessagePreview(e,n){n=n||this.props.t("sent_you_a_message");let i=t.A.get(e,"data.message.format"),r=t.A.get(e,"data.message.block");if(r||"block"==i){if(t.A.isBlockEmpty(r)){let i=t.A.get(e,"data.message.attachments");return t.A.size(i)>0?(0,O.h)("div",null,`${this.props.t("send")} ${t.A.size(i)} ${t.A.size(i)>1?this.props.t("attachments"):this.props.t("attachment")}`):n}return(0,O.h)(H.A,{block:r})}let o=t.A.get(e,"data.message.text",n);return!o&&t.A.size(t.A.get(e,"data.message.attachments"))>0&&(o=n),o?(t.A.get(e,"by.type"),t.A.extractText(o).map(t=>"emoji"===t.type?(0,O.h)(G.A,{emojiCode:t.text}):t.text)):null}closePreview(t){t&&(t.preventDefault(),t.stopPropagation()),this.HideGreeting()}}const $=18e5,V="https://vcdn.subiz-cdn.com/file/bubble_11.svg?v=5",J="linear-gradient(280.16deg, #0053d3 22.03%, #0265ff 78.2%)";var Y=o(9529);function Q(t){if(t.store.isMobile())return null;if(t.store.isAIDevMode())return null;let e=t.store.matchUser()||{};var n=`https://subiz.com.vn/?utm_source=${window.location.host||`id-${e.account_id}`}&utm_medium=widget&utm_campaign=widget_referral`;return(0,O.h)("div",{class:"poweredby"},(0,O.h)("a",{href:n,class:"poweredby--text",target:"_blank",title:"Subiz"},(0,O.h)("img",{width:"17",height:"12",class:"poweredby--subiz-logo",src:Y,alt:"powerred by subiz"})," Subiz"))}function X(e){let n=e.plugin.chatbox,i=e.store.matchAccount()||{};var r=e.tooltipPos||"bottom",s=e.mode||"primary";if(n&&n.hide_agent_profile)return(0,O.h)("div",{class:`group-avatar group-avatar--${s}`},(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":i.name,"data-tooltip-position":r},(0,O.h)("img",{width:35,height:35,alt:"agent avatar left",class:"avatar group-avatar--agent-left",src:e.store.replaceFileUrl(i.logo_url)||o(3582)})));let a=e.store.matchAgent("*");var p=t.A.map(e.agent_ids,t=>a[t]);if(void 0!==e.agent_ids&&0==t.A.size(e.agent_ids)){var l=t.A.get(n,"header.agent_ids",[]);p=0!==(l=t.A.filter(l,t=>!!a[t])).length?t.A.map(l,t=>a[t]):t.A.filter(a,t=>"agent"===t.type)}if(p=t.A.filter(p,t=>!!t),0===t.A.size(p))return(0,O.h)("div",{class:`group-avatar group-avatar--${s}`},(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":i.name,"data-tooltip-position":r},(0,O.h)("img",{width:35,height:35,alt:"agent avatar left",class:"avatar group-avatar--agent-left",src:e.store.replaceFileUrl(i.logo_url)||o(3582)})));if(1===p.length){var c=p[0];let t=c.avatar_url||e.store.replaceFileUrl(i.logo_url)||o(3582);var d="primary"===s?"group-avatar--agent-middle":"group-avatar--agent-left";return(0,O.h)("div",{class:`group-avatar group-avatar--${s}`},(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":c.fullname||i.name,"data-tooltip-position":r},(0,O.h)("img",{width:35,height:35,class:`avatar ${d}`,alt:"agent avatar",src:t})))}if(2===p.length){let t=p[0],n=p[1];return(0,O.h)("div",{class:`group-avatar group-avatar--${s}`},(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":t.fullname||i.name,"data-tooltip-position":r},(0,O.h)("img",{width:35,height:35,alt:"agent avatar left",class:"avatar group-avatar--agent-left",src:e.store.replaceFileUrl(t.avatar_url)||e.store.replaceFileUrl(i.logo_url)||o(3582)})),(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":n.fullname||i.name,"data-tooltip-position":r},(0,O.h)("img",{alt:"agent avatar right",width:35,height:35,class:"avatar group-avatar--agent-right",src:e.store.replaceFileUrl(n.avatar_url)||e.store.replaceFileUrl(i.logo_url)||o(3582)})))}let m=p[0],h=p[1],u=p[2];return(0,O.h)("div",{class:`group-avatar group-avatar--${s}`},(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":m.fullname||i.name,"data-tooltip-position":r},(0,O.h)("img",{width:35,height:35,alt:"agent avatar left",class:"avatar group-avatar--agent-left",src:e.store.replaceFileUrl(m.avatar_url)||e.store.replaceFileUrl(i.logo_url)||o(3582)})),(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":h.fullname||i.name,"data-tooltip-position":r},(0,O.h)("img",{alt:"agent avatar middle",width:35,height:35,class:"avatar group-avatar--agent-middle",src:e.store.replaceFileUrl(h.avatar_url)||e.store.replaceFileUrl(i.logo_url)||o(3582)})),(0,O.h)("div",{class:"d-inline-block pos-relative","data-tooltip":u.fullname||i.name,"data-tooltip-position":r},(0,O.h)("img",{width:35,height:35,alt:"agent avatar right",class:"avatar group-avatar--agent-right",src:e.store.replaceFileUrl(u.avatar_url)||e.store.replaceFileUrl(i.logo_url)||o(3582)})))}class K extends F.Mw{constructor(e){var n,i,r;super(e),n=this,r=()=>{let e=this.props.plugin.chatbox||{},n=t.A.get(e,"header.agent_ids")||[],i=t.A.get(this.props.store.matchAgent(n[0])),r=t.A.get(i,"avatar_url_128")||t.A.get(i,"avatar_url");if(r)return(0,O.h)("img",{width:38,height:38,class:"avatar avatar__account",src:this.props.store.replaceFileUrl(r)||o(3763)})},(i=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(i="renderAgentAvatar"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r}renderAccountAvatar(){let e=this.props.store.matchAccount()||{},n=this.props.plugin.chatbox||{},i=t.A.get(n,"header.logo_url")||t.A.get(e,"logo_url");return i?(0,O.h)("img",{width:38,height:38,alt:e.name,class:"avatar avatar__account",src:this.props.store.replaceFileUrl(i)||o(3763)}):null}render(){let e="widget-header",n=!1,i=!1,r=this.props.plugin.chatbox||{},o=t.A.get(r,"header.layout"),s="list"!==this.props.view&&!0,a=!s&&"classic"===o;return s||"classic"==o?e+=" widget-header--collapsed":(e+=" widget-header--convo-expanded",n="social"===o,i=!(n||a)),(0,O.h)("div",{class:e},this.renderCollapsedHeader(s||a,a),this.renderSocial(n),this.renderTeam(i))}renderCollapsedHeader(e,n){let i=this.props.plugin.chatbox||{},r=(this.props.store.matchAccount()||{}).is_online?this.props.t("agent_online"):this.props.t("agent_offline"),o=t.A.get(i,"tagline",{}),s=this.props.t.i18n(o)||i.introduction||r,a=(t.A.map(this.getAgentJoined(this.props.cid),t=>t.id),"widget-header--inner widget-header--inner--collapsed");e||(a+=" widget-header--inner--hidden");let p=null,l="";n?l="padding-bottom: 75px !important;":p=this.renderBackButton();let c=t.A.get(i,"header.layout");return(0,O.h)("div",{class:a,style:l},p,"agent"===c?this.renderAgentAvatar():this.renderAccountAvatar(),(0,O.h)("div",{class:"widget-header--title-container"},(0,O.h)("div",{class:"widget-header--title"},this.getTitle()),(0,O.h)("div",{class:"widget-header--description",title:s},s)),this.renderCloseButton())}renderSocial(e){let n=this.props.plugin.chatbox||{},i=this.props.store.matchAccount()||{},r=t.A.get(n,"header.links")||[],o=t.A.map(r,t=>t.url&&t.type&&"subiz"!==t.type?"email"===t.type?(0,O.h)("div",null,(0,O.h)("a",{href:`mailto:${t.url}`,title:t.url},(0,O.h)("i",{class:`social__links-logo social__links-logo--${t.type}`}))):(0,O.h)("div",null,(0,O.h)("a",{href:t.url,target:"_blank",title:t.url},(0,O.h)("i",{class:`social__links-logo social__links-logo--${t.type}`}))):null),s=t.A.get(n,"tagline",{});var a=this.props.t.i18n(s)||n.introduction||this.props.t("team_intro")||"Chúng tôi sẵn sàng trợ giúp :wave:.\nVui lòng hỏi chúng tôi bất cứ điều gì hoặc chia sẻ phản hồi của bạn",p=t.A.extractText(a).map(t=>"emoji"===t.type?(0,O.h)(G.A,{emojiCode:t.text}):t.text);let l="widget-header--inner widget-header--inner--expanded";return e||(l+=" widget-header--inner--hidden"),(0,O.h)("div",{class:l},(0,O.h)("div",{class:"widget-header-expand-container"},(0,O.h)("div",{class:"widget-header--top-wrapper"},(0,O.h)("div",{class:"widget-header--title"},this.getTitle()),this.renderCloseButton()),(0,O.h)("div",{class:"widget_header__body widget_header__body__social"},(0,O.h)("img",{alt:"logo",class:"social__account_logo",src:this.props.store.replaceFileUrl(t.A.get(n,"header.logo_url")||t.A.get(i,"logo_url"))}),(0,O.h)("div",null,(0,O.h)("div",{class:"social__introduction"},p),(0,O.h)("div",{class:"social__links"},o)))))}renderTeam(e){let n=this.props.plugin.chatbox||{},i=t.A.get(n,"tagline",{});var r=this.props.t.i18n(i)||n.introduction||this.props.t("team_intro")||"Chúng tôi sẵn sàng trợ giúp :wave:.\nVui lòng hỏi chúng tôi bất cứ điều gì hoặc chia sẻ phản hồi của bạn",o=t.A.extractText(r).map(t=>"emoji"===t.type?(0,O.h)(G.A,{emojiCode:t.text}):t.text);let s="widget-header--inner widget-header--inner--expanded";return e||(s+=" widget-header--inner--hidden"),(0,O.h)("div",{class:s},(0,O.h)("div",{class:"widget-header-expand-container"},(0,O.h)("div",{class:"widget-header--top-wrapper"},(0,O.h)("div",{class:"widget-header--title"},this.getTitle()),this.renderCloseButton()),(0,O.h)("div",{class:"widget_header__body"},(0,O.h)("div",{class:"widget-header--avatar-wrapper"},(0,O.h)(X,{plugin:this.props.plugin,store:this.props.store,mode:"primary",agent_ids:[]})),(0,O.h)("div",{class:"widget-header--title-container"},(0,O.h)("div",{class:"widget-header--description"},o)))))}getTitle(){let e=this.props.plugin.chatbox||{},n=this.props.store.matchAccount()||{},i=this.getAgentJoined(this.props.cid),r=t.A.get(this.props.plugin,"chatbox.caption",{}),o=this.props.t.i18n(r)||e.title;return tt(i)||o||n.name||this.props.t("widget_title")}renderBackButton(){let e=this.props.store.matchConvo("*");if(0===t.A.size(e))return null;var n=null;let i=this.props.store.matchUser();if(!i||!i.id)return null;let r=0;return t.A.map(e,e=>{e.id!=this.props.cid&&(t.A.isConvoSeen(e,i.id)||r++)}),0!==r&&(n=(0,O.h)("span",{class:"widget-header--total-unread-convo"},r)),(0,O.h)("div",{class:"widget-header--wrap-button-back "+(r?"widget-header--has-convo-unred":""),onClick:t=>this.onBackClick(t)},(0,O.h)("div",{class:"widget-header--button-back","data-tooltip":this.props.t("menu_back")}),n)}renderCloseButton(){return(this.props.plugin.chatbox||{}).hide_close_button?null:this.props.store.isEmbededChatMode()?void 0:(0,O.h)("div",{class:"widget-header--button-close","data-tooltip":this.props.t("close"),"data-tooltip-position":"bottom",onClick:t=>this.onCloseClick(t)},(0,O.h)("span",{class:"widget-header--button-close-icon"}))}onBackClick(t){t.stopPropagation(),t.preventDefault(),this.props.onGotoList&&this.props.onGotoList()}onCloseClick(t){t.stopPropagation(),t.preventDefault(),this.props.onClose&&this.props.onClose()}getAgentJoined(e){var n=this.props.store.matchConvo(e)||{};return t.A.filter(n.members,t=>"agent"===t.type&&"active"===t.membership)}}let tt=e=>(e=t.A.filter(e,e=>t.A.trim(e.fullname))).length?t.A.map(e,t=>t.fullname).join(", "):null;var et=o(4188);class nt extends F.Mw{constructor(e){var n,i,r;super(e),n=this,i="onEnter",r=t.A.throttle(function(){this.submitMessage()},50),(i=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(i))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.refFileInput=(0,O._3)(),this.refMessageInput=(0,O._3)(),this.props.store.onUpdate(this,t=>this.forceUpdate()),this.props.store.onConvoEvent(this,e=>{t.A.convoOfEv(e)===this.props.cid&&this.forceUpdate()}),this.focus(),this._forceUpdate=t.A.throttle(()=>{this.forceUpdate()},500),this.resizeInput=t.A.throttle(function(){const t=this.refMessageInput.current;t.style.setProperty("height","1em","important");const e=Math.min(200,t.scrollHeight);t.style.setProperty("height",`${e}px`,"important")},5)}blur(){const t=this.refMessageInput.current;t&&t.blur()}render(){var e=(0,O.h)("div",{class:"d-flex flex-row align-self-end"},this.renderEmoji(),(0,O.h)("div",{"data-tooltip-poasition":"top-left",class:"message-input--button message-input--attachment-button",onClick:t=>this.selectFile(t)}));t.A.trim(this.state.msgValue).length>0&&(e=(0,O.h)("div",{class:"d-flex flex-row align-self-end"},this.renderEmoji(),(0,O.h)("div",{"data-tooltip-position":"top-left",class:"message-input--button message-input--send-button",onClick:()=>this.submitMessage()}))),this.props.is_loading&&(e=(0,O.h)("div",{class:"d-flex flex-row align-self-end"},(0,O.h)(et.A,{size:"32"})));var n="",i=this.hasUnfinishRequiredFormOrLock()||this.props.disabled;return(i||this.props.is_loading)&&(n="message-input--disabled"),(0,O.h)("div",{class:`message-input ${n}`,onClick:t=>{this.refMessageInput.current&&this.refMessageInput.current.focus()}},(0,O.h)("input",{class:"d-none",ref:this.refFileInput,type:"file",onChange:t=>this.sendFile(t),multiple:!0}),(0,O.h)("textarea",{disabled:i,class:"message-input--input",maxlength:"1024",placeholder:this.props.t("message_input_help").substr(0,25),ref:this.refMessageInput,rows:"1",value:this.state.msgValue,onInput:t=>this.onChange(t),onPaste:t=>this.pasteImage(t),"data-emojiable":"true",onKeydown:t=>this.onKeydown(t)}),e)}hasUnfinishRequiredFormOrLock(){let e=this.props.store.matchConvo(this.props.cid);if("ended"===t.A.get(e,"state"))return!1;let n=this.props.store.listEvents(this.props.cid);n=t.A.orderBy(n,"created","desc").filter(t=>"message_sent"===t.type);let i=t.A.get(n[0],"data.message.attachments",[]);if(t.A.find(i,e=>t.A.get(e,"lock_input")))return!0;var r;for(let e of n)if("user"!==t.A.get(e,"by.type")){r=e;break}i=t.A.get(r,"data.message.attachments",[]);let o=t.A.filter(i,e=>{if(!e)return!1;if("form"!==e.type&&"ask_info_form"!==e.type)return!1;var n=e.form;return!(!n||!(t.A.parseJSON(n.state)||{}).require_finished&&"ask_info_form"!==e.type||function(e){let n=t.A.get(e,"fields")||[];return t.A.find(n,t=>!!t.answered)}(e.form))});return t.A.size(o)>0}renderEmojiPopup(){return this.state.openEmoji?(0,O.h)("div",{class:"emoji-picker","v-clickaway":t=>this.setState({openEmoji:!1})},(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":like:"),"data-tooltip":":like:",class:"emoji-picker--item emoji--like"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":unlike:"),"data-tooltip":":unlike:",class:"emoji-picker--item emoji--unlike"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":angry:"),"data-tooltip":":angry:",class:"emoji-picker--item emoji--angry"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":confused:"),"data-tooltip":":confused:",class:"emoji-picker--item emoji--confused"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":crying:"),"data-tooltip":":crying:",class:"emoji-picker--item emoji--crying"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":grinning:"),"data-tooltip":":grinning:",class:"emoji-picker--item emoji--grinning"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":heart-eyes:"),"data-tooltip":":heart-eyes:",class:"emoji-picker--item emoji--heart-eyes"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":neutral:"),"data-tooltip":":neutral:",class:"emoji-picker--item emoji--neutral"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":sad:"),"data-tooltip":":sad:",class:"emoji-picker--item emoji--sad"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":sleepy:"),"data-tooltip":":sleepy:",class:"emoji-picker--item emoji--sleepy"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":smiling:"),"data-tooltip":":smiling:",class:"emoji-picker--item emoji--smiling"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":surprised:"),"data-tooltip":":surprised:",class:"emoji-picker--item emoji--surprised"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":tired:"),"data-tooltip":":tired:",class:"emoji-picker--item emoji--tired"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":tongue-out:"),"data-tooltip":":tongue-out:",class:"emoji-picker--item emoji--tongue-out"})),(0,O.h)("div",{class:"emoji-picker-background-item"},(0,O.h)("div",{onClick:()=>this.emojiPick(":wink:"),"data-tooltip":":wink:",class:"emoji-picker--item emoji--wink"}))):null}applyMessage(t){this.setState({msgValue:t}),this.resizeInput()}focus(){if(this.props.disabled)return;const e=document.activeElement;let n=!1;e&&("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=!0),e.hasAttribute("contenteditable")&&"true"===e.getAttribute("contenteditable")&&(n=!0)),n||(this.refMessageInput.current&&this.refMessageInput.current.focus(),t.A.setTimeout(()=>{this.refMessageInput.current&&this.refMessageInput.current.focus()}),t.A.setTimeout(()=>{this.refMessageInput.current&&this.refMessageInput.current.focus()},100))}renderEmoji(){return(0,O.h)("div",null,this.renderEmojiPopup(),(0,O.h)("div",{class:"message-input--button message-input--emoji-button",onClick:t=>this.toggleEmoji(t)}))}toggleEmoji(t){t.stopPropagation(),this.focus(),this.props.disabled||this.setState({openEmoji:!this.state.openEmoji})}emojiPick(t){const e=this.refMessageInput.current,n=e.selectionStart,i=this.state.msgValue||"";this.setState({openEmoji:!1,msgValue:[i.slice(0,n),t,i.slice(n)].join("")}),this.resizeInput(),e.focus()}onKeydown(t){if(13===t.keyCode&&!1===t.shiftKey)return this.onEnter(),t.preventDefault();this._forceUpdate(),this.sendTyping()}onChange(t){this.setState({msgValue:t.target.value}),this.resizeInput()}selectFile(){this.props.disabled||this.refFileInput.current.click()}sendFile(){let t=this.refFileInput.current;this._sendFile(t.files),t.value=""}_sendFile(e){if(0===t.A.size(e))return;if(this.props.disabled)return;let n=t.A.map(e,t=>({type:"file",mimetype:t.type,name:t.name,_file:t,size:t.size}));this.props.onSend&&this.props.onSend({attachments:n})}async submitMessage(e){(e=e||t.A.trim(this.state.msgValue)||"")&&(this.props.disabled||(this.props.onSend&&await this.props.onSend({text:e,format:"plaintext"}),this.setState({openEmoji:!1,msgValue:""}),this.resizeInput()))}sendTyping(){if(this.props.cid)return this.props.store.typing(this.props.cid)}pasteImage(e){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;let n=new t.A.Date;const i=`Paste-image-${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}-${n.getHours()}-${n.getMinutes()}-${n.getSeconds()}`;let r=null;const o=e.clipboardData.items[0];if(0===o.type.indexOf("image")&&(r=o.getAsFile()),!r)return;const s=[r,new ArrayBuffer],a=new File(s,`${i}.png`,{type:"image/png"});this._sendFile([a])}}class it extends F.Mw{constructor(t){var e,n,i;super(t),e=this,n="containerRef",i=(0,O._3)(),(n=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this.setState({ready:!1,errorIndecies:[],focusedIdx:-1})}componentDidMount(){this.setImageFrameDimension()}focusSourceEventFromQuote(e){if(e.id!==this.props.ev.id)return;let n=t.A.get(e,"data.message.fields")||[],i=t.A.find(n,t=>"attachment_index"===t.key),r=t.A.get(i,"value");try{r=JSON.parse(r)}catch(t){r=void 0}void 0!==r&&(this.setState({focusedIdx:r}),this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{this.setState({focusedIdx:-1})},3e3))}setImageFrameDimension(){let t=this.containerRef.current;this.frameWidth=t?t.parentNode.parentNode.offsetWidth:267,this.frameHeight=240,this.setState({ready:!0})}onErrorImage(t){let e=this.state.errorIndecies||[];e.push(t),e=[...e],this.setState({errorIndecies:e})}calculateImageDimension(t){if(!t.width||!t.height)return{width:this.frameWidth,height:this.frameHeight};if(t.width/t.height-this.frameWidth/this.frameHeight>=0){let e=this.frameWidth,n=t.height*this.frameWidth/t.width;return n=Math.round(n),{width:e,height:n}}{let e=this.frameHeight,n=t.width*this.frameHeight/t.height;return n=Math.round(n),{width:n,height:e}}}renderImage(e,n){if(!this.state.ready)return;let i=t.A.get(this.props.ev,"by.type");"user"!==i&&(i="agent");let r=`image-attachment image-attachment--${i}`;if(e._true_idx===this.state.focusedIdx&&(r+=" just-focused"),!e.width||!e.height)return(0,O.h)("div",{class:r},(0,O.h)("a",{href:this.props.store.replaceFileUrl(e.url),target:"_blank"},(0,O.h)("img",{alt:!0,class:"image-attachment__img",src:this.props.store.replaceFileUrl(e.thumbnail_url||e.url),onload:t=>this.props.onLoad&&this.props.onLoad()})));let{width:s,height:a}=this.calculateImageDimension(e),p=this.props.store.replaceFileUrl(e.thumbnail_url||e.url),l=this.props.store.replaceFileUrl(e.url);return this.state.errorIndecies.includes(n)&&(p=o(2876),l=p),(0,O.h)("div",{class:r},(0,O.h)("a",{href:l,target:"_blank"},(0,O.h)("img",{alt:!0,ref:t=>{t&&(t.style.setProperty("width",`${s}px`,"important"),t.style.setProperty("height",`${a}px`,"important"))},class:"image-attachment__img",src:p,onload:t=>this.props.onLoad&&this.props.onLoad(),onerror:t=>this.onErrorImage(n)})))}render(){var e=t.A.get(this.props.ev,"data.message.attachments",[]),n=[];let i=t.A.get(this.props.ev,"by.type");if("user"!==i&&(i="agent"),t.A.each(e,(e,i)=>{if(e&&t.A.includes(e.mimetype,"image")&&e.url){var r=e.url;r.startsWith("https://")||r.startsWith("http://")||r.startsWith("content://")||r.startsWith("data:")||(e.url=this.props.store.FileURL+r),n.push({...e,_true_idx:i})}}),0===n.length)return null;let r=t.A.map(n,(t,e)=>this.renderImage(t,e));return"agent"===i?(0,O.h)("div",{class:"message-agent",ref:this.containerRef},r):(0,O.h)("div",{class:"message-user message-user-images-container",ref:this.containerRef},r)}}function rt(e){let n=t.A.get(e.ev,"by.type");var i=t.A.get(e.ev,"data.message.attachments",[]),r=[];if(t.A.each(i,(e,n)=>{e&&t.A.includes(e.mimetype,"audio")&&r.push(e)}),0===r.length)return null;var o=t.A.map(r,(t,i)=>(0,O.h)("div",{key:i,class:`audio-attachment audio-attachment--${n}`},(0,O.h)("audio",{class:"audio-attachment__audio",controls:!0},(0,O.h)("source",{src:e.store.replaceFileUrl(t.url),type:t.mimetype}))));return(0,O.h)("div",{class:`message-${n} message-${n}-audio`},o)}class ot extends F.Mw{constructor(t){super(t),this.state={focusedIdx:-1}}render(){var e=t.A.get(this.props.ev,"by.type","agent");"user"!==e&&(e="agent");var n=t.A.get(this.props.ev,"data.message.attachments",[]),i=[];if(t.A.each(n,(e,n)=>{e&&(e.url||e._file)&&(t.A.includes(e.mimetype,"video")||t.A.includes(e.mimetype,"audio")||t.A.includes(e.mimetype,"image")||"button"===e.type||"quick_replies"===e.type||"form"===e.type||"form_submit"===e.type||i.push({...e,_true_idx:n}))}),0===i.length)return null;let r=t.A.map(i,(t,n)=>{let i=`file-attachment file-attachment--${e}`;return t._true_idx===this.state.focusedIdx&&(i+=" just-focused"),(0,O.h)("div",{key:n,class:i},(0,O.h)("a",{class:"file-attachment--link",href:this.props.store.replaceFileUrl(t.url),target:"_blank"},(0,O.h)("span",{class:"file-attachment--download mr-2"}),(0,O.h)("span",{class:"file-attachment--filename"},t.name)))});return(0,O.h)("div",{class:`message-${e}`},r)}focusSourceEventFromQuote(e){if(e.id!==this.props.ev.id)return;let n=t.A.get(e,"data.message.fields")||[],i=t.A.find(n,t=>"attachment_index"===t.key),r=t.A.get(i,"value");try{r=JSON.parse(r)}catch(t){r=void 0}void 0!==r&&(this.setState({focusedIdx:r}),this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{this.setState({focusedIdx:-1})},3e3))}}function st(e){if(0===t.A.size(e.buttons))return null;var n=t.A.map(e.buttons,(t,n)=>"call_button"===t.type?(0,O.h)("a",{class:"url-button-attachment",href:"tel:"+t.phone_number,key:n,title:t.title},e.t.i18n(t.i18n_title)||e.t.i18n(t.old_i18n_title)||t.title||`${e.t("call")} ${t.phone_number}`):"url_button"===t.type?(0,O.h)("a",{class:"url-button-attachment",href:t.url,target:"_blank",key:n,title:t.title},e.t.i18n(t.i18n_title)||e.t.i18n(t.old_i18n_title)||t.title||t.url):"postback_button"===t.type?(0,O.h)("a",{class:"url-button-attachment",href:"javascript:;",onClick:n=>e.onSelect(t)},e.t.i18n(t.i18n_title)||t.title):("widget_ask_desktop_notify_button"===t.type||t.type,null));return(0,O.h)("div",{class:"button-attachments"},n)}function at(e){if("user"===t.A.get(e.ev,"by.type"))return null;let n=[],i=t.A.get(e.ev,"data.message.attachments",[]);return t.A.each(i,(e,i)=>{e&&"button"===t.A.get(e,"type")&&t.A.each(t.A.get(e,"buttons")||[],t=>n.push(t))}),(0,O.h)(st,{store:e.store,buttons:n,t:e.t})}class pt extends F.Mw{constructor(t){super(t)}render(){if("user"===t.A.get(this.props.ev,"by.type"))return null;let e=[];if(t.A.map(t.A.get(this.props.ev,"data.message.attachments",[]),n=>{n&&"quick_replies"===n.type&&(e=t.A.get(n,"quick_replies",[]))}),e=t.A.filter(e,t=>t.title),0===e.length)return null;let n=t.A.convoOfEv(this.props.ev),i=this.props.store.matchConvo(n);if("ended"===t.A.get(i,"state"))return null;let r=t.A.map(this.props.store.listEvents(n));r=t.A.orderBy(r,"created","asc").filter(t=>"message_sent"===t.type);let o=0;for(var s=0;s<r.length;s++)if(r[s].id===this.props.ev.id){o=s;break}for(s=o+1;s<r.length;s++)if("user"===t.A.get(r[s],"by.type"))return null;let a=t.A.map(e,t=>(0,O.h)("div",{class:"message_quick_reply",onClick:e=>this.props.onSelect(t),title:t.title},t.title));return(0,O.h)("div",{class:"message_quick_replies"},a)}}function lt(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ct extends F.Mw{constructor(t){super(t),lt(this,"state",{hovering:0,selected:0}),lt(this,"onMouseEnter",t=>{let{selected:e,hovering:n}=this.state;t<=e?this.setState({hovering:e}):this.setState({hovering:t})}),lt(this,"onMouseLeave",()=>{let{selected:t,hovering:e}=this.state;this.setState({hovering:0})})}onToggleValue(t){let{selected:e}=this.state,n=t;t===e&&(n=0),this.setState({selected:n,hovering:n}),this.props.onChange(n)}render(){let{selected:t,hovering:e}=this.state,n="star-wrapper";t>=1?n+=" selected":e>=1&&(n+=" hovering");let i="star-wrapper";t>=2?i+=" selected":e>=2&&(i+=" hovering");let r="star-wrapper";t>=3?r+=" selected":e>=3&&(r+=" hovering");let o="star-wrapper";t>=4?o+=" selected":e>=4&&(o+=" hovering");let s="star-wrapper";return t>=5?s+=" selected":e>=5&&(s+=" hovering"),(0,O.h)("div",{class:"form-ratings-wrapper",onMouseLeave:()=>this.onMouseLeave()},(0,O.h)("div",{class:n,onClick:()=>this.onToggleValue(1),onMouseEnter:()=>this.onMouseEnter(1)},(0,O.h)("div",{class:"star"})),(0,O.h)("div",{class:i,onClick:()=>this.onToggleValue(2),onMouseEnter:()=>this.onMouseEnter(2)},(0,O.h)("div",{class:"star"})),(0,O.h)("div",{class:r,onClick:()=>this.onToggleValue(3),onMouseEnter:()=>this.onMouseEnter(3)},(0,O.h)("div",{class:"star"})),(0,O.h)("div",{class:o,onClick:()=>this.onToggleValue(4),onMouseEnter:()=>this.onMouseEnter(4)},(0,O.h)("div",{class:"star"})),(0,O.h)("div",{class:s,onClick:()=>this.onToggleValue(5),onMouseEnter:()=>this.onMouseEnter(5)},(0,O.h)("div",{class:"star"})))}}function dt(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class mt extends F.Mw{constructor(e){super(e),dt(this,"state",{errorFields:{},submiting:!1}),dt(this,"renderFormComponent",(t,e)=>"input"===t.type?this.renderField(t,e):"button"===t.type?this.renderSubmitButton(t,e):this.props.isSubmited?void 0:(0,O.h)("div",{class:"form-component form-component-block"},(0,O.h)(H.A,{block:t}))),dt(this,"renderSubmitButton",(t,e)=>{if(!this.props.isSubmited)return(0,O.h)("div",{class:"form-component form-component-submit-button"},this.props.errorMessage&&(0,O.h)("div",{class:"form-control--valid-input--error mb-1"},this.props.errorMessage),(0,O.h)("div",null,(0,O.h)("button",{class:"btn--start-convo",disabled:this.props.submiting},t.label)))}),dt(this,"renderField",(e,n)=>{let i=this.state.errorFields[e.key];if(this.props.isSubmited){let n=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};return n=n.value||'""',n=t.A.parseJSON(n),Array.isArray(n)&&(n=n.join(", ")),(0,O.h)("div",{class:"form-component submitted",key:e.key},(0,O.h)("label",{class:"label"},e.label),(0,O.h)("div",null,n||(0,O.h)("span",{class:"text-muted text-italic"},this.props.t("no_info_input"))))}return(0,O.h)("div",{class:"form-component",key:e.key},(0,O.h)("label",{class:"label"},e.label," ",e.is_required&&(0,O.h)("span",{class:"red"},"*")),"text"===e.input_type&&this.renderFieldTextInput(e,n),"textarea"===e.input_type&&this.renderFieldTextareaInput(e,n),"date"===e.input_type&&this.renderFieldDateInput(e,n),"radio"===e.input_type&&this.renderFieldRadioInput(e,n),"checkbox"===e.input_type&&this.renderFieldCheckboxInput(e,n),("dropdown"===e.input_type||"select"===e.input_type)&&this.renderFieldDropdownInput(e,n),"rating"===e.input_type&&this.renderFieldRatingInput(e,n),i&&(0,O.h)("div",{class:"form-control--valid-input--error"},i))}),dt(this,"renderFieldTextInput",(e,n)=>{let i="form-control";this.state.errorFields[e.key]&&(i="form-control input--error");let r=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};return r=r.value||'""',r=t.A.parseJSON(r),(0,O.h)("input",{ref:this[`${e.key}_input`],type:"text",class:i,placeholder:e.placeholder,value:r,onInput:t=>{this.onChangeValue(e.key,t.target.value),this.clearError(e.key)}})}),dt(this,"renderFieldDateInput",(e,n)=>{let i=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};i=i.value||'""',i=t.A.parseJSON(i);let r="form-control";return this.state.errorFields[e.key]&&(r="form-control input--error"),(0,O.h)("input",{ref:this[`${e.key}_input`],class:r,type:"date",value:i,onInput:t=>{this.onChangeValue(e.key,t.target.value),this.clearError(e.key)}})}),dt(this,"renderFieldRadioInput",(e,n)=>{let i=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};i=i.value||'""',i=t.A.parseJSON(i);let r="form-radios-wrapper";return t.A.size(e.input_options)>=3&&"attachment"!==this.props.mode&&(r+=" horizontal"),(0,O.h)("div",{class:r},t.A.map(e.input_options,(t,n)=>{let r=e.key+"_"+n;return(0,O.h)("div",{class:"radio"},(0,O.h)("input",{type:"radio",name:e.key,id:r,checked:t.value===i,onChange:()=>this.toggleRadioField(e.key,t.value)}),(0,O.h)("label",{class:"radio--label",for:r},t.label),(0,O.h)("div",{class:"radio--check"}))}))}),dt(this,"renderFieldCheckboxInput",(e,n)=>{let i=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};i=i.value||"[]",i=t.A.parseJSON(i);let r="form-checkboxes-wrapper";return t.A.size(e.input_options)>=3&&"attachment"!==this.props.mode&&(r+=" horizontal"),(0,O.h)("div",{class:r},t.A.map(e.input_options,(t,n)=>{let r=e.key+"_"+n;return(0,O.h)("div",{class:"checkbox"},(0,O.h)("input",{type:"checkbox",name:e.key,id:r,checked:i.includes(t.value),onChange:()=>this.toggleCheckboxField(e.key,t.value)}),(0,O.h)("label",{class:"checkbox--label",for:r},t.label),(0,O.h)("div",{class:"checkbox--check"}))}))}),dt(this,"renderFieldDropdownInput",(e,n)=>{let i=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};i=i.value||'""',i=t.A.parseJSON(i);let r="form-control";return this.state.errorFields[e.key]&&(r+=" input--error"),i||(r+=" form-control--empty"),(0,O.h)("select",{class:r,ref:this[`${e.key}_input`],onChange:t=>{this.onChangeValue(e.key,t.target.value),this.clearError(e.key)}},(0,O.h)("option",{value:""},"-- ",this.props.t("no_select")," --"),t.A.map(e.input_options,t=>(0,O.h)("option",{value:t.value},t.label)))}),dt(this,"renderFieldTextareaInput",(e,n)=>{let i=t.A.find(this.props.submission.values,t=>t.key===e.key)||{};return i=i.value||'""',i=t.A.parseJSON(i),(0,O.h)("textarea",{onInput:t=>{this.onChangeValue(e.key,t.target.value),this.clearError(e.key)},ref:this[`${e.key}_input`],rows:"3",class:"form-control",placeholder:e.placeholder})}),dt(this,"renderFieldRatingInput",(t,e)=>(0,O.h)(ct,{onChange:e=>this.onChangeValue(t.key,e)})),dt(this,"onSubmit",t=>{t.preventDefault(),this.validateForm()&&this.props.onSubmit()}),dt(this,"validateForm",()=>{let e=!0,n="",i={},r=t.A.get(this.props.formSetting,"components")||[];return t.A.each(r,r=>{if("input"===r.type){let o=t.A.find(this.props.submission.values,t=>t.key===r.key)||{};if(o=o.value||'""',o=t.A.parseJSON(o),r.is_required){let t=!1;"string"!=typeof o||o.trim()||(t=!0),Array.isArray(o)&&0===o.length&&(t=!0),t&&(e=!1,i[r.key]=this.props.t("cannot_be_empty"),n=`${r.key}_input`)}if(r.validation&&!Array.isArray(o)){let s=!1,a="";"email"!==r.validation||t.A.isEmail(o)||(a="Email",s=!0),"phone"!==r.validation||t.A.isPhone(o)||(a=this.props.t("phn"),s=!0),"number"!==r.validation||t.A.isNumber(o)||(a=this.props.t("number"),s=!0),"url"!==r.validation||t.A.isURL(o)||(s=!0,a="URL"),s&&(e=!1,i[r.key]=this.props.t("format_is_invalid")+" "+a,n=`${r.key}_input`)}}}),n&&this[n]&&this[n].current&&this[n].current.focus(),this.setState({errorFields:i}),e}),dt(this,"onChangeValue",(e,n)=>{let i=t.A.get(this.props.submission,"values")||[],r=t.A.find(i,t=>t.key===e);r?r.value=JSON.stringify(n):i.push({key:e,value:JSON.stringify(n)}),this.props.onChangeFormValues(i)}),dt(this,"clearError",t=>{let e=this.state.errorFields;e[t]="",this.setState({errorFields:e})}),dt(this,"renderFormHeader",()=>{let e=t.A.get(this.props.formSetting,"title")||"",n=t.A.get(this.props.formSetting,"description")||"";if("attachment"===this.props.mode&&(e.trim()||n.trim()))return(0,O.h)("div",{class:"form-component form-component-block"},e&&(0,O.h)("div",null,e),n&&(0,O.h)("div",{class:"text-sm text-muted"},n));let i=t.A.get(this.props.formSetting,"logo.url"),r=t.A.get(this.props.formSetting,"brand_url"),o=null;i&&(o=(0,O.h)("div",{class:"form-page-logo-wrapper"},(0,O.h)("a",{href:r||"javascript:;"},(0,O.h)("img",{src:i,class:"form-page-logo"}))));let s=null;return(e.trim()||n.trim())&&(s=(0,O.h)("div",{class:"form-page-header"},(0,O.h)("div",{class:"form-page-title"},e),n&&(0,O.h)("div",{class:"form-page-desc"},n))),(0,O.h)(O.FK,null,o,s)});let n=t.A.get(this.props.formSetting,"components")||[];t.A.each(n,t=>{"input"===t.type&&"checkbox"!==t.input_type&&"radio"!==t.input_type&&(this[`${t.key}_input`]=(0,O._3)())})}toggleRadioField(t,e){this.clearError(t),this.onChangeValue(t,e)}toggleCheckboxField(e,n){let i=t.A.find(this.props.submission.values,t=>t.key===e)||{};i=i.value||"[]",i=t.A.parseJSON(i),i.includes(n)?i=i.filter(t=>t!==n):i.push(n),this.clearError(e),this.onChangeValue(e,i)}render(){let e=t.A.get(this.props.formSetting,"components")||[],n=(t.A.get(this.props.formSetting,"title"),t.A.get(this.props.formSetting,"description"),"form-wrapper form");return"attachment"===this.props.mode&&(n+=" form-wrapper-attachment"),(0,O.h)("div",{class:n},this.props.isSubmited&&(0,O.h)("div",{class:"form-component"},this.props.t("you_have_submitted_info_successfully")),(0,O.h)("form",{onSubmit:this.onSubmit},this.renderFormHeader(),t.A.map(e,this.renderFormComponent)))}}function ht(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ut extends F.Mw{constructor(e){super(e),ht(this,"fetchFormSetting",()=>{let e=t.A.get(this.props.ev,"data.message.attachments")||[],n=t.A.find(e,t=>"form"===t.type);if(!n)return;let i=n.url;this.token=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}(i,"token");let r=n.form||{},o=n.form_submission||{},s=t.A.size(o)>0;this.setState({formSetting:r,submission:o,isSubmited:s})}),ht(this,"onChangeFormValues",t=>{this.setState({submission:{values:t}})}),ht(this,"onSubmit",async()=>{if(this.setState({errorMessage:""}),this.state.submiting)return;this.setState({submiting:!0});let e=await this.props.store.submitForm2(this.props.store.matchAccount().id,this.token,this.state.submission);e.error?this.setState({submiting:!1,errorMessage:t.A.get(e,"error.code")}):this.setState({submiting:!1,isSubmited:!0})}),this.state={submission:{},formSetting:{},submiting:!1,errorMessage:"",isSubmited:!1}}componentDidMount(){this.fetchFormSetting()}render(){let e=t.A.get(this.props.ev,"data.message.attachments")||[];if(!t.A.find(e,t=>"form"===t.type))return;const{submission:n,formSetting:i,errorMessage:r,isSubmited:o,submiting:s}=this.state;return(0,O.h)("div",{onClick:t=>t.stopPropagation()},(0,O.h)(mt,{store:this.props.store,formSetting:i,mode:"attachment",t:this.props.t,submission:n,errorMessage:r,isSubmited:o,submiting:s,onChangeFormValues:this.onChangeFormValues,onSubmit:this.onSubmit}))}}class gt extends F.Mw{constructor(t){super(t)}render(){return null}}function bt(t){return t.touches&&t.touches.length?t.touches[0]:{}}class ft extends F.Mw{constructor(t){super(t),this.state={focusing:0},this.galleryRef=(0,O._3)()}componentDidMount(){this.bindDrag()}focus(t){this.setState({focusing:t}),this.galleryRef.current.scrollTo({left:220*t,behavior:"smooth"})}render(){if("user"===t.A.get(this.props.ev,"by.type"))return null;let e=t.A.get(this.props.ev,"data.message.attachments",[]),n=t.A.filter(e,e=>"generic"===t.A.get(e,"type"));return 0===n.length?null:t.A.map(n,(n,i)=>{var r=t.A.map(n.elements,e=>{let n=this.props.t.i18n(e.i18n_title)||e.title,i=this.props.t.i18n(e.i18n_subtitle)||e.subtitle,r=n?(0,O.h)("div",{class:"generic-attachment--element-title"},n):null,s=i?(0,O.h)("div",{class:"generic-attachment--element-subtitle",title:i},i):null,a=this.props.store.replaceFileUrl(e.image_url);e.image_url||(a=o(2876));let p=["url_button","web_url"].includes(t.A.get(e,"default_action.type"))&&t.A.get(e,"default_action.url"),l="generic-attachment--element swiper-slide";return p&&(l+=" clickable"),(0,O.h)("div",{class:l,onClick:()=>p&&window.open(p,"_blank")},(0,O.h)("div",null,(0,O.h)("img",{alt:"generic attachment element",class:"generic-attachment--element-img",src:a})),(0,O.h)("div",{class:"generic-attachment--element-content"},r,s),(0,O.h)(st,{buttons:e.buttons,onSelect:t=>this.props.onSelect(t),t:this.props.t}))});let s=t.A.get(e,"0.elements",[]),a="generic-attachment-navigator generic-attachment-navigator--left",p="generic-attachment-navigator generic-attachment-navigator--right";return 0===this.state.focusing&&(a+=" generic-attachment-navigator--disabled"),this.state.focusing===s.length-1&&(p+=" generic-attachment-navigator--disabled"),(0,O.h)("div",{class:"generic-attachment-container"},(0,O.h)("div",{class:"generic-attachment",ref:this.galleryRef},r),!this.props.store.isMobile()&&(0,O.h)(O.FK,null,(0,O.h)("div",{class:a,onClick:t=>this.focus(this.state.focusing-1)},(0,O.h)("span",{class:"generic-attachment-navigator-icon"},"‹")),(0,O.h)("div",{class:p,onClick:t=>this.focus(this.state.focusing+1)},(0,O.h)("span",{class:"generic-attachment-navigator-icon"},"›"))))})}bindDrag(){if(!this.props.store.isMobile())return;let e=document.getElementsByClassName("generic-attachment");t.A.map(e,t=>{var e,n,i;(e=t)&&(e.removeEventListener("touchstart",e.md,0),window.removeEventListener("touchend",e.mu,0),window.removeEventListener("touchmove",e.mm,0),e.md=function(t){let r=bt(t);e.hasAttribute("nochilddrag")&&document.elementFromPoint(r.pageX,r.pageY)||(i=1,n=r.clientX,t.preventDefault())},e.mu=()=>{i=0},e.mm=function(t){if(!i)return;let r=bt(t);e.scrollLeft-=-n+r.clientX,n=r.clientX},e.addEventListener("touchstart",e.md,{passive:!0}),window.addEventListener("touchend",e.mu,{passive:!0}),window.addEventListener("touchmove",e.mm,{passive:!0}))})}}class vt extends F.Mw{render(){let e=t.A.get(this.props.ev,"by.type");if("user"===e)return null;let n=t.A.get(this.props.ev,"data.message.attachments",[]),i=t.A.filter(n,e=>"product"===t.A.get(e,"type")||"product_preview"===t.A.get(e,"type"));if(i=i.filter(t=>t.product&&t.product.name),0===i.length)return null;let r=this.props.store.matchAccount();return t.A.map(i,(n,i)=>{let s=n.product,a=[],p=s.url||s.mobile_url;this.props.store.isMobile()&&(p=s.mobile_url||s.url),p&&0==t.A.size(s.buttons)&&a.push((0,O.h)("a",{class:"product_attachment__btn",href:p,target:"_blank"},this.props.t("detail"),(0,O.h)("img",{src:o(3266),class:"product_attachment__btn_external_link"}))),console.log("P",s),t.A.size(s.buttons)>0&&(a=a.concat(t.A.map(s.buttons,(t,e)=>"call_button"===t.type?(0,O.h)("a",{class:"product_attachment__btn",href:"tel:"+t.phone_number,key:e,title:t.title},this.props.t.i18n(t.i18n_title)||t.title):"url_button"===t.type?(0,O.h)("a",{class:"product_attachment__btn",href:t.url,target:"_blank",key:e,title:t.title},this.props.t.i18n(t.i18n_title)||t.title||this.props.t("detail")," ",(0,O.h)("img",{src:o(3266),class:"product_attachment__btn_external_link"})):"postback_button"===t.type?(0,O.h)("a",{class:"product_attachment__btn",href:"javascript:;",onClick:e=>this.props.onPostback(t)},this.props.t.i18n(t.i18n_title)||t.title):void 0)));let l=(0,O.h)("a",{href:p,class:"product_attachment__title",target:"_blank"},s.name),c=null,d=s.description||s.long_description;d&&(c=(0,O.h)("div",{class:"product_attachment__subtitle"},d));let m=s.currency||t.A.get(r,"currency","VND"),h=null;s.price&&(h=(0,O.h)("div",{class:"product_attachment__price"},t.A.formatCurrency(s.price,m)));let u=this.props.store.replaceFileUrl(s.image);return s.image||(u=o(2876)),(0,O.h)("div",{class:"product_attachment product_attachment__"+e},(0,O.h)("div",null,(0,O.h)("a",{href:this.props.store.replaceFileUrl(s.image),target:"_blank"},(0,O.h)("img",{class:"product_attachment__img",src:u}))),l,c,h,(0,O.h)("div",{class:"product_attachment__btns"},a))})}}class _t extends F.Mw{constructor(t){super(t)}render(){let e=t.A.get(this.props.ev,"by.type");var n=t.A.get(this.props.ev,"data.message.attachments",[]),i=[];if(t.A.each(n,(e,n)=>{e&&t.A.includes(e.mimetype,"video")&&i.push(e)}),0===i.length)return null;var r=t.A.map(i,(t,n)=>(0,O.h)("div",{key:n,class:`video-attachment video-attachment--${e}`},(0,O.h)("video",{class:"video-attachment__video",src:this.props.store.replaceFileUrl(t.url),width:"100%",height:"",poster:this.props.store.replaceFileUrl(t.thumbnail_url),controls:"controls",preload:"metadata"})));return(0,O.h)("div",{class:`message-${e}`},r)}}var yt=o(1620);class xt extends F.Mw{constructor(...e){var n,i,r;super(...e),n=this,r=e=>{let n=t.A.get(e,"by.type"),i=t.A.get(e,"by.display_id",t.A.get(e,"by.id"))||"";if("user"===n)return t.A.getUserDisplayName(this.props.store.matchUser());let r=this.props.store.matchAccount();if("agent"===n)return t.A.getAgentDisplayName(r,this.props.store.matchAgent(i));if(i.startsWith("at"))return t.A.getAgentDisplayName(r,this.props.store.matchAgent(i));if("bot"===n){let t=this.props.store.matchBot()[i];return t&&t.fullname||"Bot"}return"system"===i||"dummy"===n||"workflow"===n?r.name||"system":r.name},(i=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(i="getSenderName"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r}render(){let e="",n=t.A.get(this.props.ev,"by.type");if(t.A.get(this.props.ev,"by.id"),"user"===n)e=this.props.t("you");else{e=this.getSenderName(this.props.ev);let n=this.props.store.matchAccount()||{};t.A.get(this.props,"chatbox.hide_agent_profile")&&(e=n.name)}let i=t.A.get(this.props.ev,"data.message.attachments.0");if(i){if(t.A.includes(i.mimetype,"image")){let t=i.url;return t.startsWith("https://")||t.startsWith("http://")||t.startsWith("content://")||t.startsWith("data:")||(t=this.props.store.FileURL+t),(0,O.h)("div",{class:"message-quote d-flex",onClick:()=>this.scrollToSourceEvent(this.props.ev)},(0,O.h)("img",{src:t,class:"message-quote-inner-img"}),(0,O.h)("div",{class:"message-quote-inner"},(0,O.h)("div",{class:"message-quote-title"},e),(0,O.h)("div",{class:"message-quote-content"},"[",this.props.t("image"),"]")))}return(0,O.h)("div",{class:"message-quote",onClick:()=>this.scrollToSourceEvent(this.props.ev)},(0,O.h)("div",{class:"message-quote-title"},e),(0,O.h)("div",{class:"message-quote-content"},"[File] ",i.name))}t.A.get(this.props.ev,"data.message.format","plaintext");let r=t.A.get(this.props.ev,"data.message.block"),o=t.A.get(this.props.ev,"data.message.text");return r&&(o=t.A.blockToText(r)),(0,O.h)("div",{class:"message-quote",onClick:()=>this.scrollToSourceEvent(this.props.ev)},(0,O.h)("div",{class:"message-quote-title"},e),(0,O.h)("div",{class:"message-quote-content"},o))}scrollToSourceEvent(t){let e=document.querySelector(`.convo-event[data-ev-id=${t.id}]`);e&&"function"==typeof e.scrollIntoViewIfNeeded&&e.scrollIntoViewIfNeeded(),this.props.onFocusSourceEventFromQuote(t)}}class wt extends F.Mw{constructor(t){super(t),this.state={focused:!1}}renderTime(){return null}focusSourceEventFromQuote(e){if(e.id!==this.props.ev.id)return;let n=t.A.get(e,"data.message.fields")||[],i=t.A.find(n,t=>"attachment_index"===t.key),r=t.A.get(i,"value");try{r=JSON.parse(r)}catch(t){r=void 0}void 0===r&&(this.setState({focused:!0}),this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(()=>{this.setState({focused:!1})},3e3))}render(){t.A.get(this.props.ev,"data.message.format","plaintext");let e=t.A.get(this.props.ev,"data.message.block");return e?this.renderBlock(e):this.renderPlainText()}renderPlainText(){var e=t.A.get(this.props.ev,"data.message.text");if(e=t.A.trim(e),0===t.A.size(e))return null;let n=new t.A.Date(t.A.get(this.props.ev,"created")).toLocaleString(),i=t.A.get(this.props.ev,"by.type");"user"!==i&&(i="agent");var r=t.A.extractText(e).map(t=>{if("emoji"===t.type)return(0,O.h)(G.A,{emojiCode:t.text,byType:i});if("link"===t.type){let e=t.text||"";return e.startsWith("//")||e.startsWith("https://")||e.startsWith("http://")||e.startsWith("data:")||(e="//"+e),(0,O.h)("a",{class:"text-message-link",href:e,target:"_blank",onClick:t=>this.props.onLink(t,e)},t.text)}return"phone"===t.type?(0,O.h)("a",{class:"text-message-link",href:"tel:"+t.text},t.text):"email"===t.type?(0,O.h)("a",{class:"text-message-link",href:"mailto:"+t.text},t.text):t.text});if(0===t.A.size(r))return null;let o=t.A.get(this.props.ev,"data.message.deleted"),s=t.A.get(this.props.ev,"data.message.attachments",[]),a=t.A.find(s,t=>"quote"===t.type);if("agent"===i){let e="message-agent message-text--agent";return o&&(r=this.props.t("recalled_message"),e+=" message-text--deleted"),this.state.focused&&(e+=" just-focused"),(0,O.h)("div",{class:e,title:n},a&&(0,O.h)(xt,{ev:t.A.get(a,"quote"),t:this.props.t,store:this.props.store,onFocusSourceEventFromQuote:this.props.onFocusSourceEventFromQuote}),r,this.renderTime())}let p="message-user message-text--user";return this.props.ev._error&&(p+=" message-user--error"),this.state.focused&&(p+=" just-focused"),(0,O.h)("div",{class:p,title:n},r)}renderBlock(e){if(t.A.isEmptyBlock(e))return null;let n=new t.A.Date(t.A.get(this.props.ev,"created")).toLocaleString(),i=t.A.get(this.props.ev,"by.type");if("user"!==i&&(i="agent"),"agent"===i)return(0,O.h)("div",{class:"message-agent message-text--agent",title:n},(0,O.h)(H.A,{block:e,onLink:this.props.onLink,textMessage:!0}),this.renderTime());let r="message-user message-text--user";return this.props.ev._error&&(r+=" message-user--error"),(0,O.h)("div",{class:r,title:n},(0,O.h)(H.A,{block:e,onLink:this.props.onLink,textMessage:!0}))}}class kt extends F.Mw{render(){let e=this.props.ev.ev;if("conversation_rated"===e.type){var n=t.A.get(e,"data.conversation.ratings.0",{no_rating:!0,rating:0});return n.no_rating?null:(0,O.h)("div",{class:"convo-event"},(0,O.h)("div",{class:"info-message"},this.props.t("rated_as")+" "+this.props.t(function(t){return t?t<2?"poor":t<4?"average":"great":"poor"}(n.rating)).toLowerCase()))}return"conversation_state_updated"===e.type&&"ended"===t.A.get(e,"data.conversation.state")?(0,O.h)("div",{class:"convo-event"},(0,O.h)("div",{class:"info-message"},this.props.t("conversation_ended"))):null}}function At(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let zt=!1;class It extends F.Mw{constructor(e){super(e),At(this,"focusSourceEventFromQuote",t=>{let e=this.textMessageRef.current;e&&"function"==typeof e.focusSourceEventFromQuote&&e.focusSourceEventFromQuote(t);let n=this.fileAttachmentRef.current;n&&"function"==typeof n.focusSourceEventFromQuote&&n.focusSourceEventFromQuote(t);let i=this.imageAttachmentRef.current;i&&"function"==typeof i.focusSourceEventFromQuote&&i.focusSourceEventFromQuote(t)}),At(this,"resendMessage",()=>{let e=t.A.convoOfEv(this.props.event.ev);const n=t.A.get(this.props.event,"ev.data.message");this.props.store.sendConvoEvent(e,"message_sent",{message:n})}),this.props.store.onConvoEvent(this,t=>this.onEvent(t)),this.refForm=(0,O._3)(),this.state={pongs:t.A.get(this.props.event,"ev.data.message.pongs")||[]},this.textMessageRef=(0,O._3)(),this.fileAttachmentRef=(0,O._3)(),this.imageAttachmentRef=(0,O._3)()}render(){var e=t.A.get(this.props.event,"ev",{});switch(e.type){case"conversation_typing":return this.renderTyping();case"conversation_joined":break;case"message_sent":return this.props.event.is_typing?this.renderTyping():this.renderMessageSent();case"conversation_state_updated":case"conversation_rating_requested":case"conversation_rated":return t.A.startsWith(e.id,"ev")?(0,O.h)(kt,{t:this.props.t,store:this.props.store,ev:this.props.event}):null}return null}focus(){this.refForm.current&&this.refForm.current.focus()}onEvent(e){e.id===t.A.get(this.props.event,"ev.id")&&this.setState({pongs:t.A.get(e,"data.message.pongs")||[]})}hasLike(){let{pongs:e}=this.state;return!!t.A.find(e,t=>"like"===t.type)}hasDislike(){let{pongs:e}=this.state;return!!t.A.find(e,t=>"dislike"===t.type)}chooseQuickReply(e){let n=t.A.get(this.props.event,"ev",{}),i={text:e.title,format:"plaintext"};e.payload&&(i.attachments=[{type:"postback",postback:{event_id:n.id,payload:e.payload}}]),this.props.onSend(i)}choosePostbackBtn(e){let n=t.A.get(this.props.event,"ev",{}),i={text:e.title,format:"plaintext"};e.payload&&(i.attachments=[{type:"postback",postback:{event_id:n.id,payload:e.payload}}]),this.props.onSend(i)}renderAgentAvatar(e){let n=t.A.get(e,"by.type"),i=t.A.get(e,"by.display_id",t.A.get(e,"by.id"));if("user"===n)return null;var r=this.getSenderName(e);let s=this.props.store.matchAccount();var a=s.logo_url||o(3582);if(t.A.get(this.props,"chatbox.hide_agent_profile"))return(0,O.h)("div",{class:"message-sender"},(0,O.h)("img",{alt:"sender",class:"message-sender-avatar",src:this.props.store.replaceFileUrl(a)}),(0,O.h)("p",{class:"message-sender-name"},s.name));let p=this.props.store.matchAgent("*");return"system"!==i&&"dummy"!==n&&"workflow"!==n&&(a=t.A.get(p[i],"avatar_url")||s.logo_url||o(2538)),(0,O.h)("div",{class:"message-sender"},(0,O.h)("img",{alt:"sender",class:"message-sender-avatar",src:this.props.store.replaceFileUrl(a)}),(0,O.h)("p",{class:"message-sender-name"},r))}tryLoadOrder(e){if("user"!==t.A.get(e,"by.type")){this.props.store.matchAccount();var n=t.A.get(e,"data.message.attachments",[]);0!==t.A.filter(n,t=>"order"===t.type&&t.order).map(t=>t.order).length&&(zt||t.A.setTimeout(async()=>{zt=(await o.e(127).then(o.bind(o,6127))).default}))}}renderTyping(){if(!this.props.event.is_show)return(0,O.h)("div",{key:"container",class:"convo-event agent-message",style:"opacity: 0 !important"},(0,O.h)("div",{class:"agent-convo-event-wrapper"},(0,O.h)("div",{class:"agent-convo-event-inner"},(0,O.h)("div",{class:"message-agent message-text--agent",style:"opacity: 0.6 !important"},(0,O.h)("div",{style:"height: 20px !important; width: 35px !important"})))));let t="data:text/html,"+encodeURIComponent('\n<html>\n <head>\n <style>\n .typing-container {\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n gap: 4px;\n justify-content: center;\n }\n .typing-dot {\n display: inline-block;\n vertical-align: middle;\n width: 8px;\n height: 8px;\n background: black;\n border-radius: 50%;\n animation: typing 0.5s infinite alternate;\n }\n .typing-dot:nth-of-type(2) {\n animation-delay: 0.2s;\n }\n .typing-dot:nth-of-type(3) {\n animation-delay: 0.6s;\n }\n @keyframes typing {\n 0% {\n opacity: 0.9;\n }\n 100% {\n opacity: 0.4;\n }\n }\n </style>\n </head>\n <body style="padding: 0; margin: 0">\n <div class="typing-container">\n <span class="typing-dot"></span>\n <span class="typing-dot"></span>\n <span class="typing-dot"></span>\n </div>\n </body>\n</html>\n');return(0,O.h)("div",{key:"container",class:"convo-event agent-message",style:"opacity: 0.6 !important"},(0,O.h)("div",{class:"agent-convo-event-wrapper"},(0,O.h)("div",{class:"agent-convo-event-inner"},(0,O.h)("div",{class:"message-agent message-text--agent"},(0,O.h)("iframe",{src:t,style:"width: 35px !important; height: 20px !important; display: block !important; overflow: hidden !important; padding: 0 !important "})))))}renderMessageSent(){let e=this.props.event.ev,n=t.A.get(e,"data.message.attachments"),i=t.A.find(n,t=>"form"===t.type);if(t.A.isEmptyMessage(t.A.get(e,"data.message")))return null;if(this.tryLoadOrder(e),new t.A.Date(e.created).toLocaleString(),"user"!==t.A.get(e,"by.type")){let t=null;"lead"===this.props.event.mode&&(t=this.renderAgentAvatar(e));let n="agent-convo-event-inner";this.props.isLast&&(n+=" last");let r="agent-convo-event-wrapper";return i&&(r+=" full"),(0,O.h)("div",{class:"convo-event agent-message","data-ev-id":e.id},t,(0,O.h)("div",{class:r},(0,O.h)("div",{class:n},(0,O.h)(wt,{ref:this.textMessageRef,onFocusSourceEventFromQuote:this.props.onFocusSourceEventFromQuote,showTime:this.props.event.show_time,isLast:this.props.isLast,store:this.props.store,t:this.props.t,ev:e,onLink:this.props.onLink}),(0,O.h)(it,{ref:this.imageAttachmentRef,store:this.props.store,ev:e,focusSourceEventFromQuote:this.props.focusSourceEventFromQuote}),(0,O.h)(rt,{store:this.props.store,ev:e}),(0,O.h)(_t,{store:this.props.store,ev:e}),(0,O.h)(ot,{ref:this.fileAttachmentRef,store:this.props.store,ev:e,focusSourceEventFromQuote:this.props.focusSourceEventFromQuote}),(0,O.h)(at,{store:this.props.store,ev:e,t:this.props.t}),(0,O.h)(ut,{store:this.props.store,ev:e,t:this.props.t}),(0,O.h)(gt,{store:this.props.store,ev:e,t:this.props.t}),(0,O.h)(ft,{store:this.props.store,ev:e,onSelect:t=>this.choosePostbackBtn(t),t:this.props.t}),(0,O.h)(vt,{t:this.props.t,onPostback:t=>this.choosePostbackBtn(t),store:this.props.store,ev:e}),(0,O.h)(zt,{t:this.props.t,store:this.props.store,ev:e}),(0,O.h)(pt,{store:this.props.store,ev:e,onSelect:t=>this.chooseQuickReply(t)}),this.renderReactions(),this.renderAIDevNote())))}t.A.get(e,"data.message.idempotency_key")===e.id&&this.props.store.now()-e.created<900&&t.A.setTimeout(()=>this.setState({refresh:this.state.refresh}),1e3);let r=(0,O.h)("div",{class:"sending_dot"});(this.props.store.now()-e.created<900||t.A.get(e,"data.message.idempotency_key")!==e.id)&&(r=(0,O.h)("div",{class:"sending_dot sending_dot__hide"}));let o=null;"lead"===this.props.event.mode&&"user"!==t.A.get(e,"by.type")&&(o=(0,O.h)("div",{class:"pt-3"}));let s=null;if(e._error&&(r=null),e._error&&"message_sent"===e.type){let t=this.props.t("error_send_message");e._error_message&&(t=this.props.t(e._error_message)),s=(0,O.h)("a",{class:"message_error",src:"javascript:;",onClick:this.resendMessage},(0,O.h)("div",{class:"message_error__icon"})," ",(0,O.h)("div",{class:"message_error__text"},t))}return(0,O.h)("div",{class:"convo-event user-message","data-ev-id":e.id},o,(0,O.h)("div",{class:"message-user__container"},r,(0,O.h)(wt,{ref:this.textMessageRef,store:this.props.store,ev:e,refresh:this.state.refresh,onLink:this.props.onLink}),(0,O.h)(it,{store:this.props.store,ev:e,ref:this.imageAttachmentRef}),(0,O.h)(rt,{store:this.props.store,ev:e}),(0,O.h)(_t,{store:this.props.store,ev:e}),(0,O.h)(ot,{store:this.props.store,ev:e,ref:this.fileAttachmentRef}),(0,O.h)(at,{store:this.props.store,ev:e,t:this.props.t}),(0,O.h)(ut,{store:this.props.store,t:this.props.t,ev:e}),(0,O.h)(vt,{t:this.props.t,store:this.props.store,ev:e}),(0,O.h)(gt,{store:this.props.store,ev:e})),s)}async onSendReaction(e){if(this._reacting)return;let n=this.props.event.ev,i=t.A.get(n,"data.message.conversation_id");n={type:"message_pong",data:{message:{id:n.id,pongs:[{type:e}],conversion_id:i}}},"dislike"==e&&this.props.store.isAIDevMode()&&this.props.store.emitConvoEvent({type:"bad_feedbacked",data:{event:n,id:n.id,conversion_id:i}});let{pongs:r}=this.state;"like"===e?(r=r.filter(t=>"dislike"!==t.type),r.push({type:"like"})):"dislike"===e?(r=r.filter(t=>"like"!==t.type),r.push({type:"dislike"})):"remove_like"===e?r=r.filter(t=>"like"!==t.type):"remove_dislike"===e&&(r=r.filter(t=>"dislike"!==t.type)),this.setState({pongs:r}),this._reacting=!0,await this.props.store.sendReaction(i,n),this._reacting=!1}renderReactions(){if(this.props.store.isAIDevMode())return null;if(t.A.get(this.props.event.ev,"data.message.conversation_id","").startsWith("cslight"))return null;let e=t.A.get(this.props.event,"ev")||{};if(t.A.get(e,"data.message.deleted"))return;t.A.get(e,"data.message.pongs");let n=this.hasLike(),i=this.hasDislike(),r="message-event-action-btn";n&&(r+=" active");let o="message-event-action-btn";i&&(o+=" active");let s="message-event-actions";return t.A.get(this.props.event,"is_end")&&(s+=" ended"),(0,O.h)(O.FK,null,(0,O.h)("div",{class:s},(0,O.h)("div",{class:r,onClick:()=>this.onSendReaction(n?"remove_like":"like")},(0,O.h)("div",{class:"message-event-action-btn-svg like"})),(0,O.h)("div",{class:o,onClick:()=>this.onSendReaction(i?"remove_dislike":"dislike")},(0,O.h)("div",{class:"message-event-action-btn-svg dislike"}))),t.A.get(this.props.event,"is_end")&&(0,O.h)("div",{class:"message-event-actions-static"},(0,O.h)("div",{class:r,onClick:()=>this.onSendReaction(n?"remove_like":"like")},(0,O.h)("div",{class:"message-event-action-btn-svg like"})),(0,O.h)("div",{class:o,onClick:()=>this.onSendReaction(i?"remove_dislike":"dislike")},(0,O.h)("div",{class:"message-event-action-btn-svg dislike"}))))}renderAIDevNote(){if(!this.props.store.isAIDevMode())return null;if(t.A.get(this.props.event.ev,"data.message.conversation_id","").startsWith("cslight"))return null;let e=t.A.get(this.props.event,"ev")||{},n=(t.A.get(e,"data.message.pongs"),this.hasLike()),i=this.hasDislike(),r="message-event-action-btn message-event-action-btn__dev message-event-action-btn_like";n&&(r+=" active");let o="message-event-action-btn message-event-action-btn__dev message-event-action-btn_dislike";return i&&(o+=" active"),(0,O.h)("div",{class:"message-event-actions-static"},(0,O.h)("div",{class:r,onClick:()=>this.onSendReaction(n?"remove_like":"like")},(0,O.h)("div",{class:"message-event-action-btn-svg like"})," Good"),(0,O.h)("div",{class:o,onClick:()=>this.onSendReaction(i?"remove_dislike":"dislike")},(0,O.h)("div",{class:"message-event-action-btn-svg dislike"})," Bad"),(0,O.h)("div",{class:"message-event-action-btn message-event-action-btn__dev",onClick:()=>this.props.store.onShowMessageInfo(e.id)},(0,O.h)("div",{class:"message-event-action-btn-svg info"})," Info"))}renderUpdateConvo(e){var n=t.A.get(e,"data.conversation.state");return"active"===n||"pending"===n?null:(0,O.h)("div",{class:"message-system"},this.props.t("conversation_state_updated",{state:n}))}getSenderName(e){let n=t.A.get(e,"by.type"),i=t.A.get(e,"by.display_id",t.A.get(e,"by.id"))||"";if("user"===n)return t.A.getUserDisplayName(this.props.store.matchUser());let r=this.props.store.matchAccount();if("agent"===n)return t.A.getAgentDisplayName(r,this.props.store.matchAgent(i));if(i.startsWith("at"))return t.A.getAgentDisplayName(r,this.props.store.matchAgent(i));if("bot"===n){let t=this.props.store.matchBot()[i];return t&&t.fullname||"Bot"}return"system"===i||"dummy"===n||"workflow"===n?r.name||"system":r.name}}const Ct=o(1370);class Mt extends F.Mw{constructor(e){var n,i,r;super(e),n=this,r=t=>{let e=this.evRefs[t.id];e&&e.focusSourceEventFromQuote(t)},(i=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(i="onFocusSourceEventFromQuote"))in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.props.store.onUpdate(this,t=>this.forceUpdate()),this.props.store.onConvoEvent(this,t=>this.onEvent(t)),this.loadConvo(),this.refBody=null,this.evRefs={},this.checkAndSeen=t.A.throttle(()=>{this.props.isShow&&this.isBottom()&&"visible"===this.props.store.browserVisibility&&document.hasFocus()&&this.props.store.seenConvo(this.props.cid)},500),this.checkAndSeen()}componentDidMount(){this.setState({isShowTyping:!1,typing_event:{}}),this.props.store.onConvoEvent(this,e=>{if(t.A.convoOfEv(e)!==this.props.cid)return;if("user"===t.A.get(e,"by.type"))return;let n=t.A.get(this.state.typing_event,"by.id");return n&&t.A.get(e,"by.id")!==n?void 0:"message_sent"===t.A.get(e,"type")?(this.timer&&t.A.clearTimeout(this.timer),this.timer=null,void this.setState({isShowTyping:!1})):void("conversation_typing"===t.A.get(e,"type")&&("agent"!=(this.props.store.matchAgent(t.A.get(e,"by.id"))||{}).type||t.A.get(this.props.plugin,"chatbox.show_agent_typing"))&&(this.setState({typing_event:e,isShowTyping:!0}),this.timer&&t.A.clearTimeout(this.timer),this.timer=t.A.setTimeout(()=>{t.A.convoOfEv(e)===this.props.cid&&(this.timer=null,this.setState({isShowTyping:!1}))},5e3)))}),this.props.store.onMessageUpdated(this,async e=>{t.A.convoOfEv(e)===this.props.cid&&(await this.props.store.reloadConvoEvents(this.props.cid),this.forceUpdate())})}componentDidUpdate(t){t.cid!==this.props.cid&&this.loadConvo()}setEventChildRef(t,e){this.evRefs[e]=t}ShowTyping(){this.setState({isShowTyping:!0,typing_event:{id:"evzz"+t.A.Date.now(),created:t.A.Date.now(),by:{type:"agent"},type:"conversation_typing"}}),this.timer&&t.A.clearTimeout(this.timer),this.timer=t.A.setTimeout(()=>{this.timer=null,this.setState({isShowTyping:!1})},5e3)}render(){if(this.state.error)return this.renderError();let e=t.A.map(this.props.store.listEvents(this.props.cid));if(!this.state.loading&&0===t.A.size(e)&&!this.props.cid)return(0,O.h)("div",{ref:t=>this.refBody=t,class:"widget-body--events-container"},(0,O.h)("div",{class:"widget-body--empty"},(0,O.h)("div",{class:"widget-body--empty-icon"}),(0,O.h)("div",{class:"widget-body--empty-text"},this.props.t("empty_convo_text"))),(0,O.h)(Q,{store:this.props.store}));e=t.A.orderBy(e,"created","asc"),this.props.store.matchConvo(this.props.cid),e=t.A.map(e,t=>({ev:t}));let n=this.state.typing_event||{id:"evzz"+t.A.Date.now(),created:t.A.Date.now(),by:{type:"agent"}},i={is_typing:!0,is_show:this.state.isShowTyping,id:n.id,ev:{id:n.id,created:n.created,by:n.by,type:"message_sent",data:{message:{text:"...",conversation_id:this.props.cid}}}};!function(e,n){if((n=n.filter(t=>St(t.ev))).length<1)return;for(var i,r=1;r<n.length;r++){let e=n[r],o=n[r-1];"user"==t.A.get(e,"ev.by.type")||e.is_typing||(i=e),St(e.ev)&&t.A.unixSec(e.ev.created)-t.A.unixSec(o.ev.created)>300&&(e.show_time=!0)}for(i&&(i.show_time=!0),r=0;r<n.length;r++){let e=n[r];if("message_sent"===t.A.get(e,"ev.type")){e.show_time=!0;break}}let o=-1;for(r=0;r<n.length;r++){let e=n[r],i=n[r-1],s=n[r+1];"message_sent"!==e.ev.type||(o=r,e.mode="lead","message_sent"===t.A.get(i,"ev.type")&&t.A.get(i,"ev.by.id")===t.A.get(e,"ev.by.id")&&(e.mode="follow"),"message_sent"===t.A.get(s,"ev.type")&&t.A.get(s,"ev.by.id")===t.A.get(e,"ev.by.id")||(e.is_end=!0))}o>-1&&(n[o].is_last_message_send=!0)}(0,e),e.push(i);let r=t.A.map(e,t=>{let e=t.is_last_message_send;return(0,O.h)(It,{isLast:e,chatbox:this.props.chatbox,onLink:this.props.onLink,store:this.props.store,onFormSubmit:this.props.onFormSubmit,onSend:this.props.onSend,onPostback:this.props.onPostback,onFocusSourceEventFromQuote:this.onFocusSourceEventFromQuote,ref:e=>this.setEventChildRef(e,t.ev.id),event:t,t:this.props.t,key:t.ev.id})}),o=null,s="opacity: 1 !important";return this.props.creating&&(o=(0,O.h)(et.A,{static:!0,mode:t.A.get(this.props.chatbox,"primary_color","dark"),size:"120",center:!0}),s="opacity: 0 !important"),this.state.loading&&t.A.Date.now()-this.state.loading>500&&(o=(0,O.h)(et.A,{static:!0,mode:t.A.get(this.props.chatbox,"primary_color","dark"),size:"120",center:!0}),s="opacity: 0 !important"),(0,O.h)(O.FK,null,o,(0,O.h)("div",{style:s,ref:t=>this.refBody=t,class:"widget-body--events-container",onMouseOver:this.checkAndSeen},(0,O.h)("div",{class:"widget-body--events"},r),(0,O.h)(Q,{store:this.props.store})))}renderError(){let t=(0,O.h)("a",{href:"#",onclick:t=>this.loadConvo()},this.props.t("try_again"));return this.state.loading&&(t=(0,O.h)(et.A,{size:"16",mode:"blue"})),(0,O.h)("div",{class:"widget-body--events-container widget-body--events-container__error"},(0,O.h)("img",{alt:"empty",class:"widget_body_empty_img",src:Ct}),(0,O.h)("div",{class:"widget_body__events__error_msg"},this.props.t("load_convo_error")),(0,O.h)("div",{class:"widget_body__events__error_retry"},t))}focus(){let e=this.props.store.listEvents(this.props.cid);var n;e=t.A.orderBy(t.A.map(e),"created","desc");for(let i of e)if("message_sent"===t.A.get(i,"type")&&"user"!==t.A.get(i,"by.type")){n=i;break}"user"===t.A.get(n,"by.type")&&(n=null);let i=t.A.get(n,"data.message.attachments",[]),r=this.props.store.matchConvo(this.props.cid);t.A.filter(i,e=>{if(!e)return!1;if("form"!==e.type&&"ask_info_form"!==e.type)return!1;var n=e.form;return!(!n||!(t.A.parseJSON(n.state)||{}).require_finished&&"ask_info_form"!==e.type||function(e){let n=t.A.get(e,"fields")||[];return t.A.find(n,t=>!!t.answered)}(e.form)||"ended"===r.state)})}onEvent(e){if(t.A.convoOfEv(e)!==this.props.cid)return;let n=this.isBottom();var i=!1;"message_sent"===t.A.get(e,"type")&&e.id===t.A.get(e,"data.message.idempotency_key")&&(i=!0),(i||n)&&this.scrollToBottom()}async loadConvo(){if(!this.props.cid)return;this.lastContentOffsetY=0,this.setState({loading:!1});let e=this.props.store.listEvents(this.props.cid);if(0===t.A.size(e)){this.setState({loading:t.A.Date.now()}),t.A.setTimeout(()=>{this.forceUpdate()},800);let e=this.props.cid,{error:n}=await this.props.store.fetchMoreEvents(e);if(this.setState({loading:!1}),e!==this.props.cid)return;if(n)return void this.setState({error:!0})}this.props.store.fetchMoreEvents(this.props.cid),this.setState({error:!1}),this.scrollToBottom()}isBottom(){let t=this.refBody;return!!t&&t.scrollHeight<t.scrollTop+t.offsetHeight+50}scrollToBottom(){t.A.setTimeout(()=>{const t=this.refBody;t&&(t.scrollTop=t.scrollHeight)}),t.A.setTimeout(()=>{const t=this.refBody;t&&(t.scrollTop=t.scrollHeight)},100),this.props.isShow&&"visible"===this.props.store.browserVisibility&&document.hasFocus()&&this.props.store.seenConvo(this.props.cid)}}function St(e){let n=t.A.get(e,"type");return"message_sent"===n||("conversation_state_updated"===n?"ended"==t.A.get(e,"data.conversation.state"):void 0)}var Dt=o(2988);class jt extends F.Mw{constructor(t){var e,n,i;super(t),e=this,i={hide:!0,ratingHeight:0,overlayOpacity:.3,comment:""},(n=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(n="state"))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this.refComment=(0,O._3)(),this.refRating=(0,O._3)(),this.refHandle=(0,O._3)()}componentDidMount(){this.props.store.onUpdate(this,()=>{this.shoudDisplay()&&this.open()}),this.props.store.onConvoEvent(this,e=>{t.A.convoOfEv(e)===this.props.cid&&(this.state.hide||"conversation_rated"!==e.type?this.shoudDisplay()&&this.open():this.close())}),this.mouseUp=t=>this.onMouseUp(t),this.mouseMove=t=>this.onMouseMove(t),this.mouseDown=t=>this.onMouseDown(t);var e=this.refHandle.current;e.addEventListener("mousedown",this.mouseDown,{passive:!0}),e.addEventListener("touchstart",this.mouseDown,{passive:!0}),window.addEventListener("mouseup",this.mouseUp,{passive:!0}),window.addEventListener("touchend",this.mouseUp,{passive:!0}),window.addEventListener("mousemove",this.mouseMove,{passive:!0}),window.addEventListener("touchmove",this.mouseMove,{passive:!0}),this.animation=new Dt.A({maxY:400,minY:0,duration:150}),this.close(),(this.shoudDisplay()||"rating"===this.props.forceView)&&this.open()}componentWillUnmount(){var t=this.refHandle.current;t.removeEventListener("mousedown",this.mouseDown,0),t.removeEventListener("touchstart",this.mouseDown,0),window.removeEventListener("mouseup",this.mouseUp,0),window.removeEventListener("touchend",this.mouseUp,0),window.removeEventListener("mousemove",this.mouseMove,0),window.removeEventListener("touchmove",this.mouseMove,0)}render(){let t=this.state.hide?"d-none":"";return(0,O.h)("div",{class:t},(0,O.h)("div",{class:"rating--overlay",style:`opacity: ${.5*this.state.overlayOpacity} !important;`}),(0,O.h)("div",{class:"rating",ref:this.refRating,style:`color:red; height: ${this.state.ratingHeight}px !important;`},(0,O.h)("div",{class:"rating--handle",ref:this.refHandle},(0,O.h)("div",{class:"rating--thumb"})),(0,O.h)("div",{class:"rating--content"},(0,O.h)("div",{class:"rating--heading"},this.props.t("rating_title"),(0,O.h)("div",{class:"rating--close-btn",onClick:t=>this.onCloseRating(t)})),(0,O.h)("div",{class:"rating--description"},this.props.t("rating_description")),(0,O.h)("textarea",{ref:this.refComment,type:"text",class:"rating--comment"}),(0,O.h)("div",{class:"rating-faces-container"},(0,O.h)("div",{class:"rating-face-container",onClick:t=>this.onRatingPoor(t)},(0,O.h)("img",{alt:"poor",src:o(9801)}),(0,O.h)("p",{class:"rating-face--text"},this.props.t("poor"))),(0,O.h)("div",{class:"rating-face-container",onClick:t=>this.onRatingAverage(t)},(0,O.h)("img",{alt:"average",src:o(7134)}),(0,O.h)("p",{class:"rating-face--text"},this.props.t("average"))),(0,O.h)("div",{class:"rating-face-container",onClick:t=>this.onRatingGreat(t)},(0,O.h)("img",{alt:"great",src:o(940)}),(0,O.h)("p",{class:"rating-face--text"},this.props.t("great")))),(0,O.h)("div",{class:"rating-no-thanks",onClick:t=>this.onCloseRating(t)},this.props.t("no_thanks")))))}shoudDisplay(){if(!this.props.cid)return!1;let e,n,i,r=0,o=this.props.store.matchUser(),s=!1;if(t.A.map(this.props.store.listEvents(this.props.cid),a=>{a&&a.by&&("message_sent"===a.type&&("user"===t.A.get(a,"by.type")&&(s=!0),a.created>r&&(r=a.created)),"conversation_state_updated"===a.type&&"ended"===t.A.get(a,"data.conversation.state")&&(i=a),"conversation_rating_requested"===a.type&&(e=a),"conversation_rated"===a.type&&a.by.id===o.id&&(n=a))}),!s)return!1;if(n)return!1;let a=this.props.plugin.chatbox.auto_request_rating&&i;return a&&(a=!!r&&a&&Date.now()-r<9e5),e||a}onCloseRating(){this.props.onRate&&this.props.onRate({no_rating:!0,comment:this.refComment.current.value}),this.close()}onRatingPoor(){this.props.onRate&&this.props.onRate({rating:1,comment:this.refComment.current.value}),this.close()}onRatingAverage(){this.props.onRate&&this.props.onRate({rating:3,comment:this.refComment.current.value}),this.close()}onRatingGreat(){this.props.onRate&&this.props.onRate({rating:5,comment:this.refComment.current.value}),this.close()}open(){if(this.state.hide&&(this.setState({hide:!1}),this.refRating.current)){t.A.setTimeout(()=>{this.refComment.current&&this.refComment.current.focus()},400),this.refComment.current.value="";var e=this.refRating.current.currentStyle||window.getComputedStyle(this.refRating.current),n=parseFloat(e.height);this.animation.play(-20,n,t=>{this.setState({ratingHeight:t,overlayOpacity:Math.min(1,(t-0)/500)})})}}close(){if(!this.state.hide&&this.refRating.current){var t=this.refRating.current.currentStyle||window.getComputedStyle(this.refRating.current),e=parseFloat(t.height);this.animation.play(20,e,t=>{this.setState({ratingHeight:t,overlayOpacity:Math.min(1,(t-0)/500)}),t<10&&(this.state.hide||this.setState({hide:!0}))})}}onMouseDown(t){this.mousePushed=!0,this.animation.stop(),t.preventDefault(),t.touches&&t.touches[0]&&(t=t.touches[0]),this.mousePushedDy=t.pageY-window.pageYOffset-this.refRating.current.getBoundingClientRect().y}onMouseUp(t){if(this.mousePushed){t.touches&&t.touches[0]&&(t=t.touches[0]),this.mousePushed=!1;var e=this.refRating.current.currentStyle||window.getComputedStyle(this.refRating.current),n=parseFloat(e.height);this.animation.play(this.mouseVelocity,n,t=>{this.setState({ratingHeight:t,overlayOpacity:Math.min(1,(t-0)/500)}),t<10&&(this.state.hide||(this.setState({hide:!0}),this.props.onRate&&this.props.onRate({no_rating:!0})))})}}onMouseMove(t){if(this.mousePushed){t.touches&&t.touches[0]&&(t=t.touches[0]);var e=t.pageY;this.mouseVelocity=e-this.lastMouseY,this.lastMouseY=e,e-=this.mousePushedDy;var n=this.refRating.current.getBoundingClientRect().bottom-e;n>400&&(n=500-1e4/(n+-300)),this.setState({ratingHeight:n,overlayOpacity:Math.min(1,(n-0)/500)})}}}function Tt(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Et extends F.Mw{constructor(t){super(t),Tt(this,"onChangeConnectionStatus",()=>{let t=this.props.store.getConnectionStatus(),e=this.state.status;this.setState({status:t}),"active"!==e&&"active"===t&&this.changeStatusFailedToSuccess()}),Tt(this,"changeStatusFailedToSuccess",()=>{this.setState({status:"just_active"}),this.props.cid&&this.props.store.fetchMoreEvents(this.props.cid),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(()=>{this.setState({status:"active"})},2e3)}),this.props.store.onConnection(this,this.onChangeConnectionStatus),this.state={status:this.props.store.getConnectionStatus()}}render(){if("active"===this.state.status)return;let t="widget-internet-status",e="";return"just_active"!==this.state.status?(t+=" negative",e=`${this.props.t("network_error")}. ${this.props.t("try_reconnecting")}...`):(t+=" positive",e=this.props.t("reconnect_successfully")),(0,O.h)("div",{class:t},e)}}class Lt extends F.Mw{constructor(t){super(t),this.setState({search:"",isShow:!1})}render(){let e=t.A.filter(this.props.items,t=>{let e=this.state.search.toLowerCase();return(t||"").toLowerCase().indexOf(e)>-1}),n=t.A.map(e,t=>(0,O.h)("li",{class:"custom-select--item-options",onClick:()=>this.add(t)},t)),i=t.A.map(this.props.selected,(t,e)=>(0,O.h)("div",{class:"custom-select--selected-item",onClick:t=>this.remove(t,e)},t,(0,O.h)("i",{class:"icn-delete delete-tag"}))),r=(0,O.h)("div",{class:"custom-select--wrap-options"},(0,O.h)("input",{onClick:t=>{t.preventDefault(),t.stopPropagation(),this.setState({isShow:!0})},type:"text",onInput:t=>this.setState({search:t.target.value}),value:this.state.search,placeholder:"Tìm kiếm",class:"custom-select--input-search"}),(0,O.h)("ul",{class:"custom-select--items-options"},n));return this.state.isShow||(r=null),(0,O.h)("div",{class:"form-control custom-select"},(0,O.h)(F.tW,{onClickaway:t=>this.clickaway()},(0,O.h)("div",{class:"custom-select--wrap-selected",onClick:()=>this.setState({isShow:!this.state.isShow})},(0,O.h)("div",{class:"custom-select--selected-items"},i),r,(0,O.h)("div",{class:"custom-select--icon-dropdown"},(0,O.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,O.h)("g",{opacity:"0.6"},(0,O.h)("path",{d:"M7 9.5L12 14.5L17 9.5H7Z",fill:"black"})))))))}clickaway(){this.setState({isShow:!1})}add(t){this.props.onAddItem&&this.props.onAddItem(t)}remove(t,e){t.preventDefault(),t.stopPropagation(),this.props.onRemoveItem&&this.props.onRemoveItem(e)}}function Pt(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Nt=o(8506),Rt=o(9150),Ut=o(9419);let Wt=!1;const Ft="https://vcdn.subiz-cdn.com/file/fiqoahedjbgwclpouoml-avatar_default_baa8a1d7.png";class Ot extends F.Mw{constructor(e){super(e),Pt(this,"msgInput",(0,O._3)()),Pt(this,"findMissingRTMessage",async e=>{let n=this.props.store.listAgentRealtimeMessageSent(),i=await this.props.store.sbzListConversations(),r=t.A.get(i,"body.conversations")||[],o=t.A.map(r,t=>t.id),s=t.A.map(o,t=>this.props.store.sbzListMessages(t)),a=await Promise.all(s);t.A.map(a,i=>{let r=t.A.get(i,"body")||[];t.A.map(r,i=>{i.created<e||"message_sent"===i.type&&"user"!==t.A.get(i,"by.type")&&(console.log("check ev pass condition",i),n[i.id]||this.props.store.sendBugReport("[WIDGET "+accid+"] Missing agent message sent evid "+i.id+", cid "+t.A.convoOfEv(i)))})})}),Pt(this,"debugRTAgentMessageSent",async()=>{try{let e=this.props.store.matchDebugAccountIds(),n=t.A.get(this.props.store.matchAccount(),"id");if(!e.includes(n))return;console.log("START check RT agent message with BE source");let i=Date.now();this.findMissingRTMessage(i);for(let e=0;e<1e5;e++)await t.A.sleep(12e4),console.log("LOOP check RT agent message with BE source",e),this.findMissingRTMessage(i)}catch(t){this.props.store.sendBugReport(`debugRTAgentMessageSent ERROR ${t.stack}`)}}),Pt(this,"formMounted",e=>{let n=this.fillForm(e);(e.question_required||this.state.quickReplyMessage.text)&&(n.question={key:"question",is_required:!0,label:this.props.t.i18n(t.A.get(e,"i18n_question_label",{}))||e.question_label,type:"text",value:this.state.quickReplyMessage.text}),this.setState({formData:n}),this.props.store.isMobile()||e._updated||this.focusInput()}),Pt(this,"sendMessage",async e=>{let n=t.A.find(e.attachments,t=>"postback"===t.type);if(this.isFormRequired()&&n)return this.onStartConvoClick(),void this.fillQuickReplyToQuestion(e);let i=e.text;if(this.props.cid&&this.props.cid.startsWith("cslight")){let n=this.props.cid;this._creating=(this._creating||0)+1;let r=this._creating;this.setState({creating:!0});let o=n.split("_")[0].slice(7),s=this.props.store.matchConvo(this.props.cid)||{},a=t.A.find(s.events,t=>"message_sent"==t.type&&t.by&&"bot"==t.by.type);const{convo:p,error:l}=await this.props.store.startConvo({state:"active",locale:this.props.t.locale(),message:i,members:[{type:"bot",id:o,bot_version:s.bot_version}],initial_by:o,is_testing:s.is_testing,greeting_message:a});if(r!=this._creating)return;if(l)return void this.setState({creating:!1});if(this.props.store.deleteLightConvo(n),await this.props.store.sendConvoEvent(p.id,"message_sent",{message:e}),r!=this._creating)return;return this.props.onGo({view:"chat",cid:p.id}),void this.setState({creating:!1})}if(!this.props.cid){this._creating=(this._creating||0)+1;let t=this._creating;this.setState({creating:!0});const{convo:n,error:r}=await this.props.store.startConvo({locale:this.props.t.locale(),message:i,initial_by:this.props.store.matchUser().id});if(t!=this._creating)return;if(r)return void this.setState({creating:!1});if(await this.props.store.sendConvoEvent(n.id,"message_sent",{message:e}),t!=this._creating)return;return this.props.onGo({view:"chat",cid:n.id}),void this.setState({creating:!1})}t.A.setTimeout(async()=>{await this.props.store.sendConvoEvent(this.props.cid,"message_sent",{message:e}),this.setState({creating:!1})},1)}),Pt(this,"onLink",(e,n)=>{if(!n)return e.preventDefault();let i=n.replace(/(^\w+:|^)\/\//,"");if(i.startsWith("widget.subiz.com.vn/orders/")){let n=i.substr(27);return n=n.split("/")[0],t.A.setTimeout(async()=>{Wt||(Wt=(await o.e(185).then(o.bind(o,4185))).default),this.setState({showOrder:!0,order_id:n})}),void e.preventDefault()}}),Pt(this,"closeOrder",t=>{this.setState({showOrder:!1,order_id:""}),this.focusInput()}),this.userSent={},this.wasFormInputed=!1,this.setState({creating:!1,clickedJoin:!1,formData:{},showOrder:!1,order_id:"",quickReplyMessage:{}}),this.props.store.onUpdate(this,t=>this.forceUpdate()),this.refTyping=(0,O._3)()}componentDidMount(){this.props.store.isMobile()||this.focusInput(),this.updateFormDataFields(),this.debugRTAgentMessageSent()}applyMessage(t){this.focusInput(t)}componentDidUpdate(e){e.isShow!==this.props.isShow&&(this.props.isShow&&!this.props.store.isMobile()&&this.focusInput(),this.props.isShow&&this.props.store.isMobile()&&this.blur(),this.updateFormDataFields()),e.cid!==this.props.cid&&(this.closeOrder(),this.setState({clickedJoin:!1,quickReplyMessage:{}}),t.A.setTimeout(()=>{this.$events&&this.$events.focus(),this.props.store.isMobile()||this.focusInput()},100),this.updateFormDataFields())}ShowTyping(){this.$events&&this.$events.ShowTyping()}shouldShowForm(){let e,n=this.props.plugin.chatbox||{},i=this.props.store.matchAccount()||{};t.A.get(n,"prechat_form.enabled")&&(e=n.prechat_form);let r=t.A.get(n,"offline_form.enabled");if(this.isOffline(i,n)&&r&&(e=n.offline_form),!this.hasSentMessage(this.props.cid)&&e&&(t.A.size(e.groups)||e.group_required))return!0;let o=this.isFormRequired();return o&&!this.props.cid||o&&this.props.cid&&this.state.clickedJoin}render(){let e,n=this.shouldShowForm(),i="",r=this.props.plugin.chatbox||{},o=this.props.store.matchAccount()||{},s=this.props.t("prechat_form_btn");t.A.get(r,"prechat_form.enabled")&&(e=r.prechat_form);let a=t.A.get(r,"offline_form.enabled");this.isOffline(o,r)&&a&&(e=r.offline_form,s=this.props.t("offline_form_btn"),i="offline"),"offline_form"===this.props.view&&(n=!0,e=r.offline_form,i="offline",s=this.props.t("offline_form_btn")),"prechat_form"===this.props.view&&(n=!0,e=r.prechat_form,s=this.props.t("prechat_form_btn"),i="prechat");let p=null;p="list"===this.props.view?this.renderConvoList():n?this.renderForm(e,s,i):this.renderChat();let l=t.A.get(r,"desktop_button.position")||"right";(this.props.store.isMobile()||this.props.store.isEmbededChatMode())&&(l=t.A.get(r,"mobile_button.position",l));let c="widget-container widget-container--"+l;var d;return this.props.store.isEmbededChatMode()&&(c+=" embed-chat"),this.props.store.isMobile()||"full"!==t.A.get(r,"window_mode")||(c+=" widget-container--full"),this.props.isShow||(c+=" widget-container--hide"),t.A.get(r,"header.hidden",!1)||(d=(0,O.h)(K,{t:this.props.t,plugin:this.props.plugin,store:this.props.store,cid:this.props.cid,view:this.props.view,onClose:this.props.onClose,onGotoList:()=>this.props.onGo({view:"list"})})),(0,O.h)("div",{class:c},d,p)}validateForm(e){let n={};return t.A.map(e,(e,i)=>{if((e=Object.assign({},e)).is_empty_error=!1,e.is_required&&(void 0===e.value||""===e.value||0===t.A.size(e.value)&&Array.isArray(e.value))?(e.is_empty_error=!0,e.error=this.props.t("error_empty")):e.error="","emails"===i.substr(5))if(e.is_required)t.A.isEmail(e.value)||(e.error=this.props.t("error_email_invalid"));else{let n=e.value||"";"string"!=typeof n&&(n+=""),n.trim()&&!t.A.isEmail(e.value)&&(e.error=this.props.t("error_email_invalid"))}if("phones"===i.substr(5))if(e.is_required)t.A.isPhone(e.value)||(e.error=this.props.t("error_phone_invalid"));else{let n=e.value||"";"string"!=typeof n&&(n+=""),n.trim()&&!t.A.isPhone(e.value)&&(e.error=this.props.t("error_phone_invalid"))}n[i]=e}),n}async submitPrechatForm(e,n){if(this.state.submiting)return;let i=this.validateForm(this.state.formData);if(t.A.find(i,t=>!!t.error))return this.setState({formData:i}),void this.focusInput();let r=t.A.cloneDeep(this.state.formData),o=t.A.cloneDeep(this.props.store.matchUser()),s=!1;t.A.map(r,(e,n)=>{if(n.startsWith("attr:")){var i={key:n.substr(5)};s=s||"emails"==n||"phones"==n,"number"===e.type&&(i.number=parseInt(e.value)),"datetime"===e.type&&(i.datetime=new t.A.Date(e.value).toISOString()),"list"===e.type&&(i.text=e.value),"text"!==e.type&&"boolean"!==e.type||(i[e.type]=e.value),t.A.setUserAttr(o,i)}}),s&&t.A.setUserAttr(o,{key:"lead_source",text:"widget"});let a=t.A.get(r,"question.value",this.props.t("get_started")),p=t.A.get(r,"group.value","");this._creating=(this._creating||0)+1;let l=this._creating;this.setState({creating:!0});let c=t.A.map(r,(e,n)=>({key:n,type:e.type,value:t.A.stringify(e.value)}));if(await this.props.store.submitForm("chatbox_"+n,c,o),await t.A.sleep(500),l!=this._creating)return;if(this.props.cid&&this.props.cid.startsWith("cslight"))return void this.sendMessage({text:a,format:"plaintext",fields:[{key:"to_agent_group",value:t.A.stringify(p)}],attachments:this.state.quickReplyMessage.attachments});if(this.props.cid){if(this.setState({clickedJoin:!1}),await this.props.store.sendConvoEvent(this.props.cid,"message_sent",{message:{text:a,format:"plaintext",fields:[{key:"to_agent_group",value:t.A.stringify(p)}],attachments:this.state.quickReplyMessage.attachments}}),l!=this._creating)return;return this.setState({creating:!1,quickReplyMessage:{}}),e.end_conversation_after_submit&&await this.props.store.endConvo(this.props.cid),void this._creating}let d={text:a,format:"plaintext"},m={group_id:p,message:a,locale:this.props.t.locale(),initial_by:o.id};this.setState({creatingError:null});const{error:h,convo:u}=await this.props.store.startConvo(m);if(l!=this._creating)return;if(h)return void this.setState({creating:!1,creatingError:h});let g=u.id;this.userSent[g]=!0,await this.props.store.sendConvoEvent(g,"message_sent",{message:d}),l==this._creating&&(this.setState({creating:!1,clickedJoin:!1,quickReplyMessage:{}}),this.props.onGo({view:"chat",cid:g}),this.props.store.isMobile()||this.focusInput())}onBooleanChange(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>n===e);r&&(r.value=n.target.checked,this.setState({formData:i}))}onKeywordField(t,e,n,i){"Enter"==t.code&&this.submitPrechatForm(e,n)}onInputChange(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>n===e);r&&(r.value=n,r.error=void 0,this.setState({formData:i}))}onListAddItem(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>n===e);r&&(r.value=r.value||[],r.value.push(n),this.setState({formData:i}))}onListRemoveItem(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>n===e);r&&(r.value=r.value||[],r.value.splice(n,1),this.setState({formData:i}))}renderCheckboxField(e){let n=t.A.get(e,"def.items",[]),i=[],r=e.value||"";return r&&(i=r.split(",")),(0,O.h)("div",null,t.A.map(n,t=>(0,O.h)("div",{class:"checkbox"},(0,O.h)("input",{type:"checkbox",id:"form-checkbox"+Ht(e.key)+t.value,onChange:n=>this.toggleCheckboxField(e.key,t.value),checked:i.includes(t.value)}),(0,O.h)("label",{class:"checkbox--label",for:"form-checkbox"+Ht(e.key)+t.value},this.props.t.i18n(t.i18n_label)||t.label||t.value),(0,O.h)("div",{class:"checkbox--check"},(0,O.h)("div",null)))))}toggleCheckboxField(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>t.key===e);if(!r)return;let o=r.value||"",s=[];o&&(s=o.split(",")),s.includes(n)?s=t.A.filter(s,t=>t!==n):s.push(n),r.value=s.join(","),this.setState({formData:i})}renderRadioField(e){let n=t.A.get(e,"def.items",[]),i=e.value||"";return(0,O.h)("div",null,t.A.map(n,t=>(0,O.h)("div",{class:"radio"},(0,O.h)("input",{type:"radio",name:"form-radio"+Ht(e.key),id:"form-radio"+Ht(e.key)+t.value,onChange:n=>this.toggleRadioField(e.key,t.value),checked:i===t.value}),(0,O.h)("label",{class:"radio--label",for:"form-radio"+Ht(e.key)+t.value},this.props.t.i18n(t.i18n_label)||t.label||t.value),(0,O.h)("div",{class:"radio--check"},(0,O.h)("div",null)))))}toggleRadioField(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>t.key===e);r&&(r.value=n,this.setState({formData:i}))}selectDropdownField(e,n){this.wasFormInputed=!0;let i=t.A.cloneDeep(this.state.formData),r=t.A.find(i,(t,n)=>t.key===e);r&&(r.value=n,this.setState({formData:i}))}renderDropdownField(e){let n=t.A.get(e,"def.items",[]);return(0,O.h)("select",{class:"form-control",value:e.value,onChange:t=>this.selectDropdownField(e.key,t.target.value)},(0,O.h)("option",{value:""},"-- ",this.props.t("no_select")," --"),t.A.map(n,t=>(0,O.h)("option",{value:t.value},this.props.t.i18n(t.i18n_label)||t.label||t.value)))}renderFields(e,n){if(0===t.A.size(this.state.formData))return null;let i=t.A.map(this.state.formData,(i,r)=>{if(this.state.quickReplyMessage.text&&"question"===r)return null;let o=null;var s=i.error?"input--error":"";if("text"===i.type)o="question"==r||t.A.get(i,"def.multiple_line")?(0,O.h)("textarea",{class:`form-control ${s}`,ref:t=>{this["form_"+Ht(r)]=t},id:"form_"+Ht(r),value:i.value||"",onInput:t=>this.onInputChange(r,t.target.value),onChange:t=>this.onInputChange(r,t.target.value),row:"4"}):"checkbox"===t.A.get(i,"def.select")?this.renderCheckboxField(i):"radio"===t.A.get(i,"def.select")&&t.A.size(t.A.get(i,"def.items",[]))<5?this.renderRadioField(i):"dropdown"===t.A.get(i,"def.select")||t.A.size(t.A.get(i,"def.items",[]))>=5?this.renderDropdownField(i):(0,O.h)("input",{id:"form_"+Ht(r),value:i.value||"",onInput:t=>this.onInputChange(r,t.target.value),onChange:t=>this.onInputChange(r,t.target.value),onKeyDown:t=>this.onKeywordField(t,e,n,r),ref:t=>{this["form_"+Ht(r)]=t},class:`form-control ${s}`,type:"text"});else if("number"===i.type)o=(0,O.h)("input",{id:"form_"+Ht(r),value:i.value,onInput:t=>this.onInputChange(r,t.target.value),ref:t=>{this["form_"+Ht(r)]=t},class:`form-control ${s}`,type:"number"});else if("boolean"===i.type)o=(0,O.h)("div",{class:"checkbox"},(0,O.h)("input",{type:"checkbox",id:"form-checkbox"+Ht(r),onInput:t=>this.onBooleanChange(r,t),checked:i.value}),(0,O.h)("label",{class:"checkbox--label",for:"form-checkbox"+Ht(r)},i.label),(0,O.h)("div",{class:"checkbox--check"},(0,O.h)("div",null)));else if("group"===i.type)o=t.A.map(i.list,t=>(0,O.h)("div",{class:"radio"},(0,O.h)("input",{type:"radio",id:"form-radio"+Ht(r)+Ht(t.value),checked:i.value===t.value,onInput:e=>this.onInputChange(r,t.value)}),(0,O.h)("label",{class:"radio--label",for:"form-radio"+Ht(r)+Ht(t.value)},this.props.t.i18n(t.i18n_label)||t.label||t.value),(0,O.h)("div",{class:"radio--check"},(0,O.h)("div",{class:"inside"}))));else if("list"===i.type){let e=this.state.formData[r].value||[],n=t.A.filter(t.A.get(i,"list",[]),n=>!t.A.includes(e,n));o=(0,O.h)(Lt,{selected:e,items:n,onAddItem:t=>this.onListAddItem(r,t),onRemoveItem:t=>this.onListRemoveItem(r,t)}),o=this.renderDropdownField(i)}else"datetime"===i.type&&(o=(0,O.h)("input",{id:"form_"+Ht(r),value:i.value,onInput:t=>this.onInputChange(r,t.target.value),class:`form-control ${s}`,type:"date"}));let a="";return"fullname"===i.key?a=this.props.t("fullname"):"emails"===i.key?a=this.props.t("email"):"phones"===i.key?a=this.props.t("phones"):"question"===i.key&&(a=i.label||this.props.t("your_question")),i.label&&(a=i.label),(0,O.h)("div",{key:"form_"+Ht(r)},(0,O.h)("label",{class:"label",for:"form_"+Ht(r)},a,i.is_required?(0,O.h)("span",{class:"red"},"*"):""),o,i.error?(0,O.h)("div",{class:"form-control--valid-input--error"},i.error):"")});return(0,O.h)("div",{class:"pt-2"},i)}renderForm(e,n,i){let r=this.props.t.i18n(t.A.get(e,"i18n_title",{}));r||(r=t.A.get(e,"title",this.props.t("capture_lead_title"))),r=r.replace("↵","");let o=t.A.find(this.state.formData,t=>!!t.error),s=this.validateForm(this.state.formData),a=t.A.find(s,t=>!!t.is_empty_error),p="widget-body";return this.props.store.isEmbededChatMode()&&(p+=" embed-chat"),(0,O.h)("div",{class:p},(0,O.h)(Gt,{key:e._updated,form:e,onMount:this.formMounted}),(0,O.h)("div",{class:"widget-body--content flex-grow-1 pl-3 pr-3 pb-2 d-flex flex-column"},(0,O.h)("div",{class:"mt-2 d-flex flex-column"},(0,O.h)("div",null,r),this.renderFields(e,i)),this.props.store.isMobile()?(0,O.h)("div",{style:"height: 20px !important; flex-shrink: 0 !important"}):(0,O.h)("div",{style:"min-height: 15px !important; flex: 1 !important; flex-shrink: 0 !important"}),(0,O.h)("button",{class:"btn--start-convo ",onClick:t=>this.submitPrechatForm(e,i),disabled:!!a||!!o||this.state.creating},n)))}goToConvo(t){this.props.onGo({view:"chat",cid:t})}renderConvoList(){let e=this.props.store.matchConvo("*");var n=t.A.map(e,t=>this.props.store.matchConvo(t.id));n=t.A.filter(n,t=>!!t),n=t.A.orderByF(n,e=>t.A.get(e,"last_message_sent.created",e.actived),"desc");var i=t.A.map(n,e=>{let n=t.A.filter(e.members,t=>"agent"===t.type&&"active"===t.membership||"bot"===t.type),i=t.A.map(n,t=>t.id);return i=i||t.A.agentsOfConvo(e)[0],(0,O.h)("div",{class:"convo-list--item",onClick:()=>this.goToConvo(e.id),key:e.id},(0,O.h)(X,{plugin:this.props.plugin,store:this.props.store,mode:"secondary",class:"d-flex flex-row",tooltipPos:"right",agent_ids:[i[0]]}),this.renderConvoSummary(e))});let r=(0,O.h)("div",{class:"convo-list--list"},i);return 0===t.A.size(n)&&(r=(0,O.h)("div",{class:"convo-list--list"},(0,O.h)("div",{class:"empty-container"},(0,O.h)("img",{class:"widget_body_empty_img",alt:"empty",src:Ut}),(0,O.h)("div",{class:"empty-desc"},this.props.t("empty_convo"))))),(0,O.h)("div",{class:"convo-list"},(0,O.h)("div",{class:"convo-list--container"},(0,O.h)("div",{class:"convo-list--title"},this.props.t("conversations")),r),(0,O.h)("div",{class:"convo-list--footer"},(0,O.h)(Q,{store:this.props.store}),(0,O.h)("button",{class:"btn--start-convo",onClick:t=>this.goToConvo("")},(0,O.h)("span",null,this.props.t("start_conversation")),(0,O.h)("img",{src:Nt,alt:"send button",width:"26",height:"26"})),(0,O.h)("div",{class:"mt-2"})))}blur(){if(!this.props.store.isPreview){var e=this.msgInput.current;e&&(t.A.setTimeout(()=>e&&e.blur()),t.A.setTimeout(()=>e&&e.blur(),300))}}focusInput(e){if(!this.props.store.isPreview){if(this.shouldShowForm()){let e="";return t.A.map(this.state.formData,(t,n)=>{e||"text"!==t.type||t.value&&!t.error||(e=n)}),(n=this["form_"+Ht(e)])&&n.focus(),void t.A.setTimeout(()=>{t.A.map(this.state.formData,(t,n)=>{e||"text"!==t.type||t.value&&!t.error||(e=n)});var n=this["form_"+Ht(e)];n&&n.focus()},200)}var n;(n=this.msgInput.current)&&(null!=e&&"string"==typeof e&&n.applyMessage(e),t.A.setTimeout(()=>n.focus()),t.A.setTimeout(()=>n.focus(),300))}}onRate(t){this.props.cid&&(this.props.store.sendConvoEvent(this.props.cid,"conversation_rated",{conversation:{ratings:[t]}}),this.focusInput())}fillQuickReplyToQuestion(e){let n=this.state.formData;n&&t.A.set(n,"question.value",e.text||this.props.t("get_started")),this.setState({formData:n,quickReplyMessage:e})}createPostback(t){this.props.store.createPostback(this.props.cid,t)}onChangeMessageInput(){this.wasFormInputed=!0}renderChat(){let t=(0,O.h)(nt,{store:this.props.store,ref:this.msgInput,cid:this.props.cid,onChange:this.onChangeMessageInput,is_loading:this.state.creating,onSend:this.sendMessage,t:this.props.t}),e=this.props.store.matchConvo(this.props.cid)||{};(this.isFormRequired()||"ended"===e.state)&&(t=(0,O.h)("div",{class:"message-input message-input--preform"},(0,O.h)("button",{class:"btn--start-convo",onClick:t=>this.onStartConvoClick(t)},this.props.t("offline_preform_btn"))));let n="widget-body";return this.props.store.isEmbededChatMode()&&(n+=" embed-chat"),(0,O.h)("div",{class:n},(0,O.h)("div",{class:"widget-body--content",onClick:t=>this.onContainerClick(t)},(0,O.h)(Mt,{isShow:this.props.isShow,onLink:this.onLink,store:this.props.store,chatbox:this.props.plugin.chatbox||{},onFormSubmit:t=>this.onEventFormSubmit(t),ref:t=>this.$events=t,cid:this.props.cid,creating:this.creating,onSend:t=>this.sendMessage(t),onPostback:t=>this.createPostback(t),t:this.props.t,plugin:this.props.plugin}),(0,O.h)(Et,{cid:this.props.cid,store:this.props.store,t:this.props.t})),(0,O.h)(jt,{forceView:this.props.view,plugin:this.props.plugin,store:this.props.store,onRate:t=>this.onRate(t),cid:this.props.cid,t:this.props.t}),(0,O.h)(Wt,{forceView:this.props.view,plugin:this.props.plugin,show:this.state.showOrder,order_id:this.state.order_id,store:this.props.store,onClose:this.closeOrder,cid:this.props.cid,t:this.props.t}),t)}async onStartConvoClick(){if("ended"===(this.props.store.matchConvo(this.props.cid)||{}).state)return this.props.onGo({view:"chat",cid:""});this.setState({clickedJoin:!0,quickReplyMessage:{}})}onEventFormSubmit(){this.focusInput()}onContainerClick(){window.getSelection().toString().length>0||this.props.store.isMobile()||this.focusInput()}isFormRequired(){let e,n=this.props.plugin.chatbox||{},i=this.props.store.matchAccount()||{};t.A.get(n,"prechat_form.enabled")&&(e=n.prechat_form);let r=t.A.get(n,"offline_form.enabled");if(this.isOffline(i,n)&&r&&(e=n.offline_form),!e)return!1;let o=this.fillForm(e),s=this.props.store.matchConvo(this.props.cid)||{};if("ended"===s.state)return!0;s.state&&"pending"!==s.state&&delete o.group;let a=!0;return t.A.each(o,t=>{t.value&&(a=!1)}),!(!a||this.userHasSent(this.props.cid))||!!t.A.find(o,t=>t.is_required&&(null==t.value||""===t.value))}renderConvoSummary(e){let n=this.props.plugin.chatbox||{},i=this.props.store.matchAgent("*"),r=t.A.filter(e.members,t=>"agent"===t.type||"bot"===t.type),o=t.A.map(r,t=>t.id);o=o||t.A.agentsOfConvo(e)[0];let s=t.A.map(o,t=>i[t]||{avatar_url:Ft,fullname:"Offline Agent"});var a=t.A.each(s,t=>t.fullname).join(", ");!n.hide_agent_profile&&a||(a=this.props.store.matchAccount().name),a||(a=this.props.t("agent"));var p=null;"user"===e.lastSenderType&&(p=(0,O.h)("span",null,this.props.t("you"),":"));let l=t.A.isConvoSeen(e,this.props.store.matchUser().id);var c=this.renderMessagePreview(e.last_message_sent),d=t.A.getMs(t.A.get(e,"last_message_sent.created"))||t.A.getMs(e.created);let m=l?null:(0,O.h)("div",{class:"convo-list--item-unread"});return"ended"===e.state&&(m=(0,O.h)("img",{alt:"conversation ended",class:"convo-list--convo-completed",src:Rt,title:this.props.t("conversation_ended")})),(0,O.h)("div",{class:"convo-list--convo-last-info"},(0,O.h)("div",{class:"d-flex flex-row"},(0,O.h)("div",{class:"convo-list--convo-name"},a),(0,O.h)("div",{class:"convo-list--convo-time"},(0,O.h)(yt.A,{ago:!0,time:d,t:this.props.t,short:!0}))),(0,O.h)("div",{class:"d-flex flex-row"},(0,O.h)("div",{class:"convo-list--convo-last-message"},p,c),m))}agentsOfConvo(e){let n=this.props.store.matchAgent("*");var i=t.A.agentsOfConvo(e,!0);return t.A.map(i,t=>n[t]||{avatar_url:Ft,fullname:"Offline Agent"})}renderMessagePreview(e){let n=this.props.t("sent_you_a_message"),i=t.A.get(e,"data.message.text");if("plaintext"!==t.A.get(e,"data.message.format")&&(i=n),!i&&t.A.size(t.A.get(e,"data.message.attachments"))>0&&(i=n),!i)return null;let r=t.A.get(e,"by.type");return(0,O.h)("div",{class:"convo-list--convo-last-mes"},t.A.map(t.A.extractText(i),t=>"emoji"===t.type?(0,O.h)(G.A,{emojiCode:t.text,byType:r}):t.text))}userHasSent(e){var n=this.props.store.matchConvo(e)||{};let i=this.props.store.matchUser();return!!this.userSent[e]||t.A.find(n.members,t=>t.id===i.id&&("active"===t.membership||t.last_sent>0))}hasSentMessage(e){if(this.userSent[e])return!0;let n=this.props.store.matchConvo(e)||{};return t.A.find(n.members,t=>"bot"===t.type||t.last_sent)}isOffline(e,n){let i=t.A.get(n,"offline_form.enable_when"),r=!0;return"all_agents_offline"===i&&(r=e.is_online),"out_of_bussiness_hour"===i&&(r=e.is_in_business_hour),!r}updateFormDataFields(){let e,n=this.props.plugin.chatbox||{},i=this.props.store.matchAccount()||{};t.A.get(n,"prechat_form.enabled")&&(e=n.prechat_form);let r=t.A.get(n,"offline_form.enabled");if(this.isOffline(i,n)&&r&&(e=n.offline_form),"offline_form"===this.props.view&&(e=n.offline_form),"prechat_form"===this.props.view&&(e=n.prechat_form),0===t.A.size(e))return[];var o={};t.A.each(e.fields,e=>{var n=Object.assign({},e);"list"===e.type&&(n.list=e.list),n.label=this.props.t.i18n(t.A.get(e,"i18n_label",{}))||e.label,o["attr:"+e.key]=n}),e.group_required&&t.A.size(e.groups)>0&&(o.group={key:"group",is_required:!!e.group_required,label:this.props.t.i18n(t.A.get(e,"i18n_group_label",{}))||e.group_label,type:"group",list:t.A.map(e.groups,t=>({value:t.id,label:t.name,i18n_label:t.i18n_name}))}),e.question_required&&(o.question={key:"question",is_required:!0,label:this.props.t.i18n(t.A.get(e,"i18n_question_label",{}))||e.question_label,type:"text"}),this.isFormChanged(this.state.formData,o)&&this.setState({formData:o})}isFormChanged(e,n){let i=Object.keys(e),r=Object.keys(n);if(i.length!==r.length)return!0;for(let o=0;o<i.length;o++){if(t.A.get(e,`${i[o]}.label`)!==t.A.get(n,`${r[o]}.label`))return!0;if(t.A.get(e,`${i[o]}.is_required`)!==t.A.get(n,`${r[o]}.is_required`))return!0;if(t.A.stringify(t.A.get(e,`${i[o]}.list`))!==t.A.stringify(t.A.get(n,`${r[o]}.list`)))return!0}return!1}fillForm(e){if(0===t.A.size(e))return[];var n={};let i=this.props.store.matchUser();return t.A.each(e.fields,e=>{var r=Object.assign({},e);r.value=t.A.getUserAttr(i,e.key,e.type),"emails"!=r.key||r.value||(r.value=t.A.getUserAttr(i,"related_email","text")),"phones"!=r.key||r.value||(r.value=t.A.getUserAttr(i,"related_phone","text")),"boolean"!==e.type||r.value||(r.value=!1),"datetime"===e.type&&r.value&&(r.value=new t.A.Date(n.value).toLocaleDateString("en-CA")),"list"===e.type&&(r.list=e.list),r.label=this.props.t.i18n(t.A.get(e,"i18n_label",{}))||e.label,n["attr:"+e.key]=r}),e.group_required&&t.A.size(e.groups)>0&&(n.group={key:"group",is_required:!!e.group_required,label:this.props.t.i18n(t.A.get(e,"i18n_group_label",{}))||e.group_label,type:"group",list:t.A.map(e.groups,t=>({value:t.id,label:t.name}))}),n}}class Gt extends F.Mw{componentDidMount(){this.props.onMount(this.props.form)}}function Ht(t){return encodeURIComponent(t)}var Bt=o(9278);class Zt extends F.Mw{constructor(t){super(t),this.refButton=(0,O._3)(),this.refWidget=(0,O._3)()}refreshCSS(){let e=this.props.store.matchPlugin(),n=t.A.find(e,t=>t.id===this.props.plugin.id);if(!n)return;let i=Bt.default.default.toString()+"",r=n.chatbox,o=t.A.get(r,"desktop_button.margin_y");r.desktop_widget_max_height=o?`calc(100% - ${o+10}px)`:"calc(100% - 40px)",r.preview_max_width=Math.min(340,r.width)+"px";var s=t.A.replaceCssVariable(i,r);t.A.setCss(this.props.plugin.id,this.$cssStyleDiv,s)}componentWillUnmount(){t.A.setCss(this.props.plugin.id,this.$cssStyleDiv,"")}async componentDidMount(){this.$cssStyleDiv=document.getElementById("subiz-style-for-"+this.props.plugin.id),this.$cssStyleDiv||(this.$cssStyleDiv=document.createElement("style"),document.head.appendChild(this.$cssStyleDiv),this.$cssStyleDiv.type="text/css",this.$cssStyleDiv.id="subiz-style-for-"+this.props.plugin.id),this.setState({cssReady:!1}),this.checkExpand(),this.props.store.onResetCSS(this,()=>this.refreshCSS()),this.props.store.onConvoEvent(this,t=>this.onConvoEvent(t)),this.props.store.onUpdate(this,t=>this.checkExpand()),this.props.store.onDestroyed(this,t=>{this.setState({widgetView:"",widgetConvoId:""})}),this.refreshCSS(),this.setState({cssReady:!0})}render(){if(!this.state.cssReady)return"undefined"!=typeof sbz_info&&(sbz_info.render_chatbox_css_not_ready=t.A.Date.now()),null;if(t.A.isUserBanned(this.props.store.matchUser()))return"undefined"!=typeof sbz_info&&(sbz_info.render_chatbox_user_is_banned=t.A.Date.now()),null;if(!this.props.t)return"undefined"!=typeof sbz_info&&(sbz_info.render_chatbox_no_t=t.A.Date.now()),null;"undefined"!=typeof sbz_info&&(sbz_info.render_chatbox_main=t.A.Date.now());let e=this.props.store.matchLastview()||{},n="widget"===e.screen,i=e.view,r=t.A.get(e,"opts.cid");return(0,O.h)("div",{class:this.props.store.isMobile()||this.props.store.isEmbededChatMode()?"mobile":"desktop"},(0,O.h)(q,{plugin:this.props.plugin,store:this.props.store,key:"chat_button",ref:this.refButton,isShow:!n,onClick:t=>this.showWidget(t),onNewMessageShowWidget:t=>this.onNewMessageShowWidget(t),onSelectQuickReply:t=>this.onSelectQuickReply(t),t:this.props.t}),(0,O.h)(Ot,{plugin:this.props.plugin,store:this.props.store,view:i,cid:r,isShow:n,onClose:t=>this.onWidgetClose(t),onGo:t=>this.showWidget(t),t:this.props.t,ref:this.refWidget}))}onConvoEvent(t){this.checkExpand(),this.checkShowBotConvo(t)}checkShowBotConvo(e){let n=this.refWidget.current;if(!n)return;if(n.wasFormInputed)return;if("message_sent"!==e.type)return;if("widget"!==t.A.get(this.props.store.matchLastview(),"screen"))return;let i=t.A.get(e,"by.type");if(!(t.A.get(e,"by.id")||"").startsWith("bb")||"agent"!==i)return;let r=t.A.get(e,"data.message.conversation_id");r&&this.showWidget({cid:r,view:"chat"})}checkExpand(){this.props.store.isMobile()||this.props.plugin._no_auto_expand}onSelectQuickReply(t){this.showWidget({view:"chat",cid:t.conversation_id}),this.forceUpdate(()=>{this.refWidget.current&&this.refWidget.current.sendMessage(t)})}onNewMessageShowWidget(t){this.props.store.isMobile()&&qt(),this.props.store.updateLastview({screen:"widget",previewEvent:{},view:"chat",opts:{cid:t}}),this.forceUpdate()}async showWidget(e){let n=e.cid,i={screen:"widget",minimized:0,view:e.view,previewEvent:{},opts:{cid:n}};if(!e.view&&!e.cid){let e=this.props.store.matchConvo("*"),r=t.A.find(e,e=>!t.A.isConvoSeen(e,this.props.store.matchUser().id));n=t.A.get(r,"id",t.A.get(e,"0.id")),i.view="chat",i.opts={cid:n}}this.props.store.isMobile()&&qt(),this.props.store.updateLastview(i),this.forceUpdate()}applyMessage(t){this.refWidget.current&&this.refWidget.current.applyMessage(t)}showGreeting(){this.refButton.current&&this.refButton.current.ShowGreeting()}hideGreeting(){this.refButton.current&&this.refButton.current.HideGreeting()}showTyping(){this.refWidget.current&&this.refWidget.current.ShowTyping()}hideWidget(){!function(){document.body&&document.body.classList&&document.body.classList.remove("sbz_no_scroll"),document.documentElement&&document.documentElement.classList&&document.documentElement.classList.remove("sbz_no_scroll");let t=document.getElementById("subiz-meta-viewport");t&&t.remove()}(),this.props.store.updateLastview({screen:"button",previewEvent:{},minimized:Date.now()}),this.forceUpdate()}onWidgetClose(){this.hideWidget(),this.props.store.emitCloseWidgetEvent()}}function qt(){document.body&&document.body.classList&&document.body.classList.add("sbz_no_scroll"),document.documentElement&&document.documentElement.classList&&document.documentElement.classList.add("sbz_no_scroll");let t=document.querySelectorAll('meta[name="viewport"]'),e=!0;for(let n=0;n<t.length;n++)if((t[n].getAttribute("content")||"").indexOf("maximum-scale")>-1){e=!1;break}if(e){let t=document.createElement("meta");t.httpEquiv="X-UA-Compatible",t.name="viewport",t.id="subiz-meta-viewport",t.content="maximum-scale=1.0, user-scalable=no, width=device-width, initial-scale=1.0",document.getElementsByTagName("head")[0].appendChild(t)}}function $t(e,n,i,r){if(!i)throw"$div must is a valid html node";var s=document.createElement("div");s.id=e.id;let a=n.matchAccount();s.setAttribute("sbz-plugin-type",e.type),s.setAttribute("sbz-plugin-account-id",a.id),i.appendChild(s);let p=F.JK(e,t.A.detectLang());var l,c=new t.A.Gate,d=0,m="hold",h=this;this.getState=()=>m;var u=async function(){if("undefined"!=typeof sbz_info&&(sbz_info[t.A.Date.now()+".run"]=m),w)return;if("hold"!==m)return;if("popup"===e.type&&n.isConverted(e.id))return;let i=n.matchLastPluginRun(e.id);if("chatbox"!==e.type&&"notification"!==e.type||(i=void 0),!e.enabled)return;let r=t.A.checkRunConditions(e.initiative_frequency,e.conditions,i,n);"undefined"!=typeof sbz_info&&(sbz_info[t.A.Date.now()+".run.match"]=r),r&&(m="running",await h.update(e))};this.forceRunPopup=async()=>{t.A.get(g,"current")?g.current.openPopup():x()};var g=(0,O._3)();let b=null,f=null,v=null;var _=t=>r.showWidget(t),y=()=>{d++,x()},x=async()=>{w||s&&this.t&&("chatbox"===e.type&&("undefined"!=typeof sbz_info&&(sbz_info.render_chatbox=t.A.Date.now()),(0,O.XX)((0,O.h)(Zt,{destroy:w,plugin:e,store:n,ref:g,t:this.t}),s)),"popup"===e.type&&(b||(b=(await o.e(132).then(o.bind(o,132))).default),(0,O.XX)((0,O.h)(b,{destroy:w,t:this.t,highlight:l,mobile:n.isMobile(),plugin:e,store:n,ref:g,pageIndex:d,nextPage:y,showWidget:_}),s)),"notification"===e.type&&(v||(v=(await o.e(490).then(o.bind(o,1490))).default),(0,O.XX)((0,O.h)(v,{destroy:w,t:this.t,mobile:n.isMobile(),plugin:e,store:n,ref:g}),s)),"contact"===e.type&&(f||(f=(await o.e(74).then(o.bind(o,9074))).default),(0,O.XX)((0,O.h)(f,{destroy:w,t:this.t,plugin:e,store:n,ref:g}),s)),c.open())};this.call=(t,e)=>c.entry().then(()=>g.current[t](e));var w=!1;this.destroy=()=>{w=!0,(0,O.XX)(null,s),s.parentNode.removeChild(s)},this.highlight=t=>{l=t,x()},this.update=t=>{w||(e=t,"hold"!==m&&"finished"!==m&&x())};let k=e=>{if("debug"===p)return`{{${e}}}`;let n=t.A.get(F.r9,p,[]),i=t.A.find(n,t=>t.key===e);return t.A.get(i,"message",e)};k.i18n=t=>{if(!t)return"";let n=e.locale||a.locale||"vi-VN";return n=n.replace("-","_"),t[p.replace("-","_")]||t[n]},k.locale=()=>p,this.forceDownloadLanguage=async()=>{await F.Dy(n,p,!0),this.update(e)},this.setLocale=async t=>p===t?t:(this.t=null,x(),p=F.JK(e,t),await F.Dy(n,p),this.t=k,x(),p);let A={};t.A.map(t.A.get(e,"popup.pages"),e=>{e&&t.A.map(e.components,t=>{"image"===t.type&&t.image&&t.image.url&&t.image.url.startsWith("http")&&(A[t.image.url]=!0)})}),t.A.size(A)>=0&&t.A.map(A,(e,n)=>t.A.preloadImg(n));let z=t.A.get(e,"triggers")||[{type:"after_pageview",after_pageview_sec:0,disabled:!1}];for(var I=0;I<t.A.size(z);I++){var C=z[I];C&&(C.disabled||("exit_intent"===C.type&&t.A.trackExitIntent(u),"area_clicked"===C.type&&t.A.trackAreaClicked(C.area_clicked_css_selector,u),"scrolling_percentage"===C.type&&t.A.trackScrollingPercentage(C.scrolling_percentage,u),"inactivity_duration"===C.type&&t.A.trackInactivity(C.inactivity_sec,u),"after_pageview"===C.type&&t.A.trackTimeOnPage(C.after_pageview_sec,u)))}this.update(e),"undefined"!=typeof sbz_info&&(sbz_info.load_lang=t.A.Date.now()),F.Dy(n,p).then(()=>{"undefined"!=typeof sbz_info&&(sbz_info.load_lang_done=t.A.Date.now()),this.t=k,this.update(e)})}class Vt{constructor(e,n){this.refM={},this.lib=e,this.$div=n,this.pluginM={},this._destroy=!1,e.store.onHighlight({_isMounted:!0},(t,e)=>{let n=this.pluginM[t];n&&n.highlight(e)}),e.store.onUpdate({_isMounted:!0},()=>{if(this._destroy)return;let i=this.lib.store.matchPlugin(),r=!1;t.A.each(i,t=>{if("chatbox"===t.type){if(r)return;r=!0}this.pluginM[t.id]?this.pluginM[t.id].update(t):this.pluginM[t.id]=new $t(t,this.lib.store,n,e)}),t.A.each(this.pluginM,(t,e)=>{i[e]||(this.pluginM[e].destroy(),delete this.pluginM[e])})});let i=this.lib.store.matchPlugin();"undefined"!=typeof sbz_info&&(sbz_info.plugins=i);let r=!1;t.A.each(i,t=>{if("chatbox"===t.type){if(r)return;r=!0}this.pluginM[t.id]||(this.pluginM[t.id]=new $t(t,this.lib.store,n,e))})}findChatbox(){var e=this.lib.store.matchPlugin();let n=t.A.filter(this.pluginM,(t,n)=>"chatbox"===e[n].type);if(0===t.A.size(n))return void console.error("no chatbox found.");let i=t.A.find(n,t=>"running"===t.getState());if(i||(i=n[0]),i)return i;console.error("found no suitable chatbox to run.")}getCurrentView(){let t=this.findChatbox();if(t)return t.call("getCurrentView")}showCurrentChatbox(t){let e=this.findChatbox();if(e)return e.call("showWidget",t)}showCurrentChatboxTyping(){let t=this.findChatbox();if(t)return t.call("showTyping")}showCurrentGreeting(){let t=this.findChatbox();if(t)return t.call("showGreeting")}applyTextToCurrentChatbox(t){let e=this.findChatbox();if(e)return e.call("applyMessage",t)}hideCurrentGreeting(){let t=this.findChatbox();if(t)return t.call("hideGreeting")}hideCurrentChatbox(){let t=this.findChatbox();if(t)return t.call("hideWidget")}forceUpdateLang(t){let e=this.pluginM[t];if(e)return e.forceDownloadLanguage()}forceRunPopup(t){let e=this.pluginM[t];if(e)return e.forceRunPopup(t)}setPluginLocale(t,e){let n=this.pluginM[t];if(n)return n.setLocale(e)}setCurrentChatboxLocale(t){let e=this.findChatbox();if(e)return e.setLocale(t)}destroy(){t.A.map(this.pluginM,(t,e)=>{t.destroy(),delete this.pluginM[e]}),this._destroy=!0}}function Jt(t,e,n){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Yt{constructor(e,n,i,r,o){Jt(this,"version",()=>"4.5"),Jt(this,"setSetting",t=>this.store.setSetting({account_setting:t})),Jt(this,"getUser",()=>t.A.parseJSON(t.A.stringify(this.store.matchUser()))),Jt(this,"setViewingProduct",t=>this.store.linkProduct(t)),Jt(this,"getViewingProduct",()=>this.store.getLinkedProduct()),Jt(this,"track",()=>this.store.track()),this.impressionTokens={},this.domGate=new t.A.Gate,this.store=new T(e,n,i,r,o),window.sbz_store=this.store,this.subs=[],this.store.onConvoEvent({_isMounted:!0},e=>t.A.map(this.subs,t=>{t&&"function"==typeof t&&t(e)})),this.store.onWidgetClose({_isMounted:!0},e=>t.A.map(this.subs,t=>{t&&"function"==typeof t&&t(e)}))}async waitReady(t){await this.store.readyGate.entry(),t()}setAIDevMode(t){this.store.setAIDevMode(t)}setEmbebedChatMode(){this.store.setEmbebedChatMode()}setTrackPageView(t){this.store.setTrackPageview(t)}getTrackPageView(){return this.store.getTrackPageview()}async cleanLogin(t,e){}async login(e,n,i,r){let o=await this.store.login(e,n,i);r||(r=document.body),this.pluginMgr=new Vt(this,r);let s=t.A.setInterval(()=>{r&&r.isConnected||(this.pluginMgr.destroy(),t.A.clearInterval(s))},1e3);return this.domGate.open(),o}logout(t){return this.store.logout(t)}overrideBotId(t){this.store.overrideBotId(t)}async init(e,n){let i=(e=e||{}).account_id,r=e.ref,o=await this.store.init(i,void 0,r,e);t.A.setTimeout(()=>window.postMessage({type:"widget_loaded",account_id:i},"*"),0),n||(n=document.body||document),this.pluginMgr=new Vt(this,n);let s=t.A.setInterval(()=>{n&&n.isConnected||(this.pluginMgr.destroy(),t.A.clearInterval(s))},1e3);return this.domGate.open(),o}async start(e,n,i,r){let o=(e=e||{}).account_id,s=await this.store.init(o,i,e.ref,e);t.A.setTimeout(()=>window.postMessage({type:"widget_loaded",account_id:o},"*"),0),n||(n=document.body||document),this.pluginMgr=new Vt(this,n);let a=t.A.setInterval(()=>{n&&n.isConnected||(this.pluginMgr.destroy(),t.A.clearInterval(a))},1e3);return this.domGate.open(),r&&r(s),s}async setAccount(e,n,i,r){if("undefined"!=typeof sbz_info&&(sbz_info.set_account=t.A.Date.now()),document&&document.location&&document.location.href&&document.location.href.indexOf("subiz-verification-1")>0)return window.subiz_verification_account_id=e,void("undefined"!=typeof sbz_info&&(sbz_info=void 0));if(!e)return{error:"empty_account_id"};"undefined"!=typeof sbz_info&&(sbz_info.set_account_1=t.A.Date.now());let o=await this.store.init(e,i);"undefined"!=typeof sbz_info&&(sbz_info.set_account_2=t.A.Date.now()),t.A.setTimeout(()=>window.postMessage({type:"widget_loaded",account_id:e},"*"),0),n||(n=document.body||document),this.pluginMgr=new Vt(this,n);let s=t.A.setInterval(()=>{n&&n.isConnected||(this.pluginMgr.destroy(),t.A.clearInterval(s))},1e3);return this.domGate.open(),"undefined"!=typeof sbz_info&&(sbz_info.set_account_done=t.A.Date.now()),r&&r(o),o}_setAccount(t,e){return this.setAccount(t,e)}async updateUserAttributes(e){await this.store.setUser({attributes:e});var n=this.store.matchUser();return t.A.cloneDeep(n.attributes)}async getUserAttributes(){await this.store.readyGate.entry();var e=this.store.matchUser();return t.A.cloneDeep(t.A.get(e,"attributes",[]))}async getWidgetCurrentView(){return await this.domGate.entry(),this.pluginMgr.getCurrentView()}async createTicket(t){return await this.domGate.entry(),this.createTicket(t)}expandWidget(t,e){return this.showWidget(t,e)}shrinkWidget(){return this.hideWidget()}async sendMessage(t,e){if(!t){const{convo:n,error:i}=await this.store.startConvo({message:e.text,initial_by:this.store.matchUser().id});if(i)return{error:i};t=n.id}return this.store.sendConvoEvent(t,"message_sent",{message:e})}async viewForm(e){if(!e||!t.A.startsWith(e,"cp"))return;let n=this.impressionTokens[e];if(n)return n;let{body:i}=await this.store.sendImpression(e);return n=t.A.get(i,"impression_token")||"",this.impressionTokens[e]=n,n}async submitForm(e,n){if(!e||!n)return;if(t.A.startsWith(e,"cp")){let i=t.A.cloneDeep(this.store.matchUser()),r={id:i.id,account_id:i.account_id},o=!1;n=t.A.map(n,e=>{let n=e.key;return"email"===n&&(n="emails"),"phone"===n&&(n="phones"),o=o||"emails"==n||"phones"==n,t.A.setUserAttr(r,{key:n,[e.type||"text"]:e.value}),{key:n,type:e.type||"text",value:t.A.stringify(e.value)}}),o&&t.A.setUserAttr(r,{key:"lead_source",text:"plugin."+e});let s=await this.viewForm(e);return this.store.setUserDiff(r),this.store.sendConversion(e,n,s)}n=t.A.filter(n,t=>t.key&&t.value);let i="Khách điền form\n";return t.A.map(n,t=>{i+="+ "+t.key+": "+t.value+"\n"}),this.store.startConvo({subject:"Khách điền form",touchpoint:{channel:"form",source:window.location.hostname,id:Date.now()+"_"+t.A.randomString()},form_submission:{id:e,values:n},message_sent:{data:{message:{format:"plaintext",text:i}}}})}startConvo(e){if((e=t.A.cloneDeep(e)||{}).welcome_message)return this.store.startLightConvo(e.bot_id,[e.welcome_message],e.locale,e.is_testing,e.bot_version);let n=e.members||[];if(e.bot_id){let i=e.bot_id;delete e.bot_id,t.A.find(n,t=>b.id==i)||n.push({type:"bot",id:i,bot_version:e.bot_version})}return e.members=n,e.initial_by=this.store.matchUser().id,this.store.startConvo(e)}async showGreeting(){await this.domGate.entry(),this.pluginMgr.showCurrentGreeting()}async hideGreeting(){await this.domGate.entry(),this.pluginMgr.hideCurrentGreeting()}async showWidget(t,e){return await this.domGate.entry(),this.pluginMgr.showCurrentChatbox({view:t,cid:e})}async showTyping(){return await this.domGate.entry(),this.pluginMgr.showCurrentChatboxTyping()}async hideWidget(){await this.domGate.entry(),this.pluginMgr.hideCurrentChatbox()}async setLocale(t){return await this.domGate.entry(),this.pluginMgr.setCurrentChatboxLocale(t)}async setLanguage(t){return await this.domGate.entry(),this.pluginMgr.setCurrentChatboxLocale(t)}async setPluginLocale(t,e){return await this.domGate.entry(),this.pluginMgr.setPluginLocale(t,e)}_overrideDeviceType(t){this.store.overrideDeviceType(t)}unload(){this.pluginMgr&&this.pluginMgr.destroy(),this.store.destroy()}async applyMessage(t){await this.domGate.entry(),this.pluginMgr.applyTextToCurrentChatbox(t)}_overridePlugin(t){this.store.overridePlugin(t)}_forceUpdateLang(t){this.pluginMgr.forceUpdateLang(t)}_highlight(t,e){this.store.highlight(t,e)}openPopup(t){this.pluginMgr.forceRunPopup(t)}unEvent(e){this.subs=t.A.filter(this.subs,t=>t!==e)}async countUnreadMessages(){return await this.domGate.entry(),this.store.matchUnread()}onEvent(e){this.subs=t.A.filter(this.subs,t=>t!==e),this.subs.push(e)}overrideWelcomeMessage(t){this.store.overrideWelcomeMessage(t)}overrideAccount(t){this.store.overrideAcc(t)}async overrideChatbox(e){await this.store.overrideChatbox(e),t.A.get(e,"chatbox.greeting.greeting")&&this.pluginMgr.showCurrentGreeting()}stopAutobot(){this.store.doNotStartBot()}}window.__sbz_WIDGET=Yt;const Qt=Yt;o(318);var Xt=o(5180),Kt=new Qt(Xt.ApiURL,Xt.FileURL,Xt.RealtimeURL);function te(t){t=t||[];var e=[];if(Array.isArray(t))e=t;else{if("object"!=typeof t)return;for(var n=Object.keys(t),i=0;i<n.length;i++)e.push(t[n[i]])}if(!((t=e).length<1)){var r=t.shift();if("function"==typeof Kt[r])return Kt[r](...t)}}!function(){let e=window.subiz&&window.subiz.q||[];window.subiz=function(){return te(arguments)},e.forEach(te),Kt.store.readyGate.entry().then(function(){Kt.store.track(),function(e){if(!e.matchAutoStartBot())return;let n=e.matchBot();0!==Object.keys(n).length&&t.A.each(n,n=>{let i=async()=>{if(i=()=>!0,!t.A.checkRunConditions(n.initiative_frequency,n.conditions,e.matchLastBotRun(n.id),e))return;let r=n.welcome_messages;if(t.A.size(r)){let{error:i}=await e.startLightConvo(n.id,n.welcome_messages,F.JK(n,t.A.detectLang()),!1);e.logBotRun(n.id)}},r=t.A.get(n,"triggers")||[];for(let e of r){if(!e)continue;if(e.disabled)continue;let n=i;"area_clicked"===e.type&&t.A.trackAreaClicked(e.area_clicked_css_selector,n),"scrolling_percentage"===e.type&&t.A.trackScrollingPercentage(e.scrolling_percentage,n),"inactivity_duration"===e.type&&t.A.trackInactivity(e.inactivity_sec,n),"after_pageview"===e.type&&t.A.trackTimeOnPage(e.after_pageview_sec,n)}})}(Kt.store)})}()})()})();
|