@meetelise/chat 1.50.2 → 1.50.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.50.2",
3
+ "version": "1.50.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",
@@ -618,7 +618,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
618
618
  .option.active {
619
619
  background-color: var(--active-option-color);
620
620
  }
621
- `,En],Tn([ue({attribute:!1})],_n.prototype,"options",void 0),Tn([ue({type:String})],_n.prototype,"placeholder",void 0),Tn([ue({type:String})],_n.prototype,"value",void 0),Tn([ce()],_n.prototype,"activeOption",void 0),Tn([ce()],_n.prototype,"isOpen",void 0),Tn([ce()],_n.prototype,"activeOptionIndex",void 0),Tn([de("#select",!0)],_n.prototype,"meSelect",void 0),_n=Tn([se("me-select")],_n),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(In||(In={}));var Mn=n(2013),Nn=n.n(Mn);function Dn(e){return Ge(1,arguments),Qe(e).getTime()<Date.now()}Math.pow(10,8);var Ln=6e4,Un=36e5;function Rn(e,t){Ge(1,arguments);var n=t||{},i=null==n.additionalDigits?2:at(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(Bn.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],Bn.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Bn.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=Bn.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(jn);if(!n)return new Date(NaN);var i=!!n[4],r=$n(n[1]),o=$n(n[2])-1,a=$n(n[3]),s=$n(n[4]),l=$n(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<=(Gn[t]||(Qn(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(Qn(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(Fn);if(!t)return NaN;var n=zn(t[1]),i=zn(t[2]),r=zn(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*Un+i*Ln+1e3*r}(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var c=new Date(l+u),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return s=function(e){if("Z"===e)return 0;var t=e.match(Hn);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*Un+r*Ln)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var Bn={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},jn=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Fn=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Hn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $n(e){return e?parseInt(e):1}function zn(e){return e&&parseFloat(e.replace(",","."))||0}var Gn=[31,null,31,30,31,30,31,31,30,31,30,31];function Qn(e){return e%400==0||e%4==0&&e%100!=0}const Wn={buildingId:null,availabilities:{}},qn=()=>{Wn.buildingId=null,Wn.availabilities={}},Vn=async e=>{e&&(Wn.buildingId=e);const t=Wn.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=Wn.availabilities;if(n[t])return n[t];const i=Qt(Date.now()),o=On(function(e){Ge(1,arguments);var t=Qe(e);return t.setHours(23,59,59,999),t}(Pn(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(On(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return Wn.availabilities[t]=s.data,s.data},Yn=async(e,t)=>{var n,i;const r=await Vn(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},Kn=async()=>{var e,t,n,i,r,o;return{[Tr.Guided]:!!(null===(t=null===(e=await Yn(In.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[Tr.Self]:!!(null===(i=null===(n=await Yn(In.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[Tr.Virtual]:!!(null===(o=null===(r=await Yn(In.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}},Xn=async(e,t)=>{var n,i;const r=await Yn(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter(e=>qe(Rn(e))&&!Dn(Rn(e))):[])||void 0===n?void 0:n.map(e=>Zn(e))};return Nn()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],e=>Ft(new Date(e.datetime),"yyyy-MM-dd"))},Zn=e=>({datetime:e.slice(0,19),offset:e.slice(19)});var Jn=n(3916),ei=n.n(Jn),ti=n(2485),ni=n.n(ti);const ii=e=>`https://app.meetelise.com/platformApi/webchat/${e}/chat-ui-feature-flag`;var ri;async function oi(e){if(!e)return!1;try{return(await r().get(ii(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 ai(){return si()?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)}()}!function(e){e.onAttributionFailure="on-attribution-failure",e.never="never",e.always="always"}(ri||(ri={}));const si=()=>(window.location.search.match(/\?/g)||[]).length>1,li=[57,2575],ui=["email","phone","firstName","lastName","message","tourDetails"];let ci=!1;const di=(e,t={})=>{window.dataLayer=window.dataLayer||[];let n=t;if(ci){n={...t};for(const e of ui)delete n[e]}window.dataLayer.push({event:e,...n})};class hi extends me{constructor(e){if(super(e),this.it=H,e.type!==fe)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||null==e)return this.ft=void 0,this.it=e;if(e===F)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:[]}}}hi.directiveName="unsafeHTML",hi.resultType=1;const pi=ge(hi),fi=j`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
621
+ `,En],Tn([ue({attribute:!1})],_n.prototype,"options",void 0),Tn([ue({type:String})],_n.prototype,"placeholder",void 0),Tn([ue({type:String})],_n.prototype,"value",void 0),Tn([ce()],_n.prototype,"activeOption",void 0),Tn([ce()],_n.prototype,"isOpen",void 0),Tn([ce()],_n.prototype,"activeOptionIndex",void 0),Tn([de("#select",!0)],_n.prototype,"meSelect",void 0),_n=Tn([se("me-select")],_n),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(In||(In={}));var Mn=n(2013),Nn=n.n(Mn);function Dn(e){return Ge(1,arguments),Qe(e).getTime()<Date.now()}Math.pow(10,8);var Ln=6e4,Un=36e5;function Rn(e,t){Ge(1,arguments);var n=t||{},i=null==n.additionalDigits?2:at(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(Bn.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],Bn.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Bn.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=Bn.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(jn);if(!n)return new Date(NaN);var i=!!n[4],r=$n(n[1]),o=$n(n[2])-1,a=$n(n[3]),s=$n(n[4]),l=$n(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<=(Gn[t]||(Qn(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(Qn(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(Fn);if(!t)return NaN;var n=zn(t[1]),i=zn(t[2]),r=zn(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*Un+i*Ln+1e3*r}(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var c=new Date(l+u),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return s=function(e){if("Z"===e)return 0;var t=e.match(Hn);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*Un+r*Ln)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var Bn={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},jn=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Fn=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Hn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $n(e){return e?parseInt(e):1}function zn(e){return e&&parseFloat(e.replace(",","."))||0}var Gn=[31,null,31,30,31,30,31,31,30,31,30,31];function Qn(e){return e%400==0||e%4==0&&e%100!=0}const Wn={buildingId:null,availabilities:{}},qn=()=>{Wn.buildingId=null,Wn.availabilities={}},Vn=async e=>{e&&(Wn.buildingId=e);const t=Wn.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=Wn.availabilities;if(n[t])return n[t];const i=Qt(Date.now()),o=On(function(e){Ge(1,arguments);var t=Qe(e);return t.setHours(23,59,59,999),t}(Pn(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(On(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return Wn.availabilities[t]=s.data,s.data},Yn=async(e,t)=>{var n,i;const r=await Vn(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},Kn=async()=>{var e,t,n,i,r,o;return{[Tr.Guided]:!!(null===(t=null===(e=await Yn(In.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[Tr.Self]:!!(null===(i=null===(n=await Yn(In.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[Tr.Virtual]:!!(null===(o=null===(r=await Yn(In.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}},Xn=async(e,t)=>{var n,i;const r=await Yn(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter(e=>qe(Rn(e))&&!Dn(Rn(e))):[])||void 0===n?void 0:n.map(e=>Zn(e))};return Nn()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],e=>Ft(new Date(e.datetime),"yyyy-MM-dd"))},Zn=e=>({datetime:e.slice(0,19),offset:e.slice(19)});var Jn=n(3916),ei=n.n(Jn),ti=n(2485),ni=n.n(ti);const ii=e=>`https://app.meetelise.com/platformApi/webchat/${e}/chat-ui-feature-flag`;var ri;async function oi(e){if(!e)return!1;try{return(await r().get(ii(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 ai(){return si()?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)}()}!function(e){e.onAttributionFailure="on-attribution-failure",e.never="never",e.always="always"}(ri||(ri={}));const si=()=>(window.location.search.match(/\?/g)||[]).length>1,li=[57,2575,2332],ui=["email","phone","firstName","lastName","message","tourDetails"];let ci=!1;const di=(e,t={})=>{window.dataLayer=window.dataLayer||[];let n=t;if(ci){n={...t};for(const e of ui)delete n[e]}window.dataLayer.push({event:e,...n})};class hi extends me{constructor(e){if(super(e),this.it=H,e.type!==fe)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===H||null==e)return this.ft=void 0,this.it=e;if(e===F)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:[]}}}hi.directiveName="unsafeHTML",hi.resultType=1;const pi=ge(hi),fi=j`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
622
622
  <rect x="1" y="1" width="22" height="22" stroke="black" stroke-width="2" rx="2"/>
623
623
  </svg>
624
624
  `,gi=(j`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
package/src/gtm.ts CHANGED
@@ -5,9 +5,9 @@ declare global {
5
5
  }
6
6
  }
7
7
 
8
- // MAA (org 57) and the MAA test org (2575) asked us not to push lead PII
9
- // into the host page's dataLayer
10
- export const HIDE_DATA_LAYER_PII_ORG_IDS = [57, 2575];
8
+ // MAA (org 57), the MAA test org (2575), and org 2332 asked us not to push
9
+ // lead PII into the host page's dataLayer
10
+ export const HIDE_DATA_LAYER_PII_ORG_IDS = [57, 2575, 2332];
11
11
 
12
12
  const GTM_PII_KEYS = [
13
13
  "email",