@meetelise/chat 1.51.14 → 1.52.0
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/dist/src/WebComponent/launcher/Launcher.d.ts +3 -1
- package/dist/src/WebComponent/me-chat.d.ts +1 -0
- package/dist/src/googleReserve.d.ts +17 -0
- package/package.json +1 -1
- package/public/dist/index.js +211 -201
- package/src/WebComponent/Scheduler/tour-scheduler.ts +4 -0
- package/src/WebComponent/actions/call-us-window.ts +17 -12
- package/src/WebComponent/launcher/Launcher.ts +13 -1
- package/src/WebComponent/me-chat.ts +19 -6
- package/src/disclaimers.ts +17 -8
- package/src/googleReserve.test.ts +60 -0
- package/src/googleReserve.ts +48 -0
package/public/dist/index.js
CHANGED
|
@@ -757,7 +757,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
757
757
|
.option.active {
|
|
758
758
|
background-color: var(--active-option-color);
|
|
759
759
|
}
|
|
760
|
-
`,Oe],Ur([ue({attribute:!1})],Rr.prototype,"options",void 0),Ur([ue({type:String})],Rr.prototype,"placeholder",void 0),Ur([ue({type:String})],Rr.prototype,"value",void 0),Ur([de()],Rr.prototype,"activeOption",void 0),Ur([de()],Rr.prototype,"isOpen",void 0),Ur([de()],Rr.prototype,"activeOptionIndex",void 0),Ur([de()],Rr.prototype,"searchTerm",void 0),Ur([ce("#select",!0)],Rr.prototype,"meSelect",void 0),Ur([ce("#selectText",!0)],Rr.prototype,"selectInput",void 0),Rr=Ur([se("me-select")],Rr),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(Fr||(Fr={}));var Hr=n(2013),Gr=n.n(Hr);function zr(e){return ii(1,arguments),ri(e).getTime()<Date.now()}Math.pow(10,8);var Qr=6e4,Wr=36e5;function Vr(e,t){ii(1,arguments);var n=t||{},i=null==n.additionalDigits?2:vi(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=function(e){var t,n={},i=e.split(qr.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],qr.timeZoneDelimiter.test(n.date)&&(n.date=e.split(qr.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=qr.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e);if(o.date){var a=function(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)}}(o.date,i);r=function(e,t){if(null===t)return new Date(NaN);var n=e.match(Yr);if(!n)return new Date(NaN);var i=!!n[4],r=Zr(n[1]),o=Zr(n[2])-1,a=Zr(n[3]),s=Zr(n[4]),l=Zr(n[5])-1;if(i)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,o=7*(t-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+o),i}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(eo[t]||(to(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(to(e)?366:365)}(t,r)?(u.setUTCFullYear(t,o,Math.max(r,a)),u):new Date(NaN)}(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,l=r.getTime(),u=0;if(o.time&&(u=function(e){var t=e.match(Kr);if(!t)return NaN;var n=Jr(t[1]),i=Jr(t[2]),r=Jr(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,i,r))return NaN;return n*Wr+i*Qr+1e3*r}(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var d=new Date(l+u),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=function(e){if("Z"===e)return 0;var t=e.match(Xr);if(!t)return 0;var n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(i*Wr+r*Qr)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var qr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Yr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Kr=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Xr=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Zr(e){return e?parseInt(e):1}function Jr(e){return e&&parseFloat(e.replace(",","."))||0}var eo=[31,null,31,30,31,30,31,31,30,31,30,31];function to(e){return e%400==0||e%4==0&&e%100!=0}const no={buildingId:null,availabilities:{}},io=()=>{no.buildingId=null,no.availabilities={}},ro=async e=>{e&&(no.buildingId=e);const t=no.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=no.availabilities;if(n[t])return n[t];const i=rr(Date.now()),o=Br(function(e){ii(1,arguments);var t=ri(e);return t.setHours(23,59,59,999),t}(jr(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(Br(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return no.availabilities[t]=s.data,s.data},oo=async(e,t)=>{var n,i;const r=await ro(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},ao=async()=>{var e,t,n,i,r,o;return{[
|
|
760
|
+
`,Oe],Ur([ue({attribute:!1})],Rr.prototype,"options",void 0),Ur([ue({type:String})],Rr.prototype,"placeholder",void 0),Ur([ue({type:String})],Rr.prototype,"value",void 0),Ur([de()],Rr.prototype,"activeOption",void 0),Ur([de()],Rr.prototype,"isOpen",void 0),Ur([de()],Rr.prototype,"activeOptionIndex",void 0),Ur([de()],Rr.prototype,"searchTerm",void 0),Ur([ce("#select",!0)],Rr.prototype,"meSelect",void 0),Ur([ce("#selectText",!0)],Rr.prototype,"selectInput",void 0),Rr=Ur([se("me-select")],Rr),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(Fr||(Fr={}));var Hr=n(2013),Gr=n.n(Hr);function zr(e){return ii(1,arguments),ri(e).getTime()<Date.now()}Math.pow(10,8);var Qr=6e4,Wr=36e5;function Vr(e,t){ii(1,arguments);var n=t||{},i=null==n.additionalDigits?2:vi(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=function(e){var t,n={},i=e.split(qr.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],qr.timeZoneDelimiter.test(n.date)&&(n.date=e.split(qr.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=qr.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e);if(o.date){var a=function(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)}}(o.date,i);r=function(e,t){if(null===t)return new Date(NaN);var n=e.match(Yr);if(!n)return new Date(NaN);var i=!!n[4],r=Zr(n[1]),o=Zr(n[2])-1,a=Zr(n[3]),s=Zr(n[4]),l=Zr(n[5])-1;if(i)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,o=7*(t-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+o),i}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(eo[t]||(to(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(to(e)?366:365)}(t,r)?(u.setUTCFullYear(t,o,Math.max(r,a)),u):new Date(NaN)}(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,l=r.getTime(),u=0;if(o.time&&(u=function(e){var t=e.match(Kr);if(!t)return NaN;var n=Jr(t[1]),i=Jr(t[2]),r=Jr(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,i,r))return NaN;return n*Wr+i*Qr+1e3*r}(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var d=new Date(l+u),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=function(e){if("Z"===e)return 0;var t=e.match(Xr);if(!t)return 0;var n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(i*Wr+r*Qr)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var qr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Yr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Kr=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Xr=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Zr(e){return e?parseInt(e):1}function Jr(e){return e&&parseFloat(e.replace(",","."))||0}var eo=[31,null,31,30,31,30,31,31,30,31,30,31];function to(e){return e%400==0||e%4==0&&e%100!=0}const no={buildingId:null,availabilities:{}},io=()=>{no.buildingId=null,no.availabilities={}},ro=async e=>{e&&(no.buildingId=e);const t=no.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=no.availabilities;if(n[t])return n[t];const i=rr(Date.now()),o=Br(function(e){ii(1,arguments);var t=ri(e);return t.setHours(23,59,59,999),t}(jr(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(Br(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return no.availabilities[t]=s.data,s.data},oo=async(e,t)=>{var n,i;const r=await ro(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},ao=async()=>{var e,t,n,i,r,o;return{[ja.Guided]:!!(null===(t=null===(e=await oo(Fr.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[ja.Self]:!!(null===(i=null===(n=await oo(Fr.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[ja.Virtual]:!!(null===(o=null===(r=await oo(Fr.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}},so=async(e,t)=>{var n,i;const r=await oo(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter(e=>ai(Vr(e))&&!zr(Vr(e))):[])||void 0===n?void 0:n.map(e=>lo(e))};return Gr()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],e=>Ji(new Date(e.datetime),"yyyy-MM-dd"))},lo=e=>({datetime:e.slice(0,19),offset:e.slice(19)});var uo=n(3916),co=n.n(uo),ho=n(2485),po=n.n(ho);const fo=e=>`https://app.meetelise.com/platformApi/webchat/${e}/chat-ui-feature-flag`;var go;async function mo(e){if(!e)return!1;try{return(await r().get(fo(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-applications-link-replacement",default_str:null,default_bool:!1}})).data}catch(e){return!1}}!function(e){e.onAttributionFailure="on-attribution-failure",e.never="never",e.always="always"}(go||(go={}));async function yo(e){if(!e)return!1;try{const t=await r().get((e=>`https://app.meetelise.com/platformApi/webchat/${e}/tracked-rollout`)(e),{params:{rollout_name:"webchat_bedroom_preference_required",default_value:!1}});return t.data}catch(e){return!1}}function bo(){return vo()?function(){const e=window.location.search,t={},n=e.split("?").slice(1).join("&");return n.split("&").forEach(e=>{const[n,i]=e.split("=");n&&i&&(t[decodeURIComponent(n)]=decodeURIComponent(i))}),t}():function(){const e=new URLSearchParams(window.location.search),t=e.has("utm_content"),n=e.has("utm_source");if(t&&!n){const t=e.get("utm_content");e.delete("utm_content"),e.set("utm_source",t)}return Object.fromEntries(e)}()}const vo=()=>(window.location.search.match(/\?/g)||[]).length>1,wo=[57,2575,2332],Co=["email","phone","firstName","lastName","message","tourDetails"];let xo=!1;const $o=(e,t={})=>{window.dataLayer=window.dataLayer||[];let n=t;if(xo){n={...t};for(const e of Co)delete n[e]}window.dataLayer.push({event:e,...n})};class So extends me{constructor(e){if(super(e),this.it=F,e.type!==fe)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===F||null==e)return this.ft=void 0,this.it=e;if(e===j)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this.ft;this.it=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}So.directiveName="unsafeHTML",So.resultType=1;const Ao=ge(So),Eo=B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
761
761
|
<rect x="1" y="1" width="22" height="22" stroke="black" stroke-width="2" rx="2"/>
|
|
762
762
|
</svg>
|
|
763
763
|
`,To=(B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
|
|
@@ -949,6 +949,8 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
949
949
|
recorded and used by our service provider EliseAI to generate responses
|
|
950
950
|
and improve their services. You may withdraw your consent at any time by
|
|
951
951
|
unsubscribing or contacting us.
|
|
952
|
+
${e?R`Msg freq varies. Text STOP to opt-out of messages. Text HELP
|
|
953
|
+
for assistance.`:""}
|
|
952
954
|
</div>`:R` <div style=${Vn(ko)}>
|
|
953
955
|
By providing your email address and/or number and clicking send, you
|
|
954
956
|
consent to receive recurring commercial electronic messages and calls from
|
|
@@ -964,15 +966,17 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
964
966
|
recorded and used by our service provider EliseAI to generate responses
|
|
965
967
|
and improve their services. You may withdraw your consent at any time by
|
|
966
968
|
unsubscribing or contacting us.
|
|
969
|
+
${e?R`Msg freq varies. Text STOP to opt-out of messages. Text HELP for
|
|
970
|
+
assistance.`:""}
|
|
967
971
|
</div>`:e&&"greystar"===i?R`<div style=${Vn(ko)}>
|
|
968
972
|
By providing your phone number and clicking ${o}, you
|
|
969
|
-
consent to receive recurring marketing
|
|
973
|
+
consent to receive recurring marketing text and voice messages and calls
|
|
970
974
|
from Greystar or on its behalf at this number using artificial voice
|
|
971
975
|
and/or an autodialer. Messages may be AI or human-generated. Your phone
|
|
972
976
|
number and communications are shared with and recorded and used by
|
|
973
977
|
EliseAI. You are not required to provide your phone number or consent to
|
|
974
|
-
these terms to lease at this property. Msg & Data rates
|
|
975
|
-
consent to
|
|
978
|
+
these terms to lease at this property. Msg freq varies. Msg & Data rates
|
|
979
|
+
may apply. You consent to
|
|
976
980
|
<a
|
|
977
981
|
style=${Vn(_o)}
|
|
978
982
|
href="https://www.greystar.com/privacy"
|
|
@@ -987,14 +991,14 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
987
991
|
target="_blank"
|
|
988
992
|
rel="noopener noreferrer"
|
|
989
993
|
>EliseAI’s Privacy Policy</a
|
|
990
|
-
>.
|
|
994
|
+
>. Text STOP to opt-out of messages. Text HELP for assistance.
|
|
991
995
|
</div>`:e?R` <div style=${Vn(ko)}>
|
|
992
996
|
By providing your number and clicking ${o}, you consent
|
|
993
|
-
to receive recurring marketing
|
|
997
|
+
to receive recurring marketing text and voice messages and calls from or
|
|
994
998
|
on behalf of ${n} at this number using artificial voice or an
|
|
995
999
|
autodialer system. Messages may be AI or human generated. This consent is
|
|
996
|
-
not required to lease at this property. Msg & Data rates
|
|
997
|
-
consent to this
|
|
1000
|
+
not required to lease at this property. Msg freq varies. Msg & Data rates
|
|
1001
|
+
may apply. You consent to this
|
|
998
1002
|
<a
|
|
999
1003
|
style=${Vn(_o)}
|
|
1000
1004
|
href=${a}
|
|
@@ -1002,7 +1006,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1002
1006
|
rel="noopener noreferrer"
|
|
1003
1007
|
>privacy policy</a
|
|
1004
1008
|
>, including having your number and communications recorded and used by a
|
|
1005
|
-
third party.
|
|
1009
|
+
third party. Text STOP to opt-out of messages. Text HELP for assistance.
|
|
1006
1010
|
</div>`:t?R` <div style=${Vn(ko)}>
|
|
1007
1011
|
By entering your email and clicking ${o}, you consent to
|
|
1008
1012
|
this
|
|
@@ -1480,7 +1484,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
1480
1484
|
gap: 12px;
|
|
1481
1485
|
align-items: center;
|
|
1482
1486
|
}
|
|
1483
|
-
`;class Bo{constructor(e,t,n,i){this.org=e,this.building=t,this.chatId=n,this.incomingProcessedLeadSource=i,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}ping(e){var t;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:jo(),incomingProcessedLeadSource:this.incomingProcessedLeadSource,webchatVersion:null!==(t="MISSING_ENV_VAR".npm_package_version)&&void 0!==t?t:"1.20.155"})})}}const jo=()=>{var e,t,n,i,r,o;try{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,o=i.get("switch_cls[id]"),a=i.get("ilm"),s=i.get("utm_source");return{entrataCampaignSource:o,realpageCampaignSource:a,utmCampaignSource:s,yardiCampaignSource:r,bozzutoAdSource:Nr("bozzuto_ad_source")}}catch(e){const t=document.createElement("iframe");if(t.style.display="none",document.body.appendChild(t),!t.contentWindow)return{entrataCampaignSource:null,realpageCampaignSource:null,utmCampaignSource:null,yardiCampaignSource:null,bozzutoAdSource:null};const n=t.contentWindow.URL;if(!n)return{entrataCampaignSource:null,realpageCampaignSource:null,utmCampaignSource:null,yardiCampaignSource:null,bozzutoAdSource:null};const a=new n(window.location.href).searchParams,s=null!==(o=null===(r=null===(i=window.RCTPCampaign)||void 0===i?void 0:i.CampaignDetails)||void 0===r?void 0:r.Source)&&void 0!==o?o:null;return{entrataCampaignSource:a.get("switch_cls[id]"),realpageCampaignSource:a.get("ilm"),utmCampaignSource:a.get("utm_source"),yardiCampaignSource:s,bozzutoAdSource:Nr("bozzuto_ad_source")}}};var Fo;!function(e){e.error="error",e.info="info",e.warn="warn"}(Fo||(Fo={}));const Ho=async({logType:e,buildingSlug:t,orgSlug:n,logTitle:o,logData:a,error:s})=>{var l;if(s instanceof i.AxiosError&&403===(null===(l=s.response)||void 0===l?void 0:l.status))return;await r().post("https://app.meetelise.com/platformApi/webchat/logging",{...a},{headers:{"Content-Type":"application/json","building-slug":null!=t?t:"","org-slug":null!=n?n:"","log-type":null!=e?e:Fo.error,"log-title":o.toUpperCase().replace(/\s/g,"_")}})},Go=async({params:e,sampleRate:t})=>{try{if(Math.random()>=t)return;await r().post("https://app.meetelise.com/platformApi/webchat/log/signal",{...e,website_origin:window.location.origin,website_search:window.location.search})}catch(e){}};var zo=n(2193),Qo=n.n(zo);function Wo(e){return"avb"===e?"AVB Company Website":"windsor"===e?"Windsorcommunities.com":"property-website"}const Vo=class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.leadSourceParams=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=bo();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(jo()).filter(e=>e)},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t){if(!Ir(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Vr(t.timestamp)}}}const a={leadSource:t,leadSourceParams:this.leadSourceParams,leadId:n,buildingSlug:e,timestamp:Br(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Vr(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&&!Ir(Vr(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){}return n}}catch(e){return null}return null},this.resetLeadSource=()=>{if(!this.buildingSlug)return!1;const e="com.elise.webchat.leadsource.slug="+this.buildingSlug;return localStorage.removeItem(e),!0}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:t,referrer:n,campaignSources:i}){const o={query_params:t,building_slug:e,referrer:n,campaign_sources:i};try{return(await r().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,o)).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:t}){var n,i,o,a,s,l,u;try{if(!this.chatId)return null;if(!this.orgSlug)return 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===(n=window.dataLayer.find(e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)}))||void 0===n?void 0:n.value}}catch(e){}return await r().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:t,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(i=this.leadSourceInput)||void 0===i?void 0:i.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:Qo()(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){}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){var i,r,o;try{const a={queryParams:bo(),buildingSlug:n,referrer:document.referrer,campaignSources:jo()};let s=!1;const l=n?this.getLeadSourceBodyIfValid(n):null;if(l){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=l.leadSource,this.leadSourceParams=null!==(r=l.leadSourceParams)&&void 0!==r?r:null,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(a);if(!e)return this.leadSource=l.leadSource,this.leadSourceParams=null!==(i=l.leadSourceParams)&&void 0!==i?i:null,this.leadSource;this.leadSource=e,s=!0}}const u=await this.fetchCurrentParsedLeadSource(a);if(this.leadSource=u,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!u){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSourceParams=null!==(o=e.leadSourceParams)&&void 0!==o?o:null,this.leadSource}if(n){const t=!!u&&u.length>0;this.updateLeadSourceLocalStorage(n,u,e,!t&&!s,s)}return u}catch(e){}return null}},qo=async(e,t=!1)=>{const n=`https://app.meetelise.com/eliseCrmApi/building/${e}/scheduling_status?observe_dynamic_scheduling=${t}`;try{return(await r().get(n)).data.is_enabled}catch(e){return!1}};var Yo,Ko,Xo;!function(e){e.EMOJI="emoji",e.PILLS="pills",e.MINIMIZED="minimized"}(Yo||(Yo={})),function(e){e.UNKNOWN="UNKNOWN",e.SELF_GUIDED="SELF_GUIDED",e.VIRTUAL_SHOWING="VIRTUAL_SHOWING",e.WITH_AGENT="WITH_AGENT",e.MEDIA_TOUR="MEDIA_TOUR",e.OPEN_HOUSE_STUDIO="OPEN_HOUSE_STUDIO",e.OPEN_HOUSE_1BR="OPEN_HOUSE_1BR",e.OPEN_HOUSE_2BR="OPEN_HOUSE_2BR",e.OPEN_HOUSE_3BR="OPEN_HOUSE_3BR",e.OPEN_HOUSE_4BR="OPEN_HOUSE_4BR",e.OPEN_HOUSE_5BR="OPEN_HOUSE_5BR"}(Ko||(Ko={})),function(e){e.LINK="link",e.CLIENT_SCHEDULED="client_scheduled",e.SCHEDULED_BY_ME_MANAGED_BY_ME="scheduled_by_ME_managed_by_ME",e.SCHEDULED_BY_ME_MANAGED_BY_CLIENT="scheduled_by_ME_managed_by_client",e.SCHEDULED_BY_ME_MANAGED_BY_CONCIERGE="scheduled_by_ME_managed_by_concierge"}(Xo||(Xo={}));const Zo=(e,t)=>"link"===(null==t?void 0:t.toLowerCase());async function Jo(e,t){const n=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}/v2`,i=await r().get(n);return ea(i.data)}const ea=e=>{var t;try{e.welcomeMessage=ta(null!==(t=e.welcomeMessage)&&void 0!==t?t:"",e.userFirstName)}catch(e){}return e},ta=(e,t)=>e.replace(/elise/gi,t);var na=n(7035),ia=n(6353);function ra(e,t,n){var i=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if("timeZoneName"===n[i].type)return n[i].value}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}(i,t)}function oa(e,t){var n=function(e){if(!sa[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"06/25/2014 00:00:00"===t;sa[e]=n?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return sa[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=aa[n[r].type];o>=0&&(i[o]=parseInt(n[r].value,10))}return i}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}(n,e)}var aa={year:0,month:1,day:2,hour:3,minute:4,second:5};var sa={};function la(e,t,n,i,r,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(i,r,o,a),s}var ua=36e5,da={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ca(e,t,n){var i,r,o;if(!e)return 0;if(i=da.timezoneZ.exec(e))return 0;if(i=da.timezoneHH.exec(e))return pa(o=parseInt(i[1],10))?-o*ua:NaN;if(i=da.timezoneHHMM.exec(e)){o=parseInt(i[2],10);var a=parseInt(i[3],10);return pa(o,a)?(r=Math.abs(o)*ua+6e4*a,"+"===i[1]?-r:r):NaN}if(function(e){if(fa[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),fa[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return la(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=ha(s,e),u=n?l:function(e,t,n){var i=e.getTime(),r=i-t,o=ha(new Date(r),n);if(t===o)return t;r-=o-t;var a=ha(new Date(r),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function ha(e,t){var n=oa(e,t),i=la(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),o=r%1e3;return i-(r-=o>=0?o:1e3+o)}function pa(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var fa={};var ga={X:function(e,t,n,i){var r=ma(i.timeZone,e);if(0===r)return"Z";switch(t){case"X":return va(r);case"XXXX":case"XX":return ba(r);default:return ba(r,":")}},x:function(e,t,n,i){var r=ma(i.timeZone,e);switch(t){case"x":return va(r);case"xxxx":case"xx":return ba(r);default:return ba(r,":")}},O:function(e,t,n,i){var r=ma(i.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=t||"";return n+String(r)+a+ya(o,2)}(r,":");default:return"GMT"+ba(r,":")}},z:function(e,t,n,i){switch(t){case"z":case"zz":case"zzz":return ra("short",e,i);default:return ra("long",e,i)}}};function ma(e,t){var n=e?ca(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ya(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function ba(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+ya(Math.floor(r/60),2)+n+ya(Math.floor(r%60),2)}function va(e,t){return e%60==0?(e>0?"-":"+")+ya(Math.abs(e)/60,2):ba(e,t)}const wa=ga;var Ca=n(9784),xa=n(9720);var $a=36e5,Sa=6e4,Aa={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Ea(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},i=null==n.additionalDigits?2:Ca(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r=function(e){var t,n={},i=Aa.dateTimePattern.exec(e);i?(n.date=i[1],t=i[3]):(i=Aa.datePattern.exec(e))?(n.date=i[1],t=i[2]):(n.date=null,t=e);if(t){var r=Aa.timeZone.exec(t);r?(n.time=t.replace(r[1],""),n.timeZone=r[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,i=Aa.YYY[t],r=Aa.YYYYY[t];if(n=Aa.YYYY.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=Aa.YY.exec(e)||i.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(r.date,i),a=o.year,s=function(e,t){if(null===t)return null;var n,i,r,o;if(0===e.length)return(i=new Date(0)).setUTCFullYear(t),i;if(n=Aa.MM.exec(e))return i=new Date(0),Pa(t,r=parseInt(n[1],10)-1)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Aa.DDD.exec(e)){i=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Oa(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(i.setUTCFullYear(t,0,a),i):new Date(NaN)}if(n=Aa.MMDD.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Pa(t,r,s)?(i.setUTCFullYear(t,r,s),i):new Date(NaN)}if(n=Aa.Www.exec(e))return Ia(t,o=parseInt(n[1],10)-1)?Ta(t,o):new Date(NaN);if(n=Aa.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Ia(t,o,l)?Ta(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),d=0;if(r.time&&(d=function(e){var t,n,i;if(t=Aa.HH.exec(e))return Na(n=parseFloat(t[1].replace(",",".")))?n%24*$a:NaN;if(t=Aa.HHMM.exec(e))return Na(n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")))?n%24*$a+i*Sa:NaN;if(t=Aa.HHMMSS.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Na(n,i,r)?n%24*$a+i*Sa+1e3*r:NaN}return null}(r.time),isNaN(d)))return new Date(NaN);if(r.timeZone||n.timeZone){if(l=ca(r.timeZone||n.timeZone,new Date(u+d)),isNaN(l))return new Date(NaN)}else l=xa(new Date(u+d)),l=xa(new Date(u+d+l));return new Date(u+d+l)}return new Date(NaN)}function Ta(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*t+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}var ka=[31,28,31,30,31,30,31,31,30,31,30,31],_a=[31,29,31,30,31,30,31,31,30,31,30,31];function Oa(e){return e%400==0||e%4==0&&e%100!=0}function Pa(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var i=Oa(e);if(i&&n>_a[t])return!1;if(!i&&n>ka[t])return!1}return!0}function Ia(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function Na(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var Ma=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Da(e,t,n,i){var r=na(i);return r.timeZone=t,r.originalDate=e,function(e,t,n){var i=String(t),r=n||{},o=i.match(Ma);if(o){var a=Ea(r.originalDate||e,r);i=o.reduce(function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),i="'"===e[n-1],o=e.replace(t,"'"+wa[t[0]](a,t,null,r)+"'");return i?o.substring(0,n-1)+o.substring(n+1):o},i)}return ia(e,i,r)}(function(e,t,n){var i=Ea(e,n),r=ca(t,i,!0),o=new Date(i.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}(e,t),n,r)}const La=async({buildingSlug:e})=>{try{const t=await r().get(`${Sr}/platformApi/webchat/${e}/units/summary`);if(t.data)return Er(t.data)}catch(t){Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_GETTING_UNITS_SUMMARY]",logData:{error:t},error:t})}return[]};var Ua=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 Ra=class extends oe{constructor(){super(...arguments),this.tourTypeOptions=[],this.layoutOptions=[],this.chatId="",this.buildingId=0,this.orgId=0,this.leadSourceParams=null,this.buildingSlug="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.selfGuidedTourEnabled=!1,this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.orgSlug="",this.hasDynamicSchedulingEnabled=!1,this.bedroomPreferenceRequired=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingName="",this.tourType=null,this.shouldShowTourType={[Ba.Guided]:!0,[Ba.Self]:!0,[Ba.Virtual]:!0},this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneCountry=null,this.phoneNumberIsValid=!1,this.phoneNumberHasBlurred=!1,this.availabilitiesGroupedByDay={},this.calendarTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.shouldAllowScheduling=!1,this.shouldAllowScheduleLoading=!0,this.promptForReschedule=!1,this.canceledReschedule=!1,this.leadSources=[],this.orgLegalName="",this.country=null,this.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.primaryColor=qn,this.foregroundColorOnPrimaryBackgroundColor="white",this.firstNameInputValue="",this.lastNameInputValue="",this.leadSourceInputValue="",this.selectedLayoutValue="",this.selectedUnitValue="",this.units=[],this.allowOccupiedUnitTours=!1,this.errorGettingAvailabilities=!1,this.centralConvoBuildings=[],this.isGeneralBuilding=!1,this.statusMessage="",this._setAvailabilities=async()=>{try{const[e,t]=await Promise.all([qo(this.buildingId,this.hasDynamicSchedulingEnabled),ao()]);this.shouldAllowScheduling=e,this.shouldAllowScheduleLoading=!1,this.calendarTimeZone=await(async e=>{var t;return null!==(t=(await ro(e)).calendarTimeZone)&&void 0!==t?t:Intl.DateTimeFormat().resolvedOptions().timeZone})(this.buildingId),Ho({logTitle:"AVAILABILITIES_EXIST_FOR_TOUR_TYPE",logData:t,logType:Fo.info,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});const n=Object.values(t).every(e=>!1===e),i=!this.sgtUrl&&!this.escortedToursLink&&!this.virtualToursLink;if(n&&i)return this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,void Ho({logTitle:"NO_AVAILABILITIES_EXIST",logData:null,logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});this.shouldShowTourType={[Ba.Guided]:this.tourTypeOptions.map(e=>e.value).includes("WITH_AGENT")&&(t[Ba.Guided]||!!this.escortedToursLink),[Ba.Self]:this.tourTypeOptions.map(e=>e.value).includes("SELF_GUIDED")&&(t[Ba.Self]||!!this.sgtUrl),[Ba.Virtual]:this.tourTypeOptions.map(e=>e.value).includes("VIRTUAL_SHOWING")&&(t[Ba.Virtual]||!!this.virtualToursLink)};const r=1===Object.values(this.shouldShowTourType).reduce((e,t)=>!0===t?e+1:e,0);if(this._setDefaultSelectedDateAndTimes(),r&&(this.tourType=Object.keys(this.shouldShowTourType).find(e=>this.shouldShowTourType[e])),null===this.tourType)return void(this.waitingForAvailabilities=!1);this.availabilitiesGroupedByDay=await so(ja[this.tourType]),this.waitingForAvailabilities=!1}catch(e){this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,Ho({logTitle:"ERROR_LOADING_AVAILABILITIES",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this._setDefaultSelectedDateAndTimes=async(e,t)=>{var n,i,r;const o=await ro(this.buildingId),a=null!=e?e:this._getHighestRankedTourType(o),s=a?null===(r=null===(i=null===(n=o.availability)||void 0===n?void 0:n[a])||void 0===i?void 0:i.availableTourStartTimes)||void 0===r?void 0:r.filter(e=>{if(!t)return!0;return or("string"==typeof e?Vr(e):e,t)}):[],l=null==s?void 0:s[0];a&&l&&a!==Fr.Unknown&&a!==Fr.MediaTour&&(this.selectedDate=rr("string"==typeof l?Vr(l):l),this.tourType=Fa[a],this.selectedTime="string"==typeof l?lo(l):(e=>({datetime:Ji(e,"yyyy-MM-dd'T'HH:mm:ss"),offset:Ji(e,"xxx")}))(l))},this._getHighestRankedTourType=e=>{var t;const n=(null!==(t=e.rankOrderedSupportedTourTypes)&&void 0!==t?t:[]).map(t=>{var n,i;return{tourType:t,availabilities:null===(i=null===(n=e.availability)||void 0===n?void 0:n[t])||void 0===i?void 0:i.availableTourStartTimes}}).filter(e=>{if(e.tourType===Fr.Unknown||e.tourType===Fr.MediaTour)return!1;const t=Fa[e.tourType],n=this._getTourTypeOffered(t);return!!n&&(!Zo(0,n)&&e.availabilities&&e.availabilities.length>0)}),i=n[0];return i?i.tourType:null},this._getTourTypeOffered=e=>e===Ba.Guided?this.escortedToursTypeOffered:e===Ba.Self?this.selfGuidedToursTypeOffered:e===Ba.Virtual?this.virtualToursTypeOffered:null,this._getUnitOptions=()=>{const e=this.selectedLayoutValue?this.units.filter(e=>Ga(10*e.numberOfBedrooms)===this.selectedLayoutValue):this.units,t=e.map(e=>({label:e.unitNumber,value:e.unitNumber}));return t},this._fetchUnits=async()=>{if(this.buildingSlug)try{this.units=await La({buildingSlug:this.buildingSlug})}catch(e){this.units=[],Ho({logTitle:"ERROR_LOADING_UNITS_FOR_TOUR_SCHEDULER",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.firstUpdated=async()=>{if(await this._fetchCentralConvoBuildings(),this.isGeneralBuilding)return this.waitingForAvailabilities=!1,this.shouldAllowScheduleLoading=!1,void(this.statusMessage="Please select a building to see tour availabilities.");await this._loadForCurrentBuilding()},this._loadForCurrentBuilding=async()=>{try{await ro(this.buildingId)}catch(e){}await Promise.all([this._setAvailabilities().then(async()=>{try{const e=await ro(this.buildingId);this.allowOccupiedUnitTours=!!e.allowOccupiedUnitTours}catch(e){this.allowOccupiedUnitTours=!1}}),this._fetchUnits()])},this._fetchCentralConvoBuildings=async()=>{if(this.orgSlug&&this.buildingSlug)try{const e=await async function(e,t){var n,i;const o=(await r().get("https://app.meetelise.com/platformApi/webchat/central-convo-buildings-v2",{headers:{"building-slug":t,"org-slug":e}})).data;return{is_general_building:null!==(n=null==o?void 0:o.is_general_building)&&void 0!==n&&n,buildings:null!==(i=null==o?void 0:o.buildings)&&void 0!==i?i:[]}}(this.orgSlug,this.buildingSlug);this.centralConvoBuildings=e.buildings,this.isGeneralBuilding=e.is_general_building}catch(e){this.centralConvoBuildings=[],this.isGeneralBuilding=!1}},this._onBuildingChange=async()=>{var e;const t=null===(e=this.selectedBuildingEl)||void 0===e?void 0:e.value;if(!t||t===this.buildingSlug)return;const n=this.centralConvoBuildings.find(e=>e.slug===t);if(n){this.isGeneralBuilding=!1,this.waitingForAvailabilities=!0,this.errorGettingAvailabilities=!1,this.tourType=null,this.selectedDate=void 0,this.selectedTime=void 0,this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.units=[],this.selectedLayoutValue="",this.selectedUnitValue="",this.buildingId=n.building_id,this.buildingSlug=n.slug,this.buildingName=n.name,this.statusMessage=`Loading tours for ${n.name}…`,$o("tourBuildingSelected",{buildingId:n.building_id});try{const e=await Jo(this.orgSlug,n.slug);this.sgtUrl=e.sgtUrl,this.selfGuidedToursTypeOffered=e.selfGuidedToursTypeOffered,this.selfGuidedTourEnabled=e.isSelfGuidedTourEnabled,this.escortedToursLink=e.escortedToursLink,this.escortedToursTypeOffered=e.escortedToursTypeOffered,this.virtualToursLink=e.virtualToursLink,this.virtualToursTypeOffered=e.virtualToursTypeOffered,this.tourTypeOptions=e.tourTypeOptions.map(e=>({label:e.label,value:e.value})),this.hasDynamicSchedulingEnabled=e.usesDynamicScheduling}catch(e){}if(await this._loadForCurrentBuilding(),!this.shouldAllowScheduling||this.errorGettingAvailabilities)this.statusMessage=`No tour availabilities for ${n.name}.`;else{const e=Object.values(this.shouldShowTourType).filter(Boolean).length;this.statusMessage=`Showing tours for ${n.name}. ${e} tour type${1===e?"":"s"} available.`}}},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await so(ja[this.tourType]))},this.onChangePhoneNumber=e=>{this.phoneNumber=e.detail.formattedValue,this.phoneNumberE164=e.detail.e164,this.phoneCountry=e.detail.country,this.phoneNumberIsValid=e.detail.isValid},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n,i;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&Mr(null!==(i=null===(n=this.emailInput)||void 0===n?void 0:n.value)&&void 0!==i?i:"")&&!!this.phoneNumber&&!!this.phoneNumberE164},layout:()=>!this.bedroomPreferenceRequired||!!this.selectedLayoutValue},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo()&&this.validators.layout(),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,t,n,i,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x,$;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const S=this.phoneNumberE164;if(!S)return void(this.phoneNumberIsValid=!1);const A=new URLSearchParams(window.location.search);let E=null;E=this.selectedLeadSource&&this.selectedLeadSource.value&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:this.leadSourceInputValue&&this.leadSourceInputValue.length>0?this.leadSourceInputValue:this.currentLeadSource;const T=[...new Set(E?[E,"property-website"]:["property-website"])];this.firstNameInput&&(this.firstNameInputValue=this.firstNameInput.value),this.lastNameInput&&(this.lastNameInputValue=this.lastNameInput.value),this.leadSourceInputValue=E;const k=(null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||this.selectedLayoutValue||null,_=(null===(t=this.selectedUnitEl)||void 0===t?void 0:t.value)||this.selectedUnitValue||null;$o("scheduleTourSubmitted",{email:this.email,phone:S,firstName:null!==(i=null===(n=this.firstNameInput)||void 0===n?void 0:n.value)&&void 0!==i?i:this.firstNameInputValue,lastName:null!==(a=null===(o=this.lastNameInput)||void 0===o?void 0:o.value)&&void 0!==a?a:this.lastNameInputValue,tourType:Ha[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,originatingSource:T.find(e=>"property-website"!==e)||null,layout:k,unit:_,conversationTrackingId:null!==(l=null===(s=this.leadSourceClient)||void 0===s?void 0:s.chatId)&&void 0!==l?l:null});const O={referrer:document.referrer,email_address:this.email,phone_number:S,building_id:this.buildingId,first_name:null!==(d=null===(u=this.firstNameInput)||void 0===u?void 0:u.value)&&void 0!==d?d:this.firstNameInputValue,last_name:null!==(h=null===(c=this.lastNameInput)||void 0===c?void 0:c.value)&&void 0!==h?h:this.lastNameInputValue,tour_type:Ha[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,cancel_existing_tours:this.promptForReschedule,lead_sources:[...new Set(E?[E,Wo(this.orgSlug)]:[Wo(this.orgSlug)])],query_params:Object.fromEntries(A.entries()),conversation_tracking_id:null===(p=this.leadSourceClient)||void 0===p?void 0:p.chatId,layouts:k?[k]:void 0,unit_numbers:_?[_]:void 0,lead_sources_with_timestamps:(null!==(m=null===(f=this.leadSourceMultitouchClient)||void 0===f?void 0:f.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(g=this.selectedLeadSource)||void 0===g?void 0:g.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}))&&void 0!==m?m:[]).map(e=>Tr({...e}))};this.isSubmitting=!0;try{await r().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",O,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE","org-slug":this.orgSlug}}),null===(y=this.leadSourceClient)||void 0===y||y.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(b=this.leadSourceClient)||void 0===b||b.resetLeadSource(),null===(v=this.leadSourceMultitouchClient)||void 0===v||v.resetLeadSourceTouchpoints(),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e,n=(null===(C=null===(w=t.response)||void 0===w?void 0:w.data)||void 0===C?void 0:C.detail)||"Failed to book tour";if(t.response&&t.response.headers&&t.response.headers["funnel-prospect-conflicting-appointment-error"]){if(this.selectedDate&&this.selectedTime){const e=this.availabilitiesGroupedByDay[Ji(this.selectedDate,"yyyy-MM-dd")];e&&(this.availabilitiesGroupedByDay[Ji(this.selectedDate,"yyyy-MM-dd")]=e.filter(e=>e!==this.selectedTime))}}else{if(409===(null===(x=t.response)||void 0===x?void 0:x.status)&&!this.promptForReschedule&&"User already has a tour scheduled for this building"===n)return this.promptForReschedule=!0,this.isSubmitting=!1,void(this.tourIsBooked=!1);if(409===(null===($=t.response)||void 0===$?void 0:$.status)&&!this.promptForReschedule)return this.isSubmitting=!1,this.tourIsBooked=!1,io(),this.availabilitiesGroupedByDay=await so(ja[this.tourType],this.buildingId),void alert("This timeslot is no longer available. Please select a different time.")}alert(n),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>R`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>R`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>R` <action-confirm-button
|
|
1487
|
+
`;class Bo{constructor(e,t,n,i){this.org=e,this.building=t,this.chatId=n,this.incomingProcessedLeadSource=i,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}ping(e){var t;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:jo(),incomingProcessedLeadSource:this.incomingProcessedLeadSource,webchatVersion:null!==(t="MISSING_ENV_VAR".npm_package_version)&&void 0!==t?t:"1.20.155"})})}}const jo=()=>{var e,t,n,i,r,o;try{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,o=i.get("switch_cls[id]"),a=i.get("ilm"),s=i.get("utm_source");return{entrataCampaignSource:o,realpageCampaignSource:a,utmCampaignSource:s,yardiCampaignSource:r,bozzutoAdSource:Nr("bozzuto_ad_source")}}catch(e){const t=document.createElement("iframe");if(t.style.display="none",document.body.appendChild(t),!t.contentWindow)return{entrataCampaignSource:null,realpageCampaignSource:null,utmCampaignSource:null,yardiCampaignSource:null,bozzutoAdSource:null};const n=t.contentWindow.URL;if(!n)return{entrataCampaignSource:null,realpageCampaignSource:null,utmCampaignSource:null,yardiCampaignSource:null,bozzutoAdSource:null};const a=new n(window.location.href).searchParams,s=null!==(o=null===(r=null===(i=window.RCTPCampaign)||void 0===i?void 0:i.CampaignDetails)||void 0===r?void 0:r.Source)&&void 0!==o?o:null;return{entrataCampaignSource:a.get("switch_cls[id]"),realpageCampaignSource:a.get("ilm"),utmCampaignSource:a.get("utm_source"),yardiCampaignSource:s,bozzutoAdSource:Nr("bozzuto_ad_source")}}};var Fo;!function(e){e.error="error",e.info="info",e.warn="warn"}(Fo||(Fo={}));const Ho=async({logType:e,buildingSlug:t,orgSlug:n,logTitle:o,logData:a,error:s})=>{var l;if(s instanceof i.AxiosError&&403===(null===(l=s.response)||void 0===l?void 0:l.status))return;await r().post("https://app.meetelise.com/platformApi/webchat/logging",{...a},{headers:{"Content-Type":"application/json","building-slug":null!=t?t:"","org-slug":null!=n?n:"","log-type":null!=e?e:Fo.error,"log-title":o.toUpperCase().replace(/\s/g,"_")}})},Go=async({params:e,sampleRate:t})=>{try{if(Math.random()>=t)return;await r().post("https://app.meetelise.com/platformApi/webchat/log/signal",{...e,website_origin:window.location.origin,website_search:window.location.search})}catch(e){}};var zo=n(2193),Qo=n.n(zo);function Wo(e){return"avb"===e?"AVB Company Website":"windsor"===e?"Windsorcommunities.com":"property-website"}const Vo=class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.leadSourceParams=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=bo();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(jo()).filter(e=>e)},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t){if(!Ir(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Vr(t.timestamp)}}}const a={leadSource:t,leadSourceParams:this.leadSourceParams,leadId:n,buildingSlug:e,timestamp:Br(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Vr(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&&!Ir(Vr(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){}return n}}catch(e){return null}return null},this.resetLeadSource=()=>{if(!this.buildingSlug)return!1;const e="com.elise.webchat.leadsource.slug="+this.buildingSlug;return localStorage.removeItem(e),!0}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:t,referrer:n,campaignSources:i}){const o={query_params:t,building_slug:e,referrer:n,campaign_sources:i};try{return(await r().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,o)).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:t}){var n,i,o,a,s,l,u;try{if(!this.chatId)return null;if(!this.orgSlug)return 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===(n=window.dataLayer.find(e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)}))||void 0===n?void 0:n.value}}catch(e){}return await r().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:t,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(i=this.leadSourceInput)||void 0===i?void 0:i.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:Qo()(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){}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){var i,r,o;try{const a={queryParams:bo(),buildingSlug:n,referrer:document.referrer,campaignSources:jo()};let s=!1;const l=n?this.getLeadSourceBodyIfValid(n):null;if(l){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=l.leadSource,this.leadSourceParams=null!==(r=l.leadSourceParams)&&void 0!==r?r:null,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(a);if(!e)return this.leadSource=l.leadSource,this.leadSourceParams=null!==(i=l.leadSourceParams)&&void 0!==i?i:null,this.leadSource;this.leadSource=e,s=!0}}const u=await this.fetchCurrentParsedLeadSource(a);if(this.leadSource=u,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!u){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSourceParams=null!==(o=e.leadSourceParams)&&void 0!==o?o:null,this.leadSource}if(n){const t=!!u&&u.length>0;this.updateLeadSourceLocalStorage(n,u,e,!t&&!s,s)}return u}catch(e){}return null}},qo=async(e,t=!1)=>{const n=`https://app.meetelise.com/eliseCrmApi/building/${e}/scheduling_status?observe_dynamic_scheduling=${t}`;try{return(await r().get(n)).data.is_enabled}catch(e){return!1}};var Yo,Ko,Xo;!function(e){e.EMOJI="emoji",e.PILLS="pills",e.MINIMIZED="minimized"}(Yo||(Yo={})),function(e){e.UNKNOWN="UNKNOWN",e.SELF_GUIDED="SELF_GUIDED",e.VIRTUAL_SHOWING="VIRTUAL_SHOWING",e.WITH_AGENT="WITH_AGENT",e.MEDIA_TOUR="MEDIA_TOUR",e.OPEN_HOUSE_STUDIO="OPEN_HOUSE_STUDIO",e.OPEN_HOUSE_1BR="OPEN_HOUSE_1BR",e.OPEN_HOUSE_2BR="OPEN_HOUSE_2BR",e.OPEN_HOUSE_3BR="OPEN_HOUSE_3BR",e.OPEN_HOUSE_4BR="OPEN_HOUSE_4BR",e.OPEN_HOUSE_5BR="OPEN_HOUSE_5BR"}(Ko||(Ko={})),function(e){e.LINK="link",e.CLIENT_SCHEDULED="client_scheduled",e.SCHEDULED_BY_ME_MANAGED_BY_ME="scheduled_by_ME_managed_by_ME",e.SCHEDULED_BY_ME_MANAGED_BY_CLIENT="scheduled_by_ME_managed_by_client",e.SCHEDULED_BY_ME_MANAGED_BY_CONCIERGE="scheduled_by_ME_managed_by_concierge"}(Xo||(Xo={}));const Zo=(e,t)=>"link"===(null==t?void 0:t.toLowerCase());async function Jo(e,t){const n=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}/v2`,i=await r().get(n);return ea(i.data)}const ea=e=>{var t;try{e.welcomeMessage=ta(null!==(t=e.welcomeMessage)&&void 0!==t?t:"",e.userFirstName)}catch(e){}return e},ta=(e,t)=>e.replace(/elise/gi,t);var na=n(7035),ia=n(6353);function ra(e,t,n){var i=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if("timeZoneName"===n[i].type)return n[i].value}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}(i,t)}function oa(e,t){var n=function(e){if(!sa[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"06/25/2014 00:00:00"===t;sa[e]=n?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return sa[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=aa[n[r].type];o>=0&&(i[o]=parseInt(n[r].value,10))}return i}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}(n,e)}var aa={year:0,month:1,day:2,hour:3,minute:4,second:5};var sa={};function la(e,t,n,i,r,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(i,r,o,a),s}var ua=36e5,da={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ca(e,t,n){var i,r,o;if(!e)return 0;if(i=da.timezoneZ.exec(e))return 0;if(i=da.timezoneHH.exec(e))return pa(o=parseInt(i[1],10))?-o*ua:NaN;if(i=da.timezoneHHMM.exec(e)){o=parseInt(i[2],10);var a=parseInt(i[3],10);return pa(o,a)?(r=Math.abs(o)*ua+6e4*a,"+"===i[1]?-r:r):NaN}if(function(e){if(fa[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),fa[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return la(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=ha(s,e),u=n?l:function(e,t,n){var i=e.getTime(),r=i-t,o=ha(new Date(r),n);if(t===o)return t;r-=o-t;var a=ha(new Date(r),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function ha(e,t){var n=oa(e,t),i=la(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),o=r%1e3;return i-(r-=o>=0?o:1e3+o)}function pa(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var fa={};var ga={X:function(e,t,n,i){var r=ma(i.timeZone,e);if(0===r)return"Z";switch(t){case"X":return va(r);case"XXXX":case"XX":return ba(r);default:return ba(r,":")}},x:function(e,t,n,i){var r=ma(i.timeZone,e);switch(t){case"x":return va(r);case"xxxx":case"xx":return ba(r);default:return ba(r,":")}},O:function(e,t,n,i){var r=ma(i.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=t||"";return n+String(r)+a+ya(o,2)}(r,":");default:return"GMT"+ba(r,":")}},z:function(e,t,n,i){switch(t){case"z":case"zz":case"zzz":return ra("short",e,i);default:return ra("long",e,i)}}};function ma(e,t){var n=e?ca(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ya(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function ba(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+ya(Math.floor(r/60),2)+n+ya(Math.floor(r%60),2)}function va(e,t){return e%60==0?(e>0?"-":"+")+ya(Math.abs(e)/60,2):ba(e,t)}const wa=ga;var Ca=n(9784),xa=n(9720);var $a=36e5,Sa=6e4,Aa={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Ea(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},i=null==n.additionalDigits?2:Ca(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r=function(e){var t,n={},i=Aa.dateTimePattern.exec(e);i?(n.date=i[1],t=i[3]):(i=Aa.datePattern.exec(e))?(n.date=i[1],t=i[2]):(n.date=null,t=e);if(t){var r=Aa.timeZone.exec(t);r?(n.time=t.replace(r[1],""),n.timeZone=r[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,i=Aa.YYY[t],r=Aa.YYYYY[t];if(n=Aa.YYYY.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=Aa.YY.exec(e)||i.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(r.date,i),a=o.year,s=function(e,t){if(null===t)return null;var n,i,r,o;if(0===e.length)return(i=new Date(0)).setUTCFullYear(t),i;if(n=Aa.MM.exec(e))return i=new Date(0),Pa(t,r=parseInt(n[1],10)-1)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Aa.DDD.exec(e)){i=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Oa(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(i.setUTCFullYear(t,0,a),i):new Date(NaN)}if(n=Aa.MMDD.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Pa(t,r,s)?(i.setUTCFullYear(t,r,s),i):new Date(NaN)}if(n=Aa.Www.exec(e))return Ia(t,o=parseInt(n[1],10)-1)?Ta(t,o):new Date(NaN);if(n=Aa.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Ia(t,o,l)?Ta(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),d=0;if(r.time&&(d=function(e){var t,n,i;if(t=Aa.HH.exec(e))return Na(n=parseFloat(t[1].replace(",",".")))?n%24*$a:NaN;if(t=Aa.HHMM.exec(e))return Na(n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")))?n%24*$a+i*Sa:NaN;if(t=Aa.HHMMSS.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Na(n,i,r)?n%24*$a+i*Sa+1e3*r:NaN}return null}(r.time),isNaN(d)))return new Date(NaN);if(r.timeZone||n.timeZone){if(l=ca(r.timeZone||n.timeZone,new Date(u+d)),isNaN(l))return new Date(NaN)}else l=xa(new Date(u+d)),l=xa(new Date(u+d+l));return new Date(u+d+l)}return new Date(NaN)}function Ta(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*t+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}var ka=[31,28,31,30,31,30,31,31,30,31,30,31],_a=[31,29,31,30,31,30,31,31,30,31,30,31];function Oa(e){return e%400==0||e%4==0&&e%100!=0}function Pa(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var i=Oa(e);if(i&&n>_a[t])return!1;if(!i&&n>ka[t])return!1}return!0}function Ia(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function Na(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var Ma=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Da(e,t,n,i){var r=na(i);return r.timeZone=t,r.originalDate=e,function(e,t,n){var i=String(t),r=n||{},o=i.match(Ma);if(o){var a=Ea(r.originalDate||e,r);i=o.reduce(function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),i="'"===e[n-1],o=e.replace(t,"'"+wa[t[0]](a,t,null,r)+"'");return i?o.substring(0,n-1)+o.substring(n+1):o},i)}return ia(e,i,r)}(function(e,t,n){var i=Ea(e,n),r=ca(t,i,!0),o=new Date(i.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}(e,t),n,r)}const La="com.eliseai.webchat.googlereserve.referral",Ua=async({buildingSlug:e})=>{try{const t=await r().get(`${Sr}/platformApi/webchat/${e}/units/summary`);if(t.data)return Er(t.data)}catch(t){Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_GETTING_UNITS_SUMMARY]",logData:{error:t},error:t})}return[]};var Ra=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 Ba=class extends oe{constructor(){super(...arguments),this.tourTypeOptions=[],this.layoutOptions=[],this.chatId="",this.buildingId=0,this.orgId=0,this.leadSourceParams=null,this.buildingSlug="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.selfGuidedTourEnabled=!1,this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.orgSlug="",this.hasDynamicSchedulingEnabled=!1,this.bedroomPreferenceRequired=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingName="",this.tourType=null,this.shouldShowTourType={[ja.Guided]:!0,[ja.Self]:!0,[ja.Virtual]:!0},this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneCountry=null,this.phoneNumberIsValid=!1,this.phoneNumberHasBlurred=!1,this.availabilitiesGroupedByDay={},this.calendarTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.shouldAllowScheduling=!1,this.shouldAllowScheduleLoading=!0,this.promptForReschedule=!1,this.canceledReschedule=!1,this.leadSources=[],this.orgLegalName="",this.country=null,this.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.primaryColor=qn,this.foregroundColorOnPrimaryBackgroundColor="white",this.firstNameInputValue="",this.lastNameInputValue="",this.leadSourceInputValue="",this.selectedLayoutValue="",this.selectedUnitValue="",this.units=[],this.allowOccupiedUnitTours=!1,this.errorGettingAvailabilities=!1,this.centralConvoBuildings=[],this.isGeneralBuilding=!1,this.statusMessage="",this._setAvailabilities=async()=>{try{const[e,t]=await Promise.all([qo(this.buildingId,this.hasDynamicSchedulingEnabled),ao()]);this.shouldAllowScheduling=e,this.shouldAllowScheduleLoading=!1,this.calendarTimeZone=await(async e=>{var t;return null!==(t=(await ro(e)).calendarTimeZone)&&void 0!==t?t:Intl.DateTimeFormat().resolvedOptions().timeZone})(this.buildingId),Ho({logTitle:"AVAILABILITIES_EXIST_FOR_TOUR_TYPE",logData:t,logType:Fo.info,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});const n=Object.values(t).every(e=>!1===e),i=!this.sgtUrl&&!this.escortedToursLink&&!this.virtualToursLink;if(n&&i)return this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,void Ho({logTitle:"NO_AVAILABILITIES_EXIST",logData:null,logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});this.shouldShowTourType={[ja.Guided]:this.tourTypeOptions.map(e=>e.value).includes("WITH_AGENT")&&(t[ja.Guided]||!!this.escortedToursLink),[ja.Self]:this.tourTypeOptions.map(e=>e.value).includes("SELF_GUIDED")&&(t[ja.Self]||!!this.sgtUrl),[ja.Virtual]:this.tourTypeOptions.map(e=>e.value).includes("VIRTUAL_SHOWING")&&(t[ja.Virtual]||!!this.virtualToursLink)};const r=1===Object.values(this.shouldShowTourType).reduce((e,t)=>!0===t?e+1:e,0);if(this._setDefaultSelectedDateAndTimes(),r&&(this.tourType=Object.keys(this.shouldShowTourType).find(e=>this.shouldShowTourType[e])),null===this.tourType)return void(this.waitingForAvailabilities=!1);this.availabilitiesGroupedByDay=await so(Fa[this.tourType]),this.waitingForAvailabilities=!1}catch(e){this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,Ho({logTitle:"ERROR_LOADING_AVAILABILITIES",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this._setDefaultSelectedDateAndTimes=async(e,t)=>{var n,i,r;const o=await ro(this.buildingId),a=null!=e?e:this._getHighestRankedTourType(o),s=a?null===(r=null===(i=null===(n=o.availability)||void 0===n?void 0:n[a])||void 0===i?void 0:i.availableTourStartTimes)||void 0===r?void 0:r.filter(e=>{if(!t)return!0;return or("string"==typeof e?Vr(e):e,t)}):[],l=null==s?void 0:s[0];a&&l&&a!==Fr.Unknown&&a!==Fr.MediaTour&&(this.selectedDate=rr("string"==typeof l?Vr(l):l),this.tourType=Ha[a],this.selectedTime="string"==typeof l?lo(l):(e=>({datetime:Ji(e,"yyyy-MM-dd'T'HH:mm:ss"),offset:Ji(e,"xxx")}))(l))},this._getHighestRankedTourType=e=>{var t;const n=(null!==(t=e.rankOrderedSupportedTourTypes)&&void 0!==t?t:[]).map(t=>{var n,i;return{tourType:t,availabilities:null===(i=null===(n=e.availability)||void 0===n?void 0:n[t])||void 0===i?void 0:i.availableTourStartTimes}}).filter(e=>{if(e.tourType===Fr.Unknown||e.tourType===Fr.MediaTour)return!1;const t=Ha[e.tourType],n=this._getTourTypeOffered(t);return!!n&&(!Zo(0,n)&&e.availabilities&&e.availabilities.length>0)}),i=n[0];return i?i.tourType:null},this._getTourTypeOffered=e=>e===ja.Guided?this.escortedToursTypeOffered:e===ja.Self?this.selfGuidedToursTypeOffered:e===ja.Virtual?this.virtualToursTypeOffered:null,this._getUnitOptions=()=>{const e=this.selectedLayoutValue?this.units.filter(e=>za(10*e.numberOfBedrooms)===this.selectedLayoutValue):this.units,t=e.map(e=>({label:e.unitNumber,value:e.unitNumber}));return t},this._fetchUnits=async()=>{if(this.buildingSlug)try{this.units=await Ua({buildingSlug:this.buildingSlug})}catch(e){this.units=[],Ho({logTitle:"ERROR_LOADING_UNITS_FOR_TOUR_SCHEDULER",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.firstUpdated=async()=>{if(await this._fetchCentralConvoBuildings(),this.isGeneralBuilding)return this.waitingForAvailabilities=!1,this.shouldAllowScheduleLoading=!1,void(this.statusMessage="Please select a building to see tour availabilities.");await this._loadForCurrentBuilding()},this._loadForCurrentBuilding=async()=>{try{await ro(this.buildingId)}catch(e){}await Promise.all([this._setAvailabilities().then(async()=>{try{const e=await ro(this.buildingId);this.allowOccupiedUnitTours=!!e.allowOccupiedUnitTours}catch(e){this.allowOccupiedUnitTours=!1}}),this._fetchUnits()])},this._fetchCentralConvoBuildings=async()=>{if(this.orgSlug&&this.buildingSlug)try{const e=await async function(e,t){var n,i;const o=(await r().get("https://app.meetelise.com/platformApi/webchat/central-convo-buildings-v2",{headers:{"building-slug":t,"org-slug":e}})).data;return{is_general_building:null!==(n=null==o?void 0:o.is_general_building)&&void 0!==n&&n,buildings:null!==(i=null==o?void 0:o.buildings)&&void 0!==i?i:[]}}(this.orgSlug,this.buildingSlug);this.centralConvoBuildings=e.buildings,this.isGeneralBuilding=e.is_general_building}catch(e){this.centralConvoBuildings=[],this.isGeneralBuilding=!1}},this._onBuildingChange=async()=>{var e;const t=null===(e=this.selectedBuildingEl)||void 0===e?void 0:e.value;if(!t||t===this.buildingSlug)return;const n=this.centralConvoBuildings.find(e=>e.slug===t);if(n){this.isGeneralBuilding=!1,this.waitingForAvailabilities=!0,this.errorGettingAvailabilities=!1,this.tourType=null,this.selectedDate=void 0,this.selectedTime=void 0,this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.units=[],this.selectedLayoutValue="",this.selectedUnitValue="",this.buildingId=n.building_id,this.buildingSlug=n.slug,this.buildingName=n.name,this.statusMessage=`Loading tours for ${n.name}…`,$o("tourBuildingSelected",{buildingId:n.building_id});try{const e=await Jo(this.orgSlug,n.slug);this.sgtUrl=e.sgtUrl,this.selfGuidedToursTypeOffered=e.selfGuidedToursTypeOffered,this.selfGuidedTourEnabled=e.isSelfGuidedTourEnabled,this.escortedToursLink=e.escortedToursLink,this.escortedToursTypeOffered=e.escortedToursTypeOffered,this.virtualToursLink=e.virtualToursLink,this.virtualToursTypeOffered=e.virtualToursTypeOffered,this.tourTypeOptions=e.tourTypeOptions.map(e=>({label:e.label,value:e.value})),this.hasDynamicSchedulingEnabled=e.usesDynamicScheduling}catch(e){}if(await this._loadForCurrentBuilding(),!this.shouldAllowScheduling||this.errorGettingAvailabilities)this.statusMessage=`No tour availabilities for ${n.name}.`;else{const e=Object.values(this.shouldShowTourType).filter(Boolean).length;this.statusMessage=`Showing tours for ${n.name}. ${e} tour type${1===e?"":"s"} available.`}}},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await so(Fa[this.tourType]))},this.onChangePhoneNumber=e=>{this.phoneNumber=e.detail.formattedValue,this.phoneNumberE164=e.detail.e164,this.phoneCountry=e.detail.country,this.phoneNumberIsValid=e.detail.isValid},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n,i;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&Mr(null!==(i=null===(n=this.emailInput)||void 0===n?void 0:n.value)&&void 0!==i?i:"")&&!!this.phoneNumber&&!!this.phoneNumberE164},layout:()=>!this.bedroomPreferenceRequired||!!this.selectedLayoutValue},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo()&&this.validators.layout(),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,t,n,i,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x,$;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const S=this.phoneNumberE164;if(!S)return void(this.phoneNumberIsValid=!1);const A=new URLSearchParams(window.location.search);let E=null;E=this.selectedLeadSource&&this.selectedLeadSource.value&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:this.leadSourceInputValue&&this.leadSourceInputValue.length>0?this.leadSourceInputValue:this.currentLeadSource;const T=[...new Set(E?[E,"property-website"]:["property-website"])];this.firstNameInput&&(this.firstNameInputValue=this.firstNameInput.value),this.lastNameInput&&(this.lastNameInputValue=this.lastNameInput.value),this.leadSourceInputValue=E;const k=(null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||this.selectedLayoutValue||null,_=(null===(t=this.selectedUnitEl)||void 0===t?void 0:t.value)||this.selectedUnitValue||null;$o("scheduleTourSubmitted",{email:this.email,phone:S,firstName:null!==(i=null===(n=this.firstNameInput)||void 0===n?void 0:n.value)&&void 0!==i?i:this.firstNameInputValue,lastName:null!==(a=null===(o=this.lastNameInput)||void 0===o?void 0:o.value)&&void 0!==a?a:this.lastNameInputValue,tourType:Ga[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,originatingSource:T.find(e=>"property-website"!==e)||null,layout:k,unit:_,conversationTrackingId:null!==(l=null===(s=this.leadSourceClient)||void 0===s?void 0:s.chatId)&&void 0!==l?l:null});const O=(()=>{var e;try{const t=JSON.parse(null!==(e=localStorage.getItem(La))&&void 0!==e?e:"null");return(null==t?void 0:t.rwgToken)&&Date.now()<t.expiresAt?t:null}catch{return null}})(),P={referrer:document.referrer,email_address:this.email,phone_number:S,building_id:this.buildingId,first_name:null!==(d=null===(u=this.firstNameInput)||void 0===u?void 0:u.value)&&void 0!==d?d:this.firstNameInputValue,last_name:null!==(h=null===(c=this.lastNameInput)||void 0===c?void 0:c.value)&&void 0!==h?h:this.lastNameInputValue,tour_type:Ga[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,cancel_existing_tours:this.promptForReschedule,lead_sources:[...new Set(E?[E,Wo(this.orgSlug)]:[Wo(this.orgSlug)])],query_params:Object.fromEntries(A.entries()),conversation_tracking_id:null===(p=this.leadSourceClient)||void 0===p?void 0:p.chatId,layouts:k?[k]:void 0,unit_numbers:_?[_]:void 0,lead_sources_with_timestamps:(null!==(m=null===(f=this.leadSourceMultitouchClient)||void 0===f?void 0:f.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(g=this.selectedLeadSource)||void 0===g?void 0:g.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}))&&void 0!==m?m:[]).map(e=>Tr({...e})),google_rwg_token:null==O?void 0:O.rwgToken,google_referral_building_id:null==O?void 0:O.buildingId};this.isSubmitting=!0;try{await r().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",P,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE","org-slug":this.orgSlug}}),null===(y=this.leadSourceClient)||void 0===y||y.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(b=this.leadSourceClient)||void 0===b||b.resetLeadSource(),null===(v=this.leadSourceMultitouchClient)||void 0===v||v.resetLeadSourceTouchpoints(),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e,n=(null===(C=null===(w=t.response)||void 0===w?void 0:w.data)||void 0===C?void 0:C.detail)||"Failed to book tour";if(t.response&&t.response.headers&&t.response.headers["funnel-prospect-conflicting-appointment-error"]){if(this.selectedDate&&this.selectedTime){const e=this.availabilitiesGroupedByDay[Ji(this.selectedDate,"yyyy-MM-dd")];e&&(this.availabilitiesGroupedByDay[Ji(this.selectedDate,"yyyy-MM-dd")]=e.filter(e=>e!==this.selectedTime))}}else{if(409===(null===(x=t.response)||void 0===x?void 0:x.status)&&!this.promptForReschedule&&"User already has a tour scheduled for this building"===n)return this.promptForReschedule=!0,this.isSubmitting=!1,void(this.tourIsBooked=!1);if(409===(null===($=t.response)||void 0===$?void 0:$.status)&&!this.promptForReschedule)return this.isSubmitting=!1,this.tourIsBooked=!1,io(),this.availabilitiesGroupedByDay=await so(Fa[this.tourType],this.buildingId),void alert("This timeslot is no longer available. Please select a different time.")}alert(n),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>R`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>R`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>R` <action-confirm-button
|
|
1484
1488
|
id="schedule-bttn"
|
|
1485
1489
|
.onClick=${this.submit}
|
|
1486
1490
|
.isLoading=${this.isSubmitting}
|
|
@@ -1503,14 +1507,14 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
1503
1507
|
role="radiogroup"
|
|
1504
1508
|
aria-labelledby="tour-type-heading"
|
|
1505
1509
|
>
|
|
1506
|
-
${this.shouldShowTourType[
|
|
1510
|
+
${this.shouldShowTourType[ja.Self]?R` <tour-type-option
|
|
1507
1511
|
heading="Take a tour"
|
|
1508
1512
|
subtitle="on your own"
|
|
1509
1513
|
.primaryColor=${this.primaryColor}
|
|
1510
1514
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
1511
|
-
@click="${async()=>{this.tourType=
|
|
1512
|
-
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=
|
|
1513
|
-
?selected="${this.tourType===
|
|
1515
|
+
@click="${async()=>{this.tourType=ja.Self,$o("tourTypeSelected",{tourType:ja.Self,buildingId:this.buildingId}),this.sgtUrl&&Zo(ja.Self,this.selfGuidedToursTypeOffered)&&this.openSelfGuidedTour(),this.availabilitiesGroupedByDay=await so(Fa[ja.Self]),this._setDefaultSelectedDateAndTimes(Fa[ja.Self])}}"
|
|
1516
|
+
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=ja.Self)}}"
|
|
1517
|
+
?selected="${this.tourType===ja.Self}"
|
|
1514
1518
|
>
|
|
1515
1519
|
${((e="black")=>B`<svg
|
|
1516
1520
|
aria-hidden="true"
|
|
@@ -1526,16 +1530,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1526
1530
|
d="M14.8334 19.1903V30.1667H0.666687C0.666248 28.4367 1.06183 26.7297 1.82311 25.1763C2.58439 23.6229 3.69118 22.2644 5.05866 21.2049C6.42614 20.1453 8.01802 19.4129 9.71232 19.0637C11.4066 18.7145 13.1584 18.7578 14.8334 19.1903ZM12 17.4167C7.30377 17.4167 3.50002 13.6129 3.50002 8.91666C3.50002 4.22041 7.30377 0.416656 12 0.416656C16.6963 0.416656 20.5 4.22041 20.5 8.91666C20.5 13.6129 16.6963 17.4167 12 17.4167ZM20.5 23.0833V18.125L27.5834 24.5L20.5 30.875V25.9167H16.25V23.0833H20.5Z"
|
|
1527
1531
|
fill="${e}"
|
|
1528
1532
|
/>
|
|
1529
|
-
</svg>`)(this.tourType===
|
|
1533
|
+
</svg>`)(this.tourType===ja.Self?this.foregroundColorOnPrimaryBackgroundColor:ti)}
|
|
1530
1534
|
</tour-type-option>`:""}
|
|
1531
|
-
${this.shouldShowTourType[
|
|
1535
|
+
${this.shouldShowTourType[ja.Guided]?R` <tour-type-option
|
|
1532
1536
|
heading="Guided tour"
|
|
1533
1537
|
subtitle="with an agent"
|
|
1534
1538
|
.primaryColor=${this.primaryColor}
|
|
1535
1539
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
1536
|
-
@click="${async()=>{this.tourType=
|
|
1537
|
-
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=
|
|
1538
|
-
?selected="${this.tourType===
|
|
1540
|
+
@click="${async()=>{this.tourType=ja.Guided,$o("tourTypeSelected",{tourType:ja.Guided,buildingId:this.buildingId}),this.escortedToursLink&&Zo(ja.Guided,this.escortedToursTypeOffered)&&window.open(this.escortedToursLink,"_blank"),this.availabilitiesGroupedByDay=await so(Fa[ja.Guided]),this._setDefaultSelectedDateAndTimes(Fa[ja.Guided])}}"
|
|
1541
|
+
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=ja.Guided)}}"
|
|
1542
|
+
?selected="${this.tourType===ja.Guided}"
|
|
1539
1543
|
>
|
|
1540
1544
|
${((e="black")=>B`<svg
|
|
1541
1545
|
aria-hidden="true"
|
|
@@ -1551,16 +1555,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1551
1555
|
d="M0.833252 30.1666C0.833252 27.1608 2.0273 24.2782 4.15271 22.1527C6.27812 20.0273 9.1608 18.8333 12.1666 18.8333C15.1724 18.8333 18.0551 20.0273 20.1805 22.1527C22.3059 24.2782 23.4999 27.1608 23.4999 30.1666H0.833252ZM12.1666 17.4166C7.47034 17.4166 3.66659 13.6129 3.66659 8.91663C3.66659 4.22038 7.47034 0.416626 12.1666 0.416626C16.8628 0.416626 20.6666 4.22038 20.6666 8.91663C20.6666 13.6129 16.8628 17.4166 12.1666 17.4166ZM22.5975 20.58C24.7645 21.137 26.7006 22.3634 28.13 24.0846C29.5595 25.8059 30.4096 27.9342 30.5592 30.1666H26.3333C26.3333 26.4691 24.9166 23.1031 22.5975 20.58ZM19.7316 17.3557C20.9187 16.2939 21.8681 14.9932 22.5175 13.5388C23.167 12.0845 23.5017 10.5094 23.4999 8.91663C23.5029 6.9807 23.0078 5.07657 22.062 3.38738C23.6666 3.70979 25.11 4.5779 26.1469 5.84415C27.1838 7.1104 27.7502 8.69666 27.7499 10.3333C27.7503 11.3426 27.5349 12.3404 27.1182 13.2597C26.7016 14.179 26.0932 14.9986 25.3339 15.6636C24.5746 16.3285 23.6819 16.8236 22.7157 17.1154C21.7495 17.4072 20.7321 17.4892 19.7316 17.3557V17.3557Z"
|
|
1552
1556
|
fill="${e}"
|
|
1553
1557
|
/>
|
|
1554
|
-
</svg>`)(this.tourType===
|
|
1558
|
+
</svg>`)(this.tourType===ja.Guided?this.foregroundColorOnPrimaryBackgroundColor:ti)}
|
|
1555
1559
|
</tour-type-option>`:""}
|
|
1556
|
-
${this.shouldShowTourType[
|
|
1560
|
+
${this.shouldShowTourType[ja.Virtual]?R` <tour-type-option
|
|
1557
1561
|
heading="Virtual tour"
|
|
1558
1562
|
subtitle="over video"
|
|
1559
1563
|
.primaryColor=${this.primaryColor}
|
|
1560
1564
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
1561
|
-
@click="${async()=>{this.tourType=
|
|
1562
|
-
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=
|
|
1563
|
-
?selected="${this.tourType===
|
|
1565
|
+
@click="${async()=>{this.tourType=ja.Virtual,$o("tourTypeSelected",{tourType:ja.Virtual,buildingId:this.buildingId}),this.virtualToursLink&&Zo(ja.Virtual,this.virtualToursTypeOffered)&&window.open(this.virtualToursLink,"_blank"),this.availabilitiesGroupedByDay=await so(Fa[ja.Virtual]),this._setDefaultSelectedDateAndTimes(Fa[ja.Virtual])}}"
|
|
1566
|
+
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=ja.Virtual)}}"
|
|
1567
|
+
?selected="${this.tourType===ja.Virtual}"
|
|
1564
1568
|
>
|
|
1565
1569
|
${((e="black")=>B`<svg
|
|
1566
1570
|
aria-hidden="true"
|
|
@@ -1576,9 +1580,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1576
1580
|
d="M15.6 19.5V22.1L18.2 23.4V24.7H7.80004L7.79484 23.4052L10.4 22.1V19.5H1.28965C1.11894 19.4989 0.950113 19.4642 0.792841 19.3979C0.635568 19.3315 0.492943 19.2347 0.373141 19.1131C0.253339 18.9915 0.158715 18.8474 0.0946936 18.6892C0.0306718 18.5309 -0.00148955 18.3616 5.29696e-05 18.1909V1.3091C5.29696e-05 0.586299 0.591552 0 1.28965 0H24.7104C25.4228 0 26 0.583699 26 1.3091V18.1909C26 18.9137 25.4085 19.5 24.7104 19.5H15.6ZM2.60005 14.3V16.9H23.4V14.3H2.60005Z"
|
|
1577
1581
|
fill="${e}"
|
|
1578
1582
|
/>
|
|
1579
|
-
</svg>`)(this.tourType===
|
|
1583
|
+
</svg>`)(this.tourType===ja.Virtual?this.foregroundColorOnPrimaryBackgroundColor:ti)}
|
|
1580
1584
|
</tour-type-option>`:""}
|
|
1581
|
-
</div>`}dateAndTimeMenu(){var e;return this.tourType===
|
|
1585
|
+
</div>`}dateAndTimeMenu(){var e;return this.tourType===ja.Self&&this.sgtUrl&&Zo(this.tourType,this.selfGuidedToursTypeOffered)?R`<h2 class="journey-header">Date and Time</h2>
|
|
1582
1586
|
<div id="dateAndTimeMenu">
|
|
1583
1587
|
<button
|
|
1584
1588
|
id="self-guided-redirect-bttn"
|
|
@@ -1592,7 +1596,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1592
1596
|
<date-picker
|
|
1593
1597
|
.availabilities=${co()(this.availabilitiesGroupedByDay,e=>e.map(e=>new Date(e.offset)))}
|
|
1594
1598
|
.defaultDate=${this.selectedDate}
|
|
1595
|
-
@change=${async e=>{if(this.tourType===
|
|
1599
|
+
@change=${async e=>{if(this.tourType===ja.Self&&this.sgtUrl&&Zo(this.tourType,this.selfGuidedToursTypeOffered))this.openSelfGuidedTour();else if(this.tourType===ja.Guided&&this.escortedToursLink&&Zo(this.tourType,this.escortedToursTypeOffered))window.open(this.escortedToursLink,"_blank");else if(this.tourType===ja.Virtual&&this.virtualToursLink&&Zo(this.tourType,this.virtualToursTypeOffered))window.open(this.virtualToursLink,"_blank");else if(e.target instanceof sr){const t=this.selectedDate;if(this.selectedDate=e.target.selectedDate,!this.tourType)return;if(t&&e.target.selectedDate&&or(t,e.target.selectedDate))return;e.target.selectedDate&&$o("tourDateSelected",{selectedDate:Ji(e.target.selectedDate,"yyyy-MM-dd"),tourType:this.tourType,buildingId:this.buildingId}),this._setDefaultSelectedDateAndTimes(Fa[this.tourType],e.target.selectedDate)}}}
|
|
1596
1600
|
></date-picker>
|
|
1597
1601
|
<div>
|
|
1598
1602
|
<time-picker
|
|
@@ -1683,8 +1687,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1683
1687
|
${this.layoutOptions.length>0?R` <me-select
|
|
1684
1688
|
id="layout"
|
|
1685
1689
|
placeholder=${this.bedroomPreferenceRequired?"Bedroom preference":"Bedroom preference (optional)"}
|
|
1686
|
-
.options="${this.layoutOptions.map(e=>({label:e.label,value:
|
|
1687
|
-
@change=${()=>{var e;const t=(null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||"";if(this.selectedLayoutValue=t,t&&this.selectedUnitValue){const e=this.units.find(e=>e.unitNumber===this.selectedUnitValue);e&&
|
|
1690
|
+
.options="${this.layoutOptions.map(e=>({label:e.label,value:za(e.value)}))}"
|
|
1691
|
+
@change=${()=>{var e;const t=(null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||"";if(this.selectedLayoutValue=t,t&&this.selectedUnitValue){const e=this.units.find(e=>e.unitNumber===this.selectedUnitValue);e&&za(10*e.numberOfBedrooms)!==t&&(this.selectedUnitValue="",this.selectedUnitEl&&(this.selectedUnitEl.value=void 0))}t&&$o("tourLayoutSelected",{layout:t,buildingId:this.buildingId})}}
|
|
1688
1692
|
>
|
|
1689
1693
|
</me-select>`:""}
|
|
1690
1694
|
${this.allowOccupiedUnitTours&&this._getUnitOptions().length>0?R` <me-select
|
|
@@ -1739,7 +1743,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1739
1743
|
<p>Thank you!</p>
|
|
1740
1744
|
<p>
|
|
1741
1745
|
Your
|
|
1742
|
-
${{[
|
|
1746
|
+
${{[ja.Guided]:"guided",[ja.Self]:"self-guided",[ja.Virtual]:"virtual"}[this.tourType]}
|
|
1743
1747
|
tour is
|
|
1744
1748
|
${this.promptForReschedule?R`rescheduled`:R`scheduled`} for
|
|
1745
1749
|
${e}
|
|
@@ -2000,7 +2004,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2000
2004
|
</div>
|
|
2001
2005
|
`}
|
|
2002
2006
|
</div>
|
|
2003
|
-
`}};var Ba
|
|
2007
|
+
`}};var ja;Ba.styles=[Ro,Oe],Ra([ue({attribute:!1})],Ba.prototype,"tourTypeOptions",void 0),Ra([ue({attribute:!1})],Ba.prototype,"layoutOptions",void 0),Ra([ue({attribute:!0})],Ba.prototype,"chatId",void 0),Ra([ue({type:Number})],Ba.prototype,"buildingId",void 0),Ra([ue({type:Number})],Ba.prototype,"orgId",void 0),Ra([ue({attribute:!1})],Ba.prototype,"leadSourceParams",void 0),Ra([ue({attribute:!0})],Ba.prototype,"buildingSlug",void 0),Ra([ue({attribute:!0})],Ba.prototype,"sgtUrl",void 0),Ra([ue({attribute:!0})],Ba.prototype,"selfGuidedToursTypeOffered",void 0),Ra([ue({attribute:!0})],Ba.prototype,"selfGuidedTourEnabled",void 0),Ra([ue({attribute:!0})],Ba.prototype,"escortedToursLink",void 0),Ra([ue({attribute:!0})],Ba.prototype,"escortedToursTypeOffered",void 0),Ra([ue({attribute:!0})],Ba.prototype,"virtualToursLink",void 0),Ra([ue({attribute:!0})],Ba.prototype,"virtualToursTypeOffered",void 0),Ra([ue({attribute:!0})],Ba.prototype,"orgSlug",void 0),Ra([ue({attribute:!0})],Ba.prototype,"hasDynamicSchedulingEnabled",void 0),Ra([ue({attribute:!0})],Ba.prototype,"bedroomPreferenceRequired",void 0),Ra([ue({attribute:!0})],Ba.prototype,"leadSourceClient",void 0),Ra([ue({attribute:!0})],Ba.prototype,"leadSourceMultitouchClient",void 0),Ra([ue({attribute:!0})],Ba.prototype,"buildingName",void 0),Ra([de()],Ba.prototype,"tourType",void 0),Ra([de()],Ba.prototype,"shouldShowTourType",void 0),Ra([de()],Ba.prototype,"email",void 0),Ra([de()],Ba.prototype,"phoneNumber",void 0),Ra([de()],Ba.prototype,"phoneNumberE164",void 0),Ra([de()],Ba.prototype,"phoneCountry",void 0),Ra([de()],Ba.prototype,"phoneNumberIsValid",void 0),Ra([de()],Ba.prototype,"phoneNumberHasBlurred",void 0),Ra([de()],Ba.prototype,"availabilitiesGroupedByDay",void 0),Ra([de()],Ba.prototype,"calendarTimeZone",void 0),Ra([de()],Ba.prototype,"waitingForAvailabilities",void 0),Ra([de()],Ba.prototype,"selectedDate",void 0),Ra([de()],Ba.prototype,"selectedTime",void 0),Ra([de()],Ba.prototype,"mobilePageIndex",void 0),Ra([de()],Ba.prototype,"isSubmitting",void 0),Ra([de()],Ba.prototype,"tourIsBooked",void 0),Ra([de()],Ba.prototype,"shouldAllowScheduling",void 0),Ra([de()],Ba.prototype,"shouldAllowScheduleLoading",void 0),Ra([de()],Ba.prototype,"promptForReschedule",void 0),Ra([de()],Ba.prototype,"canceledReschedule",void 0),Ra([ue({attribute:!1})],Ba.prototype,"leadSources",void 0),Ra([ue({attribute:!0})],Ba.prototype,"orgLegalName",void 0),Ra([ue({attribute:!1})],Ba.prototype,"country",void 0),Ra([ue({attribute:!0})],Ba.prototype,"currentLeadSource",void 0),Ra([ue({attribute:!0})],Ba.prototype,"featureFlagShowDropdown",void 0),Ra([ue({attribute:!0})],Ba.prototype,"compactDesign",void 0),Ra([ue({attribute:!0})],Ba.prototype,"primaryColor",void 0),Ra([ue({attribute:!0})],Ba.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Ra([ce(".nameContainer#firstName input")],Ba.prototype,"firstNameInput",void 0),Ra([ce(".nameContainer#lastName input")],Ba.prototype,"lastNameInput",void 0),Ra([ce(".inputContainer#email input")],Ba.prototype,"emailInput",void 0),Ra([ce("me-select#leadSource")],Ba.prototype,"selectedLeadSource",void 0),Ra([ce("me-select#layout")],Ba.prototype,"selectedLayoutEl",void 0),Ra([ce("me-select#unit")],Ba.prototype,"selectedUnitEl",void 0),Ra([de()],Ba.prototype,"firstNameInputValue",void 0),Ra([de()],Ba.prototype,"lastNameInputValue",void 0),Ra([de()],Ba.prototype,"leadSourceInputValue",void 0),Ra([de()],Ba.prototype,"selectedLayoutValue",void 0),Ra([de()],Ba.prototype,"selectedUnitValue",void 0),Ra([de()],Ba.prototype,"units",void 0),Ra([de()],Ba.prototype,"allowOccupiedUnitTours",void 0),Ra([de()],Ba.prototype,"errorGettingAvailabilities",void 0),Ra([de()],Ba.prototype,"centralConvoBuildings",void 0),Ra([de()],Ba.prototype,"isGeneralBuilding",void 0),Ra([ce("me-select#building")],Ba.prototype,"selectedBuildingEl",void 0),Ra([de()],Ba.prototype,"statusMessage",void 0),Ba=Ra([se("tour-scheduler")],Ba),function(e){e.Guided="guided",e.Self="self",e.Virtual="virtual"}(ja||(ja={}));const Fa={[ja.Guided]:Fr.WithAgent,[ja.Self]:Fr.SelfGuided,[ja.Virtual]:Fr.VirtualShowing},Ha={[Fr.WithAgent]:ja.Guided,[Fr.SelfGuided]:ja.Self,[Fr.VirtualShowing]:ja.Virtual},Ga={[ja.Guided]:"escorted-tour",[ja.Self]:"self-guided-tour",[ja.Virtual]:"live-virtual-tour"};function za(e){const t=Math.round(e/10);return 0===t?"studio":`${t}br`}const Qa=(e,t,n=!0,i=!1,r,o=.01)=>Go({params:{org_slug:e,building_slug:t,is_pixel_on_site:n,is_any_webchat_showing:i,extra_data:{webchat_no_show_reason:r}},sampleRate:o}),Wa=async(e,t,n)=>{const i=.01;if(!e)return Qa(n,t,!0,!1,"building_does_not_exist",i),!1;if(!e.launchedDateTime)return Qa(n,t,!0,!1,"building_not_launched",i),!1;if(!e.active)return Qa(n,t,!0,!1,"building_not_active",i),!1;if(!e.webchatScopeConfigured)return Qa(n,t,!0,!1,"building_not_webchat_scope_configured",i),!1;const o=await async function(e){if(!e)return!1;try{return(await r().get(fo(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}}(t);return!o||(Qa(n,t,!0,!1,"building_in_maintenance_mode",i),!1)},Va=u`
|
|
2004
2008
|
* {
|
|
2005
2009
|
font-family: "Helvetica Neue", Arial;
|
|
2006
2010
|
font-size: 14px;
|
|
@@ -2497,7 +2501,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2497
2501
|
width: 164px;
|
|
2498
2502
|
}
|
|
2499
2503
|
}
|
|
2500
|
-
`,
|
|
2504
|
+
`,qa=u`
|
|
2501
2505
|
.type-hey__list {
|
|
2502
2506
|
width: 280px;
|
|
2503
2507
|
height: 300px;
|
|
@@ -2655,7 +2659,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2655
2659
|
.title-bold {
|
|
2656
2660
|
font-weight: 700;
|
|
2657
2661
|
}
|
|
2658
|
-
`,
|
|
2662
|
+
`,Ya=u`
|
|
2659
2663
|
.vertical-pill-list {
|
|
2660
2664
|
position: relative;
|
|
2661
2665
|
display: flex;
|
|
@@ -2728,7 +2732,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2728
2732
|
justify-content: center;
|
|
2729
2733
|
align-items: center;
|
|
2730
2734
|
}
|
|
2731
|
-
`;var
|
|
2735
|
+
`;var Ka=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 Xa=class extends oe{constructor(){super(...arguments),this.text="Submit",this.isLoading=!1,this.disabled=!1,this.height="initial",this.width="initial",this.focus=()=>{var e,t;null===(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===t||t.focus()},this.render=()=>R`<button
|
|
2732
2736
|
class=${po()("action-confirm-button",{loading:this.isLoading})}
|
|
2733
2737
|
@click=${this.isLoading?null:this.onClick}
|
|
2734
2738
|
?disabled=${this.disabled}
|
|
@@ -2740,7 +2744,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2740
2744
|
<div></div>
|
|
2741
2745
|
<div></div>
|
|
2742
2746
|
</div>`:this.text}
|
|
2743
|
-
</button>`}};
|
|
2747
|
+
</button>`}};Xa.shadowRootOptions={...oe.shadowRootOptions,delegatesFocus:!0},Xa.styles=[u`
|
|
2744
2748
|
.action-confirm-button {
|
|
2745
2749
|
display: flex;
|
|
2746
2750
|
justify-content: center;
|
|
@@ -2814,7 +2818,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2814
2818
|
transform: rotate(360deg);
|
|
2815
2819
|
}
|
|
2816
2820
|
}
|
|
2817
|
-
`],
|
|
2821
|
+
`],Ka([ue()],Xa.prototype,"onClick",void 0),Ka([ue()],Xa.prototype,"text",void 0),Ka([ue({attribute:!1})],Xa.prototype,"isLoading",void 0),Ka([ue({type:Boolean})],Xa.prototype,"disabled",void 0),Ka([ue({type:String})],Xa.prototype,"height",void 0),Ka([ue({type:String})],Xa.prototype,"width",void 0),Xa=Ka([se("action-confirm-button")],Xa);var Za=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 Ja=class extends oe{constructor(){super(...arguments),this.height="425px",this.width="326px",this.useRoundedBorders=!0,this.headerText="",this.isMobileSized=Or(),this.useGradientDesign=!1}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Pr(e=>{this.isMobileSized=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}render(){return R`
|
|
2818
2822
|
<div
|
|
2819
2823
|
id="details-window-inner"
|
|
2820
2824
|
class="details-window-wrapper"
|
|
@@ -2854,7 +2858,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2854
2858
|
</div>
|
|
2855
2859
|
<slot class="details-window__slot-content"></slot>
|
|
2856
2860
|
</div>
|
|
2857
|
-
`}};
|
|
2861
|
+
`}};Ja.styles=u`
|
|
2858
2862
|
.details-window-wrapper {
|
|
2859
2863
|
background: rgba(255, 255, 255, 0.9);
|
|
2860
2864
|
box-shadow: 0px 0px 14px 5px rgba(0, 0, 0, 0.25);
|
|
@@ -2922,7 +2926,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2922
2926
|
border-radius: 0px 0px 0px 0px;
|
|
2923
2927
|
}
|
|
2924
2928
|
}
|
|
2925
|
-
`,
|
|
2929
|
+
`,Za([ue({type:String})],Ja.prototype,"height",void 0),Za([ue({type:String})],Ja.prototype,"width",void 0),Za([ue({type:Boolean})],Ja.prototype,"useRoundedBorders",void 0),Za([ue({type:String})],Ja.prototype,"headerText",void 0),Za([ue({attribute:!1})],Ja.prototype,"onCloseClick",void 0),Za([de()],Ja.prototype,"isMobileSized",void 0),Za([ue({attribute:!0})],Ja.prototype,"useGradientDesign",void 0),Ja=Za([se("details-window")],Ja);var es=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 ts=class extends oe{constructor(){super(...arguments),this.leadSources=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.buildingName="",this.orgLegalName="",this.country=null,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.featureFlagShowDropdown="",this.privatePolicyUrl="https://www.meetelise.com/privacy",this.termsOfServiceUrl="_blank",this.firstName="",this.lastName="",this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneCountry=null,this.message="",this.currentLeadSource="",this.hasNameError=!1,this.hasEmailError=!1,this.hasPhoneNumberError=!1,this.hasMessageError=!1,this.hasSubmittedForm=!1,this.windowHeight=525,this.hasSubmissionError=!1,this.isSubmitting=!1,this.onChangeFirstName=e=>{e.target&&(this.firstName=e.target.value)},this.onChangeLastName=e=>{e.target&&(this.lastName=e.target.value)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.onChangePhoneNumber=e=>{this.phoneNumber=e.detail.formattedValue,this.phoneNumberE164=e.detail.e164,this.phoneCountry=e.detail.country},this.onChangeMessage=e=>{e.target&&(this.message=e.target.value)},this.validateFormFields=()=>{this.hasNameError=!1,this.hasEmailError=!1,this.hasPhoneNumberError=!1,this.hasMessageError=!1,this.hasSubmissionError=!1,this.firstName&&this.lastName||(this.hasNameError=!0),this.email&&Mr(this.email)||(this.hasEmailError=!0),this.phoneNumberE164||(this.hasPhoneNumberError=!0),this.windowHeight=525+30*this.getNumErrors()},this.onClick=async()=>{var e,t,n,i,r,o;if(this.isSubmitting)return;if(this.validateFormFields(),this.hasNameError||this.hasEmailError||this.hasPhoneNumberError||this.hasMessageError)return;const a=this.phoneNumberE164;if(a)try{this.isSubmitting=!0,this.windowHeight=585;const s=this.selectedLeadSource&&this.selectedLeadSource.value?this.selectedLeadSource.value:this.currentLeadSource;await ns(this.firstName,this.lastName,this.email,a,this.message,this.buildingId,this.orgSlug,this.buildingSlug,[...new Set(s?[s,Wo(this.orgSlug)]:[Wo(this.orgSlug)])],null===(e=this.leadSourceClient)||void 0===e?void 0:e.chatId,null===(t=this.leadSourceMultitouchClient)||void 0===t?void 0:t.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(n=this.selectedLeadSource)||void 0===n?void 0:n.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null})),null===(i=this.leadSourceClient)||void 0===i||i.checkAndHandleForLogLeadSource({webchatAction:"email-us",stateId:null}),null===(r=this.leadSourceClient)||void 0===r||r.resetLeadSource(),null===(o=this.leadSourceMultitouchClient)||void 0===o||o.resetLeadSourceTouchpoints(),this.hasSubmittedForm=!0,this.isSubmitting=!1,this.windowHeight=525}catch(e){this.hasSubmissionError=!0,this.isSubmitting=!1,this.windowHeight=525}else this.hasPhoneNumberError=!0},this.getNumErrors=()=>[this.hasNameError,this.hasEmailError,this.hasPhoneNumberError,this.hasMessageError,this.hasSubmissionError].filter(e=>e).length,this.render=()=>{var e;return window.customElements.get("details-window")||window.customElements.define("details-window",Ja),window.customElements.get("action-confirm-button")||window.customElements.define("action-confirm-button",Xa),this.hasSubmittedForm?R`
|
|
2926
2930
|
<details-window
|
|
2927
2931
|
id="details-window"
|
|
2928
2932
|
headerText=""
|
|
@@ -3043,7 +3047,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3043
3047
|
|
|
3044
3048
|
${Uo({buildingName:this.buildingName,phoneNumberInput:this.phoneNumber,emailInput:this.email,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,clickingButtonText:"send"})}
|
|
3045
3049
|
</details-window>
|
|
3046
|
-
`}}};
|
|
3050
|
+
`}}};ts.styles=[u`
|
|
3047
3051
|
.email-us__name-input,
|
|
3048
3052
|
.email-us__contact_input,
|
|
3049
3053
|
.email-us_message-input {
|
|
@@ -3115,11 +3119,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3115
3119
|
width: 50%;
|
|
3116
3120
|
}
|
|
3117
3121
|
}
|
|
3118
|
-
`,Oe],
|
|
3122
|
+
`,Oe],es([ue({attribute:!1})],ts.prototype,"leadSources",void 0),es([ue({attribute:!1})],ts.prototype,"onCloseClicked",void 0),es([ue({attribute:!0})],ts.prototype,"chatId",void 0),es([ue({attribute:!1})],ts.prototype,"buildingId",void 0),es([ue({attribute:!0})],ts.prototype,"buildingSlug",void 0),es([ue({attribute:!0})],ts.prototype,"orgSlug",void 0),es([ue({attribute:!0})],ts.prototype,"buildingName",void 0),es([ue({attribute:!0})],ts.prototype,"orgLegalName",void 0),es([ue({attribute:!1})],ts.prototype,"country",void 0),es([ue({attribute:!0})],ts.prototype,"leadSourceClient",void 0),es([ue({attribute:!0})],ts.prototype,"leadSourceMultitouchClient",void 0),es([ue({attribute:!0})],ts.prototype,"featureFlagShowDropdown",void 0),es([ue()],ts.prototype,"privatePolicyUrl",void 0),es([ue()],ts.prototype,"termsOfServiceUrl",void 0),es([de()],ts.prototype,"firstName",void 0),es([de()],ts.prototype,"lastName",void 0),es([de()],ts.prototype,"email",void 0),es([de()],ts.prototype,"phoneNumber",void 0),es([de()],ts.prototype,"phoneNumberE164",void 0),es([de()],ts.prototype,"phoneCountry",void 0),es([de()],ts.prototype,"message",void 0),es([ce("me-select#leadSource")],ts.prototype,"selectedLeadSource",void 0),es([ue({attribute:!0})],ts.prototype,"currentLeadSource",void 0),es([de()],ts.prototype,"hasNameError",void 0),es([de()],ts.prototype,"hasEmailError",void 0),es([de()],ts.prototype,"hasPhoneNumberError",void 0),es([de()],ts.prototype,"hasMessageError",void 0),es([de()],ts.prototype,"hasSubmittedForm",void 0),es([de()],ts.prototype,"windowHeight",void 0),es([de()],ts.prototype,"hasSubmissionError",void 0),es([de()],ts.prototype,"isSubmitting",void 0),ts=es([se("email-us-window")],ts);const ns=async(e,t,n,i,o,a,s,l,u,d,c)=>{const h=new URLSearchParams(window.location.search),p={email_address:n,building_id:a,lead_sources:u,first_message:o,first_name:e,last_name:t,phone_number:i,referrer:document.referrer,query_params:Object.fromEntries(h.entries()),conversation_tracking_id:d,lead_sources_with_timestamps:(null!=c?c:[]).map(e=>Tr({...e}))};$o("emailUsSubmitted",{firstName:e,lastName:t,email:n,phone:i,message:o,originatingSource:u.find(e=>"property-website"!==e)||null,conversationTrackingId:null!=d?d:null}),await r().post("https://app.meetelise.com/platformApi/state/create/emailMe",p,{headers:{"building-slug":l,"org-slug":s,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE"}})},is=(e="white")=>B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="14" height="17" viewBox="0 0 14 17" fill="none">
|
|
3119
3123
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.95487 2.54301e-07H7.04513C8.51534 -1.22821e-05 9.67985 -2.22686e-05 10.5912 0.121084C11.5292 0.24572 12.2883 0.508324 12.887 1.10005C13.4857 1.69178 13.7514 2.44211 13.8775 3.36914C14 4.26992 14 5.42089 14 6.874V10.126C14 11.5791 14 12.7301 13.8775 13.6309C13.7514 14.5579 13.4857 15.3082 12.887 15.8999C12.2883 16.4917 11.5292 16.7543 10.5912 16.8789C9.67985 17 8.51534 17 7.04513 17H6.95487C5.48466 17 4.32015 17 3.40878 16.8789C2.47084 16.7543 1.71169 16.4917 1.11299 15.8999C0.514304 15.3082 0.248611 14.5579 0.122508 13.6309C-2.25306e-05 12.7301 -1.24266e-05 11.5791 2.57292e-07 10.126V6.87399C-1.24266e-05 5.42088 -2.25306e-05 4.26992 0.122508 3.36914C0.248611 2.44211 0.514304 1.69178 1.11299 1.10005C1.71169 0.508324 2.47084 0.24572 3.40878 0.121084C4.32015 -2.22686e-05 5.48466 -1.22821e-05 6.95487 2.54301e-07ZM2.85118 1.44157C2.45996 1.55714 2.18378 1.71904 1.96152 1.93871C1.62295 2.27335 1.42002 2.73167 1.31181 3.52718C1.20127 4.33975 1.2 5.41089 1.2 6.9186V10.0814C1.2 11.5891 1.20127 12.6602 1.31181 13.4728C1.42002 14.2683 1.62295 14.7267 1.96152 15.0613C2.30009 15.3959 2.76381 15.5965 3.56868 15.7034C4.39081 15.8127 5.47454 15.814 7 15.814C8.52546 15.814 9.60919 15.8127 10.4313 15.7034C11.2362 15.5965 11.6999 15.3959 12.0385 15.0613C12.377 14.7267 12.58 14.2683 12.6882 13.4728C12.7987 12.6602 12.8 11.5891 12.8 10.0814V6.9186C12.8 5.41089 12.7987 4.33975 12.6882 3.52718C12.58 2.73167 12.377 2.27335 12.0385 1.93871C11.8162 1.71905 11.54 1.55714 11.1488 1.44157C10.6194 2.22728 10.2493 2.77349 9.69896 3.1115C9.58916 3.17894 9.47507 3.23928 9.3574 3.29217C8.76366 3.55903 8.09363 3.55868 7.12834 3.55818C7.08613 3.55816 7.04336 3.55814 7 3.55814C6.95664 3.55814 6.91387 3.55816 6.87166 3.55818C5.90637 3.55868 5.23634 3.55903 4.6426 3.29217C4.52493 3.23928 4.41084 3.17894 4.30104 3.1115C3.75069 2.77349 3.38057 2.22729 2.85118 1.44157ZM4.16103 1.2383C4.51629 1.74715 4.70232 1.96157 4.9344 2.10411C5.00028 2.14457 5.06873 2.18078 5.13933 2.21251C5.46646 2.35954 5.85406 2.37209 7 2.37209C8.14594 2.37209 8.53354 2.35954 8.86066 2.21251C8.93127 2.18078 8.99972 2.14457 9.0656 2.10411C9.29768 1.96157 9.48371 1.74715 9.83897 1.2383C9.10278 1.18681 8.18457 1.18605 7 1.18605C5.81543 1.18605 4.89722 1.18681 4.16103 1.2383ZM4 14.0349C4 13.7074 4.26863 13.4419 4.6 13.4419H9.4C9.73137 13.4419 10 13.7074 10 14.0349C10 14.3624 9.73137 14.6279 9.4 14.6279H4.6C4.26863 14.6279 4 14.3624 4 14.0349Z" fill="${e}"/>
|
|
3120
|
-
</svg>`,
|
|
3124
|
+
</svg>`,rs={},os=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],as=async e=>{const t=await(async e=>{if(rs[e])return rs[e];const t=`https://app.meetelise.com/platformApi/connectors/talk_js/leasing_office_hours/${e}`,n=await r().get(t);return rs[e]=n.data,n.data})(e);return os.map(e=>{const n=t[e];return n?{dayOfWeek:e,startTime:n.start,endTime:n.end}:e})};var ss=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 ls=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.phoneNumberToCall="",this.phoneNumberToText="",this.buildingId=0,this.buildingName="",this.chatCallUsHeader="",this.hasCallUsEnabled="",this.hasTextUsEnabled="",this.currentLeadSource="",this.orgLegalName="",this.country=null,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.phoneNumberInputRef=Ee(),this.hasSubmittedForm=!1,this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.submittingTextUsOption=!1,this.officeHoursTextInfo=[],this.firstUpdated=async()=>{this.buildingId&&this.hasCallUsEnabled&&(this.officeHoursTextInfo=await as(this.buildingId))},this.getCallLink=e=>{const t=(e.match(/\d+/g)||[]).join(""),n=t.length<11?`1${t}`:t,i=`+${n[0]}-${n.slice(1,4)}-${n.slice(4,7)}-${n.slice(7)}`;return R`<a href="tel:${i}"
|
|
3121
3125
|
>${e}</a
|
|
3122
|
-
>`},this.enforcePhoneFormat=e=>{(e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105})(e)||zn(e)||e.preventDefault()},this.onSubmitTextUs=async()=>{var e,t,n,i,r;if(this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumberToText&&14===this.phoneNumberToText.length||(this.hasPhoneNumberError=!0),!this.hasPhoneNumberError)try{this.submittingTextUsOption=!0,await
|
|
3126
|
+
>`},this.enforcePhoneFormat=e=>{(e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105})(e)||zn(e)||e.preventDefault()},this.onSubmitTextUs=async()=>{var e,t,n,i,r;if(this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumberToText&&14===this.phoneNumberToText.length||(this.hasPhoneNumberError=!0),!this.hasPhoneNumberError)try{this.submittingTextUsOption=!0,await us(this.phoneNumberToText,this.buildingId,this.orgSlug,this.buildingSlug,[...new Set(this.currentLeadSource?[this.currentLeadSource,Wo(this.orgSlug)]:[Wo(this.orgSlug)])],null===(e=this.leadSourceClient)||void 0===e?void 0:e.chatId,null===(t=this.leadSourceMultitouchClient)||void 0===t?void 0:t.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:null})),null===(n=this.leadSourceClient)||void 0===n||n.checkAndHandleForLogLeadSource({webchatAction:"text-us",stateId:null}),null===(i=this.leadSourceClient)||void 0===i||i.resetLeadSource(),null===(r=this.leadSourceMultitouchClient)||void 0===r||r.resetLeadSourceTouchpoints(),this.hasSubmittedForm=!0,this.submittingTextUsOption=!1}catch(e){this.submittingTextUsOption=!1,this.hasSubmissionError=!0}},this.onChangePhoneNumber=e=>{if(!e.target||!this.phoneNumberInputRef.value)return;if(zn(e))return;const t=e.target;this.phoneNumberToText=Hn(t.value),this.phoneNumberInputRef.value.value=this.phoneNumberToText},this.renderFormTextUsOption=()=>R` <div class="text-us-wrapper">
|
|
3123
3127
|
<h1 class="text-us-window__header">Send Us a Text</h1>
|
|
3124
3128
|
<div class="text-us-window__input-container">
|
|
3125
3129
|
<input
|
|
@@ -3151,7 +3155,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3151
3155
|
${Io(this.country)?R`By providing your number and clicking send, you consent to
|
|
3152
3156
|
receive recurring commercial electronic messages from or on behalf
|
|
3153
3157
|
of ${this.orgLegalName} at this number. Messages may be AI or
|
|
3154
|
-
human generated. Msg & Data rates may apply. You
|
|
3158
|
+
human generated. Msg freq varies. Msg & Data rates may apply. You
|
|
3159
|
+
consent to this
|
|
3155
3160
|
<a
|
|
3156
3161
|
target="_blank"
|
|
3157
3162
|
rel="noopener noreferrer"
|
|
@@ -3160,24 +3165,26 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3160
3165
|
>, including having your number and communications recorded and
|
|
3161
3166
|
used by our service provider to generate responses and improve
|
|
3162
3167
|
their services. You may withdraw your consent at any time by
|
|
3163
|
-
unsubscribing or contacting us
|
|
3164
|
-
|
|
3168
|
+
unsubscribing or contacting us. Text STOP to opt-out of messages.
|
|
3169
|
+
Text HELP for assistance.`:196098===this.buildingId?R`By providing your number and clicking send, you consent to
|
|
3170
|
+
receive recurring marketing text and voice messages and calls from
|
|
3165
3171
|
or on behalf of ${this.orgLegalName} at this number using
|
|
3166
3172
|
artificial voice or an autodialer system. Messages may be AI or
|
|
3167
3173
|
human generated. This consent is not required to lease at this
|
|
3168
|
-
property.
|
|
3169
|
-
|
|
3174
|
+
property. Msg freq varies. Msg & Data rates may apply. Text STOP
|
|
3175
|
+
to opt-out of messages. Text HELP for assistance. You consent to
|
|
3176
|
+
this
|
|
3170
3177
|
<a target="_blank" href="http://bit.ly/me_privacy_policy"
|
|
3171
3178
|
>privacy policy</a
|
|
3172
3179
|
>, including having your number and communications recorded and
|
|
3173
3180
|
used by a third party.`:"greystar"===this.orgSlug?R`By providing your phone number and clicking send, you consent
|
|
3174
|
-
to receive recurring marketing
|
|
3181
|
+
to receive recurring marketing text and voice messages and calls
|
|
3175
3182
|
from Greystar or on its behalf at this number using artificial
|
|
3176
3183
|
voice and/or an autodialer. Messages may be AI or human-generated.
|
|
3177
3184
|
Your phone number and communications are shared with and recorded
|
|
3178
3185
|
and used by EliseAI. You are not required to provide your phone
|
|
3179
|
-
number or consent to these terms to lease at this property. Msg
|
|
3180
|
-
Data rates may apply. You consent to
|
|
3186
|
+
number or consent to these terms to lease at this property. Msg
|
|
3187
|
+
freq varies. Msg & Data rates may apply. You consent to
|
|
3181
3188
|
<a
|
|
3182
3189
|
href="https://www.greystar.com/privacy"
|
|
3183
3190
|
target="_blank"
|
|
@@ -3190,12 +3197,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3190
3197
|
target="_blank"
|
|
3191
3198
|
rel="noopener noreferrer"
|
|
3192
3199
|
>EliseAI's Privacy Policy</a
|
|
3193
|
-
|
|
3194
|
-
receive recurring marketing
|
|
3200
|
+
>. Text STOP to opt-out of messages. Text HELP for assistance.`:R`By providing your number and clicking send, you consent to
|
|
3201
|
+
receive recurring marketing text and voice messages and calls from
|
|
3195
3202
|
or on behalf of ${this.orgLegalName} at this number using
|
|
3196
3203
|
artificial voice or an autodialer system. Messages may be AI or
|
|
3197
3204
|
human generated. This consent is not required to lease at this
|
|
3198
|
-
property. Msg & Data rates may apply. You consent
|
|
3205
|
+
property. Msg freq varies. Msg & Data rates may apply. You consent
|
|
3206
|
+
to this
|
|
3199
3207
|
<a target="_blank" href="http://bit.ly/me_privacy_policy"
|
|
3200
3208
|
>privacy policy</a
|
|
3201
3209
|
>
|
|
@@ -3203,7 +3211,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3203
3211
|
<a target="_blank" href="https://eliseai.com/msgterms"
|
|
3204
3212
|
>terms and conditions</a
|
|
3205
3213
|
>, including having your number and communications recorded and
|
|
3206
|
-
used by a third party
|
|
3214
|
+
used by a third party. Text STOP to opt-out of messages. Text HELP
|
|
3215
|
+
for assistance.`}
|
|
3207
3216
|
</div>
|
|
3208
3217
|
</div>`,this.renderSubmittedTextUsOption=()=>R`
|
|
3209
3218
|
<div id="text-us-container-focus" class="text-us-wrapper">
|
|
@@ -3241,7 +3250,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3241
3250
|
Contact Our Leasing Team
|
|
3242
3251
|
</h1>
|
|
3243
3252
|
<div class="call-us-window__phone-redirect">
|
|
3244
|
-
${
|
|
3253
|
+
${is("black")}
|
|
3245
3254
|
${this.getCallLink(this.phoneNumberToCall)}
|
|
3246
3255
|
</div>
|
|
3247
3256
|
<div class="call-us-window__office-hours-wrapper">
|
|
@@ -3267,7 +3276,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3267
3276
|
</div>`:""}
|
|
3268
3277
|
${this.hasTextUsEnabled?this.hasSubmittedForm?this.renderSubmittedTextUsOption():this.renderFormTextUsOption():""}
|
|
3269
3278
|
</details-window>
|
|
3270
|
-
`}};
|
|
3279
|
+
`}};ls.styles=[Oe,u`
|
|
3271
3280
|
#call-us-window__content-wrapper {
|
|
3272
3281
|
font-family: "Helvetica Neue", Arial;
|
|
3273
3282
|
font-style: normal;
|
|
@@ -3372,7 +3381,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3372
3381
|
.text-us-window__error {
|
|
3373
3382
|
color: rgb(255, 49, 3);
|
|
3374
3383
|
}
|
|
3375
|
-
`],
|
|
3384
|
+
`],ss([ue({attribute:!0})],ls.prototype,"buildingSlug",void 0),ss([ue({attribute:!0})],ls.prototype,"orgSlug",void 0),ss([ue({attribute:!1})],ls.prototype,"onCloseClicked",void 0),ss([ue()],ls.prototype,"phoneNumberToCall",void 0),ss([ue()],ls.prototype,"phoneNumberToText",void 0),ss([ue({attribute:!1})],ls.prototype,"buildingId",void 0),ss([ue({attribute:!1})],ls.prototype,"buildingName",void 0),ss([ue({attribute:!0})],ls.prototype,"chatCallUsHeader",void 0),ss([ue({attribute:!0})],ls.prototype,"hasCallUsEnabled",void 0),ss([ue({attribute:!0})],ls.prototype,"hasTextUsEnabled",void 0),ss([ue({attribute:!0})],ls.prototype,"currentLeadSource",void 0),ss([ue({attribute:!0})],ls.prototype,"orgLegalName",void 0),ss([ue({attribute:!1})],ls.prototype,"country",void 0),ss([ue({attribute:!0})],ls.prototype,"leadSourceClient",void 0),ss([ue({attribute:!0})],ls.prototype,"leadSourceMultitouchClient",void 0),ss([de()],ls.prototype,"hasSubmittedForm",void 0),ss([de()],ls.prototype,"hasPhoneNumberError",void 0),ss([de()],ls.prototype,"hasSubmissionError",void 0),ss([de()],ls.prototype,"submittingTextUsOption",void 0),ss([ue({attribute:!1})],ls.prototype,"officeHoursTextInfo",void 0),ls=ss([se("call-us-window")],ls);const us=async(e,t,n,i,o,a,s)=>{const l="+1"+e.replace("(","").replace(")","").replace(" ","").replace("-",""),u=new URLSearchParams(window.location.search),d={building_id:t,lead_sources:o,phone_number:l,referrer:document.referrer,query_params:Object.fromEntries(u.entries()),conversation_tracking_id:a,lead_sources_with_timestamps:(null!=s?s:[]).map(e=>Tr({...e}))};$o("textUsSubmitted",{phone:l,originatingSource:o.find(e=>"property-website"!==e)||null,conversationTrackingId:null!=a?a:null}),await r().post("https://app.meetelise.com/platformApi/state/create/textMe",d,{headers:{"building-slug":i,"org-slug":n,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE"}})},ds=u`
|
|
3376
3385
|
:host {
|
|
3377
3386
|
display: block;
|
|
3378
3387
|
position: relative;
|
|
@@ -3684,10 +3693,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3684
3693
|
margin: 2px 0;
|
|
3685
3694
|
}
|
|
3686
3695
|
}
|
|
3687
|
-
`;class
|
|
3696
|
+
`;class cs{constructor(e={}){var t,n,i,r,o,a;this.id=null!==(t=e.id)&&void 0!==t?t:"",this.description=null!==(n=e.description)&&void 0!==n?n:"",this.type=null!==(i=e.type)&&void 0!==i?i:"",this.rent=null!==(r=e.rent)&&void 0!==r?r:0,this.rentFrequency=null!==(o=e.rentFrequency)&&void 0!==o?o:"monthly",this.available=null!==(a=e.available)&&void 0!==a&&a,this.reservedUntil=e.reservedUntil?new Date(e.reservedUntil):void 0}}class hs{constructor(e={}){var t,n,i,r,o;this.description=null!==(t=e.description)&&void 0!==t?t:"",this.type=null!==(n=e.type)&&void 0!==n?n:"",this.minAvailableItem=e.minAvailableItem?new cs(e.minAvailableItem):void 0,this.maxAvailableItem=e.maxAvailableItem?new cs(e.maxAvailableItem):void 0,this.allItems=(null!==(i=e.allItems)&&void 0!==i?i:[]).map(e=>new cs(e)),this.rent=null!==(r=e.rent)&&void 0!==r?r:0,this.priceDescription=null!==(o=e.priceDescription)&&void 0!==o?o:""}get displayName(){return this.description}get itemDescription(){return this.description}}var ps,fs;!function(e){e.NEVER="NEVER",e.AS_NEEDED="AS_NEEDED",e.ONE_TIME="ONE_TIME",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY",e.BI_WEEKLY="BI_WEEKLY",e.ANNUALLY="ANNUALLY",e.DAILY="DAILY"}(ps||(ps={})),function(e){e.Rent="Rent",e.Utility="Utility",e.ApplicationFee="ApplicationFee",e.Parking="Parking",e.Insurance="Insurance",e.Storage="Storage",e.PetFee="PetFee",e.PetRent="PetRent",e.PetDeposit="PetDeposit",e.SecurityDeposit="SecurityDeposit",e.MoveInFee="MoveInFee",e.Other="Other"}(fs||(fs={}));class gs{constructor(e={}){var t,n,i,r,o,a,s,l,u;this.id=null!==(t=e.id)&&void 0!==t?t:"",this.building_id=e.building_id,this.fee_name=null!==(n=e.fee_name)&&void 0!==n?n:"",this.amount=e.amount,this.amount_display=null!==(i=e.amount_display)&&void 0!==i?i:"",this.min_estimate=e.min_estimate,this.max_estimate=e.max_estimate,this.percent_rent=e.percent_rent,this.percent_rent_min=e.percent_rent_min,this.percent_rent_max=e.percent_rent_max,this.frequency=null!==(r=e.frequency)&&void 0!==r?r:ps.ONE_TIME,this.category=null!==(o=e.category)&&void 0!==o?o:fs.Other,this.description=e.description,this.additional_info=e.additional_info,this.refundable=null!==(a=e.refundable)&&void 0!==a&&a,this.hidden_reason=e.hidden_reason,this.unit_ids=e.unit_ids,this.layout_ids=e.layout_ids,this.public_facing=null===(s=e.public_facing)||void 0===s||s,this.per_applicant=null!==(l=e.per_applicant)&&void 0!==l&&l,this.required_for_quotes=null!==(u=e.required_for_quotes)&&void 0!==u&&u,this.charge_code=e.charge_code,this.bundle_key=e.bundle_key,this.external_key=e.external_key}get displayFrequency(){return this.frequency.replace(/_/g," ").toLowerCase().replace(/\b\w/g,e=>e.toUpperCase())}get isOptional(){return!this.required_for_quotes}}const ms=class{constructor(){this.params=new URLSearchParams}addSingle(e,t){return t?(this.params.append(e,t),this):this}addArray(e,t){return t?(t.forEach(t=>{t&&this.params.append(`${e}[]`,t)}),this):this}build(){return this.params.toString()?`?${this.params.toString()}`:""}},ys=Sr,bs=e=>new gs(e),vs=e=>new hs(e),ws=async(e,t)=>{try{const n=(new ms).addArray("layout_ids",null==t?void 0:t.map(e=>e.toString())),i=await r().get(`${ys}/platformApi/webchat/${e}/marketable-fees?${n.build()}`);if(i.data){const e=Er(i.data);return{fees:e.fees.map(bs),rentableItems:e.rentableItems.map(vs),buildingIncentives:e.buildingIncentives}}}catch(t){Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_GETTING_FEES]",logData:{error:t},error:t})}return{fees:[],rentableItems:[],buildingIncentives:[]}},Cs=-1,xs=Sr,$s=async({buildingSlug:e,unitId:t,chargeInputs:n,rentableItems:i,leaseTerm:o,moveInDate:a},s)=>{try{const l=await r().post(`${xs}/platformApi/webchat/${e}/quote/calculate`,Tr({unitId:t,chargeInputs:n,rentableItems:i,leaseTerm:o,moveInDate:a}),{signal:s});if(l.data){return Er(l.data)}}catch(t){"ERR_CANCELED"!==t.code&&Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{error:t},error:t})}return{quote:{}}},Ss=(e="black")=>B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none">
|
|
3688
3697
|
<line x1="1.70782" y1="13.2254" x2="13.2376" y2="1.69554" stroke="${e}" stroke-width="2.13401"/>
|
|
3689
3698
|
<path d="M2.00929 1.99996L13.3328 13.3421" stroke="${e}" stroke-width="2.13401"/>
|
|
3690
|
-
</svg>`,
|
|
3699
|
+
</svg>`,As=Sr,Es=async({buildingSlug:e,numBedrooms:t,moveInDateString:n,leaseTerm:i})=>{try{const a=(({numBedrooms:e,moveInDateString:t,leaseTerm:n})=>{const i=new ms;return i.addArray("num_bedrooms",null==e?void 0:e.map(e=>e.toString())).addSingle("move_in_date_earliest",t).addSingle("move_in_date_latest",t).addSingle("lease_term_min",null==n?void 0:n.toString()),i.build()})({numBedrooms:t,moveInDateString:n,leaseTerm:i}),s=await r().get(`${As}/platformApi/webchat/${e}/units${a}`);if(s.data){const e=Er(s.data);return o=e.map(e=>({...e,id:parseInt(e.id.toString().substring(1))})),[...o].sort((e,t)=>e.startingPrice-t.startingPrice||e.id-t.id)}}catch(r){Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_GETTING_UNITS]",logData:{error:r,params:{numBedrooms:t,moveInDateString:n,leaseTerm:i}},error:r})}var o;return[]},Ts=({color:e="#347FF7",size:t=24}={})=>B`
|
|
3691
3700
|
<svg aria-hidden="true" focusable="false" width="${t}" height="${t}" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3692
3701
|
<g id="Frame" clip-path="url(#clip0_18718_332018)">
|
|
3693
3702
|
<path id="Vector" d="M3 12.5C3 13.6819 3.23279 14.8522 3.68508 15.9442C4.13738 17.0361 4.80031 18.0282 5.63604 18.864C6.47177 19.6997 7.46392 20.3626 8.55585 20.8149C9.64778 21.2672 10.8181 21.5 12 21.5C13.1819 21.5 14.3522 21.2672 15.4442 20.8149C16.5361 20.3626 17.5282 19.6997 18.364 18.864C19.1997 18.0282 19.8626 17.0361 20.3149 15.9442C20.7672 14.8522 21 13.6819 21 12.5C21 11.3181 20.7672 10.1478 20.3149 9.05585C19.8626 7.96392 19.1997 6.97177 18.364 6.13604C17.5282 5.30031 16.5361 4.63738 15.4442 4.18508C14.3522 3.73279 13.1819 3.5 12 3.5C10.8181 3.5 9.64778 3.73279 8.55585 4.18508C7.46392 4.63738 6.47177 5.30031 5.63604 6.13604C4.80031 6.97177 4.13738 7.96392 3.68508 9.05585C3.23279 10.1478 3 11.3181 3 12.5Z" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -3700,7 +3709,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3700
3709
|
</clipPath>
|
|
3701
3710
|
</defs>
|
|
3702
3711
|
</svg>
|
|
3703
|
-
`,
|
|
3712
|
+
`,ks=u`
|
|
3704
3713
|
:host {
|
|
3705
3714
|
display: block;
|
|
3706
3715
|
margin-bottom: 20px;
|
|
@@ -3734,9 +3743,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3734
3743
|
color: #868e96;
|
|
3735
3744
|
font-size: 0.8rem;
|
|
3736
3745
|
}
|
|
3737
|
-
`;var
|
|
3746
|
+
`;var _s=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 Os=class extends oe{constructor(){super(...arguments),this.promoAmount="0",this.promoDescription="",this.promoValidity=""}render(){return R`
|
|
3738
3747
|
<div class="promo-card">
|
|
3739
|
-
<div class="icon-container">${
|
|
3748
|
+
<div class="icon-container">${Ts()}</div>
|
|
3740
3749
|
<div class="content-container">
|
|
3741
3750
|
<h2 class="promo-heading">
|
|
3742
3751
|
${this.promoAmount} ${this.promoDescription}
|
|
@@ -3744,7 +3753,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3744
3753
|
<div class="promo-subtitle">${this.promoValidity}</div>
|
|
3745
3754
|
</div>
|
|
3746
3755
|
</div>
|
|
3747
|
-
`}};
|
|
3756
|
+
`}};Os.styles=ks,_s([ue({type:String})],Os.prototype,"promoAmount",void 0),_s([ue({type:String})],Os.prototype,"promoDescription",void 0),_s([ue({type:String})],Os.prototype,"promoValidity",void 0),Os=_s([se("promo-card")],Os);const Ps=u`
|
|
3748
3757
|
:host {
|
|
3749
3758
|
display: block;
|
|
3750
3759
|
}
|
|
@@ -3921,7 +3930,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3921
3930
|
overflow-x: auto;
|
|
3922
3931
|
}
|
|
3923
3932
|
}
|
|
3924
|
-
`,
|
|
3933
|
+
`,Is=u`
|
|
3925
3934
|
:host {
|
|
3926
3935
|
display: block;
|
|
3927
3936
|
}
|
|
@@ -4025,7 +4034,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4025
4034
|
margin-right: 8px;
|
|
4026
4035
|
}
|
|
4027
4036
|
}
|
|
4028
|
-
`;var
|
|
4037
|
+
`;var Ns=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 Ms=class extends oe{constructor(){super(...arguments),this.unit={},this.onUnitSelect=null,this.selected=!1}get bedAndBathText(){return`${0===this.unit.numberOfBedrooms?"studio":`${this.unit.numberOfBedrooms}bd`} | ${this.unit.numberOfBathrooms}ba`}get priceRange(){return this.unit.startingPrice===this.unit.maxPrice?`$${this.unit.startingPrice}`:`$${this.unit.startingPrice} - $${this.unit.maxPrice}`}handleOnUnitSelect(){var e;this.selected||(this.selected=!this.selected,null===(e=this.onUnitSelect)||void 0===e||e.call(this,this.unit))}handleOnImgClick(e){const t=e.target;window.open(t.src,"_blank")}render(){return R`
|
|
4029
4038
|
<div class="floorplan-image-card ${this.selected?"selected":""}">
|
|
4030
4039
|
<div class="section-left">
|
|
4031
4040
|
${this.unit.floorplanUrl?R`
|
|
@@ -4050,7 +4059,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4050
4059
|
</p>
|
|
4051
4060
|
</div>
|
|
4052
4061
|
</div>
|
|
4053
|
-
`}};
|
|
4062
|
+
`}};Ms.styles=Is,Ns([ue({type:Object})],Ms.prototype,"unit",void 0),Ns([ue()],Ms.prototype,"onUnitSelect",void 0),Ns([ue({type:Boolean})],Ms.prototype,"selected",void 0),Ms=Ns([se("floorplan-image-card")],Ms);var Ds=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 Ls=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.layoutOptions=[],this.selectedLayoutIds=[Cs],this.units=[],this.isLoading=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.moveInDate=Ar,this.leaseTerm=12,this.selectedUnit=null,this.handleUnitSelect=e=>{var t;this.selectedUnit=e,null===(t=this.onUnitSelect)||void 0===t||t.call(this,e)},this.handleLayoutChange=e=>{var t;let n;e===Cs?n=[Cs]:this.selectedLayoutIds.includes(Cs)?n=[e]:this.selectedLayoutIds.includes(e)?(n=this.selectedLayoutIds.filter(t=>t!==e),0===n.length&&(n=[Cs])):n=[...this.selectedLayoutIds,e],this.selectedLayoutIds=n,null===(t=this.onSelectLayout)||void 0===t||t.call(this,this.selectedLayoutIds)},this.handleMoveInDateChange=e=>{var t;const n=e.target.value;if(n){const[e,t,i]=n.split("-").map(Number);this.moveInDate=new Date(e,t-1,i)}else this.moveInDate=Ar;null===(t=this.onMoveInDateChange)||void 0===t||t.call(this,n||Ar.toISOString().split("T")[0])},this.handleLeaseTermChange=e=>{var t;this.leaseTerm=parseInt(e.target.value),null===(t=this.onLeaseTermChange)||void 0===t||t.call(this,this.leaseTerm)},this.renderUnitSelection=()=>{var e,t;return this.isLoading?R`
|
|
4054
4063
|
<div class="unit-selection">
|
|
4055
4064
|
<div class="image-carousel">
|
|
4056
4065
|
${Array.from({length:3},()=>R`<div class="unit-card-skeleton shimmer"></div>`)}
|
|
@@ -4088,7 +4097,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4088
4097
|
</div>
|
|
4089
4098
|
`)}
|
|
4090
4099
|
</div>
|
|
4091
|
-
`}get displayOptions(){const e=e=>{let t=e;return Object.entries({zero:"0",one:"1",two:"2",three:"3",four:"4",five:"5",six:"6",seven:"7",eight:"8",nine:"9",ten:"10",eleven:"11",twelve:"12"}).forEach(([e,n])=>{const i=new RegExp(`\\b${e}\\b`,"gi");t=t.replace(i,n)}),t};return[{value:
|
|
4100
|
+
`}get displayOptions(){const e=e=>{let t=e;return Object.entries({zero:"0",one:"1",two:"2",three:"3",four:"4",five:"5",six:"6",seven:"7",eight:"8",nine:"9",ten:"10",eleven:"11",twelve:"12"}).forEach(([e,n])=>{const i=new RegExp(`\\b${e}\\b`,"gi");t=t.replace(i,n)}),t};return[{value:Cs,label:"All"},...this.layoutOptions].map(t=>({...t,label:e(t.label.replace(/bedroom/gi,"bd"))})).sort((e,t)=>e.value-t.value)}render(){var e,t;return R`
|
|
4092
4101
|
<div class="floor-plan-selector">
|
|
4093
4102
|
<div class="floor-plan-selector-label">Select Floor Plan</div>
|
|
4094
4103
|
${this.renderBadges()}
|
|
@@ -4119,7 +4128,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4119
4128
|
${this.renderUnitSelection()}
|
|
4120
4129
|
</div>
|
|
4121
4130
|
</div>
|
|
4122
|
-
`}};
|
|
4131
|
+
`}};Ls.styles=Ps,Ds([ue({type:String})],Ls.prototype,"buildingSlug",void 0),Ds([ue({type:Array})],Ls.prototype,"layoutOptions",void 0),Ds([ue({type:Array})],Ls.prototype,"selectedLayoutIds",void 0),Ds([ue({type:Array})],Ls.prototype,"units",void 0),Ds([ue({type:Boolean})],Ls.prototype,"isLoading",void 0),Ds([ue({type:Boolean})],Ls.prototype,"isLoadingLayouts",void 0),Ds([ue()],Ls.prototype,"onSelectLayout",void 0),Ds([ue()],Ls.prototype,"onUnitSelect",void 0),Ds([ue()],Ls.prototype,"onMoveInDateChange",void 0),Ds([ue()],Ls.prototype,"onLeaseTermChange",void 0),Ds([de()],Ls.prototype,"moveInDate",void 0),Ds([de()],Ls.prototype,"leaseTerm",void 0),Ds([de()],Ls.prototype,"selectedUnit",void 0),Ls=Ds([se("floor-plan-selector")],Ls);const Us=u`
|
|
4123
4132
|
:host {
|
|
4124
4133
|
display: block;
|
|
4125
4134
|
width: 100%;
|
|
@@ -4165,7 +4174,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4165
4174
|
font-size: 1rem;
|
|
4166
4175
|
align-self: center;
|
|
4167
4176
|
}
|
|
4168
|
-
`;var
|
|
4177
|
+
`;var Rs=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 Bs=class extends oe{constructor(){super(...arguments),this.feeQuote=null}get name(){var e,t;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem)return Dr(this.feeQuote.sourceRentableItem.description||"");const n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee;return(null==n?void 0:n.feeName)?Dr(n.feeName):""}get description(){var e,t,n,i;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem){return`${this.feeQuote.sourceRentableItem.id}`}return null!==(i=null===(n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee)||void 0===n?void 0:n.description)&&void 0!==i?i:""}get additionalInfo(){var e,t,n;return null!==(n=null===(t=null===(e=this.feeQuote)||void 0===e?void 0:e.marketableFee)||void 0===t?void 0:t.additionalInfo)&&void 0!==n?n:""}get triggeredEvent(){var e,t;const n=null===(t=null===(e=this.feeQuote)||void 0===e?void 0:e.marketableFee)||void 0===t?void 0:t.triggeredByEvent;if(!n)return"";return{APPLICATION_SUBMISSION:"Due at Application Submission",APPLICATION_APPROVAL:"Due at Application Approval",LEASE_SIGNING:"Due at Lease Signing",MOVE_IN:"Due at Move-In"}[n]||n}get amount(){var e;if(!this.feeQuote)return null;const t=null!==(e=this.feeQuote.amountRange.fixedValue)&&void 0!==e?e:0;return 0===t?null:Lr(t,2)}render(){return this.feeQuote&&this.amount?R`
|
|
4169
4178
|
<div class="fee-item">
|
|
4170
4179
|
<div class="fee-info">
|
|
4171
4180
|
<div class="fee-name">${this.name}</div>
|
|
@@ -4179,7 +4188,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4179
4188
|
</div>
|
|
4180
4189
|
<div class="fee-amount">${this.amount}</div>
|
|
4181
4190
|
</div>
|
|
4182
|
-
`:R``}};
|
|
4191
|
+
`:R``}};Bs.styles=Us,Rs([ue({type:Object})],Bs.prototype,"feeQuote",void 0),Bs=Rs([se("fee-item")],Bs);var js=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 Fs=class extends oe{constructor(){super(...arguments),this.feeQuotes=[]}get itemType(){const e=this.feeQuotes[0];return(null==e?void 0:e.sourceRentableItem)?Dr(e.sourceRentableItem.description||""):""}get priceGroups(){const e=new Map;return this.feeQuotes.forEach(t=>{var n;const i=null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0;e.set(i,(e.get(i)||0)+1)}),Array.from(e.entries()).map(([e,t])=>({price:e,count:t})).sort((e,t)=>e.price-t.price)}get totalAmount(){const e=this.feeQuotes.reduce((e,t)=>{var n;return e+(null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0)},0);return Lr(e,2)}get priceBreakdown(){const e=this.priceGroups;if(0===e.length)return"";const t=this.getUnitName();return e.map(e=>{return`${e.count} ${n=t,i=e.count,1===i?n:`${n}s`} @ ${Lr(e.price,2)}/month`;var n,i}).join(" + ")}getUnitName(){var e;const t=this.feeQuotes[0];return function(e){const t=e.toLowerCase();return t.includes("garage")||t.includes("parking")?"space":t.includes("storage")?"unit":t.includes("locker")?"locker":t.includes("bike")?"spot":"unit"}((null===(e=null==t?void 0:t.sourceRentableItem)||void 0===e?void 0:e.description)||"")}render(){return this.feeQuotes.length&&this.totalAmount!==Lr(0,2)?R`
|
|
4183
4192
|
<div class="fee-item">
|
|
4184
4193
|
<div class="fee-info">
|
|
4185
4194
|
<div class="fee-name">${this.itemType}</div>
|
|
@@ -4187,7 +4196,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4187
4196
|
</div>
|
|
4188
4197
|
<div class="fee-amount">${this.totalAmount}</div>
|
|
4189
4198
|
</div>
|
|
4190
|
-
`:R``}};
|
|
4199
|
+
`:R``}};Fs.styles=Us,js([ue({type:Array})],Fs.prototype,"feeQuotes",void 0),Fs=js([se("grouped-rentable-item")],Fs);const Hs=u`
|
|
4191
4200
|
.fee-card-section-container {
|
|
4192
4201
|
margin: 0 12px;
|
|
4193
4202
|
border-radius: 4px;
|
|
@@ -4247,7 +4256,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4247
4256
|
margin: 12px;
|
|
4248
4257
|
justify-content: space-between;
|
|
4249
4258
|
}
|
|
4250
|
-
`;var
|
|
4259
|
+
`;var Gs=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 zs=class extends oe{constructor(){super(...arguments),this.title="Fees",this.fees=[],this.buildingFeesToQuantity={},this.handleQuantityChange=(e,t)=>{this.buildingFeesToQuantity[e]=t,this.requestUpdate()}}get totalAmount(){const e=this.fees.reduce((e,t)=>{var n;return e+(null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0)},0);return Lr(e,2)}get groupedRentableItems(){const e=this.fees.filter(e=>e.sourceRentableItem);e.sort((e,t)=>{var n,i;const r=(null===(n=e.sourceRentableItem)||void 0===n?void 0:n.description)||"",o=(null===(i=t.sourceRentableItem)||void 0===i?void 0:i.description)||"";return r.localeCompare(o,navigator.language,{numeric:!0})});const t={};return e.forEach(e=>{var n;const i=(null===(n=e.sourceRentableItem)||void 0===n?void 0:n.description)||"unknown";t[i]||(t[i]=[]),t[i].push(e)}),t}get nonRentableItems(){return this.fees.filter(e=>!e.sourceRentableItem)}render(){return R`
|
|
4251
4260
|
<div class="fee-card-section-container">
|
|
4252
4261
|
<div class="fee-card-section-header">
|
|
4253
4262
|
<h1 class="section-title">${this.title}</h1>
|
|
@@ -4271,7 +4280,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4271
4280
|
</div>
|
|
4272
4281
|
</div>
|
|
4273
4282
|
</div>
|
|
4274
|
-
`}};
|
|
4283
|
+
`}};zs.styles=Hs,Gs([ue({type:String})],zs.prototype,"title",void 0),Gs([ue({type:Array})],zs.prototype,"fees",void 0),Gs([de()],zs.prototype,"buildingFeesToQuantity",void 0),zs=Gs([se("fee-card")],zs);const Qs=u`
|
|
4275
4284
|
:host {
|
|
4276
4285
|
--transition-timing: 0.2s ease;
|
|
4277
4286
|
display: flex;
|
|
@@ -4473,7 +4482,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4473
4482
|
font-weight: bold;
|
|
4474
4483
|
color: #0066cc;
|
|
4475
4484
|
}
|
|
4476
|
-
`;var
|
|
4485
|
+
`;var Ws;!function(e){e.NEVER="NEVER",e.ONE_TIME="ONE_TIME",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY",e.BI_WEEKLY="BI_WEEKLY",e.ANNUALLY="ANNUALLY",e.DAILY="DAILY"}(Ws||(Ws={}));var Vs=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 qs=class extends oe{constructor(){super(...arguments),this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1,num_cats:0,num_dogs:0,num_other_pets:0},this.onChargeInputsChange=null,this.disabled=!1,this.rentableItems=[],this.selectedRentableItems=[],this.onRentableItemAdd=null,this.onRentableItemRemove=null,this.handleRentableItemToggle=e=>{var t,n;if(this.selectedRentableItems.some(t=>t.type===e.type)){const n=this.selectedRentableItems.find(t=>t.type===e.type);n&&(null===(t=this.onRentableItemRemove)||void 0===t||t.call(this,n))}else{const t=e.minAvailableItem||e.allItems[0];if(t){const i={id:t.id,type:e.type};null===(n=this.onRentableItemAdd)||void 0===n||n.call(this,i)}}}}handleIncrement(e){var t,n;const i=(null!==(t=this.chargeInputs[e])&&void 0!==t?t:0)+1;"num_cats"===e||"num_dogs"===e||"num_other_pets"===e?this.updatePetCount({[e]:i}):null===(n=this.onChargeInputsChange)||void 0===n||n.call(this,{[e]:i})}handleDecrement(e){var t,n;const i=null!==(t=this.chargeInputs[e])&&void 0!==t?t:0,r="num_applicants"===e?1:0,o=Math.max(r,i-1);"num_cats"===e||"num_dogs"===e||"num_other_pets"===e?this.updatePetCount({[e]:o}):null===(n=this.onChargeInputsChange)||void 0===n||n.call(this,{[e]:o})}updatePetCount(e){var t,n,i,r;const o={...this.chargeInputs,...e},a=(null!==(t=o.num_cats)&&void 0!==t?t:0)+(null!==(n=o.num_dogs)&&void 0!==n?n:0)+(null!==(i=o.num_other_pets)&&void 0!==i?i:0);null===(r=this.onChargeInputsChange)||void 0===r||r.call(this,{...e,num_pets:a})}getFieldLabel(e){return{base_rent:"Base Rent ($)",num_pets:"Pets",num_vehicles:"Vehicles",num_applicants:"Applicants",num_cats:"Cats",num_dogs:"Dogs",num_other_pets:"All Other Pets"}[e]||e}renderRentableItemRow(e){const t=this.selectedRentableItems.some(t=>t.type===e.type);return R`
|
|
4477
4486
|
<div class="rentable-item-row">
|
|
4478
4487
|
<div class="rentable-item-info">
|
|
4479
4488
|
<div class="rentable-item-label">${e.description}</div>
|
|
@@ -4529,7 +4538,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4529
4538
|
</div>
|
|
4530
4539
|
`:""}
|
|
4531
4540
|
</div>
|
|
4532
|
-
`}};
|
|
4541
|
+
`}};qs.styles=u`
|
|
4533
4542
|
.charge-inputs-container {
|
|
4534
4543
|
background: white;
|
|
4535
4544
|
border-radius: 8px;
|
|
@@ -4666,7 +4675,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4666
4675
|
opacity: 0.5;
|
|
4667
4676
|
cursor: not-allowed;
|
|
4668
4677
|
}
|
|
4669
|
-
`,
|
|
4678
|
+
`,Vs([ue({type:Object})],qs.prototype,"chargeInputs",void 0),Vs([ue()],qs.prototype,"onChargeInputsChange",void 0),Vs([ue({type:Boolean})],qs.prototype,"disabled",void 0),Vs([ue({type:Array})],qs.prototype,"rentableItems",void 0),Vs([ue({type:Array})],qs.prototype,"selectedRentableItems",void 0),Vs([ue()],qs.prototype,"onRentableItemAdd",void 0),Vs([ue()],qs.prototype,"onRentableItemRemove",void 0),qs=Vs([se("charge-inputs")],qs);const Ys=u`
|
|
4670
4679
|
:host {
|
|
4671
4680
|
--skeleton-bg-color: #eaeaea;
|
|
4672
4681
|
--skeleton-highlight-color: #f5f5f5;
|
|
@@ -4680,8 +4689,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4680
4689
|
background-position: 200px 0;
|
|
4681
4690
|
}
|
|
4682
4691
|
}
|
|
4683
|
-
`,
|
|
4684
|
-
${
|
|
4692
|
+
`,Ks=u`
|
|
4693
|
+
${Ys}
|
|
4685
4694
|
|
|
4686
4695
|
:host {
|
|
4687
4696
|
display: block;
|
|
@@ -4746,8 +4755,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4746
4755
|
margin-bottom: 10px;
|
|
4747
4756
|
}
|
|
4748
4757
|
}
|
|
4749
|
-
`,
|
|
4750
|
-
${
|
|
4758
|
+
`,Xs=u`
|
|
4759
|
+
${Ys}
|
|
4751
4760
|
|
|
4752
4761
|
:host {
|
|
4753
4762
|
display: block;
|
|
@@ -4769,16 +4778,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4769
4778
|
box-sizing: border-box;
|
|
4770
4779
|
}
|
|
4771
4780
|
}
|
|
4772
|
-
`;var
|
|
4781
|
+
`;var Zs=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 Js=class extends oe{constructor(){super(...arguments),this.rows=2,this.header=!0}render(){return R`
|
|
4773
4782
|
<div class="skeleton-card">
|
|
4774
4783
|
${this.header?R`<div class="skeleton-header"></div>`:""}
|
|
4775
4784
|
${Array(this.rows).fill(0).map(()=>R`<div class="skeleton-row"></div>`)}
|
|
4776
4785
|
</div>
|
|
4777
|
-
`}};
|
|
4786
|
+
`}};Js.styles=Ks,Zs([ue({type:Number})],Js.prototype,"rows",void 0),Zs([ue({type:Boolean})],Js.prototype,"header",void 0),Js=Zs([se("skeleton-card")],Js);var el=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 tl=class extends oe{constructor(){super(...arguments),this.cards=3,this.rowsPerCard=[3,2,1]}render(){return R`
|
|
4778
4787
|
<div class="skeleton-loader">
|
|
4779
4788
|
${Array.from({length:this.cards},(e,t)=>{const n=Array.isArray(this.rowsPerCard)?this.rowsPerCard[t]||2:this.rowsPerCard;return R`<skeleton-card .rows=${n}></skeleton-card>`})}
|
|
4780
4789
|
</div>
|
|
4781
|
-
`}};
|
|
4790
|
+
`}};tl.styles=Xs,el([ue({type:Number})],tl.prototype,"cards",void 0),el([ue({type:Array})],tl.prototype,"rowsPerCard",void 0),tl=el([se("skeleton-loader")],tl);var nl=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 il=class extends oe{constructor(){super(...arguments),this.size=64,this.spinSpeed=.8}updated(){this.style.setProperty("--mega-loader-size",`${this.size}px`),this.style.setProperty("--mega-loader-spin-speed",`${this.spinSpeed}s`)}render(){return R`<div class="spinner"></div>`}};il.styles=u`
|
|
4782
4791
|
.spinner {
|
|
4783
4792
|
border: 4px solid rgba(0, 0, 0, 0.2);
|
|
4784
4793
|
border-top: 4px solid var(--primary-color, #c057ff);
|
|
@@ -4796,7 +4805,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4796
4805
|
transform: rotate(360deg);
|
|
4797
4806
|
}
|
|
4798
4807
|
}
|
|
4799
|
-
`,
|
|
4808
|
+
`,nl([ue({type:Number})],il.prototype,"size",void 0),nl([ue({type:Number})],il.prototype,"spinSpeed",void 0),il=nl([se("mega-loader")],il);var rl=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 ol=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[Cs],this.groupedFees={[ps.ONE_TIME]:[],[ps.MONTHLY]:[],[ps.WEEKLY]:[],[ps.BI_WEEKLY]:[],[ps.ANNUALLY]:[],[ps.DAILY]:[],[ps.AS_NEEDED]:[],[ps.NEVER]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1},this.onChargeInputsChange=null,this.selectedRentableItems=[],this.onRentableItemAdd=null,this.onRentableItemRemove=null}get rentAsFeeQuote(){var e,t;return(null===(e=this.quote)||void 0===e?void 0:e.rentCost)?{marketableFee:{id:"rent",buildingId:this.quote.buildingId||0,feeName:"Rent",amount:this.quote.rentCost,amountDisplay:Lr(this.quote.rentCost,2),minEstimate:null,maxEstimate:null,percentRentMin:null,percentRentMax:null,percentRent:null,frequency:Ws.MONTHLY,category:"Rent",hiddenReason:null,description:`Unit ${null===(t=this.selectedUnit)||void 0===t?void 0:t.unitNumber}`,additionalInfo:null,refundable:!1,unitIds:null,layoutIds:null,startDate:null,endDate:null,triggeredByEvent:null,externalKey:null,chargeCode:null,bundleKey:null,source:null,publicFacing:!0,perApplicant:!1,prorated:null,syncActive:!0},amountRange:{fixedValue:this.quote.rentCost,minValue:null,maxValue:null},chargeInputs:{baseRent:this.quote.rentCost,numPets:0,numDogs:0,numCats:0,numOtherPets:0,numVehicles:0,numApplicants:1,unitId:this.quote.unitId,layoutId:null},isAddon:!1}:null}renderRecurringFeeSection(e,t){return(null==t?void 0:t.length)?R` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t;const n=[],i=[{freq:Ws.ANNUALLY,title:"Yearly Charges"},{freq:Ws.MONTHLY,title:"Monthly Charges"},{freq:Ws.BI_WEEKLY,title:"Bi-Weekly Charges"},{freq:Ws.WEEKLY,title:"Weekly Charges"},{freq:Ws.DAILY,title:"Daily Charges"},{freq:Ws.ONE_TIME,title:"One-Time"},{freq:Ws.NEVER,title:"No Charges"}],r=null===(e=this.quote)||void 0===e?void 0:e.feeQuotes;for(const{freq:e,title:o}of i){if(!(null==r?void 0:r.length)&&e!==Ws.MONTHLY)continue;let i=null!==(t=null==r?void 0:r.filter(t=>{var n,i;if((null===(n=t.marketableFee)||void 0===n?void 0:n.frequency)===e){if(e===Ws.ONE_TIME){return["APPLICATION_SUBMISSION","APPLICATION_APPROVAL","LEASE_SIGNING","MOVE_IN"].includes((null===(i=t.marketableFee)||void 0===i?void 0:i.triggeredByEvent)||"")}return!0}return!!t.sourceRentableItem&&("monthly"===t.sourceRentableItem.rentFrequency&&e===Ws.MONTHLY||"annually"===t.sourceRentableItem.rentFrequency&&e===Ws.ANNUALLY)}))&&void 0!==t?t:[];if(e===Ws.MONTHLY){const e=this.rentAsFeeQuote;e&&(i=[e,...i])}const a=this.renderRecurringFeeSection(o,i);a&&n.push(a)}return n}renderTotalCost(){var e;if(!(null===(e=this.quote)||void 0===e?void 0:e.totalMonthlyCost))return null;const t=this.quote.totalMonthlyCost.fixedValue;return t?R`
|
|
4800
4809
|
<div class="total-cost-section">
|
|
4801
4810
|
<div class="total-cost-row">
|
|
4802
4811
|
<span class="total-cost-label">Total Monthly Cost:</span>
|
|
@@ -4852,7 +4861,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4852
4861
|
|
|
4853
4862
|
${this.renderFeesContent()}
|
|
4854
4863
|
</div>
|
|
4855
|
-
`}};
|
|
4864
|
+
`}};ol.styles=Qs,rl([ue({type:String})],ol.prototype,"buildingSlug",void 0),rl([ue({type:Boolean})],ol.prototype,"showSkeletonLoader",void 0),rl([ue({type:Object})],ol.prototype,"selectedUnit",void 0),rl([ue({type:Object})],ol.prototype,"quote",void 0),rl([ue({type:Array})],ol.prototype,"layoutOptions",void 0),rl([ue({type:Array})],ol.prototype,"selectedLayoutIds",void 0),rl([ue({type:Object})],ol.prototype,"groupedFees",void 0),rl([ue({type:Array})],ol.prototype,"rentableItems",void 0),rl([ue({type:Array})],ol.prototype,"units",void 0),rl([ue({type:Boolean})],ol.prototype,"isLoadingUnits",void 0),rl([ue({type:Boolean})],ol.prototype,"isLoadingLayouts",void 0),rl([ue()],ol.prototype,"onSelectLayout",void 0),rl([ue()],ol.prototype,"onUnitSelect",void 0),rl([ue()],ol.prototype,"onMoveInDateChange",void 0),rl([ue()],ol.prototype,"onLeaseTermChange",void 0),rl([ue({type:Object})],ol.prototype,"chargeInputs",void 0),rl([ue()],ol.prototype,"onChargeInputsChange",void 0),rl([ue({type:Array})],ol.prototype,"selectedRentableItems",void 0),rl([ue()],ol.prototype,"onRentableItemAdd",void 0),rl([ue()],ol.prototype,"onRentableItemRemove",void 0),ol=rl([se("fee-calculator-layout")],ol);var al,sl,ll,ul;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(al||(al={})),function(e){e.Debit="Debit",e.Credit="Credit"}(sl||(sl={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}(ll||(ll={})),function(e){e.AdminFee="AdminFee",e.ApplicationFee="ApplicationFee",e.Concession="Concession",e.Insurance="Insurance",e.LateFee="LateFee",e.Legal="Legal",e.NonSufficientFundFee="NSF",e.Other="Other",e.Parking="Parking",e.Penalty="Penalty",e.Pest="Pest",e.PetDeposit="PetDeposit",e.PetRent="PetRent",e.Refund="Refund",e.Relet="Relet",e.Rent="Rent",e.SecurityDeposit="SecurityDeposit",e.Storage="Storage",e.Trash="Trash",e.Utility="Utility",e.WaterSewer="WaterSewer"}(ul||(ul={}));const dl=u`
|
|
4856
4865
|
:host {
|
|
4857
4866
|
display: block;
|
|
4858
4867
|
--table-header-bg: white;
|
|
@@ -4920,14 +4929,14 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4920
4929
|
color: #888;
|
|
4921
4930
|
font-style: italic;
|
|
4922
4931
|
}
|
|
4923
|
-
`;var
|
|
4932
|
+
`;var cl=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 hl=class extends oe{constructor(){super(...arguments),this.tooltip="",this.disabled=!1}render(){return R`
|
|
4924
4933
|
<div
|
|
4925
4934
|
class="tooltip-container ${this.disabled?"":"show-tooltip"}"
|
|
4926
4935
|
data-tooltip="${this.tooltip}"
|
|
4927
4936
|
>
|
|
4928
4937
|
<slot></slot>
|
|
4929
4938
|
</div>
|
|
4930
|
-
`}};
|
|
4939
|
+
`}};hl.styles=u`
|
|
4931
4940
|
:host {
|
|
4932
4941
|
display: block;
|
|
4933
4942
|
position: relative;
|
|
@@ -4961,7 +4970,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4961
4970
|
opacity: 1;
|
|
4962
4971
|
visibility: visible;
|
|
4963
4972
|
}
|
|
4964
|
-
`,
|
|
4973
|
+
`,cl([ue({type:String})],hl.prototype,"tooltip",void 0),cl([ue({type:Boolean,reflect:!0})],hl.prototype,"disabled",void 0),hl=cl([se("simple-tooltip")],hl);const pl=u`
|
|
4965
4974
|
:host {
|
|
4966
4975
|
display: inline-flex;
|
|
4967
4976
|
}
|
|
@@ -5020,7 +5029,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5020
5029
|
font-style: italic;
|
|
5021
5030
|
cursor: not-allowed;
|
|
5022
5031
|
}
|
|
5023
|
-
`;var
|
|
5032
|
+
`;var fl=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 gl=class extends oe{constructor(){super(...arguments),this.feeItem=null,this._previousFeeItemId=null,this.onQuantityChange=null,this.disabled=!1,this.quantity=0}get maxQuantity(){var e,t;return null!==(t=null===(e=this.feeItem)||void 0===e?void 0:e.max_estimate)&&void 0!==t?t:10}updated(e){var t,n;if(!e.has("feeItem"))return;const i=null!==(n=null===(t=this.feeItem)||void 0===t?void 0:t.id)&&void 0!==n?n:null;i!==this._previousFeeItemId&&(this.quantity=0,this._previousFeeItemId=i)}handleIncrement(){this.disabled||this.quantity>=this.maxQuantity||(this.quantity+=1,this.notifyQuantityChange())}handleDecrement(){this.disabled||this.quantity<=0||(this.quantity=Math.max(0,this.quantity-1),this.notifyQuantityChange())}notifyQuantityChange(){this.onQuantityChange&&this.feeItem&&this.onQuantityChange({id:this.feeItem.id,quantities:[{itemType:this.feeItem.fee_name,quantity:this.quantity}]})}render(){return this.feeItem?R`
|
|
5024
5033
|
<div class="quantity-control ${this.disabled?"unavailable":""}">
|
|
5025
5034
|
<button
|
|
5026
5035
|
class="quantity-button"
|
|
@@ -5042,7 +5051,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5042
5051
|
<span class="operator-sign">+</span>
|
|
5043
5052
|
</button>
|
|
5044
5053
|
</div>
|
|
5045
|
-
`:R``}};
|
|
5054
|
+
`:R``}};gl.styles=pl,fl([ue({type:Object})],gl.prototype,"feeItem",void 0),fl([ue()],gl.prototype,"onQuantityChange",void 0),fl([ue({type:Boolean,reflect:!0})],gl.prototype,"disabled",void 0),fl([ue({type:Number})],gl.prototype,"quantity",void 0),gl=fl([se("table-addon-qty-selector")],gl);let ml=class extends oe{constructor(){super(...arguments),this.rentableItem=null,this._previousRentableItemType=null,this.onQuantityChange=null,this.disabled=!1,this.quantity=0,this.selectedItemIds=new Set}get totalAvailableItems(){var e,t,n;return null!==(n=null===(t=null===(e=this.rentableItem)||void 0===e?void 0:e.allItems)||void 0===t?void 0:t.filter(e=>e.available).length)&&void 0!==n?n:0}get maxSelectableItems(){return Math.min(this.totalAvailableItems,10)}get atMaxUnits(){return this.quantity>=this.maxSelectableItems}get atMinUnits(){return this.quantity<=0}updated(e){var t,n;if(e.has("rentableItem")){const e=null!==(n=null===(t=this.rentableItem)||void 0===t?void 0:t.type)&&void 0!==n?n:null;e!==this._previousRentableItemType&&(this.selectedItemIds=new Set,this._previousRentableItemType=e)}}handleIncrement(){this.disabled||this.atMaxUnits||this.emitChange(this.quantity+1)}handleDecrement(){this.disabled||this.atMinUnits||this.emitChange(Math.max(0,this.quantity-1))}emitChange(e){var t;this.rentableItem&&(null===(t=this.onQuantityChange)||void 0===t||t.call(this,{type:this.rentableItem.type,quantity:e}))}render(){if(!this.rentableItem)return R``;const e=this.totalAvailableItems>0,t=this.disabled||!e||this.atMaxUnits,n=this.disabled||this.quantity<=0;return R`
|
|
5046
5055
|
<div
|
|
5047
5056
|
class="quantity-control ${!e||this.disabled?"unavailable":""}"
|
|
5048
5057
|
>
|
|
@@ -5066,7 +5075,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5066
5075
|
<span class="operator-sign">+</span>
|
|
5067
5076
|
</button>
|
|
5068
5077
|
</div>
|
|
5069
|
-
`}};
|
|
5078
|
+
`}};ml.styles=pl,fl([ue({type:Object})],ml.prototype,"rentableItem",void 0),fl([ue()],ml.prototype,"onQuantityChange",void 0),fl([ue({type:Boolean,reflect:!0})],ml.prototype,"disabled",void 0),fl([ue({type:Number})],ml.prototype,"quantity",void 0),fl([ue({type:Set})],ml.prototype,"selectedItemIds",void 0),ml=fl([se("table-rentable-item-qty-selector")],ml);var yl=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 bl=class extends oe{constructor(){super(...arguments),this._addons=[],this.disabled=!1,this.onAddonSelect=null,this.onRentableItemAdd=null,this.onRentableItemRemove=null,this.quantities=new Map,this.selectedRentableItemIds=new Map,this.handleAddonQuantityChange=e=>{var t;const n=e.id;1!==e.quantities.length||Array.isArray(this.quantities.get(n))?this.quantities.set(n,e.quantities):this.quantities.set(n,e.quantities[0].quantity),this.requestUpdate("quantities"),null===(t=this.onAddonSelect)||void 0===t||t.call(this,e)},this.handleRentableItemQuantityChange=e=>{var t,n,i,r,o,a;const s=null!==(t=this.quantities.get(e.type))&&void 0!==t?t:0;this.quantities.set(e.type,e.quantity),this.requestUpdate("quantities");const l=this.addons.find(t=>t instanceof hs&&t.type===e.type);if(!l)return;const u=null!==(n=this.selectedRentableItemIds.get(e.type))&&void 0!==n?n:new Set,d=(c=null!==(r=null===(i=l.allItems)||void 0===i?void 0:i.filter(e=>e.available))&&void 0!==r?r:[],[...c].sort((e,t)=>e.rent!==t.rent?e.rent-t.rent:e.id.localeCompare(t.id)));var c;if(e.quantity>s){const t=e.quantity-s;let n=0;const i=Math.min(d.length,10);if(u.size+t>i)return;for(const i of d){if(n>=t)break;u.has(i.id)||(u.add(i.id),null===(o=this.onRentableItemAdd)||void 0===o||o.call(this,{id:i.id,type:e.type}),n++)}}else if(e.quantity<s){const t=s-e.quantity;let n=0;const i=function(e){return[...e].sort((e,t)=>e.rent!==t.rent?t.rent-e.rent:t.id.localeCompare(e.id))}(d.filter(e=>u.has(e.id)));for(const r of i){if(n>=t)break;u.delete(r.id),null===(a=this.onRentableItemRemove)||void 0===a||a.call(this,{id:r.id,type:e.type}),n++}}this.selectedRentableItemIds.set(e.type,u),this.requestUpdate("selectedRentableItemIds")}}set addons(e){const t=this._addons;this._addons=e,e!==t&&this.initializeQuantities(),this.requestUpdate("addons",t)}get addons(){return this._addons}preserveExistingQuantity(e,t){const n=this.quantities.get(e);return null!=n?n:t}initializeRentableItemQuantity(e,t){const n=this.preserveExistingQuantity(e.type,0);t.set(e.type,n),this.selectedRentableItemIds.has(e.type)||this.selectedRentableItemIds.set(e.type,new Set)}initializeBuildingFeeQuantity(e,t){const n=e.id,i=this.preserveExistingQuantity(n,0);t.set(n,i)}initializeQuantities(){const e=new Map;this.addons.forEach(t=>{t instanceof hs?this.initializeRentableItemQuantity(t,e):this.initializeBuildingFeeQuantity(t,e)}),this.quantities=e}getName(e){return e instanceof hs?e.displayName:e.fee_name}getSortedAddons(){return[...this.addons].sort((e,t)=>{const n=this.getName(e),i=this.getName(t);return n.localeCompare(i,navigator.language,{numeric:!0})})}isRentableItemAvailable(e){var t,n;return!(e instanceof hs)||(null!==(n=null===(t=e.allItems)||void 0===t?void 0:t.filter(e=>e.available).length)&&void 0!==n?n:0)>0}renderQtySelector(e){var t;if(e instanceof hs){const n=null!==(t=this.quantities.get(e.type))&&void 0!==t?t:0;return R`
|
|
5070
5079
|
<table-rentable-item-qty-selector
|
|
5071
5080
|
.rentableItem=${e}
|
|
5072
5081
|
.quantity=${n}
|
|
@@ -5107,7 +5116,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5107
5116
|
</tbody>
|
|
5108
5117
|
</table>
|
|
5109
5118
|
</div>
|
|
5110
|
-
`:R`<div class="empty-state">No add-ons available</div> `}};
|
|
5119
|
+
`:R`<div class="empty-state">No add-ons available</div> `}};bl.styles=dl,yl([ue({type:Array})],bl.prototype,"addons",null),yl([ue({type:Boolean})],bl.prototype,"disabled",void 0),yl([ue()],bl.prototype,"onAddonSelect",void 0),yl([ue({attribute:!1})],bl.prototype,"onRentableItemAdd",void 0),yl([ue({attribute:!1})],bl.prototype,"onRentableItemRemove",void 0),yl([de()],bl.prototype,"quantities",void 0),yl([de()],bl.prototype,"selectedRentableItemIds",void 0),bl=yl([se("addon-table")],bl);var vl=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 wl=class extends oe{constructor(){super(...arguments),this.id="",this.showChatAdditionalActions=!1,this.buildingWebchatView=null,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.enabledChatWidgets={callDesktop:!1,chatDesktop:!1,emailDesktop:!1,textDesktop:!1,sstDesktop:!1},this.onClickMinimize=()=>{},this.onClickEmailOption=()=>{},this.onClickPhoneOption=()=>{},this.onClickSSTOption=()=>{},this.onClose=()=>{}}render(){var e,t,n;const i=this.primaryColor||qn,r=this.backgroundColor||"#ffffff",o=this.buildingWebchatView&&Jn(this.buildingWebchatView.orgId,this.buildingWebchatView.id)&&i!==qn?Zn(i,.6):"black";return R`
|
|
5111
5120
|
<style>
|
|
5112
5121
|
#${this.id}::after {
|
|
5113
5122
|
border-right-color: ${o} !important;
|
|
@@ -5139,7 +5148,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5139
5148
|
.onClick=${this.onClose}
|
|
5140
5149
|
></minimize-expand-button>
|
|
5141
5150
|
</div>
|
|
5142
|
-
`}};
|
|
5151
|
+
`}};wl.styles=u`
|
|
5143
5152
|
.hideTab {
|
|
5144
5153
|
display: none;
|
|
5145
5154
|
}
|
|
@@ -5149,7 +5158,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5149
5158
|
justify-content: space-between;
|
|
5150
5159
|
gap: 32px;
|
|
5151
5160
|
}
|
|
5152
|
-
`,
|
|
5161
|
+
`,vl([ue({type:String})],wl.prototype,"id",void 0),vl([ue({type:Boolean})],wl.prototype,"showChatAdditionalActions",void 0),vl([ue({type:Object})],wl.prototype,"buildingWebchatView",void 0),vl([ue({type:String})],wl.prototype,"primaryColor",void 0),vl([ue({type:String})],wl.prototype,"backgroundColor",void 0),vl([ue({type:String})],wl.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),vl([ue({type:String})],wl.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),vl([ue({type:Object})],wl.prototype,"enabledChatWidgets",void 0),vl([ue({attribute:!0})],wl.prototype,"onClickMinimize",void 0),vl([ue({attribute:!0})],wl.prototype,"onClickEmailOption",void 0),vl([ue({attribute:!0})],wl.prototype,"onClickPhoneOption",void 0),vl([ue({attribute:!0})],wl.prototype,"onClickSSTOption",void 0),vl([ue({attribute:!0})],wl.prototype,"onClose",void 0),wl=vl([se("chat-additional-actions")],wl);const Cl=u`
|
|
5153
5162
|
:host {
|
|
5154
5163
|
display: block;
|
|
5155
5164
|
}
|
|
@@ -5186,9 +5195,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5186
5195
|
font-size: 0.9rem;
|
|
5187
5196
|
opacity: 0.9;
|
|
5188
5197
|
}
|
|
5189
|
-
`;var
|
|
5198
|
+
`;var xl=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 $l=class extends oe{getFormattedEndDate(e){return new Date(e.endDate).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}render(){return this.incentive?R`
|
|
5190
5199
|
<div class="incentive-banner">
|
|
5191
|
-
<div class="incentive-icon">${
|
|
5200
|
+
<div class="incentive-icon">${Ts({size:32})}</div>
|
|
5192
5201
|
<div class="incentive-content">
|
|
5193
5202
|
<h2 class="incentive-title">
|
|
5194
5203
|
${this.incentive.originalIncentiveString}
|
|
@@ -5199,7 +5208,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5199
5208
|
</p>
|
|
5200
5209
|
</div>
|
|
5201
5210
|
</div>
|
|
5202
|
-
`:R``}}
|
|
5211
|
+
`:R``}};$l.styles=Cl,xl([ue({type:Object})],$l.prototype,"incentive",void 0),$l=xl([se("incentive-banner")],$l);var Sl=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 Al=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.primaryColor=qn,this.backgroundColor=Yn,this.onCloseClicked=null,this.onClickEmailOption=null,this.onClickPhoneOption=null,this.onClickSSTOption=null,this.onClickTextUsOption=null,this.isCalculatingQuote=!1,this.isLoadingLayouts=!0,this.isExporting=!1,this.selectedLayoutIds=[Cs],this.selectedUnit=null,this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1,num_cats:0,num_dogs:0,num_other_pets:0},this.desiredRentableItems=[],this.moveInDateString=Ar.toISOString().split("T")[0],this.leaseTerm=12,this.buildingWebchatView=null,this.incentives=[],this.quote=null,this.pdfUrl=null,this.groupedFees={[ps.ONE_TIME]:[],[ps.MONTHLY]:[],[ps.WEEKLY]:[],[ps.BI_WEEKLY]:[],[ps.ANNUALLY]:[],[ps.DAILY]:[],[ps.AS_NEEDED]:[],[ps.NEVER]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!0,this.quoteAbortController=null,this.quoteDebounceTimer=null,this.startQuoteApiCall=async()=>{var e;null===(e=this.quoteAbortController)||void 0===e||e.abort(),this.quoteAbortController=new AbortController,this.isCalculatingQuote=!0,await this.performQuoteCalculation(this.quoteAbortController.signal)},this.firstUpdated=async()=>{this.style.setProperty("--primary-color",this.primaryColor),this.style.setProperty("--background-color",this.backgroundColor),await Promise.allSettled([this.setupCalculator(),this.fetchUnits()])},this.setupCalculator=async()=>{if(!this.buildingSlug||!this.orgSlug)return void(this.isLoadingLayouts=!1);const e=Jo(this.orgSlug,this.buildingSlug).then(e=>{e&&(this.buildingWebchatView=e)}).finally(()=>{this.isLoadingLayouts=!1}),t=ws(this.buildingSlug).then(e=>{e&&(this.groupedFees=this.groupFees(e.fees),this.rentableItems=e.rentableItems)});await Promise.allSettled([e,t])},this.requestQuoteCalculation=()=>{if(this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);this.quoteDebounceTimer=window.setTimeout(()=>{this.startQuoteApiCall(),this.quoteDebounceTimer=null},1e3)},this.handleUnitSelect=e=>{const t=!this.selectedUnit;if(this.selectedUnit=e,t)return this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),this.isCalculatingQuote=!0,void this.startQuoteApiCall();this.requestQuoteCalculation()},this.handleMoveInDateChange=async e=>{this.moveInDateString=e,this.quote=null,this.pdfUrl=null,await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleLeaseTermChange=async e=>{this.leaseTerm=e,this.quote=null,this.pdfUrl=null,await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleChargeInputsChange=e=>{this.chargeInputs={...this.chargeInputs,...e},this.requestQuoteCalculation()},this.handleRentableItemAdd=e=>{this.desiredRentableItems.some(t=>t.id===e.id)||this.desiredRentableItems.push(e),this.requestQuoteCalculation()},this.handleRentableItemRemove=e=>{this.desiredRentableItems=this.desiredRentableItems.filter(t=>t.id!==e.id),this.requestQuoteCalculation()},this.groupFees=e=>e.reduce((e,t)=>{const n=t.frequency||ps.ONE_TIME;return e[n]=[...e[n]||[],t],e},{}),this.handleClickEmailOption=e=>{this.handleClose(),this.onClickEmailOption&&this.onClickEmailOption(e)},this.handleClickPhoneOption=e=>{this.handleClose(),this.onClickPhoneOption&&this.onClickPhoneOption(e)},this.handleClickSSTOption=e=>{this.handleClose(),this.onClickSSTOption&&this.onClickSSTOption(e)},this.handleClickTextUsOption=e=>{this.handleClose(),this.onClickTextUsOption&&this.onClickTextUsOption(e)},this.handleClose=()=>{var e;null===(e=this.onCloseClicked)||void 0===e||e.call(this)},this.handleSelectLayout=async e=>{this.selectedLayoutIds=e,await this.fetchUnits()},this.handleShare=async()=>{var e,t;this.selectedUnit&&this.moveInDateString&&this.pdfUrl&&($o("feeCalculatorPdfDownloaded",{buildingSlug:this.buildingSlug,quoteId:null!==(t=null===(e=this.quote)||void 0===e?void 0:e.id)&&void 0!==t?t:null}),window.open(this.pdfUrl,"_blank"))},this.fetchUnits=async()=>{let e;this.isLoadingUnits=!0,this.selectedLayoutIds.includes(Cs)||(e=this.selectedLayoutIds.map(e=>{return 0===(t=e)?0:Math.floor(t/10);var t}));try{if(this.units=await Es({buildingSlug:this.buildingSlug,moveInDateString:this.moveInDateString,...e?{numBedrooms:e}:{},leaseTerm:this.leaseTerm}),this.selectedUnit){this.units.some(e=>{var t;return e.id===(null===(t=this.selectedUnit)||void 0===t?void 0:t.id)})||(this.selectedUnit=null,this.quote=null,this.pdfUrl=null)}}finally{this.isLoadingUnits=!1}}}async performQuoteCalculation(e){if(!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);const t=this.moveInDateString,n=this.selectedUnit.id,i=this.leaseTerm;try{const r=await $s({buildingSlug:this.buildingSlug,unitId:n,chargeInputs:this.chargeInputs,rentableItems:this.desiredRentableItems,leaseTerm:i,moveInDate:t},e);this.quote=r.quote,this.pdfUrl=r.pdfUrl||null,this.quote&&$o("feeCalculatorQuoteGenerated",{buildingSlug:this.buildingSlug,unitId:n,leaseTerm:i})}catch(e){"AbortError"!==(null==e?void 0:e.name)&&(this.quote=null,this.pdfUrl=null,this.isCalculatingQuote=!1,Ho({logType:Fo.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{error:e},error:e}))}finally{e.aborted||(this.isCalculatingQuote=!1)}}get layouts(){var e,t;return null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.layoutOptions)&&void 0!==t?t:[]}updated(e){(e.has("primaryColor")||e.has("backgroundColor"))&&(this.style.setProperty("--primary-color",this.primaryColor),this.style.setProperty("--background-color",this.backgroundColor))}disconnectedCallback(){var e;super.disconnectedCallback(),this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),null===(e=this.quoteAbortController)||void 0===e||e.abort(),this.quoteAbortController=null}render(){var e,t;const n=this.isExporting||this.isCalculatingQuote||!this.selectedUnit||!this.moveInDateString||!this.pdfUrl;return R`
|
|
5203
5212
|
<div
|
|
5204
5213
|
class="fee-calculator-container"
|
|
5205
5214
|
@keydown=${e=>e.stopPropagation()}
|
|
@@ -5231,7 +5240,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5231
5240
|
class="close-button"
|
|
5232
5241
|
@click=${this.handleClose}
|
|
5233
5242
|
>
|
|
5234
|
-
${
|
|
5243
|
+
${Ss("gray")}
|
|
5235
5244
|
</button>
|
|
5236
5245
|
</div>
|
|
5237
5246
|
</div>
|
|
@@ -5279,7 +5288,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5279
5288
|
</div>
|
|
5280
5289
|
`:""}
|
|
5281
5290
|
</div>
|
|
5282
|
-
`}};
|
|
5291
|
+
`}};Al.styles=ds,Sl([ue({attribute:!0})],Al.prototype,"buildingSlug",void 0),Sl([ue({attribute:!0})],Al.prototype,"orgSlug",void 0),Sl([ue({type:String})],Al.prototype,"primaryColor",void 0),Sl([ue({type:String})],Al.prototype,"backgroundColor",void 0),Sl([ue()],Al.prototype,"onCloseClicked",void 0),Sl([ue()],Al.prototype,"onClickEmailOption",void 0),Sl([ue()],Al.prototype,"onClickPhoneOption",void 0),Sl([ue()],Al.prototype,"onClickSSTOption",void 0),Sl([ue()],Al.prototype,"onClickTextUsOption",void 0),Sl([de()],Al.prototype,"isCalculatingQuote",void 0),Sl([de()],Al.prototype,"isLoadingLayouts",void 0),Sl([de()],Al.prototype,"isExporting",void 0),Sl([de()],Al.prototype,"selectedLayoutIds",void 0),Sl([de()],Al.prototype,"selectedUnit",void 0),Sl([de()],Al.prototype,"chargeInputs",void 0),Sl([de()],Al.prototype,"desiredRentableItems",void 0),Sl([de()],Al.prototype,"moveInDateString",void 0),Sl([de()],Al.prototype,"leaseTerm",void 0),Sl([de()],Al.prototype,"buildingWebchatView",void 0),Sl([de()],Al.prototype,"incentives",void 0),Sl([de()],Al.prototype,"quote",void 0),Sl([de()],Al.prototype,"pdfUrl",void 0),Sl([de()],Al.prototype,"groupedFees",void 0),Sl([de()],Al.prototype,"rentableItems",void 0),Sl([de()],Al.prototype,"units",void 0),Sl([de()],Al.prototype,"isLoadingUnits",void 0),Al=Sl([se("fee-calculator")],Al);const El=u`
|
|
5283
5292
|
#minimize-mobile {
|
|
5284
5293
|
position: absolute;
|
|
5285
5294
|
top: -12px;
|
|
@@ -5328,9 +5337,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5328
5337
|
justify-content: center;
|
|
5329
5338
|
align-items: center;
|
|
5330
5339
|
}
|
|
5331
|
-
`,
|
|
5340
|
+
`,Tl=(e="white")=>B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="14" viewBox="0 0 16 14" fill="none">
|
|
5332
5341
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.46964 0.488343H9.53036C10.898 0.488331 11.9813 0.488321 12.829 0.602304C13.7015 0.719609 14.4077 0.966767 14.9647 1.52369C15.5216 2.08061 15.7687 2.78681 15.886 3.65932C16 4.50711 16 5.59038 16 6.95802V7.04198C16 8.40962 16 9.49289 15.886 10.3407C15.7687 11.2132 15.5216 11.9194 14.9647 12.4763C14.4077 13.0332 13.7015 13.2804 12.829 13.3977C11.9813 13.5117 10.898 13.5117 9.53035 13.5117H6.46965C5.10201 13.5117 4.01875 13.5117 3.17096 13.3977C2.29846 13.2804 1.59227 13.0332 1.03534 12.4763C0.478423 11.9194 0.231266 11.2132 0.113961 10.3407C-2.09587e-05 9.49289 -1.15596e-05 8.40962 2.39342e-07 7.04198V6.95801C-1.15596e-05 5.59037 -2.09587e-05 4.50711 0.113961 3.65932C0.231266 2.78681 0.478423 2.08061 1.03534 1.52369C1.59227 0.966767 2.29846 0.719609 3.17096 0.602304C4.01875 0.488321 5.10201 0.488331 6.46964 0.488343ZM3.3197 1.70863C2.57098 1.8093 2.13962 1.99807 1.82467 2.31302C1.50973 2.62797 1.32095 3.05934 1.22029 3.80806C1.11746 4.57283 1.11628 5.58096 1.11628 7C1.11628 8.41903 1.11746 9.42716 1.22029 10.1919C1.32095 10.9407 1.50973 11.372 1.82467 11.687C2.13962 12.0019 2.57098 12.1907 3.3197 12.2914C4.08447 12.3942 5.0926 12.3954 6.51163 12.3954H9.48837C10.9074 12.3954 11.9155 12.3942 12.6803 12.2914C13.429 12.1907 13.8604 12.0019 14.1753 11.687C14.4903 11.372 14.6791 10.9407 14.7797 10.1919C14.8825 9.42716 14.8837 8.41903 14.8837 7C14.8837 5.58096 14.8825 4.57283 14.7797 3.80806C14.6791 3.05934 14.4903 2.62797 14.1753 2.31302C13.8604 1.99807 13.429 1.8093 12.6803 1.70863C11.9155 1.60581 10.9074 1.60463 9.48837 1.60463H6.51163C5.0926 1.60463 4.08448 1.60581 3.3197 1.70863ZM3.10611 3.66593C3.30345 3.42912 3.65539 3.39713 3.8922 3.59446L5.49882 4.93332C6.19311 5.5119 6.67515 5.9123 7.08211 6.17404C7.47605 6.42741 7.7432 6.51246 8 6.51246C8.2568 6.51246 8.52395 6.42741 8.91789 6.17404C9.32485 5.9123 9.80689 5.5119 10.5012 4.93332L12.1078 3.59446C12.3446 3.39713 12.6966 3.42912 12.8939 3.66593C13.0912 3.90273 13.0592 4.25468 12.8224 4.45202L11.1878 5.81419C10.5282 6.36389 9.99359 6.80943 9.52173 7.11291C9.0302 7.42904 8.5515 7.62875 8 7.62875C7.4485 7.62875 6.9698 7.42904 6.47827 7.11291C6.00641 6.80943 5.47179 6.36389 4.81218 5.81419L3.17757 4.45202C2.94077 4.25468 2.90877 3.90273 3.10611 3.66593Z" fill="${e}"/>
|
|
5333
|
-
</svg>`,
|
|
5342
|
+
</svg>`,kl=(e="black")=>B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="18" viewBox="0 0 16 18" fill="none">
|
|
5334
5343
|
<path d="M15.6825 6.11855H0.00653076C0.0588276 4.00052 1.79117 2.30087 3.92226 2.30087H4.41255V3.6083C4.41255 3.88285 4.63481 4.09858 4.90283 4.09858C5.17085 4.09858 5.39311 3.88285 5.39311 3.6083V2.30087H10.2959V3.6083C10.2959 3.88285 10.5182 4.09858 10.7862 4.09858C11.0542 4.09858 11.2765 3.88285 11.2765 3.6083V2.30087H11.7668C13.8979 2.30087 15.6302 4.00052 15.6825 6.11855Z" fill="${e}"/>
|
|
5335
5344
|
<path d="M15.0641 7.39731V14.0677C15.0641 15.8922 13.5861 17.365 11.7668 17.365H3.92227C2.10298 17.365 0.625 15.8922 0.625 14.0677V7.39731H15.0641Z" fill="transparent" stroke="${e}" stroke-width="1.25"/>
|
|
5336
5345
|
<path d="M4.90283 1V2.30742" stroke="${e}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -5338,14 +5347,14 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5338
5347
|
<path d="M0 6.11862H0.00653352C-3.5908e-06 6.15131 0 6.19053 0 6.22322V6.11862Z" fill="white"/>
|
|
5339
5348
|
<path d="M15.689 6.11862V6.22322C15.689 6.19053 15.689 6.15131 15.6825 6.11862H15.689Z" fill="white"/>
|
|
5340
5349
|
<path d="M4.74594 11.9562L6.56326 13.7735C6.8182 14.0285 7.23004 14.0285 7.48499 13.7735L10.9366 10.3219" stroke="${e}" stroke-miterlimit="10" stroke-linecap="round"/>
|
|
5341
|
-
</svg>`,
|
|
5350
|
+
</svg>`,_l=(e="white")=>B`
|
|
5342
5351
|
<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
5343
5352
|
<path
|
|
5344
5353
|
fill-rule="evenodd"
|
|
5345
5354
|
clip-rule="evenodd"
|
|
5346
5355
|
d="M6.64026 0.25H8.8598C10.0157 0.249995 10.9219 0.249992 11.6459 0.318826C12.3838 0.388987 12.988 0.534458 13.5206 0.860861C14.0784 1.20267 14.5474 1.67164 14.8892 2.22942C15.2156 2.76206 15.3611 3.36627 15.4312 4.10419C15.5001 4.82813 15.5001 5.73432 15.5001 6.89025V7.65964C15.5001 8.48243 15.5001 9.12755 15.4645 9.64868C15.4283 10.1789 15.3535 10.6202 15.1845 11.0283C14.7638 12.044 13.9568 12.851 12.9411 13.2717C12.3607 13.5121 11.6997 13.5654 10.7947 13.581C10.4782 13.5865 10.2777 13.5905 10.1248 13.6074C9.98202 13.6232 9.92665 13.6464 9.89426 13.6652C9.86008 13.6851 9.81351 13.7213 9.73267 13.8323C9.64518 13.9523 9.54632 14.1182 9.38955 14.3831L8.99874 15.0433C8.44104 15.9856 7.05899 15.9856 6.5013 15.0433L6.11048 14.3831C5.95371 14.1182 5.85485 13.9523 5.76736 13.8323C5.68652 13.7213 5.63995 13.6851 5.60577 13.6652C5.57338 13.6464 5.51801 13.6232 5.37519 13.6074C5.22235 13.5905 5.02184 13.5865 4.70528 13.581C3.80031 13.5654 3.13933 13.5121 2.559 13.2717C1.54327 12.851 0.736277 12.044 0.315547 11.0283C0.146515 10.6202 0.0717299 10.1789 0.0355529 9.64868C-4.05001e-06 9.12754 -2.20251e-06 8.48243 1.60891e-07 7.65963L7.4949e-08 6.89026C-4.52294e-06 5.73432 -8.08928e-06 4.82814 0.0688256 4.10419C0.138987 3.36627 0.284458 2.76206 0.610861 2.22942C0.95267 1.67164 1.42164 1.20267 1.97942 0.860861C2.51206 0.534458 3.11627 0.388987 3.85419 0.318826C4.57814 0.249992 5.48432 0.249995 6.64026 0.25ZM3.95654 1.39537C3.29779 1.458 2.87862 1.57812 2.54445 1.78291C2.13217 2.03555 1.78555 2.38217 1.53291 2.79445C1.32812 3.12862 1.208 3.54779 1.14537 4.20654C1.08197 4.87334 1.0814 5.7282 1.0814 6.91863V7.63956C1.0814 8.48674 1.08169 9.09505 1.11444 9.57507C1.14686 10.0502 1.20927 10.3601 1.31463 10.6144C1.6256 11.3652 2.22208 11.9617 2.97284 12.2726C3.34458 12.4266 3.81883 12.4842 4.72391 12.4998L4.74685 12.5002C5.03378 12.5051 5.28522 12.5094 5.49421 12.5326C5.71878 12.5574 5.9384 12.6077 6.14946 12.7304C6.35874 12.8522 6.50969 13.0148 6.64128 13.1953C6.76287 13.3622 6.88783 13.5733 7.02936 13.8124L7.4319 14.4925C7.57086 14.7273 7.92917 14.7273 8.06813 14.4925L8.47067 13.8124C8.6122 13.5733 8.73716 13.3622 8.85875 13.1953C8.99034 13.0148 9.14129 12.8522 9.35057 12.7304C9.56163 12.6077 9.78126 12.5574 10.0058 12.5326C10.2148 12.5094 10.4662 12.5051 10.7532 12.5002L10.7761 12.4998C11.6812 12.4842 12.1555 12.4266 12.5272 12.2726C13.278 11.9617 13.8745 11.3652 14.1854 10.6144C14.2908 10.3601 14.3532 10.0502 14.3856 9.57507C14.4184 9.09505 14.4187 8.48674 14.4187 7.63956V6.91863C14.4187 5.7282 14.4181 4.87334 14.3547 4.20654C14.2921 3.54779 14.1719 3.12862 13.9672 2.79445C13.7145 2.38217 13.3679 2.03555 12.9556 1.78291C12.6214 1.57812 12.2023 1.458 11.5435 1.39537C10.8767 1.33197 10.0219 1.3314 8.83143 1.3314H6.66863C5.4782 1.3314 4.62334 1.33197 3.95654 1.39537ZM7.75003 3.85467C8.04865 3.85467 8.29073 4.09674 8.29073 4.39536V10.1628C8.29073 10.4614 8.04865 10.7035 7.75003 10.7035C7.45141 10.7035 7.20933 10.4614 7.20933 10.1628V4.39536C7.20933 4.09674 7.45141 3.85467 7.75003 3.85467ZM4.8663 5.29653C5.16492 5.29653 5.407 5.53861 5.407 5.83723V8.72096C5.407 9.01958 5.16492 9.26166 4.8663 9.26166C4.56768 9.26166 4.3256 9.01958 4.3256 8.72096V5.83723C4.3256 5.53861 4.56768 5.29653 4.8663 5.29653ZM10.6338 5.29653C10.9324 5.29653 11.1745 5.53861 11.1745 5.83723V8.72096C11.1745 9.01958 10.9324 9.26166 10.6338 9.26166C10.3351 9.26166 10.0931 9.01958 10.0931 8.72096V5.83723C10.0931 5.53861 10.3351 5.29653 10.6338 5.29653Z"
|
|
5347
5356
|
fill="${e}"/>
|
|
5348
|
-
</svg>`,
|
|
5357
|
+
</svg>`,Ol=(e="white")=>B`<svg aria-hidden="true" focusable="false" width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5349
5358
|
<g clip-path="url(#clip0_18382_27345)">
|
|
5350
5359
|
<g clip-path="url(#clip1_18382_27345)">
|
|
5351
5360
|
<path d="M9.91666 0.625V3.45833C9.91666 3.6462 9.99128 3.82636 10.1241 3.9592C10.257 4.09204 10.4371 4.16667 10.625 4.16667H13.4583" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -5362,7 +5371,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5362
5371
|
</clipPath>
|
|
5363
5372
|
</defs>
|
|
5364
5373
|
</svg>
|
|
5365
|
-
`,
|
|
5374
|
+
`,Pl=(e="white",t=20,n=-2)=>B`
|
|
5366
5375
|
<svg
|
|
5367
5376
|
aria-hidden="true"
|
|
5368
5377
|
focusable="false"
|
|
@@ -5437,7 +5446,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5437
5446
|
</clipPath>
|
|
5438
5447
|
</defs>
|
|
5439
5448
|
</svg>
|
|
5440
|
-
`;var
|
|
5449
|
+
`;var Il=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 Nl=class extends oe{constructor(){super(...arguments),this.onClickMinimize=()=>{},this.onClickEmailOption=()=>{},this.onClickPhoneOption=()=>{},this.onClickSSTOption=()=>{},this.onClickApplyNowOption=()=>{},this.onClickPriceCalculatorOption=()=>{},this.onChatTapped=()=>{},this.hideChat=!1,this.isMobileDesign=!1,this.primaryColor=qn,this.backgroundColor=Yn,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasCallUsEnabled=!1,this.hasTextUsEnabled=!1,this.hasSSTEnabled=!1,this.hasApplyNowEnabled=!1,this.hasPricingCalculatorEnabled=!1,this.applicationLink="",this.overrideRentgrata=!1,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.renderListElement=(e,t,n,i)=>e?R` <li>
|
|
5441
5450
|
<button
|
|
5442
5451
|
@click=${t}
|
|
5443
5452
|
class="typeMobile-bttn"
|
|
@@ -5453,12 +5462,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5453
5462
|
</button>
|
|
5454
5463
|
</li>`:""}render(){return R`<div class="typeMobile-list">
|
|
5455
5464
|
<ul>
|
|
5456
|
-
${this.renderListElement(!(!this.hasApplyNowEnabled||!this.applicationLink),this.onClickApplyNowOption,
|
|
5457
|
-
${this.renderListElement(this.hasPricingCalculatorEnabled,this.onClickPriceCalculatorOption,
|
|
5458
|
-
${this.renderListElement(this.hasEmailEnabled,this.onClickEmailOption,
|
|
5459
|
-
${this.renderListElement(this.hasCallUsEnabled||this.hasTextUsEnabled,this.onClickPhoneOption,
|
|
5460
|
-
${this.renderListElement(this.hasSSTEnabled,this.onClickSSTOption,
|
|
5461
|
-
${this.renderListElement(this.hasChatEnabled&&!this.hideChat,this.onChatTapped,
|
|
5465
|
+
${this.renderListElement(!(!this.hasApplyNowEnabled||!this.applicationLink),this.onClickApplyNowOption,Ol(this.foregroundColorOnSecondaryBackgroundColor),"Apply now")}
|
|
5466
|
+
${this.renderListElement(this.hasPricingCalculatorEnabled,this.onClickPriceCalculatorOption,Pl(this.foregroundColorOnSecondaryBackgroundColor),"Price calculator")}
|
|
5467
|
+
${this.renderListElement(this.hasEmailEnabled,this.onClickEmailOption,Tl(this.foregroundColorOnSecondaryBackgroundColor),"Email us")}
|
|
5468
|
+
${this.renderListElement(this.hasCallUsEnabled||this.hasTextUsEnabled,this.onClickPhoneOption,is(this.foregroundColorOnSecondaryBackgroundColor),"Call or text us")}
|
|
5469
|
+
${this.renderListElement(this.hasSSTEnabled,this.onClickSSTOption,kl(this.foregroundColorOnSecondaryBackgroundColor),"Book a tour")}
|
|
5470
|
+
${this.renderListElement(this.hasChatEnabled&&!this.hideChat,this.onChatTapped,_l(this.foregroundColorOnSecondaryBackgroundColor),"Chat with us")}
|
|
5462
5471
|
${this.isMobileDesign||this.hideChat?"":R`
|
|
5463
5472
|
<li>
|
|
5464
5473
|
<minimize-expand-button
|
|
@@ -5470,20 +5479,20 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5470
5479
|
</li>
|
|
5471
5480
|
`}
|
|
5472
5481
|
</ul>
|
|
5473
|
-
</div>`}};
|
|
5482
|
+
</div>`}};Nl.styles=[El],Il([ue({attribute:!0})],Nl.prototype,"onClickMinimize",void 0),Il([ue({attribute:!0})],Nl.prototype,"onClickEmailOption",void 0),Il([ue({attribute:!0})],Nl.prototype,"onClickPhoneOption",void 0),Il([ue({attribute:!0})],Nl.prototype,"onClickSSTOption",void 0),Il([ue({attribute:!0})],Nl.prototype,"onClickApplyNowOption",void 0),Il([ue({attribute:!0})],Nl.prototype,"onClickPriceCalculatorOption",void 0),Il([ue({attribute:!0})],Nl.prototype,"onChatTapped",void 0),Il([ue({attribute:!0})],Nl.prototype,"hideChat",void 0),Il([ue({attribute:!0})],Nl.prototype,"isMobileDesign",void 0),Il([ue({attribute:!0})],Nl.prototype,"primaryColor",void 0),Il([ue({attribute:!0})],Nl.prototype,"backgroundColor",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasChatEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasEmailEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasCallUsEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasTextUsEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasSSTEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasApplyNowEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"hasPricingCalculatorEnabled",void 0),Il([ue({attribute:!0})],Nl.prototype,"applicationLink",void 0),Il([ue({attribute:!0})],Nl.prototype,"overrideRentgrata",void 0),Il([ue({attribute:!0})],Nl.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Il([ue({attribute:!0})],Nl.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Nl=Il([se("mobile-launcher")],Nl);const Ml=(e="white")=>B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="5" height="8" viewBox="0 0 5 8" fill="none">
|
|
5474
5483
|
<path d="M1.31812 7L4.31812 4L1.31811 1" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5475
|
-
</svg>`;var
|
|
5484
|
+
</svg>`;var Dl=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 Ll=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=qn,this.toExpand=!1}render(){return R`
|
|
5476
5485
|
<div class=${"button-container"} @click=${this.onClick}>
|
|
5477
5486
|
<div
|
|
5478
5487
|
class="inner-container"
|
|
5479
5488
|
style=${Vn({background:this.primaryColor})}
|
|
5480
5489
|
>
|
|
5481
|
-
${this.toExpand?
|
|
5490
|
+
${this.toExpand?Ml("black"):((e="white")=>B`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="5" height="8" viewBox="0 0 5 8" fill="none">
|
|
5482
5491
|
<path d="M3.68188 7L0.681885 4L3.68188 1" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5483
5492
|
</svg>`)("black")}
|
|
5484
5493
|
</div>
|
|
5485
5494
|
</div>
|
|
5486
|
-
`}};
|
|
5495
|
+
`}};Ll.styles=[u`
|
|
5487
5496
|
.button-container {
|
|
5488
5497
|
width: 36px;
|
|
5489
5498
|
height: 36px;
|
|
@@ -5507,11 +5516,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5507
5516
|
.button-container:hover {
|
|
5508
5517
|
filter: brightness(90%);
|
|
5509
5518
|
}
|
|
5510
|
-
`],
|
|
5519
|
+
`],Dl([ue({attribute:!0})],Ll.prototype,"onClick",void 0),Dl([ue({attribute:!0})],Ll.prototype,"primaryColor",void 0),Dl([ue({attribute:!0})],Ll.prototype,"toExpand",void 0),Ll=Dl([se("collapse-expand-button")],Ll);const Ul=()=>{const e=window.rentgrata;if(!e)return;const t=e.Widget;t&&t.openWidget&&t.openWidget()},Rl=()=>{const e=window.rentgrata;if(!e)return;const t=e.Widget;t&&t.openWidget&&t.close()},Bl=()=>!!window.rentgrata;var jl=n(3950),Fl=n.n(jl);const Hl=(e="black")=>B`<svg aria-hidden="true" focusable="false" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5511
5520
|
<path d="M6 6C7.65685 6 9 4.65685 9 3C9 1.34315 7.65685 0 6 0C4.34315 0 3 1.34315 3 3C3 4.65685 4.34315 6 6 6ZM8 3C8 4.10457 7.10457 5 6 5C4.89543 5 4 4.10457 4 3C4 1.89543 4.89543 1 6 1C7.10457 1 8 1.89543 8 3Z" fill="${e}"/>
|
|
5512
5521
|
<path d="M12 11C12 12 11 12 11 12H1C1 12 0 12 0 11C0 10 1 7 6 7C11 7 12 10 12 11ZM11 10.9965C10.9986 10.7497 10.8462 10.0104 10.1679 9.33211C9.51563 8.67985 8.2891 8 5.99999 8C3.71088 8 2.48435 8.67985 1.8321 9.33211C1.15375 10.0104 1.00142 10.7497 1 10.9965H11Z" fill="${e}"/>
|
|
5513
5522
|
</svg>
|
|
5514
|
-
`;var
|
|
5523
|
+
`;var Gl=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 zl=class extends oe{constructor(){super(...arguments),this.isMinimized=!1,this.mobileStyles={},this.isFirstMount=!1,this.openSSTWindowOnLoad=!1,this.autoOpenChatWidget=!1,this.phoneNumber="",this.buildingName="",this.chatId="",this.orgLegalName="",this.country=null,this.chatCallUsHeader="",this.buildingId=0,this.orgId=0,this.leadSourceParams=null,this.buildingSlug="",this.orgSlug="",this.sgtUrl="",this.selfGuidedTourEnabled=!1,this.selfGuidedToursTypeOffered="",this.designConcept="",this.featureFlagShowDropdown="",this.leadSources=[],this.currentLeadSource="",this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.hasChatEnabledDesktop=!1,this.hasChatEnabledMobile=!1,this.hasEmailEnabledDesktop=!1,this.hasEmailEnabledMobile=!1,this.hasApplyNowEnabledDesktop=!1,this.hasApplyNowEnabledMobile=!1,this.applicationLink="",this.hasCallUsEnabledDesktop=!1,this.hasCallUsEnabledMobile=!1,this.hasTextUsEnabledDesktop=!1,this.hasTextUsEnabledMobile=!1,this.hasSSTEnabledDesktop=!1,this.hasSSTEnabledMobile=!1,this.tourTypeOptions=[],this.layoutOptions=[],this.bedroomPreferenceRequired=!1,this.hasDynamicSchedulingEnabled=!1,this.hasPricingCalculatorEnabledDesktop=!1,this.hasPricingCalculatorEnabledMobile=!1,this.onExitChat=()=>{},this.hasHideMobileFeatures=!1,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.showTourNextToChat=!1,this.onChatTapped=()=>{},this.handleChatTapped=()=>{$o("chatOpened",{buildingId:this.buildingId}),this.onChatTapped()},this.onClickMinimize=()=>{},this.onSstClose=Fl(),this.overrideRentgrata=!1,this.launcherStyles={},this.primaryColor=qn,this.backgroundColor=Yn,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this._isMobile=Or(),this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.isMobileFeaturesExpanded=!1,this.getNumCallToActions=()=>[this.hasEmailEnabledDesktop||this.hasEmailEnabledMobile,!!this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasCallUsEnabledMobile),this.hasSSTEnabledDesktop||this.hasSSTEnabledMobile,this.hasTextUsEnabledDesktop||this.hasTextUsEnabledMobile,this.hasApplyNowEnabledDesktop||this.hasApplyNowEnabledMobile,this.hasPricingCalculatorEnabledDesktop||this.hasPricingCalculatorEnabledMobile].filter(e=>e).length,this.emailUsWindowRef=Ee(),this.tourSchedulerRef=Ee(),this.calculatorWindowRef=Ee(),this.updated=async()=>{this.attachOnClickToEmailUsWindow(),this.attachOnClickToSSTWindow(),this.attachOnClickToCalculatorWindow(),(this.isEmailWindowOpen||this.isCallUsWindowOpen)&&this.isSSTWindowOpen&&this.onCloseSSTWindow()},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerRef.value;e&&(e.onCloseClicked=this.onCloseSSTWindow)},this.attachOnClickToCalculatorWindow=()=>{const e=this.calculatorWindowRef.value;e&&(e.onCloseClicked=this.onCloseCalculatorWindow,e.onClickEmailOption=this.onClickEmailOption,e.onClickPhoneOption=this.onClickPhoneOption,e.onClickSSTOption=this.onClickSSTOption,e.onClickTextUsOption=this.onClickTextUsOption)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),Rl(),$o("emailUsClicked",{buildingId:this.buildingId}),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.onClickPhoneOption=e=>{e.preventDefault(),e.stopPropagation(),Rl(),$o("callTextUsClicked",{buildingId:this.buildingId}),this.isCallUsWindowOpen=!0},this.onClickApplyNowOption=e=>{e.preventDefault(),e.stopPropagation(),Rl(),$o("applyNowClicked",{buildingId:this.buildingId,applicationLink:this.applicationLink}),window.open(this.applicationLink,"_blank")},this.onClickPriceCalculatorOption=e=>{e.preventDefault(),e.stopPropagation(),Rl(),$o("feeCalculatorOpened",{buildingId:this.buildingId}),this.isCalculatorWindowOpen=!0},this.onClosePhoneWindow=()=>{this.isCallUsWindowOpen=!1},this.onClickSSTOption=e=>{e.preventDefault(),e.stopPropagation(),Rl(),$o("bookTourClicked",{buildingId:this.buildingId}),io(),ro(this.buildingId),this.isSSTWindowOpen=!0},this.onCloseSSTWindow=()=>{this.onSstClose(),this.isSSTWindowOpen=!1,this.showTourNextToChat&&this.dispatchEvent(new CustomEvent("closeShowTourNextToChat",{bubbles:!0}))},this.onCloseCalculatorWindow=()=>{this.isCalculatorWindowOpen=!1},this.onClickTextUsOption=e=>{e.preventDefault(),e.stopPropagation(),this.isTextUsWindowOpen=!0},this.isCallToActionWindowOpen=()=>1===[this.isEmailWindowOpen,this.isCallUsWindowOpen,this.isSSTWindowOpen,this.isTextUsWindowOpen,this.isCalculatorWindowOpen].filter(e=>e).length,this.toggleMobileFeatures=()=>{this.isMobileFeaturesExpanded=!this.isMobileFeaturesExpanded},this.renderActionPills=()=>this._isMobile||this.isMinimized||this.designConcept===Yo.MINIMIZED?R` ${this.hasHideMobileFeatures&&this._isMobile?R`<collapse-expand-button
|
|
5515
5524
|
.toExpand=${this.isMobileFeaturesExpanded}
|
|
5516
5525
|
.primaryColor=${this.primaryColor}
|
|
5517
5526
|
.onClick=${this.toggleMobileFeatures}
|
|
@@ -5546,7 +5555,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5546
5555
|
>
|
|
5547
5556
|
<div class="type-hey__pill-left">
|
|
5548
5557
|
<div class="type-hey__icon">
|
|
5549
|
-
${
|
|
5558
|
+
${Tl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5550
5559
|
</div>
|
|
5551
5560
|
<div
|
|
5552
5561
|
style=${Vn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -5555,7 +5564,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5555
5564
|
</div>
|
|
5556
5565
|
</div>
|
|
5557
5566
|
<div class="type-gradient__icon">
|
|
5558
|
-
${
|
|
5567
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5559
5568
|
</div>
|
|
5560
5569
|
</button>`:null},{pillKey:"SST",pill:this.hasSSTEnabledDesktop?R`
|
|
5561
5570
|
<button
|
|
@@ -5566,7 +5575,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5566
5575
|
>
|
|
5567
5576
|
<div class="type-hey__pill-left">
|
|
5568
5577
|
<div class="type-hey__icon">
|
|
5569
|
-
${
|
|
5578
|
+
${kl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5570
5579
|
</div>
|
|
5571
5580
|
<div
|
|
5572
5581
|
style=${Vn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -5575,7 +5584,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5575
5584
|
</div>
|
|
5576
5585
|
</div>
|
|
5577
5586
|
<div class="type-gradient__icon">
|
|
5578
|
-
${
|
|
5587
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5579
5588
|
</div>
|
|
5580
5589
|
</button>
|
|
5581
5590
|
`:null},{pillKey:"Phone",pill:this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasTextUsEnabledDesktop)?R`
|
|
@@ -5587,7 +5596,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5587
5596
|
>
|
|
5588
5597
|
<div class="type-hey__pill-left">
|
|
5589
5598
|
<div class="type-hey__icon">
|
|
5590
|
-
${
|
|
5599
|
+
${is(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5591
5600
|
</div>
|
|
5592
5601
|
<div
|
|
5593
5602
|
style=${Vn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -5599,7 +5608,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5599
5608
|
</div>
|
|
5600
5609
|
</div>
|
|
5601
5610
|
<div class="type-gradient__icon">
|
|
5602
|
-
${
|
|
5611
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5603
5612
|
</div>
|
|
5604
5613
|
</button>
|
|
5605
5614
|
`:null},{pillKey:"Apply",pill:this.applicationLink&&this.hasApplyNowEnabledDesktop?R`
|
|
@@ -5611,7 +5620,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5611
5620
|
>
|
|
5612
5621
|
<div class="type-hey__pill-left">
|
|
5613
5622
|
<div class="type-hey__icon">
|
|
5614
|
-
${
|
|
5623
|
+
${Ol(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5615
5624
|
</div>
|
|
5616
5625
|
<div
|
|
5617
5626
|
class="vertical-pill-title"
|
|
@@ -5622,7 +5631,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5622
5631
|
</div>
|
|
5623
5632
|
</div>
|
|
5624
5633
|
<div class="type-gradient__icon">
|
|
5625
|
-
${
|
|
5634
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5626
5635
|
</div>
|
|
5627
5636
|
</button>
|
|
5628
5637
|
`:null},{pillKey:"Price Calculator",pill:this.hasPricingCalculatorEnabledDesktop?R`
|
|
@@ -5634,7 +5643,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5634
5643
|
>
|
|
5635
5644
|
<div class="type-hey__pill-left">
|
|
5636
5645
|
<div class="type-hey__icon">
|
|
5637
|
-
${
|
|
5646
|
+
${Pl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5638
5647
|
</div>
|
|
5639
5648
|
<div
|
|
5640
5649
|
style=${Vn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -5643,7 +5652,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5643
5652
|
</div>
|
|
5644
5653
|
</div>
|
|
5645
5654
|
<div class="type-gradient__icon">
|
|
5646
|
-
${
|
|
5655
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5647
5656
|
</div>
|
|
5648
5657
|
</button>
|
|
5649
5658
|
`:null}].filter(e=>!!e.pill);return R`
|
|
@@ -5685,7 +5694,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5685
5694
|
>
|
|
5686
5695
|
<div class="type-hey__pill-left">
|
|
5687
5696
|
<div class="type-hey__icon">
|
|
5688
|
-
${
|
|
5697
|
+
${_l(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
5689
5698
|
</div>
|
|
5690
5699
|
<div
|
|
5691
5700
|
style=${Vn({color:this.foregroundColorOnPrimaryBackgroundColor})}
|
|
@@ -5694,7 +5703,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5694
5703
|
</div>
|
|
5695
5704
|
</div>
|
|
5696
5705
|
<div class="type-gradient__icon">
|
|
5697
|
-
${
|
|
5706
|
+
${Ml(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
5698
5707
|
</div>
|
|
5699
5708
|
</button>
|
|
5700
5709
|
`:""}
|
|
@@ -5706,15 +5715,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5706
5715
|
>
|
|
5707
5716
|
<div class="type-hey__botton-section-pills">
|
|
5708
5717
|
${e.map(e=>e.pill)}
|
|
5709
|
-
${this.overrideRentgrata&&
|
|
5718
|
+
${this.overrideRentgrata&&Bl()?R` <button
|
|
5710
5719
|
class="type-hey__pill"
|
|
5711
|
-
@click=${()=>{
|
|
5720
|
+
@click=${()=>{Ul()}}
|
|
5712
5721
|
style=${Vn({background:this.backgroundColor})}
|
|
5713
5722
|
aria-label="Contact a resident"
|
|
5714
5723
|
>
|
|
5715
5724
|
<div class="type-hey__pill-left">
|
|
5716
5725
|
<div class="type-hey__icon">
|
|
5717
|
-
${
|
|
5726
|
+
${Hl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5718
5727
|
</div>
|
|
5719
5728
|
<div
|
|
5720
5729
|
style=${Vn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -5723,7 +5732,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5723
5732
|
</div>
|
|
5724
5733
|
</div>
|
|
5725
5734
|
<div class="type-gradient__icon">
|
|
5726
|
-
${
|
|
5735
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5727
5736
|
</div>
|
|
5728
5737
|
</button>`:""}
|
|
5729
5738
|
</div>
|
|
@@ -5745,7 +5754,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5745
5754
|
>
|
|
5746
5755
|
<div class="vertical-pill-left">
|
|
5747
5756
|
<div class="vertical-pill-icon">
|
|
5748
|
-
${
|
|
5757
|
+
${_l(e?this.foregroundColorOnSecondaryBackgroundColor:this.foregroundColorOnPrimaryBackgroundColor)}
|
|
5749
5758
|
</div>
|
|
5750
5759
|
<div
|
|
5751
5760
|
class="vertical-pill-title"
|
|
@@ -5755,7 +5764,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5755
5764
|
</div>
|
|
5756
5765
|
</div>
|
|
5757
5766
|
<div class="chevron-right">
|
|
5758
|
-
${
|
|
5767
|
+
${Ml(e?this.foregroundColorOnSecondaryBackgroundColor:this.foregroundColorOnPrimaryBackgroundColor)}
|
|
5759
5768
|
</div>
|
|
5760
5769
|
</button>
|
|
5761
5770
|
`:null},{pillKey:"Price Calculator",pill:this.hasPricingCalculatorEnabledDesktop?R`
|
|
@@ -5767,7 +5776,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5767
5776
|
>
|
|
5768
5777
|
<div class="vertical-pill-left">
|
|
5769
5778
|
<div class="vertical-pill-icon">
|
|
5770
|
-
${
|
|
5779
|
+
${Pl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5771
5780
|
</div>
|
|
5772
5781
|
<div
|
|
5773
5782
|
class="vertical-pill-title"
|
|
@@ -5777,7 +5786,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5777
5786
|
</div>
|
|
5778
5787
|
</div>
|
|
5779
5788
|
<div class="chevron-right">
|
|
5780
|
-
${
|
|
5789
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5781
5790
|
</div>
|
|
5782
5791
|
</button>
|
|
5783
5792
|
`:null},{pillKey:"SST",pill:this.hasSSTEnabledDesktop?R`
|
|
@@ -5790,7 +5799,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5790
5799
|
>
|
|
5791
5800
|
<div class="vertical-pill-left">
|
|
5792
5801
|
<div class="vertical-pill-icon">
|
|
5793
|
-
${
|
|
5802
|
+
${kl(e?this.foregroundColorOnPrimaryBackgroundColor:this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5794
5803
|
</div>
|
|
5795
5804
|
<div
|
|
5796
5805
|
class="vertical-pill-title"
|
|
@@ -5801,7 +5810,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5801
5810
|
</div>
|
|
5802
5811
|
</div>
|
|
5803
5812
|
<div class="chevron-right">
|
|
5804
|
-
${
|
|
5813
|
+
${Ml(e?this.foregroundColorOnPrimaryBackgroundColor:this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5805
5814
|
</div>
|
|
5806
5815
|
</button>
|
|
5807
5816
|
`:null},{pillKey:"Email",pill:this.hasEmailEnabledDesktop?R`
|
|
@@ -5813,7 +5822,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5813
5822
|
>
|
|
5814
5823
|
<div class="vertical-pill-left">
|
|
5815
5824
|
<div class="vertical-pill-icon">
|
|
5816
|
-
${
|
|
5825
|
+
${Tl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5817
5826
|
</div>
|
|
5818
5827
|
<div
|
|
5819
5828
|
class="vertical-pill-title"
|
|
@@ -5824,7 +5833,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5824
5833
|
</div>
|
|
5825
5834
|
</div>
|
|
5826
5835
|
<div class="chevron-right">
|
|
5827
|
-
${
|
|
5836
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5828
5837
|
</div>
|
|
5829
5838
|
</button>
|
|
5830
5839
|
`:null},{pillKey:"Phone",pill:this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasTextUsEnabledDesktop)?R`
|
|
@@ -5836,7 +5845,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5836
5845
|
>
|
|
5837
5846
|
<div class="vertical-pill-left">
|
|
5838
5847
|
<div class="vertical-pill-icon">
|
|
5839
|
-
${
|
|
5848
|
+
${is(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5840
5849
|
</div>
|
|
5841
5850
|
${this.hasCallUsEnabledDesktop&&this.hasTextUsEnabledDesktop?R`
|
|
5842
5851
|
<div
|
|
@@ -5865,7 +5874,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5865
5874
|
`:""}
|
|
5866
5875
|
</div>
|
|
5867
5876
|
<div class="chevron-right">
|
|
5868
|
-
${
|
|
5877
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5869
5878
|
</div>
|
|
5870
5879
|
</button>
|
|
5871
5880
|
`:null},{pillKey:"Apply",pill:this.applicationLink&&this.hasApplyNowEnabledDesktop?R`
|
|
@@ -5877,7 +5886,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5877
5886
|
>
|
|
5878
5887
|
<div class="vertical-pill-left">
|
|
5879
5888
|
<div class="vertical-pill-icon">
|
|
5880
|
-
${
|
|
5889
|
+
${Ol(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5881
5890
|
</div>
|
|
5882
5891
|
<div
|
|
5883
5892
|
class="vertical-pill-title"
|
|
@@ -5888,7 +5897,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5888
5897
|
</div>
|
|
5889
5898
|
</div>
|
|
5890
5899
|
<div class="chevron-right">
|
|
5891
|
-
${
|
|
5900
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5892
5901
|
</div>
|
|
5893
5902
|
</button>
|
|
5894
5903
|
`:null}].filter(e=>!!e.pill);if(e){const e=t.findIndex(e=>"SST"===e.pillKey);if(-1!==e){const[n]=t.splice(e,1);t.unshift(n)}}return R`
|
|
@@ -5896,16 +5905,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5896
5905
|
<nav aria-label="EliseAI options">
|
|
5897
5906
|
<ul class="vertical-pill-list__items" role="list">
|
|
5898
5907
|
${t.map(e=>R`<li>${e.pill}</li>`)}
|
|
5899
|
-
${this.overrideRentgrata&&
|
|
5908
|
+
${this.overrideRentgrata&&Bl()?R`<li>
|
|
5900
5909
|
<button
|
|
5901
|
-
@click=${()=>{
|
|
5910
|
+
@click=${()=>{Ul()}}
|
|
5902
5911
|
class="inner-pill-wrapper"
|
|
5903
5912
|
style=${Vn({background:this.backgroundColor})}
|
|
5904
5913
|
aria-label="Contact a resident"
|
|
5905
5914
|
>
|
|
5906
5915
|
<div class="vertical-pill-left">
|
|
5907
5916
|
<div class="vertical-pill-icon">
|
|
5908
|
-
${
|
|
5917
|
+
${Hl(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5909
5918
|
</div>
|
|
5910
5919
|
<div
|
|
5911
5920
|
class="vertical-pill-title"
|
|
@@ -5916,7 +5925,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5916
5925
|
</div>
|
|
5917
5926
|
</div>
|
|
5918
5927
|
<div class="chevron-right">
|
|
5919
|
-
${
|
|
5928
|
+
${Ml(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
5920
5929
|
</div>
|
|
5921
5930
|
</button>
|
|
5922
5931
|
</li>`:""}
|
|
@@ -5927,10 +5936,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5927
5936
|
class="minimize-button"
|
|
5928
5937
|
aria-label="Minimize EliseAI widget"
|
|
5929
5938
|
>
|
|
5930
|
-
<div class="chevron-down">${
|
|
5939
|
+
<div class="chevron-down">${Ml("black")}</div>
|
|
5931
5940
|
</button>`:""}
|
|
5932
5941
|
</div>
|
|
5933
|
-
`}}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Pr(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",
|
|
5942
|
+
`}}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Pr(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}willUpdate(e){e.has("openSSTWindowOnLoad")&&this.openSSTWindowOnLoad&&(this.isSSTWindowOpen=!0)}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",ts),window.customElements.get("call-us-window")||window.customElements.define("call-us-window",ls),window.eliseAi.onOpenSST=e=>{this.isSSTWindowOpen=!0,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.onExitChat(),e&&e()},(this.hasChatEnabledDesktop||this.hasChatEnabledMobile)&&(window.eliseAi.onOpenChat=e=>{this.handleChatTapped(),this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.isCalculatorWindowOpen=!1,e&&e()}),(this.hasCallUsEnabledDesktop||this.hasCallUsEnabledMobile)&&(window.eliseAi.onOpenCallUsWindow=e=>{this.isCallUsWindowOpen=!0,this.isSSTWindowOpen=!1,this.isEmailWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasEmailEnabledDesktop||this.hasEmailEnabledMobile)&&(window.eliseAi.onOpenEmailUsWindow=e=>{this.isEmailWindowOpen=!0,this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasPricingCalculatorEnabledDesktop||this.hasPricingCalculatorEnabledMobile)&&(window.eliseAi.onOpenPriceCalculatorWindow=e=>{this.isCalculatorWindowOpen=!0,this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.onExitChat(),e&&e()});const e={top:this._isMobile||void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:this._isMobile||void 0===this.bottom||isNaN(this.bottom)?void 0:`${this.bottom}px`,left:this._isMobile||void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:this._isMobile||void 0===this.right||isNaN(this.right)?void 0:`${this.right}px`};return R`
|
|
5934
5943
|
<div
|
|
5935
5944
|
class=${po()({"launcher__mobile-launcher-wrapper":this._isMobile||this.isMinimized,"launcher__mini-launcher-wrapper":!this._isMobile&&!this.isMinimized,"launcher__mini-elevated":"livcor"===this.orgSlug.toLowerCase()&&(this._isMobile||this.isMinimized)})}
|
|
5936
5945
|
style=${Vn({...this.launcherStyles,...this.mobileStyles,top:this._isMobile||void 0===this.top||isNaN(this.top)?void 0!==this.mobileStyles.top?`${this.mobileStyles.top}px`:void 0:this.top-700+"px",bottom:this._isMobile||void 0===this.bottom||isNaN(this.bottom)?void 0!==this.mobileStyles.bottom?`${this.mobileStyles.bottom}px`:"72px":`${this.bottom}px`,left:this._isMobile||void 0===this.left||isNaN(this.left)?void 0!==this.mobileStyles.left?`${this.mobileStyles.left}px`:void 0:`${this.left}px`,right:this._isMobile||void 0===this.right||isNaN(this.right)?void 0!==this.mobileStyles.right?`${this.mobileStyles.right}px`:"18px":`${this.right}px`})}
|
|
@@ -6040,11 +6049,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6040
6049
|
`:""}
|
|
6041
6050
|
${this.isCallToActionWindowOpen()||this.showTourNextToChat?"":this.renderActionPills()}
|
|
6042
6051
|
</div>
|
|
6043
|
-
`}};
|
|
6044
|
-
${Wa}
|
|
6052
|
+
`}};zl.styles=u`
|
|
6045
6053
|
${Va}
|
|
6046
6054
|
${qa}
|
|
6047
|
-
`,Hl([ue({attribute:!0})],Gl.prototype,"isMinimized",void 0),Hl([ue()],Gl.prototype,"mobileStyles",void 0),Hl([ue({type:Boolean})],Gl.prototype,"isFirstMount",void 0),Hl([ue({attribute:!1})],Gl.prototype,"autoOpenChatWidget",void 0),Hl([ue()],Gl.prototype,"phoneNumber",void 0),Hl([ue({attribute:!0})],Gl.prototype,"buildingName",void 0),Hl([ue({attribute:!0})],Gl.prototype,"chatId",void 0),Hl([ue({attribute:!0})],Gl.prototype,"orgLegalName",void 0),Hl([ue({attribute:!1})],Gl.prototype,"country",void 0),Hl([ue({attribute:!0})],Gl.prototype,"chatCallUsHeader",void 0),Hl([ue({attribute:!1})],Gl.prototype,"buildingId",void 0),Hl([ue({type:Number})],Gl.prototype,"orgId",void 0),Hl([ue({attribute:!1})],Gl.prototype,"leadSourceParams",void 0),Hl([ue({attribute:!0})],Gl.prototype,"buildingSlug",void 0),Hl([ue({attribute:!0})],Gl.prototype,"orgSlug",void 0),Hl([ue({attribute:!0})],Gl.prototype,"sgtUrl",void 0),Hl([ue({attribute:!0})],Gl.prototype,"selfGuidedTourEnabled",void 0),Hl([ue({attribute:!0})],Gl.prototype,"selfGuidedToursTypeOffered",void 0),Hl([ue({attribute:!0})],Gl.prototype,"designConcept",void 0),Hl([ue({attribute:!0})],Gl.prototype,"featureFlagShowDropdown",void 0),Hl([ue({attribute:!1})],Gl.prototype,"leadSources",void 0),Hl([ue({attribute:!0})],Gl.prototype,"currentLeadSource",void 0),Hl([ue({attribute:!0})],Gl.prototype,"escortedToursLink",void 0),Hl([ue({attribute:!0})],Gl.prototype,"escortedToursTypeOffered",void 0),Hl([ue({attribute:!0})],Gl.prototype,"virtualToursLink",void 0),Hl([ue({attribute:!0})],Gl.prototype,"virtualToursTypeOffered",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasChatEnabledDesktop",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasChatEnabledMobile",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasEmailEnabledDesktop",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasEmailEnabledMobile",void 0),Hl([ue({attribute:!0})],Gl.prototype,"hasApplyNowEnabledDesktop",void 0),Hl([ue({attribute:!0})],Gl.prototype,"hasApplyNowEnabledMobile",void 0),Hl([ue({attribute:!0})],Gl.prototype,"applicationLink",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasCallUsEnabledDesktop",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasCallUsEnabledMobile",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasTextUsEnabledDesktop",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasTextUsEnabledMobile",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasSSTEnabledDesktop",void 0),Hl([ue({type:Boolean})],Gl.prototype,"hasSSTEnabledMobile",void 0),Hl([ue({attribute:!1})],Gl.prototype,"tourTypeOptions",void 0),Hl([ue({attribute:!1})],Gl.prototype,"layoutOptions",void 0),Hl([ue({attribute:!0})],Gl.prototype,"bedroomPreferenceRequired",void 0),Hl([ue({attribute:!0})],Gl.prototype,"hasDynamicSchedulingEnabled",void 0),Hl([ue({attribute:!0})],Gl.prototype,"hasPricingCalculatorEnabledDesktop",void 0),Hl([ue({attribute:!0})],Gl.prototype,"hasPricingCalculatorEnabledMobile",void 0),Hl([ue({attribute:!1})],Gl.prototype,"hasHideMobileFeatures",void 0),Hl([ue({type:Number})],Gl.prototype,"right",void 0),Hl([ue({type:Number})],Gl.prototype,"bottom",void 0),Hl([ue({type:Number})],Gl.prototype,"top",void 0),Hl([ue({type:Number})],Gl.prototype,"left",void 0),Hl([ue({attribute:!0})],Gl.prototype,"showTourNextToChat",void 0),Hl([ue({attribute:!1})],Gl.prototype,"onChatTapped",void 0),Hl([ue({attribute:!0})],Gl.prototype,"onClickMinimize",void 0),Hl([ue({attribute:!0})],Gl.prototype,"onSstClose",void 0),Hl([ue({attribute:!0})],Gl.prototype,"overrideRentgrata",void 0),Hl([ue({attribute:!1})],Gl.prototype,"launcherStyles",void 0),Hl([ue({attribute:!0})],Gl.prototype,"primaryColor",void 0),Hl([ue({attribute:!0})],Gl.prototype,"backgroundColor",void 0),Hl([ue({attribute:!0})],Gl.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Hl([ue({attribute:!0})],Gl.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Hl([ue({attribute:!0})],Gl.prototype,"leadSourceClient",void 0),Hl([de()],Gl.prototype,"leadSourceMultitouchClient",void 0),Hl([de()],Gl.prototype,"_isMobile",void 0),Hl([de()],Gl.prototype,"isEmailWindowOpen",void 0),Hl([de()],Gl.prototype,"isCallUsWindowOpen",void 0),Hl([de()],Gl.prototype,"isSSTWindowOpen",void 0),Hl([de()],Gl.prototype,"isTextUsWindowOpen",void 0),Hl([de()],Gl.prototype,"isCalculatorWindowOpen",void 0),Hl([de()],Gl.prototype,"isMobileFeaturesExpanded",void 0),Gl=Hl([se("meetelise-launcher")],Gl);const zl=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",Gl)},Ql=["app.meetelise.com","staging.eliseai.com","localhost"],Wl={calculator:{desktop:"calcDesktop",mobile:"calcMobile"},email:{desktop:"emailDesktop",mobile:"emailMobile"},call:{desktop:"callDesktop",mobile:"callMobile"},text:{desktop:"textDesktop",mobile:"textMobile"},sst:{desktop:"sstDesktop",mobile:"sstMobile"}},Vl=e=>{const t=window.location.hostname;if(!Ql.includes(t))return e;const n=(e=>{if(!e)return{};try{return e.split(",").reduce((e,t)=>{const[n,i]=t.split(":");return n&&i&&n in Wl&&(e[n]="true"===i.toLowerCase()),e},{})}catch(e){return{}}})(new URLSearchParams(window.location.search).get("widgets"));if(0===Object.keys(n).length)return e;const i={...e};return Object.entries(n).forEach(([e,t])=>{const n=Wl[e];n&&(i[n.desktop]=t,i[n.mobile]=t)}),i};var ql=n(5072),Yl=n.n(ql),Kl=n(7825),Xl=n.n(Kl),Zl=n(7659),Jl=n.n(Zl),eu=n(5056),tu=n.n(eu),nu=n(540),iu=n.n(nu),ru=n(1113),ou=n.n(ru),au=n(5541),su={};su.styleTagTransform=ou(),su.setAttributes=tu(),su.insert=Jl().bind(null,"head"),su.domAPI=Xl(),su.insertStyleElement=iu();Yl()(au.A,su);au.A&&au.A.locals&&au.A.locals;async function lu(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${t}/lead-sources`);if(n.data){if("7e352741-1120-4ccf-9929-5dc99193a908"===e){const e=["Zillow","Apartments.com","Google PPC","Google Maps","Apple Maps","Social Media","Print Marketing"];return n.data.filter(t=>e.includes(t))}return uu(n.data,t)}return[]}catch(e){return[]}}const uu=(e,t)=>{let n=[];switch(t){case"d41619ec-0f79-11ee-8439-93855926ad58":n=["Forthea - PPC","HotPads","Forthea","Locator","Website-apartmentguide.com","Forthea - organic search","Tdc employee","University newspaper","Nashville apartment locators","Forthea - paid social","Apartment list","Off campus partners","Waze ads","Athletic event","Website-apartment guide"];break;case"d4160560-0f79-11ee-8438-fba837bf3a46":n=["Forthea - PPC","Rentgrata","Website-ApartmentFinder.com","Word of Mouth","Texas A&M A-Frame on Campus","Rent.com","Website-craigslist","Apartment List","Website-apartments.com","Forthea - paid social","Forthea - organic search","Website-apartmentguide.com","Forthea","Uhomes","Phone book","Property - website"];break;default:n=[]}return e.sort(),e.filter(e=>{const t=e.toLowerCase();return!n.map(e=>e.toLowerCase()).includes(t)})};async function du(e){var t,n;if(!e)return!1;try{return null!==(n=null===(t=(await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/aip`)).data)||void 0===t?void 0:t.is_aip)&&void 0!==n&&n}catch(e){return!1}}var cu,hu=n(8805),pu=n.n(hu),fu=new Uint8Array(16);function gu(){if(!cu&&!(cu="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 cu(fu)}const mu=/^(?:[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;const yu=function(e){return"string"==typeof e&&mu.test(e)};for(var bu=[],vu=0;vu<256;++vu)bu.push((vu+256).toString(16).substr(1));const wu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(bu[e[t+0]]+bu[e[t+1]]+bu[e[t+2]]+bu[e[t+3]]+"-"+bu[e[t+4]]+bu[e[t+5]]+"-"+bu[e[t+6]]+bu[e[t+7]]+"-"+bu[e[t+8]]+bu[e[t+9]]+"-"+bu[e[t+10]]+bu[e[t+11]]+bu[e[t+12]]+bu[e[t+13]]+bu[e[t+14]]+bu[e[t+15]]).toLowerCase();if(!yu(n))throw TypeError("Stringified UUID is invalid");return n};const Cu=function(e,t,n){var i=(e=e||{}).random||(e.rng||gu)();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 wu(i)},xu=e=>localStorage.removeItem("com.elise.webchat.slug="+e),$u=(e,t,n)=>{const i=Br(new Date),r=n||`lead_${Cu()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:r,timestamp:i,initiatedChat:t})),{leadId:r,timestamp:Vr(i),buildingSlug:e,initiatedChat:t}},Su=e=>{const t=localStorage.getItem("com.elise.webchat.slug="+e);if(t)try{const n=JSON.parse(t),i={leadId:n.leadId,timestamp:new Date(n.timestamp),buildingSlug:n.buildingSlug,initiatedChat:n.initiatedChat};if(Au(e,i))return i}catch(e){}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},Au=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if($r(t.timestamp,e))return!1}}catch(e){}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp)&&!Ir(t.timestamp,24)};var Eu;!function(e){e.noReply="no-reply",e.text="text",e.media="media"}(Eu||(Eu={}));const Tu=e=>e.type===_u.text,ku=e=>e.type===_u.media;var _u;!function(e){e.text="text",e.media="media"}(_u||(_u={}));const Ou=class{constructor(e,t,n,i=null,r,o,a=null,s=Nc.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.firedScheduledTourConfirmationIds=new Set,this.widgetType=Nc.Default,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.sessionToken=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t;const n={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,n],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter(e=>e.message.messageType!==Eu.noReply),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const i="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;if(null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:i}),!i&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=i,"ai_message"===e.message.customType){const t=e.message.stream_id,n=null!=t?t:String(+e.timetoken);(t?this.reconstructStreamText(t):e.message.text).includes("confirmed for your")&&this.fireScheduledTourEventOnce(n,e.message)}this.checkAndHandleGTMForLeadEmail(e)}},this.isLoadingMessages=!1,this.isFirstChatMessageSent=!1,this.streamingMessageTimeout=null,this.checkAndHandleDelayStreamingMessages=({delayToFetchHistoryInMs:e=1e4}={})=>{this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null);const t=new Map;this.rawPubnubMessages.forEach(e=>{var n;const i=e.message.stream_id;i&&t.set(i,[...null!==(n=t.get(i))&&void 0!==n?n:[],e])});const n=[...t.entries()].filter(([,e])=>!this.isStreamComplete(e)).map(([e])=>e);n.length>0&&(this.streamingMessageTimeout=setTimeout(()=>{Ho({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),this.getChannelHistory().then(()=>n.forEach(e=>this.checkAndFireTourConfirmationForStream(e)))},e))},this.isStreamComplete=e=>{var t;const n=e.find(e=>e.message.is_done);if(!n)return!1;const i=new Set(e.map(e=>{var t;return null!==(t=e.message.order)&&void 0!==t?t:0}));for(let e=0;e<=(null!==(t=n.message.order)&&void 0!==t?t:0);e++)if(!i.has(e))return!1;return!0},this.getStreamChunks=e=>this.removeDuplicatedRawPubnubMessages(this.rawPubnubMessages).filter(t=>t.message.stream_id===e).sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),this.reconstructStreamText=e=>this.getStreamChunks(e).map(e=>e.message.text).join(""),this.fireScheduledTourEventOnce=(e,t)=>{var n;this.firedScheduledTourConfirmationIds.has(e)||(this.firedScheduledTourConfirmationIds.add(e),$o("scheduledTourEvent",{tourDetails:t,buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))},this.checkAndFireTourConfirmationForStream=e=>{var t;if(this.reconstructStreamText(e).includes("confirmed for your")){const n=this.getStreamChunks(e);this.fireScheduledTourEventOnce(e,null===(t=n[n.length-1])||void 0===t?void 0:t.message)}},this.checkAndHandleGTMForLeadEmail=e=>{var t;try{if("lead_message"!==e.message.customType)return;if(!(e=>{try{return/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b/.test(e)}catch(e){return!1}})(e.message.text))return;$o("leadProvidedEmail",{buildingId:null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel})}catch(e){return}},this.markEveryPreviousNoReplyMessageDone=e=>{var t,n;for(let i=e.length-1;i>=0;i--){const r=null===(t=e[i])||void 0===t?void 0:t.message,o=i>0&&(null===(n=e[i-1])||void 0===n?void 0:n.message);(null==r?void 0:r.messageType)===Eu.noReply&&o&&(o.is_done=!0)}},this.checkMessageChunkValid=e=>{try{return!!e.message&&!!e.message.text&&e.message.text.length>0&&!!e.message.customType}catch(e){return!1}},this.handleChatListeners=()=>{if(this.pubnub&&this.channel)try{this.pubnub.subscribe({channels:[this.channel]}),this.pubnub.addListener(this.listenerParams)}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.handleDisconnect=()=>{this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null),this.removeChatListeners()},this.removeChatListeners=()=>{this.pubnub&&this.channel&&(this.pubnub.unsubscribe({channels:[this.channel]}),this.pubnub.removeListener(this.listenerParams))},this.sendMessage=async e=>{if(e){if(!this.pubnub){const e=$u(this.buildingSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken(async()=>{var t,n,i,r,o,a,s,l,u;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout(()=>{this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})},9e4),0===this.simpleChatMessages.length&&(null===(t=this.leadSourceClient)||void 0===t||t.checkAndHandleForLogLeadSource({webchatAction:"chat",stateId:null})),this.widgetType===Nc.Utilities?await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState(),orgSlug:this.orgSlug}}):(await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,userId:null===(i=this.buildingWebchatView)||void 0===i?void 0:i.userId,leadSource:this.leadSource,widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState(),lead_sources_with_timestamps:(null!==(o=null===(r=this.leadSourceMultitouchClient)||void 0===r?void 0:r.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:null}))&&void 0!==o?o:[]).map(e=>Tr({...e}))}}),null===(a=this.leadSourceClient)||void 0===a||a.resetLeadSource(),null===(s=this.leadSourceMultitouchClient)||void 0===s||s.resetLeadSourceTouchpoints()),this.isFirstChatMessageSent||($o("firstChatMessageSent",{message:e,buildingId:null===(l=this.buildingWebchatView)||void 0===l?void 0:l.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),$o("chatMessageSent",{message:e,buildingId:null===(u=this.buildingWebchatView)||void 0===u?void 0:u.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))}),!1===this.isLoadingMessages&&(this.isLoadingMessages=!0)}},this.isLeadMessage=e=>e.publisher.includes("lead_")&&"lead_message"===e.message.customType,this.removeDuplicatedRawPubnubMessages=e=>{const t=new Set;return e.filter(e=>{if("lead_message"===e.message.customType||!e.message.stream_id||!e.message.order)return!0;const n=`${e.message.stream_id}-${e.message.order}-${e.message.messageType}`;return t.has(n)?(Ho({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),!1):(t.add(n),!0)})},this.translatePubnubMessagesIntoSimpleChatMessages=e=>{const t=[],n={};return this.removeDuplicatedRawPubnubMessages(e).forEach(e=>{var i;"media"===e.message.messageType?t.push({timestamp:e.timetoken,media:null!==(i=e.message.media)&&void 0!==i?i:[],isLeadMessage:this.isLeadMessage(e),type:_u.media}):!e.message.stream_id||e.message.is_done&&0===e.message.order?t.push({timestamp:e.timetoken,message:e.message.text,isLeadMessage:this.isLeadMessage(e),chunks:[{text:e.message.text,order:0,isDone:!0}],type:_u.text}):n[e.message.stream_id]?n[e.message.stream_id].push(e):n[e.message.stream_id]=[e]}),Object.keys(n).forEach(e=>{const i=n[e],r=this.getConsecutiveChunks(i.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)})),o=r.map(e=>e.message.text).join(""),a=r[0],s={timestamp:a.timetoken,message:o,isLeadMessage:this.isLeadMessage(a),chunks:r.map(e=>{var t,n;return{text:e.message.text,order:null!==(t=e.message.order)&&void 0!==t?t:0,isDone:null!==(n=e.message.is_done)&&void 0!==n&&n}}),type:_u.text};this.isCurrentlyStreamingMessage=this.isMessageStillStreamingChunks(r),t.push(s)}),t.sort((e,t)=>e.timestamp-t.timestamp),t},this.getConsecutiveChunks=e=>{var t,n;const i=e.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),r=[];let o=null!==(t=i[0].message.order)&&void 0!==t?t:0;for(const e of i){if((null!==(n=e.message.order)&&void 0!==n?n:-1)!==o)break;r.push(e),o++}return r},this.isMessageStillStreamingChunks=e=>{const t=e.find(e=>e.message.is_done);return!t||e.length===t.message.order},this.buildingSlug=e,this.buildingWebchatView=t,this.orgSlug=n,this.leadSource=i,this.leadUserId=r,this.channel=`webchat_${r}`,this.leadSourceClient=a,this.leadSourceMultitouchClient=o,this.widgetType=s}async initSession(e,t,n){try{const i={building_slug:e,org_slug:t};n&&(i.lead_id=n);const o=await r().post(`${this.apiHost}/platformApi/webchat/init`,i);return this.sessionToken=o.data.session_token,this.leadUserId=o.data.lead_id,this.channel=o.data.channel,o.data}catch(e){return this.buildingWebchatView&&Ho({logTitle:"WEBCHAT_INIT_SESSION_ERROR",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e}),null}}addChatListener(e){this.chatListener=e}async initializePubnub(e){if(!e.leadId)return;this.leadUserId=e.leadId;const t=await this.fetchToken(this.leadUserId,this.channel);return t?(this.pubnub=new(pu())({publishKey:t.keys.publish_key,subscribeKey:t.keys.subscribe_key,userId:this.leadUserId,authKey:t.auth.result.token,origin:"meetelise.pubnubapi.com"}),this.withAuthToken(()=>new Promise(()=>this.handleChatListeners())),await this.withAuthToken(()=>this.getChannelHistory()),this.pubnub):void 0}async fetchToken(e,t){try{if(this.sessionToken){const e="healthcare"===this.widgetType?"?industry=health_care":"";return(await r().get(`${this.apiHost}/platformApi/webchat/pn/v2/request-token${e}`,{headers:{"X-Session-Token":this.sessionToken}})).data}return(await r().get(`${this.apiHost}/platformApi/webchat/pn/request-token?user_id=${e}&channel=${t}&${"healthcare"===this.widgetType?"industry=health_care":""}`)).data}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return null}async fetchChannelExists(e){try{return(await r().get(`${this.apiHost}/platformApi/webchat/check-channel-exists?channel_name=${e}`)).data}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return!1}async withAuthToken(e){try{await e()}catch(t){if(t instanceof i.AxiosError&&t&&t.response&&403===t.response.status)try{if(!this.pubnub||!this.leadUserId||!this.channel)return;const t=await this.fetchToken(this.leadUserId,this.channel);if(!t)return;this.pubnub.setAuthKey(t.auth.result.token),await e()}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}}async getChannelHistory(e=1500){var t;try{let n=[],i=null;const r=100;for(let t=0;t<e;t+=r){const o=await new Promise((n,o)=>{if(!this.pubnub||!this.channel)return[];const a=Math.min(r,e-t);this.pubnub.fetchMessages({channels:[this.channel],count:a,start:null!=i?i:void 0},(e,t)=>{e.error?o(e):n(t)})}),a=o.channels[this.channel];if(!a)break;if(a.sort((e,t)=>+e.timetoken-+t.timetoken),!a||0===a.length)break;if(this.channel&&0!==Object.keys(o.channels).length){const e=o.channels[this.channel],t=[];e.forEach(e=>{e.uuid&&t.push({channel:e.channel,message:e.message,publisher:e.uuid,subscription:e.channel,timetoken:+e.timetoken})}),this.markEveryPreviousNoReplyMessageDone(t),n=n.concat(t.filter(e=>e.message.messageType!==Eu.noReply))}if(i=a[0].timetoken,n.length>=e||a.length<r)break}this.rawPubnubMessages=n.slice(0,e),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:!1})}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}shouldCreateAsDevState(){return location.href.startsWith("https://app.meetelise.com/settings/widgets")||location.href.includes("demo/utilities")}},Pu=new Set(["8009855990","8338526262","8002221222","8006624357","8002738255","8007997233","8007874889","8006564673","8004224453","8883737888","8006213362","8009506264","8558272736","8008435678","8007862929","8008523836","8007849433","8007729100","8006699777","8006858470","8004322209","8003473735","8008778339","8009552232","8002255342","8009272891","8003049320","8007937724","8002382333","8003353863","8776858878","8003329227","8776554371","8772944357","8772944356","6092925760","6092926735","8007928339","8008329173","8882853036","6092921210","8007929773","8003561561","8003826717","8005727233","8009291040","8888958179","8006879512","8004262537","8773475463","8774149251","8005103102","8889372835","8007010710","8007010720","8774288844","8007929745","8003283838","6092927060","6092928319","8008527899","8662401347","8009923678","8776522873","8776527624","8003313937","8008435437","8776536783","8778392339","8003676274","8006896411"]),Iu=e=>{const t=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1");return Pu.has(t)},Nu=(e,t,n)=>{try{const i=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1"),r=`tel:${i}`,o=`sms:${i}`,a=`whatsapp://send?phone=${i}`,s=`facetime:${i}`,l=`facetime-audio:${i}`,u=/(?:\+1[\s.-]?)?(?:\([2-9]\d{2}\)[\s.-]?|[2-9]\d{2}[\s.-])[2-9]\d{2}[\s.-]?\d{4}/g,d=/(tel|sms):(?:\+1\s)?(?:(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}|\d{10,11})/g,c=/whatsapp:\/\/send\?phone=\d+/g,h=/(facetime|facetime-audio):\d+/g,p=/emergency|emergencia/i,f=300,g=e=>!(!e||e.length>f)&&p.test(e),m=e=>{var t,n,i,r;if(g(e.textContent))return!0;if(g(null===(t=e.previousElementSibling)||void 0===t?void 0:t.textContent)||g(null===(n=e.nextElementSibling)||void 0===n?void 0:n.textContent))return!0;const o=e.parentElement;return!(!o||!g(null===(i=o.previousElementSibling)||void 0===i?void 0:i.textContent)&&!g(null===(r=o.nextElementSibling)||void 0===r?void 0:r.textContent))},y=document.body.getElementsByTagName("*");let b=!1;const v=i.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let w=!1,C=!1,x=0;for(let e=0;e<y.length;e++)if(y[e].nodeType===Node.ELEMENT_NODE&&!m(y[e])){if(1===y[e].childNodes.length&&y[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=y[e].textContent;if(!t)continue;const n=t.replace(u,e=>{if(Iu(e))return e;return e.startsWith("+1 ")?`+1 ${v}`:v});t!==n&&(x++,y[e].textContent=n),b=!0,w||(w=!0)}if(y[e].hasAttribute("href")){const t=y[e].getAttribute("href");if(!t)continue;let n="",i=d;if(t.startsWith("sms:")?n=o:t.startsWith("whatsapp:")?(n=a,i=c):t.startsWith("facetime:")?(n=s,i=h):t.startsWith("facetime-audio:")?(n=l,i=h):n=r,Iu(t))continue;const u=t.replace(i,n);if(y[e].setAttribute("href",u),(t.startsWith("tel:")||t.startsWith("sms:"))&&u===t&&u!==n){t.replace(/\D/g,"").length>=7&&y[e].setAttribute("href",t.startsWith("tel:")?r:o)}C||(C=!0)}}return w&&Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:v,website:window.location.href},logType:Fo.info,buildingSlug:n,orgSlug:t}),C&&Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:v,website:window.location.href},logType:Fo.info,buildingSlug:n,orgSlug:t}),b||Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:Fo.warn,buildingSlug:n,orgSlug:t}),x}catch(e){return Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"insertion-error",error:e instanceof Error?e.message:String(e),website:window.location.href},logType:Fo.error,buildingSlug:n,orgSlug:t,error:e}),0}},Mu=(e,t,n,i)=>{document.querySelectorAll("a").forEach(function(r){const o=r.getAttribute("href");o&&o.startsWith("https://app.meetelise.com/")&&((e,t,n)=>{const[i,r,o,...a]=new URL(e).pathname.split("/").filter(Boolean).map(e=>e.toLowerCase());return 0===a.length&&"tour"===o&&i===t.toLowerCase()&&r===n.toLowerCase()})(o,t,n)&&r.addEventListener("click",t=>{i()&&(t.preventDefault(),e(t))})})};var Du=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 Lu=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=qn,this.foregroundColorOnPrimaryBackgroundColor="white",this.toExpand=!1}render(){return R`
|
|
6055
|
+
${Ya}
|
|
6056
|
+
`,Gl([ue({attribute:!0})],zl.prototype,"isMinimized",void 0),Gl([ue()],zl.prototype,"mobileStyles",void 0),Gl([ue({type:Boolean})],zl.prototype,"isFirstMount",void 0),Gl([ue({attribute:!1})],zl.prototype,"openSSTWindowOnLoad",void 0),Gl([ue({attribute:!1})],zl.prototype,"autoOpenChatWidget",void 0),Gl([ue()],zl.prototype,"phoneNumber",void 0),Gl([ue({attribute:!0})],zl.prototype,"buildingName",void 0),Gl([ue({attribute:!0})],zl.prototype,"chatId",void 0),Gl([ue({attribute:!0})],zl.prototype,"orgLegalName",void 0),Gl([ue({attribute:!1})],zl.prototype,"country",void 0),Gl([ue({attribute:!0})],zl.prototype,"chatCallUsHeader",void 0),Gl([ue({attribute:!1})],zl.prototype,"buildingId",void 0),Gl([ue({type:Number})],zl.prototype,"orgId",void 0),Gl([ue({attribute:!1})],zl.prototype,"leadSourceParams",void 0),Gl([ue({attribute:!0})],zl.prototype,"buildingSlug",void 0),Gl([ue({attribute:!0})],zl.prototype,"orgSlug",void 0),Gl([ue({attribute:!0})],zl.prototype,"sgtUrl",void 0),Gl([ue({attribute:!0})],zl.prototype,"selfGuidedTourEnabled",void 0),Gl([ue({attribute:!0})],zl.prototype,"selfGuidedToursTypeOffered",void 0),Gl([ue({attribute:!0})],zl.prototype,"designConcept",void 0),Gl([ue({attribute:!0})],zl.prototype,"featureFlagShowDropdown",void 0),Gl([ue({attribute:!1})],zl.prototype,"leadSources",void 0),Gl([ue({attribute:!0})],zl.prototype,"currentLeadSource",void 0),Gl([ue({attribute:!0})],zl.prototype,"escortedToursLink",void 0),Gl([ue({attribute:!0})],zl.prototype,"escortedToursTypeOffered",void 0),Gl([ue({attribute:!0})],zl.prototype,"virtualToursLink",void 0),Gl([ue({attribute:!0})],zl.prototype,"virtualToursTypeOffered",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasChatEnabledDesktop",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasChatEnabledMobile",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasEmailEnabledDesktop",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasEmailEnabledMobile",void 0),Gl([ue({attribute:!0})],zl.prototype,"hasApplyNowEnabledDesktop",void 0),Gl([ue({attribute:!0})],zl.prototype,"hasApplyNowEnabledMobile",void 0),Gl([ue({attribute:!0})],zl.prototype,"applicationLink",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasCallUsEnabledDesktop",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasCallUsEnabledMobile",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasTextUsEnabledDesktop",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasTextUsEnabledMobile",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasSSTEnabledDesktop",void 0),Gl([ue({type:Boolean})],zl.prototype,"hasSSTEnabledMobile",void 0),Gl([ue({attribute:!1})],zl.prototype,"tourTypeOptions",void 0),Gl([ue({attribute:!1})],zl.prototype,"layoutOptions",void 0),Gl([ue({attribute:!0})],zl.prototype,"bedroomPreferenceRequired",void 0),Gl([ue({attribute:!0})],zl.prototype,"hasDynamicSchedulingEnabled",void 0),Gl([ue({attribute:!0})],zl.prototype,"hasPricingCalculatorEnabledDesktop",void 0),Gl([ue({attribute:!0})],zl.prototype,"hasPricingCalculatorEnabledMobile",void 0),Gl([ue({attribute:!1})],zl.prototype,"hasHideMobileFeatures",void 0),Gl([ue({type:Number})],zl.prototype,"right",void 0),Gl([ue({type:Number})],zl.prototype,"bottom",void 0),Gl([ue({type:Number})],zl.prototype,"top",void 0),Gl([ue({type:Number})],zl.prototype,"left",void 0),Gl([ue({attribute:!0})],zl.prototype,"showTourNextToChat",void 0),Gl([ue({attribute:!1})],zl.prototype,"onChatTapped",void 0),Gl([ue({attribute:!0})],zl.prototype,"onClickMinimize",void 0),Gl([ue({attribute:!0})],zl.prototype,"onSstClose",void 0),Gl([ue({attribute:!0})],zl.prototype,"overrideRentgrata",void 0),Gl([ue({attribute:!1})],zl.prototype,"launcherStyles",void 0),Gl([ue({attribute:!0})],zl.prototype,"primaryColor",void 0),Gl([ue({attribute:!0})],zl.prototype,"backgroundColor",void 0),Gl([ue({attribute:!0})],zl.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Gl([ue({attribute:!0})],zl.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Gl([ue({attribute:!0})],zl.prototype,"leadSourceClient",void 0),Gl([de()],zl.prototype,"leadSourceMultitouchClient",void 0),Gl([de()],zl.prototype,"_isMobile",void 0),Gl([de()],zl.prototype,"isEmailWindowOpen",void 0),Gl([de()],zl.prototype,"isCallUsWindowOpen",void 0),Gl([de()],zl.prototype,"isSSTWindowOpen",void 0),Gl([de()],zl.prototype,"isTextUsWindowOpen",void 0),Gl([de()],zl.prototype,"isCalculatorWindowOpen",void 0),Gl([de()],zl.prototype,"isMobileFeaturesExpanded",void 0),zl=Gl([se("meetelise-launcher")],zl);const Ql=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",zl)},Wl=["app.meetelise.com","staging.eliseai.com","localhost"],Vl={calculator:{desktop:"calcDesktop",mobile:"calcMobile"},email:{desktop:"emailDesktop",mobile:"emailMobile"},call:{desktop:"callDesktop",mobile:"callMobile"},text:{desktop:"textDesktop",mobile:"textMobile"},sst:{desktop:"sstDesktop",mobile:"sstMobile"}},ql=e=>{const t=window.location.hostname;if(!Wl.includes(t))return e;const n=(e=>{if(!e)return{};try{return e.split(",").reduce((e,t)=>{const[n,i]=t.split(":");return n&&i&&n in Vl&&(e[n]="true"===i.toLowerCase()),e},{})}catch(e){return{}}})(new URLSearchParams(window.location.search).get("widgets"));if(0===Object.keys(n).length)return e;const i={...e};return Object.entries(n).forEach(([e,t])=>{const n=Vl[e];n&&(i[n.desktop]=t,i[n.mobile]=t)}),i};var Yl=n(5072),Kl=n.n(Yl),Xl=n(7825),Zl=n.n(Xl),Jl=n(7659),eu=n.n(Jl),tu=n(5056),nu=n.n(tu),iu=n(540),ru=n.n(iu),ou=n(1113),au=n.n(ou),su=n(5541),lu={};lu.styleTagTransform=au(),lu.setAttributes=nu(),lu.insert=eu().bind(null,"head"),lu.domAPI=Zl(),lu.insertStyleElement=ru();Kl()(su.A,lu);su.A&&su.A.locals&&su.A.locals;async function uu(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${t}/lead-sources`);if(n.data){if("7e352741-1120-4ccf-9929-5dc99193a908"===e){const e=["Zillow","Apartments.com","Google PPC","Google Maps","Apple Maps","Social Media","Print Marketing"];return n.data.filter(t=>e.includes(t))}return du(n.data,t)}return[]}catch(e){return[]}}const du=(e,t)=>{let n=[];switch(t){case"d41619ec-0f79-11ee-8439-93855926ad58":n=["Forthea - PPC","HotPads","Forthea","Locator","Website-apartmentguide.com","Forthea - organic search","Tdc employee","University newspaper","Nashville apartment locators","Forthea - paid social","Apartment list","Off campus partners","Waze ads","Athletic event","Website-apartment guide"];break;case"d4160560-0f79-11ee-8438-fba837bf3a46":n=["Forthea - PPC","Rentgrata","Website-ApartmentFinder.com","Word of Mouth","Texas A&M A-Frame on Campus","Rent.com","Website-craigslist","Apartment List","Website-apartments.com","Forthea - paid social","Forthea - organic search","Website-apartmentguide.com","Forthea","Uhomes","Phone book","Property - website"];break;default:n=[]}return e.sort(),e.filter(e=>{const t=e.toLowerCase();return!n.map(e=>e.toLowerCase()).includes(t)})};async function cu(e){var t,n;if(!e)return!1;try{return null!==(n=null===(t=(await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/aip`)).data)||void 0===t?void 0:t.is_aip)&&void 0!==n&&n}catch(e){return!1}}var hu,pu=n(8805),fu=n.n(pu),gu=new Uint8Array(16);function mu(){if(!hu&&!(hu="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 hu(gu)}const yu=/^(?:[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;const bu=function(e){return"string"==typeof e&&yu.test(e)};for(var vu=[],wu=0;wu<256;++wu)vu.push((wu+256).toString(16).substr(1));const Cu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(vu[e[t+0]]+vu[e[t+1]]+vu[e[t+2]]+vu[e[t+3]]+"-"+vu[e[t+4]]+vu[e[t+5]]+"-"+vu[e[t+6]]+vu[e[t+7]]+"-"+vu[e[t+8]]+vu[e[t+9]]+"-"+vu[e[t+10]]+vu[e[t+11]]+vu[e[t+12]]+vu[e[t+13]]+vu[e[t+14]]+vu[e[t+15]]).toLowerCase();if(!bu(n))throw TypeError("Stringified UUID is invalid");return n};const xu=function(e,t,n){var i=(e=e||{}).random||(e.rng||mu)();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 Cu(i)},$u=e=>localStorage.removeItem("com.elise.webchat.slug="+e),Su=(e,t,n)=>{const i=Br(new Date),r=n||`lead_${xu()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:r,timestamp:i,initiatedChat:t})),{leadId:r,timestamp:Vr(i),buildingSlug:e,initiatedChat:t}},Au=e=>{const t=localStorage.getItem("com.elise.webchat.slug="+e);if(t)try{const n=JSON.parse(t),i={leadId:n.leadId,timestamp:new Date(n.timestamp),buildingSlug:n.buildingSlug,initiatedChat:n.initiatedChat};if(Eu(e,i))return i}catch(e){}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},Eu=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if($r(t.timestamp,e))return!1}}catch(e){}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp)&&!Ir(t.timestamp,24)};var Tu;!function(e){e.noReply="no-reply",e.text="text",e.media="media"}(Tu||(Tu={}));const ku=e=>e.type===Ou.text,_u=e=>e.type===Ou.media;var Ou;!function(e){e.text="text",e.media="media"}(Ou||(Ou={}));const Pu=class{constructor(e,t,n,i=null,r,o,a=null,s=Mc.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.firedScheduledTourConfirmationIds=new Set,this.widgetType=Mc.Default,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.sessionToken=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t;const n={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,n],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter(e=>e.message.messageType!==Tu.noReply),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const i="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;if(null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:i}),!i&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=i,"ai_message"===e.message.customType){const t=e.message.stream_id,n=null!=t?t:String(+e.timetoken);(t?this.reconstructStreamText(t):e.message.text).includes("confirmed for your")&&this.fireScheduledTourEventOnce(n,e.message)}this.checkAndHandleGTMForLeadEmail(e)}},this.isLoadingMessages=!1,this.isFirstChatMessageSent=!1,this.streamingMessageTimeout=null,this.checkAndHandleDelayStreamingMessages=({delayToFetchHistoryInMs:e=1e4}={})=>{this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null);const t=new Map;this.rawPubnubMessages.forEach(e=>{var n;const i=e.message.stream_id;i&&t.set(i,[...null!==(n=t.get(i))&&void 0!==n?n:[],e])});const n=[...t.entries()].filter(([,e])=>!this.isStreamComplete(e)).map(([e])=>e);n.length>0&&(this.streamingMessageTimeout=setTimeout(()=>{Ho({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),this.getChannelHistory().then(()=>n.forEach(e=>this.checkAndFireTourConfirmationForStream(e)))},e))},this.isStreamComplete=e=>{var t;const n=e.find(e=>e.message.is_done);if(!n)return!1;const i=new Set(e.map(e=>{var t;return null!==(t=e.message.order)&&void 0!==t?t:0}));for(let e=0;e<=(null!==(t=n.message.order)&&void 0!==t?t:0);e++)if(!i.has(e))return!1;return!0},this.getStreamChunks=e=>this.removeDuplicatedRawPubnubMessages(this.rawPubnubMessages).filter(t=>t.message.stream_id===e).sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),this.reconstructStreamText=e=>this.getStreamChunks(e).map(e=>e.message.text).join(""),this.fireScheduledTourEventOnce=(e,t)=>{var n;this.firedScheduledTourConfirmationIds.has(e)||(this.firedScheduledTourConfirmationIds.add(e),$o("scheduledTourEvent",{tourDetails:t,buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))},this.checkAndFireTourConfirmationForStream=e=>{var t;if(this.reconstructStreamText(e).includes("confirmed for your")){const n=this.getStreamChunks(e);this.fireScheduledTourEventOnce(e,null===(t=n[n.length-1])||void 0===t?void 0:t.message)}},this.checkAndHandleGTMForLeadEmail=e=>{var t;try{if("lead_message"!==e.message.customType)return;if(!(e=>{try{return/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b/.test(e)}catch(e){return!1}})(e.message.text))return;$o("leadProvidedEmail",{buildingId:null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel})}catch(e){return}},this.markEveryPreviousNoReplyMessageDone=e=>{var t,n;for(let i=e.length-1;i>=0;i--){const r=null===(t=e[i])||void 0===t?void 0:t.message,o=i>0&&(null===(n=e[i-1])||void 0===n?void 0:n.message);(null==r?void 0:r.messageType)===Tu.noReply&&o&&(o.is_done=!0)}},this.checkMessageChunkValid=e=>{try{return!!e.message&&!!e.message.text&&e.message.text.length>0&&!!e.message.customType}catch(e){return!1}},this.handleChatListeners=()=>{if(this.pubnub&&this.channel)try{this.pubnub.subscribe({channels:[this.channel]}),this.pubnub.addListener(this.listenerParams)}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.handleDisconnect=()=>{this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null),this.removeChatListeners()},this.removeChatListeners=()=>{this.pubnub&&this.channel&&(this.pubnub.unsubscribe({channels:[this.channel]}),this.pubnub.removeListener(this.listenerParams))},this.sendMessage=async e=>{if(e){if(!this.pubnub){const e=Su(this.buildingSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken(async()=>{var t,n,i,r,o,a,s,l,u;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout(()=>{this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})},9e4),0===this.simpleChatMessages.length&&(null===(t=this.leadSourceClient)||void 0===t||t.checkAndHandleForLogLeadSource({webchatAction:"chat",stateId:null})),this.widgetType===Mc.Utilities?await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState(),orgSlug:this.orgSlug}}):(await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,userId:null===(i=this.buildingWebchatView)||void 0===i?void 0:i.userId,leadSource:this.leadSource,widgetType:this.widgetType,isDevState:this.shouldCreateAsDevState(),lead_sources_with_timestamps:(null!==(o=null===(r=this.leadSourceMultitouchClient)||void 0===r?void 0:r.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:null}))&&void 0!==o?o:[]).map(e=>Tr({...e}))}}),null===(a=this.leadSourceClient)||void 0===a||a.resetLeadSource(),null===(s=this.leadSourceMultitouchClient)||void 0===s||s.resetLeadSourceTouchpoints()),this.isFirstChatMessageSent||($o("firstChatMessageSent",{message:e,buildingId:null===(l=this.buildingWebchatView)||void 0===l?void 0:l.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),$o("chatMessageSent",{message:e,buildingId:null===(u=this.buildingWebchatView)||void 0===u?void 0:u.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))}),!1===this.isLoadingMessages&&(this.isLoadingMessages=!0)}},this.isLeadMessage=e=>e.publisher.includes("lead_")&&"lead_message"===e.message.customType,this.removeDuplicatedRawPubnubMessages=e=>{const t=new Set;return e.filter(e=>{if("lead_message"===e.message.customType||!e.message.stream_id||!e.message.order)return!0;const n=`${e.message.stream_id}-${e.message.order}-${e.message.messageType}`;return t.has(n)?(Ho({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),!1):(t.add(n),!0)})},this.translatePubnubMessagesIntoSimpleChatMessages=e=>{const t=[],n={};return this.removeDuplicatedRawPubnubMessages(e).forEach(e=>{var i;"media"===e.message.messageType?t.push({timestamp:e.timetoken,media:null!==(i=e.message.media)&&void 0!==i?i:[],isLeadMessage:this.isLeadMessage(e),type:Ou.media}):!e.message.stream_id||e.message.is_done&&0===e.message.order?t.push({timestamp:e.timetoken,message:e.message.text,isLeadMessage:this.isLeadMessage(e),chunks:[{text:e.message.text,order:0,isDone:!0}],type:Ou.text}):n[e.message.stream_id]?n[e.message.stream_id].push(e):n[e.message.stream_id]=[e]}),Object.keys(n).forEach(e=>{const i=n[e],r=this.getConsecutiveChunks(i.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)})),o=r.map(e=>e.message.text).join(""),a=r[0],s={timestamp:a.timetoken,message:o,isLeadMessage:this.isLeadMessage(a),chunks:r.map(e=>{var t,n;return{text:e.message.text,order:null!==(t=e.message.order)&&void 0!==t?t:0,isDone:null!==(n=e.message.is_done)&&void 0!==n&&n}}),type:Ou.text};this.isCurrentlyStreamingMessage=this.isMessageStillStreamingChunks(r),t.push(s)}),t.sort((e,t)=>e.timestamp-t.timestamp),t},this.getConsecutiveChunks=e=>{var t,n;const i=e.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),r=[];let o=null!==(t=i[0].message.order)&&void 0!==t?t:0;for(const e of i){if((null!==(n=e.message.order)&&void 0!==n?n:-1)!==o)break;r.push(e),o++}return r},this.isMessageStillStreamingChunks=e=>{const t=e.find(e=>e.message.is_done);return!t||e.length===t.message.order},this.buildingSlug=e,this.buildingWebchatView=t,this.orgSlug=n,this.leadSource=i,this.leadUserId=r,this.channel=`webchat_${r}`,this.leadSourceClient=a,this.leadSourceMultitouchClient=o,this.widgetType=s}async initSession(e,t,n){try{const i={building_slug:e,org_slug:t};n&&(i.lead_id=n);const o=await r().post(`${this.apiHost}/platformApi/webchat/init`,i);return this.sessionToken=o.data.session_token,this.leadUserId=o.data.lead_id,this.channel=o.data.channel,o.data}catch(e){return this.buildingWebchatView&&Ho({logTitle:"WEBCHAT_INIT_SESSION_ERROR",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e}),null}}addChatListener(e){this.chatListener=e}async initializePubnub(e){if(!e.leadId)return;this.leadUserId=e.leadId;const t=await this.fetchToken(this.leadUserId,this.channel);return t?(this.pubnub=new(fu())({publishKey:t.keys.publish_key,subscribeKey:t.keys.subscribe_key,userId:this.leadUserId,authKey:t.auth.result.token,origin:"meetelise.pubnubapi.com"}),this.withAuthToken(()=>new Promise(()=>this.handleChatListeners())),await this.withAuthToken(()=>this.getChannelHistory()),this.pubnub):void 0}async fetchToken(e,t){try{if(this.sessionToken){const e="healthcare"===this.widgetType?"?industry=health_care":"";return(await r().get(`${this.apiHost}/platformApi/webchat/pn/v2/request-token${e}`,{headers:{"X-Session-Token":this.sessionToken}})).data}return(await r().get(`${this.apiHost}/platformApi/webchat/pn/request-token?user_id=${e}&channel=${t}&${"healthcare"===this.widgetType?"industry=health_care":""}`)).data}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return null}async fetchChannelExists(e){try{return(await r().get(`${this.apiHost}/platformApi/webchat/check-channel-exists?channel_name=${e}`)).data}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return!1}async withAuthToken(e){try{await e()}catch(t){if(t instanceof i.AxiosError&&t&&t.response&&403===t.response.status)try{if(!this.pubnub||!this.leadUserId||!this.channel)return;const t=await this.fetchToken(this.leadUserId,this.channel);if(!t)return;this.pubnub.setAuthKey(t.auth.result.token),await e()}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:Fo.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}}async getChannelHistory(e=1500){var t;try{let n=[],i=null;const r=100;for(let t=0;t<e;t+=r){const o=await new Promise((n,o)=>{if(!this.pubnub||!this.channel)return[];const a=Math.min(r,e-t);this.pubnub.fetchMessages({channels:[this.channel],count:a,start:null!=i?i:void 0},(e,t)=>{e.error?o(e):n(t)})}),a=o.channels[this.channel];if(!a)break;if(a.sort((e,t)=>+e.timetoken-+t.timetoken),!a||0===a.length)break;if(this.channel&&0!==Object.keys(o.channels).length){const e=o.channels[this.channel],t=[];e.forEach(e=>{e.uuid&&t.push({channel:e.channel,message:e.message,publisher:e.uuid,subscription:e.channel,timetoken:+e.timetoken})}),this.markEveryPreviousNoReplyMessageDone(t),n=n.concat(t.filter(e=>e.message.messageType!==Tu.noReply))}if(i=a[0].timetoken,n.length>=e||a.length<r)break}this.rawPubnubMessages=n.slice(0,e),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:!1})}catch(e){this.buildingWebchatView&&Ho({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}shouldCreateAsDevState(){return location.href.startsWith("https://app.meetelise.com/settings/widgets")||location.href.includes("demo/utilities")}},Iu=new Set(["8009855990","8338526262","8002221222","8006624357","8002738255","8007997233","8007874889","8006564673","8004224453","8883737888","8006213362","8009506264","8558272736","8008435678","8007862929","8008523836","8007849433","8007729100","8006699777","8006858470","8004322209","8003473735","8008778339","8009552232","8002255342","8009272891","8003049320","8007937724","8002382333","8003353863","8776858878","8003329227","8776554371","8772944357","8772944356","6092925760","6092926735","8007928339","8008329173","8882853036","6092921210","8007929773","8003561561","8003826717","8005727233","8009291040","8888958179","8006879512","8004262537","8773475463","8774149251","8005103102","8889372835","8007010710","8007010720","8774288844","8007929745","8003283838","6092927060","6092928319","8008527899","8662401347","8009923678","8776522873","8776527624","8003313937","8008435437","8776536783","8778392339","8003676274","8006896411"]),Nu=e=>{const t=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1");return Iu.has(t)},Mu=(e,t,n)=>{try{const i=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1"),r=`tel:${i}`,o=`sms:${i}`,a=`whatsapp://send?phone=${i}`,s=`facetime:${i}`,l=`facetime-audio:${i}`,u=/(?:\+1[\s.-]?)?(?:\([2-9]\d{2}\)[\s.-]?|[2-9]\d{2}[\s.-])[2-9]\d{2}[\s.-]?\d{4}/g,d=/(tel|sms):(?:\+1\s)?(?:(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}|\d{10,11})/g,c=/whatsapp:\/\/send\?phone=\d+/g,h=/(facetime|facetime-audio):\d+/g,p=/emergency|emergencia/i,f=300,g=e=>!(!e||e.length>f)&&p.test(e),m=e=>{var t,n,i,r;if(g(e.textContent))return!0;if(g(null===(t=e.previousElementSibling)||void 0===t?void 0:t.textContent)||g(null===(n=e.nextElementSibling)||void 0===n?void 0:n.textContent))return!0;const o=e.parentElement;return!(!o||!g(null===(i=o.previousElementSibling)||void 0===i?void 0:i.textContent)&&!g(null===(r=o.nextElementSibling)||void 0===r?void 0:r.textContent))},y=document.body.getElementsByTagName("*");let b=!1;const v=i.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let w=!1,C=!1,x=0;for(let e=0;e<y.length;e++)if(y[e].nodeType===Node.ELEMENT_NODE&&!m(y[e])){if(1===y[e].childNodes.length&&y[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=y[e].textContent;if(!t)continue;const n=t.replace(u,e=>{if(Nu(e))return e;return e.startsWith("+1 ")?`+1 ${v}`:v});t!==n&&(x++,y[e].textContent=n),b=!0,w||(w=!0)}if(y[e].hasAttribute("href")){const t=y[e].getAttribute("href");if(!t)continue;let n="",i=d;if(t.startsWith("sms:")?n=o:t.startsWith("whatsapp:")?(n=a,i=c):t.startsWith("facetime:")?(n=s,i=h):t.startsWith("facetime-audio:")?(n=l,i=h):n=r,Nu(t))continue;const u=t.replace(i,n);if(y[e].setAttribute("href",u),(t.startsWith("tel:")||t.startsWith("sms:"))&&u===t&&u!==n){t.replace(/\D/g,"").length>=7&&y[e].setAttribute("href",t.startsWith("tel:")?r:o)}C||(C=!0)}}return w&&Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:v,website:window.location.href},logType:Fo.info,buildingSlug:n,orgSlug:t}),C&&Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:v,website:window.location.href},logType:Fo.info,buildingSlug:n,orgSlug:t}),b||Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:Fo.warn,buildingSlug:n,orgSlug:t}),x}catch(e){return Ho({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"insertion-error",error:e instanceof Error?e.message:String(e),website:window.location.href},logType:Fo.error,buildingSlug:n,orgSlug:t,error:e}),0}},Du=(e,t,n,i)=>{document.querySelectorAll("a").forEach(function(r){const o=r.getAttribute("href");o&&o.startsWith("https://app.meetelise.com/")&&((e,t,n)=>{const[i,r,o,...a]=new URL(e).pathname.split("/").filter(Boolean).map(e=>e.toLowerCase());return 0===a.length&&"tour"===o&&i===t.toLowerCase()&&r===n.toLowerCase()})(o,t,n)&&r.addEventListener("click",t=>{i()&&(t.preventDefault(),e(t))})})};var Lu=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 Uu=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=qn,this.foregroundColorOnPrimaryBackgroundColor="white",this.toExpand=!1}render(){return R`
|
|
6048
6057
|
<button
|
|
6049
6058
|
class=${this.toExpand?"button-container mini":"button-container"}
|
|
6050
6059
|
@click=${this.onClick}
|
|
@@ -6055,13 +6064,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6055
6064
|
style=${Vn({background:this.primaryColor})}
|
|
6056
6065
|
>
|
|
6057
6066
|
${this.toExpand?R`<div class="chevron-up">
|
|
6058
|
-
${
|
|
6067
|
+
${Ml(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
6059
6068
|
</div>`:R` <div class="x-icon">
|
|
6060
|
-
${
|
|
6069
|
+
${Ss(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
6061
6070
|
</div>`}
|
|
6062
6071
|
</div>
|
|
6063
6072
|
</button>
|
|
6064
|
-
`}};
|
|
6073
|
+
`}};Uu.styles=[u`
|
|
6065
6074
|
.button-container {
|
|
6066
6075
|
width: 56px;
|
|
6067
6076
|
height: 56px;
|
|
@@ -6111,7 +6120,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6111
6120
|
cursor: pointer;
|
|
6112
6121
|
filter: brightness(90%);
|
|
6113
6122
|
}
|
|
6114
|
-
`],
|
|
6123
|
+
`],Lu([ue({attribute:!0})],Uu.prototype,"onClick",void 0),Lu([ue({attribute:!0})],Uu.prototype,"primaryColor",void 0),Lu([ue({attribute:!0})],Uu.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Lu([ue({attribute:!0})],Uu.prototype,"toExpand",void 0),Uu=Lu([se("minimize-expand-button")],Uu);const Ru=u`
|
|
6115
6124
|
#healthchat-container {
|
|
6116
6125
|
position: fixed;
|
|
6117
6126
|
|
|
@@ -6229,7 +6238,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6229
6238
|
.health-bttn-allow-access {
|
|
6230
6239
|
padding-right: 28px;
|
|
6231
6240
|
}
|
|
6232
|
-
`,
|
|
6241
|
+
`,Bu=u`
|
|
6233
6242
|
#pubnub-chat-container {
|
|
6234
6243
|
position: fixed;
|
|
6235
6244
|
|
|
@@ -6349,7 +6358,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6349
6358
|
border: none;
|
|
6350
6359
|
cursor: pointer;
|
|
6351
6360
|
}
|
|
6352
|
-
`,
|
|
6361
|
+
`,ju=u`
|
|
6353
6362
|
#header-text {
|
|
6354
6363
|
font-size: 12px;
|
|
6355
6364
|
font-weight: 700;
|
|
@@ -6550,7 +6559,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6550
6559
|
.checkbox:hover {
|
|
6551
6560
|
opacity: 0.5;
|
|
6552
6561
|
}
|
|
6553
|
-
`,{entries:ju,setPrototypeOf:Fu,isFrozen:Hu,getPrototypeOf:Gu,getOwnPropertyDescriptor:zu}=Object;let{freeze:Qu,seal:Wu,create:Vu}=Object,{apply:qu,construct:Yu}="undefined"!=typeof Reflect&&Reflect;Qu||(Qu=function(e){return e}),Wu||(Wu=function(e){return e}),qu||(qu=function(e,t,n){return e.apply(t,n)}),Yu||(Yu=function(e,t){return new e(...t)});const Ku=cd(Array.prototype.forEach),Xu=cd(Array.prototype.lastIndexOf),Zu=cd(Array.prototype.pop),Ju=cd(Array.prototype.push),ed=cd(Array.prototype.splice),td=cd(String.prototype.toLowerCase),nd=cd(String.prototype.toString),id=cd(String.prototype.match),rd=cd(String.prototype.replace),od=cd(String.prototype.indexOf),ad=cd(String.prototype.trim),sd=cd(Object.prototype.hasOwnProperty),ld=cd(RegExp.prototype.test),ud=(dd=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Yu(dd,t)});var dd;function cd(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return qu(e,t,i)}}function hd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:td;Fu&&Fu(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Hu(t)||(t[i]=e),r=e)}e[r]=!0}return e}function pd(e){for(let t=0;t<e.length;t++){sd(e,t)||(e[t]=null)}return e}function fd(e){const t=Vu(null);for(const[n,i]of ju(e)){sd(e,n)&&(Array.isArray(i)?t[n]=pd(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=fd(i):t[n]=i)}return t}function gd(e,t){for(;null!==e;){const n=zu(e,t);if(n){if(n.get)return cd(n.get);if("function"==typeof n.value)return cd(n.value)}e=Gu(e)}return function(){return null}}const md=Qu(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yd=Qu(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bd=Qu(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),vd=Qu(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wd=Qu(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Cd=Qu(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xd=Qu(["#text"]),$d=Qu(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Sd=Qu(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ad=Qu(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ed=Qu(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Td=Wu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kd=Wu(/<%[\w\W]*|[\w\W]*%>/gm),_d=Wu(/\$\{[\w\W]*/gm),Od=Wu(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pd=Wu(/^aria-[\-\w]+$/),Id=Wu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nd=Wu(/^(?:\w+script|data):/i),Md=Wu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dd=Wu(/^html$/i),Ld=Wu(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ud=Object.freeze({__proto__:null,ARIA_ATTR:Pd,ATTR_WHITESPACE:Md,CUSTOM_ELEMENT:Ld,DATA_ATTR:Od,DOCTYPE_NAME:Dd,ERB_EXPR:kd,IS_ALLOWED_URI:Id,IS_SCRIPT_OR_DATA:Nd,MUSTACHE_EXPR:Td,TMPLIT_EXPR:_d});const Rd=1,Bd=3,jd=7,Fd=8,Hd=9,Gd=function(){return"undefined"==typeof window?null:window};var zd=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gd();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Hd||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:d,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=u.prototype,m=gd(g,"cloneNode"),y=gd(g,"remove"),b=gd(g,"nextSibling"),v=gd(g,"childNodes"),w=gd(g,"parentNode");if("function"==typeof s){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let C,x="";const{implementation:$,createNodeIterator:S,createDocumentFragment:A,getElementsByTagName:E}=i,{importNode:T}=r;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ju&&"function"==typeof w&&$&&void 0!==$.createHTMLDocument;const{MUSTACHE_EXPR:_,ERB_EXPR:O,TMPLIT_EXPR:P,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:L}=Ud;let{IS_ALLOWED_URI:U}=Ud,R=null;const B=hd({},[...md,...yd,...bd,...wd,...xd]);let j=null;const F=hd({},[...$d,...Sd,...Ad,...Ed]);let H=Object.seal(Vu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,z=null,Q=!0,W=!0,V=!1,q=!0,Y=!1,K=!0,X=!1,Z=!1,J=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,oe=!0,ae=!1,se={},le=null;const ue=hd({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ce=hd({},["audio","video","img","source","image","track"]);let he=null;const pe=hd({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let ye=me,be=!1,ve=null;const we=hd({},[fe,ge,me],nd);let Ce=hd({},["mi","mo","mn","ms","mtext"]),xe=hd({},["annotation-xml"]);const $e=hd({},["title","style","font","a","script"]);let Se=null;const Ae=["application/xhtml+xml","text/html"];let Ee=null,Te=null;const ke=i.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=fd(e),Se=-1===Ae.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Se?nd:td,R=sd(e,"ALLOWED_TAGS")?hd({},e.ALLOWED_TAGS,Ee):B,j=sd(e,"ALLOWED_ATTR")?hd({},e.ALLOWED_ATTR,Ee):F,ve=sd(e,"ALLOWED_NAMESPACES")?hd({},e.ALLOWED_NAMESPACES,nd):we,he=sd(e,"ADD_URI_SAFE_ATTR")?hd(fd(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=sd(e,"ADD_DATA_URI_TAGS")?hd(fd(ce),e.ADD_DATA_URI_TAGS,Ee):ce,le=sd(e,"FORBID_CONTENTS")?hd({},e.FORBID_CONTENTS,Ee):ue,G=sd(e,"FORBID_TAGS")?hd({},e.FORBID_TAGS,Ee):fd({}),z=sd(e,"FORBID_ATTR")?hd({},e.FORBID_ATTR,Ee):fd({}),se=!!sd(e,"USE_PROFILES")&&e.USE_PROFILES,Q=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||Id,ye=e.NAMESPACE||me,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,xe=e.HTML_INTEGRATION_POINTS||xe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),se&&(R=hd({},xd),j=[],!0===se.html&&(hd(R,md),hd(j,$d)),!0===se.svg&&(hd(R,yd),hd(j,Sd),hd(j,Ed)),!0===se.svgFilters&&(hd(R,bd),hd(j,Sd),hd(j,Ed)),!0===se.mathMl&&(hd(R,wd),hd(j,Ad),hd(j,Ed))),e.ADD_TAGS&&(R===B&&(R=fd(R)),hd(R,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(j===F&&(j=fd(j)),hd(j,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&hd(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ue&&(le=fd(le)),hd(le,e.FORBID_CONTENTS,Ee)),oe&&(R["#text"]=!0),X&&hd(R,["html","head","body"]),R.table&&(hd(R,["tbody"]),delete G.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ud('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ud('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,x=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(f,o)),null!==C&&"string"==typeof x&&(x=C.createHTML(""));Qu&&Qu(e),Te=e}},Pe=hd({},[...yd,...bd,...vd]),Ie=hd({},[...wd,...Cd]),Ne=function(e){Ju(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Me=function(e,t){try{Ju(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ju(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ne(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=id(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Se&&ye===me&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=C?C.createHTML(e):e;if(ye===me)try{t=(new p).parseFromString(r,Se)}catch(e){}if(!t||!t.documentElement){t=$.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?x:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),ye===me?E.call(t,X?"html":"body")[0]:X?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ue=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof c)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Re=function(e){return"function"==typeof l&&e instanceof l};function Be(e,t,i){Ku(e,e=>{e.call(n,t,i,Te)})}const je=function(e){let t=null;if(Be(k.beforeSanitizeElements,e,null),Ue(e))return Ne(e),!0;const i=Ee(e.nodeName);if(Be(k.uponSanitizeElement,e,{tagName:i,allowedTags:R}),K&&e.hasChildNodes()&&!Re(e.firstElementChild)&&ld(/<[/\w!]/g,e.innerHTML)&&ld(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===jd)return Ne(e),!0;if(K&&e.nodeType===Fd&&ld(/<[/\w]/g,e.data))return Ne(e),!0;if(!R[i]||G[i]){if(!G[i]&&He(i)){if(H.tagNameCheck instanceof RegExp&&ld(H.tagNameCheck,i))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(i))return!1}if(oe&&!le[i]){const t=w(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=m(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}}return Ne(e),!0}return e instanceof u&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=td(e.tagName),i=td(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===me?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||Ce[i]):Boolean(Pe[n]):e.namespaceURI===fe?t.namespaceURI===me?"math"===n:t.namespaceURI===ge?"math"===n&&xe[i]:Boolean(Ie[n]):e.namespaceURI===me?!(t.namespaceURI===ge&&!xe[i])&&!(t.namespaceURI===fe&&!Ce[i])&&!Ie[n]&&($e[n]||!Pe[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!ld(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Bd&&(t=e.textContent,Ku([_,O,P],e=>{t=rd(t,e," ")}),e.textContent!==t&&(Ju(n.removed,{element:e.cloneNode()}),e.textContent=t)),Be(k.afterSanitizeElements,e,null),!1):(Ne(e),!0)},Fe=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(W&&!z[t]&&ld(I,t));else if(Q&&ld(N,t));else if(!j[t]||z[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&ld(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&ld(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ld(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(he[t]);else if(ld(U,rd(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==od(n,"data:")||!de[e]){if(V&&!ld(M,rd(n,D,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&id(e,L)},Ge=function(e){Be(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ue(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let r=t.length;for(;r--;){const o=t[r],{name:a,namespaceURI:s,value:l}=o,u=Ee(a),d=l;let c="value"===a?d:ad(d);if(i.attrName=u,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,Be(k.uponSanitizeAttribute,e,i),c=i.attrValue,!re||"id"!==u&&"name"!==u||(Me(a,e),c="user-content-"+c),K&&ld(/((--!?|])>)|<\/(style|title)/i,c)){Me(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Me(a,e);continue}if(!q&&ld(/\/>/i,c)){Me(a,e);continue}Y&&Ku([_,O,P],e=>{c=rd(c,e," ")});const h=Ee(e.nodeName);if(Fe(h,u,c)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":c=C.createHTML(c);break;case"TrustedScriptURL":c=C.createScriptURL(c)}if(c!==d)try{s?e.setAttributeNS(s,a,c):e.setAttribute(a,c),Ue(e)?Ne(e):Zu(n.removed)}catch(t){Me(a,e)}}else Me(a,e)}Be(k.afterSanitizeAttributes,e,null)},ze=function e(t){let n=null;const i=Le(t);for(Be(k.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)Be(k.uponSanitizeShadowNode,n,null),je(n),Ge(n),n.content instanceof a&&e(n.content);Be(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,u=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw ud("toString is not a function");if("string"!=typeof(e=e.toString()))throw ud("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!R[t]||G[t])throw ud("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=De("\x3c!----\x3e"),o=i.ownerDocument.importNode(e,!0),o.nodeType===Rd&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return C&&ne?C.createHTML(e):e;if(i=De(e),!i)return ee?null:ne?x:""}i&&J&&Ne(i.firstChild);const d=Le(ae?e:i);for(;s=d.nextNode();)je(s),Ge(s),s.content instanceof a&&ze(s.content);if(ae)return e;if(ee){if(te)for(u=A.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(j.shadowroot||j.shadowrootmode)&&(u=T.call(r,u,!0)),u}let c=X?i.outerHTML:i.innerHTML;return X&&R["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ld(Dd,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Y&&Ku([_,O,P],e=>{c=rd(c,e," ")}),C&&ne?C.createHTML(c):c},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Te=null,Z=!1},n.isValidAttribute=function(e,t,n){Te||Oe({});const i=Ee(e),r=Ee(t);return Fe(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Ju(k[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Xu(k[e],t);return-1===n?void 0:ed(k[e],n,1)[0]}return Zu(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Qd=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 Wd=class extends oe{constructor(){super(...arguments),this.spinSpeed=.4}updated(){this.style.setProperty("--spin-duration",`${this.spinSpeed}s`)}render(){return R`<div class="spinner"></div>`}};Wd.styles=u`
|
|
6562
|
+
`,{entries:Fu,setPrototypeOf:Hu,isFrozen:Gu,getPrototypeOf:zu,getOwnPropertyDescriptor:Qu}=Object;let{freeze:Wu,seal:Vu,create:qu}=Object,{apply:Yu,construct:Ku}="undefined"!=typeof Reflect&&Reflect;Wu||(Wu=function(e){return e}),Vu||(Vu=function(e){return e}),Yu||(Yu=function(e,t,n){return e.apply(t,n)}),Ku||(Ku=function(e,t){return new e(...t)});const Xu=hd(Array.prototype.forEach),Zu=hd(Array.prototype.lastIndexOf),Ju=hd(Array.prototype.pop),ed=hd(Array.prototype.push),td=hd(Array.prototype.splice),nd=hd(String.prototype.toLowerCase),id=hd(String.prototype.toString),rd=hd(String.prototype.match),od=hd(String.prototype.replace),ad=hd(String.prototype.indexOf),sd=hd(String.prototype.trim),ld=hd(Object.prototype.hasOwnProperty),ud=hd(RegExp.prototype.test),dd=(cd=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ku(cd,t)});var cd;function hd(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Yu(e,t,i)}}function pd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nd;Hu&&Hu(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Gu(t)||(t[i]=e),r=e)}e[r]=!0}return e}function fd(e){for(let t=0;t<e.length;t++){ld(e,t)||(e[t]=null)}return e}function gd(e){const t=qu(null);for(const[n,i]of Fu(e)){ld(e,n)&&(Array.isArray(i)?t[n]=fd(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=gd(i):t[n]=i)}return t}function md(e,t){for(;null!==e;){const n=Qu(e,t);if(n){if(n.get)return hd(n.get);if("function"==typeof n.value)return hd(n.value)}e=zu(e)}return function(){return null}}const yd=Wu(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bd=Wu(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vd=Wu(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),wd=Wu(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cd=Wu(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),xd=Wu(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$d=Wu(["#text"]),Sd=Wu(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ad=Wu(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ed=Wu(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Td=Wu(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kd=Vu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_d=Vu(/<%[\w\W]*|[\w\W]*%>/gm),Od=Vu(/\$\{[\w\W]*/gm),Pd=Vu(/^data-[\-\w.\u00B7-\uFFFF]+$/),Id=Vu(/^aria-[\-\w]+$/),Nd=Vu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Md=Vu(/^(?:\w+script|data):/i),Dd=Vu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ld=Vu(/^html$/i),Ud=Vu(/^[a-z][.\w]*(-[.\w]+)+$/i);var Rd=Object.freeze({__proto__:null,ARIA_ATTR:Id,ATTR_WHITESPACE:Dd,CUSTOM_ELEMENT:Ud,DATA_ATTR:Pd,DOCTYPE_NAME:Ld,ERB_EXPR:_d,IS_ALLOWED_URI:Nd,IS_SCRIPT_OR_DATA:Md,MUSTACHE_EXPR:kd,TMPLIT_EXPR:Od});const Bd=1,jd=3,Fd=7,Hd=8,Gd=9,zd=function(){return"undefined"==typeof window?null:window};var Qd=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zd();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Gd||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:d,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=u.prototype,m=md(g,"cloneNode"),y=md(g,"remove"),b=md(g,"nextSibling"),v=md(g,"childNodes"),w=md(g,"parentNode");if("function"==typeof s){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let C,x="";const{implementation:$,createNodeIterator:S,createDocumentFragment:A,getElementsByTagName:E}=i,{importNode:T}=r;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Fu&&"function"==typeof w&&$&&void 0!==$.createHTMLDocument;const{MUSTACHE_EXPR:_,ERB_EXPR:O,TMPLIT_EXPR:P,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:L}=Rd;let{IS_ALLOWED_URI:U}=Rd,R=null;const B=pd({},[...yd,...bd,...vd,...Cd,...$d]);let j=null;const F=pd({},[...Sd,...Ad,...Ed,...Td]);let H=Object.seal(qu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,z=null,Q=!0,W=!0,V=!1,q=!0,Y=!1,K=!0,X=!1,Z=!1,J=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,oe=!0,ae=!1,se={},le=null;const ue=pd({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ce=pd({},["audio","video","img","source","image","track"]);let he=null;const pe=pd({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let ye=me,be=!1,ve=null;const we=pd({},[fe,ge,me],id);let Ce=pd({},["mi","mo","mn","ms","mtext"]),xe=pd({},["annotation-xml"]);const $e=pd({},["title","style","font","a","script"]);let Se=null;const Ae=["application/xhtml+xml","text/html"];let Ee=null,Te=null;const ke=i.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=gd(e),Se=-1===Ae.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Se?id:nd,R=ld(e,"ALLOWED_TAGS")?pd({},e.ALLOWED_TAGS,Ee):B,j=ld(e,"ALLOWED_ATTR")?pd({},e.ALLOWED_ATTR,Ee):F,ve=ld(e,"ALLOWED_NAMESPACES")?pd({},e.ALLOWED_NAMESPACES,id):we,he=ld(e,"ADD_URI_SAFE_ATTR")?pd(gd(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,de=ld(e,"ADD_DATA_URI_TAGS")?pd(gd(ce),e.ADD_DATA_URI_TAGS,Ee):ce,le=ld(e,"FORBID_CONTENTS")?pd({},e.FORBID_CONTENTS,Ee):ue,G=ld(e,"FORBID_TAGS")?pd({},e.FORBID_TAGS,Ee):gd({}),z=ld(e,"FORBID_ATTR")?pd({},e.FORBID_ATTR,Ee):gd({}),se=!!ld(e,"USE_PROFILES")&&e.USE_PROFILES,Q=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||Nd,ye=e.NAMESPACE||me,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,xe=e.HTML_INTEGRATION_POINTS||xe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),se&&(R=pd({},$d),j=[],!0===se.html&&(pd(R,yd),pd(j,Sd)),!0===se.svg&&(pd(R,bd),pd(j,Ad),pd(j,Td)),!0===se.svgFilters&&(pd(R,vd),pd(j,Ad),pd(j,Td)),!0===se.mathMl&&(pd(R,Cd),pd(j,Ed),pd(j,Td))),e.ADD_TAGS&&(R===B&&(R=gd(R)),pd(R,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(j===F&&(j=gd(j)),pd(j,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&pd(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ue&&(le=gd(le)),pd(le,e.FORBID_CONTENTS,Ee)),oe&&(R["#text"]=!0),X&&pd(R,["html","head","body"]),R.table&&(pd(R,["tbody"]),delete G.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw dd('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw dd('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,x=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(f,o)),null!==C&&"string"==typeof x&&(x=C.createHTML(""));Wu&&Wu(e),Te=e}},Pe=pd({},[...bd,...vd,...wd]),Ie=pd({},[...Cd,...xd]),Ne=function(e){ed(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},Me=function(e,t){try{ed(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){ed(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ne(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=rd(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Se&&ye===me&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=C?C.createHTML(e):e;if(ye===me)try{t=(new p).parseFromString(r,Se)}catch(e){}if(!t||!t.documentElement){t=$.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?x:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),ye===me?E.call(t,X?"html":"body")[0]:X?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ue=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof c)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Re=function(e){return"function"==typeof l&&e instanceof l};function Be(e,t,i){Xu(e,e=>{e.call(n,t,i,Te)})}const je=function(e){let t=null;if(Be(k.beforeSanitizeElements,e,null),Ue(e))return Ne(e),!0;const i=Ee(e.nodeName);if(Be(k.uponSanitizeElement,e,{tagName:i,allowedTags:R}),K&&e.hasChildNodes()&&!Re(e.firstElementChild)&&ud(/<[/\w!]/g,e.innerHTML)&&ud(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===Fd)return Ne(e),!0;if(K&&e.nodeType===Hd&&ud(/<[/\w]/g,e.data))return Ne(e),!0;if(!R[i]||G[i]){if(!G[i]&&He(i)){if(H.tagNameCheck instanceof RegExp&&ud(H.tagNameCheck,i))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(i))return!1}if(oe&&!le[i]){const t=w(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=m(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}}return Ne(e),!0}return e instanceof u&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=nd(e.tagName),i=nd(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===me?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||Ce[i]):Boolean(Pe[n]):e.namespaceURI===fe?t.namespaceURI===me?"math"===n:t.namespaceURI===ge?"math"===n&&xe[i]:Boolean(Ie[n]):e.namespaceURI===me?!(t.namespaceURI===ge&&!xe[i])&&!(t.namespaceURI===fe&&!Ce[i])&&!Ie[n]&&($e[n]||!Pe[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!ud(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===jd&&(t=e.textContent,Xu([_,O,P],e=>{t=od(t,e," ")}),e.textContent!==t&&(ed(n.removed,{element:e.cloneNode()}),e.textContent=t)),Be(k.afterSanitizeElements,e,null),!1):(Ne(e),!0)},Fe=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in ke))return!1;if(W&&!z[t]&&ud(I,t));else if(Q&&ud(N,t));else if(!j[t]||z[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&ud(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&ud(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ud(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(he[t]);else if(ud(U,od(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ad(n,"data:")||!de[e]){if(V&&!ud(M,od(n,D,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&rd(e,L)},Ge=function(e){Be(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ue(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let r=t.length;for(;r--;){const o=t[r],{name:a,namespaceURI:s,value:l}=o,u=Ee(a),d=l;let c="value"===a?d:sd(d);if(i.attrName=u,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,Be(k.uponSanitizeAttribute,e,i),c=i.attrValue,!re||"id"!==u&&"name"!==u||(Me(a,e),c="user-content-"+c),K&&ud(/((--!?|])>)|<\/(style|title)/i,c)){Me(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Me(a,e);continue}if(!q&&ud(/\/>/i,c)){Me(a,e);continue}Y&&Xu([_,O,P],e=>{c=od(c,e," ")});const h=Ee(e.nodeName);if(Fe(h,u,c)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":c=C.createHTML(c);break;case"TrustedScriptURL":c=C.createScriptURL(c)}if(c!==d)try{s?e.setAttributeNS(s,a,c):e.setAttribute(a,c),Ue(e)?Ne(e):Ju(n.removed)}catch(t){Me(a,e)}}else Me(a,e)}Be(k.afterSanitizeAttributes,e,null)},ze=function e(t){let n=null;const i=Le(t);for(Be(k.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)Be(k.uponSanitizeShadowNode,n,null),je(n),Ge(n),n.content instanceof a&&e(n.content);Be(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,u=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw dd("toString is not a function");if("string"!=typeof(e=e.toString()))throw dd("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ee(e.nodeName);if(!R[t]||G[t])throw dd("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=De("\x3c!----\x3e"),o=i.ownerDocument.importNode(e,!0),o.nodeType===Bd&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return C&&ne?C.createHTML(e):e;if(i=De(e),!i)return ee?null:ne?x:""}i&&J&&Ne(i.firstChild);const d=Le(ae?e:i);for(;s=d.nextNode();)je(s),Ge(s),s.content instanceof a&&ze(s.content);if(ae)return e;if(ee){if(te)for(u=A.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(j.shadowroot||j.shadowrootmode)&&(u=T.call(r,u,!0)),u}let c=X?i.outerHTML:i.innerHTML;return X&&R["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ud(Ld,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Y&&Xu([_,O,P],e=>{c=od(c,e," ")}),C&&ne?C.createHTML(c):c},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Te=null,Z=!1},n.isValidAttribute=function(e,t,n){Te||Oe({});const i=Ee(e),r=Ee(t);return Fe(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&ed(k[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Zu(k[e],t);return-1===n?void 0:td(k[e],n,1)[0]}return Ju(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Wd=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 Vd=class extends oe{constructor(){super(...arguments),this.spinSpeed=.4}updated(){this.style.setProperty("--spin-duration",`${this.spinSpeed}s`)}render(){return R`<div class="spinner"></div>`}};Vd.styles=u`
|
|
6554
6563
|
.spinner {
|
|
6555
6564
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
6556
6565
|
border-top: 2px solid #c057ff;
|
|
@@ -6568,7 +6577,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6568
6577
|
transform: rotate(360deg);
|
|
6569
6578
|
}
|
|
6570
6579
|
}
|
|
6571
|
-
`,
|
|
6580
|
+
`,Wd([ue({type:Number})],Vd.prototype,"spinSpeed",void 0),Vd=Wd([se("mini-loader")],Vd);var qd=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 Yd=class extends oe{constructor(){super(...arguments),this.onMount=()=>({}),this.loadingPreviews=!0,this.websitePreviewInfo=[],this.imagesToDisplay=[],this.imageUrlError=[],this.isLeadMessage=!1,this.widgetType=Mc.Default}isMessageStillStreamingChunks(){if(!this.message)return!1;const e=this.message.chunks.find(e=>e.isDone);return!e||this.message.chunks.length===e.order}updated(e){if(this.onMount(),!e.has("message"))return;if(!this.message)return;const{hyperlinks:t,markedText:n}=this.mapAndMarkHyperLinks(this.message.message),i=/(https?:\/\/[^\s]+)/g,r=[],o=[];this.parsedMessage=R`${n.trim().split("\n").map(e=>{const n=this.sanitizeMarkdownText(e),a=this.preserveHTMLTags(n);return a?R`${a.map(e=>{if(t.find(t=>t.id===e)){const n=t.find(t=>t.id===e);if(!n)return;return o.push({redirectTo:null==n?void 0:n.link,source:null==n?void 0:n.link}),R`<a
|
|
6572
6581
|
class="redirect-link"
|
|
6573
6582
|
href="${null==n?void 0:n.link}"
|
|
6574
6583
|
target="_blank"
|
|
@@ -6580,10 +6589,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6580
6589
|
target="_blank"
|
|
6581
6590
|
rel="noopener noreferrer"
|
|
6582
6591
|
>${t}
|
|
6583
|
-
</a>`}return R`${Ao(
|
|
6592
|
+
</a>`}return R`${Ao(Qd.sanitize(e))} `})}<br />`:R``})}`,this.imagesToDisplay=o,Promise.all(r).then(e=>{this.websitePreviewInfo=e})}preserveHTMLTags(e){var t;const n=e.match(/(<\/?[a-z][^>]*>[^<]*<\/?[a-z]*>|[^\s]+[.,?!]?|\S)/gi);return null!==(t=null==n?void 0:n.filter(e=>""!==e.trim()))&&void 0!==t?t:[]}sanitizeMarkdownText(e){return e.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/gim,"<b>$1</b>").replace(/\*(.*?)\*/gim,"<i>$1</i>").trim()}removeTrailingPunctuation(e){return[".",",","!","?",":",";"].includes(e[e.length-1])?this.removeTrailingPunctuation(e.slice(0,-1)):e}mapAndMarkHyperLinks(e){const t=Array.from(e.matchAll(/<https?:\/\/[^|]+\|[^>]+>|<a href="[^"]+"(?: target="[^"]*")?>[^<]+<\/a>|\[.*?\]\([^)]*\.[^)]*\)/g)),n=[],i=t.map(t=>{const n=t[0];if(void 0===t.index)return;const i=e[t.index-1],r=e[t.index+n.length];if(n.startsWith("<https")||n.startsWith("<http"))return{matchedLink:n,link:n.split("|")[0].replace("<",""),hyperlink:n.split("|")[1].replace(">",""),addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)};if(n.startsWith("<a href=")){const e=n.match(/href="([^"]+)"/),t=n.match(/>[^<]+</);return{matchedLink:n,link:e?e[1]:"",hyperlink:t?t[0].slice(1,-1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)}}{const[e,t]=n.split("](");return{matchedLink:n,link:t?t.slice(0,-1):"",hyperlink:e?e.slice(1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)}}});return i.forEach(t=>{if(t&&t.link&&t.hyperlink){const i=xu().replace(/-/g,"");n.push({link:this.removeTrailingPunctuation(t.link),hyperlink:this.removeTrailingPunctuation(t.hyperlink),mark:t.matchedLink,id:i}),e=e.replace(t.matchedLink,`${t.addSpaceBefore?" ":""}${i}${t.addSpaceAfter?" ":""}`)}}),{hyperlinks:n,markedText:e}}async getLinkData(e){var t,n,i,o;try{const a=(await r().get(e)).data,s=(new DOMParser).parseFromString(a,"text/html");return s?{title:null!==(n=null===(t=s.querySelector("title"))||void 0===t?void 0:t.textContent)&&void 0!==n?n:null,description:(null===(i=s.querySelector('meta[name="description"]'))||void 0===i?void 0:i.getAttribute("content"))||null,image:(null===(o=s.querySelector('meta[property="og:image"]'))||void 0===o?void 0:o.getAttribute("content"))||null,favicon:null,link:e}:{title:null,description:null,image:null,favicon:null,link:e}}catch(t){return{title:null,description:null,image:null,favicon:null,link:e}}}render(){return this.message?R`<div class="message-inner-body">
|
|
6584
6593
|
${this.isMessageStillStreamingChunks()?R`<div class="message-loader"><mini-loader></mini-loader></div>`:""}
|
|
6585
6594
|
<p
|
|
6586
|
-
class=${ye({"message-text":this.widgetType!==
|
|
6595
|
+
class=${ye({"message-text":this.widgetType!==Mc.Utilities,"message-text-large":this.widgetType===Mc.Utilities,"webchat-font__desktop":!Or(),"webchat-font__mobile":Or()})}
|
|
6587
6596
|
>
|
|
6588
6597
|
${this.parsedMessage}
|
|
6589
6598
|
</p>
|
|
@@ -6614,16 +6623,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6614
6623
|
/>`:""}
|
|
6615
6624
|
|
|
6616
6625
|
<div class="website-preview-body">
|
|
6617
|
-
<p class=${ye({"message-text":this.widgetType!==
|
|
6626
|
+
<p class=${ye({"message-text":this.widgetType!==Mc.Utilities,"message-text-large":this.widgetType===Mc.Utilities,"website-preview-title":!0,"webchat-font__desktop":!Or(),"webchat-font__mobile":Or()})}>${e.title}</p>
|
|
6618
6627
|
${e.description?R`<p
|
|
6619
|
-
class=${ye({"message-text":this.widgetType!==
|
|
6628
|
+
class=${ye({"message-text":this.widgetType!==Mc.Utilities,"message-text-large":this.widgetType===Mc.Utilities,"website-preview-description":!0,"webchat-font__desktop":!Or(),"webchat-font__mobile":Or()})}
|
|
6620
6629
|
>
|
|
6621
6630
|
${e.description}
|
|
6622
6631
|
</p>`:""}
|
|
6623
6632
|
</div>
|
|
6624
6633
|
</div>
|
|
6625
6634
|
</a></div> `})}
|
|
6626
|
-
</div>`:R``}};
|
|
6635
|
+
</div>`:R``}};Yd.styles=[Oe,ju,u`
|
|
6627
6636
|
.message-inner-body {
|
|
6628
6637
|
position: relative;
|
|
6629
6638
|
}
|
|
@@ -6632,7 +6641,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6632
6641
|
bottom: -2px;
|
|
6633
6642
|
right: -2px;
|
|
6634
6643
|
}
|
|
6635
|
-
`],
|
|
6644
|
+
`],qd([ue({attribute:!0})],Yd.prototype,"buildingSlug",void 0),qd([ue({attribute:!0})],Yd.prototype,"message",void 0),qd([ue({attribute:!0})],Yd.prototype,"myPubnub",void 0),qd([ue({attribute:!0})],Yd.prototype,"onMount",void 0),qd([de()],Yd.prototype,"loadingPreviews",void 0),qd([de()],Yd.prototype,"parsedMessage",void 0),qd([de()],Yd.prototype,"websitePreviewInfo",void 0),qd([de()],Yd.prototype,"imagesToDisplay",void 0),qd([de()],Yd.prototype,"imageUrlError",void 0),qd([ue({type:Boolean})],Yd.prototype,"isLeadMessage",void 0),qd([ue({attribute:!0})],Yd.prototype,"widgetType",void 0),Yd=qd([se("pubnub-message")],Yd);var Kd=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 Xd=class extends oe{constructor(){super(...arguments),this.onMount=()=>({}),this.showMediaAsCarousel=!0,this.activeIndex=0}updated(e){this.onMount(),e.has("message")}prevImage(){this.message&&(0===this.activeIndex?this.activeIndex=this.message.media.length-1:this.activeIndex-=1)}nextImage(){this.message&&(this.activeIndex===this.message.media.length-1?this.activeIndex=0:this.activeIndex+=1)}render(){return this.message?this.showMediaAsCarousel?R`<div class="message-inner-body">
|
|
6636
6645
|
<div class="carousel">
|
|
6637
6646
|
<div
|
|
6638
6647
|
class="image-container"
|
|
@@ -6673,7 +6682,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6673
6682
|
rel="noopener noreferrer"
|
|
6674
6683
|
><img class=${"displayed-message-image"} src=${e.url} alt=""
|
|
6675
6684
|
/></a>`)}
|
|
6676
|
-
</div>`:R``}};
|
|
6685
|
+
</div>`:R``}};Xd.styles=[Oe,ju,u`
|
|
6677
6686
|
.carousel {
|
|
6678
6687
|
position: relative;
|
|
6679
6688
|
max-width: 400px;
|
|
@@ -6765,7 +6774,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6765
6774
|
max-height: 200px;
|
|
6766
6775
|
overflow-y: auto;
|
|
6767
6776
|
}
|
|
6768
|
-
`],
|
|
6777
|
+
`],Kd([ue({attribute:!0})],Xd.prototype,"message",void 0),Kd([ue({attribute:!0})],Xd.prototype,"myPubnub",void 0),Kd([ue({attribute:!0})],Xd.prototype,"onMount",void 0),Kd([de()],Xd.prototype,"showMediaAsCarousel",void 0),Kd([de()],Xd.prototype,"activeIndex",void 0),Xd=Kd([se("pubnub-media")],Xd);function Zd(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Jd(e,t){ii(2,arguments);var n=ri(e),i=ri(t),r=Zd(n,i),o=Math.abs(function(e,t){ii(2,arguments);var n=rr(e),i=rr(t),r=n.getTime()-zi(n),o=i.getTime()-zi(i);return Math.round((r-o)/864e5)}(n,i));n.setDate(n.getDate()-r*o);var a=r*(o-Number(Zd(n,i)===-r));return 0===a?0:a}const ec=u`
|
|
6769
6778
|
#utilities-container {
|
|
6770
6779
|
position: fixed;
|
|
6771
6780
|
|
|
@@ -6874,17 +6883,17 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6874
6883
|
.health-bttn-allow-access {
|
|
6875
6884
|
padding-right: 28px;
|
|
6876
6885
|
}
|
|
6877
|
-
`,
|
|
6886
|
+
`,tc=(e="black")=>B`
|
|
6878
6887
|
<svg aria-hidden="true" focusable="false" width="32" height="32" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6879
6888
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 0C17.7614 0 20 2.23858 20 5V15C20 17.7614 17.7614 20 15 20H5C2.23858 20 0 17.7614 0 15V5C0 2.23858 2.23858 0 5 0H15ZM18 5C18 3.34315 16.6569 2 15 2H5C3.34315 2 2 3.34315 2 5V15C2 16.6569 3.34315 18 5 18H15C16.6569 18 18 16.6569 18 15V5Z" fill="${e}"/>
|
|
6880
6889
|
<path d="M12.1893 9.25L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L13.8232 8.76256C14.5066 9.44598 14.5066 10.554 13.8232 11.2374L11.5303 13.5303C11.2374 13.8232 10.7626 13.8232 10.4697 13.5303C10.1768 13.2374 10.1768 12.7626 10.4697 12.4697L12.1893 10.75L6 10.75C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25L12.1893 9.25Z" fill="${e}"/>
|
|
6881
6890
|
</svg>
|
|
6882
|
-
`,
|
|
6891
|
+
`,nc=(e="black")=>B`
|
|
6883
6892
|
<svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6884
6893
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 0C17.7614 0 20 2.23858 20 5V15C20 17.7614 17.7614 20 15 20H5C2.23858 20 0 17.7614 0 15V5C0 2.23858 2.23858 0 5 0H15ZM18 5C18 3.34315 16.6569 2 15 2H5C3.34315 2 2 3.34315 2 5V15C2 16.6569 3.34315 18 5 18H15C16.6569 18 18 16.6569 18 15V5Z" fill="${e}"/>
|
|
6885
6894
|
<path d="M12.1893 9.25L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L13.8232 8.76256C14.5066 9.44598 14.5066 10.554 13.8232 11.2374L11.5303 13.5303C11.2374 13.8232 10.7626 13.8232 10.4697 13.5303C10.1768 13.2374 10.1768 12.7626 10.4697 12.4697L12.1893 10.75L6 10.75C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25L12.1893 9.25Z" fill="${e}"/>
|
|
6886
6895
|
</svg>
|
|
6887
|
-
`;var
|
|
6896
|
+
`;var ic,rc=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 oc=ic=class extends oe{constructor(){super(...arguments),this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.onMount=()=>({}),this.isHealthChat=!1,this.widgetType=Mc.Default,this.primaryColor=qn,this.backgroundColor=Yn,this.onClickExit=()=>{localStorage.setItem("isChatOpen","false")},this.requiresConsent=!1,this._isMobile=Or(),this.shouldAutoScroll=!0,this.messages=[],this.isLoadingMessages=!1,this.hasReceivedConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.websitePreviewMapping={},this.sendMessage=async e=>{var t;0!==e.length&&(this.shouldAutoScroll=!0,this.messageInput.value="",this.autoResizeMessageInput(),0===this.messages.length&&(this.messages=[{timestamp:0,message:e,isLeadMessage:!0,chunks:[{text:e,order:0,isDone:!0}],type:Ou.text}]),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e)))},this.scrollToChatBottom=()=>{this.shouldAutoScroll&&this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"auto"})},this.handleConversationScroll=e=>{const t=e.currentTarget,n=t.scrollHeight-t.clientHeight-t.scrollTop;this.shouldAutoScroll=n<=ic.AUTO_SCROLL_THRESHOLD_PX},this.autoResizeMessageInput=()=>{this.messageInput.style.height="auto",this.messageInput.style.height=this.messageInput.scrollHeight+"px"},this.needsConsent=()=>this.requiresConsent&&!this.hasReceivedConsent}get consentKey(){return`${this.orgSlug}Consent`}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Pr(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}firstUpdated(){var e,t;this.messages=(null===(e=this.myPubnub)||void 0===e?void 0:e.simpleChatMessages)||[],null===(t=this.myPubnub)||void 0===t||t.addChatListener(e=>{this.messages=e.messages,this.isLoadingMessages=e.isLoading}),this.onMount();const n=localStorage.getItem(this.consentKey);if(!n)return void(this.hasReceivedConsent=!1);const i=JSON.parse(n),{timestamp:r,consentId:o}=i;Jd(new Date,new Date(r))<7&&o===No?this.hasReceivedConsent=!0:(this.hasReceivedConsent=!1,localStorage.removeItem(this.consentKey))}async updated(){this.scrollToChatBottom();try{const e=document.getElementById("#healthchat-container");if(!e)return;e.focus()}catch(e){}}render(){var e,t,n,i,r,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x;if(!this.buildingSlug)return R``;const $=null===(e=this.building)||void 0===e?void 0:e.id;let S={};if(S=this._isMobile?{top:void 0,bottom:0,left:void 0,right:0}:{top:void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:void 0===this.bottom||isNaN(this.bottom)?"130px":`${this.bottom}px`,left:void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:void 0===this.right||isNaN(this.right)?"18px":`${this.right}px`},22320===$&&(S={...S,fontFamily:'"Helvetica Neue", Arial'}),this.widgetType===Mc.Utilities)return R`
|
|
6888
6897
|
<div
|
|
6889
6898
|
id="utilities-container"
|
|
6890
6899
|
class=${ye({"pubnub-container__mobile":this._isMobile,"utilities-container__desktop":!this._isMobile})}
|
|
@@ -6899,7 +6908,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6899
6908
|
@click=${this.onClickExit}
|
|
6900
6909
|
aria-label="Close chat"
|
|
6901
6910
|
>
|
|
6902
|
-
${
|
|
6911
|
+
${Ss("black")}
|
|
6903
6912
|
</button>
|
|
6904
6913
|
</div>
|
|
6905
6914
|
<div
|
|
@@ -6939,15 +6948,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6939
6948
|
key=${e.timestamp}
|
|
6940
6949
|
tabindex="0"
|
|
6941
6950
|
role="article"
|
|
6942
|
-
aria-label="${e.isLeadMessage?"You":"Elise"}: ${
|
|
6951
|
+
aria-label="${e.isLeadMessage?"You":"Elise"}: ${ku(e)?e.message:"Media message"}"
|
|
6943
6952
|
>
|
|
6944
|
-
${
|
|
6953
|
+
${_u(e)?R` <pubnub-media
|
|
6945
6954
|
.message=${e}
|
|
6946
6955
|
.myPubnub=${this.myPubnub}
|
|
6947
6956
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
6948
6957
|
>
|
|
6949
6958
|
</pubnub-media>`:""}
|
|
6950
|
-
${
|
|
6959
|
+
${ku(e)?R` <pubnub-message
|
|
6951
6960
|
.message=${e}
|
|
6952
6961
|
.myPubnub=${this.myPubnub}
|
|
6953
6962
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
@@ -6990,12 +6999,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6990
6999
|
class=${ye({"health-bttn-allow-access":this._isMobile})}
|
|
6991
7000
|
@click=${()=>this.sendMessage(this.messageInput.value)}
|
|
6992
7001
|
>
|
|
6993
|
-
${
|
|
7002
|
+
${tc("black")}
|
|
6994
7003
|
</button>
|
|
6995
7004
|
</div>
|
|
6996
7005
|
</div>
|
|
6997
7006
|
</div>
|
|
6998
|
-
`;if(this.widgetType===
|
|
7007
|
+
`;if(this.widgetType===Mc.Healthcare)return R`
|
|
6999
7008
|
<div
|
|
7000
7009
|
id="healthchat-container"
|
|
7001
7010
|
class=${ye({"pubnub-container__mobile":this._isMobile,"healthchat-container__desktop":!this._isMobile})}
|
|
@@ -7014,7 +7023,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7014
7023
|
@click=${this.onClickExit}
|
|
7015
7024
|
aria-label="Close chat"
|
|
7016
7025
|
>
|
|
7017
|
-
${
|
|
7026
|
+
${Ss("black")}
|
|
7018
7027
|
</button>
|
|
7019
7028
|
</div>
|
|
7020
7029
|
<div
|
|
@@ -7055,15 +7064,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7055
7064
|
key=${e.timestamp}
|
|
7056
7065
|
tabindex="0"
|
|
7057
7066
|
role="article"
|
|
7058
|
-
aria-label="${e.isLeadMessage?"You":"Elise"}: ${
|
|
7067
|
+
aria-label="${e.isLeadMessage?"You":"Elise"}: ${ku(e)?e.message:"Media message"}"
|
|
7059
7068
|
>
|
|
7060
|
-
${
|
|
7069
|
+
${_u(e)?R` <pubnub-media
|
|
7061
7070
|
.message=${e}
|
|
7062
7071
|
.myPubnub=${this.myPubnub}
|
|
7063
7072
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
7064
7073
|
>
|
|
7065
7074
|
</pubnub-media>`:""}
|
|
7066
|
-
${
|
|
7075
|
+
${ku(e)?R` <pubnub-message
|
|
7067
7076
|
.message=${e}
|
|
7068
7077
|
.myPubnub=${this.myPubnub}
|
|
7069
7078
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
@@ -7106,7 +7115,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7106
7115
|
class=${ye({"health-bttn-allow-access":this._isMobile})}
|
|
7107
7116
|
@click=${()=>this.sendMessage(this.messageInput.value)}
|
|
7108
7117
|
>
|
|
7109
|
-
${this._isMobile?
|
|
7118
|
+
${this._isMobile?tc("black"):nc("black")}
|
|
7110
7119
|
</button>
|
|
7111
7120
|
</div>
|
|
7112
7121
|
</div>
|
|
@@ -7129,7 +7138,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7129
7138
|
@click=${this.onClickExit}
|
|
7130
7139
|
aria-label="Close chat"
|
|
7131
7140
|
>
|
|
7132
|
-
${
|
|
7141
|
+
${Ss("black")}
|
|
7133
7142
|
</button>
|
|
7134
7143
|
</div>
|
|
7135
7144
|
<div
|
|
@@ -7168,15 +7177,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7168
7177
|
key=${e.timestamp}
|
|
7169
7178
|
tabindex="0"
|
|
7170
7179
|
role="article"
|
|
7171
|
-
aria-label="${e.isLeadMessage?"You":"Elise"}: ${
|
|
7180
|
+
aria-label="${e.isLeadMessage?"You":"Elise"}: ${ku(e)?e.message:"Media message"}"
|
|
7172
7181
|
>
|
|
7173
|
-
${
|
|
7182
|
+
${_u(e)?R` <pubnub-media
|
|
7174
7183
|
.message=${e}
|
|
7175
7184
|
.myPubnub=${this.myPubnub}
|
|
7176
7185
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
7177
7186
|
>
|
|
7178
7187
|
</pubnub-media>`:""}
|
|
7179
|
-
${
|
|
7188
|
+
${ku(e)?R` <pubnub-message
|
|
7180
7189
|
.message=${e}
|
|
7181
7190
|
.myPubnub=${this.myPubnub}
|
|
7182
7191
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
@@ -7219,11 +7228,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7219
7228
|
aria-label="Send message"
|
|
7220
7229
|
aria-describedby="Send message"
|
|
7221
7230
|
>
|
|
7222
|
-
${Jn(this.building.orgId,this.building.id)&&this.primaryColor!==qn?
|
|
7231
|
+
${Jn(this.building.orgId,this.building.id)&&this.primaryColor!==qn?nc("black"):nc("white")}
|
|
7223
7232
|
</button>
|
|
7224
7233
|
</div>
|
|
7225
7234
|
</div>
|
|
7226
|
-
`}};rc.AUTO_SCROLL_THRESHOLD_PX=32,rc.styles=[Oe,Bu,Ru,Uu,Jd],ic([ue({type:Number})],rc.prototype,"right",void 0),ic([ue({type:Number})],rc.prototype,"bottom",void 0),ic([ue({type:Number})],rc.prototype,"top",void 0),ic([ue({type:Number})],rc.prototype,"left",void 0),ic([ue({attribute:!0})],rc.prototype,"onMount",void 0),ic([ue({attribute:!0})],rc.prototype,"channel",void 0),ic([ue({attribute:!0})],rc.prototype,"isHealthChat",void 0),ic([ue({attribute:!0})],rc.prototype,"myPubnub",void 0),ic([ue({attribute:!0})],rc.prototype,"orgSlug",void 0),ic([ue({attribute:!0})],rc.prototype,"buildingSlug",void 0),ic([ue({attribute:!0})],rc.prototype,"widgetType",void 0),ic([ue({attribute:!0})],rc.prototype,"building",void 0),ic([ue({attribute:!0})],rc.prototype,"primaryColor",void 0),ic([ue({attribute:!0})],rc.prototype,"backgroundColor",void 0),ic([ue({attribute:!0})],rc.prototype,"onClickExit",void 0),ic([ue({attribute:!0})],rc.prototype,"requiresConsent",void 0),ic([ce("#message-input",!0)],rc.prototype,"messageInput",void 0),ic([ce("#conversation-body",!0)],rc.prototype,"messageBody",void 0),ic([de()],rc.prototype,"_isMobile",void 0),ic([de()],rc.prototype,"messages",void 0),ic([de()],rc.prototype,"isLoadingMessages",void 0),ic([de()],rc.prototype,"hasReceivedConsent",void 0),ic([de()],rc.prototype,"privacyPolicyUrl",void 0),ic([de()],rc.prototype,"websitePreviewMapping",void 0),rc=nc=ic([se("pubnub-chat")],rc);const oc="cdn.skypack.dev/@meetelise/chat",ac="cdn.eliseai.com/@meetelise/chat",sc=async(e,t)=>{try{if(Math.random()>=.15)return;const n=(()=>{try{const e=document.getElementsByTagName("script");for(const t of e){const e=t.src||"",n=t.textContent||"";if(e.includes(oc)||n.includes(oc))return"skypack";if(e.includes(ac)||n.includes(ac))return"eliseai"}return"unknown"}catch(e){return"unknown"}})();await r().post("https://app.meetelise.com/platformApi/webchat/cdn-version",{cdn_version:n},{params:{cdn_version:n},headers:{"Content-Type":"application/json","building-slug":t,"org-slug":e}})}catch(e){}},lc=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?t.endsWith("/units")?t:`${t}/units`:t,uc={"95ae958e-95db-11ed-9862-6f4db5533d3f":"8008db60-45b7-11f1-88ac-635f686365da","95ae96b0-95db-11ed-9863-a7aa664fd985":"72ed27c4-45b7-11f1-82d9-37b7db547687"},dc="https://applications.eliseai.com",cc=["Check Availability","Apply Now"],hc=(e,t,n,i)=>{if(!(e=>{var t;if(!e.classList.contains("floorplan-button"))return!1;const n=e.getElementsByTagName("span");if(1!==n.length)return!1;const i=null===(t=n[0].textContent)||void 0===t?void 0:t.trim();return null!=i&&cc.includes(i)})(e))return!1;if(e.getAttribute("href")===t)return!1;const r=e.getAttribute("href");return e.setAttribute("href",t),e.setAttribute("target","_blank"),Ho({logTitle:"CHECK_AVAIL_OVERWRITE",logData:{oldHref:r,newHref:t,website:window.location.href},logType:Fo.info,buildingSlug:i,orgSlug:n}),!0},pc=(e,t,n,i)=>{for(let r=0;r<e.length;r++){const o=e[r];if(o.nodeType!==Node.ELEMENT_NODE)continue;const a=o;"A"===a.tagName&&hc(a,t,n,i);const s=a.getElementsByTagName("a");for(let e=0;e<s.length;e++)hc(s[e],t,n,i)}},fc=(e,t,n)=>{((e,t,n)=>{const i=document.body.getElementsByTagName("a");for(let r=0;r<i.length;r++)hc(i[r],e,t,n)})(n,e,t);new MutationObserver(i=>{for(const r of i)pc(r.addedNodes,n,e,t)}).observe(document.body,{childList:!0,subtree:!0})};class gc{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>Br(jr(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=bo();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(jo()).filter(e=>e)}},this.addSafeLeadSourceTouchpoint=e=>{const t=this.getLocalStorageMultitouchValue(),n=this._generateLeadSourceLocalStorageKey();if(!t||this.isExpiredTimestamp(t.timestampExpires)){const t={timestampExpires:this._generateNewExpirationTimestamp(),leadSources:[{parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"touchpoint"}]};localStorage.setItem(n,JSON.stringify(t))}else{if(t.leadSources.find(t=>t.leadSourceValue===e))return;if(t.leadSources.length<this.maxSourcesNonPropertyWebsiteCount)return t.leadSources.push({parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));Ho({logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,logTitle:"TOO_MANY_LEAD_SOURCES",logData:{buildingSlug:this.buildingSlug}})}},this.getSafeLeadSourceTouchpointsWithDefault=({includedUserSelectedLeadSource:e})=>{const t=this.getLocalStorageMultitouchValue(),n=Wo(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:Br(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Vr(e.timestampInitiallyLogged).getTime()-Vr(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:Br(new Date),r=[{timestampInitiallyLogged:i,leadSourceValue:n,type:"default"},...t.leadSources.map(e=>({timestampInitiallyLogged:e.timestampInitiallyLogged,leadSourceValue:e.leadSourceValue,type:e.type}))];return e&&r.push({leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"user-selected"}),r},this.getLocalStorageMultitouchValue=()=>{const e=this._generateLeadSourceLocalStorageKey(),t=localStorage.getItem(e);if(!t)return null;return JSON.parse(t)},this.isExpiredTimestamp=e=>Vr(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var mc,yc=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 bc=mc=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.centralConvo=!1,this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this._isMobile=Or(),this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=go.always,this.bedroomPreferenceRequired=!1,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.LeadSourceMultitouchClient=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=Nc.Default,this.onWidgetLoaded=jl(),this.onSstClose=jl(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=Ee(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.orgSlug)return;if(!this.centralConvo&&!this.buildingSlug)return;const e=this.centralConvo?await async function(e){const t=`https://app.meetelise.com/api/pub/v1/organization/${e}/webchat/v2`,n=await r().get(t);return ea(n.data)}(this.orgSlug):await Jo(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,t)=>{const n=window.rentgrata;if(!n)return;const i=n.Widget;if(!i)return;const o=i.config;if(!o)return;const a=o.widgetKey;a&&await r().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=t?t:""}})})(this.buildingSlug,this.orgSlug)}catch(e){}try{sc(this.orgSlug,this.buildingSlug)}catch(e){}await Qa(e,this.buildingSlug,this.orgSlug)&&(Go({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==e?void 0:e.launchedDateTime)?.01:.05}),this.buildingWebchatView=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,t,n,i,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x,$,S,A,E,T,k,_,O,P,I,N,M,D,L,U,R,B,j,F,H,G,z,Q,W,V,q,Y;const K=this.buildingWebchatView;if(!K)return;K&&this.orgSlug&&wc(this.orgSlug,null!==(t=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==t?t:null,this.sampleRateToUse,this.buildingSlug,null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null);const X=K.featureFlagWebchatMarketingSourceDropdownConfiguration,Z=K.featureFlagWebchatUseDniPhoneNumberBySource,J=K.featureFlagInsertDniIntoWebsite,ee=K.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite;var te;te=wo.includes(K.orgId),xo=te;const[ne,ie,re,oe]=await Promise.all([lu(this.orgSlug,this.buildingSlug),mo(this.buildingSlug),du(this.buildingSlug),yo(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Gn(K.phoneNumber),this.buildingWebchatView.isAip=re),this.leadSources=ne,this.featureFlagShowDropdown=X,this.bedroomPreferenceRequired=oe;const ae=K.textWithUsPhoneNumber?K.textWithUsPhoneNumber:await(async e=>{try{const t="https://app.meetelise.com",n=await r().get(`${t}/platformApi/webchat/${e}/phone-number`);if(n.data)return n.data}catch(t){return Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t},error:t}),null}return null})(this.buildingSlug),se=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,le=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,ue={callDesktop:null!==(d=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==d&&d,callMobile:null!==(h=null===(c=this.buildingWebchatView)||void 0===c?void 0:c.shouldShowPhoneMobile)&&void 0!==h&&h,chatDesktop:null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.shouldShowChatDesktop)&&void 0!==f&&f,chatMobile:null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.shouldShowChatMobile)&&void 0!==m&&m,emailDesktop:null!==(b=null===(y=this.buildingWebchatView)||void 0===y?void 0:y.shouldShowEmailDesktop)&&void 0!==b&&b,emailMobile:null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailMobile)&&void 0!==w&&w,textDesktop:null!==(x=(null===(C=this.buildingWebchatView)||void 0===C?void 0:C.shouldShowTextDesktop)&&!!ae)&&void 0!==x&&x,textMobile:null!==(S=(null===($=this.buildingWebchatView)||void 0===$?void 0:$.shouldShowTextMobile)&&!!ae)&&void 0!==S&&S,sstDesktop:null!==(E=null===(A=this.buildingWebchatView)||void 0===A?void 0:A.shouldShowSstDesktop)&&void 0!==E&&E,sstMobile:null!==(k=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==k&&k,calcDesktop:se,calcMobile:le};var de,ce;this.enabledChatWidgets=Vl(ue),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(Mu(this.handleTourClicked,this.orgSlug,this.buildingSlug,()=>this.isConnected),ee&&(ce=this.handleTourClicked,document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(e=>{e&&e.addEventListener("click",e=>{e.preventDefault(),ce(e)})})),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.textContent=t.textContent,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===(_=this.LeadSourceClient)||void 0===_?void 0:_.leadSource)&&(de=null!==(P=null===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&void 0!==P?P: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(de)}`)}})),this.buildingWebchatView&&(this.primaryColor=null!==(I=this.buildingWebchatView.primaryColor)&&void 0!==I?I:null,this.backgroundColor=null!==(N=this.buildingWebchatView.secondaryColor)&&void 0!==N?N:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(M=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==M?M:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(D=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==D?D:null,this.webchatConfigHasAutoOpenChat=null!==(L=this.buildingWebchatView.autoOpenChat)&&void 0!==L&&L,this.requiresConsent=null!==(U=this.buildingWebchatView.requiresConsentForChat)&&void 0!==U&&U,this.hideMobileFeatures=null!==(R=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==R&&R,this.privacyPolicyUrl=null!==(B=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==B?B:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===Yo.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===Yo.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===Yo.EMOJI&&(this.designConcept=Yo.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=qn),null===this.backgroundColor&&(this.backgroundColor=Yn);const he=null!==(F=null===(j=this.buildingWebchatView)||void 0===j?void 0:j.phoneNumber)&&void 0!==F?F:"";let pe=null;if(Z&&(pe=await async function(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source`,{params:{source:t}});return n.data?{number:Gn(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(G=null===(H=this.LeadSourceClient)||void 0===H?void 0:H.leadSource)&&void 0!==G?G:null),pe&&!pe.isMatch&&(pe.number=he)),J&&(null==pe?void 0:pe.number)){const e=Nu(pe.number,this.orgSlug,this.buildingSlug);e>0&&Go({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const fe=localStorage.getItem("eliseai_phone_number_devtest");fe&&Nu(fe,this.orgSlug,this.buildingSlug),this.phoneNumberForSource=pe||{number:he,isMatch:!1,isPropertyWebsiteCatchall:!0};const ge=null!==(Q=null===(z=this.LeadSourceClient)||void 0===z?void 0:z.leadSource)&&void 0!==Q?Q:null;ge&&(this.leadSources.includes(ge)||this.leadSources.push(ge)),ro(K.id);if((ie||(null===(W=this.buildingWebchatView)||void 0===W?void 0:W.isAip))&&(null===(V=this.buildingWebchatView)||void 0===V?void 0:V.isLiveOnApplications)&&this.buildingSlug){const e=((e,t,n)=>{var i;const r=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/content\/apply/,/\/apply-now/,/\/apply/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/,/busboomgroup\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/],o=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<o.length;s++){const l=o[s];if(l.nodeType===Node.ELEMENT_NODE&&r.some(e=>e.test(l.href))){const r=l.getAttribute("href"),o=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=lc(o,e);l.setAttribute("href",s),a++,Ho({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:Fo.info,buildingSlug:n,orgSlug:t})}}return 0===a&&Ho({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:Fo.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}/units`,this.orgSlug,this.buildingSlug);e>0&&Go({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}if(this.buildingSlug&&this.orgSlug)try{(e=>{const t=uc[e];if(!t)return 0;const n=`${dc}/building/${t}/units`,i=`${dc}/building/${e}/units`,r=new RegExp(`https://applications\\.eliseai\\.com/building/${t}/units`,"g");let o=0;const a=document.body.getElementsByTagName("a");for(let e=0;e<a.length;e++){const t=a[e],s=t.getAttribute("href");if(!s||!s.includes(n))continue;const l=s.replace(r,i);l!==s&&(t.setAttribute("href",l),o++)}document.body.querySelectorAll("[onclick]").forEach(e=>{const t=e.getAttribute("onclick");if(!t||!t.includes(n))return;const a=t.replace(r,i);a!==t&&(e.setAttribute("onclick",a),o++)})})(this.buildingSlug)}catch{}this.buildingSlug&&(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isLiveOnApplications)&&(null===(Y=this.buildingWebchatView)||void 0===Y?void 0:Y.applicationLink)&&"c954426c-12ab-4f8e-8384-8218e79eaf72"===this.orgSlug&&fc(this.orgSlug,this.buildingSlug,this.buildingWebchatView.applicationLink)},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a,s,l,u;if(!this.buildingWebchatView)return;const d=Su(this.buildingSlug),c=Au(this.buildingSlug,d),h=c?d:$u(this.buildingSlug,!1);if(!h.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new Vo,this.LeadSourceClient.orgId=null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.orgId)&&void 0!==t?t:0,this.LeadSourceMultitouchClient=new gc(this.orgSlug,this.buildingSlug),this.myPubnub=new Ou(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,h.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType);const p=await this.myPubnub.initSession(this.buildingSlug,this.orgSlug,c&&null!==(n=h.leadId)&&void 0!==n?n:void 0);p&&$u(this.buildingSlug,h.initiatedChat,p.lead_id),this.LeadSourceClient.chatId=this.myPubnub.channel;const f=await(null===(i=this.LeadSourceClient)||void 0===i?void 0:i.generateUserLeadSource({leadId:null!==(o=null===(r=this.myPubnub)||void 0===r?void 0:r.leadUserId)&&void 0!==o?o:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));f&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(f),"property-website"!==Wo(this.orgSlug)?this.myPubnub.leadSource=null!==(s=null===(a=this.LeadSourceClient)||void 0===a?void 0:a.leadSource)&&void 0!==s?s:Wo(this.orgSlug):this.myPubnub.leadSource=null!==(u=null===(l=this.LeadSourceClient)||void 0===l?void 0:l.leadSource)&&void 0!==u?u:null;const g=Su(this.buildingSlug);g.initiatedChat&&await this.myPubnub.initializePubnub(g)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!zr(Vr(t)));return!!e&&!!n&&!Or()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",Br(function(e,t){return ii(2,arguments),wi(e,6e4*vi(t))}(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;if("Tab"!==e.key)return;const u=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("meetelise-launcher"))||void 0===n?void 0:n.shadowRoot;let d=[];if(this.displayPubnubChat){const e=null===(o=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat"))||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.getElementById("pubnub-chat-container"),t=null===(a=this.shadowRoot)||void 0===a?void 0:a.getElementById("chatAdditionalActionsPubnub");e&&d.push(...this.collectFocusableElements(e)),t&&d.push(...this.collectFocusableElements(t))}else{const e=null!==(l=null!==(s=null==u?void 0:u.getElementById("email-us-window"))&&void 0!==s?s:null==u?void 0:u.getElementById("tour-scheduler-window"))&&void 0!==l?l:null==u?void 0:u.getElementById("call-us-window");e&&(d=this.collectFocusableElements(e))}if(0===d.length)return;e.preventDefault();const c=this.getDeepActiveElement(),h=d.findIndex(e=>e===c);d[e.shiftKey?(h-1+d.length)%d.length:(h+1)%d.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")}}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new Bo(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),xu(this.buildingSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),window.addEventListener("keydown",this.handleKeydownTab),this._cleanupMobileListener=Pr(e=>{this._isMobile=e})}static isFocusable(e){return!("disabled"in e)||!e.disabled}collectFocusableElements(e){const t=[];e instanceof Element&&e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));const n=e.querySelectorAll("*");for(const e of Array.from(n))e.matches(mc.FOCUSABLE_SELECTOR)&&mc.isFocusable(e)&&t.push(e),e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));return t}getDeepActiveElement(){let e=document.activeElement,t=0;for(;(null==e?void 0:e.shadowRoot)&&(null==e?void 0:e.shadowRoot.activeElement);)if(t+=1,e=null==e?void 0:e.shadowRoot.activeElement,t>100){Ho({logType:Fo.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_GETTING_DEEP_ELEMENT]",logData:{message:"error getting deep active element"}});break}return e}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e,t;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),null===(t=this._cleanupMobileListener)||void 0===t||t.call(this),super.disconnectedCallback()}render(){var e,t,n,i,r,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x,$,S,A,E,T,k,_,O,P,I,N,M,D,L,U,B,j,F,H,G,z,Q;zl();const W=this.hideLauncher&&!this.isLoading&&!this._isMobile;return R`
|
|
7235
|
+
`}};oc.AUTO_SCROLL_THRESHOLD_PX=32,oc.styles=[Oe,ju,Bu,Ru,ec],rc([ue({type:Number})],oc.prototype,"right",void 0),rc([ue({type:Number})],oc.prototype,"bottom",void 0),rc([ue({type:Number})],oc.prototype,"top",void 0),rc([ue({type:Number})],oc.prototype,"left",void 0),rc([ue({attribute:!0})],oc.prototype,"onMount",void 0),rc([ue({attribute:!0})],oc.prototype,"channel",void 0),rc([ue({attribute:!0})],oc.prototype,"isHealthChat",void 0),rc([ue({attribute:!0})],oc.prototype,"myPubnub",void 0),rc([ue({attribute:!0})],oc.prototype,"orgSlug",void 0),rc([ue({attribute:!0})],oc.prototype,"buildingSlug",void 0),rc([ue({attribute:!0})],oc.prototype,"widgetType",void 0),rc([ue({attribute:!0})],oc.prototype,"building",void 0),rc([ue({attribute:!0})],oc.prototype,"primaryColor",void 0),rc([ue({attribute:!0})],oc.prototype,"backgroundColor",void 0),rc([ue({attribute:!0})],oc.prototype,"onClickExit",void 0),rc([ue({attribute:!0})],oc.prototype,"requiresConsent",void 0),rc([ce("#message-input",!0)],oc.prototype,"messageInput",void 0),rc([ce("#conversation-body",!0)],oc.prototype,"messageBody",void 0),rc([de()],oc.prototype,"_isMobile",void 0),rc([de()],oc.prototype,"messages",void 0),rc([de()],oc.prototype,"isLoadingMessages",void 0),rc([de()],oc.prototype,"hasReceivedConsent",void 0),rc([de()],oc.prototype,"privacyPolicyUrl",void 0),rc([de()],oc.prototype,"websitePreviewMapping",void 0),oc=ic=rc([se("pubnub-chat")],oc);const ac="cdn.skypack.dev/@meetelise/chat",sc="cdn.eliseai.com/@meetelise/chat",lc=async(e,t)=>{try{if(Math.random()>=.15)return;const n=(()=>{try{const e=document.getElementsByTagName("script");for(const t of e){const e=t.src||"",n=t.textContent||"";if(e.includes(ac)||n.includes(ac))return"skypack";if(e.includes(sc)||n.includes(sc))return"eliseai"}return"unknown"}catch(e){return"unknown"}})();await r().post("https://app.meetelise.com/platformApi/webchat/cdn-version",{cdn_version:n},{params:{cdn_version:n},headers:{"Content-Type":"application/json","building-slug":t,"org-slug":e}})}catch(e){}},uc=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?t.endsWith("/units")?t:`${t}/units`:t,dc={"95ae958e-95db-11ed-9862-6f4db5533d3f":"8008db60-45b7-11f1-88ac-635f686365da","95ae96b0-95db-11ed-9863-a7aa664fd985":"72ed27c4-45b7-11f1-82d9-37b7db547687"},cc="https://applications.eliseai.com",hc=["Check Availability","Apply Now"],pc=(e,t,n,i)=>{if(!(e=>{var t;if(!e.classList.contains("floorplan-button"))return!1;const n=e.getElementsByTagName("span");if(1!==n.length)return!1;const i=null===(t=n[0].textContent)||void 0===t?void 0:t.trim();return null!=i&&hc.includes(i)})(e))return!1;if(e.getAttribute("href")===t)return!1;const r=e.getAttribute("href");return e.setAttribute("href",t),e.setAttribute("target","_blank"),Ho({logTitle:"CHECK_AVAIL_OVERWRITE",logData:{oldHref:r,newHref:t,website:window.location.href},logType:Fo.info,buildingSlug:i,orgSlug:n}),!0},fc=(e,t,n,i)=>{for(let r=0;r<e.length;r++){const o=e[r];if(o.nodeType!==Node.ELEMENT_NODE)continue;const a=o;"A"===a.tagName&&pc(a,t,n,i);const s=a.getElementsByTagName("a");for(let e=0;e<s.length;e++)pc(s[e],t,n,i)}},gc=(e,t,n)=>{((e,t,n)=>{const i=document.body.getElementsByTagName("a");for(let r=0;r<i.length;r++)pc(i[r],e,t,n)})(n,e,t);new MutationObserver(i=>{for(const r of i)fc(r.addedNodes,n,e,t)}).observe(document.body,{childList:!0,subtree:!0})};class mc{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>Br(jr(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=bo();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(jo()).filter(e=>e)}},this.addSafeLeadSourceTouchpoint=e=>{const t=this.getLocalStorageMultitouchValue(),n=this._generateLeadSourceLocalStorageKey();if(!t||this.isExpiredTimestamp(t.timestampExpires)){const t={timestampExpires:this._generateNewExpirationTimestamp(),leadSources:[{parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"touchpoint"}]};localStorage.setItem(n,JSON.stringify(t))}else{if(t.leadSources.find(t=>t.leadSourceValue===e))return;if(t.leadSources.length<this.maxSourcesNonPropertyWebsiteCount)return t.leadSources.push({parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));Ho({logType:Fo.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,logTitle:"TOO_MANY_LEAD_SOURCES",logData:{buildingSlug:this.buildingSlug}})}},this.getSafeLeadSourceTouchpointsWithDefault=({includedUserSelectedLeadSource:e})=>{const t=this.getLocalStorageMultitouchValue(),n=Wo(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:Br(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Vr(e.timestampInitiallyLogged).getTime()-Vr(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:Br(new Date),r=[{timestampInitiallyLogged:i,leadSourceValue:n,type:"default"},...t.leadSources.map(e=>({timestampInitiallyLogged:e.timestampInitiallyLogged,leadSourceValue:e.leadSourceValue,type:e.type}))];return e&&r.push({leadSourceValue:e,timestampInitiallyLogged:Br(new Date),type:"user-selected"}),r},this.getLocalStorageMultitouchValue=()=>{const e=this._generateLeadSourceLocalStorageKey(),t=localStorage.getItem(e);if(!t)return null;return JSON.parse(t)},this.isExpiredTimestamp=e=>Vr(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var yc,bc=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 vc=yc=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.centralConvo=!1,this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this._isMobile=Or(),this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=go.always,this.bedroomPreferenceRequired=!1,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.openTourSchedulerOnLoad=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.LeadSourceMultitouchClient=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=Mc.Default,this.onWidgetLoaded=Fl(),this.onSstClose=Fl(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=Ee(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{var e,t;if(!this.orgSlug)return;if(!this.centralConvo&&!this.buildingSlug)return;const n=this.centralConvo?await async function(e){const t=`https://app.meetelise.com/api/pub/v1/organization/${e}/webchat/v2`,n=await r().get(t);return ea(n.data)}(this.orgSlug):await Jo(this.orgSlug,this.buildingSlug);if(Math.random()<.2)try{(async(e,t)=>{const n=window.rentgrata;if(!n)return;const i=n.Widget;if(!i)return;const o=i.config;if(!o)return;const a=o.widgetKey;a&&await r().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=t?t:""}})})(this.buildingSlug,this.orgSlug)}catch(e){}try{lc(this.orgSlug,this.buildingSlug)}catch(e){}await Wa(n,this.buildingSlug,this.orgSlug)&&(Go({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==n?void 0:n.launchedDateTime)?.01:.05}),this.buildingWebchatView=n,await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),(e=>{const t=new URLSearchParams(window.location.search).get("rwg_token");if(!t||!e)return;const n={rwgToken:t,buildingId:e,expiresAt:Date.now()+2592e6};localStorage.setItem(La,JSON.stringify(n))})(null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.id)&&void 0!==t?t:0),"tour"===new URLSearchParams(window.location.search).get("elise_open")&&(this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile)?this.openTourSchedulerOnLoad=!0:this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)?(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.updateAlreadyAutoOpenedTimestamp()):"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0),this.isLoading=!1)},this.setBuildingDerivedInfo=async()=>{var e,t,n,i,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x,$,S,A,E,T,k,_,O,P,I,N,M,D,L,U,R,B,j,F,H,G,z,Q,W,V,q,Y;const K=this.buildingWebchatView;if(!K)return;K&&this.orgSlug&&Cc(this.orgSlug,null!==(t=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==t?t:null,this.sampleRateToUse,this.buildingSlug,null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null);const X=K.featureFlagWebchatMarketingSourceDropdownConfiguration,Z=K.featureFlagWebchatUseDniPhoneNumberBySource,J=K.featureFlagInsertDniIntoWebsite,ee=K.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite;var te;te=wo.includes(K.orgId),xo=te;const[ne,ie,re,oe]=await Promise.all([uu(this.orgSlug,this.buildingSlug),mo(this.buildingSlug),cu(this.buildingSlug),yo(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Gn(K.phoneNumber),this.buildingWebchatView.isAip=re),this.leadSources=ne,this.featureFlagShowDropdown=X,this.bedroomPreferenceRequired=oe;const ae=K.textWithUsPhoneNumber?K.textWithUsPhoneNumber:await(async e=>{try{const t="https://app.meetelise.com",n=await r().get(`${t}/platformApi/webchat/${e}/phone-number`);if(n.data)return n.data}catch(t){return Ho({logType:Fo.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t},error:t}),null}return null})(this.buildingSlug),se=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,le=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,ue={callDesktop:null!==(d=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==d&&d,callMobile:null!==(h=null===(c=this.buildingWebchatView)||void 0===c?void 0:c.shouldShowPhoneMobile)&&void 0!==h&&h,chatDesktop:null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.shouldShowChatDesktop)&&void 0!==f&&f,chatMobile:null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.shouldShowChatMobile)&&void 0!==m&&m,emailDesktop:null!==(b=null===(y=this.buildingWebchatView)||void 0===y?void 0:y.shouldShowEmailDesktop)&&void 0!==b&&b,emailMobile:null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailMobile)&&void 0!==w&&w,textDesktop:null!==(x=(null===(C=this.buildingWebchatView)||void 0===C?void 0:C.shouldShowTextDesktop)&&!!ae)&&void 0!==x&&x,textMobile:null!==(S=(null===($=this.buildingWebchatView)||void 0===$?void 0:$.shouldShowTextMobile)&&!!ae)&&void 0!==S&&S,sstDesktop:null!==(E=null===(A=this.buildingWebchatView)||void 0===A?void 0:A.shouldShowSstDesktop)&&void 0!==E&&E,sstMobile:null!==(k=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==k&&k,calcDesktop:se,calcMobile:le};var de,ce;this.enabledChatWidgets=ql(ue),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(Du(this.handleTourClicked,this.orgSlug,this.buildingSlug,()=>this.isConnected),ee&&(ce=this.handleTourClicked,document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(e=>{e&&e.addEventListener("click",e=>{e.preventDefault(),ce(e)})})),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.textContent=t.textContent,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===(_=this.LeadSourceClient)||void 0===_?void 0:_.leadSource)&&(de=null!==(P=null===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&void 0!==P?P: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(de)}`)}})),this.buildingWebchatView&&(this.primaryColor=null!==(I=this.buildingWebchatView.primaryColor)&&void 0!==I?I:null,this.backgroundColor=null!==(N=this.buildingWebchatView.secondaryColor)&&void 0!==N?N:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(M=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==M?M:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(D=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==D?D:null,this.webchatConfigHasAutoOpenChat=null!==(L=this.buildingWebchatView.autoOpenChat)&&void 0!==L&&L,this.requiresConsent=null!==(U=this.buildingWebchatView.requiresConsentForChat)&&void 0!==U&&U,this.hideMobileFeatures=null!==(R=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==R&&R,this.privacyPolicyUrl=null!==(B=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==B?B:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===Yo.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===Yo.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===Yo.EMOJI&&(this.designConcept=Yo.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=qn),null===this.backgroundColor&&(this.backgroundColor=Yn);const he=null!==(F=null===(j=this.buildingWebchatView)||void 0===j?void 0:j.phoneNumber)&&void 0!==F?F:"";let pe=null;if(Z&&(pe=await async function(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source`,{params:{source:t}});return n.data?{number:Gn(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(G=null===(H=this.LeadSourceClient)||void 0===H?void 0:H.leadSource)&&void 0!==G?G:null),pe&&!pe.isMatch&&(pe.number=he)),J&&(null==pe?void 0:pe.number)){const e=Mu(pe.number,this.orgSlug,this.buildingSlug);e>0&&Go({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const fe=localStorage.getItem("eliseai_phone_number_devtest");fe&&Mu(fe,this.orgSlug,this.buildingSlug),this.phoneNumberForSource=pe||{number:he,isMatch:!1,isPropertyWebsiteCatchall:!0};const ge=null!==(Q=null===(z=this.LeadSourceClient)||void 0===z?void 0:z.leadSource)&&void 0!==Q?Q:null;ge&&(this.leadSources.includes(ge)||this.leadSources.push(ge)),ro(K.id);if((ie||(null===(W=this.buildingWebchatView)||void 0===W?void 0:W.isAip))&&(null===(V=this.buildingWebchatView)||void 0===V?void 0:V.isLiveOnApplications)&&this.buildingSlug){const e=((e,t,n)=>{var i;const r=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/content\/apply/,/\/apply-now/,/\/apply/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/,/busboomgroup\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/],o=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<o.length;s++){const l=o[s];if(l.nodeType===Node.ELEMENT_NODE&&r.some(e=>e.test(l.href))){const r=l.getAttribute("href"),o=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=uc(o,e);l.setAttribute("href",s),a++,Ho({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:Fo.info,buildingSlug:n,orgSlug:t})}}return 0===a&&Ho({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:Fo.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}/units`,this.orgSlug,this.buildingSlug);e>0&&Go({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}if(this.buildingSlug&&this.orgSlug)try{(e=>{const t=dc[e];if(!t)return 0;const n=`${cc}/building/${t}/units`,i=`${cc}/building/${e}/units`,r=new RegExp(`https://applications\\.eliseai\\.com/building/${t}/units`,"g");let o=0;const a=document.body.getElementsByTagName("a");for(let e=0;e<a.length;e++){const t=a[e],s=t.getAttribute("href");if(!s||!s.includes(n))continue;const l=s.replace(r,i);l!==s&&(t.setAttribute("href",l),o++)}document.body.querySelectorAll("[onclick]").forEach(e=>{const t=e.getAttribute("onclick");if(!t||!t.includes(n))return;const a=t.replace(r,i);a!==t&&(e.setAttribute("onclick",a),o++)})})(this.buildingSlug)}catch{}this.buildingSlug&&(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isLiveOnApplications)&&(null===(Y=this.buildingWebchatView)||void 0===Y?void 0:Y.applicationLink)&&"c954426c-12ab-4f8e-8384-8218e79eaf72"===this.orgSlug&&gc(this.orgSlug,this.buildingSlug,this.buildingWebchatView.applicationLink)},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a,s,l,u;if(!this.buildingWebchatView)return;const d=Au(this.buildingSlug),c=Eu(this.buildingSlug,d),h=c?d:Su(this.buildingSlug,!1);if(!h.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new Vo,this.LeadSourceClient.orgId=null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.orgId)&&void 0!==t?t:0,this.LeadSourceMultitouchClient=new mc(this.orgSlug,this.buildingSlug),this.myPubnub=new Pu(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,h.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType);const p=await this.myPubnub.initSession(this.buildingSlug,this.orgSlug,c&&null!==(n=h.leadId)&&void 0!==n?n:void 0);p&&Su(this.buildingSlug,h.initiatedChat,p.lead_id),this.LeadSourceClient.chatId=this.myPubnub.channel;const f=await(null===(i=this.LeadSourceClient)||void 0===i?void 0:i.generateUserLeadSource({leadId:null!==(o=null===(r=this.myPubnub)||void 0===r?void 0:r.leadUserId)&&void 0!==o?o:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));f&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(f),"property-website"!==Wo(this.orgSlug)?this.myPubnub.leadSource=null!==(s=null===(a=this.LeadSourceClient)||void 0===a?void 0:a.leadSource)&&void 0!==s?s:Wo(this.orgSlug):this.myPubnub.leadSource=null!==(u=null===(l=this.LeadSourceClient)||void 0===l?void 0:l.leadSource)&&void 0!==u?u:null;const g=Au(this.buildingSlug);g.initiatedChat&&await this.myPubnub.initializePubnub(g)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!zr(Vr(t)));return!!e&&!!n&&!Or()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",Br(function(e,t){return ii(2,arguments),wi(e,6e4*vi(t))}(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;if("Tab"!==e.key)return;const u=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("meetelise-launcher"))||void 0===n?void 0:n.shadowRoot;let d=[];if(this.displayPubnubChat){const e=null===(o=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat"))||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.getElementById("pubnub-chat-container"),t=null===(a=this.shadowRoot)||void 0===a?void 0:a.getElementById("chatAdditionalActionsPubnub");e&&d.push(...this.collectFocusableElements(e)),t&&d.push(...this.collectFocusableElements(t))}else{const e=null!==(l=null!==(s=null==u?void 0:u.getElementById("email-us-window"))&&void 0!==s?s:null==u?void 0:u.getElementById("tour-scheduler-window"))&&void 0!==l?l:null==u?void 0:u.getElementById("call-us-window");e&&(d=this.collectFocusableElements(e))}if(0===d.length)return;e.preventDefault();const c=this.getDeepActiveElement(),h=d.findIndex(e=>e===c);d[e.shiftKey?(h-1+d.length)%d.length:(h+1)%d.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")}}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new Bo(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),$u(this.buildingSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),window.addEventListener("keydown",this.handleKeydownTab),this._cleanupMobileListener=Pr(e=>{this._isMobile=e})}static isFocusable(e){return!("disabled"in e)||!e.disabled}collectFocusableElements(e){const t=[];e instanceof Element&&e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));const n=e.querySelectorAll("*");for(const e of Array.from(n))e.matches(yc.FOCUSABLE_SELECTOR)&&yc.isFocusable(e)&&t.push(e),e.shadowRoot&&t.push(...this.collectFocusableElements(e.shadowRoot));return t}getDeepActiveElement(){let e=document.activeElement,t=0;for(;(null==e?void 0:e.shadowRoot)&&(null==e?void 0:e.shadowRoot.activeElement);)if(t+=1,e=null==e?void 0:e.shadowRoot.activeElement,t>100){Ho({logType:Fo.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_GETTING_DEEP_ELEMENT]",logData:{message:"error getting deep active element"}});break}return e}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e,t;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),null===(t=this._cleanupMobileListener)||void 0===t||t.call(this),super.disconnectedCallback()}render(){var e,t,n,i,r,o,a,s,l,u,d,c,h,p,f,g,m,y,b,v,w,C,x,$,S,A,E,T,k,_,O,P,I,N,M,D,L,U,B,j,F,H,G,z,Q;Ql();const W=this.hideLauncher&&!this.isLoading&&!this._isMobile;return R`
|
|
7227
7236
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7228
7237
|
${this.displayPubnubChat?R`
|
|
7229
7238
|
<pubnub-chat
|
|
@@ -7232,7 +7241,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7232
7241
|
.myPubnub=${this.myPubnub}
|
|
7233
7242
|
.orgSlug=${this.orgSlug}
|
|
7234
7243
|
.buildingSlug=${this.buildingSlug}
|
|
7235
|
-
.widgetType=${
|
|
7244
|
+
.widgetType=${Mc.Default}
|
|
7236
7245
|
.building=${this.buildingWebchatView}
|
|
7237
7246
|
.primaryColor=${this.primaryColor}
|
|
7238
7247
|
.backgroundColor=${this.backgroundColor}
|
|
@@ -7309,6 +7318,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7309
7318
|
virtualToursLink="${null!==(G=null===(H=this.buildingWebchatView)||void 0===H?void 0:H.virtualToursLink)&&void 0!==G?G:""}"
|
|
7310
7319
|
virtualToursTypeOffered="${null!==(z=this.buildingWebchatView.virtualToursTypeOffered)&&void 0!==z?z:""}"
|
|
7311
7320
|
.showTourNextToChat="${null!==(Q=this.showTourNextToChat)&&void 0!==Q?Q:""}"
|
|
7321
|
+
.openSSTWindowOnLoad=${this.openTourSchedulerOnLoad}
|
|
7312
7322
|
@closeShowTourNextToChat=${()=>{this.showTourNextToChat=!1,this.hideLauncher=!0}}
|
|
7313
7323
|
?hidden=${this.hideLauncher}
|
|
7314
7324
|
.hasCallUsEnabledDesktop=${this.enabledChatWidgets.callDesktop}
|
|
@@ -7337,7 +7347,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7337
7347
|
</meetelise-launcher>`:""}
|
|
7338
7348
|
</div>
|
|
7339
7349
|
</meta>
|
|
7340
|
-
`}};
|
|
7350
|
+
`}};vc.styles=u`
|
|
7341
7351
|
:host {
|
|
7342
7352
|
all: initial;
|
|
7343
7353
|
}
|
|
@@ -7386,7 +7396,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7386
7396
|
position: fixed;
|
|
7387
7397
|
bottom: 0;
|
|
7388
7398
|
}
|
|
7389
|
-
`,
|
|
7399
|
+
`,vc.FOCUSABLE_SELECTOR="a[href]:not([tabindex='-1']), input:not([disabled]), button:not([disabled]), textarea, [tabindex]:not([tabindex='-1'])",bc([ue({type:String})],vc.prototype,"buildingSlug",void 0),bc([ue({type:String})],vc.prototype,"orgSlug",void 0),bc([ue({type:Boolean})],vc.prototype,"centralConvo",void 0),bc([ue({type:Object})],vc.prototype,"launcherStyles",void 0),bc([ue()],vc.prototype,"mobileStyles",void 0),bc([ue({type:Boolean})],vc.prototype,"isMinimized",void 0),bc([ue({type:String})],vc.prototype,"primaryColor",void 0),bc([ue({type:String})],vc.prototype,"backgroundColor",void 0),bc([ue({type:String})],vc.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),bc([ue({type:String})],vc.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),bc([de()],vc.prototype,"_isMobile",void 0),bc([de()],vc.prototype,"chatId",void 0),bc([de()],vc.prototype,"analytics",void 0),bc([de()],vc.prototype,"launcher",void 0),bc([de()],vc.prototype,"buildingWebchatView",void 0),bc([de()],vc.prototype,"designConcept",void 0),bc([de()],vc.prototype,"leadSources",void 0),bc([de()],vc.prototype,"currentLeadSource",void 0),bc([de()],vc.prototype,"featureFlagShowDropdown",void 0),bc([de()],vc.prototype,"bedroomPreferenceRequired",void 0),bc([de()],vc.prototype,"phoneNumberForSource",void 0),bc([de()],vc.prototype,"hasMounted",void 0),bc([de()],vc.prototype,"hideLauncher",void 0),bc([de()],vc.prototype,"isLoading",void 0),bc([de()],vc.prototype,"showTourNextToChat",void 0),bc([de()],vc.prototype,"openTourSchedulerOnLoad",void 0),bc([de()],vc.prototype,"displayPubnubChat",void 0),bc([de()],vc.prototype,"myPubnub",void 0),bc([de()],vc.prototype,"LeadSourceClient",void 0),bc([de()],vc.prototype,"LeadSourceMultitouchClient",void 0),bc([de()],vc.prototype,"sampleRateToUse",void 0),bc([ue({type:Number})],vc.prototype,"right",void 0),bc([ue({type:Number})],vc.prototype,"bottom",void 0),bc([ue({type:Number})],vc.prototype,"top",void 0),bc([ue({type:Number})],vc.prototype,"left",void 0),bc([ue({attribute:!0})],vc.prototype,"overrideRentgrata",void 0),bc([ue({attribute:!0})],vc.prototype,"widgetType",void 0),bc([ue()],vc.prototype,"onWidgetLoaded",void 0),bc([ue({attribute:!0})],vc.prototype,"onSstClose",void 0),bc([de()],vc.prototype,"enabledChatWidgets",void 0),bc([de()],vc.prototype,"webchatConfigHasAutoOpenChat",void 0),bc([de()],vc.prototype,"requiresConsent",void 0),bc([de()],vc.prototype,"hideMobileFeatures",void 0),bc([de()],vc.prototype,"privacyPolicyUrl",void 0),vc=yc=bc([se("me-chat")],vc);const wc=e=>{for(const t of e){const e=document.getElementById(t);if(e)return e}return null},Cc=async(e,t,n,i,o)=>{var a;if(!i||!e)return;const s=await async function(e){if(!e)return!1;try{return(await r().get(fo(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-override-contact-us-form",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(i);if(!s)return;const l=wc(["myContactForm","contactus","fpa-myContactForm"]);let u;if(!(l&&l instanceof HTMLFormElement)){const t=document.querySelector("form");return void(window.location.pathname.toLowerCase().includes("contactus")&&xc(i,e,"Could not find form",t?{id:t.id}:void 0))}try{if(l.parentElement&&"scheduleTourForm"===l.parentElement.id)return xc(i,e,"Form is apart of schedule tour form!")}catch(e){}for(let e=0;e<l.elements.length;e++){const t=l.elements[e];if("button"===t.tagName.toLowerCase()&&"fakebutton"===t.getAttribute("data-selenium-id")){u=t;break}if("fpa-contact-submit"===t.getAttribute("id")){u=t;break}}if(!u)return xc(i,e,"Could not find submit button");const d=()=>({firstName:wc(["firstname","txtName","fpa-firstname","Form_FirstName"]),lastName:wc(["lastname","txtName2","fpa-lastname","Form_LastName"]),email:wc(["email","txtEmail","fpa-email","Form_Email"]),phone:wc(["phonenumber","txtPhone","fpa-phonenumber","Form_Phone"]),message:wc(["message","txtComments","fpa-email","Form_Message"])});if(Object.values(d()).some(e=>null===e)){const t=Object.entries(d()).filter(([,e])=>null===e).map(([e])=>e);return xc(i,e,"Missing the following form elements: "+t.join(", "))}const c=u.textContent,h=u.cloneNode(!0);null===(a=u.parentNode)||void 0===a||a.replaceChild(h,u),h&&Go({params:{chat_id:t,org_slug:e,building_slug:i,is_form_override_success:!0},sampleRate:n}),h.onclick=async function(t){if(Object.values(d()).forEach(e=>{"true"!==(null==e?void 0:e.getAttribute("aria-required"))||e.value||(e.className="form-control required is-invalid")}),!Object.values(d()).every(e=>null!==e&&!("true"===e.getAttribute("aria-required")&&!e.value)&&("email"!==e.id&&"phonenumber"!==e.id||"true"!==e.getAttribute("aria-invalid"))))return;t.preventDefault(),h.textContent="Processing request...",h.disabled=!0;const n={};Object.entries(d()).forEach(([e,t])=>n[e]=null==t?void 0:t.value);const r=await Jo(e,i);if(!r)return xc(i,e,"Could not find building"),null;const a={email_address:n.email,first_name:n.firstName,last_name:n.lastName,phone_number:n.phone,first_message:n.message,building_id:r.id,is_external_form:!0,lead_sources:[...new Set(o?[o,Wo(e)]:[Wo(e)])]},s=JSON.stringify(a);fetch("https://app.meetelise.com/platformApi/state/create/contactMe",{method:"POST",headers:{"Content-Type":"application/json","building-slug":i,"org-slug":e},body:s}).then(e=>{if(!e.ok)throw new Error(`HTTP error ${e.status}`);return l&&l.reset(),Object.values(d()).forEach(e=>{e&&(e.disabled=!0)}),h.textContent="Submitted",h.disabled=!0,e.json()}).catch(()=>{h.textContent=c})}},xc=(e,t,n,i)=>{const r=JSON.stringify({orgSlug:t,buildingSlug:e,reason:n,url:window.location.href,formIdInfo:i});fetch("https://app.meetelise.com/platformApi/webchat/form-override-error",{method:"POST",headers:{"Content-Type":"application/json","building-slug":e,"org-slug":t},body:r})},$c=u`
|
|
7390
7400
|
.chat-launcher {
|
|
7391
7401
|
position: fixed;
|
|
7392
7402
|
}
|
|
@@ -7417,7 +7427,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7417
7427
|
filter: brightness(1.1);
|
|
7418
7428
|
}
|
|
7419
7429
|
}
|
|
7420
|
-
`;var
|
|
7430
|
+
`;var Sc=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 Ac=class extends oe{constructor(){super(...arguments),this.right=0,this.bottom=0,this.top=0,this.left=0,this.isChatOpen=!1,this.onClickCloseChat=()=>({}),this.onClickOpenChat=()=>({})}render(){return this.isChatOpen?R`
|
|
7421
7431
|
<div
|
|
7422
7432
|
class="chat-launcher"
|
|
7423
7433
|
style=${Vn({top:Or()||isNaN(this.top)?void 0:`${this.top+432}px`,bottom:Or()||isNaN(this.bottom)?"72px":this.bottom-60+"px",left:Or()||isNaN(this.left)?void 0:`${this.left}px`,right:Or()||isNaN(this.right)?"18px":`${this.right}px`})}
|
|
@@ -7471,12 +7481,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7471
7481
|
/>
|
|
7472
7482
|
</svg>
|
|
7473
7483
|
</button>
|
|
7474
|
-
</div>`}};
|
|
7484
|
+
</div>`}};Ac.styles=[$c],Sc([ue({type:Number})],Ac.prototype,"right",void 0),Sc([ue({type:Number})],Ac.prototype,"bottom",void 0),Sc([ue({type:Number})],Ac.prototype,"top",void 0),Sc([ue({type:Number})],Ac.prototype,"left",void 0),Sc([ue({attribute:!0})],Ac.prototype,"isChatOpen",void 0),Sc([ue({attribute:!0})],Ac.prototype,"onClickCloseChat",void 0),Sc([ue({attribute:!0})],Ac.prototype,"onClickOpenChat",void 0),Ac=Sc([se("simple-launcher")],Ac);var Ec=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 Tc=class extends oe{constructor(){super(...arguments),this.healthcareId="",this.right=0,this.bottom=0,this.top=0,this.left=0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Ee(),this.firstUpdated=async()=>{await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=Au(this.healthcareId),t=Eu(this.healthcareId,e)?e:Su(this.healthcareId,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Pu(this.healthcareId,null,"",this.currentLeadSource,t.leadId,null,null,Mc.Healthcare),t.initiatedChat&&await this.myPubnub.initializePubnub(e),Or()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),$u(this.healthcareId),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return Ql(),this.isLoading?R``:R`
|
|
7475
7485
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
7476
7486
|
${this.displayPubnubChat?R`
|
|
7477
7487
|
<pubnub-chat
|
|
7478
7488
|
id="pubnub-chat"
|
|
7479
|
-
.widgetType=${
|
|
7489
|
+
.widgetType=${Mc.Healthcare}
|
|
7480
7490
|
.channel=${null===(e=this.myPubnub)||void 0===e?void 0:e.channel}
|
|
7481
7491
|
.myPubnub=${this.myPubnub}
|
|
7482
7492
|
.buildingSlug=${this.healthcareId}
|
|
@@ -7502,7 +7512,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7502
7512
|
></simple-launcher>
|
|
7503
7513
|
|
|
7504
7514
|
</meta>
|
|
7505
|
-
`}};
|
|
7515
|
+
`}};Tc.styles=u`
|
|
7506
7516
|
:host {
|
|
7507
7517
|
all: initial;
|
|
7508
7518
|
}
|
|
@@ -7555,13 +7565,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7555
7565
|
line-height: 150%;
|
|
7556
7566
|
font-size: 16px;
|
|
7557
7567
|
}
|
|
7558
|
-
`,
|
|
7568
|
+
`,Ec([ue({type:String})],Tc.prototype,"healthcareId",void 0),Ec([ue({type:Number})],Tc.prototype,"right",void 0),Ec([ue({type:Number})],Tc.prototype,"bottom",void 0),Ec([ue({type:Number})],Tc.prototype,"top",void 0),Ec([ue({type:Number})],Tc.prototype,"left",void 0),Ec([de()],Tc.prototype,"launcher",void 0),Ec([de()],Tc.prototype,"currentLeadSource",void 0),Ec([de()],Tc.prototype,"displayPubnubChat",void 0),Ec([de()],Tc.prototype,"myPubnub",void 0),Ec([de()],Tc.prototype,"requiresConsent",void 0),Ec([de()],Tc.prototype,"privacyPolicyUrl",void 0),Ec([de()],Tc.prototype,"isLoading",void 0),Tc=Ec([se("health-chat")],Tc);var kc=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 _c=class extends oe{constructor(){super(...arguments),this.orgSlug="",this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Ee(),this.firstUpdated=async()=>{(await async function(e){if(!e)return!1;const t="e2e-test-yardi-building";try{return(await r().get(fo(t),{params:{building_slug:t,flag_type:"bool",feature_flag:"enable-show-utilities-webchat",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(this.orgSlug)||location.href.includes("demo/utilities"))&&await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=Au(this.orgSlug),t=Eu(this.orgSlug,e)?e:Su(this.orgSlug,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Pu(this.orgSlug,null,this.orgSlug,this.currentLeadSource,t.leadId,null,null,Mc.Utilities),t.initiatedChat&&await this.myPubnub.initializePubnub(e),Or()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),$u(this.orgSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return Ql(),this.isLoading?R``:R`
|
|
7559
7569
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
7560
7570
|
${this.displayPubnubChat?R`
|
|
7561
7571
|
<pubnub-chat
|
|
7562
7572
|
id="pubnub-chat"
|
|
7563
7573
|
.channel=${null===(e=this.myPubnub)||void 0===e?void 0:e.channel}
|
|
7564
|
-
.widgetType=${
|
|
7574
|
+
.widgetType=${Mc.Utilities}
|
|
7565
7575
|
.myPubnub=${this.myPubnub}
|
|
7566
7576
|
.buildingSlug=${this.orgSlug}
|
|
7567
7577
|
.onClickExit=${()=>{this.displayPubnubChat=!1}}
|
|
@@ -7585,7 +7595,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7585
7595
|
|
|
7586
7596
|
></simple-launcher>
|
|
7587
7597
|
</meta>
|
|
7588
|
-
`}};
|
|
7598
|
+
`}};_c.styles=u`
|
|
7589
7599
|
:host {
|
|
7590
7600
|
all: initial;
|
|
7591
7601
|
}
|
|
@@ -7638,4 +7648,4 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7638
7648
|
line-height: 150%;
|
|
7639
7649
|
font-size: 16px;
|
|
7640
7650
|
}
|
|
7641
|
-
`,
|
|
7651
|
+
`,kc([ue({type:String})],_c.prototype,"orgSlug",void 0),kc([ue({type:Number})],_c.prototype,"right",void 0),kc([ue({type:Number})],_c.prototype,"bottom",void 0),kc([ue({type:Number})],_c.prototype,"top",void 0),kc([ue({type:Number})],_c.prototype,"left",void 0),kc([de()],_c.prototype,"launcher",void 0),kc([de()],_c.prototype,"currentLeadSource",void 0),kc([de()],_c.prototype,"displayPubnubChat",void 0),kc([de()],_c.prototype,"myPubnub",void 0),kc([de()],_c.prototype,"requiresConsent",void 0),kc([de()],_c.prototype,"privacyPolicyUrl",void 0),kc([de()],_c.prototype,"isLoading",void 0),_c=kc([se("utilities-chat")],_c);const Oc=async e=>{const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":e}});return Math.random()<.2&&Ho({logType:i&&i.data?Fo.info:Fo.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:e,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),i.data},Pc=async(e,t=5e3)=>new Promise((n,i)=>{const r=new MutationObserver((t,i)=>{const r=document.getElementById(e);r&&(i.disconnect(),n(r))});r.observe(document.body,{childList:!0,subtree:!0});const o=setTimeout(()=>{r.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))},t),a=document.querySelector(e);a&&(clearTimeout(o),r.disconnect(),n(a))});class Ic{static healthcareStart(e,t=!0){var n,i,r,o;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),Dc();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","region"),a.setAttribute("aria-label","EliseAI Healthcare Widget"),a.setAttribute("healthcareId",e.id),a.setAttribute("right",(null===(n=e.right)||void 0===n?void 0:n.toString())||"unset"),a.setAttribute("bottom",(null===(i=e.bottom)||void 0===i?void 0:i.toString())||"unset"),a.setAttribute("top",(null===(r=e.top)||void 0===r?void 0:r.toString())||"unset"),a.setAttribute("left",(null===(o=e.left)||void 0===o?void 0:o.toString())||"unset"),document.body.appendChild(a),Ic.healthChat=a}static start(e,t=!0){var n,i,r,o,a,s,l,u;if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;if(t&&(this.orgSlug="Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization||"",this.hasBuildingSlug=!!e.building,this.overridePlacement={right:null===(n=null==e?void 0:e.position)||void 0===n?void 0:n.right,bottom:null===(i=null==e?void 0:e.position)||void 0===i?void 0:i.bottom,top:null===(r=null==e?void 0:e.position)||void 0===r?void 0:r.top,left:null===(o=null==e?void 0:e.position)||void 0===o?void 0:o.left}),Dc(),e.studio&&!e.building)return void this.handleStudioContext(e);let d=null;switch(e.widgetType){case Mc.Healthcare:throw new Error("Healthcare widget is not supported yet, please use the healthcareStart method instead.");case Mc.Default:d=document.createElement("me-chat");break;case Mc.Utilities:d=document.createElement("utilities-chat");break;default:d=document.createElement("me-chat")}if(!d)throw new Error("Invalid widget type");d.setAttribute("orgSlug","Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization||""),d.setAttribute("widgetType",e.widgetType||Mc.Default),d.setAttribute("class","meetelise-chat"),d.setAttribute("role","region"),d.setAttribute("aria-label","EliseAI Widget"),e.brandColor&&(this.brandColor=e.brandColor,d.setAttribute("primaryColor",((e,t)=>{const n=Kn(e),i=0,r=0,o=0,a={r:n.r+Math.round((i-n.r)*t),g:n.g+Math.round((r-n.g)*t),b:n.b+Math.round((o-n.b)*t)};return Xn(a.r,a.g,a.b)})(e.brandColor,.3))),e.backgroundColor&&(this.backgroundColor=e.backgroundColor),d instanceof vc&&(e.centralConvo?d.setAttribute("centralConvo","true"):this.handleBuildingslug(d,e.organization,e.building,e),e.launcherStyles&&(d.launcherStyles=e.launcherStyles),e.mobileStyles&&(d.mobileStyles=e.mobileStyles),e.onWidgetLoaded&&(d.onWidgetLoaded=e.onWidgetLoaded),e.overrideRentgrata&&((async()=>{const e=await Pc("rg-widget-compact");e&&e.setAttribute("style","display: none")})(),d.overrideRentgrata=!0),e.onSstClose&&(d.onSstClose=e.onSstClose)),e.position&&(d.setAttribute("right",(null===(a=e.position.right)||void 0===a?void 0:a.toString())||"unset"),d.setAttribute("bottom",(null===(s=e.position.bottom)||void 0===s?void 0:s.toString())||"unset"),d.setAttribute("top",(null===(l=e.position.top)||void 0===l?void 0:l.toString())||"unset"),d.setAttribute("left",(null===(u=e.position.left)||void 0===u?void 0:u.toString())||"unset")),window.eliseAi={},document.body.appendChild(d),d instanceof vc&&(Ic.meChat=d),d instanceof _c&&(Ic.utilitiesChat=d)}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.studioUpdateToken+=1,await this.removeWidget(),this.activeStudioOrgSlug="",this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey="",this.activeStudioOptions=null}static async removeWidget(){var e;if(!this.meChat)return;const t=this.meChat;await t.remove(),null===(e=t.parentNode)||void 0===e||e.removeChild(t),Ic.meChat=null}static handleStudioContext(e){e.studio&&(this.activeStudioOptions=e)}static updateStudioContext(e){const t=this.activeStudioOptions;if(!(null==t?void 0:t.studio))return;const n=++this.studioUpdateToken;if(e.siteId&&e.siteId!==t.studio.siteId)return void Ho({logType:Fo.warn,logTitle:"[STUDIO_WEBCHAT_CONTEXT_SITE_MISMATCH]",logData:{activeSiteId:t.studio.siteId,contextSiteId:e.siteId,url:window.location.href}});const i=Nc(e.organization),r=Nc(e.building);if(!i||!r)return void this.clearStudioContext({source:"elise_studio",reason:"missing_context",preserveCache:!0});const o=function(e,t){if(!(null==e?void 0:e.key))return`building:${t}`;return e.key}(e.sessionScope,r),a=function(e){return"Pacific Urban Residential"===e?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e}(i);this.activeStudioOrgSlug===a&&this.activeStudioBuildingSlug===r&&this.activeStudioSessionScopeKey===o||this.removeWidget().then(()=>{n===this.studioUpdateToken&&(this.activeStudioOrgSlug=a,this.activeStudioBuildingSlug=r,this.activeStudioSessionScopeKey=o,this.orgSlug=a,this.start({...t,organization:i,building:r},!1))})}static clearStudioContext(e){this.studioUpdateToken+=1,this.activeStudioOrgSlug="",this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey="",this.removeWidget()}static async handleBuildingslug(e,t,n,i){if(n)return void e.setAttribute("buildingSlug",n);if(this.mutationObserver)return;if(!t)return;const r=await Oc(t);if(r){const e={...i,organization:t,building:r};this.start(e,!1)}this.previousUrl=window.location.href,document.body.addEventListener("click",()=>{requestAnimationFrame(()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,Oc(t).then(e=>{if(!e)return;const n={...i,organization:t,building:e};this.start(n,!1)}))})},!0)}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,t=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,n=await r().get(t,{headers:{"org-slug":this.orgSlug}});if(Math.random()<.2&&Ho({logType:n&&n.data?Fo.info:Fo.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${n?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:n.data,url:e,orgSlug:this.orgSlug,givenBuildingSlug:null,reason:n&&n.data?null:"No match found"}}),!n||!n.data)return;const i={organization:this.orgSlug,building:n.data,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(i,!1)}static async calculateBuildingSlugForLogging(e){const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":this.orgSlug}});Math.random()<.2&&Ho({logType:i&&i.data===e?Fo.info:Fo.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i&&i.data===e?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:this.orgSlug,givenBuildingSlug:e,reason:i&&i.data===e?null:i&&!i.data?"No match found":i&&i.data!==e?"Mismatch":"No match found"}}),i&&i.data}}function Nc(e){return"string"!=typeof e?"":e.trim()}var Mc;Ic.meChat=null,Ic.healthChat=null,Ic.utilitiesChat=null,Ic.orgSlug="",Ic.mutationObserver=null,Ic.previousUrl="",Ic.hasBuildingSlug=null,Ic.brandColor="",Ic.backgroundColor="",Ic.healthcareId="",Ic.activeStudioOrgSlug="",Ic.activeStudioBuildingSlug="",Ic.activeStudioSessionScopeKey="",Ic.activeStudioOptions=null,Ic.studioUpdateToken=0,Ic.overridePlacement={},function(e){e.Default="default",e.Healthcare="healthcare",e.Utilities="utilities"}(Mc||(Mc={}));const Dc=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)};export{Mc as WidgetType,Ic as default};
|