@meetelise/chat 1.22.57 → 1.22.58

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.22.57",
3
+ "version": "1.22.58",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -4431,7 +4431,7 @@ xmlns="http://www.w3.org/2000/svg"
4431
4431
  I agree
4432
4432
  </button>
4433
4433
  </div>
4434
- `;var wo=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 So=class extends re{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.building=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=$n.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Fo.Default,this.onWidgetLoaded=rr(),this.onSstClose=rr(),this.enabledChatWidgets={callDesktop:!0,callMobile:!0,chatMobile:!0,chatDesktop:!0,emailDesktop:!0,emailMobile:!0,textDesktop:!0,textMobile:!0,sstDesktop:!0,sstMobile:!0},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=xe(),this.firstUpdated=async()=>this.setupWebchat(),this.shouldShowWebchat=async(e,n)=>{if(!e)return console.warn("MeetElise Chat will NOT appear. Building does NOT exist."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_does_not_exist"}},sampleRate:this.sampleRateToUse}),!1;if(!e.launchedDateTime)return console.warn("MeetElise Chat will NOT appear. Building is NOT launched (based on launched date time)."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_not_launched"}},sampleRate:this.sampleRateToUse}),!1;if(!e.active)return console.warn("MeetElise Chat will NOT appear. Building is NOT active."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_not_active"}},sampleRate:this.sampleRateToUse}),!1;if(!e.webchatScopeConfigured)return console.warn("MeetElise Chat will NOT appear. Building is NOT webchat scope configured."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_not_webchat_scope_configured"}},sampleRate:this.sampleRateToUse}),!1;const i=await async function(e){if(!e)return!1;try{return(await t().get(Xn(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-leasing-in-maintenance-mode",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(n);return!i||(console.warn("MeetElise Chat will NOT appear. Chat is in maintenance mode."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_in_maintenance_mode"}},sampleRate:this.sampleRateToUse}),!1)},this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await xi(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,n)=>{const i=window.rentgrata;if(!i)return;const r=i.Widget;if(!r)return;const o=r.config;if(!o)return;const a=o.widgetKey;a&&await t().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=n?n:""}})})(this.buildingSlug,this.orgSlug)}catch(e){console.warn("Error updating rentgrata token",e)}this.sampleRateToUse=(null==e?void 0:e.launchedDateTime)?.02:.05,await this.shouldShowWebchat(e,this.buildingSlug)&&(ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:this.sampleRateToUse}),this.building=e,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)&&(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()),this.isLoading=!1,"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0))},this.setBuildingDerivedInfo=async()=>{var e,n,i,r,o,a,s,l,u,d,c,p,h,f,m,g,v,y,b,w,S,T,x,A,C,O,I,N,E,R,_,P,M,F,D,k,U;const B=this.building;if(!B)return;B&&this.orgSlug&&xo(this.orgSlug,null!==(n=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==n?n:null,this.sampleRateToUse,this.buildingSlug,null!==(r=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==r?r:null);const[L,q,J,j,H,G,z]=await Promise.all([Ni(this.buildingSlug),Ar(this.orgSlug,this.buildingSlug),Yn(this.buildingSlug),Zn(this.buildingSlug),Ii(B.id),ei(this.buildingSlug),ti(this.buildingSlug)]);this.building&&(this.building.phoneNumber=Ne(B.phoneNumber)),this.designConcept=null!==(o=null==L?void 0:L.abTestType)&&void 0!==o?o:"",this.leadSources=q,this.featureFlagShowDropdown=J;const W=B.textWithUsPhoneNumber?B.textWithUsPhoneNumber:await(async e=>{try{const n="https://app.meetelise.com",i=await t().get(`${n}/platformApi/webchat/${e}/phone-number`);if(i.data)return i.data}catch(t){return di({logType:ui.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug);var V,Q;this.enabledChatWidgets={callDesktop:!(null===(a=null==H?void 0:H.config.shouldShowPhone)||void 0===a||!a)||null!==(s=null==H?void 0:H.config.shouldShowPhoneDesktop)&&void 0!==s&&s,callMobile:!(null===(l=null==H?void 0:H.config.shouldShowPhone)||void 0===l||!l)||null!==(u=null==H?void 0:H.config.shouldShowPhoneMobile)&&void 0!==u&&u,chatDesktop:!(null===(d=null==H?void 0:H.config.shouldShowChat)||void 0===d||!d)||null!==(c=null==H?void 0:H.config.shouldShowChatDesktop)&&void 0!==c&&c,chatMobile:!(null===(p=null==H?void 0:H.config.shouldShowChat)||void 0===p||!p)||null!==(h=null==H?void 0:H.config.shouldShowChatMobile)&&void 0!==h&&h,emailDesktop:!(null===(f=null==H?void 0:H.config.shouldShowEmail)||void 0===f||!f)||null!==(m=null==H?void 0:H.config.shouldShowEmailDesktop)&&void 0!==m&&m,emailMobile:!(null===(g=null==H?void 0:H.config.shouldShowEmail)||void 0===g||!g)||null!==(v=null==H?void 0:H.config.shouldShowEmailMobile)&&void 0!==v&&v,textDesktop:(!(null===(y=null==H?void 0:H.config.shouldShowText)||void 0===y||!y)||null!==(b=null==H?void 0:H.config.shouldShowTextDesktop)&&void 0!==b&&b)&&!!W,textMobile:(!(null===(w=null==H?void 0:H.config.shouldShowText)||void 0===w||!w)||null!==(S=null==H?void 0:H.config.shouldShowTextMobile)&&void 0!==S&&S)&&!!W,sstDesktop:!(null===(T=null==H?void 0:H.config.shouldShowSst)||void 0===T||!T)||null!==(x=null==H?void 0:H.config.shouldShowSstDesktop)&&void 0!==x&&x,sstMobile:!(null===(A=null==H?void 0:H.config.shouldShowSst)||void 0===A||!A)||null!==(C=null==H?void 0:H.config.shouldShowSstMobile)&&void 0!==C&&C},this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(Q=this.handleTourClicked,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",(e=>{e.preventDefault(),Q(e)}))})),z&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach((t=>{t&&t.addEventListener("click",(t=>{t.preventDefault(),e(t)}))}))})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach((t=>{var n;if(!t)return;const i=document.createElement("a");i.innerHTML=t.innerHTML,i.style.cursor="pointer",i.addEventListener("click",(t=>{t.preventDefault(),e(t)})),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)}))})(this.handleTourClicked)):(null===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&(V=null!==(N=null===(I=this.LeadSourceClient)||void 0===I?void 0:I.leadSource)&&void 0!==N?N:null,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(V)}`)}}))),H&&H.config&&(this.primaryColor=null!==(E=H.config.primaryColor)&&void 0!==E?E:null,this.backgroundColor=null!==(R=H.config.backgroundColor)&&void 0!==R?R:null,this.webchatConfigHasAutoOpenChat=H.config.autoOpenChat,this.requiresConsent=H.config.requiresConsent,this.hideMobileFeatures=H.config.hideMobileFeatures,this.privacyPolicyUrl=null!==(_=H.config.privacyPolicyUrl)&&void 0!==_?_:this.privacyPolicyUrl,H.config.displayStyle===Ci.MINIMIZED&&(this.isMinimized=!0),H.config.displayStyle===Ci.PILLS&&(this.designConcept=null),H.config.displayStyle===Ci.EMOJI&&(this.designConcept=Ci.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Me),null===this.backgroundColor&&(this.backgroundColor=Fe);const K=null!==(M=null===(P=this.building)||void 0===P?void 0:P.phoneNumber)&&void 0!==M?M:"";let X=null;if(j&&(X=await async function(e,n){try{const i=await t().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source?source=${n}`);return i.data?{number:Ne(i.data.number),isMatch:i.data.match,isPropertyWebsiteCatchall:i.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(D=null===(F=this.LeadSourceClient)||void 0===F?void 0:F.leadSource)&&void 0!==D?D:null),X&&!X.isMatch&&(X.number=K)),G&&(null==X?void 0:X.number)){const e=zr(X.number,this.orgSlug,this.buildingSlug);e>0&&ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const $=localStorage.getItem("eliseai_phone_number_devtest");$&&(console.info("Using dev test phone number: ",$),zr($,this.orgSlug,this.buildingSlug)),this.phoneNumberForSource=X||{number:K,isMatch:!1,isPropertyWebsiteCatchall:!0};const Y=null!==(U=null===(k=this.LeadSourceClient)||void 0===k?void 0:k.leadSource)&&void 0!==U?U:null;Y&&(this.leadSources.includes(Y)||this.leadSources.push(Y)),Jn(B.id)},this.initializeChatVariables=async()=>{var e,n,i,r,o,a,s,l;if(!this.building)return;const u=Br(this.buildingSlug),d=Lr(this.buildingSlug,u)?u:Ur(this.buildingSlug,!1);if(!d.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=pi();if(this.leadSourceInput={websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:o,referrer:document.referrer,parsedUtmSource:o?o.utm_source:null,campaignSources:Object.values(li()).filter((e=>e))},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t&&!hn(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:On(t.timestamp)}}const a={leadSource:t,leadId:n,buildingSlug:e,timestamp:bn(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:On(a.timestamp)}},this.getLeadSourceBodyIfValid=e=>{const t=localStorage.getItem("com.elise.webchat.leadsource.slug="+e);if(t)try{const n=JSON.parse(t);if(n.buildingSlug===e&&n.leadSource&&n.leadId&&n.timestamp&&!hn(On(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){console.error("Error parsing leadSourceInput from localStorage")}return n}}catch(e){return null}return null}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:n,referrer:i,campaignSources:r}){try{return(await t().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,{query_params:n,building_slug:e,referrer:i,campaign_sources:r})).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:n}){var i,r,o,a,s,l,u;try{if(!this.chatId)return console.error("chatId is not set"),null;if(!this.orgSlug)return console.error("orgId is not set"),null;let d=null,c=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(d=e),c=null===(i=window.dataLayer.find((e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)})))||void 0===i?void 0:i.value}}catch(e){console.error("error getting cookie")}return await t().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:n,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(r=this.leadSourceInput)||void 0===r?void 0:r.websiteOrigin,website_search:null===(o=this.leadSourceInput)||void 0===o?void 0:o.websiteSearch,query_parameters:null===(a=this.leadSourceInput)||void 0===a?void 0:a.queryParameters,referrer:null===(s=this.leadSourceInput)||void 0===s?void 0:s.referrer,parsed_utm_source:null===(l=this.leadSourceInput)||void 0===l?void 0:l.parsedUtmSource,campaign_sources:null===(u=this.leadSourceInput)||void 0===u?void 0:u.campaignSources,lead_source_output:this.leadSource,google_analytics_client_id:mi()(d)?null:d,extras:null!=c?c:null}),null}catch(e){return null}}async getCookieValue(e){try{const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.startsWith(e+"="))return i.substring((e+"=").length,-1===i.indexOf(";")?void 0:i.indexOf(";"))}return null}catch(e){console.error("error getting cookie value")}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){try{const i={queryParams:pi(),buildingSlug:n,referrer:document.referrer,campaignSources:li()};let r=!1;const o=n?this.getLeadSourceBodyIfValid(n):null;if(o){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=o.leadSource,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(i);if(!e)return this.leadSource=o.leadSource,this.leadSource;this.leadSource=e,r=!0}}const a=await this.fetchCurrentParsedLeadSource(i);if(this.leadSource=a,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!a){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSource}if(n){const t=!!a&&a.length>0;this.updateLeadSourceLocalStorage(n,a,e,!t&&!r,r)}return a}catch(e){console.error(e)}return null}},this.myPubnub=new Gr(this.buildingSlug,this.building,this.orgSlug,null,d.leadId,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel,await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(i=null===(n=this.myPubnub)||void 0===n?void 0:n.leadUserId)&&void 0!==i?i:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug})),console.log("EliseAI Mapped Lead Source source: ",null===(r=this.LeadSourceClient)||void 0===r?void 0:r.leadSource),"property-website"!==gi(this.orgSlug)?this.myPubnub.leadSource=null!==(a=null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource)&&void 0!==a?a:gi(this.orgSlug):this.myPubnub.leadSource=null!==(l=null===(s=this.LeadSourceClient)||void 0===s?void 0:s.leadSource)&&void 0!==l?l:null,d.initiatedChat&&await this.myPubnub.initializePubnub(u)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!An(On(t)));return!!e&&!!n&&!pn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",bn(function(e,t){Le(2,arguments);var n=nt(t);return it(e,6e4*n)}(new Date,15)))},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!r)return;const o=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==o?void 0:o.getBoundingClientRect();a&&(r.style.left=`${a.left}px`,r.style.top=`${a.bottom}px`)},this.handleKeydownTab=e=>{var t,n,i,r,o,a,s,l,u,d,c,p,h,f,m,g,v,y,b,w;if("Tab"===e.key){const S=this.displayPubnubChat?null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"):null!==(m=null!==(u=null===(l=null===(s=null===(a=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("meetelise-launcher"))||void 0===o?void 0:o.shadowRoot)||void 0===a?void 0:a.getElementById("email-us-window"))||void 0===s?void 0:s.shadowRoot)||void 0===l?void 0:l.getElementById("email-us-form"))&&void 0!==u?u:null===(f=null===(h=null===(p=null===(c=null===(d=this.shadowRoot)||void 0===d?void 0:d.getElementById("meetelise-launcher"))||void 0===c?void 0:c.shadowRoot)||void 0===p?void 0:p.getElementById("tour-scheduler-window"))||void 0===h?void 0:h.shadowRoot)||void 0===f?void 0:f.getElementById("scheduler-container"))&&void 0!==m?m:null===(w=null===(b=null===(y=null===(v=null===(g=this.shadowRoot)||void 0===g?void 0:g.getElementById("meetelise-launcher"))||void 0===v?void 0:v.shadowRoot)||void 0===y?void 0:y.getElementById("call-us-window"))||void 0===b?void 0:b.shadowRoot)||void 0===w?void 0:w.getElementById("details-window");if(!S)return;e.preventDefault();const T=S.querySelectorAll("input, me-select, textarea, action-confirm-button, [tabindex]"),x=Array.from(T),A=x.findIndex((e=>e.matches(":focus")));x[(A+1)%x.length].focus()}},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false")},this.renderChatAdditionalActions=(e,t)=>{const n=this.building&&ke(this.building.orgId,this.building.id)&&this.primaryColor&&this.primaryColor!==Me?De(this.primaryColor,.6):"black";return U` <style>
4434
+ `;var wo=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 So=class extends re{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.building=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=$n.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Fo.Default,this.onWidgetLoaded=rr(),this.onSstClose=rr(),this.enabledChatWidgets={callDesktop:!0,callMobile:!0,chatMobile:!0,chatDesktop:!0,emailDesktop:!0,emailMobile:!0,textDesktop:!0,textMobile:!0,sstDesktop:!0,sstMobile:!0},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=xe(),this.firstUpdated=async()=>this.setupWebchat(),this.shouldShowWebchat=async(e,n)=>{if(!e)return console.warn("MeetElise Chat will NOT appear. Building does NOT exist."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_does_not_exist"}},sampleRate:this.sampleRateToUse}),!1;if(!e.launchedDateTime)return console.warn("MeetElise Chat will NOT appear. Building is NOT launched (based on launched date time)."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_not_launched"}},sampleRate:this.sampleRateToUse}),!1;if(!e.active)return console.warn("MeetElise Chat will NOT appear. Building is NOT active."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_not_active"}},sampleRate:this.sampleRateToUse}),!1;if(!e.webchatScopeConfigured)return console.warn("MeetElise Chat will NOT appear. Building is NOT webchat scope configured."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_not_webchat_scope_configured"}},sampleRate:this.sampleRateToUse}),!1;const i=await async function(e){if(!e)return!1;try{return(await t().get(Xn(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-leasing-in-maintenance-mode",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(n);return!i||(console.warn("MeetElise Chat will NOT appear. Chat is in maintenance mode."),ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!1,extra_data:{webchat_no_show_reason:"building_in_maintenance_mode"}},sampleRate:this.sampleRateToUse}),!1)},this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await xi(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,n)=>{const i=window.rentgrata;if(!i)return;const r=i.Widget;if(!r)return;const o=r.config;if(!o)return;const a=o.widgetKey;a&&await t().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=n?n:""}})})(this.buildingSlug,this.orgSlug)}catch(e){console.warn("Error updating rentgrata token",e)}this.sampleRateToUse=(null==e?void 0:e.launchedDateTime)?.05:.1,await this.shouldShowWebchat(e,this.buildingSlug)&&(ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:this.sampleRateToUse}),this.building=e,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)&&(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()),this.isLoading=!1,"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0))},this.setBuildingDerivedInfo=async()=>{var e,n,i,r,o,a,s,l,u,d,c,p,h,f,m,g,v,y,b,w,S,T,x,A,C,O,I,N,E,R,_,P,M,F,D,k,U;const B=this.building;if(!B)return;B&&this.orgSlug&&xo(this.orgSlug,null!==(n=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==n?n:null,this.sampleRateToUse,this.buildingSlug,null!==(r=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==r?r:null);const[L,q,J,j,H,G,z]=await Promise.all([Ni(this.buildingSlug),Ar(this.orgSlug,this.buildingSlug),Yn(this.buildingSlug),Zn(this.buildingSlug),Ii(B.id),ei(this.buildingSlug),ti(this.buildingSlug)]);this.building&&(this.building.phoneNumber=Ne(B.phoneNumber)),this.designConcept=null!==(o=null==L?void 0:L.abTestType)&&void 0!==o?o:"",this.leadSources=q,this.featureFlagShowDropdown=J;const W=B.textWithUsPhoneNumber?B.textWithUsPhoneNumber:await(async e=>{try{const n="https://app.meetelise.com",i=await t().get(`${n}/platformApi/webchat/${e}/phone-number`);if(i.data)return i.data}catch(t){return di({logType:ui.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug);var V,Q;this.enabledChatWidgets={callDesktop:!(null===(a=null==H?void 0:H.config.shouldShowPhone)||void 0===a||!a)||null!==(s=null==H?void 0:H.config.shouldShowPhoneDesktop)&&void 0!==s&&s,callMobile:!(null===(l=null==H?void 0:H.config.shouldShowPhone)||void 0===l||!l)||null!==(u=null==H?void 0:H.config.shouldShowPhoneMobile)&&void 0!==u&&u,chatDesktop:!(null===(d=null==H?void 0:H.config.shouldShowChat)||void 0===d||!d)||null!==(c=null==H?void 0:H.config.shouldShowChatDesktop)&&void 0!==c&&c,chatMobile:!(null===(p=null==H?void 0:H.config.shouldShowChat)||void 0===p||!p)||null!==(h=null==H?void 0:H.config.shouldShowChatMobile)&&void 0!==h&&h,emailDesktop:!(null===(f=null==H?void 0:H.config.shouldShowEmail)||void 0===f||!f)||null!==(m=null==H?void 0:H.config.shouldShowEmailDesktop)&&void 0!==m&&m,emailMobile:!(null===(g=null==H?void 0:H.config.shouldShowEmail)||void 0===g||!g)||null!==(v=null==H?void 0:H.config.shouldShowEmailMobile)&&void 0!==v&&v,textDesktop:(!(null===(y=null==H?void 0:H.config.shouldShowText)||void 0===y||!y)||null!==(b=null==H?void 0:H.config.shouldShowTextDesktop)&&void 0!==b&&b)&&!!W,textMobile:(!(null===(w=null==H?void 0:H.config.shouldShowText)||void 0===w||!w)||null!==(S=null==H?void 0:H.config.shouldShowTextMobile)&&void 0!==S&&S)&&!!W,sstDesktop:!(null===(T=null==H?void 0:H.config.shouldShowSst)||void 0===T||!T)||null!==(x=null==H?void 0:H.config.shouldShowSstDesktop)&&void 0!==x&&x,sstMobile:!(null===(A=null==H?void 0:H.config.shouldShowSst)||void 0===A||!A)||null!==(C=null==H?void 0:H.config.shouldShowSstMobile)&&void 0!==C&&C},this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(Q=this.handleTourClicked,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",(e=>{e.preventDefault(),Q(e)}))})),z&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach((t=>{t&&t.addEventListener("click",(t=>{t.preventDefault(),e(t)}))}))})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach((t=>{var n;if(!t)return;const i=document.createElement("a");i.innerHTML=t.innerHTML,i.style.cursor="pointer",i.addEventListener("click",(t=>{t.preventDefault(),e(t)})),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)}))})(this.handleTourClicked)):(null===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&(V=null!==(N=null===(I=this.LeadSourceClient)||void 0===I?void 0:I.leadSource)&&void 0!==N?N:null,document.querySelectorAll("a").forEach((function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(V)}`)}}))),H&&H.config&&(this.primaryColor=null!==(E=H.config.primaryColor)&&void 0!==E?E:null,this.backgroundColor=null!==(R=H.config.backgroundColor)&&void 0!==R?R:null,this.webchatConfigHasAutoOpenChat=H.config.autoOpenChat,this.requiresConsent=H.config.requiresConsent,this.hideMobileFeatures=H.config.hideMobileFeatures,this.privacyPolicyUrl=null!==(_=H.config.privacyPolicyUrl)&&void 0!==_?_:this.privacyPolicyUrl,H.config.displayStyle===Ci.MINIMIZED&&(this.isMinimized=!0),H.config.displayStyle===Ci.PILLS&&(this.designConcept=null),H.config.displayStyle===Ci.EMOJI&&(this.designConcept=Ci.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Me),null===this.backgroundColor&&(this.backgroundColor=Fe);const K=null!==(M=null===(P=this.building)||void 0===P?void 0:P.phoneNumber)&&void 0!==M?M:"";let X=null;if(j&&(X=await async function(e,n){try{const i=await t().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source?source=${n}`);return i.data?{number:Ne(i.data.number),isMatch:i.data.match,isPropertyWebsiteCatchall:i.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(D=null===(F=this.LeadSourceClient)||void 0===F?void 0:F.leadSource)&&void 0!==D?D:null),X&&!X.isMatch&&(X.number=K)),G&&(null==X?void 0:X.number)){const e=zr(X.number,this.orgSlug,this.buildingSlug);e>0&&ci({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const $=localStorage.getItem("eliseai_phone_number_devtest");$&&(console.info("Using dev test phone number: ",$),zr($,this.orgSlug,this.buildingSlug)),this.phoneNumberForSource=X||{number:K,isMatch:!1,isPropertyWebsiteCatchall:!0};const Y=null!==(U=null===(k=this.LeadSourceClient)||void 0===k?void 0:k.leadSource)&&void 0!==U?U:null;Y&&(this.leadSources.includes(Y)||this.leadSources.push(Y)),Jn(B.id)},this.initializeChatVariables=async()=>{var e,n,i,r,o,a,s,l;if(!this.building)return;const u=Br(this.buildingSlug),d=Lr(this.buildingSlug,u)?u:Ur(this.buildingSlug,!1);if(!d.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=pi();if(this.leadSourceInput={websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:o,referrer:document.referrer,parsedUtmSource:o?o.utm_source:null,campaignSources:Object.values(li()).filter((e=>e))},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t&&!hn(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:On(t.timestamp)}}const a={leadSource:t,leadId:n,buildingSlug:e,timestamp:bn(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:On(a.timestamp)}},this.getLeadSourceBodyIfValid=e=>{const t=localStorage.getItem("com.elise.webchat.leadsource.slug="+e);if(t)try{const n=JSON.parse(t);if(n.buildingSlug===e&&n.leadSource&&n.leadId&&n.timestamp&&!hn(On(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){console.error("Error parsing leadSourceInput from localStorage")}return n}}catch(e){return null}return null}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:n,referrer:i,campaignSources:r}){try{return(await t().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,{query_params:n,building_slug:e,referrer:i,campaign_sources:r})).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:n}){var i,r,o,a,s,l,u;try{if(!this.chatId)return console.error("chatId is not set"),null;if(!this.orgSlug)return console.error("orgId is not set"),null;let d=null,c=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(d=e),c=null===(i=window.dataLayer.find((e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)})))||void 0===i?void 0:i.value}}catch(e){console.error("error getting cookie")}return await t().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:n,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(r=this.leadSourceInput)||void 0===r?void 0:r.websiteOrigin,website_search:null===(o=this.leadSourceInput)||void 0===o?void 0:o.websiteSearch,query_parameters:null===(a=this.leadSourceInput)||void 0===a?void 0:a.queryParameters,referrer:null===(s=this.leadSourceInput)||void 0===s?void 0:s.referrer,parsed_utm_source:null===(l=this.leadSourceInput)||void 0===l?void 0:l.parsedUtmSource,campaign_sources:null===(u=this.leadSourceInput)||void 0===u?void 0:u.campaignSources,lead_source_output:this.leadSource,google_analytics_client_id:mi()(d)?null:d,extras:null!=c?c:null}),null}catch(e){return null}}async getCookieValue(e){try{const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.startsWith(e+"="))return i.substring((e+"=").length,-1===i.indexOf(";")?void 0:i.indexOf(";"))}return null}catch(e){console.error("error getting cookie value")}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){try{const i={queryParams:pi(),buildingSlug:n,referrer:document.referrer,campaignSources:li()};let r=!1;const o=n?this.getLeadSourceBodyIfValid(n):null;if(o){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=o.leadSource,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(i);if(!e)return this.leadSource=o.leadSource,this.leadSource;this.leadSource=e,r=!0}}const a=await this.fetchCurrentParsedLeadSource(i);if(this.leadSource=a,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!a){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSource}if(n){const t=!!a&&a.length>0;this.updateLeadSourceLocalStorage(n,a,e,!t&&!r,r)}return a}catch(e){console.error(e)}return null}},this.myPubnub=new Gr(this.buildingSlug,this.building,this.orgSlug,null,d.leadId,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel,await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(i=null===(n=this.myPubnub)||void 0===n?void 0:n.leadUserId)&&void 0!==i?i:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug})),console.log("EliseAI Mapped Lead Source source: ",null===(r=this.LeadSourceClient)||void 0===r?void 0:r.leadSource),"property-website"!==gi(this.orgSlug)?this.myPubnub.leadSource=null!==(a=null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource)&&void 0!==a?a:gi(this.orgSlug):this.myPubnub.leadSource=null!==(l=null===(s=this.LeadSourceClient)||void 0===s?void 0:s.leadSource)&&void 0!==l?l:null,d.initiatedChat&&await this.myPubnub.initializePubnub(u)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!An(On(t)));return!!e&&!!n&&!pn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",bn(function(e,t){Le(2,arguments);var n=nt(t);return it(e,6e4*n)}(new Date,15)))},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!r)return;const o=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==o?void 0:o.getBoundingClientRect();a&&(r.style.left=`${a.left}px`,r.style.top=`${a.bottom}px`)},this.handleKeydownTab=e=>{var t,n,i,r,o,a,s,l,u,d,c,p,h,f,m,g,v,y,b,w;if("Tab"===e.key){const S=this.displayPubnubChat?null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"):null!==(m=null!==(u=null===(l=null===(s=null===(a=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("meetelise-launcher"))||void 0===o?void 0:o.shadowRoot)||void 0===a?void 0:a.getElementById("email-us-window"))||void 0===s?void 0:s.shadowRoot)||void 0===l?void 0:l.getElementById("email-us-form"))&&void 0!==u?u:null===(f=null===(h=null===(p=null===(c=null===(d=this.shadowRoot)||void 0===d?void 0:d.getElementById("meetelise-launcher"))||void 0===c?void 0:c.shadowRoot)||void 0===p?void 0:p.getElementById("tour-scheduler-window"))||void 0===h?void 0:h.shadowRoot)||void 0===f?void 0:f.getElementById("scheduler-container"))&&void 0!==m?m:null===(w=null===(b=null===(y=null===(v=null===(g=this.shadowRoot)||void 0===g?void 0:g.getElementById("meetelise-launcher"))||void 0===v?void 0:v.shadowRoot)||void 0===y?void 0:y.getElementById("call-us-window"))||void 0===b?void 0:b.shadowRoot)||void 0===w?void 0:w.getElementById("details-window");if(!S)return;e.preventDefault();const T=S.querySelectorAll("input, me-select, textarea, action-confirm-button, [tabindex]"),x=Array.from(T),A=x.findIndex((e=>e.matches(":focus")));x[(A+1)%x.length].focus()}},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false")},this.renderChatAdditionalActions=(e,t)=>{const n=this.building&&ke(this.building.orgId,this.building.id)&&this.primaryColor&&this.primaryColor!==Me?De(this.primaryColor,.6):"black";return U` <style>
4435
4435
  #{id}::after {
4436
4436
  border-right-color: ${n} !important;
4437
4437
  }
@@ -361,7 +361,7 @@ export class MEChat extends LitElement {
361
361
  }
362
362
 
363
363
  // We use a lower sample rate if not launched yet because likely still in onboarding process
364
- this.sampleRateToUse = building?.launchedDateTime ? 0.02 : 0.05;
364
+ this.sampleRateToUse = building?.launchedDateTime ? 0.05 : 0.1;
365
365
 
366
366
  const shouldShowWebchat = await this.shouldShowWebchat(
367
367
  building,