@meetelise/chat 1.20.13 → 1.20.15
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/package.json
CHANGED
package/public/dist/index.js
CHANGED
|
@@ -443,7 +443,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
443
443
|
.option.active {
|
|
444
444
|
background-color: var(--active-option-color);
|
|
445
445
|
}
|
|
446
|
-
`,$t([oe({attribute:!1})],zt.prototype,"options",void 0),$t([oe({type:String})],zt.prototype,"placeholder",void 0),$t([oe({type:String})],zt.prototype,"value",void 0),$t([ae()],zt.prototype,"activeOption",void 0),$t([ae()],zt.prototype,"isOpen",void 0),$t([se("#select",!0)],zt.prototype,"meSelect",void 0),zt=$t([ie("me-select")],zt);var Xt=n(9669),Zt=n.n(Xt),Qt=n(9991),Kt=n(7739),Yt=n.n(Kt);function en(e){return Ee(1,arguments),Fe(e).getTime()<Date.now()}Math.pow(10,8);var tn=36e5;function nn(e,t){Ee(1,arguments);var n=t||{},i=null==n.additionalDigits?2:Ve(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=un(e);if(o.date){var a=ln(o.date,i);r=dn(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,u=r.getTime(),l=0;if(o.time&&(l=pn(o.time),isNaN(l)))return new Date(NaN);if(!o.timezone){var d=new Date(u+l),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return s=hn(o.timezone),isNaN(s)?new Date(NaN):new Date(u+l+s)}var rn={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},on=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,an=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function un(e){var t,n={},i=e.split(rn.dateTimeDelimiter);if(i.length>2)return n;if(/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],rn.timeZoneDelimiter.test(n.date)&&(n.date=e.split(rn.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var r=rn.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}function ln(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,o=i[2]?parseInt(i[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((i[1]||i[2]).length)}}function dn(e,t){if(null===t)return new Date(NaN);var n=e.match(on);if(!n)return new Date(NaN);var i=!!n[4],r=cn(n[1]),o=cn(n[2])-1,a=cn(n[3]),s=cn(n[4]),u=cn(n[5])-1;if(i)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,u)?function(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*(t-1)+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}(t,s,u):new Date(NaN);var l=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(mn[t]||(vn(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(vn(e)?366:365)}(t,r)?(l.setUTCFullYear(t,o,Math.max(r,a)),l):new Date(NaN)}function cn(e){return e?parseInt(e):1}function pn(e){var t=e.match(an);if(!t)return NaN;var n=fn(t[1]),i=fn(t[2]),r=fn(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,i,r)?n*tn+6e4*i+1e3*r:NaN}function fn(e){return e&&parseFloat(e.replace(",","."))||0}function hn(e){if("Z"===e)return 0;var t=e.match(sn);if(!t)return 0;var n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?n*(i*tn+6e4*r):NaN}var mn=[31,null,31,30,31,30,31,31,30,31,30,31];function vn(e){return e%400==0||e%4==0&&e%100!=0}const gn={buildingId:null,availabilities:{}},yn=async e=>{e&&(gn.buildingId=e);const t=gn.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=gn.availabilities;if(n[t])return n[t];const i=function(e){Ee(1,arguments);var t=Fe(e);return t.setHours(0,0,0,0),t}(Date.now()),r=Vt(function(e){Ee(1,arguments);var t=Fe(e);return t.setHours(23,59,59,999),t}(function(e,t){Ee(2,arguments);var n=Fe(e),i=Ve(t);return isNaN(i)?new Date(NaN):i?(n.setDate(n.getDate()+i),n):n}(i,30))),o=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?startTime=${Vt(i)}&endTime=${r}`,a=await Zt().get(o);return gn.availabilities[t]=a.data,a.data},bn=async(e,t)=>{var n,i;const r=await yn(t),o=(null===(n=r.availability)||void 0===n?void 0:n[e])?null===(i=r.availability)||void 0===i?void 0:i[e].availableTourStartTimes:[];return r.availability?{...r.availability[e],availableTourStartTimes:o}:null},wn=async(e,t)=>{var n,i;const r=await bn(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter((e=>De(nn(e))&&!en(nn(e)))):[])||void 0===n?void 0:n.map((e=>Sn(e)))};return Yt()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],(e=>Pt(new Date(e.datetime),"yyyy-MM-dd")))},Sn=e=>({datetime:e.slice(0,19),offset:e.slice(19)});n(7294);const Tn=()=>window.matchMedia("(max-width: 767px)").matches;var xn=n(6486),On=n(4184),In=n.n(On),Rn=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Nn=class extends te{constructor(){super(...arguments),this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.tourType=An.Guided,this.shouldShowTourType={[An.Guided]:!0,[An.Self]:!0,[An.Virtual]:!0},this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.firstUpdated=async()=>{this.availabilitiesGroupedByDay=await wn(Cn[this.tourType]),this.waitingForAvailabilities=!1;const e=await(async()=>{var e,t,n,i,r,o;return{[An.Guided]:!!(null===(t=null===(e=await bn(Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[An.Self]:!!(null===(i=null===(n=await bn(Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[An.Virtual]:!!(null===(o=null===(r=await bn(Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}})();this.shouldShowTourType={[An.Guided]:this.tourTypeOptions.map((e=>e.value)).includes("WITH_AGENT")&&e[An.Guided],[An.Self]:this.tourTypeOptions.map((e=>e.value)).includes("SELF_GUIDED")&&e[An.Self],[An.Virtual]:this.tourTypeOptions.map((e=>e.value)).includes("VIRTUAL_SHOWING")&&e[An.Virtual]}},this.willUpdate=async e=>{e.has("tourType")&&(this.availabilitiesGroupedByDay=await wn(Cn[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const n=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,i=this.phoneNumber.slice(0,n).replace(/\D/g,""),r=this.phoneNumber.slice(n).replace(/\D/g,""),o=`${i.slice(0,-1)}${r}`;this.phoneNumber=Ie(o),this.phoneInput.value=this.phoneNumber;const a=n-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,n).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,i=n-e>-1?n-e:0;this.phoneInput.setSelectionRange(i,i)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(n).split(/\d+/)[0].length||0)+1,t=n+e<this.phoneNumber.length?n+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,n)+e.key+this.phoneNumber.slice(n);this.phoneNumber=Ie(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(!e.key)return;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const n=this.phoneInput.selectionStart,i=n?this.phoneInput.value.slice(n).replace(/\D/g,""):"";this.phoneNumber=Ie(this.phoneInput.value);let r=0,o=i.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>!isNaN(this.tourType),dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&(null===(n=this.emailInput)||void 0===n?void 0:n.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,n]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(n)]},this.submit=async()=>{var e;if(!this.selectedDate||!this.selectedTime)return;const t={email_address:this.email,phone_number:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,building_id:this.buildingId,first_name:this.firstNameInput.value,last_name:this.lastNameInput.value,tour_type:_n[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,layouts:this.layoutTypeSelect.value?[this.layoutTypeSelect.value]:null,unit_numbers:this.unitTypeSelect.value?[this.unitTypeSelect.value]:null};this.isSubmitting=!0;try{await Zt().post("https://app.meetelise.com/platformApi/state/create/scheduleMe",t,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG","org-slug":this.orgSlug}}),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e.response.data.detail||"Failed to book tour";alert(t),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.dateAndTimeMenu(!0)}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>D`<action-confirm-button
|
|
446
|
+
`,$t([oe({attribute:!1})],zt.prototype,"options",void 0),$t([oe({type:String})],zt.prototype,"placeholder",void 0),$t([oe({type:String})],zt.prototype,"value",void 0),$t([ae()],zt.prototype,"activeOption",void 0),$t([ae()],zt.prototype,"isOpen",void 0),$t([se("#select",!0)],zt.prototype,"meSelect",void 0),zt=$t([ie("me-select")],zt);var Xt=n(9669),Zt=n.n(Xt),Qt=n(9991),Kt=n(7739),Yt=n.n(Kt);function en(e){return Ee(1,arguments),Fe(e).getTime()<Date.now()}Math.pow(10,8);var tn=36e5;function nn(e,t){Ee(1,arguments);var n=t||{},i=null==n.additionalDigits?2:Ve(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=un(e);if(o.date){var a=ln(o.date,i);r=dn(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,u=r.getTime(),l=0;if(o.time&&(l=pn(o.time),isNaN(l)))return new Date(NaN);if(!o.timezone){var d=new Date(u+l),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return s=hn(o.timezone),isNaN(s)?new Date(NaN):new Date(u+l+s)}var rn={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},on=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,an=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function un(e){var t,n={},i=e.split(rn.dateTimeDelimiter);if(i.length>2)return n;if(/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],rn.timeZoneDelimiter.test(n.date)&&(n.date=e.split(rn.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var r=rn.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}function ln(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,o=i[2]?parseInt(i[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((i[1]||i[2]).length)}}function dn(e,t){if(null===t)return new Date(NaN);var n=e.match(on);if(!n)return new Date(NaN);var i=!!n[4],r=cn(n[1]),o=cn(n[2])-1,a=cn(n[3]),s=cn(n[4]),u=cn(n[5])-1;if(i)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,u)?function(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*(t-1)+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}(t,s,u):new Date(NaN);var l=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(mn[t]||(vn(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(vn(e)?366:365)}(t,r)?(l.setUTCFullYear(t,o,Math.max(r,a)),l):new Date(NaN)}function cn(e){return e?parseInt(e):1}function pn(e){var t=e.match(an);if(!t)return NaN;var n=fn(t[1]),i=fn(t[2]),r=fn(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,i,r)?n*tn+6e4*i+1e3*r:NaN}function fn(e){return e&&parseFloat(e.replace(",","."))||0}function hn(e){if("Z"===e)return 0;var t=e.match(sn);if(!t)return 0;var n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?n*(i*tn+6e4*r):NaN}var mn=[31,null,31,30,31,30,31,31,30,31,30,31];function vn(e){return e%400==0||e%4==0&&e%100!=0}const gn={buildingId:null,availabilities:{}},yn=async e=>{e&&(gn.buildingId=e);const t=gn.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=gn.availabilities;if(n[t])return n[t];const i=function(e){Ee(1,arguments);var t=Fe(e);return t.setHours(0,0,0,0),t}(Date.now()),r=Vt(function(e){Ee(1,arguments);var t=Fe(e);return t.setHours(23,59,59,999),t}(function(e,t){Ee(2,arguments);var n=Fe(e),i=Ve(t);return isNaN(i)?new Date(NaN):i?(n.setDate(n.getDate()+i),n):n}(i,30))),o=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?startTime=${Vt(i)}&endTime=${r}`,a=await Zt().get(o);return gn.availabilities[t]=a.data,a.data},bn=async(e,t)=>{var n,i;const r=await yn(t),o=(null===(n=r.availability)||void 0===n?void 0:n[e])?null===(i=r.availability)||void 0===i?void 0:i[e].availableTourStartTimes:[];return r.availability?{...r.availability[e],availableTourStartTimes:o}:null},wn=async(e,t)=>{var n,i;const r=await bn(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter((e=>De(nn(e))&&!en(nn(e)))):[])||void 0===n?void 0:n.map((e=>Sn(e)))};return Yt()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],(e=>Pt(new Date(e.datetime),"yyyy-MM-dd")))},Sn=e=>({datetime:e.slice(0,19),offset:e.slice(19)});n(7294);const Tn=()=>window.matchMedia("(max-width: 767px)").matches;var xn=n(6486),On=n(4184),In=n.n(On),Rn=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Nn=class extends te{constructor(){super(...arguments),this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.buildingId=0,this.buildingSlug="",this.sgtUrl="",this.orgSlug="",this.tourType=An.Self,this.shouldShowTourType={[An.Guided]:!0,[An.Self]:!0,[An.Virtual]:!0},this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.firstUpdated=async()=>{this.availabilitiesGroupedByDay=await wn(Cn[this.tourType]),this.waitingForAvailabilities=!1;const e=await(async()=>{var e,t,n,i,r,o;return{[An.Guided]:!!(null===(t=null===(e=await bn(Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[An.Self]:!!(null===(i=null===(n=await bn(Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[An.Virtual]:!!(null===(o=null===(r=await bn(Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}})();this.shouldShowTourType={[An.Guided]:this.tourTypeOptions.map((e=>e.value)).includes("WITH_AGENT")&&e[An.Guided],[An.Self]:this.tourTypeOptions.map((e=>e.value)).includes("SELF_GUIDED")&&e[An.Self],[An.Virtual]:this.tourTypeOptions.map((e=>e.value)).includes("VIRTUAL_SHOWING")&&e[An.Virtual]}},this.willUpdate=async e=>{e.has("tourType")&&(this.availabilitiesGroupedByDay=await wn(Cn[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const n=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,i=this.phoneNumber.slice(0,n).replace(/\D/g,""),r=this.phoneNumber.slice(n).replace(/\D/g,""),o=`${i.slice(0,-1)}${r}`;this.phoneNumber=Ie(o),this.phoneInput.value=this.phoneNumber;const a=n-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,n).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,i=n-e>-1?n-e:0;this.phoneInput.setSelectionRange(i,i)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(n).split(/\d+/)[0].length||0)+1,t=n+e<this.phoneNumber.length?n+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,n)+e.key+this.phoneNumber.slice(n);this.phoneNumber=Ie(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(!e.key)return;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const n=this.phoneInput.selectionStart,i=n?this.phoneInput.value.slice(n).replace(/\D/g,""):"";this.phoneNumber=Ie(this.phoneInput.value);let r=0,o=i.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>!isNaN(this.tourType),dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&(null===(n=this.emailInput)||void 0===n?void 0:n.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,n]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(n)]},this.submit=async()=>{var e;if(!this.selectedDate||!this.selectedTime)return;const t={email_address:this.email,phone_number:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,building_id:this.buildingId,first_name:this.firstNameInput.value,last_name:this.lastNameInput.value,tour_type:_n[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,layouts:this.layoutTypeSelect.value?[this.layoutTypeSelect.value]:null,unit_numbers:this.unitTypeSelect.value?[this.unitTypeSelect.value]:null};this.isSubmitting=!0;try{await Zt().post("https://app.meetelise.com/platformApi/state/create/scheduleMe",t,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG","org-slug":this.orgSlug}}),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e.response.data.detail||"Failed to book tour";alert(t),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.dateAndTimeMenu(!0)}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>D`<action-confirm-button
|
|
447
447
|
id="schedule"
|
|
448
448
|
.onClick=${this.submit}
|
|
449
449
|
.isLoading=${this.isSubmitting}
|
|
@@ -456,7 +456,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
456
456
|
${this.shouldShowTourType[An.Guided]?D` <tour-type-option
|
|
457
457
|
heading="Guided tour"
|
|
458
458
|
subtitle="with an agent"
|
|
459
|
-
@click="${()=>{this.tourType=An.Guided}}"
|
|
459
|
+
@click="${()=>{this.sgtUrl?window.open(this.sgtUrl,"_blank"):this.tourType=An.Guided}}"
|
|
460
460
|
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=An.Guided)}}"
|
|
461
461
|
?selected="${this.tourType===An.Guided}"
|
|
462
462
|
>
|
|
@@ -1106,7 +1106,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1106
1106
|
margin-top: 37px;
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
|
-
`,Rn([oe({attribute:!1})],Nn.prototype,"layoutOptions",void 0),Rn([oe({attribute:!1})],Nn.prototype,"unitOptions",void 0),Rn([oe({attribute:!1})],Nn.prototype,"tourTypeOptions",void 0),Rn([oe({type:Number})],Nn.prototype,"buildingId",void 0),Rn([oe({attribute:!0})],Nn.prototype,"buildingSlug",void 0),Rn([oe({attribute:!0})],Nn.prototype,"orgSlug",void 0),Rn([ae()],Nn.prototype,"tourType",void 0),Rn([ae()],Nn.prototype,"shouldShowTourType",void 0),Rn([ae()],Nn.prototype,"email",void 0),Rn([ae()],Nn.prototype,"phoneNumber",void 0),Rn([ae()],Nn.prototype,"availabilitiesGroupedByDay",void 0),Rn([ae()],Nn.prototype,"waitingForAvailabilities",void 0),Rn([ae()],Nn.prototype,"selectedDate",void 0),Rn([ae()],Nn.prototype,"selectedTime",void 0),Rn([ae()],Nn.prototype,"mobilePageIndex",void 0),Rn([ae()],Nn.prototype,"isSubmitting",void 0),Rn([ae()],Nn.prototype,"tourIsBooked",void 0),Rn([se(".nameContainer#firstName input")],Nn.prototype,"firstNameInput",void 0),Rn([se(".nameContainer#lastName input")],Nn.prototype,"lastNameInput",void 0),Rn([se(".inputContainer#email input")],Nn.prototype,"emailInput",void 0),Rn([se(".inputContainer#phone input")],Nn.prototype,"phoneInput",void 0),Rn([se("me-select#unitType")],Nn.prototype,"unitTypeSelect",void 0),Rn([se("me-select#layoutType")],Nn.prototype,"layoutTypeSelect",void 0),Nn=Rn([ie("tour-scheduler")],Nn),function(e){e[e.Guided=0]="Guided",e[e.Self=1]="Self",e[e.Virtual=2]="Virtual"}(An||(An={}));const Cn={[An.Guided]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent,[An.Self]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided,[An.Virtual]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing},_n={[An.Guided]:"escorted-tour",[An.Self]:"self-guided-tour",[An.Virtual]:"live-virtual-tour"},En=e=>e.map((e=>(e=>({studio:0,"1br":1,"2br":2,"3br":3,"4br":4,"5br":5,"6br":6,"7br":7,"8br":8,"9br":9,"10br":10}[e]))(e))).filter(xn.isNumber).sort().map((e=>(e=>({0:"studio",1:"1br",2:"2br",3:"3br",4:"4br",5:"5br",6:"6br",7:"7br",8:"8br",9:"9br",10:"10br"}[e]))(e))).filter(xn.isString);class Fn{constructor(e,t,n){this.org=e,this.building=t,this.chatId=n,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}campaignSources(){var e,t,n;const i=new URL(window.location.href).searchParams,r=null!==(n=null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&void 0!==n?n:null;return{entrataCampaignSource:i.get("switch_cls[id]"),realpageCampaignSource:i.get("ilm"),utmCampaignSource:i.get("utm_source"),yardiCampaignSource:r}}ping(e){fetch("https://app.meetelise.com/platformApi/connectors/talk_js/analytics",{method:"POST",credentials:"omit",keepalive:!0,headers:{"content-type":"application/json; charset=UTF-8"},body:JSON.stringify({eventType:e,chatId:this.chatId,url:location.href,org:this.org,building:this.building,referrer:document.referrer,featureFlags:this.featureFlags,campaignSources:this.campaignSources()})})}}var Mn,Pn=new Uint8Array(16);function Dn(){if(!Mn&&!(Mn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mn(Pn)}const qn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Un=function(e){return"string"==typeof e&&qn.test(e)};for(var Jn=[],kn=0;kn<256;++kn)Jn.push((kn+256).toString(16).substr(1));const Ln=function(e,t,n){var i=(e=e||{}).random||(e.rng||Dn)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Jn[e[t+0]]+Jn[e[t+1]]+Jn[e[t+2]]+Jn[e[t+3]]+"-"+Jn[e[t+4]]+Jn[e[t+5]]+"-"+Jn[e[t+6]]+Jn[e[t+7]]+"-"+Jn[e[t+8]]+Jn[e[t+9]]+"-"+Jn[e[t+10]]+Jn[e[t+11]]+Jn[e[t+12]]+Jn[e[t+13]]+Jn[e[t+14]]+Jn[e[t+15]]).toLowerCase();if(!Un(n))throw TypeError("Stringified UUID is invalid");return n}(i)};function Bn(e,t){const n=Hn(e,t),i=Ln();return localStorage.setItem(n,i),jn(e,t),i}function jn(e,t){const n=Wn(e,t),i=(new Date).toISOString();return localStorage.setItem(n,i),i}function Hn(e,t){return`com.meetelise.chatID-${e}-${t}`}function Wn(e,t){return`com.meetelise.chatIDIssueTime-${e}-${t}`}const Gn="#FFFFFF",$n="#202020",zn={user:{textColor:Gn,backgroundColor:"#1990FF"},agent:{textColor:Gn,backgroundColor:"#1E1E1E"}},Vn={user:{textColor:Gn,backgroundColor:"#83818E"},agent:{textColor:Gn,backgroundColor:$n}},Xn={Light:{chatHeader:{backgroundColor:Gn,textColor:$n},chatPaneBackgroundColor:"rgba(255, 255, 255, 0.9)",message:zn},Dark:{chatHeader:{backgroundColor:$n,textColor:Gn},chatPaneBackgroundColor:"rgba(32, 32, 32, 0.9)",message:zn},Purple:{chatHeader:{backgroundColor:"#550098",textColor:Gn},chatPaneBackgroundColor:"rgba(85, 0, 152, 0.6)",message:zn},Blue:{chatHeader:{backgroundColor:"#0814E5",textColor:Gn},chatPaneBackgroundColor:"rgba(4, 17, 245, 0.6)",message:zn},Teal:{chatHeader:{backgroundColor:"#6EE7ED",textColor:$n},chatPaneBackgroundColor:"rgba(115, 247, 253, 0.8)",message:Vn},Green:{chatHeader:{backgroundColor:"#147B0E",textColor:Gn},chatPaneBackgroundColor:"rgba(13, 141, 5, 0.6)",message:zn},Yellow:{chatHeader:{backgroundColor:"#F1E54F",textColor:$n},chatPaneBackgroundColor:"rgba(251, 239, 80, 0.9)",message:Vn},Orange:{chatHeader:{backgroundColor:"#C06C31",textColor:Gn},chatPaneBackgroundColor:"rgba(238, 126, 49, 0.7)",message:zn},Pink:{chatHeader:{backgroundColor:"#A24599",textColor:Gn},chatPaneBackgroundColor:"rgba(167, 70, 157, 0.8)",message:zn}},Zn=e=>Xn[e&&Object.keys(Xn).includes(e)?e:"Light"];function Qn(e,t,n,i,r,o){var a;const s=new Oe.User({id:`building_${t.id}`,name:t.userFirstName,email:null,role:"Default",welcomeMessage:t.welcomeMessage,availabilityText:t.systemWelcomeMessage}),u=e.getOrCreateConversation(r);return u.setParticipant(e.me),u.setParticipant(s),u.subject=16===t.orgId?"Leasing team":null!==(a=t.chatTitle)&&void 0!==a?a:t.userFirstName,u.custom={buildingId:t.id.toString(),userId:t.userId.toString(),orgId:t.orgId.toString(),subtitle:t.chatSubtitle,url:location.href,buildingName:t.name,isMobile:o.toString(),chatHeaderBackgroundColor:n.chatHeader.backgroundColor,chatHeaderTextColor:n.chatHeader.textColor,chatPaneBackgroundColor:n.chatPaneBackgroundColor,userMessageTextColor:n.message.user.textColor,userMessageBackgroundColor:n.message.user.backgroundColor,agentMessageTextColor:n.message.agent.textColor,agentMessageBackgroundColor:n.message.agent.backgroundColor,isLightTheme:(n.message===Vn).toString(),avatarUrl:"image"===t.avatarType&&t.avatarSrc?i:"https://eliseusercontent.meetelise.com/webchat/looping-gradient.gif"},u}const Kn=a`
|
|
1109
|
+
`,Rn([oe({attribute:!1})],Nn.prototype,"layoutOptions",void 0),Rn([oe({attribute:!1})],Nn.prototype,"unitOptions",void 0),Rn([oe({attribute:!1})],Nn.prototype,"tourTypeOptions",void 0),Rn([oe({type:Number})],Nn.prototype,"buildingId",void 0),Rn([oe({attribute:!0})],Nn.prototype,"buildingSlug",void 0),Rn([oe({attribute:!0})],Nn.prototype,"sgtUrl",void 0),Rn([oe({attribute:!0})],Nn.prototype,"orgSlug",void 0),Rn([ae()],Nn.prototype,"tourType",void 0),Rn([ae()],Nn.prototype,"shouldShowTourType",void 0),Rn([ae()],Nn.prototype,"email",void 0),Rn([ae()],Nn.prototype,"phoneNumber",void 0),Rn([ae()],Nn.prototype,"availabilitiesGroupedByDay",void 0),Rn([ae()],Nn.prototype,"waitingForAvailabilities",void 0),Rn([ae()],Nn.prototype,"selectedDate",void 0),Rn([ae()],Nn.prototype,"selectedTime",void 0),Rn([ae()],Nn.prototype,"mobilePageIndex",void 0),Rn([ae()],Nn.prototype,"isSubmitting",void 0),Rn([ae()],Nn.prototype,"tourIsBooked",void 0),Rn([se(".nameContainer#firstName input")],Nn.prototype,"firstNameInput",void 0),Rn([se(".nameContainer#lastName input")],Nn.prototype,"lastNameInput",void 0),Rn([se(".inputContainer#email input")],Nn.prototype,"emailInput",void 0),Rn([se(".inputContainer#phone input")],Nn.prototype,"phoneInput",void 0),Rn([se("me-select#unitType")],Nn.prototype,"unitTypeSelect",void 0),Rn([se("me-select#layoutType")],Nn.prototype,"layoutTypeSelect",void 0),Nn=Rn([ie("tour-scheduler")],Nn),function(e){e[e.Guided=0]="Guided",e[e.Self=1]="Self",e[e.Virtual=2]="Virtual"}(An||(An={}));const Cn={[An.Guided]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent,[An.Self]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided,[An.Virtual]:Qt.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing},_n={[An.Guided]:"escorted-tour",[An.Self]:"self-guided-tour",[An.Virtual]:"live-virtual-tour"},En=e=>e.map((e=>(e=>({studio:0,"1br":1,"2br":2,"3br":3,"4br":4,"5br":5,"6br":6,"7br":7,"8br":8,"9br":9,"10br":10}[e]))(e))).filter(xn.isNumber).sort().map((e=>(e=>({0:"studio",1:"1br",2:"2br",3:"3br",4:"4br",5:"5br",6:"6br",7:"7br",8:"8br",9:"9br",10:"10br"}[e]))(e))).filter(xn.isString);class Fn{constructor(e,t,n){this.org=e,this.building=t,this.chatId=n,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}campaignSources(){var e,t,n;const i=new URL(window.location.href).searchParams,r=null!==(n=null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&void 0!==n?n:null;return{entrataCampaignSource:i.get("switch_cls[id]"),realpageCampaignSource:i.get("ilm"),utmCampaignSource:i.get("utm_source"),yardiCampaignSource:r}}ping(e){fetch("https://app.meetelise.com/platformApi/connectors/talk_js/analytics",{method:"POST",credentials:"omit",keepalive:!0,headers:{"content-type":"application/json; charset=UTF-8"},body:JSON.stringify({eventType:e,chatId:this.chatId,url:location.href,org:this.org,building:this.building,referrer:document.referrer,featureFlags:this.featureFlags,campaignSources:this.campaignSources()})})}}var Mn,Pn=new Uint8Array(16);function Dn(){if(!Mn&&!(Mn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mn(Pn)}const qn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Un=function(e){return"string"==typeof e&&qn.test(e)};for(var Jn=[],kn=0;kn<256;++kn)Jn.push((kn+256).toString(16).substr(1));const Ln=function(e,t,n){var i=(e=e||{}).random||(e.rng||Dn)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Jn[e[t+0]]+Jn[e[t+1]]+Jn[e[t+2]]+Jn[e[t+3]]+"-"+Jn[e[t+4]]+Jn[e[t+5]]+"-"+Jn[e[t+6]]+Jn[e[t+7]]+"-"+Jn[e[t+8]]+Jn[e[t+9]]+"-"+Jn[e[t+10]]+Jn[e[t+11]]+Jn[e[t+12]]+Jn[e[t+13]]+Jn[e[t+14]]+Jn[e[t+15]]).toLowerCase();if(!Un(n))throw TypeError("Stringified UUID is invalid");return n}(i)};function Bn(e,t){const n=Hn(e,t),i=Ln();return localStorage.setItem(n,i),jn(e,t),i}function jn(e,t){const n=Wn(e,t),i=(new Date).toISOString();return localStorage.setItem(n,i),i}function Hn(e,t){return`com.meetelise.chatID-${e}-${t}`}function Wn(e,t){return`com.meetelise.chatIDIssueTime-${e}-${t}`}const Gn="#FFFFFF",$n="#202020",zn={user:{textColor:Gn,backgroundColor:"#1990FF"},agent:{textColor:Gn,backgroundColor:"#1E1E1E"}},Vn={user:{textColor:Gn,backgroundColor:"#83818E"},agent:{textColor:Gn,backgroundColor:$n}},Xn={Light:{chatHeader:{backgroundColor:Gn,textColor:$n},chatPaneBackgroundColor:"rgba(255, 255, 255, 0.9)",message:zn},Dark:{chatHeader:{backgroundColor:$n,textColor:Gn},chatPaneBackgroundColor:"rgba(32, 32, 32, 0.9)",message:zn},Purple:{chatHeader:{backgroundColor:"#550098",textColor:Gn},chatPaneBackgroundColor:"rgba(85, 0, 152, 0.6)",message:zn},Blue:{chatHeader:{backgroundColor:"#0814E5",textColor:Gn},chatPaneBackgroundColor:"rgba(4, 17, 245, 0.6)",message:zn},Teal:{chatHeader:{backgroundColor:"#6EE7ED",textColor:$n},chatPaneBackgroundColor:"rgba(115, 247, 253, 0.8)",message:Vn},Green:{chatHeader:{backgroundColor:"#147B0E",textColor:Gn},chatPaneBackgroundColor:"rgba(13, 141, 5, 0.6)",message:zn},Yellow:{chatHeader:{backgroundColor:"#F1E54F",textColor:$n},chatPaneBackgroundColor:"rgba(251, 239, 80, 0.9)",message:Vn},Orange:{chatHeader:{backgroundColor:"#C06C31",textColor:Gn},chatPaneBackgroundColor:"rgba(238, 126, 49, 0.7)",message:zn},Pink:{chatHeader:{backgroundColor:"#A24599",textColor:Gn},chatPaneBackgroundColor:"rgba(167, 70, 157, 0.8)",message:zn}},Zn=e=>Xn[e&&Object.keys(Xn).includes(e)?e:"Light"];function Qn(e,t,n,i,r,o){var a;const s=new Oe.User({id:`building_${t.id}`,name:t.userFirstName,email:null,role:"Default",welcomeMessage:t.welcomeMessage,availabilityText:t.systemWelcomeMessage}),u=e.getOrCreateConversation(r);return u.setParticipant(e.me),u.setParticipant(s),u.subject=16===t.orgId?"Leasing team":null!==(a=t.chatTitle)&&void 0!==a?a:t.userFirstName,u.custom={buildingId:t.id.toString(),userId:t.userId.toString(),orgId:t.orgId.toString(),subtitle:t.chatSubtitle,url:location.href,buildingName:t.name,isMobile:o.toString(),chatHeaderBackgroundColor:n.chatHeader.backgroundColor,chatHeaderTextColor:n.chatHeader.textColor,chatPaneBackgroundColor:n.chatPaneBackgroundColor,userMessageTextColor:n.message.user.textColor,userMessageBackgroundColor:n.message.user.backgroundColor,agentMessageTextColor:n.message.agent.textColor,agentMessageBackgroundColor:n.message.agent.backgroundColor,isLightTheme:(n.message===Vn).toString(),avatarUrl:"image"===t.avatarType&&t.avatarSrc?i:"https://eliseusercontent.meetelise.com/webchat/looping-gradient.gif"},u}const Kn=a`
|
|
1110
1110
|
:host {
|
|
1111
1111
|
--glowBarHeight: 11.2px;
|
|
1112
1112
|
--enterAnimationDuration: 0.5s;
|
|
@@ -1922,7 +1922,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1922
1922
|
.call-us-window__open-times {
|
|
1923
1923
|
text-transform: lowercase;
|
|
1924
1924
|
}
|
|
1925
|
-
`],mi([oe({attribute:!1})],vi.prototype,"onCloseClicked",void 0),mi([oe()],vi.prototype,"phoneNumber",void 0),mi([oe({attribute:!1})],vi.prototype,"buildingId",void 0),mi([oe({attribute:!0})],vi.prototype,"chatCallUsHeader",void 0),mi([oe({attribute:!1})],vi.prototype,"officeHoursTextInfo",void 0),vi=mi([ie("call-us-window")],vi);const gi={};var yi=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let bi=class extends te{constructor(){super(...arguments),this.isMobile=!1,this.isFirstMount=!1,this.backgroundColor="rgba(255, 255, 255, 0.75)",this.textColor="#202020",this.isMini=!0,this.autoOpenChatWidget=!1,this.phoneNumber="",this.chatCallUsHeader="Call us",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.hasCallUsEnabled=!1,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasSSTEnabled=!1,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.launcherStyles={},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber&&this.hasCallUsEnabled,this.hasSSTEnabled,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=we(),this.textUsWindowRef=we(),this.tourSchedulerRef=we(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(gi[e])return gi[e];const t=`https://app.meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,n=await Zt().get(t);return gi[e]=n.data,n.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&this.hasTextUsEnabled&&4895!==this.buildingId,await async function(e){return!!e}(this.buildingId)&&this.hasSSTEnabled&&(this.hasSSTEnabled=!0)}},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToTextUsWindow=()=>{const e=this.textUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseTextUsWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerRef.value;e&&(e.onCloseClicked=this.onCloseSSTWindow)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.renderEmailOption=()=>{const e=this.getNumCallToActions()>2?"Email":"Email us";return D`
|
|
1925
|
+
`],mi([oe({attribute:!1})],vi.prototype,"onCloseClicked",void 0),mi([oe()],vi.prototype,"phoneNumber",void 0),mi([oe({attribute:!1})],vi.prototype,"buildingId",void 0),mi([oe({attribute:!0})],vi.prototype,"chatCallUsHeader",void 0),mi([oe({attribute:!1})],vi.prototype,"officeHoursTextInfo",void 0),vi=mi([ie("call-us-window")],vi);const gi={};var yi=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let bi=class extends te{constructor(){super(...arguments),this.isMobile=!1,this.isFirstMount=!1,this.backgroundColor="rgba(255, 255, 255, 0.75)",this.textColor="#202020",this.isMini=!0,this.autoOpenChatWidget=!1,this.phoneNumber="",this.chatCallUsHeader="Call us",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.sgtUrl="",this.hasCallUsEnabled=!1,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasSSTEnabled=!1,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.launcherStyles={},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber&&this.hasCallUsEnabled,this.hasSSTEnabled,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=we(),this.textUsWindowRef=we(),this.tourSchedulerRef=we(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(gi[e])return gi[e];const t=`https://app.meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,n=await Zt().get(t);return gi[e]=n.data,n.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&this.hasTextUsEnabled&&4895!==this.buildingId,await async function(e){return!!e}(this.buildingId)&&this.hasSSTEnabled&&(this.hasSSTEnabled=!0)}},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToTextUsWindow=()=>{const e=this.textUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseTextUsWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerRef.value;e&&(e.onCloseClicked=this.onCloseSSTWindow)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.renderEmailOption=()=>{const e=this.getNumCallToActions()>2?"Email":"Email us";return D`
|
|
1926
1926
|
<div
|
|
1927
1927
|
@click=${this.onClickEmailOption}
|
|
1928
1928
|
class="launcher__call-to-action-option"
|
|
@@ -1985,6 +1985,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1985
1985
|
<tour-scheduler
|
|
1986
1986
|
orgSlug="${this.orgSlug}"
|
|
1987
1987
|
buildingSlug="${this.buildingSlug}"
|
|
1988
|
+
sgtUrl="${this.sgtUrl}"
|
|
1988
1989
|
.layoutOptions=${this.layoutOptions}
|
|
1989
1990
|
.unitOptions=${this.unitOptions}
|
|
1990
1991
|
.tourTypeOptions=${this.tourTypeOptions}
|
|
@@ -2146,7 +2147,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2146
2147
|
</div>
|
|
2147
2148
|
`}
|
|
2148
2149
|
</div>
|
|
2149
|
-
`}};bi.styles=Kn,yi([oe({type:Boolean})],bi.prototype,"isMobile",void 0),yi([oe({type:Boolean})],bi.prototype,"isFirstMount",void 0),yi([oe()],bi.prototype,"backgroundColor",void 0),yi([oe()],bi.prototype,"textColor",void 0),yi([oe({type:Boolean})],bi.prototype,"isMini",void 0),yi([oe({attribute:!1})],bi.prototype,"autoOpenChatWidget",void 0),yi([oe()],bi.prototype,"phoneNumber",void 0),yi([oe({attribute:!0})],bi.prototype,"chatCallUsHeader",void 0),yi([oe({attribute:!1})],bi.prototype,"buildingId",void 0),yi([oe({attribute:!0})],bi.prototype,"buildingSlug",void 0),yi([oe({attribute:!0})],bi.prototype,"orgSlug",void 0),yi([oe({type:Boolean})],bi.prototype,"hasCallUsEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasChatEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasEmailEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasSSTEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasTextUsEnabled",void 0),yi([oe({attribute:!1})],bi.prototype,"layoutOptions",void 0),yi([oe({attribute:!1})],bi.prototype,"unitOptions",void 0),yi([oe({attribute:!1})],bi.prototype,"tourTypeOptions",void 0),yi([oe({attribute:!1})],bi.prototype,"onChatTapped",void 0),yi([oe({attribute:!1})],bi.prototype,"launcherStyles",void 0),yi([ae()],bi.prototype,"isEmailWindowOpen",void 0),yi([ae()],bi.prototype,"isCallUsWindowOpen",void 0),yi([ae()],bi.prototype,"isSSTWindowOpen",void 0),yi([ae()],bi.prototype,"isTextUsWindowOpen",void 0),bi=yi([ie("meetelise-launcher")],bi);var wi=n(3379),Si=n.n(wi),Ti=n(7795),xi=n.n(Ti),Oi=n(569),Ii=n.n(Oi),Ri=n(3565),Ni=n.n(Ri),Ai=n(9216),Ci=n.n(Ai),_i=n(4589),Ei=n.n(_i),Fi=n(3631),Mi={};Mi.styleTagTransform=Ei(),Mi.setAttributes=Ni(),Mi.insert=Ii().bind(null,"head"),Mi.domAPI=xi(),Mi.insertStyleElement=Ci(),Si()(Fi.Z,Mi),Fi.Z&&Fi.Z.locals&&Fi.Z.locals;var Pi,Di=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let qi=Pi=class extends te{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.useMiniWidget=!0,this.launcherStyles={},this.popup=null,this.theme=Zn(),this.chatId="",this.analytics=null,this.isMobile=Tn(),this.launcher=null,this.building=null,this.hasMounted=!1,this.hideLauncher=!1,this.yardiDNIScriptInterval=null,this.launcherRef=we(),this.initializeInstanceVariables=async()=>{await this.setBuildingDerivedInfo(),await this.initializeLaunchJS(),this.attachOnClickToLauncher()},this.setBuildingDerivedInfo=async()=>{var e;this.buildingSlug&&this.orgSlug&&(this.building=await async function(e,t){const n="https://app.meetelise.com",i=`${n}/api/pub/v1/organization/${e}/building/${t}`,r=await fetch(i),o=await r.json(),a=await fetch(`${n}/eliseCrmApi/pub/building/${t}/units`),s=await a.json(),u=await fetch(`${n}/eliseCrmApi/pub/building/${t}/layouts`),l=await u.json();return o.unitOptionsV2=s,o.layoutOptionsV2=l,o}(this.orgSlug,this.buildingSlug),yn(this.building.id),this.chatId=function(e,t){const n=Hn(e,t),i=localStorage.getItem(n);return i&&!function(e,t){const n=Wn(e,t),i=localStorage.getItem(n)||jn(e,t),r=new Date(new Date(i).getTime()+216e5);return new Date>r}(e,t)?i:Bn(e,t)}(this.orgSlug,this.buildingSlug),this.avatarSrc=this.avatarSrc||this.building.avatarSrc,this.theme=Zn(null!==(e=this.themeId)&&void 0!==e?e:this.building.themeId),this.analytics=new Fn(this.orgSlug,this.buildingSlug,this.chatId))},this.initializeLaunchJS=async()=>{var e;if(!this.building||!this.theme)return;if(this.popup&&this.launcher)return;const[t,n,i,r]=await Promise.all([this.building,this.theme,this.avatarSrc,Pi.session]);if(t.conversationMaintenanceMode)return new Promise((()=>{console.warn("MeetElise Chat is in maintenance mode. Chat icon will not appear.")}));await this.configureTalkJSPopup(t,n,r,i),this.configureLauncherElement(),null===(e=this.analytics)||void 0===e||e.ping("load"),this.yardiDNIScriptInterval=setInterval((()=>this.pollForYardiCampaignSource()),1e3),setTimeout(clearInterval,15e3,this.yardiDNIScriptInterval)},this.configureLauncherElement=()=>{this.popup&&this.launcherRef.value&&(this.launcher=this.launcherRef.value)},this.configureTalkJSPopup=async(e,t,n,i)=>{const
|
|
2150
|
+
`}};bi.styles=Kn,yi([oe({type:Boolean})],bi.prototype,"isMobile",void 0),yi([oe({type:Boolean})],bi.prototype,"isFirstMount",void 0),yi([oe()],bi.prototype,"backgroundColor",void 0),yi([oe()],bi.prototype,"textColor",void 0),yi([oe({type:Boolean})],bi.prototype,"isMini",void 0),yi([oe({attribute:!1})],bi.prototype,"autoOpenChatWidget",void 0),yi([oe()],bi.prototype,"phoneNumber",void 0),yi([oe({attribute:!0})],bi.prototype,"chatCallUsHeader",void 0),yi([oe({attribute:!1})],bi.prototype,"buildingId",void 0),yi([oe({attribute:!0})],bi.prototype,"buildingSlug",void 0),yi([oe({attribute:!0})],bi.prototype,"orgSlug",void 0),yi([oe({attribute:!0})],bi.prototype,"sgtUrl",void 0),yi([oe({type:Boolean})],bi.prototype,"hasCallUsEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasChatEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasEmailEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasSSTEnabled",void 0),yi([oe({type:Boolean})],bi.prototype,"hasTextUsEnabled",void 0),yi([oe({attribute:!1})],bi.prototype,"layoutOptions",void 0),yi([oe({attribute:!1})],bi.prototype,"unitOptions",void 0),yi([oe({attribute:!1})],bi.prototype,"tourTypeOptions",void 0),yi([oe({attribute:!1})],bi.prototype,"onChatTapped",void 0),yi([oe({attribute:!1})],bi.prototype,"launcherStyles",void 0),yi([ae()],bi.prototype,"isEmailWindowOpen",void 0),yi([ae()],bi.prototype,"isCallUsWindowOpen",void 0),yi([ae()],bi.prototype,"isSSTWindowOpen",void 0),yi([ae()],bi.prototype,"isTextUsWindowOpen",void 0),bi=yi([ie("meetelise-launcher")],bi);var wi=n(3379),Si=n.n(wi),Ti=n(7795),xi=n.n(Ti),Oi=n(569),Ii=n.n(Oi),Ri=n(3565),Ni=n.n(Ri),Ai=n(9216),Ci=n.n(Ai),_i=n(4589),Ei=n.n(_i),Fi=n(3631),Mi={};Mi.styleTagTransform=Ei(),Mi.setAttributes=Ni(),Mi.insert=Ii().bind(null,"head"),Mi.domAPI=xi(),Mi.insertStyleElement=Ci(),Si()(Fi.Z,Mi),Fi.Z&&Fi.Z.locals&&Fi.Z.locals;var Pi,Di=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let qi=Pi=class extends te{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.useMiniWidget=!0,this.launcherStyles={},this.popup=null,this.theme=Zn(),this.chatId="",this.analytics=null,this.isMobile=Tn(),this.launcher=null,this.building=null,this.hasMounted=!1,this.hideLauncher=!1,this.yardiDNIScriptInterval=null,this.launcherRef=we(),this.initializeInstanceVariables=async()=>{await this.setBuildingDerivedInfo(),await this.initializeLaunchJS(),this.attachOnClickToLauncher()},this.setBuildingDerivedInfo=async()=>{var e;this.buildingSlug&&this.orgSlug&&(this.building=await async function(e,t){const n="https://app.meetelise.com",i=`${n}/api/pub/v1/organization/${e}/building/${t}`,r=await fetch(i),o=await r.json(),a=await fetch(`${n}/eliseCrmApi/pub/building/${t}/units`),s=await a.json(),u=await fetch(`${n}/eliseCrmApi/pub/building/${t}/layouts`),l=await u.json();return o.unitOptionsV2=s,o.layoutOptionsV2=l,o}(this.orgSlug,this.buildingSlug),yn(this.building.id),this.chatId=function(e,t){const n=Hn(e,t),i=localStorage.getItem(n);return i&&!function(e,t){const n=Wn(e,t),i=localStorage.getItem(n)||jn(e,t),r=new Date(new Date(i).getTime()+216e5);return new Date>r}(e,t)?i:Bn(e,t)}(this.orgSlug,this.buildingSlug),this.avatarSrc=this.avatarSrc||this.building.avatarSrc,this.theme=Zn(null!==(e=this.themeId)&&void 0!==e?e:this.building.themeId),this.analytics=new Fn(this.orgSlug,this.buildingSlug,this.chatId))},this.initializeLaunchJS=async()=>{var e;if(!this.building||!this.theme)return;if(this.popup&&this.launcher)return;const[t,n,i,r]=await Promise.all([this.building,this.theme,this.avatarSrc,Pi.session]);if(t.conversationMaintenanceMode)return new Promise((()=>{console.warn("MeetElise Chat is in maintenance mode. Chat icon will not appear.")}));await this.configureTalkJSPopup(t,n,r,i),this.configureLauncherElement(),null===(e=this.analytics)||void 0===e||e.ping("load"),this.yardiDNIScriptInterval=setInterval((()=>this.pollForYardiCampaignSource()),1e3),setTimeout(clearInterval,15e3,this.yardiDNIScriptInterval)},this.configureLauncherElement=()=>{this.popup&&this.launcherRef.value&&(this.launcher=this.launcherRef.value)},this.configureTalkJSPopup=async(e,t,n,i)=>{var r;const o=n.createPopup(Qn(n,e,t,i||e.avatarSrc,this.chatId,this.isMobile),{launcher:"never",showCloseInHeader:!0,messageField:{placeholder:"Ask a question..."}});await o.mount({show:!1}),o.on("close",(()=>{this.hideLauncher=!1}));const a=document.querySelector(".__talkjs_popup");if(!a)throw new Error("Failed to find chat window");a.classList.add("meetelise-chat","pane"),this.isMobile||a.classList.add("launcher__desktop"),a.style.zIndex="99999999999",this.popup=o;const s=sessionStorage.getItem("autoOpenedTimestamp"),u=!s||s&&en(nn(s));e.autoOpenChatWidget&&u&&!Tn()&&(this.popup.show(),this.hideLauncher=!0,this.hasMounted=!0,sessionStorage.setItem("autoOpenedTimestamp",Vt(function(e,t){Ee(2,arguments);var n=Ve(t);return Xe(e,6e4*n)}(new Date,15))),null===(r=this.analytics)||void 0===r||r.ping("autoOpen"))},this.firstUpdated=()=>{this.initializeInstanceVariables()},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{var e;this.popup&&(this.popup.show(),null===(e=this.analytics)||void 0===e||e.ping("open"),this.hideLauncher=!0,this.hasMounted=!0)})}}pollForYardiCampaignSource(){var e,t,n;(null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&(null===(n=this.analytics)||void 0===n||n.ping("yardi-DNI-init"),this.yardiDNIScriptInterval&&clearInterval(this.yardiDNIScriptInterval))}async restartConversation(){if(!(this.analytics&&this.analytics.chatId&&this.building&&this.popup&&Pi.session))return;this.chatId=Bn(this.orgSlug,this.buildingSlug);const e=await Pi.session;this.analytics.chatId=this.chatId,this.popup.select(Qn(e,this.building,this.theme,this.avatarSrc||this.building.avatarSrc,this.chatId,this.isMobile))}remove(){var e;null===(e=this.popup)||void 0===e||e.destroy()}open(){var e;null===(e=this.popup)||void 0===e||e.show()}close(){var e;null===(e=this.popup)||void 0===e||e.hide()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}render(){var e,t,n,i,r,o,a,s,u,l,d,c,p,f,h,m,v,g,y,b,w,S,T,x,O;return window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",bi),D`
|
|
2150
2151
|
<div
|
|
2151
2152
|
class=${ce({launcherContainer:!0,launcher__mobile:this.isMobile,launcher__desktop:!this.isMobile,"meetelise-chat":!0,launcher:!0,shouldBeVisible:!0})}
|
|
2152
2153
|
>
|
|
@@ -2167,12 +2168,13 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2167
2168
|
backgroundColor="${this.theme.chatPaneBackgroundColor}"
|
|
2168
2169
|
orgSlug="${this.orgSlug}"
|
|
2169
2170
|
buildingSlug="${this.buildingSlug}"
|
|
2171
|
+
sgtUrl="${null!==(h=null===(f=this.building)||void 0===f?void 0:f.sgtUrl)&&void 0!==h?h:""}"
|
|
2170
2172
|
?hidden=${this.hideLauncher}
|
|
2171
|
-
?hasCallUsEnabled=${!(null===(
|
|
2172
|
-
?hasChatEnabled=${!(null===(
|
|
2173
|
-
?hasEmailEnabled=${!(null===(
|
|
2174
|
-
?hasTextUsEnabled=${!(null===(
|
|
2175
|
-
?hasSSTEnabled=${!(null===(
|
|
2173
|
+
?hasCallUsEnabled=${!(null===(m=this.building)||void 0===m?void 0:m.chatWidgets)||(null===(v=this.building)||void 0===v?void 0:v.chatWidgets.includes("CALL"))}
|
|
2174
|
+
?hasChatEnabled=${!(null===(g=this.building)||void 0===g?void 0:g.chatWidgets)||(null===(y=this.building)||void 0===y?void 0:y.chatWidgets.includes("CHAT"))}
|
|
2175
|
+
?hasEmailEnabled=${!(null===(b=this.building)||void 0===b?void 0:b.chatWidgets)||(null===(w=this.building)||void 0===w?void 0:w.chatWidgets.includes("EMAIL"))}
|
|
2176
|
+
?hasTextUsEnabled=${!(null===(S=this.building)||void 0===S?void 0:S.chatWidgets)||(null===(T=this.building)||void 0===T?void 0:T.chatWidgets.includes("SMS"))}
|
|
2177
|
+
?hasSSTEnabled=${!(null===(x=this.building)||void 0===x?void 0:x.chatWidgets)||(null===(O=this.building)||void 0===O?void 0:O.chatWidgets.includes("SST"))}
|
|
2176
2178
|
>
|
|
2177
2179
|
</meetelise-launcher>`:""}
|
|
2178
2180
|
</div>
|
|
@@ -44,6 +44,8 @@ export class Launcher extends LitElement {
|
|
|
44
44
|
buildingSlug = "";
|
|
45
45
|
@property({ attribute: true })
|
|
46
46
|
orgSlug = "";
|
|
47
|
+
@property({ attribute: true })
|
|
48
|
+
sgtUrl = "";
|
|
47
49
|
@property({ type: Boolean })
|
|
48
50
|
hasCallUsEnabled = false;
|
|
49
51
|
@property({ type: Boolean })
|
|
@@ -297,6 +299,7 @@ export class Launcher extends LitElement {
|
|
|
297
299
|
<tour-scheduler
|
|
298
300
|
orgSlug="${this.orgSlug}"
|
|
299
301
|
buildingSlug="${this.buildingSlug}"
|
|
302
|
+
sgtUrl="${this.sgtUrl}"
|
|
300
303
|
.layoutOptions=${this.layoutOptions}
|
|
301
304
|
.unitOptions=${this.unitOptions}
|
|
302
305
|
.tourTypeOptions=${this.tourTypeOptions}
|
|
@@ -56,11 +56,13 @@ export class TourScheduler extends LitElement {
|
|
|
56
56
|
@property({ attribute: true })
|
|
57
57
|
buildingSlug = "";
|
|
58
58
|
@property({ attribute: true })
|
|
59
|
+
sgtUrl = "";
|
|
60
|
+
@property({ attribute: true })
|
|
59
61
|
orgSlug = "";
|
|
60
62
|
onCloseClicked?: (e: MouseEvent) => void;
|
|
61
63
|
|
|
62
64
|
@state()
|
|
63
|
-
private tourType = TourType.
|
|
65
|
+
private tourType = TourType.Self;
|
|
64
66
|
@state()
|
|
65
67
|
private shouldShowTourType = {
|
|
66
68
|
[TourType.Guided]: true,
|
|
@@ -765,6 +767,10 @@ export class TourScheduler extends LitElement {
|
|
|
765
767
|
heading="Guided tour"
|
|
766
768
|
subtitle="with an agent"
|
|
767
769
|
@click="${() => {
|
|
770
|
+
if (this.sgtUrl) {
|
|
771
|
+
window.open(this.sgtUrl, "_blank");
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
768
774
|
this.tourType = TourType.Guided;
|
|
769
775
|
}}"
|
|
770
776
|
@keydown="${(e: KeyboardEvent) => {
|
|
@@ -229,7 +229,7 @@ export class MEChat extends LitElement {
|
|
|
229
229
|
const shouldAutoOpen =
|
|
230
230
|
!autoOpenedTimestamp ||
|
|
231
231
|
(autoOpenedTimestamp && isPast(parseISO(autoOpenedTimestamp)));
|
|
232
|
-
if (building.autoOpenChatWidget && shouldAutoOpen) {
|
|
232
|
+
if (building.autoOpenChatWidget && shouldAutoOpen && !isMobile()) {
|
|
233
233
|
this.popup.show();
|
|
234
234
|
this.hideLauncher = true;
|
|
235
235
|
this.hasMounted = true;
|
|
@@ -237,6 +237,7 @@ export class MEChat extends LitElement {
|
|
|
237
237
|
"autoOpenedTimestamp",
|
|
238
238
|
formatISO(addMinutes(new Date(), 15))
|
|
239
239
|
);
|
|
240
|
+
this.analytics?.ping("autoOpen");
|
|
240
241
|
}
|
|
241
242
|
};
|
|
242
243
|
|
|
@@ -314,6 +315,7 @@ export class MEChat extends LitElement {
|
|
|
314
315
|
backgroundColor="${this.theme.chatPaneBackgroundColor}"
|
|
315
316
|
orgSlug="${this.orgSlug}"
|
|
316
317
|
buildingSlug="${this.buildingSlug}"
|
|
318
|
+
sgtUrl="${this.building?.sgtUrl ?? ""}"
|
|
317
319
|
?hidden=${this.hideLauncher}
|
|
318
320
|
?hasCallUsEnabled=${!this.building?.chatWidgets
|
|
319
321
|
? true
|