- License
- MIT, property is required for initialization");typeof n<"u"&&(window.__lc.group=Number(n)),typeof r<"u"&&(window.__lc.chat_between_groups=!!r),i instanceof Object&&(window.__lc.params=Object.entries(i).map(function(s){var a=mZ(s,2),o=a[0],l=a[1];return{name:o,value:l}})),typeof A=="function"&&(window.__lc.custom_identity_provider=A)}function n2(e,t){e==="off"&&typeof window.LiveChatWidget>"u"||(typeof t.onReady=="function"&&window.LiveChatWidget[e]("ready",t.onReady),typeof t.onAvailabilityChanged=="function"&&window.LiveChatWidget[e]("availability_changed",t.onAvailabilityChanged),typeof t.onVisibilityChanged=="function"&&window.LiveChatWidget[e]("visibility_changed",t.onVisibilityChanged),typeof t.onCustomerStatusChanged=="function"&&window.LiveChatWidget[e]("customer_status_changed",t.onCustomerStatusChanged),typeof t.onNewEvent=="function"&&window.LiveChatWidget[e]("new_event",t.onNewEvent),typeof t.onFormSubmitted=="function"&&window.LiveChatWidget[e]("form_submitted",t.onFormSubmitted),typeof t.onRatingSubmitted=="function"&&window.LiveChatWidget[e]("rating_submitted",t.onRatingSubmitted),typeof t.onGreetingDisplayed=="function"&&window.LiveChatWidget[e]("greeting_displayed",t.onGreetingDisplayed),typeof t.onGreetingHidden=="function"&&window.LiveChatWidget[e]("greeting_hidden",t.onGreetingHidden),typeof t.onRichMessageButtonClicked=="function"&&window.LiveChatWidget[e]("rich_message_button_clicked",t.onRichMessageButtonClicked))}function m7(e){typeof e.name=="string"&&window.LiveChatWidget.call("set_customer_name",e.name),typeof e.email=="string"&&window.LiveChatWidget.call("set_customer_email",e.email)}function B7(e){e==="hidden"&&window.LiveChatWidget.call("hide"),e==="maximized"&&window.LiveChatWidget.call("maximize"),e==="minimized"&&window.LiveChatWidget.call("minimize")}var xZ=pZ(),y7=xZ.emit.bind(null);function _Z(e){var t={isLoading:!1,desiredState:"unknown",currentEventHandlers:{onReady:e.onReady,onNewEvent:e.onNewEvent,onFormSubmitted:e.onFormSubmitted,onGreetingHidden:e.onGreetingHidden,onRatingSubmitted:e.onRatingSubmitted,onGreetingDisplayed:e.onGreetingDisplayed,onVisibilityChanged:e.onVisibilityChanged,onAvailabilityChanged:e.onAvailabilityChanged,onCustomerStatusChanged:e.onCustomerStatusChanged,onRichMessageButtonClicked:e.onRichMessageButtonClicked}},n=EZ();return bZ(e),B7(e.visibility),n2("on",t.currentEventHandlers),m7({name:e.customerName,email:e.customerEmail}),window.__lc.integration_name="@livechat/widget-core",{init:function(){var i=this;t.desiredState="loaded",!t.isLoading&&(window.LC_API=window.LC_API||{},window.LC_API.on_after_load=function(){t.isLoading=!1,t.desiredState==="destroyed"&&i.destroy(),t.desiredState="unknown"},y7("init"),t.isLoading=!0,window.LiveChatWidget.init())},destroy:function(){var i;t.desiredState="destroyed",!t.isLoading&&(y7("destroy"),(i=n.current)===null||i===void 0||i.remove(),window.LiveChatWidget.call("destroy"))},updateVisibility:function(i){B7(i)},updateEventHandlers:function(i){n2("off",t.currentEventHandlers),n2("on",i),t.currentEventHandlers=gZ({},i)},updateSessionVariables:function(i){i&&window.LiveChatWidget.call("update_session_variables",i)},hideGreeting:function(){window.LiveChatWidget.call("hide_greeting")},updateCustomerData:function(i){m7(i)}}}var nhe=et({props:{license:{type:String,required:!0},group:{type:String,required:!1,default:void 0},visibility:{type:String,required:!1,default:void 0},customerName:{type:String,required:!1,default:void 0},customerEmail:{type:String,required:!1,default:void 0},sessionVariables:{type:Object,required:!1,default:void 0},chatBetweenGroups:{type:Boolean,required:!1,default:void 0},customIdentityProvider:{type:Function,required:!1,default:void 0}},emits:["ready","new-event","form-submitted","rating-submitted","greeting-hidden","greeting-displayed","visibility-changed","customer-status-changed","rich-message-button-clicked","availability-changed"],data:function(){return{widget:null}},watch:{license:"reinitialize",group:"reinitialize",chatBetweenGroups:"reinitialize",visibility:function(t){var n;(n=this.widget)===null||n===void 0||n.updateVisibility(t)},customerName:function(t){var n;(n=this.widget)===null||n===void 0||n.updateCustomerData({name:t})},customerEmail:function(t){var n;(n=this.widget)===null||n===void 0||n.updateCustomerData({email:t})},sessionVariables:function(t){var n;(n=this.widget)===null||n===void 0||n.updateSessionVariables(t)}},mounted:function(){this.setupWidget()},unmounted:function(){var t;(t=this.widget)===null||t===void 0||t.destroy()},methods:{setupWidget:function(){var t=this;this.widget=_Z({group:this.group,license:this.license,customerName:this.customerName,customerEmail:this.customerEmail,sessionVariables:this.sessionVariables,chatBetweenGroups:this.chatBetweenGroups,visibility:this.visibility,customIdentityProvider:this.customIdentityProvider,onReady:function(r){return t.$emit("ready",r)},onNewEvent:function(r){return t.$emit("new-event",r)},onFormSubmitted:function(r){return t.$emit("form-submitted",r)},onRatingSubmitted:function(r){return t.$emit("rating-submitted",r)},onGreetingHidden:function(r){return t.$emit("greeting-hidden",r)},onGreetingDisplayed:function(r){return t.$emit("greeting-displayed",r)},onVisibilityChanged:function(r){return t.$emit("visibility-changed",r)},onCustomerStatusChanged:function(r){return t.$emit("customer-status-changed",r)},onRichMessageButtonClicked:function(r){return t.$emit("rich-message-button-clicked",r)},onAvailabilityChanged:function(r){return t.$emit("availability-changed",r)}}),window.__lc.integration_name="@livechat/widget-vue",this.widget.init()},reinitialize:function(){var t;(t=this.widget)===null||t===void 0||t.destroy(),this.setupWidget()}},render:function(){return null}});var Ap={exports:{}};(function(e,t){typeof navigator<"u"&&function(n,r){e.exports=r()}(ht,function(){var n="http://www.w3.org/2000/svg",r="",i=!1,A=-999999,s=function(h){i=!!h},a=function(){return i},o=function(h){r=h},l=function(){return r};function u(c){return document.createElement(c)}function f(c,h){var v,b=c.length,S;for(v=0;v<b;v+=1){S=c[v].prototype;for(var F in S)Object.prototype.hasOwnProperty.call(S,F)&&(h.prototype[F]=S[F])}}function d(c){function h(){}return h.prototype=c,h}var p=function(){function c(h){this.audios=[],this.audioFactory=h,this._volume=1,this._isMuted=!1}return c.prototype={addAudio:function(v){this.audios.push(v)},pause:function(){var v,b=this.audios.length;for(v=0;v<b;v+=1)this.audios[v].pause()},resume:function(){var v,b=this.audios.length;for(v=0;v<b;v+=1)this.audios[v].resume()},setRate:function(v){var b,S=this.audios.length;for(b=0;b<S;b+=1)this.audios[b].setRate(v)},createAudio:function(v){return this.audioFactory?this.audioFactory(v):window.Howl?new window.Howl({src:[v]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(v){this.audioFactory=v},setVolume:function(v){this._volume=v,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var v,b=this.audios.length;for(v=0;v<b;v+=1)this.audios[v].volume(this._volume, MIT, header required
- Authors
- DISCLAIMS ALL WARRANTIES WITH, BE LIABLE FOR ANY SPECIAL, DIRECT,
- Version (from header)
- 2.1.7
- Copyright Notice
- Eduardo San Martin Morote