@meetelise/chat 1.43.3 → 1.43.5
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/public/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){return i(e,o,r)}},79:(e,t,n)=>{var i=n(3702),r=n(80),o=n(4739),a=n(8655),s=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},80:(e,t,n)=>{var i=n(6025),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},85:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,i.default)(e),s=(0,r.default)(n,t).getTime()-(0,o.default)(n,t).getTime();return Math.round(s/l)+1};var i=s(n(5039)),r=s(n(930)),o=s(n(9799)),a=s(n(427));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},104:(e,t,n)=>{var i=n(3661);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},170:(e,t,n)=>{var i=n(6440);function r(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function o(e,t){this._pairs=[],e&&i(e,this,t)}var a=o.prototype;a.append=function(e,t){this._pairs.push([e,t])},a.toString=function(e){var t=e?function(t){return e.call(this,t,r)}:r;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")},e.exports=o},243:e=>{e.exports=FormData},270:(e,t,n)=>{var i=n(7068),r=n(346);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,a,e,s))}},289:(e,t,n)=>{var i=n(2651);e.exports=function(e){return i(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},311:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(r.length)}}},e.exports=t.default},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},427:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default},521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),s=n-o;return Math.floor(s/a)+1};var i=o(n(5039)),r=o(n(427));function o(e){return e&&e.__esModule?e:{default:e}}var a=864e5;e.exports=t.default},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},583:(e,t,n)=>{var i=n(7237),r=n(7255),o=n(8586),a=n(7797);e.exports=function(e){return o(e)?i(a(e)):r(e)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(8963))&&i.__esModule?i:{default:i};var o={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,r.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,r.default)(n+1,2)},d:function(e,t){return(0,r.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return(0,r.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,r.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,r.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,r.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return(0,r.default)(o,t.length)}};t.default=o,e.exports=t.default},631:(e,t,n)=>{var i=n(8077),r=n(9326);e.exports=function(e,t){return null!=e&&r(e,t,i)}},641:(e,t,n)=>{var i=n(6649),r=n(5950);e.exports=function(e,t){return e&&i(e,t,r)}},659:(e,t,n)=>{var i=n(1873),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,s=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=a.call(e);return i&&(t?e[s]=n:delete e[s]),r}},663:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;var a,s=o[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}},e.exports=t.default},689:(e,t,n)=>{var i=n(2),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=i(e),c=u.length;if(c!=i(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:r.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var y=e[h=u[d]],b=t[h];if(o)var v=l?o(b,y,h,t,e,s):o(y,b,h,e,t,s);if(!(void 0===v?y===b||a(y,b,n,o,s):v)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var w=e.constructor,C=t.constructor;w==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}},695:(e,t,n)=>{var i=n(8096),r=n(2428),o=n(6449),a=n(3656),s=n(361),l=n(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&r(e),d=!n&&!c&&a(e),h=!n&&!c&&!d&&l(e),p=n||c||d||h,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||f.push(m);return f}},756:(e,t,n)=>{var i=n(3805);e.exports=function(e){return e==e&&!i(e)}},776:(e,t,n)=>{var i=n(756),r=n(5950);e.exports=function(e){for(var t=r(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,i(a)]}return t}},786:(e,t,n)=>{e.exports=n(1894)},828:(e,t,n)=>{var i=n(4647),r=n(3222),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=r(e))&&e.replace(o,i).replace(a,"")}},882:e=>{e.exports=function(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}},909:(e,t,n)=>{var i=n(641),r=n(8329)(i);e.exports=r},930:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(1,arguments);var n=t||{},a=n.locale,s=a&&a.options&&a.options.weekStartsOn,l=null==s?0:(0,o.default)(s),u=null==n.weekStartsOn?l:(0,o.default)(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=(0,i.default)(e),d=c.getUTCDay(),h=(d<u?7:0)+d-u;return c.setUTCDate(c.getUTCDate()-h),c.setUTCHours(0,0,0,0),c};var i=a(n(5039)),r=a(n(427)),o=a(n(9784));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var i=n(79),r=n(8223),o=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!r||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},1042:(e,t,n)=>{var i=n(6110)(Object,"create");e.exports=i},1074:e=>{e.exports=function(e){return e.split("")}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1175:(e,t,n)=>{var i=n(6025);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},1287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(e,t,i){var r,o=n[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};t.default=i,e.exports=t.default},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1420:(e,t,n)=>{var i=n(79);e.exports=function(){this.__data__=new i,this.size=0}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1545:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var i,r=n||{};if("formatting"===(r.context?String(r.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}return i[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default},1549:(e,t,n)=>{var i=n(2032),r=n(3862),o=n(6721),a=n(2749),s=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},1601:e=>{e.exports=function(e){return e[1]}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1769:(e,t,n)=>{var i=n(6449),r=n(8586),o=n(1802),a=n(3222);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(a(e))}},1799:(e,t,n)=>{var i=n(7217),r=n(270);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var c=(u=n[a])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var p=new i;if(o)var f=o(d,h,c,e,t,p);if(!(void 0===f?r(h,d,3,o,p):f))return!1}}return!0}},1802:(e,t,n)=>{var i=n(2224),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=i(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)}),t});e.exports=a},1873:(e,t,n)=>{var i=n(9325).Symbol;e.exports=i},1882:(e,t,n)=>{var i=n(2552),r=n(3805);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1894:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},1986:(e,t,n)=>{var i=n(1873),r=n(7828),o=n(5288),a=n(5911),s=n(317),l=n(4247),u=i?i.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&i;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=h.get(e);if(g)return g==t;i|=2,h.set(e,t);var m=a(p(e),p(t),i,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},2e3:(e,t,n)=>{var i=n(3945),r=n(2429),o=n(5389),a=n(6449);e.exports=function(e,t){return function(n,s){var l=a(n)?i:r,u=t?t():{};return l(n,e,o(s,2),u)}}},2002:(e,t,n)=>{var i=n(170);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:i},2012:(e,t,n)=>{var i=n(9516),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(i.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=i.trim(e.slice(0,o)).toLowerCase(),n=i.trim(e.slice(o+1)),t){if(a[t]&&r.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},2013:(e,t,n)=>{var i=n(3360),r=n(2e3),o=Object.prototype.hasOwnProperty,a=r(function(e,t,n){o.call(e,n)?e[n].push(t):i(e,n,[t])});e.exports=a},2032:(e,t,n)=>{var i=n(1042);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},2036:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(1,arguments);var n=(0,i.default)(e),s=n.getUTCFullYear(),l=t||{},u=l.locale,c=u&&u.options&&u.options.firstWeekContainsDate,d=null==c?1:(0,a.default)(c),h=null==l.firstWeekContainsDate?d:(0,a.default)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var f=(0,o.default)(p,t),g=new Date(0);g.setUTCFullYear(s,0,h),g.setUTCHours(0,0,0,0);var m=(0,o.default)(g,t);return n.getTime()>=f.getTime()?s+1:n.getTime()>=m.getTime()?s:s-1};var i=s(n(5039)),r=s(n(427)),o=s(n(930)),a=s(n(9784));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2054:e=>{var t="\\ud800-\\udfff",n="["+t+"]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+i+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+l+")*"),d="(?:"+[o+i+"?",i,a,s,n].join("|")+")",h=RegExp(r+"(?="+r+")|"+d+c,"g");e.exports=function(e){return e.match(h)||[]}},2193:(e,t,n)=>{var i=n(8984),r=n(5861),o=n(2428),a=n(6449),s=n(4894),l=n(3656),u=n(5527),c=n(7167),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||o(e)))return!e.length;var t=r(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!i(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var i=n(4528),r=n(6449);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},2224:(e,t,n)=>{var i=n(104);e.exports=function(e){var t=i(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2225:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",s="\\d+",l="["+n+"]",u="["+i+"]",c="[^"+t+o+s+n+i+r+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+r+"]",f="(?:"+u+"|"+c+")",g="(?:"+p+"|"+c+")",m="(?:['’](?:d|ll|m|re|s|t|ve))?",y="(?:['’](?:D|LL|M|RE|S|T|VE))?",b="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?",w=v+b+("(?:\\u200d(?:"+["[^"+t+"]",d,h].join("|")+")"+v+b+")*"),C="(?:"+[l,d,h].join("|")+")"+w,x=RegExp([p+"?"+u+"+"+m+"(?="+[a,p,"$"].join("|")+")",g+"+"+y+"(?="+[a,p+f,"$"].join("|")+")",p+"?"+f+"+"+m,p+"+"+y,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,C].join("|"),"g");e.exports=function(e){return e.match(x)||[]}},2428:(e,t,n)=>{var i=n(7534),r=n(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},2429:(e,t,n)=>{var i=n(909);e.exports=function(e,t,n,r){return i(e,function(e,i,o){t(r,e,n(e),o)}),r}},2461:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(n(1287)),r=l(n(4994)),o=l(n(6376)),a=l(n(2568)),s=l(n(5024));function l(e){return e&&e.__esModule?e:{default:e}}var u={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:o.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=u,e.exports=t.default},2485:(e,t)=>{var n;!function(){var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)i.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},2505:(e,t,n)=>{e.exports=n(8015)},2507:(e,t,n)=>{var i=n(8754),r=n(9698),o=n(3912),a=n(3222);e.exports=function(e){return function(t){t=a(t);var n=r(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?i(n,1).join(""):t.slice(1);return s[e]()+l}}},2552:(e,t,n)=>{var i=n(1873),r=n(659),o=n(9350),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):o(e)}},2568:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(1545))&&i.__esModule?i:{default:i};var o={ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};t.default=o,e.exports=t.default},2651:(e,t,n)=>{var i=n(4218);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:(e,t,n)=>{var i=n(1042),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},2804:(e,t,n)=>{var i=n(6110)(n(9325),"Promise");e.exports=i},2881:(e,t,n)=>{var i=n(9516),r=n(7412);e.exports=function(e,t,n,o){var a=this||r;return i.forEach(o,function(i){e=i.call(a,e,t,n)}),e}},2949:(e,t,n)=>{var i=n(2651);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},3040:(e,t,n)=>{var i=n(1549),r=n(79),o=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},3076:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t};var i=o(n(5039)),r=o(n(427));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},3191:(e,t,n)=>{var i=n(8563);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,i=new Promise(function(e){n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,r,o){n.reason||(n.reason=new i(e,r,o),t(n.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},r.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},3221:e=>{e.exports=function(e){return function(t,n,i){for(var r=-1,o=Object(t),a=i(t),s=a.length;s--;){var l=a[e?s:++r];if(!1===n(o[l],l,o))break}return t}}},3222:(e,t,n)=>{var i=n(7556);e.exports=function(e){return null==e?"":i(e)}},3243:(e,t,n)=>{var i=n(6110),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},3345:e=>{e.exports=function(){return[]}},3360:(e,t,n)=>{var i=n(3243);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3471:(e,t,n)=>{var i=n(9516);function r(){this.handlers=[]}r.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.clear=function(){this.handlers&&(this.handlers=[])},r.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},3488:e=>{e.exports=function(e){return e}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},3650:(e,t,n)=>{var i=n(4335)(Object.keys,Object);e.exports=i},3656:(e,t,n)=>{e=n.nmd(e);var i=n(9325),r=n(9935),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||r;e.exports=l},3661:(e,t,n)=>{var i=n(3040),r=n(7670),o=n(289),a=n(4509),s=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},3663:(e,t,n)=>{var i=n(1799),r=n(776),o=n(7197);e.exports=function(e){var t=r(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3729:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},3786:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(t);return(0,r.default)(e,-n)};var i=a(n(9784)),r=a(n(5011)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3864:e=>{e.exports=function(e){return!(!e||!e.__CANCEL__)}},3912:(e,t,n)=>{var i=n(1074),r=n(9698),o=n(2054);e.exports=function(e){return r(e)?o(e):i(e)}},3916:(e,t,n)=>{var i=n(3360),r=n(641),o=n(5389);e.exports=function(e,t){var n={};return t=o(t,3),r(e,function(e,r,o){i(n,r,t(e,r,o))}),n}},3945:e=>{e.exports=function(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var a=e[r];t(i,a,n(a),e)}return i}},3948:(e,t,n)=>{var i=n(9516);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(r)&&s.push("path="+r),i.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},3950:e=>{e.exports=function(){}},4058:(e,t,n)=>{var i=n(4792),r=n(5539)(function(e,t,n){return t=t.toLowerCase(),e+(n?i(t):t)});e.exports=r},4124:(e,t,n)=>{var i=n(5539)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=i},4202:(e,t,n)=>{var i=n(9516);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},4298:(e,t,n)=>{var i=n(9516);e.exports=function(e){function t(e,n,r,o){var a=e[o++];if("__proto__"===a)return!0;var s=Number.isFinite(+a),l=o>=e.length;return a=!a&&i.isArray(r)?r.length:a,l?(i.hasOwnProperty(r,a)?r[a]=[r[a],n]:r[a]=n,!s):(r[a]&&i.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&i.isArray(r[a])&&(r[a]=function(e){var t,n,i={},r=Object.keys(e),o=r.length;for(t=0;t<o;t++)i[n=r[t]]=e[n];return i}(r[a])),!s)}if(i.isFormData(e)&&i.isFunction(e.entries)){var n={};return i.forEachEntry(e,function(e,r){t(function(e){return i.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),r,n,0)}),n}return null}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4394:(e,t,n)=>{var i=n(2552),r=n(346);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},4490:(e,t,n)=>{var i=n(9516),r=n(2881),o=n(3864),a=n(7412),s=n(8563),l=n(7018);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,null,e.transformRequest),l(e.headers,"Accept"),l(e.headers,"Content-Type"),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return u(e),t.data=r.call(e,t.data,t.headers,t.status,e.transformResponse),t},function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)})}},4509:(e,t,n)=>{var i=n(2651);e.exports=function(e){return i(this,e).has(e)}},4528:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},4552:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},4647:(e,t,n)=>{var i=n(4552)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=i},4664:(e,t,n)=>{var i=n(9770),r=n(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),i(a(e),function(t){return o.call(e,t)}))}:r;e.exports=s},4680:e=>{e.exports=function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},4739:(e,t,n)=>{var i=n(6025);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},4792:(e,t,n)=>{var i=n(3222),r=n(5808);e.exports=function(e){return r(i(e).toLowerCase())}},4840:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},4841:(e,t,n)=>{var i=n(9641).version,r=n(5845),o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var a={};o.transitional=function(e,t,n){return function(o,s,l){if(!1===e)throw new r(function(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(s," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!a[s]&&(a[s]=!0),!e||e(o,s,l)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),o=i.length;o-- >0;){var a=i[o],s=t[a];if(s){var l=e[a],u=void 0===l||s(l,a,e);if(!0!==u)throw new r("option "+a+" must be "+u,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+a,r.ERR_BAD_OPTION)}},validators:o}},4894:(e,t,n)=>{var i=n(1882),r=n(294);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},4896:e=>{e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},4901:(e,t,n)=>{var i=n(2552),r=n(294),o=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!a[i(e)]}},4932:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},4994:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(9059))&&i.__esModule?i:{default:i};var o={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=o,e.exports=t.default},5011:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,r.default)(e).getTime(),a=(0,i.default)(t);return new Date(n+a)};var i=a(n(9784)),r=a(n(5039)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5019:(e,t,n)=>{var i=n(9516);e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},5024:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(663));function r(e){return e&&e.__esModule?e:{default:e}}var o={ordinalNumber:(0,r(n(311)).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,i.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,i.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};t.default=o,e.exports=t.default},5039:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)};var i,r=(i=n(427))&&i.__esModule?i:{default:i};e.exports=t.default},5042:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(521)),r=c(n(9638)),o=c(n(5891)),a=c(n(85)),s=c(n(2036)),l=c(n(8963)),u=c(n(620));function c(e){return e&&e.__esModule?e:{default:e}}var d="midnight",h="noon",p="morning",f="afternoon",g="evening",m="night",y={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,i){var r=(0,s.default)(e,i),o=r>0?r:1-r;if("YY"===t){var a=o%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):(0,l.default)(o,t.length)},R:function(e,t){var n=(0,o.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return(0,l.default)(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return(0,l.default)(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return(0,l.default)(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=(0,a.default)(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):(0,l.default)(r,t.length)},I:function(e,t,n){var i=(0,r.default)(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var r=(0,i.default)(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):(0,l.default)(r,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return(0,l.default)(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return(0,l.default)(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return(0,l.default)(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,r=e.getUTCHours();switch(i=12===r?h:0===r?d:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,r=e.getUTCHours();switch(i=r>=17?g:r>=12?f:r>=4?p:m,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return v(r);case"XXXX":case"XX":return w(r);default:return w(r,":")}},x:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return v(r);case"xxxx":case"xx":return w(r);default:return w(r,":")}},O:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b(r,":");default:return"GMT"+w(r,":")}},z:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b(r,":");default:return"GMT"+w(r,":")}},t:function(e,t,n,i){var r=i._originalDate||e,o=Math.floor(r.getTime()/1e3);return(0,l.default)(o,t.length)},T:function(e,t,n,i){var r=(i._originalDate||e).getTime();return(0,l.default)(r,t.length)}};function b(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+(0,l.default)(o,2)}function v(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):w(e,t)}function w(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+(0,l.default)(Math.floor(r/60),2)+n+(0,l.default)(r%60,2)}var C=y;t.default=C,e.exports=t.default},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},5072:e=>{var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var o={},a=[],s=0;s<e.length;s++){var l=e[s],u=i.base?l[0]+i.base:l[0],c=o[u]||0,d="".concat(u," ").concat(c);o[u]=c+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=r(p,i);i.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function r(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var o=i(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var l=i(e,r),u=0;u<o.length;u++){var c=n(o[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},5083:(e,t,n)=>{var i=n(1882),r=n(7296),o=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?h:s).test(a(e))}},5102:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)};var i,r=(i=n(427))&&i.__esModule?i:{default:i};e.exports=t.default},5155:(e,t,n)=>{var i=n(9516),r=n(9106),o=n(3471),a=n(4490),s=n(5343),l=n(9615),u=n(4841),c=u.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=t.paramsSerializer;null!=r&&(i.isFunction(r)?t.paramsSerializer={serialize:r}:u.assertOptions(r,{encode:c.function,serialize:c.function},!0));var o=[],l=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});var d,h=[];if(this.interceptors.response.forEach(function(e){h.push(e.fulfilled,e.rejected)}),!l){var p=[a,void 0];for(Array.prototype.unshift.apply(p,o),p=p.concat(h),d=Promise.resolve(t);p.length;)d=d.then(p.shift(),p.shift());return d}for(var f=t;o.length;){var g=o.shift(),m=o.shift();try{f=g(f)}catch(e){m(e);break}}try{d=a(f)}catch(e){return Promise.reject(e)}for(;h.length;)d=d.then(h.shift(),h.shift());return d},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url,e.allowAbsoluteUrls);return r(t,e.params,e.paramsSerializer)},i.forEach(["delete","get","head","options"],function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),i.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,r){return this.request(s(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)}),e.exports=d},5160:e=>{e.exports=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i<r;)o[i]=e[i+t];return o}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5343:(e,t,n)=>{var i=n(9516);e.exports=function(e,t){t=t||{};var n={};function r(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isEmptyObject(t)?i.merge({},e):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function o(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function a(e){if(!i.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function l(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return i.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=u[e]||o,r=t(e);i.isUndefined(r)&&t!==l||(n[e]=r)}),n}},5389:(e,t,n)=>{var i=n(3663),r=n(7978),o=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?r(e[0],e[1]):i(e):s(e)}},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5481:(e,t,n)=>{var i=n(9325)["__core-js_shared__"];e.exports=i},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5539:(e,t,n)=>{var i=n(882),r=n(828),o=n(6645),a=RegExp("['’]","g");e.exports=function(e){return function(t){return i(o(r(t).replace(a,"")),e,"")}}},5541:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(1601),r=n.n(i),o=n(6314),a=n.n(o)()(r());a.push([e.id,"@media screen and (min-width: 767px) {\n .meetelise-chat.pane.launcher__desktop {\n right: -32px;\n }\n}\n",""]);const s=a},5580:(e,t,n)=>{var i=n(6110)(n(9325),"DataView");e.exports=i},5592:(e,t,n)=>{var i=n(9516),r=n(7522),o=n(3948),a=n(9106),s=n(9615),l=n(2012),u=n(4202),c=n(4896),d=n(5845),h=n(8563),p=n(5656),f=n(5721);e.exports=function(e){return new Promise(function(t,n){var g,m=e.data,y=e.headers,b=e.responseType,v=e.withXSRFToken;function w(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}i.isFormData(m)&&i.isStandardBrowserEnv()&&delete y["Content-Type"];var C=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(x+":"+A)}var S=s(e.baseURL,e.url,e.allowAbsoluteUrls);function E(){if(C){var i="getAllResponseHeaders"in C?l(C.getAllResponseHeaders()):null,o={data:b&&"text"!==b&&"json"!==b?C.response:C.responseText,status:C.status,statusText:C.statusText,headers:i,config:e,request:C};r(function(e){t(e),w()},function(e){n(e),w()},o),C=null}}if(C.open(e.method.toUpperCase(),a(S,e.params,e.paramsSerializer),!0),C.timeout=e.timeout,"onloadend"in C?C.onloadend=E:C.onreadystatechange=function(){C&&4===C.readyState&&(0!==C.status||C.responseURL&&0===C.responseURL.indexOf("file:"))&&setTimeout(E)},C.onabort=function(){C&&(n(new d("Request aborted",d.ECONNABORTED,e,C)),C=null)},C.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,C)),C=null},C.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,i.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,C)),C=null},i.isStandardBrowserEnv()&&(v&&i.isFunction(v)&&(v=v(e)),v||!1!==v&&u(S))){var T=e.xsrfHeaderName&&e.xsrfCookieName&&o.read(e.xsrfCookieName);T&&(y[e.xsrfHeaderName]=T)}"setRequestHeader"in C&&i.forEach(y,function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete y[t]:C.setRequestHeader(t,e)}),i.isUndefined(e.withCredentials)||(C.withCredentials=!!e.withCredentials),b&&"json"!==b&&(C.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&C.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&C.upload&&C.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(g=function(t){C&&(n(!t||t.type?new h(null,e,C):t),C.abort(),C=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g))),m||!1===m||0===m||""===m||(m=null);var k=p(S);k&&-1===f.protocols.indexOf(k)?n(new d("Unsupported protocol "+k+":",d.ERR_BAD_REQUEST,e)):C.send(m)})}},5656:e=>{e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},5721:(e,t,n)=>{e.exports=n(9490)},5749:(e,t,n)=>{var i=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},5808:(e,t,n)=>{var i=n(2507)("toUpperCase");e.exports=i},5816:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(1,arguments),!(0,i.default)(e)&&"number"!=typeof e)return!1;var t=(0,r.default)(e);return!isNaN(Number(t))};var i=a(n(5102)),r=a(n(5039)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5845:(e,t,n)=>{var i=n(9516);function r(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}i.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=r.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(r,a),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=function(e,t,n,a,s,l){var u=Object.create(o);return i.toFlatObject(e,u,function(e){return e!==Error.prototype}),r.call(u,e.message,t,n,a,s),u.cause=e,u.name=e.name,l&&Object.assign(u,l),u},e.exports=r},5861:(e,t,n)=>{var i=n(5580),r=n(8223),o=n(2804),a=n(6545),s=n(8303),l=n(2552),u=n(7473),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(i),m=u(r),y=u(o),b=u(a),v=u(s),w=l;(i&&w(new i(new ArrayBuffer(1)))!=f||r&&w(new r)!=c||o&&w(o.resolve())!=d||a&&w(new a)!=h||s&&w(new s)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return f;case m:return c;case y:return d;case b:return h;case v:return p}return t}),e.exports=w},5891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,o.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,o.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var i=a(n(5039)),r=a(n(427)),o=a(n(3076));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5911:(e,t,n)=>{var i=n(8859),r=n(4248),o=n(9219);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var y=e[f],b=t[f];if(a)var v=u?a(b,y,f,t,e,l):a(y,b,f,e,t,l);if(void 0!==v){if(v)continue;g=!1;break}if(m){if(!r(t,function(e,t){if(!o(m,t)&&(y===e||s(y,e,n,a,l)))return m.push(t)})){g=!1;break}}else if(y!==b&&!s(y,b,n,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},5950:(e,t,n)=>{var i=n(695),r=n(8984),o=n(4894);e.exports=function(e){return o(e)?i(e):r(e)}},6009:(e,t,n)=>{e=n.nmd(e);var i=n(4840),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&i.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6025:(e,t,n)=>{var i=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},6069:(e,t,n)=>{var i=n(9516),r=n(6440),o=n(5721);e.exports=function(e,t){return r(e,new o.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return o.isNode&&i.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}},6110:(e,t,n)=>{var i=n(5083),r=n(392);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,i,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);i&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},6353:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){(0,h.default)(2,arguments);var p=String(t),v=n||{},w=v.locale||r.default,C=w.options&&w.options.firstWeekContainsDate,x=null==C?1:(0,d.default)(C),A=null==v.firstWeekContainsDate?x:(0,d.default)(v.firstWeekContainsDate);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=w.options&&w.options.weekStartsOn,E=null==S?0:(0,d.default)(S),T=null==v.weekStartsOn?E:(0,d.default)(v.weekStartsOn);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var k=(0,a.default)(e);if(!(0,i.default)(k))throw new RangeError("Invalid time value");var _=(0,u.default)(k),O=(0,o.default)(k,_),P={firstWeekContainsDate:A,weekStartsOn:T,locale:w,_originalDate:k},M=p.match(g).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,l.default[t])(e,w.formatLong,P):e}).join("").match(f).map(function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return n.match(m)[1].replace(y,"'");var r=s.default[i];if(r)return!v.useAdditionalWeekYearTokens&&(0,c.isProtectedWeekYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),!v.useAdditionalDayOfYearTokens&&(0,c.isProtectedDayOfYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),r(O,n,w.localize,P);if(i.match(b))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("");return M};var i=p(n(5816)),r=p(n(2461)),o=p(n(3786)),a=p(n(5039)),s=p(n(5042)),l=p(n(6680)),u=p(n(9720)),c=n(9417),d=p(n(9784)),h=p(n(427));function p(e){return e&&e.__esModule?e:{default:e}}var f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,y=/''/g,b=/[a-zA-Z]/;e.exports=t.default},6376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(e,t,i,r){return n[e]};t.default=i,e.exports=t.default},6440:(e,t,n)=>{var i=n(9516),r=n(5845),o=n(786);function a(e){return i.isPlainObject(e)||i.isArray(e)}function s(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function l(e,t,n){return e?e.concat(t).map(function(e,t){return e=s(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var u=i.toFlatObject(i,{},null,function(e){return/^is[A-Z]/.test(e)});e.exports=function(e,t,n){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new(o||FormData);var c,d=(n=i.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!i.isUndefined(t[e])})).metaTokens,h=n.visitor||y,p=n.dots,f=n.indexes,g=(n.Blob||"undefined"!=typeof Blob&&Blob)&&((c=t)&&i.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator]);if(!i.isFunction(h))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(i.isDate(e))return e.toISOString();if(!g&&i.isBlob(e))throw new r("Blob is not supported. Use a Buffer instead.");return i.isArrayBuffer(e)||i.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function y(e,n,r){var o=e;if(e&&!r&&"object"==typeof e)if(i.endsWith(n,"{}"))n=d?n:n.slice(0,-2),e=JSON.stringify(e);else if(i.isArray(e)&&function(e){return i.isArray(e)&&!e.some(a)}(e)||i.isFileList(e)||i.endsWith(n,"[]")&&(o=i.toArray(e)))return n=s(n),o.forEach(function(e,r){!i.isUndefined(e)&&null!==e&&t.append(!0===f?l([n],r,p):null===f?n:n+"[]",m(e))}),!1;return!!a(e)||(t.append(l(r,n,p),m(e)),!1)}var b=[],v=Object.assign(u,{defaultVisitor:y,convertValue:m,isVisitable:a});if(!i.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!i.isUndefined(n)){if(-1!==b.indexOf(n))throw Error("Circular reference detected in "+r.join("."));b.push(n),i.forEach(n,function(n,o){!0===(!(i.isUndefined(n)||null===n)&&h.call(t,n,i.isString(o)?o.trim():o,r,v))&&e(n,r?r.concat(o):[o])}),b.pop()}}(e),t}},6449:e=>{var t=Array.isArray;e.exports=t},6545:(e,t,n)=>{var i=n(6110)(n(9325),"Set");e.exports=i},6645:(e,t,n)=>{var i=n(1733),r=n(5434),o=n(3222),a=n(2225);e.exports=function(e,t,n){return e=o(e),void 0===(t=n?void 0:t)?r(e)?a(e):i(e):e.match(t)||[]}},6649:(e,t,n)=>{var i=n(3221)();e.exports=i},6680:(e,t)=>{function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={p:i,P:function(e,t){var r,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",n(a,t)).replace("{{time}}",i(s,t))}},o=r;t.default=o,e.exports=t.default},6721:(e,t,n)=>{var i=n(1042),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},7018:(e,t,n)=>{var i=n(9516);e.exports=function(e,t){i.forEach(e,function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])})}},7035:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)({},e)};var i,r=(i=n(7390))&&i.__esModule?i:{default:i};e.exports=t.default},7068:(e,t,n)=>{var i=n(7217),r=n(5911),o=n(1986),a=n(689),s=n(5861),l=n(6449),u=n(3656),c=n(7167),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var b=l(e),v=l(t),w=b?h:s(e),C=v?h:s(t),x=(w=w==d?p:w)==p,A=(C=C==d?p:C)==p,S=w==C;if(S&&u(e)){if(!u(t))return!1;b=!0,x=!1}if(S&&!x)return y||(y=new i),b||c(e)?r(e,t,n,g,m,y):o(e,t,w,n,g,m,y);if(!(1&n)){var E=x&&f.call(e,"__wrapped__"),T=A&&f.call(t,"__wrapped__");if(E||T){var k=E?e.value():e,_=T?t.value():t;return y||(y=new i),m(k,_,n,g,y)}}return!!S&&(y||(y=new i),a(e,t,n,g,m,y))}},7167:(e,t,n)=>{var i=n(4901),r=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?r(a):i;e.exports=s},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},7217:(e,t,n)=>{var i=n(79),r=n(1420),o=n(938),a=n(3605),s=n(9817),l=n(945);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,n)=>{var i=n(7422);e.exports=function(e){return function(t){return i(t,e)}}},7296:(e,t,n)=>{var i,r=n(5481),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7390:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},e.exports=t.default},7412:(e,t,n)=>{var i=n(9516),r=n(7018),o=n(5845),a=n(4896),s=n(6440),l=n(6069),u=n(5721),c=n(4298),d={"Content-Type":"application/x-www-form-urlencoded"};function h(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var p,f={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(p=n(5592)),p),transformRequest:[function(e,t){r(t,"Accept"),r(t,"Content-Type");var n,o=t&&t["Content-Type"]||"",a=o.indexOf("application/json")>-1,u=i.isObject(e);if(u&&i.isHTMLForm(e)&&(e=new FormData(e)),i.isFormData(e))return a?JSON.stringify(c(e)):e;if(i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return h(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(u){if(-1!==o.indexOf("application/x-www-form-urlencoded"))return l(e,this.formSerializer).toString();if((n=i.isFileList(e))||o.indexOf("multipart/form-data")>-1){var d=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,d&&new d,this.formSerializer)}}return u||a?(h(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&i.isString(e)&&(n&&!this.responseType||r)){var a=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:u.classes.FormData,Blob:u.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],function(e){f.headers[e]={}}),i.forEach(["post","put","patch"],function(e){f.headers[e]=i.merge(d)}),e.exports=f},7422:(e,t,n)=>{var i=n(1769),r=n(7797);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7522:(e,t,n)=>{var i=n(5845);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new i("Request failed with status code "+n.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},7534:(e,t,n)=>{var i=n(2552),r=n(346);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},7556:(e,t,n)=>{var i=n(1873),r=n(4932),o=n(6449),a=n(4394),s=i?i.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7659:e=>{var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},7670:(e,t,n)=>{var i=n(2651);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},7674:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,i.default)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,r.default)(n)};var i=a(n(5891)),r=a(n(3076)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},7797:(e,t,n)=>{var i=n(4394);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7825:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},7828:(e,t,n)=>{var i=n(9325).Uint8Array;e.exports=i},7978:(e,t,n)=>{var i=n(270),r=n(8156),o=n(631),a=n(8586),s=n(756),l=n(7197),u=n(7797);e.exports=function(e,t){return a(e)&&s(t)?l(u(e),t):function(n){var a=r(n,e);return void 0===a&&a===t?o(n,e):i(t,a,3)}}},7980:e=>{e.exports=function(e){return function(t){return e.apply(null,t)}}},8015:(e,t,n)=>{var i=n(9516),r=n(9012),o=n(5155),a=n(5343),s=n(7412),l=n(4298);var u=function e(t){var n=new o(t),s=r(o.prototype.request,n);return i.extend(s,o.prototype,n),i.extend(s,n),s.create=function(n){return e(a(t,n))},s}(s);u.Axios=o,u.CanceledError=n(8563),u.CancelToken=n(3191),u.isCancel=n(3864),u.VERSION=n(9641).version,u.toFormData=n(6440),u.AxiosError=n(5845),u.Cancel=u.CanceledError,u.all=function(e){return Promise.all(e)},u.spread=n(7980),u.isAxiosError=n(5019),u.formToJSON=function(e){return l(i.isHTMLForm(e)?new FormData(e):e)},e.exports=u,e.exports.default=u},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8096:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},8156:(e,t,n)=>{var i=n(7422);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},8223:(e,t,n)=>{var i=n(6110)(n(9325),"Map");e.exports=i},8303:(e,t,n)=>{var i=n(6110)(n(9325),"WeakMap");e.exports=i},8329:(e,t,n)=>{var i=n(4894);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==r(s[a],a,s););return n}}},8563:(e,t,n)=>{var i=n(5845);function r(e,t,n){i.call(this,null==e?"canceled":e,i.ERR_CANCELED,t,n),this.name="CanceledError"}n(9516).inherits(r,i,{__CANCEL__:!0}),e.exports=r},8586:(e,t,n)=>{var i=n(6449),r=n(4394),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},8655:(e,t,n)=>{var i=n(6025);e.exports=function(e){return i(this.__data__,e)>-1}},8754:(e,t,n)=>{var i=n(5160);e.exports=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:i(e,t,n)}},8805:function(e,t,n){e.exports=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function r(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function o(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}function a(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function u(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function d(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),t}var h={exports:{}};!function(e){!function(t,n){var i=Math.pow(2,-24),r=Math.pow(2,32),o=Math.pow(2,53),a={encode:function(e){var t,i=new ArrayBuffer(256),a=new DataView(i),s=0;function l(e){for(var n=i.byteLength,r=s+e;n<r;)n*=2;if(n!==i.byteLength){var o=a;i=new ArrayBuffer(n),a=new DataView(i);for(var l=s+3>>2,u=0;u<l;++u)a.setUint32(4*u,o.getUint32(4*u))}return t=e,a}function u(){s+=t}function c(e){u(l(1).setUint8(s,e))}function d(e){for(var t=l(e.length),n=0;n<e.length;++n)t.setUint8(s+n,e[n]);u()}function h(e,t){t<24?c(e<<5|t):t<256?(c(e<<5|24),c(t)):t<65536?(c(e<<5|25),function(e){u(l(2).setUint16(s,e))}(t)):t<4294967296?(c(e<<5|26),function(e){u(l(4).setUint32(s,e))}(t)):(c(e<<5|27),function(e){var t=e%r,n=(e-t)/r,i=l(8);i.setUint32(s,n),i.setUint32(s+4,t),u()}(t))}if(function e(t){var i;if(!1===t)return c(244);if(!0===t)return c(245);if(null===t)return c(246);if(t===n)return c(247);switch(typeof t){case"number":if(Math.floor(t)===t){if(0<=t&&t<=o)return h(0,t);if(-o<=t&&t<0)return h(1,-(t+1))}return c(251),function(e){u(l(8).setFloat64(s,e))}(t);case"string":var r=[];for(i=0;i<t.length;++i){var a=t.charCodeAt(i);a<128?r.push(a):a<2048?(r.push(192|a>>6),r.push(128|63&a)):a<55296?(r.push(224|a>>12),r.push(128|a>>6&63),r.push(128|63&a)):(a=(1023&a)<<10,a|=1023&t.charCodeAt(++i),a+=65536,r.push(240|a>>18),r.push(128|a>>12&63),r.push(128|a>>6&63),r.push(128|63&a))}return h(3,r.length),d(r);default:var p;if(Array.isArray(t))for(h(4,p=t.length),i=0;i<p;++i)e(t[i]);else if(t instanceof Uint8Array)h(2,t.length),d(t);else{var f=Object.keys(t);for(h(5,p=f.length),i=0;i<p;++i){var g=f[i];e(g),e(t[g])}}}}(e),"slice"in i)return i.slice(0,s);for(var p=new ArrayBuffer(s),f=new DataView(p),g=0;g<s;++g)f.setUint8(g,a.getUint8(g));return p},decode:function(e,t,o){var a=new DataView(e),s=0;function l(e,t){return s+=t,e}function u(t){return l(new Uint8Array(e,s,t),t)}function c(){return l(a.getUint8(s),1)}function d(){return l(a.getUint16(s),2)}function h(){return l(a.getUint32(s),4)}function p(){return 255===a.getUint8(s)&&(s+=1,!0)}function f(e){if(e<24)return e;if(24===e)return c();if(25===e)return d();if(26===e)return h();if(27===e)return h()*r+h();if(31===e)return-1;throw"Invalid length encoding"}function g(e){var t=c();if(255===t)return-1;var n=f(31&t);if(n<0||t>>5!==e)throw"Invalid indefinite length element";return n}function m(e,t){for(var n=0;n<t;++n){var i=c();128&i&&(i<224?(i=(31&i)<<6|63&c(),t-=1):i<240?(i=(15&i)<<12|(63&c())<<6|63&c(),t-=2):(i=(15&i)<<18|(63&c())<<12|(63&c())<<6|63&c(),t-=3)),i<65536?e.push(i):(i-=65536,e.push(55296|i>>10),e.push(56320|1023&i))}}"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof o&&(o=function(){return n});var y=function e(){var r,h,y=c(),b=y>>5,v=31&y;if(7===b)switch(v){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),n=d(),r=32768&n,o=31744&n,a=1023&n;if(31744===o)o=261120;else if(0!==o)o+=114688;else if(0!==a)return a*i;return t.setUint32(0,r<<16|o<<13|a<<13),t.getFloat32(0)}();case 26:return l(a.getFloat32(s),4);case 27:return l(a.getFloat64(s),8)}if((h=f(v))<0&&(b<2||6<b))throw"Invalid length";switch(b){case 0:return h;case 1:return-1-h;case 2:if(h<0){for(var w=[],C=0;(h=g(b))>=0;)C+=h,w.push(u(h));var x=new Uint8Array(C),A=0;for(r=0;r<w.length;++r)x.set(w[r],A),A+=w[r].length;return x}return u(h);case 3:var S=[];if(h<0)for(;(h=g(b))>=0;)m(S,h);else m(S,h);return String.fromCharCode.apply(null,S);case 4:var E;if(h<0)for(E=[];!p();)E.push(e());else for(E=new Array(h),r=0;r<h;++r)E[r]=e();return E;case 5:var T={};for(r=0;r<h||h<0&&!p();++r)T[e()]=e();return T;case 6:return t(e(),h);case 7:switch(h){case 20:return!1;case 21:return!0;case 22:return null;case 23:return n;default:return o(h)}}}();if(s!==e.byteLength)throw"Remaining bytes";return y}};e.exports?e.exports=a:t.CBOR||(t.CBOR=a)}(c)}(h);var p=h.exports,f={exports:{}};!function(e,t){!function(e){var t="0.1.0",n={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function i(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}function r(e,t){var i=n[t||"all"];return i&&i.test(e)||!1}i.isUUID=r,i.VERSION=t,e.uuid=i,e.isUUID=r}(t),null!==e&&(e.exports=t.uuid)}(f,f.exports);var g=f.exports,m=function(){return g.uuid?g.uuid():g()},y=function(){function e(e){var t,n,i,r,o=e.setup;if(this._PNSDKSuffix={},this.instanceId="pn-".concat(m()),this.secretKey=o.secretKey||o.secret_key,this.subscribeKey=o.subscribeKey||o.subscribe_key,this.publishKey=o.publishKey||o.publish_key,this.sdkName=o.sdkName,this.sdkFamily=o.sdkFamily,this.partnerId=o.partnerId,this.setAuthKey(o.authKey),this.cryptoModule=o.cryptoModule,this.setFilterExpression(o.filterExpression),"string"!=typeof o.origin&&!Array.isArray(o.origin)&&void 0!==o.origin)throw new Error("Origin must be either undefined, a string or a list of strings.");if(this.origin=o.origin||Array.from({length:20},function(e,t){return"ps".concat(t+1,".pndsn.com")}),this.secure=o.ssl||!1,this.restore=o.restore||!1,this.proxy=o.proxy,this.keepAlive=o.keepAlive,this.keepAliveSettings=o.keepAliveSettings,this.autoNetworkDetection=o.autoNetworkDetection||!1,this.dedupeOnSubscribe=o.dedupeOnSubscribe||!1,this.maximumCacheSize=o.maximumCacheSize||100,this.customEncrypt=o.customEncrypt,this.customDecrypt=o.customDecrypt,this.fileUploadPublishRetryLimit=null!==(t=o.fileUploadPublishRetryLimit)&&void 0!==t?t:5,this.useRandomIVs=null===(n=o.useRandomIVs)||void 0===n||n,this.enableEventEngine=null!==(i=o.enableEventEngine)&&void 0!==i&&i,this.maintainPresenceState=null===(r=o.maintainPresenceState)||void 0===r||r,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=o.logVerbosity||!1,this.suppressLeaveEvents=o.suppressLeaveEvents||!1,this.announceFailedHeartbeats=o.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=o.announceSuccessfulHeartbeats||!1,this.useInstanceId=o.useInstanceId||!1,this.useRequestId=o.useRequestId||!1,this.requestMessageCountThreshold=o.requestMessageCountThreshold,o.retryConfiguration&&this._setRetryConfiguration(o.retryConfiguration),this.setTransactionTimeout(o.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(o.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(o.useSendBeacon||!0),o.presenceTimeout?this.setPresenceTimeout(o.presenceTimeout):this._presenceTimeout=300,null!=o.heartbeatInterval&&this.setHeartbeatInterval(o.heartbeatInterval),"string"==typeof o.userId){if("string"==typeof o.uuid)throw new Error("Only one of the following configuration options has to be provided: `uuid` or `userId`");this.setUserId(o.userId)}else{if("string"!=typeof o.uuid)throw new Error("One of the following configuration options has to be provided: `uuid` or `userId`");this.setUUID(o.uuid)}this.setCipherKey(o.cipherKey,o)}return e.prototype.getAuthKey=function(){return this.authKey},e.prototype.setAuthKey=function(e){return this.authKey=e,this},e.prototype.setCipherKey=function(e,t,n){var i;return this.cipherKey=e,this.cipherKey&&(this.cryptoModule=null!==(i=t.cryptoModule)&&void 0!==i?i:t.initCryptoModule({cipherKey:this.cipherKey,useRandomIVs:this.useRandomIVs}),n&&(n.cryptoModule=this.cryptoModule)),this},e.prototype.getUUID=function(){return this.UUID},e.prototype.setUUID=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing uuid parameter. Provide a valid string uuid");return this.UUID=e,this},e.prototype.getUserId=function(){return this.UUID},e.prototype.setUserId=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");return this.UUID=e,this},e.prototype.getFilterExpression=function(){return this.filterExpression},e.prototype.setFilterExpression=function(e){return this.filterExpression=e,this},e.prototype.getPresenceTimeout=function(){return this._presenceTimeout},e.prototype.setPresenceTimeout=function(e){return this._presenceTimeout=e>=20?e:20,this.setHeartbeatInterval(this._presenceTimeout/2-1),this},e.prototype.setProxy=function(e){this.proxy=e},e.prototype.getHeartbeatInterval=function(){return this._heartbeatInterval},e.prototype.setHeartbeatInterval=function(e){return this._heartbeatInterval=e,this},e.prototype.getSubscribeTimeout=function(){return this._subscribeRequestTimeout},e.prototype.setSubscribeTimeout=function(e){return this._subscribeRequestTimeout=e,this},e.prototype.getTransactionTimeout=function(){return this._transactionalRequestTimeout},e.prototype.setTransactionTimeout=function(e){return this._transactionalRequestTimeout=e,this},e.prototype.isSendBeaconEnabled=function(){return this._useSendBeacon},e.prototype.setSendBeaconConfig=function(e){return this._useSendBeacon=e,this},e.prototype.getVersion=function(){return"7.6.3"},e.prototype._setRetryConfiguration=function(e){if(e.minimumdelay<2)throw new Error("Minimum delay can not be set less than 2 seconds for retry");if(e.maximumDelay>150)throw new Error("Maximum delay can not be set more than 150 seconds for retry");if(e.maximumDelay&&maximumRetry>6)throw new Error("Maximum retry for exponential retry policy can not be more than 6");if(e.maximumRetry>10)throw new Error("Maximum retry for linear retry policy can not be more than 10");this.retryConfiguration=e},e.prototype._addPnsdkSuffix=function(e,t){this._PNSDKSuffix[e]=t},e.prototype._getPnsdkSuffix=function(e){var t=this;return Object.keys(this._PNSDKSuffix).reduce(function(n,i){return n+e+t._PNSDKSuffix[i]},"")},e}();function b(e){var t=e.replace(/==?$/,""),n=Math.floor(t.length/4*3),i=new ArrayBuffer(n),r=new Uint8Array(i),o=0;function a(){var e=t.charAt(o++),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);if(-1===n)throw new Error("Illegal character at ".concat(o,": ").concat(t.charAt(o-1)));return n}for(var s=0;s<n;s+=3){var l=a(),u=a(),c=a(),d=a(),h=(63&l)<<2|u>>4,p=(15&u)<<4|c>>2,f=(3&c)<<6|d;r[s]=h,64!=c&&(r[s+1]=p),64!=d&&(r[s+2]=f)}return i}function v(e){for(var t,n="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(e),o=r.byteLength,a=o%3,s=o-a,l=0;l<s;l+=3)n+=i[(16515072&(t=r[l]<<16|r[l+1]<<8|r[l+2]))>>18]+i[(258048&t)>>12]+i[(4032&t)>>6]+i[63&t];return 1==a?n+=i[(252&(t=r[s]))>>2]+i[(3&t)<<4]+"==":2==a&&(n+=i[(64512&(t=r[s]<<8|r[s+1]))>>10]+i[(1008&t)>>4]+i[(15&t)<<2]+"="),n}var w,C,x,A,S,E=E||function(e){var t={},n=t.lib={},i=function(){},r=n.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=n.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var r=0;r<e;r++)t[i+r>>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(i+r)%4*8;else if(65535<n.length)for(r=0;r<e;r+=4)t[i+r>>>2]=n[r>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i<t;i+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),a=t.enc={},s=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++){var r=t[i>>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new o.init(n,t/2)}},l=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++)n.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new o.init(n,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},c=n.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,a=this.blockSize,s=r/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,r=e.min(4*t,r),t){for(var l=0;l<t;l+=a)this._doProcessBlock(i,l);l=i.splice(0,t),n.sigBytes-=r}return new o.init(l,r)},clone:function(){var e=r.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=c.extend({cfg:r.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=t.algo={};return t}(Math);!function(e){for(var t=E,n=(r=t.lib).WordArray,i=r.Hasher,r=t.algo,o=[],a=[],s=function(e){return 4294967296*(e-(0|e))|0},l=2,u=0;64>u;){var c;e:{c=l;for(var d=e.sqrt(c),h=2;h<=d;h++)if(!(c%h)){c=!1;break e}c=!0}c&&(8>u&&(o[u]=s(e.pow(l,.5))),a[u]=s(e.pow(l,1/3)),u++),l++}var p=[];r=r.SHA256=i.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var f=p[h-15],g=p[h-2];p[h]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[h-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[h-16]}f=d+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&c)+a[h]+p[h],g=((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+(i&r^i&o^r&o),d=c,c=u,u=l,l=s+f|0,s=o,o=r,r=i,i=f+g|0}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+c|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(i/4294967296),n[15+(r+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=i._createHelper(r),t.HmacSHA256=i._createHmacHelper(r)}(Math),C=(w=E).enc.Utf8,w.algo.HMAC=w.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=C.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),o=this._iKey=t.clone(),a=r.words,s=o.words,l=0;l<n;l++)a[l]^=1549556828,s[l]^=909522486;r.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}}),A=(x=E).lib.WordArray,x.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp(),e=[];for(var r=0;r<n;r+=3)for(var o=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,a=0;4>a&&r+.75*a<n;a++)e.push(i.charAt(o>>>6*(3-a)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;(i=n.charAt(64))&&-1!=(i=e.indexOf(i))&&(t=i);for(var i=[],r=0,o=0;o<t;o++)if(o%4){var a=n.indexOf(e.charAt(o-1))<<o%4*2,s=n.indexOf(e.charAt(o))>>>6-o%4*2;i[r>>>2]|=(a|s)<<24-r%4*8,r++}return A.create(i,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,n,i,r,o,a){return((e=e+(t&n|~t&i)+r+a)<<o|e>>>32-o)+t}function n(e,t,n,i,r,o,a){return((e=e+(t&i|n&~i)+r+a)<<o|e>>>32-o)+t}function i(e,t,n,i,r,o,a){return((e=e+(t^n^i)+r+a)<<o|e>>>32-o)+t}function r(e,t,n,i,r,o,a){return((e=e+(n^(t|~i))+r+a)<<o|e>>>32-o)+t}for(var o=E,a=(l=o.lib).WordArray,s=l.Hasher,l=o.algo,u=[],c=0;64>c;c++)u[c]=4294967296*e.abs(e.sin(c+1))|0;l=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,o){for(var a=0;16>a;a++){var s=e[l=o+a];e[l]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}a=this._hash.words;var l=e[o+0],c=(s=e[o+1],e[o+2]),d=e[o+3],h=e[o+4],p=e[o+5],f=e[o+6],g=e[o+7],m=e[o+8],y=e[o+9],b=e[o+10],v=e[o+11],w=e[o+12],C=e[o+13],x=e[o+14],A=e[o+15],S=t(S=a[0],k=a[1],T=a[2],E=a[3],l,7,u[0]),E=t(E,S,k,T,s,12,u[1]),T=t(T,E,S,k,c,17,u[2]),k=t(k,T,E,S,d,22,u[3]);S=t(S,k,T,E,h,7,u[4]),E=t(E,S,k,T,p,12,u[5]),T=t(T,E,S,k,f,17,u[6]),k=t(k,T,E,S,g,22,u[7]),S=t(S,k,T,E,m,7,u[8]),E=t(E,S,k,T,y,12,u[9]),T=t(T,E,S,k,b,17,u[10]),k=t(k,T,E,S,v,22,u[11]),S=t(S,k,T,E,w,7,u[12]),E=t(E,S,k,T,C,12,u[13]),T=t(T,E,S,k,x,17,u[14]),S=n(S,k=t(k,T,E,S,A,22,u[15]),T,E,s,5,u[16]),E=n(E,S,k,T,f,9,u[17]),T=n(T,E,S,k,v,14,u[18]),k=n(k,T,E,S,l,20,u[19]),S=n(S,k,T,E,p,5,u[20]),E=n(E,S,k,T,b,9,u[21]),T=n(T,E,S,k,A,14,u[22]),k=n(k,T,E,S,h,20,u[23]),S=n(S,k,T,E,y,5,u[24]),E=n(E,S,k,T,x,9,u[25]),T=n(T,E,S,k,d,14,u[26]),k=n(k,T,E,S,m,20,u[27]),S=n(S,k,T,E,C,5,u[28]),E=n(E,S,k,T,c,9,u[29]),T=n(T,E,S,k,g,14,u[30]),S=i(S,k=n(k,T,E,S,w,20,u[31]),T,E,p,4,u[32]),E=i(E,S,k,T,m,11,u[33]),T=i(T,E,S,k,v,16,u[34]),k=i(k,T,E,S,x,23,u[35]),S=i(S,k,T,E,s,4,u[36]),E=i(E,S,k,T,h,11,u[37]),T=i(T,E,S,k,g,16,u[38]),k=i(k,T,E,S,b,23,u[39]),S=i(S,k,T,E,C,4,u[40]),E=i(E,S,k,T,l,11,u[41]),T=i(T,E,S,k,d,16,u[42]),k=i(k,T,E,S,f,23,u[43]),S=i(S,k,T,E,y,4,u[44]),E=i(E,S,k,T,w,11,u[45]),T=i(T,E,S,k,A,16,u[46]),S=r(S,k=i(k,T,E,S,c,23,u[47]),T,E,l,6,u[48]),E=r(E,S,k,T,g,10,u[49]),T=r(T,E,S,k,x,15,u[50]),k=r(k,T,E,S,p,21,u[51]),S=r(S,k,T,E,w,6,u[52]),E=r(E,S,k,T,d,10,u[53]),T=r(T,E,S,k,b,15,u[54]),k=r(k,T,E,S,s,21,u[55]),S=r(S,k,T,E,m,6,u[56]),E=r(E,S,k,T,A,10,u[57]),T=r(T,E,S,k,f,15,u[58]),k=r(k,T,E,S,C,21,u[59]),S=r(S,k,T,E,h,6,u[60]),E=r(E,S,k,T,v,10,u[61]),T=r(T,E,S,k,c,15,u[62]),k=r(k,T,E,S,y,21,u[63]),a[0]=a[0]+S|0,a[1]=a[1]+k|0,a[2]=a[2]+T|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var o=e.floor(i/4294967296);for(n[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,i=0;4>i;i++)r=n[i],n[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=s._createHelper(l),o.HmacMD5=s._createHmacHelper(l)}(Math),function(){var e,t=E,n=(e=t.lib).Base,i=e.WordArray,r=(e=t.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(s=this.cfg).hasher.create(),r=i.create(),o=r.words,a=s.keySize,s=s.iterations;o.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();r.concat(l)}return r.sigBytes=4*a,r}});t.EvpKDF=function(e,t,n){return r.create(n).compute(e,t)}}(),E.lib.Cipher||function(){var e=(h=E).lib,t=e.Base,n=e.WordArray,i=e.BufferedBlockAlgorithm,r=h.enc.Base64,o=h.algo.EvpKDF,a=e.Cipher=i.extend({cfg:t.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,i){return("string"==typeof n?p:d).encrypt(e,t,n,i)},decrypt:function(t,n,i){return("string"==typeof n?p:d).decrypt(e,t,n,i)}}}});e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var s=h.mode={},l=function(e,t,n){var i=this._iv;i?this._iv=void 0:i=this._prevBlock;for(var r=0;r<n;r++)e[t+r]^=i[r]},u=(e.BlockCipherMode=t.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();u.Encryptor=u.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;l.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),u.Decryptor=u.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,r=e.slice(t,t+i);n.decryptBlock(e,t),l.call(this,e,t,i),this._prevBlock=r}}),s=s.CBC=u,u=(h.pad={}).Pkcs7={pad:function(e,t){for(var i,r=(i=(i=4*t)-e.sigBytes%i)<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(r);i=n.create(o,i),e.concat(i)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:s,padding:u}),reset:function(){a.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var c=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),d=(s=(h.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?n.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t=(e=r.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var i=n.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return c.create({ciphertext:e,salt:i})}},e.SerializableCipher=t.extend({cfg:t.extend({format:s}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var r=e.createEncryptor(n,i);return t=r.finalize(t),r=r.cfg,c.create({ciphertext:t,key:n,iv:r.iv,algorithm:e,mode:r.mode,padding:r.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),h=(h.kdf={}).OpenSSL={execute:function(e,t,i,r){return r||(r=n.random(8)),e=o.create({keySize:t+i}).compute(e,r),i=n.create(e.words.slice(t),4*i),e.sigBytes=4*t,c.create({key:e,iv:i,salt:r})}},p=e.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:h}),encrypt:function(e,t,n,i){return n=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize),i.iv=n.iv,(e=d.encrypt.call(this,e,t,n.key,i)).mixIn(n),e},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),n=i.kdf.execute(n,e.keySize,e.ivSize,t.salt),i.iv=n.iv,d.decrypt.call(this,e,t,n.key,i)}})}(),function(){for(var e=E,t=e.lib.BlockCipher,n=e.algo,i=[],r=[],o=[],a=[],s=[],l=[],u=[],c=[],d=[],h=[],p=[],f=0;256>f;f++)p[f]=128>f?f<<1:f<<1^283;var g=0,m=0;for(f=0;256>f;f++){var y=(y=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&y^99;i[g]=y,r[y]=g;var b=p[g],v=p[b],w=p[v],C=257*p[y]^16843008*y;o[g]=C<<24|C>>>8,a[g]=C<<16|C>>>16,s[g]=C<<8|C>>>24,l[g]=C,C=16843009*w^65537*v^257*b^16843008*g,u[y]=C<<24|C>>>8,c[y]=C<<16|C>>>16,d[y]=C<<8|C>>>24,h[y]=C,g?(g=b^p[p[p[w^b]]],m^=p[p[m]]):g=m=1}var x=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=t.extend({_doReset:function(){for(var e=(n=this._key).words,t=n.sigBytes/4,n=4*((this._nRounds=t+6)+1),r=this._keySchedule=[],o=0;o<n;o++)if(o<t)r[o]=e[o];else{var a=r[o-1];o%t?6<t&&4==o%t&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=x[o/t|0]<<24),r[o]=r[o-t]^a}for(e=this._invKeySchedule=[],t=0;t<n;t++)o=n-t,a=t%4?r[o]:r[o-4],e[t]=4>t||4>=o?a:u[i[a>>>24]]^c[i[a>>>16&255]]^d[i[a>>>8&255]]^h[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,s,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,c,d,h,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,o,a,s){for(var l=this._nRounds,u=e[t]^n[0],c=e[t+1]^n[1],d=e[t+2]^n[2],h=e[t+3]^n[3],p=4,f=1;f<l;f++){var g=i[u>>>24]^r[c>>>16&255]^o[d>>>8&255]^a[255&h]^n[p++],m=i[c>>>24]^r[d>>>16&255]^o[h>>>8&255]^a[255&u]^n[p++],y=i[d>>>24]^r[h>>>16&255]^o[u>>>8&255]^a[255&c]^n[p++];h=i[h>>>24]^r[u>>>16&255]^o[c>>>8&255]^a[255&d]^n[p++],u=g,c=m,d=y}g=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^n[p++],m=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^n[p++],y=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^n[p++],h=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[p++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=h},keySize:8}),e.AES=t._createHelper(n)}(),E.mode.ECB=((S=E.lib.BlockCipherMode.extend()).Encryptor=S.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),S.Decryptor=S.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),S);var T=E;function k(e){var t,n=[];for(t=0;t<e.length;t+=1)n[t/4|0]|=e[t]<<24-8*t;return T.lib.WordArray.create(n,e.length)}var _=function(){function e(e){var t=e.config;this._config=t,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return e.prototype.HMACSHA256=function(e){return T.HmacSHA256(e,this._config.secretKey).toString(T.enc.Base64)},e.prototype.SHA256=function(e){return T.SHA256(e).toString(T.enc.Hex)},e.prototype._parseOptions=function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),-1===this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())&&(t.keyEncoding=this._defaultOptions.keyEncoding),-1===this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))&&(t.keyLength=this._defaultOptions.keyLength),-1===this._allowedModes.indexOf(t.mode.toLowerCase())&&(t.mode=this._defaultOptions.mode),t},e.prototype._decodeKey=function(e,t){return"base64"===t.keyEncoding?T.enc.Base64.parse(e):"hex"===t.keyEncoding?T.enc.Hex.parse(e):e},e.prototype._getPaddedKey=function(e,t){return e=this._decodeKey(e,t),t.encryptKey?T.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e},e.prototype._getMode=function(e){return"ecb"===e.mode?T.mode.ECB:T.mode.CBC},e.prototype._getIV=function(e){return"cbc"===e.mode?T.enc.Utf8.parse(this._iv):null},e.prototype._getRandomIV=function(){return T.lib.WordArray.random(16)},e.prototype.encrypt=function(e,t,n){return this._config.customEncrypt?this._config.customEncrypt(e):this.pnEncrypt(e,t,n)},e.prototype.decrypt=function(e,t,n){return this._config.customDecrypt?this._config.customDecrypt(e):this.pnDecrypt(e,t,n)},e.prototype.pnEncrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),r=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var o=this._getRandomIV(),a=T.AES.encrypt(e,r,{iv:o,mode:i}).ciphertext;return o.clone().concat(a.clone()).toString(T.enc.Base64)}var s=this._getIV(n);return T.AES.encrypt(e,r,{iv:s,mode:i}).ciphertext.toString(T.enc.Base64)||e},e.prototype.pnDecrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),r=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var o=k((l=new Uint8ClampedArray(b(e))).slice(0,16)),a=k(l.slice(16));try{var s=T.AES.decrypt({ciphertext:a},r,{iv:o,mode:i}).toString(T.enc.Utf8);return JSON.parse(s)}catch(e){return null}}else{o=this._getIV(n);try{var l=T.enc.Base64.parse(e);return s=T.AES.decrypt({ciphertext:l},r,{iv:o,mode:i}).toString(T.enc.Utf8),JSON.parse(s)}catch(e){return null}}},e}(),O=function(){function e(e){var t=e.timeEndpoint;this._timeEndpoint=t}return e.prototype.onReconnection=function(e){this._reconnectionCallback=e},e.prototype.startPolling=function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)},e.prototype.stopPolling=function(){clearInterval(this._timeTimer)},e.prototype._performTimeLoop=function(){var e=this;this._timeEndpoint(function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())})},e}(),P=function(){function e(e){var t=e.config;this.hashHistory=[],this._config=t}return e.prototype.getKey=function(e){var t=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e.payload)).toString(),n=e.publishMetaData.publishTimetoken;return"".concat(n,"-").concat(t)},e.prototype.isDuplicate=function(e){return this.hashHistory.includes(this.getKey(e))},e.prototype.addEntry=function(e){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))},e.prototype.clearHistory=function(){this.hashHistory=[]},e}(),M={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory",PNDisconnectedCategory:"PNDisconnectedCategory",PNConnectionErrorCategory:"PNConnectionErrorCategory",PNDisconnectedUnexpectedlyCategory:"PNDisconnectedUnexpectedlyCategory"},I=function(){function e(e){var t=e.subscribeEndpoint,n=e.leaveEndpoint,i=e.heartbeatEndpoint,r=e.setStateEndpoint,o=e.timeEndpoint,a=e.getFileUrl,s=e.config,l=e.crypto,u=e.listenerManager,c=e.cryptoModule,d=e.eventEmitter;this._listenerManager=u,this._config=s,this._leaveEndpoint=n,this._heartbeatEndpoint=i,this._setStateEndpoint=r,this._subscribeEndpoint=t,this._getFileUrl=a,this._crypto=l,this._cryptoModule=c,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new O({timeEndpoint:o}),this._dedupingManager=new P({config:s}),this._cryptoModule&&(this._decoder=new TextDecoder),this._eventEmitter=d}return e.prototype.adaptStateChange=function(e,t){var n=this,i=e.state,r=e.channels,o=void 0===r?[]:r,a=e.channelGroups,s=void 0===a?[]:a,l=e.withHeartbeat,u=void 0!==l&&l;if(o.forEach(function(e){e in n._channels&&(n._channels[e].state=i)}),s.forEach(function(e){e in n._channelGroups&&(n._channelGroups[e].state=i)}),u){var c={};return o.forEach(function(e){return c[e]=i}),s.forEach(function(e){return c[e]=i}),this._heartbeatEndpoint({channels:o,channelGroups:s,state:c},t)}return this._setStateEndpoint({state:i,channels:o,channelGroups:s},t)},e.prototype.adaptPresenceChange=function(e){var t=this,n=e.connected,i=e.channels,r=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o;n?(r.forEach(function(e){t._heartbeatChannels[e]={state:{}}}),a.forEach(function(e){t._heartbeatChannelGroups[e]={state:{}}})):(r.forEach(function(e){e in t._heartbeatChannels&&delete t._heartbeatChannels[e]}),a.forEach(function(e){e in t._heartbeatChannelGroups&&delete t._heartbeatChannelGroups[e]}),!1===this._config.suppressLeaveEvents&&this._leaveEndpoint({channels:r,channelGroups:a},function(e){t._listenerManager.announceStatus(e)})),this.reconnect()},e.prototype.adaptSubscribeChange=function(e){var t=this,n=e.timetoken,i=e.channels,r=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o,s=e.withPresence,l=void 0!==s&&s,u=e.withHeartbeats,c=void 0!==u&&u;this._config.subscribeKey&&""!==this._config.subscribeKey?(n&&(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=n),"0"!==this._currentTimetoken&&0!==this._currentTimetoken&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),r.forEach(function(e){t._channels[e]={state:{}},l&&(t._presenceChannels[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannels[e]={}),t._pendingChannelSubscriptions.push(e)}),a.forEach(function(e){t._channelGroups[e]={state:{}},l&&(t._presenceChannelGroups[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)}),this._subscriptionStatusAnnounced=!1,this.reconnect()):console&&console.log},e.prototype.adaptUnsubscribeChange=function(e,t){var n=this,i=e.channels,r=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o,s=[],l=[];r.forEach(function(e){e in n._channels&&(delete n._channels[e],s.push(e),e in n._heartbeatChannels&&delete n._heartbeatChannels[e]),e in n._presenceChannels&&(delete n._presenceChannels[e],s.push(e))}),a.forEach(function(e){e in n._channelGroups&&(delete n._channelGroups[e],l.push(e),e in n._heartbeatChannelGroups&&delete n._heartbeatChannelGroups[e]),e in n._presenceChannelGroups&&(delete n._presenceChannelGroups[e],l.push(e))}),0===s.length&&0===l.length||(!1!==this._config.suppressLeaveEvents||t||this._leaveEndpoint({channels:s,channelGroups:l},function(e){e.affectedChannels=s,e.affectedChannelGroups=l,e.currentTimetoken=n._currentTimetoken,e.lastTimetoken=n._lastTimetoken,n._listenerManager.announceStatus(e)}),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())},e.prototype.unsubscribeAll=function(e){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},e)},e.prototype.getHeartbeatChannels=function(){return Object.keys(this._heartbeatChannels)},e.prototype.getHeartbeatChannelGroups=function(){return Object.keys(this._heartbeatChannelGroups)},e.prototype.getSubscribedChannels=function(){return Object.keys(this._channels)},e.prototype.getSubscribedChannelGroups=function(){return Object.keys(this._channelGroups)},e.prototype.reconnect=function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()},e.prototype.disconnect=function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()},e.prototype._registerHeartbeatTimer=function(){this._stopHeartbeatTimer(),0!==this._config.getHeartbeatInterval()&&void 0!==this._config.getHeartbeatInterval()&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))},e.prototype._stopHeartbeatTimer=function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)},e.prototype._performHeartbeatLoop=function(){var e=this,t=this.getHeartbeatChannels(),n=this.getHeartbeatChannelGroups(),i={};0===t.length&&0===n.length||(this.getSubscribedChannels().forEach(function(t){var n=e._channels[t].state;Object.keys(n).length&&(i[t]=n)}),this.getSubscribedChannelGroups().forEach(function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(i[t]=n)}),this._heartbeatEndpoint({channels:t,channelGroups:n,state:i},function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),t.error&&e._config.autoNetworkDetection&&e._isOnline&&(e._isOnline=!1,e.disconnect(),e._listenerManager.announceNetworkDown(),e.reconnect()),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)}.bind(this)))},e.prototype._startSubscribeLoop=function(){var e=this;this._stopSubscribeLoop();var t={},n=[],i=[];if(Object.keys(this._channels).forEach(function(i){var r=e._channels[i].state;Object.keys(r).length&&(t[i]=r),n.push(i)}),Object.keys(this._presenceChannels).forEach(function(e){n.push("".concat(e,"-pnpres"))}),Object.keys(this._channelGroups).forEach(function(n){var r=e._channelGroups[n].state;Object.keys(r).length&&(t[n]=r),i.push(n)}),Object.keys(this._presenceChannelGroups).forEach(function(e){i.push("".concat(e,"-pnpres"))}),0!==n.length||0!==i.length){var r={channels:n,channelGroups:i,state:t,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(r,this._processSubscribeResponse.bind(this))}},e.prototype._processSubscribeResponse=function(e,t){var n=this;if(e.error){if(e.errorData&&"Aborted"===e.errorData.message)return;e.category===M.PNTimeoutCategory?this._startSubscribeLoop():e.category===M.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection(function(){n._config.autoNetworkDetection&&!n._isOnline&&(n._isOnline=!0,n._listenerManager.announceNetworkUp()),n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:M.PNReconnectedCategory,operation:e.operation,lastTimetoken:n._lastTimetoken,currentTimetoken:n._currentTimetoken};n._listenerManager.announceStatus(t)}),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):e.category===M.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e)}else{if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=t.metadata.timetoken),!this._subscriptionStatusAnnounced){var i={};i.category=M.PNConnectedCategory,i.operation=e.operation,i.affectedChannels=this._pendingChannelSubscriptions,i.subscribedChannels=this.getSubscribedChannels(),i.affectedChannelGroups=this._pendingChannelGroupSubscriptions,i.lastTimetoken=this._lastTimetoken,i.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(i),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var r=t.messages||[],o=this._config,a=o.requestMessageCountThreshold,s=o.dedupeOnSubscribe;if(a&&r.length>=a){var l={};l.category=M.PNRequestMessageCountExceededCategory,l.operation=e.operation,this._listenerManager.announceStatus(l)}r.forEach(function(e){if(e.channel,e.subscriptionMatch,s){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}n._eventEmitter.emitEvent(e)}),this._region=t.metadata.region,this._startSubscribeLoop()}},e.prototype._stopSubscribeLoop=function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)},e.prototype._renameEvent=function(e){return"set"===e?"updated":"removed"},e.prototype._renameChannelField=function(e){var t=e.channel,n=r(e,["channel"]);return n.spaceId=t,n},e}(),N={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNSignalOperation:"PNSignalOperation",PNAddMessageActionOperation:"PNAddActionOperation",PNRemoveMessageActionOperation:"PNRemoveMessageActionOperation",PNGetMessageActionsOperation:"PNGetMessageActionsOperation",PNCreateUserOperation:"PNCreateUserOperation",PNUpdateUserOperation:"PNUpdateUserOperation",PNDeleteUserOperation:"PNDeleteUserOperation",PNGetUserOperation:"PNGetUsersOperation",PNGetUsersOperation:"PNGetUsersOperation",PNCreateSpaceOperation:"PNCreateSpaceOperation",PNUpdateSpaceOperation:"PNUpdateSpaceOperation",PNDeleteSpaceOperation:"PNDeleteSpaceOperation",PNGetSpaceOperation:"PNGetSpacesOperation",PNGetSpacesOperation:"PNGetSpacesOperation",PNGetMembersOperation:"PNGetMembersOperation",PNUpdateMembersOperation:"PNUpdateMembersOperation",PNGetMembershipsOperation:"PNGetMembershipsOperation",PNUpdateMembershipsOperation:"PNUpdateMembershipsOperation",PNListFilesOperation:"PNListFilesOperation",PNGenerateUploadUrlOperation:"PNGenerateUploadUrlOperation",PNPublishFileOperation:"PNPublishFileOperation",PNGetFileUrlOperation:"PNGetFileUrlOperation",PNDownloadFileOperation:"PNDownloadFileOperation",PNGetAllUUIDMetadataOperation:"PNGetAllUUIDMetadataOperation",PNGetUUIDMetadataOperation:"PNGetUUIDMetadataOperation",PNSetUUIDMetadataOperation:"PNSetUUIDMetadataOperation",PNRemoveUUIDMetadataOperation:"PNRemoveUUIDMetadataOperation",PNGetAllChannelMetadataOperation:"PNGetAllChannelMetadataOperation",PNGetChannelMetadataOperation:"PNGetChannelMetadataOperation",PNSetChannelMetadataOperation:"PNSetChannelMetadataOperation",PNRemoveChannelMetadataOperation:"PNRemoveChannelMetadataOperation",PNSetMembersOperation:"PNSetMembersOperation",PNSetMembershipsOperation:"PNSetMembershipsOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerGrantToken:"PNAccessManagerGrantToken",PNAccessManagerAudit:"PNAccessManagerAudit",PNAccessManagerRevokeToken:"PNAccessManagerRevokeToken",PNHandshakeOperation:"PNHandshakeOperation",PNReceiveMessagesOperation:"PNReceiveMessagesOperation"},D=function(){function e(e){this._maximumSamplesCount=100,this._trackedLatencies={},this._latencies={},this._telemetryExcludeOperations=[N.PNSubscribeOperation,N.PNReceiveMessagesOperation,N.PNHandshakeOperation],this._maximumSamplesCount=e.maximumSamplesCount||this._maximumSamplesCount}return e.prototype.operationsLatencyForRequest=function(){var e=this,t={};return Object.keys(this._latencies).forEach(function(n){var i=e._latencies[n],r=e._averageLatency(i);r>0&&(t["l_".concat(n)]=r)}),t},e.prototype.startLatencyMeasure=function(e,t){!this._telemetryExcludeOperations.includes(e)&&t&&(this._trackedLatencies[t]=Date.now())},e.prototype.stopLatencyMeasure=function(e,t){if(!this._telemetryExcludeOperations.includes(e)&&t){var n=this._endpointName(e),i=this._latencies[n],r=this._trackedLatencies[t];i||(this._latencies[n]=[],i=this._latencies[n]),i.push(Date.now()-r),i.length>this._maximumSamplesCount&&i.splice(0,i.length-this._maximumSamplesCount),delete this._trackedLatencies[t]}},e.prototype._averageLatency=function(e){return Math.floor(e.reduce(function(e,t){return e+t},0)/e.length)},e.prototype._endpointName=function(e){var t=null;switch(e){case N.PNPublishOperation:t="pub";break;case N.PNSignalOperation:t="sig";break;case N.PNHistoryOperation:case N.PNFetchMessagesOperation:case N.PNDeleteMessagesOperation:case N.PNMessageCounts:t="hist";break;case N.PNUnsubscribeOperation:case N.PNWhereNowOperation:case N.PNHereNowOperation:case N.PNHeartbeatOperation:case N.PNSetStateOperation:case N.PNGetStateOperation:t="pres";break;case N.PNAddChannelsToGroupOperation:case N.PNRemoveChannelsFromGroupOperation:case N.PNChannelGroupsOperation:case N.PNRemoveGroupOperation:case N.PNChannelsForGroupOperation:t="cg";break;case N.PNPushNotificationEnabledChannelsOperation:case N.PNRemoveAllPushNotificationsOperation:t="push";break;case N.PNCreateUserOperation:case N.PNUpdateUserOperation:case N.PNDeleteUserOperation:case N.PNGetUserOperation:case N.PNGetUsersOperation:case N.PNCreateSpaceOperation:case N.PNUpdateSpaceOperation:case N.PNDeleteSpaceOperation:case N.PNGetSpaceOperation:case N.PNGetSpacesOperation:case N.PNGetMembersOperation:case N.PNUpdateMembersOperation:case N.PNGetMembershipsOperation:case N.PNUpdateMembershipsOperation:t="obj";break;case N.PNAddMessageActionOperation:case N.PNRemoveMessageActionOperation:case N.PNGetMessageActionsOperation:t="msga";break;case N.PNAccessManagerGrant:case N.PNAccessManagerAudit:t="pam";break;case N.PNAccessManagerGrantToken:case N.PNAccessManagerRevokeToken:t="pamv3";break;default:t="time"}return t},e}(),U=function(){function e(e,t,n){this._payload=e,this._setDefaultPayloadStructure(),this.title=t,this.body=n}return Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this._title=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{set:function(e){this._subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{set:function(e){this._body=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{set:function(e){this._badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{set:function(e){this._sound=e},enumerable:!1,configurable:!0}),e.prototype._setDefaultPayloadStructure=function(){},e.prototype.toObject=function(){return{}},e}(),L=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"configurations",{set:function(e){e&&e.length&&(this._configurations=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.aps},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.aps.alert.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){e&&e.length&&(this._payload.aps.alert.subtitle=e,this._subtitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.aps.alert.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this._badge},set:function(e){null!=e&&(this._payload.aps.badge=e,this._badge=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.aps.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.aps={alert:{}}},n.prototype.toObject=function(){var e=this,t=i({},this._payload),n=t.aps,r=n.alert;if(this._isSilent&&(n["content-available"]=1),"apns2"===this._apnsPushType){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");var o=[];this._configurations.forEach(function(t){o.push(e._objectFromAPNS2Configuration(t))}),o.length&&(t.pn_push=o)}return r&&Object.keys(r).length||delete n.alert,this._isSilent&&(delete n.alert,delete n.badge,delete n.sound,r={}),this._isSilent||Object.keys(r).length?t:null},n.prototype._objectFromAPNS2Configuration=function(e){var t=this;if(!e.targets||!e.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");var n=[];e.targets.forEach(function(e){n.push(t._objectFromAPNSTarget(e))});var i=e.collapseId,r=e.expirationDate,o={auth_method:"token",targets:n,version:"v2"};return i&&i.length&&(o.collapse_id=i),r&&(o.expiration=r.toISOString()),o},n.prototype._objectFromAPNSTarget=function(e){if(!e.topic||!e.topic.length)throw new TypeError("Target 'topic' undefined.");var t=e.topic,n=e.environment,i=void 0===n?"development":n,r=e.excludedDevices,o=void 0===r?[]:r,a={topic:t,environment:i};return o.length&&(a.excluded_devices=o),a},n}(U),R=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"backContent",{get:function(){return this._backContent},set:function(e){e&&e.length&&(this._payload.back_content=e,this._backContent=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"backTitle",{get:function(){return this._backTitle},set:function(e){e&&e.length&&(this._payload.back_title=e,this._backTitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},set:function(e){null!=e&&(this._payload.count=e,this._count=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(e){e&&e.length&&(this._payload.type=e,this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this.backTitle},set:function(e){this.backTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this.backContent},set:function(e){this.backContent=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),n.prototype.toObject=function(){return Object.keys(this._payload).length?i({},this._payload):null},n}(U),B=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.notification},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this._payload.data},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.notification.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.notification.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.notification.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"icon",{get:function(){return this._icon},set:function(e){e&&e.length&&(this._payload.notification.icon=e,this._icon=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tag",{get:function(){return this._tag},set:function(e){e&&e.length&&(this._payload.notification.tag=e,this._tag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.notification={},this._payload.data={}},n.prototype.toObject=function(){var e=i({},this._payload.data),t=null,n={};if(Object.keys(this._payload).length>2){var o=this._payload;o.notification,o.data;var a=r(o,["notification","data"]);e=i(i({},e),a)}return this._isSilent?e.notification=this._payload.notification:t=this._payload.notification,Object.keys(e).length&&(n.data=e),t&&Object.keys(t).length&&(n.notification=t),Object.keys(n).length?n:null},n}(U),j=function(){function e(e,t){this._payload={apns:{},mpns:{},fcm:{}},this._title=e,this._body=t,this.apns=new L(this._payload.apns,e,t),this.mpns=new R(this._payload.mpns,e,t),this.fcm=new B(this._payload.fcm,e,t)}return Object.defineProperty(e.prototype,"debugging",{set:function(e){this._debugging=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){this._subtitle=e,this.apns.subtitle=e,this.mpns.subtitle=e,this.fcm.subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{get:function(){return this._badge},set:function(e){this._badge=e,this.apns.badge=e,this.mpns.badge=e,this.fcm.badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{get:function(){return this._sound},set:function(e){this._sound=e,this.apns.sound=e,this.mpns.sound=e,this.fcm.sound=e},enumerable:!1,configurable:!0}),e.prototype.buildPayload=function(e){var t={};if(e.includes("apns")||e.includes("apns2")){this.apns._apnsPushType=e.includes("apns")?"apns":"apns2";var n=this.apns.toObject();n&&Object.keys(n).length&&(t.pn_apns=n)}if(e.includes("mpns")){var i=this.mpns.toObject();i&&Object.keys(i).length&&(t.pn_mpns=i)}if(e.includes("fcm")){var r=this.fcm.toObject();r&&Object.keys(r).length&&(t.pn_gcm=r)}return Object.keys(t).length&&this._debugging&&(t.pn_debug=!0),t},e}(),F=function(){function e(){this._listeners=[]}return e.prototype.addListener=function(e){this._listeners.includes(e)||this._listeners.push(e)},e.prototype.removeListener=function(e){var t=[];this._listeners.forEach(function(n){n!==e&&t.push(n)}),this._listeners=t},e.prototype.removeAllListeners=function(){this._listeners=[]},e.prototype.announcePresence=function(e){this._listeners.forEach(function(t){t.presence&&t.presence(e)})},e.prototype.announceStatus=function(e){this._listeners.forEach(function(t){t.status&&t.status(e)})},e.prototype.announceMessage=function(e){this._listeners.forEach(function(t){t.message&&t.message(e)})},e.prototype.announceSignal=function(e){this._listeners.forEach(function(t){t.signal&&t.signal(e)})},e.prototype.announceMessageAction=function(e){this._listeners.forEach(function(t){t.messageAction&&t.messageAction(e)})},e.prototype.announceFile=function(e){this._listeners.forEach(function(t){t.file&&t.file(e)})},e.prototype.announceObjects=function(e){this._listeners.forEach(function(t){t.objects&&t.objects(e)})},e.prototype.announceUser=function(e){this._listeners.forEach(function(t){t.user&&t.user(e)})},e.prototype.announceSpace=function(e){this._listeners.forEach(function(t){t.space&&t.space(e)})},e.prototype.announceMembership=function(e){this._listeners.forEach(function(t){t.membership&&t.membership(e)})},e.prototype.announceNetworkUp=function(){var e={};e.category=M.PNNetworkUpCategory,this.announceStatus(e)},e.prototype.announceNetworkDown=function(){var e={};e.category=M.PNNetworkDownCategory,this.announceStatus(e)},e}(),H=function(){function e(e,t){this._config=e,this._cbor=t}return e.prototype.setToken=function(e){e&&e.length>0?this._token=e:this._token=void 0},e.prototype.getToken=function(){return this._token},e.prototype.extractPermissions=function(e){var t={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return!(128&~e)&&(t.join=!0),!(64&~e)&&(t.update=!0),!(32&~e)&&(t.get=!0),!(8&~e)&&(t.delete=!0),!(4&~e)&&(t.manage=!0),!(2&~e)&&(t.write=!0),!(1&~e)&&(t.read=!0),t},e.prototype.parseToken=function(e){var t=this,n=this._cbor.decodeToken(e);if(void 0!==n){var i=n.res.uuid?Object.keys(n.res.uuid):[],r=Object.keys(n.res.chan),o=Object.keys(n.res.grp),a=n.pat.uuid?Object.keys(n.pat.uuid):[],s=Object.keys(n.pat.chan),l=Object.keys(n.pat.grp),u={version:n.v,timestamp:n.t,ttl:n.ttl,authorized_uuid:n.uuid},c=i.length>0,d=r.length>0,h=o.length>0;(c||d||h)&&(u.resources={},c&&(u.resources.uuids={},i.forEach(function(e){u.resources.uuids[e]=t.extractPermissions(n.res.uuid[e])})),d&&(u.resources.channels={},r.forEach(function(e){u.resources.channels[e]=t.extractPermissions(n.res.chan[e])})),h&&(u.resources.groups={},o.forEach(function(e){u.resources.groups[e]=t.extractPermissions(n.res.grp[e])})));var p=a.length>0,f=s.length>0,g=l.length>0;return(p||f||g)&&(u.patterns={},p&&(u.patterns.uuids={},a.forEach(function(e){u.patterns.uuids[e]=t.extractPermissions(n.pat.uuid[e])})),f&&(u.patterns.channels={},s.forEach(function(e){u.patterns.channels[e]=t.extractPermissions(n.pat.chan[e])})),g&&(u.patterns.groups={},l.forEach(function(e){u.patterns.groups[e]=t.extractPermissions(n.pat.grp[e])}))),Object.keys(n.meta).length>0&&(u.meta=n.meta),u.signature=n.sig,u}},e}();function $(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})}function z(e){return function(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}(e).sort()}var G={signPamFromParams:function(e){return z(e).map(function(t){return"".concat(t,"=").concat($(e[t]))}).join("&")},endsWith:function(e,t){return-1!==e.indexOf(t,this.length-t.length)},createPromise:function(){var e,t;return{promise:new Promise(function(n,i){e=n,t=i}),reject:t,fulfill:e}},encodeString:$,stringToArrayBuffer:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return t},removeSingleOccurance:function(e,t){var n=Object.fromEntries(t.map(function(e){return[e,!1]}));return e.filter(function(e){return!(t.includes(e)&&!n[e]&&(n[e]=!0,1))})},findUniqueCommonElements:function(e,t){return __spreadArray([],__read(e),!1).filter(function(n){return t.includes(n)&&e.indexOf(n)===e.lastIndexOf(n)&&t.indexOf(n)===t.lastIndexOf(n)})}},Q=function(e){function n(t,n){var i=this.constructor,r=e.call(this,t)||this;return r.name=r.constructor.name,r.status=n,r.message=t,Object.setPrototypeOf(r,i.prototype),r}return t(n,e),n}(Error);function q(e){return(t={message:e}).type="validationError",t.error=!0,t;var t}function W(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.usePatch&&e.usePatch(t,n)?e.patchURL(t,n):e.useGetFile&&e.useGetFile(t,n)?e.getFileURL(t,n):e.getURL(t,n)}function V(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-".concat(e.sdkFamily);e.partnerId&&(t+="-".concat(e.partnerId)),t+="/".concat(e.getVersion());var n=e._getPnsdkSuffix(" ");return n.length>0&&(t+=n),t}function Y(e,t,n){return t.usePost&&t.usePost(e,n)?"POST":t.usePatch&&t.usePatch(e,n)?"PATCH":t.useDelete&&t.useDelete(e,n)?"DELETE":t.useGetFile&&t.useGetFile(e,n)?"GETFILE":"GET"}function K(e,t,n,i,r){var o=e.config,a=e.crypto,s=Y(e,r,i);n.timestamp=Math.floor((new Date).getTime()/1e3),"PNPublishOperation"===r.getOperation()&&r.usePost&&r.usePost(e,i)&&(s="GET"),"GETFILE"===s&&(s="GET");var l="".concat(s,"\n").concat(o.publishKey,"\n").concat(t,"\n").concat(G.signPamFromParams(n),"\n");if("POST"===s)l+="string"==typeof(u=r.postPayload(e,i))?u:JSON.stringify(u);else if("PATCH"===s){var u;l+="string"==typeof(u=r.patchPayload(e,i))?u:JSON.stringify(u)}var c="v2.".concat(a.HMACSHA256(l));c=(c=(c=c.replace(/\+/g,"-")).replace(/\//g,"_")).replace(/=+$/,""),n.signature=c}function X(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.networking,a=e.config,s=e.telemetryManager,l=e.tokenManager,u=m(),c=null,d=null,h={};t.getOperation()===N.PNTimeOperation||t.getOperation()===N.PNChannelGroupsOperation?c=n[0]:(h=n[0],c=n[1]),"undefined"==typeof Promise||c||(d=G.createPromise());var p=t.validateParams(e,h);if(p)return c?c(q(p)):d?(d.reject(new Q("Validation failed, check status for details",q(p))),d.promise):void 0;var f,g=t.prepareParams(e,h),y=W(t,e,h),b={url:y,operation:t.getOperation(),timeout:t.getRequestTimeout(e),headers:t.getRequestHeaders?t.getRequestHeaders():{},ignoreBody:"function"==typeof t.ignoreBody&&t.ignoreBody(e),forceBuffered:"function"==typeof t.forceBuffered?t.forceBuffered(e,h):null,abortSignal:"function"==typeof t.getAbortSignal?t.getAbortSignal(e,h):null};g.uuid=a.UUID,g.pnsdk=V(a);var v=s.operationsLatencyForRequest();if(Object.keys(v).length&&(g=i(i({},g),v)),a.useInstanceId&&(g.instanceid=a.instanceId),a.useRequestId&&(g.requestid=u),t.isAuthSupported()){var w=l.getToken()||a.getAuthKey();w&&(g.auth=w)}a.secretKey&&K(e,y,g,h,t);var C=function(n,i){if(n.error)return t.handleError&&t.handleError(e,h,n),void(c?c(n):d&&d.reject(new Q("PubNub call failed, check status for details",n)));s.stopLatencyMeasure(t.getOperation(),u);var r=t.handleResponse(e,i,h);"function"!=typeof(null==r?void 0:r.then)&&(r=Promise.resolve(r)),r.then(function(e){c?c(n,e):d&&d.fulfill(e)}).catch(function(e){if(c){var n=e;t.getOperation()===N.PNSubscribeOperation&&(n={statusCode:400,error:!0,operation:t.getOperation(),errorData:e,category:M.PNUnknownCategory}),c(n,null)}else d&&d.reject(new Q("PubNub call failed, check status for details",e))})};if(s.startLatencyMeasure(t.getOperation(),u),"POST"===Y(e,t,h)){var x=t.postPayload(e,h);f=o.POST(g,x,b,C)}else"PATCH"===Y(e,t,h)?(x=t.patchPayload(e,h),f=o.PATCH(g,x,b,C)):f="DELETE"===Y(e,t,h)?o.DELETE(g,b,C):"GETFILE"===Y(e,t,h)?o.GETFILE(g,b,C):o.GET(g,b,C);return t.getOperation()===N.PNSubscribeOperation?f:d?d.promise:void 0}var Z=Object.freeze({__proto__:null,getOperation:function(){return N.PNAddChannelsToGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,r=e.config;return i?n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),J=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveChannelsFromGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,r=e.config;return i?n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),ee=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n),"/remove")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},handleResponse:function(){return{}}}),te=Object.freeze({__proto__:null,getOperation:function(){return N.PNChannelGroupsOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v1/channel-registration/sub-key/".concat(t.subscribeKey,"/channel-group")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{groups:t.payload.groups}}}),ne=Object.freeze({__proto__:null,getOperation:function(){return N.PNChannelsForGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{channels:t.payload.channels}}}),ie=Object.freeze({__proto__:null,getOperation:function(){return N.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.channels,o=t.topic,a=e.config;return n?i?"apns2"!==i||o?r&&0!==r.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.channels,o=void 0===r?[]:r,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,add:o.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),re=Object.freeze({__proto__:null,getOperation:function(){return N.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.channels,o=t.topic,a=e.config;return n?i?"apns2"!==i||o?r&&0!==r.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.channels,o=void 0===r?[]:r,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,remove:o.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),oe=Object.freeze({__proto__:null,getOperation:function(){return N.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.topic,o=e.config;return n?i?"apns2"!==i||r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.environment,o=void 0===r?"development":r,a=t.topic,s=t.start,l=t.count,u={type:n};return"apns2"===n&&delete(u=i(i({},u),{environment:o,topic:a})).type,s&&(u.start=s),l&&l>0&&(u.count=l),u},handleResponse:function(e,t){return{channels:t}}}),ae=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveAllPushNotificationsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.topic,o=e.config;return n?i?"apns2"!==i||r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n,"/remove"):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n,"/remove")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.environment,o=void 0===r?"development":r,a=t.topic,s={type:n};return"apns2"===n&&delete(s=i(i({},s),{environment:o,topic:a})).type,s},handleResponse:function(){return{}}}),se=Object.freeze({__proto__:null,getOperation:function(){return N.PNUnsubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(o),"/leave")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,r={};return i.length>0&&(r["channel-group"]=i.join(",")),r},handleResponse:function(){return{}}}),le=Object.freeze({__proto__:null,getOperation:function(){return N.PNWhereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,r=void 0===i?n.UUID:i;return"/v2/presence/sub-key/".concat(n.subscribeKey,"/uuid/").concat(G.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}}),ue=Object.freeze({__proto__:null,getOperation:function(){return N.PNHeartbeatOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(o),"/heartbeat")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,r=t.state,o=e.config,a={};return i.length>0&&(a["channel-group"]=i.join(",")),r&&(a.state=JSON.stringify(r)),a.heartbeat=o.getPresenceTimeout(),a},handleResponse:function(){return{}}}),ce=Object.freeze({__proto__:null,getOperation:function(){return N.PNGetStateOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,r=void 0===i?n.UUID:i,o=t.channels,a=void 0===o?[]:o,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(s),"/uuid/").concat(r)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,r={};return i.length>0&&(r["channel-group"]=i.join(",")),r},handleResponse:function(e,t,n){var i=n.channels,r=void 0===i?[]:i,o=n.channelGroups,a=void 0===o?[]:o,s={};return 1===r.length&&0===a.length?s[r[0]]=t.payload:s=t.payload,{channels:s}}}),de=Object.freeze({__proto__:null,getOperation:function(){return N.PNSetStateOperation},validateParams:function(e,t){var n=e.config,i=t.state,r=t.channels,o=void 0===r?[]:r,a=t.channelGroups,s=void 0===a?[]:a;return i?n.subscribeKey?0===o.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(o),"/uuid/").concat(G.encodeString(n.UUID),"/data")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.state,i=t.channelGroups,r=void 0===i?[]:i,o={};return o.state=JSON.stringify(n),r.length>0&&(o["channel-group"]=r.join(",")),o},handleResponse:function(e,t){return{state:t.payload}}}),he=Object.freeze({__proto__:null,getOperation:function(){return N.PNHereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=t.channelGroups,a=void 0===o?[]:o,s="/v2/presence/sub-key/".concat(n.subscribeKey);if(r.length>0||a.length>0){var l=r.length>0?r.join(","):",";s+="/channel/".concat(G.encodeString(l))}return s},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o=t.includeUUIDs,a=void 0===o||o,s=t.includeState,l=void 0!==s&&s,u=t.queryParameters,c=void 0===u?{}:u,d={};return a||(d.disable_uuids=1),l&&(d.state=1),r.length>0&&(d["channel-group"]=r.join(",")),i(i({},d),c)},handleResponse:function(e,t,n){var i=n.channels,r=void 0===i?[]:i,o=n.channelGroups,a=void 0===o?[]:o,s=n.includeUUIDs,l=void 0===s||s,u=n.includeState,c=void 0!==u&&u;return r.length>1||a.length>0||0===a.length&&0===r.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var i=t.payload.channels[n],r=[];return e.channels[n]={occupants:r,name:n,occupancy:i.occupancy},l&&i.uuids.forEach(function(e){c?r.push({state:e.state,uuid:e.uuid}):r.push({state:null,uuid:e})}),e}),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[r[0]]={occupants:n,name:r[0],occupancy:t.occupancy},l&&t.uuids&&t.uuids.forEach(function(e){c?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e}()},handleError:function(e,t,n){402!==n.statusCode||this.getURL(e,t).includes("channel")||(n.errorData.message="You have tried to perform a Global Here Now operation, your keyset configuration does not support that. Please provide a channel, or enable the Global Here Now feature from the Portal.")}}),pe=Object.freeze({__proto__:null,getOperation:function(){return N.PNAddMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.action,r=t.channel;return t.messageTimetoken?n.subscribeKey?r?i?i.value?i.type?i.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message channel":"Missing Subscribe Key":"Missing message timetoken"},usePost:function(){return!0},postURL:function(e,t){var n=e.config,i=t.channel,r=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(i),"/message/").concat(r)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},getRequestHeaders:function(){return{"Content-Type":"application/json"}},isAuthSupported:function(){return!0},prepareParams:function(){return{}},postPayload:function(e,t){return t.action},handleResponse:function(e,t){return{data:t.data}}}),fe=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.channel,r=t.actionTimetoken;return t.messageTimetoken?r?n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key":"Missing action timetoken":"Missing message timetoken"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config,i=t.channel,r=t.actionTimetoken,o=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(i),"/message/").concat(o,"/action/").concat(r)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{data:t.data}}}),ge=Object.freeze({__proto__:null,getOperation:function(){return N.PNGetMessageActionsOperation},validateParams:function(e,t){var n=e.config,i=t.channel;return n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channel;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(i))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.limit,i=t.start,r=t.end,o={};return n&&(o.limit=n),i&&(o.start=i),r&&(o.end=r),o},handleResponse:function(e,t){var n={data:t.data,start:null,end:null};return n.data.length&&(n.end=n.data[n.data.length-1].actionTimetoken,n.start=n.data[0].actionTimetoken),n}}),me={getOperation:function(){return N.PNListFilesOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"channel can't be empty"},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/files")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.limit&&(n.limit=t.limit),t.next&&(n.next=t.next),n},handleResponse:function(e,t){return{status:t.status,data:t.data,next:t.next,count:t.count}}},ye={getOperation:function(){return N.PNGenerateUploadUrlOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?void 0:"name can't be empty":"channel can't be empty"},usePost:function(){return!0},postURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/generate-upload-url")},postPayload:function(e,t){return{name:t.name}},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data,file_upload_request:t.file_upload_request}}},be={getOperation:function(){return N.PNPublishFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.fileId)?(null==t?void 0:t.fileName)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},getURL:function(e,t){var n=e.config,i=n.publishKey,r=n.subscribeKey,o=function(e,t){var n=JSON.stringify(t);if(e.cryptoModule){var i=e.cryptoModule.encrypt(n);n="string"==typeof i?i:v(i),n=JSON.stringify(n)}return n||""}(e,{message:t.message,file:{name:t.fileName,id:t.fileId}});return"/v1/files/publish-file/".concat(i,"/").concat(r,"/0/").concat(G.encodeString(t.channel),"/0/").concat(G.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.ttl&&(n.ttl=t.ttl),void 0!==t.storeInHistory&&(n.store=t.storeInHistory?"1":"0"),t.meta&&"object"==typeof t.meta&&(n.meta=JSON.stringify(t.meta)),n},handleResponse:function(e,t){return{timetoken:t[2]}}},ve=function(e){var t=function(e){var t=this,n=e.generateUploadUrl,i=e.publishFile,r=e.modules,s=r.PubNubFile,l=r.config,u=r.cryptography,c=r.cryptoModule,d=r.networking;return function(e){var r=e.channel,h=e.file,p=e.message,f=e.cipherKey,g=e.meta,m=e.ttl,y=e.storeInHistory;return o(t,void 0,void 0,function(){var e,t,o,b,v,w,C,x,A,S,E,T,k,_,O,P,M,I,N,D,U,L,R,B,j,F,H,$,z;return a(this,function(a){switch(a.label){case 0:if(!r)throw new Q("Validation failed, check status for details",q("channel can't be empty"));if(!h)throw new Q("Validation failed, check status for details",q("file can't be empty"));return e=s.create(h),[4,n({channel:r,name:e.name})];case 1:return t=a.sent(),o=t.file_upload_request,b=o.url,v=o.form_fields,w=t.data,C=w.id,x=w.name,s.supportsEncryptFile&&(f||c)?null!=f?[3,3]:[4,c.encryptFile(e,s)]:[3,6];case 2:return A=a.sent(),[3,5];case 3:return[4,u.encryptFile(f,e,s)];case 4:A=a.sent(),a.label=5;case 5:e=A,a.label=6;case 6:S=v,e.mimeType&&(S=v.map(function(t){return"Content-Type"===t.key?{key:t.key,value:e.mimeType}:t})),a.label=7;case 7:return a.trys.push([7,21,,22]),s.supportsFileUri&&h.uri?(k=(T=d).POSTFILE,_=[b,S],[4,e.toFileUri()]):[3,10];case 8:return[4,k.apply(T,_.concat([a.sent()]))];case 9:return E=a.sent(),[3,20];case 10:return s.supportsFile?(P=(O=d).POSTFILE,M=[b,S],[4,e.toFile()]):[3,13];case 11:return[4,P.apply(O,M.concat([a.sent()]))];case 12:return E=a.sent(),[3,20];case 13:return s.supportsBuffer?(N=(I=d).POSTFILE,D=[b,S],[4,e.toBuffer()]):[3,16];case 14:return[4,N.apply(I,D.concat([a.sent()]))];case 15:return E=a.sent(),[3,20];case 16:return s.supportsBlob?(L=(U=d).POSTFILE,R=[b,S],[4,e.toBlob()]):[3,19];case 17:return[4,L.apply(U,R.concat([a.sent()]))];case 18:return E=a.sent(),[3,20];case 19:throw new Error("Unsupported environment");case 20:return[3,22];case 21:throw(B=a.sent()).response&&"string"==typeof B.response.text?(j=B.response.text,F=/<Message>(.*)<\/Message>/gi.exec(j),new Q(F?"Upload to bucket failed: ".concat(F[1]):"Upload to bucket failed.",B)):new Q("Upload to bucket failed.",B);case 22:if(204!==E.status)throw new Q("Upload to bucket was unsuccessful",E);H=l.fileUploadPublishRetryLimit,$=!1,z={timetoken:"0"},a.label=23;case 23:return a.trys.push([23,25,,26]),[4,i({channel:r,message:p,fileId:C,fileName:x,meta:g,storeInHistory:y,ttl:m})];case 24:return z=a.sent(),$=!0,[3,26];case 25:return a.sent(),H-=1,[3,26];case 26:if(!$&&H>0)return[3,23];a.label=27;case 27:if($)return[2,{timetoken:z.timetoken,id:C,name:x}];throw new Q("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{channel:r,id:C,name:x})}})})}}(e);return function(e,n){var i=t(e);return"function"==typeof n?(i.then(function(e){return n(null,e)}).catch(function(e){return n(e,null)}),i):i}},we=function(e,t){var n=t.channel,i=t.id,r=t.name,o=e.config,a=e.networking,s=e.tokenManager;if(!n)throw new Q("Validation failed, check status for details",q("channel can't be empty"));if(!i)throw new Q("Validation failed, check status for details",q("file id can't be empty"));if(!r)throw new Q("Validation failed, check status for details",q("file name can't be empty"));var l="/v1/files/".concat(o.subscribeKey,"/channels/").concat(G.encodeString(n),"/files/").concat(i,"/").concat(r),u={};u.uuid=o.getUUID(),u.pnsdk=V(o);var c=s.getToken()||o.getAuthKey();c&&(u.auth=c),o.secretKey&&K(e,l,u,{},{getOperation:function(){return"PubNubGetFileUrlOperation"}});var d=Object.keys(u).map(function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(u[e]))}).join("&");return""!==d?"".concat(a.getStandardOrigin()).concat(l,"?").concat(d):"".concat(a.getStandardOrigin()).concat(l)},Ce={getOperation:function(){return N.PNDownloadFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?(null==t?void 0:t.id)?void 0:"id can't be empty":"name can't be empty":"channel can't be empty"},useGetFile:function(){return!0},getFileURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},ignoreBody:function(){return!0},forceBuffered:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t,n){var i=e.PubNubFile,r=e.config,s=e.cryptography,l=e.cryptoModule;return o(void 0,void 0,void 0,function(){var e,o,u,c;return a(this,function(a){switch(a.label){case 0:return e=t.response.body,i.supportsEncryptFile&&(n.cipherKey||l)?null!=n.cipherKey?[3,2]:[4,l.decryptFile(i.create({data:e,name:n.name}),i)]:[3,5];case 1:return o=a.sent().data,[3,4];case 2:return[4,s.decrypt(null!==(u=n.cipherKey)&&void 0!==u?u:r.cipherKey,e)];case 3:o=a.sent(),a.label=4;case 4:e=o,a.label=5;case 5:return[2,i.create({data:e,name:null!==(c=t.response.name)&&void 0!==c?c:n.name,mimeType:t.response.type})]}})})}},xe={getOperation:function(){return N.PNListFilesOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.id)?(null==t?void 0:t.name)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status}}},Ae={getOperation:function(){return N.PNGetAllUUIDMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(r=t.include)||void 0===r?void 0:r.totalCount),(null===(o=null==t?void 0:t.page)||void 0===o?void 0:o.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,next:t.next,prev:t.prev}}},Se={getOperation:function(){return N.PNGetUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r=e.config,o={};return o.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:r.getUUID(),o.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&o.include.pop(),o.include=o.include.join(","),o},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Ee={getOperation:function(){return N.PNSetUUIDMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.data))return"Data cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r=e.config,o={};return o.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:r.getUUID(),o.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&o.include.pop(),o.include=o.include.join(","),o},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Te={getOperation:function(){return N.PNRemoveUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i=e.config;return{uuid:null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},ke={getOperation:function(){return N.PNGetAllChannelMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(r=t.include)||void 0===r?void 0:r.totalCount),(null===(o=null==t?void 0:t.page)||void 0===o?void 0:o.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},_e={getOperation:function(){return N.PNGetChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Oe={getOperation:function(){return N.PNSetChannelMetadataOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.data)?void 0:"Data cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Pe={getOperation:function(){return N.PNRemoveChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Me={getOperation:function(){return N.PNGetMembersOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h,p,f,g,m,y={include:[]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.statusField)&&y.include.push("status"),(null===(i=t.include)||void 0===i?void 0:i.customFields)&&y.include.push("custom"),(null===(r=t.include)||void 0===r?void 0:r.UUIDFields)&&y.include.push("uuid"),(null===(o=t.include)||void 0===o?void 0:o.customUUIDFields)&&y.include.push("uuid.custom"),(null===(a=t.include)||void 0===a?void 0:a.UUIDStatusField)&&y.include.push("uuid.status"),(null===(s=t.include)||void 0===s?void 0:s.UUIDTypeField)&&y.include.push("uuid.type")),y.include=y.include.join(","),(null===(u=null==t?void 0:t.include)||void 0===u?void 0:u.totalCount)&&(y.count=null===(c=t.include)||void 0===c?void 0:c.totalCount),(null===(d=null==t?void 0:t.page)||void 0===d?void 0:d.next)&&(y.start=null===(h=t.page)||void 0===h?void 0:h.next),(null===(p=null==t?void 0:t.page)||void 0===p?void 0:p.prev)&&(y.end=null===(f=t.page)||void 0===f?void 0:f.prev),(null==t?void 0:t.filter)&&(y.filter=t.filter),y.limit=null!==(g=null==t?void 0:t.limit)&&void 0!==g?g:100,(null==t?void 0:t.sort)&&(y.sort=Object.entries(null!==(m=t.sort)&&void 0!==m?m:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),y},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ie={getOperation:function(){return N.PNSetMembersOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.uuids)&&0!==(null==t?void 0:t.uuids.length)?void 0:"UUIDs cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/uuids")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.uuids.map(function(e){return"string"==typeof e?{uuid:{id:e}}:{uuid:{id:e.id},custom:e.custom,status:e.status}}),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["uuid.status","uuid.type","type"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customUUIDFields)&&h.include.push("uuid.custom"),(null===(r=t.include)||void 0===r?void 0:r.UUIDFields)&&h.include.push("uuid")),h.include=h.include.join(","),(null===(o=null==t?void 0:t.include)||void 0===o?void 0:o.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ne={getOperation:function(){return N.PNGetMembershipsOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h,p,f,g,m,y={include:[]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.statusField)&&y.include.push("status"),(null===(i=t.include)||void 0===i?void 0:i.customFields)&&y.include.push("custom"),(null===(r=t.include)||void 0===r?void 0:r.channelFields)&&y.include.push("channel"),(null===(o=t.include)||void 0===o?void 0:o.customChannelFields)&&y.include.push("channel.custom"),(null===(a=t.include)||void 0===a?void 0:a.channelStatusField)&&y.include.push("channel.status"),(null===(s=t.include)||void 0===s?void 0:s.channelTypeField)&&y.include.push("channel.type")),y.include=y.include.join(","),(null===(u=null==t?void 0:t.include)||void 0===u?void 0:u.totalCount)&&(y.count=null===(c=t.include)||void 0===c?void 0:c.totalCount),(null===(d=null==t?void 0:t.page)||void 0===d?void 0:d.next)&&(y.start=null===(h=t.page)||void 0===h?void 0:h.next),(null===(p=null==t?void 0:t.page)||void 0===p?void 0:p.prev)&&(y.end=null===(f=t.page)||void 0===f?void 0:f.prev),(null==t?void 0:t.filter)&&(y.filter=t.filter),y.limit=null!==(g=null==t?void 0:t.limit)&&void 0!==g?g:100,(null==t?void 0:t.sort)&&(y.sort=Object.entries(null!==(m=t.sort)&&void 0!==m?m:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),y},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},De={getOperation:function(){return N.PNSetMembershipsOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)||0===(null==t?void 0:t.channels.length))return"Channels cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.channels.map(function(e){return"string"==typeof e?{channel:{id:e}}:{channel:{id:e.id},custom:e.custom,status:e.status}}),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["channel.status","channel.type","status"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customChannelFields)&&h.include.push("channel.custom"),(null===(r=t.include)||void 0===r?void 0:r.channelFields)&&h.include.push("channel")),h.include=h.include.join(","),(null===(o=null==t?void 0:t.include)||void 0===o?void 0:o.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ue=Object.freeze({__proto__:null,getOperation:function(){return N.PNAccessManagerAudit},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/audit/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channel,i=t.channelGroup,r=t.authKeys,o=void 0===r?[]:r,a={};return n&&(a.channel=n),i&&(a["channel-group"]=i),o.length>0&&(a.auth=o.join(",")),a},handleResponse:function(e,t){return t.payload}}),Le=Object.freeze({__proto__:null,getOperation:function(){return N.PNAccessManagerGrant},validateParams:function(e,t){var n=e.config;return n.subscribeKey?n.publishKey?n.secretKey?null==t.uuids||t.authKeys?null==t.uuids||null==t.channels&&null==t.channelGroups?void 0:"Both channel/channelgroup and uuid cannot be used in the same request":"authKeys are required for grant request on uuids":"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/grant/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channels,i=void 0===n?[]:n,r=t.channelGroups,o=void 0===r?[]:r,a=t.uuids,s=void 0===a?[]:a,l=t.ttl,u=t.read,c=void 0!==u&&u,d=t.write,h=void 0!==d&&d,p=t.manage,f=void 0!==p&&p,g=t.get,m=void 0!==g&&g,y=t.join,b=void 0!==y&&y,v=t.update,w=void 0!==v&&v,C=t.authKeys,x=void 0===C?[]:C,A=t.delete,S={};return S.r=c?"1":"0",S.w=h?"1":"0",S.m=f?"1":"0",S.d=A?"1":"0",S.g=m?"1":"0",S.j=b?"1":"0",S.u=w?"1":"0",i.length>0&&(S.channel=i.join(",")),o.length>0&&(S["channel-group"]=o.join(",")),x.length>0&&(S.auth=x.join(",")),s.length>0&&(S["target-uuid"]=s.join(",")),(l||0===l)&&(S.ttl=l),S},handleResponse:function(){return{}}});function Re(e){var t,n,i,r,o=void 0!==(null==e?void 0:e.authorizedUserId),a=void 0!==(null===(t=null==e?void 0:e.resources)||void 0===t?void 0:t.users),s=void 0!==(null===(n=null==e?void 0:e.resources)||void 0===n?void 0:n.spaces),l=void 0!==(null===(i=null==e?void 0:e.patterns)||void 0===i?void 0:i.users),u=void 0!==(null===(r=null==e?void 0:e.patterns)||void 0===r?void 0:r.spaces);return l||a||u||s||o}function Be(e){var t=0;return e.join&&(t|=128),e.update&&(t|=64),e.get&&(t|=32),e.delete&&(t|=8),e.manage&&(t|=4),e.write&&(t|=2),e.read&&(t|=1),t}function je(e,t){if(Re(t))return function(e,t){var n=t.ttl,i=t.resources,r=t.patterns,o=t.meta,a=t.authorizedUserId,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.users,u=i.spaces,c=i.groups;l&&Object.keys(l).forEach(function(e){s.permissions.resources.uuids[e]=Be(l[e])}),u&&Object.keys(u).forEach(function(e){s.permissions.resources.channels[e]=Be(u[e])}),c&&Object.keys(c).forEach(function(e){s.permissions.resources.groups[e]=Be(c[e])})}if(r){var d=r.users,h=r.spaces,p=r.groups;d&&Object.keys(d).forEach(function(e){s.permissions.patterns.uuids[e]=Be(d[e])}),h&&Object.keys(h).forEach(function(e){s.permissions.patterns.channels[e]=Be(h[e])}),p&&Object.keys(p).forEach(function(e){s.permissions.patterns.groups[e]=Be(p[e])})}return(n||0===n)&&(s.ttl=n),o&&(s.permissions.meta=o),a&&(s.permissions.uuid="".concat(a)),s}(0,t);var n=t.ttl,i=t.resources,r=t.patterns,o=t.meta,a=t.authorized_uuid,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.uuids,u=i.channels,c=i.groups;l&&Object.keys(l).forEach(function(e){s.permissions.resources.uuids[e]=Be(l[e])}),u&&Object.keys(u).forEach(function(e){s.permissions.resources.channels[e]=Be(u[e])}),c&&Object.keys(c).forEach(function(e){s.permissions.resources.groups[e]=Be(c[e])})}if(r){var d=r.uuids,h=r.channels,p=r.groups;d&&Object.keys(d).forEach(function(e){s.permissions.patterns.uuids[e]=Be(d[e])}),h&&Object.keys(h).forEach(function(e){s.permissions.patterns.channels[e]=Be(h[e])}),p&&Object.keys(p).forEach(function(e){s.permissions.patterns.groups[e]=Be(p[e])})}return(n||0===n)&&(s.ttl=n),o&&(s.permissions.meta=o),a&&(s.permissions.uuid="".concat(a)),s}var Fe=Object.freeze({__proto__:null,getOperation:function(){return N.PNAccessManagerGrantToken},extractPermissions:Be,validateParams:function(e,t){var n,i,r,o,a,s,l=e.config;if(!l.subscribeKey)return"Missing Subscribe Key";if(!l.publishKey)return"Missing Publish Key";if(!l.secretKey)return"Missing Secret Key";if(!t.resources&&!t.patterns)return"Missing either Resources or Patterns.";var u=void 0!==(null==t?void 0:t.authorized_uuid),c=void 0!==(null===(n=null==t?void 0:t.resources)||void 0===n?void 0:n.uuids),d=void 0!==(null===(i=null==t?void 0:t.resources)||void 0===i?void 0:i.channels),h=void 0!==(null===(r=null==t?void 0:t.resources)||void 0===r?void 0:r.groups),p=void 0!==(null===(o=null==t?void 0:t.patterns)||void 0===o?void 0:o.uuids),f=void 0!==(null===(a=null==t?void 0:t.patterns)||void 0===a?void 0:a.channels),g=void 0!==(null===(s=null==t?void 0:t.patterns)||void 0===s?void 0:s.groups),m=u||c||p||d||f||h||g;return Re(t)&&m?"Cannot mix `users`, `spaces` and `authorizedUserId` with `uuids`, `channels`, `groups` and `authorized_uuid`":(!t.resources||t.resources.uuids&&0!==Object.keys(t.resources.uuids).length||t.resources.channels&&0!==Object.keys(t.resources.channels).length||t.resources.groups&&0!==Object.keys(t.resources.groups).length||t.resources.users&&0!==Object.keys(t.resources.users).length||t.resources.spaces&&0!==Object.keys(t.resources.spaces).length)&&(!t.patterns||t.patterns.uuids&&0!==Object.keys(t.patterns.uuids).length||t.patterns.channels&&0!==Object.keys(t.patterns.channels).length||t.patterns.groups&&0!==Object.keys(t.patterns.groups).length||t.patterns.users&&0!==Object.keys(t.patterns.users).length||t.patterns.spaces&&0!==Object.keys(t.patterns.spaces).length)?void 0:"Missing values for either Resources or Patterns."},postURL:function(e){var t=e.config;return"/v3/pam/".concat(t.subscribeKey,"/grant")},usePost:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(){return{}},postPayload:function(e,t){return je(0,t)},handleResponse:function(e,t){return t.data.token}}),He={getOperation:function(){return N.PNAccessManagerRevokeToken},validateParams:function(e,t){return e.config.secretKey?t?void 0:"token can't be empty":"Missing Secret Key"},getURL:function(e,t){var n=e.config;return"/v3/pam/".concat(n.subscribeKey,"/grant/").concat(G.encodeString(t))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e){return{uuid:e.config.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}};function $e(e,t){var n=JSON.stringify(t);if(e.cryptoModule){var i=e.cryptoModule.encrypt(n);n="string"==typeof i?i:v(i),n=JSON.stringify(n)}return n||""}var ze=Object.freeze({__proto__:null,getOperation:function(){return N.PNPublishOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},usePost:function(e,t){var n=t.sendByPost;return void 0!==n&&n},getURL:function(e,t){var n=e.config,i=t.channel,r=$e(e,t.message);return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(G.encodeString(i),"/0/").concat(G.encodeString(r))},postURL:function(e,t){var n=e.config,i=t.channel;return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(G.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},postPayload:function(e,t){return $e(e,t.message)},prepareParams:function(e,t){var n=t.meta,i=t.replicate,r=void 0===i||i,o=t.storeInHistory,a=t.ttl,s={};return null!=o&&(s.store=o?"1":"0"),a&&(s.ttl=a),!1===r&&(s.norep="true"),n&&"object"==typeof n&&(s.meta=JSON.stringify(n)),s},handleResponse:function(e,t){return{timetoken:t[2]}}}),Ge=Object.freeze({__proto__:null,getOperation:function(){return N.PNSignalOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},getURL:function(e,t){var n,i=e.config,r=t.channel,o=(n=t.message,JSON.stringify(n));return"/signal/".concat(i.publishKey,"/").concat(i.subscribeKey,"/0/").concat(G.encodeString(r),"/0/").concat(G.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{timetoken:t[2]}}}),Qe=Object.freeze({__proto__:null,getOperation:function(){return N.PNHistoryOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channel,i=e.config;return"/v2/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,r=t.reverse,o=t.count,a=void 0===o?100:o,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d={include_token:"true"};return d.count=a,n&&(d.start=n),i&&(d.end=i),l&&(d.string_message_token="true"),null!=r&&(d.reverse=r.toString()),c&&(d.include_meta="true"),d},handleResponse:function(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return Array.isArray(t[0])&&t[0].forEach(function(t){var i=function(e,t){var n={};if(!e.cryptoModule)return n.payload=t,n;try{var i=e.cryptoModule.decrypt(t),r=i instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(i)):i;return n.payload=r,n}catch(i){e.config.logVerbosity&&console&&console.log,n.payload=t,n.error="Error while decrypting message content: ".concat(i.message)}return n}(e,t.message),r={timetoken:t.timetoken,entry:i.payload};t.meta&&(r.meta=t.meta),i.error&&(r.error=i.error),n.messages.push(r)}),n}}),qe=Object.freeze({__proto__:null,getOperation:function(){return N.PNDeleteMessagesOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},useDelete:function(){return!0},getURL:function(e,t){var n=t.channel,i=e.config;return"/v3/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,r={};return n&&(r.start=n),i&&(r.end=i),r},handleResponse:function(e,t){return t.payload}}),We=Object.freeze({__proto__:null,getOperation:function(){return N.PNMessageCounts},validateParams:function(e,t){var n=t.channels,i=t.timetoken,r=t.channelTimetokens,o=e.config;return n?i&&r?"timetoken and channelTimetokens are incompatible together":r&&r.length>1&&n.length!==r.length?"Length of channelTimetokens and channels do not match":o.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channels,i=e.config,r=n.join(",");return"/v3/history/sub-key/".concat(i.subscribeKey,"/message-counts/").concat(G.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.timetoken,i=t.channelTimetokens,r={};if(i&&1===i.length){var o=l(i,1)[0];r.timetoken=o}else i?r.channelsTimetoken=i.join(","):n&&(r.timetoken=n);return r},handleResponse:function(e,t){return{channels:t.channels}}}),Ve=Object.freeze({__proto__:null,getOperation:function(){return N.PNFetchMessagesOperation},validateParams:function(e,t){var n=t.channels,i=t.includeMessageActions,r=void 0!==i&&i,o=e.config;if(!n||0===n.length)return"Missing channels";if(!o.subscribeKey)return"Missing Subscribe Key";if(r&&n.length>1)throw new TypeError("History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.")},getURL:function(e,t){var n=t.channels,i=void 0===n?[]:n,r=t.includeMessageActions,o=void 0!==r&&r,a=e.config,s=o?"history-with-actions":"history",l=i.length>0?i.join(","):",";return"/v3/".concat(s,"/sub-key/").concat(a.subscribeKey,"/channel/").concat(G.encodeString(l))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels,i=t.start,r=t.end,o=t.includeMessageActions,a=t.count,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d=t.includeUuid,h=t.includeUUID,p=void 0===h||h,f=t.includeMessageType,g=void 0===f||f,m={};return m.max=a||(n.length>1||!0===o?25:100),i&&(m.start=i),r&&(m.end=r),l&&(m.string_message_token="true"),c&&(m.include_meta="true"),p&&!1!==d&&(m.include_uuid="true"),g&&(m.include_message_type="true"),m},handleResponse:function(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(i){n.channels[i]=[],(t.channels[i]||[]).forEach(function(t){var r={},o=function(e,t){var n={};if(!e.cryptoModule)return n.payload=t,n;try{var i=e.cryptoModule.decrypt(t),r=i instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(i)):i;return n.payload=r,n}catch(i){e.config.logVerbosity&&console&&console.log,n.payload=t,n.error="Error while decrypting message content: ".concat(i.message)}return n}(e,t.message);r.channel=i,r.timetoken=t.timetoken,r.message=o.payload,r.messageType=t.message_type,r.uuid=t.uuid,t.actions&&(r.actions=t.actions,r.data=t.actions),t.meta&&(r.meta=t.meta),o.error&&(r.error=o.error),n.channels[i].push(r)})}),t.more&&(n.more=t.more),n}}),Ye=Object.freeze({__proto__:null,getOperation:function(){return N.PNTimeOperation},getURL:function(){return"/time/0"},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},isAuthSupported:function(){return!1},handleResponse:function(e,t){return{timetoken:t[0]}},validateParams:function(){}}),Ke=Object.freeze({__proto__:null,getOperation:function(){return N.PNSubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(G.encodeString(o),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=e.config,i=t.state,r=t.channelGroups,o=void 0===r?[]:r,a=t.timetoken,s=t.filterExpression,l=t.region,u={heartbeat:n.getPresenceTimeout()};return o.length>0&&(u["channel-group"]=o.join(",")),s&&s.length>0&&(u["filter-expr"]=s),Object.keys(i).length&&(u.state=JSON.stringify(i)),a&&(u.tt=a),l&&(u.tr=l),u},handleResponse:function(e,t){var n=[];t.m.forEach(function(e){var t={timetoken:e.p.t,region:e.p.r},i={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(i)});var i={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:i}}}),Xe={getOperation:function(){return N.PNHandshakeOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)&&!(null==t?void 0:t.channelGroups))return"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(G.encodeString(o),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),n.tt=0,t.state&&(n.state=JSON.stringify(t.state)),t.filterExpression&&t.filterExpression.length>0&&(n["filter-expr"]=t.filterExpression),n.ee="",n},handleResponse:function(e,t){return{region:t.t.r,timetoken:t.t.t}}},Ze={getOperation:function(){return N.PNReceiveMessagesOperation},validateParams:function(e,t){return(null==t?void 0:t.channels)||(null==t?void 0:t.channelGroups)?(null==t?void 0:t.timetoken)?(null==t?void 0:t.region)?void 0:"region can not be empty":"timetoken can not be empty":"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(G.encodeString(o),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},getAbortSignal:function(e,t){return t.abortSignal},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),t.filterExpression&&t.filterExpression.length>0&&(n["filter-expr"]=t.filterExpression),n.tt=t.timetoken,n.tr=t.region,n.ee="",n},handleResponse:function(e,t){var n=[];return t.m.forEach(function(e){var t={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:{timetoken:e.p.t,region:e.p.r}};n.push(t)}),{messages:n,metadata:{region:t.t.r,timetoken:t.t.t}}}},Je=function(){function e(e){void 0===e&&(e=!1),this.sync=e,this.listeners=new Set}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},e.prototype.notify=function(e){var t=this,n=function(){t.listeners.forEach(function(t){t(e)})};this.sync?n():setTimeout(n,0)},e}(),et=function(){function e(e){this.label=e,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}return e.prototype.transition=function(e,t){var n;if(this.transitionMap.has(t.type))return null===(n=this.transitionMap.get(t.type))||void 0===n?void 0:n(e,t)},e.prototype.on=function(e,t){return this.transitionMap.set(e,t),this},e.prototype.with=function(e,t){return[this,e,null!=t?t:[]]},e.prototype.onEnter=function(e){return this.enterEffects.push(e),this},e.prototype.onExit=function(e){return this.exitEffects.push(e),this},e}(),tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.describe=function(e){return new et(e)},n.prototype.start=function(e,t){this.currentState=e,this.currentContext=t,this.notify({type:"engineStarted",state:e,context:t})},n.prototype.transition=function(e){var t,n,i,r,o,a;if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:e});var u=this.currentState.transition(this.currentContext,e);if(u){var c=l(u,3),d=c[0],h=c[1],p=c[2];try{for(var f=s(this.currentState.exitEffects),g=f.next();!g.done;g=f.next()){var m=g.value;this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var y=this.currentState;this.currentState=d;var b=this.currentContext;this.currentContext=h,this.notify({type:"transitionDone",fromState:y,fromContext:b,toState:d,toContext:h,event:e});try{for(var v=s(p),w=v.next();!w.done;w=v.next())m=w.value,this.notify({type:"invocationDispatched",invocation:m})}catch(e){i={error:e}}finally{try{w&&!w.done&&(r=v.return)&&r.call(v)}finally{if(i)throw i.error}}try{for(var C=s(this.currentState.enterEffects),x=C.next();!x.done;x=C.next())m=x.value,this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}catch(e){o={error:e}}finally{try{x&&!x.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}}},n}(Je),nt=function(){function e(e){this.dependencies=e,this.instances=new Map,this.handlers=new Map}return e.prototype.on=function(e,t){this.handlers.set(e,t)},e.prototype.dispatch=function(e){if("CANCEL"!==e.type){var t=this.handlers.get(e.type);if(!t)throw new Error("Unhandled invocation '".concat(e.type,"'"));var n=t(e.payload,this.dependencies);e.managed&&this.instances.set(e.type,n),n.start()}else if(this.instances.has(e.payload)){var i=this.instances.get(e.payload);null==i||i.cancel(),this.instances.delete(e.payload)}},e.prototype.dispose=function(){var e,t;try{for(var n=s(this.instances.entries()),i=n.next();!i.done;i=n.next()){var r=l(i.value,2),o=r[0];r[1].cancel(),this.instances.delete(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e}();function it(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:null==t?void 0:t.apply(void 0,u([],l(n),!1))}};return n.type=e,n}function rt(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:t.apply(void 0,u([],l(n),!1)),managed:!1}};return n.type=e,n}function ot(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:t.apply(void 0,u([],l(n),!1)),managed:!0}};return n.type=e,n.cancel={type:"CANCEL",payload:e,managed:!1},n}var at=function(e){function n(){var t=this.constructor,n=e.call(this,"The operation was aborted.")||this;return n.name="AbortError",Object.setPrototypeOf(n,t.prototype),n}return t(n,e),n}(Error),st=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._aborted=!1,t}return t(n,e),Object.defineProperty(n.prototype,"aborted",{get:function(){return this._aborted},enumerable:!1,configurable:!0}),n.prototype.throwIfAborted=function(){if(this._aborted)throw new at},n.prototype.abort=function(){this._aborted=!0,this.notify(new at)},n}(Je),lt=function(e){function n(t,n,i){var r=e.call(this,t,n)||this;return r.asyncFunction=i,r.abortSignal=new st,r}return t(n,e),n.prototype.start=function(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies).catch(function(e){})},n.prototype.cancel=function(){this.abortSignal.abort()},n}(function(e,t){this.payload=e,this.dependencies=t}),ut=function(e){return function(t,n){return new lt(t,n,e)}},ct=ot("HANDSHAKE",function(e,t){return{channels:e,groups:t}}),dt=ot("RECEIVE_MESSAGES",function(e,t,n){return{channels:e,groups:t,cursor:n}}),ht=rt("EMIT_MESSAGES",function(e){return e}),pt=rt("EMIT_STATUS",function(e){return e}),ft=ot("RECEIVE_RECONNECT",function(e){return e}),gt=ot("HANDSHAKE_RECONNECT",function(e){return e}),mt=it("SUBSCRIPTION_CHANGED",function(e,t){return{channels:e,groups:t}}),yt=it("SUBSCRIPTION_RESTORED",function(e,t,n,i){return{channels:e,groups:t,cursor:{timetoken:n,region:null!=i?i:0}}}),bt=it("HANDSHAKE_SUCCESS",function(e){return e}),vt=it("HANDSHAKE_FAILURE",function(e){return e}),wt=it("HANDSHAKE_RECONNECT_SUCCESS",function(e){return{cursor:e}}),Ct=it("HANDSHAKE_RECONNECT_FAILURE",function(e){return e}),xt=it("HANDSHAKE_RECONNECT_GIVEUP",function(e){return e}),At=it("RECEIVE_SUCCESS",function(e,t){return{cursor:e,events:t}}),St=it("RECEIVE_FAILURE",function(e){return e}),Et=it("RECEIVE_RECONNECT_SUCCESS",function(e,t){return{cursor:e,events:t}}),Tt=it("RECEIVE_RECONNECT_FAILURE",function(e){return e}),kt=it("RECEIVING_RECONNECT_GIVEUP",function(e){return e}),_t=it("DISCONNECT",function(){return{}}),Ot=it("RECONNECT",function(e,t){return{cursor:{timetoken:null!=e?e:"",region:null!=t?t:0}}}),Pt=it("UNSUBSCRIBE_ALL",function(){return{}}),Mt=function(e){function n(t,n){var r=e.call(this,n)||this;return r.on(ct.type,ut(function(e,n,s){var l=s.handshake,u=s.presenceState,c=s.config;return o(r,void 0,void 0,function(){var r,o;return a(this,function(a){switch(a.label){case 0:n.throwIfAborted(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,l(i({abortSignal:n,channels:e.channels,channelGroups:e.groups,filterExpression:c.filterExpression},c.maintainPresenceState&&{state:u}))];case 2:return r=a.sent(),[2,t.transition(bt(r))];case 3:return(o=a.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof Q?[2,t.transition(vt(o))]:[3,4];case 4:return[2]}})})})),r.on(dt.type,ut(function(e,n,i){var s=i.receiveMessages,l=i.config;return o(r,void 0,void 0,function(){var i,r;return a(this,function(o){switch(o.label){case 0:n.throwIfAborted(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region,filterExpression:l.filterExpression})];case 2:return i=o.sent(),t.transition(At(i.metadata,i.messages)),[3,4];case 3:return(r=o.sent())instanceof Error&&"Aborted"===r.message?[2]:r instanceof Q&&!n.aborted?[2,t.transition(St(r))]:[3,4];case 4:return[2]}})})})),r.on(ht.type,ut(function(e,t,n){var i=n.emitMessages;return o(r,void 0,void 0,function(){return a(this,function(t){return e.length>0&&i(e),[2]})})})),r.on(pt.type,ut(function(e,t,n){var i=n.emitStatus;return o(r,void 0,void 0,function(){return a(this,function(t){return i(e),[2]})})})),r.on(ft.type,ut(function(e,n,i){var s=i.receiveMessages,l=i.delay,u=i.config;return o(r,void 0,void 0,function(){var i,r;return a(this,function(o){switch(o.label){case 0:return u.retryConfiguration&&u.retryConfiguration.shouldRetry(e.reason,e.attempts)?(n.throwIfAborted(),[4,l(u.retryConfiguration.getDelay(e.attempts,e.reason))]):[3,6];case 1:o.sent(),n.throwIfAborted(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region,filterExpression:u.filterExpression})];case 3:return i=o.sent(),[2,t.transition(Et(i.metadata,i.messages))];case 4:return(r=o.sent())instanceof Error&&"Aborted"===r.message?[2]:r instanceof Q?[2,t.transition(Tt(r))]:[3,5];case 5:return[3,7];case 6:return[2,t.transition(kt(new Q(u.retryConfiguration.getGiveupReason(e.reason,e.attempts))))];case 7:return[2]}})})})),r.on(gt.type,ut(function(e,n,s){var l=s.handshake,u=s.delay,c=s.presenceState,d=s.config;return o(r,void 0,void 0,function(){var r,o;return a(this,function(a){switch(a.label){case 0:return d.retryConfiguration&&d.retryConfiguration.shouldRetry(e.reason,e.attempts)?(n.throwIfAborted(),[4,u(d.retryConfiguration.getDelay(e.attempts,e.reason))]):[3,6];case 1:a.sent(),n.throwIfAborted(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,l(i({abortSignal:n,channels:e.channels,channelGroups:e.groups,filterExpression:d.filterExpression},d.maintainPresenceState&&{state:c}))];case 3:return r=a.sent(),[2,t.transition(wt(r))];case 4:return(o=a.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof Q?[2,t.transition(Ct(o))]:[3,5];case 5:return[3,7];case 6:return[2,t.transition(xt(new Q(d.retryConfiguration.getGiveupReason(e.reason,e.attempts))))];case 7:return[2]}})})})),r}return t(n,e),n}(nt),It=new et("HANDSHAKE_FAILED");It.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),It.on(Ot.type,function(e,t){return jt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor||e.cursor})}),It.on(yt.type,function(e,t){var n,i;return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region?t.payload.cursor.region:null!==(i=null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)&&void 0!==i?i:0}})}),It.on(Pt.type,function(e){return Ft.with()});var Nt=new et("HANDSHAKE_STOPPED");Nt.on(mt.type,function(e,t){return Nt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Nt.on(Ot.type,function(e,t){return jt.with(i(i({},e),{cursor:t.payload.cursor||e.cursor}))}),Nt.on(yt.type,function(e,t){var n;return Nt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)||0}})}),Nt.on(Pt.type,function(e){return Ft.with()});var Dt=new et("RECEIVE_FAILED");Dt.on(Ot.type,function(e,t){var n;return jt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(n=t.payload.cursor)||void 0===n?void 0:n.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Dt.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Dt.on(yt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Dt.on(Pt.type,function(e){return Ft.with(void 0)});var Ut=new et("RECEIVE_STOPPED");Ut.on(mt.type,function(e,t){return Ut.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Ut.on(yt.type,function(e,t){return Ut.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Ut.on(Ot.type,function(e,t){var n;return jt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(n=t.payload.cursor)||void 0===n?void 0:n.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Ut.on(Pt.type,function(){return Ft.with(void 0)});var Lt=new et("RECEIVE_RECONNECTING");Lt.onEnter(function(e){return ft(e)}),Lt.onExit(function(){return ft.cancel}),Lt.on(Et.type,function(e,t){return Rt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[ht(t.payload.events)])}),Lt.on(Tt.type,function(e,t){return Lt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))}),Lt.on(kt.type,function(e,t){var n;return Dt.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[pt({category:M.PNDisconnectedUnexpectedlyCategory,error:null===(n=t.payload)||void 0===n?void 0:n.message})])}),Lt.on(_t.type,function(e){return Ut.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[pt({category:M.PNDisconnectedCategory})])}),Lt.on(yt.type,function(e,t){return Rt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Lt.on(mt.type,function(e,t){return Rt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Lt.on(Pt.type,function(e){return Ft.with(void 0,[pt({category:M.PNDisconnectedCategory})])});var Rt=new et("RECEIVING");Rt.onEnter(function(e){return dt(e.channels,e.groups,e.cursor)}),Rt.onExit(function(){return dt.cancel}),Rt.on(At.type,function(e,t){return Rt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[ht(t.payload.events)])}),Rt.on(mt.type,function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Ft.with(void 0):Rt.with({cursor:e.cursor,channels:t.payload.channels,groups:t.payload.groups})}),Rt.on(yt.type,function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Ft.with(void 0):Rt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Rt.on(St.type,function(e,t){return Lt.with(i(i({},e),{attempts:0,reason:t.payload}))}),Rt.on(_t.type,function(e){return Ut.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[pt({category:M.PNDisconnectedCategory})])}),Rt.on(Pt.type,function(e){return Ft.with(void 0,[pt({category:M.PNDisconnectedCategory})])});var Bt=new et("HANDSHAKE_RECONNECTING");Bt.onEnter(function(e){return gt(e)}),Bt.onExit(function(){return gt.cancel}),Bt.on(wt.type,function(e,t){var n,i,r={timetoken:(null===(n=e.cursor)||void 0===n?void 0:n.timetoken)?null===(i=e.cursor)||void 0===i?void 0:i.timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region};return Rt.with({channels:e.channels,groups:e.groups,cursor:r},[pt({category:M.PNConnectedCategory})])}),Bt.on(Ct.type,function(e,t){return Bt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))}),Bt.on(xt.type,function(e,t){var n;return It.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[pt({category:M.PNConnectionErrorCategory,error:null===(n=t.payload)||void 0===n?void 0:n.message})])}),Bt.on(_t.type,function(e){return Nt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}),Bt.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Bt.on(yt.type,function(e,t){var n,i;return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:(null===(n=t.payload.cursor)||void 0===n?void 0:n.region)||(null===(i=null==e?void 0:e.cursor)||void 0===i?void 0:i.region)||0}})}),Bt.on(Pt.type,function(e){return Ft.with(void 0)});var jt=new et("HANDSHAKING");jt.onEnter(function(e){return ct(e.channels,e.groups)}),jt.onExit(function(){return ct.cancel}),jt.on(mt.type,function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Ft.with(void 0):jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),jt.on(bt.type,function(e,t){var n,i;return Rt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.timetoken)?null===(i=null==e?void 0:e.cursor)||void 0===i?void 0:i.timetoken:t.payload.timetoken,region:t.payload.region}},[pt({category:M.PNConnectedCategory})])}),jt.on(vt.type,function(e,t){return Bt.with({channels:e.channels,groups:e.groups,cursor:e.cursor,attempts:0,reason:t.payload})}),jt.on(_t.type,function(e){return Nt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}),jt.on(yt.type,function(e,t){var n;return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)||0}})}),jt.on(Pt.type,function(e){return Ft.with()});var Ft=new et("UNSUBSCRIBED");Ft.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups})}),Ft.on(yt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:t.payload.cursor})});var Ht=function(){function e(e){var t=this;this.engine=new tt,this.channels=[],this.groups=[],this.dependencies=e,this.dispatcher=new Mt(this.engine,e),this._unsubscribeEngine=this.engine.subscribe(function(e){"invocationDispatched"===e.type&&t.dispatcher.dispatch(e.invocation)}),this.engine.start(Ft,void 0)}return Object.defineProperty(e.prototype,"_engine",{get:function(){return this.engine},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){var t=this,n=e.channels,i=e.channelGroups,r=e.timetoken,o=e.withPresence;this.channels=u(u([],l(this.channels),!1),l(null!=n?n:[]),!1),this.groups=u(u([],l(this.groups),!1),l(null!=i?i:[]),!1),o&&(this.channels.map(function(e){return t.channels.push("".concat(e,"-pnpres"))}),this.groups.map(function(e){return t.groups.push("".concat(e,"-pnpres"))})),r?this.engine.transition(yt(Array.from(new Set(u(u([],l(this.channels),!1),l(null!=n?n:[]),!1))),Array.from(new Set(u(u([],l(this.groups),!1),l(null!=i?i:[]),!1))),r)):this.engine.transition(mt(Array.from(new Set(u(u([],l(this.channels),!1),l(null!=n?n:[]),!1))),Array.from(new Set(u(u([],l(this.groups),!1),l(null!=i?i:[]),!1))))),this.dependencies.join&&this.dependencies.join({channels:Array.from(new Set(this.channels.filter(function(e){return!e.endsWith("-pnpres")}))),groups:Array.from(new Set(this.groups.filter(function(e){return!e.endsWith("-pnpres")})))})},e.prototype.unsubscribe=function(e){var t=this,n=e.channels,i=void 0===n?[]:n,r=e.channelGroups,o=void 0===r?[]:r,a=G.removeSingleOccurance(this.channels,u(u([],l(i),!1),l(i.map(function(e){return"".concat(e,"-pnpres")})),!1)),s=G.removeSingleOccurance(this.groups,u(u([],l(o),!1),l(o.map(function(e){return"".concat(e,"-pnpres")})),!1));if(new Set(this.channels).size!==new Set(a).size||new Set(this.groups).size!==new Set(s).size){var c=G.findUniqueCommonElements(this.channels,i),d=G.findUniqueCommonElements(this.groups,o);this.dependencies.presenceState&&(null==c||c.forEach(function(e){return delete t.dependencies.presenceState[e]}),null==d||d.forEach(function(e){return delete t.dependencies.presenceState[e]})),this.channels=a,this.groups=s,this.engine.transition(mt(Array.from(new Set(this.channels.slice(0))),Array.from(new Set(this.groups.slice(0))))),this.dependencies.leave&&this.dependencies.leave({channels:c.slice(0),groups:d.slice(0)})}},e.prototype.unsubscribeAll=function(){this.channels=[],this.groups=[],this.dependencies.presenceState&&(this.dependencies.presenceState={}),this.engine.transition(mt(this.channels.slice(0),this.groups.slice(0))),this.dependencies.leaveAll&&this.dependencies.leaveAll()},e.prototype.reconnect=function(e){var t=e.timetoken,n=e.region;this.engine.transition(Ot(t,n))},e.prototype.disconnect=function(){this.engine.transition(_t()),this.dependencies.leaveAll&&this.dependencies.leaveAll()},e.prototype.getSubscribedChannels=function(){return Array.from(new Set(this.channels))},e.prototype.getSubscribedChannelGroups=function(){return Array.from(new Set(this.groups))},e.prototype.dispose=function(){this.disconnect(),this._unsubscribeEngine(),this.dispatcher.dispose()},e}(),$t=it("RECONNECT",function(){return{}}),zt=it("DISCONNECT",function(){return{}}),Gt=it("JOINED",function(e,t){return{channels:e,groups:t}}),Qt=it("LEFT",function(e,t){return{channels:e,groups:t}}),qt=it("LEFT_ALL",function(){return{}}),Wt=it("HEARTBEAT_SUCCESS",function(e){return{statusCode:e}}),Vt=it("HEARTBEAT_FAILURE",function(e){return e}),Yt=it("HEARTBEAT_GIVEUP",function(){return{}}),Kt=it("TIMES_UP",function(){return{}}),Xt=rt("HEARTBEAT",function(e,t){return{channels:e,groups:t}}),Zt=rt("LEAVE",function(e,t){return{channels:e,groups:t}}),Jt=rt("EMIT_STATUS",function(e){return e}),en=ot("WAIT",function(){return{}}),tn=ot("DELAYED_HEARTBEAT",function(e){return e}),nn=function(e){function n(t,n){var r=e.call(this,n)||this;return r.on(Xt.type,ut(function(e,n,s){var l=s.heartbeat,u=s.presenceState,c=s.config;return o(r,void 0,void 0,function(){var n;return a(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,l(i({channels:e.channels,channelGroups:e.groups},c.maintainPresenceState&&{state:u}))];case 1:return r.sent(),t.transition(Wt(200)),[3,3];case 2:return(n=r.sent())instanceof Q?[2,t.transition(Vt(n))]:[3,3];case 3:return[2]}})})})),r.on(Zt.type,ut(function(e,t,n){var i=n.leave,s=n.config;return o(r,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:if(s.suppressLeaveEvents)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i({channels:e.channels,channelGroups:e.groups})];case 2:case 3:return t.sent(),[3,4];case 4:return[2]}})})})),r.on(en.type,ut(function(e,n,i){var s=i.heartbeatDelay;return o(r,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return n.throwIfAborted(),[4,s()];case 1:return e.sent(),n.throwIfAborted(),[2,t.transition(Kt())]}})})})),r.on(tn.type,ut(function(e,n,s){var l=s.heartbeat,u=s.retryDelay,c=s.presenceState,d=s.config;return o(r,void 0,void 0,function(){var r;return a(this,function(o){switch(o.label){case 0:return d.retryConfiguration&&d.retryConfiguration.shouldRetry(e.reason,e.attempts)?(n.throwIfAborted(),[4,u(d.retryConfiguration.getDelay(e.attempts,e.reason))]):[3,6];case 1:o.sent(),n.throwIfAborted(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,l(i({channels:e.channels,channelGroups:e.groups},d.maintainPresenceState&&{state:c}))];case 3:return o.sent(),[2,t.transition(Wt(200))];case 4:return(r=o.sent())instanceof Error&&"Aborted"===r.message?[2]:r instanceof Q?[2,t.transition(Vt(r))]:[3,5];case 5:return[3,7];case 6:return[2,t.transition(Yt())];case 7:return[2]}})})})),r.on(Jt.type,ut(function(e,t,n){var s=n.emitStatus,l=n.config;return o(r,void 0,void 0,function(){var t;return a(this,function(n){return l.announceFailedHeartbeats&&!0===(null===(t=null==e?void 0:e.status)||void 0===t?void 0:t.error)?s(e.status):l.announceSuccessfulHeartbeats&&200===e.statusCode&&s(i(i({},e),{operation:N.PNHeartbeatOperation,error:!1})),[2]})})})),r}return t(n,e),n}(nt),rn=new et("HEARTBEAT_STOPPED");rn.on(Gt.type,function(e,t){return rn.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),rn.on(Qt.type,function(e,t){return rn.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})})}),rn.on($t.type,function(e,t){return ln.with({channels:e.channels,groups:e.groups})}),rn.on(qt.type,function(e,t){return un.with(void 0)});var on=new et("HEARTBEAT_COOLDOWN");on.onEnter(function(){return en()}),on.onExit(function(){return en.cancel}),on.on(Kt.type,function(e,t){return ln.with({channels:e.channels,groups:e.groups})}),on.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),on.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),on.on(zt.type,function(e){return rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),on.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var an=new et("HEARTBEAT_FAILED");an.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),an.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),an.on($t.type,function(e,t){return ln.with({channels:e.channels,groups:e.groups})}),an.on(zt.type,function(e,t){return rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),an.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var sn=new et("HEARBEAT_RECONNECTING");sn.onEnter(function(e){return tn(e)}),sn.onExit(function(){return tn.cancel}),sn.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),sn.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),sn.on(zt.type,function(e,t){rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),sn.on(Wt.type,function(e,t){return on.with({channels:e.channels,groups:e.groups})}),sn.on(Vt.type,function(e,t){return sn.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))}),sn.on(Yt.type,function(e,t){return an.with({channels:e.channels,groups:e.groups})}),sn.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var ln=new et("HEARTBEATING");ln.onEnter(function(e){return Xt(e.channels,e.groups)}),ln.on(Wt.type,function(e,t){return on.with({channels:e.channels,groups:e.groups})}),ln.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),ln.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),ln.on(Vt.type,function(e,t){return sn.with(i(i({},e),{attempts:0,reason:t.payload}))}),ln.on(zt.type,function(e){return rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),ln.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var un=new et("HEARTBEAT_INACTIVE");un.on(Gt.type,function(e,t){return ln.with({channels:t.payload.channels,groups:t.payload.groups})});var cn=function(){function e(e){var t=this;this.engine=new tt,this.channels=[],this.groups=[],this.dispatcher=new nn(this.engine,e),this.dependencies=e,this._unsubscribeEngine=this.engine.subscribe(function(e){"invocationDispatched"===e.type&&t.dispatcher.dispatch(e.invocation)}),this.engine.start(un,void 0)}return Object.defineProperty(e.prototype,"_engine",{get:function(){return this.engine},enumerable:!1,configurable:!0}),e.prototype.join=function(e){var t=e.channels,n=e.groups;this.channels=u(u([],l(this.channels),!1),l(null!=t?t:[]),!1),this.groups=u(u([],l(this.groups),!1),l(null!=n?n:[]),!1),this.engine.transition(Gt(this.channels.slice(0),this.groups.slice(0)))},e.prototype.leave=function(e){var t=this,n=e.channels,i=e.groups;this.dependencies.presenceState&&(null==n||n.forEach(function(e){return delete t.dependencies.presenceState[e]}),null==i||i.forEach(function(e){return delete t.dependencies.presenceState[e]})),this.engine.transition(Qt(null!=n?n:[],null!=i?i:[]))},e.prototype.leaveAll=function(){this.engine.transition(qt())},e.prototype.dispose=function(){this._unsubscribeEngine(),this.dispatcher.dispose()},e}(),dn=function(){function e(){}return e.LinearRetryPolicy=function(e){return{delay:e.delay,maximumRetry:e.maximumRetry,shouldRetry:function(e,t){var n;return 403!==(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)&&this.maximumRetry>t},getDelay:function(e,t){var n;return 1e3*((null!==(n=t.retryAfter)&&void 0!==n?n:this.delay)+Math.random())},getGiveupReason:function(e,t){var n;return this.maximumRetry<=t?"retry attempts exhaused.":403===(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)?"forbidden operation.":"unknown error"}}},e.ExponentialRetryPolicy=function(e){return{minimumDelay:e.minimumDelay,maximumDelay:e.maximumDelay,maximumRetry:e.maximumRetry,shouldRetry:function(e,t){var n;return 403!==(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)&&this.maximumRetry>t},getDelay:function(e,t){var n;return 1e3*((null!==(n=t.retryAfter)&&void 0!==n?n:Math.min(Math.pow(2,e),this.maximumDelay))+Math.random())},getGiveupReason:function(e,t){var n;return this.maximumRetry<=t?"retry attempts exhaused.":403===(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)?"forbidden operation.":"unknown error"}}},e}(),hn=function(){function e(e){var t=e.modules,n=e.listenerManager,i=e.getFileUrl;this.modules=t,this.listenerManager=n,this.getFileUrl=i,this._channelListenerMap=new Map,this._groupListenerMap=new Map,t.cryptoModule&&(this._decoder=new TextDecoder)}return e.prototype.emitEvent=function(e){var t=e.channel,n=e.publishMetaData,o=e.subscriptionMatch;if(t===o&&(o=null),e.channel.endsWith("-pnpres")){var a={channel:null,subscription:null};t&&(a.channel=t.substring(0,t.lastIndexOf("-pnpres"))),o&&(a.subscription=o.substring(0,o.lastIndexOf("-pnpres"))),a.action=e.payload.action,a.state=e.payload.data,a.timetoken=n.timetoken,a.occupancy=e.payload.occupancy,a.uuid=e.payload.uuid,a.timestamp=e.payload.timestamp,e.payload.join&&(a.join=e.payload.join),e.payload.leave&&(a.leave=e.payload.leave),e.payload.timeout&&(a.timeout=e.payload.timeout),a.actualChannel=null!=o?t:null,a.subscribedChannel=null!=o?o:t,this.listenerManager.announcePresence(a),this._announce("presence",a,a.channel,a.subscription)}else if(1===e.messageType)(a={channel:null,subscription:null}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),a.message=e.payload,this.listenerManager.announceSignal(a),this._announce("signal",a,a.channel,a.subscription);else if(2===e.messageType){if((a={channel:null,subscription:null}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),a.message={event:e.payload.event,type:e.payload.type,data:e.payload.data},this.listenerManager.announceObjects(a),this._announce("objects",a,a.channel,a.subscription),"uuid"===e.payload.type){var s=this._renameChannelField(a),l=i(i({},s),{message:i(i({},s.message),{event:this._renameEvent(s.message.event),type:"user"})});this.listenerManager.announceUser(l),this._announce("user",l,a.channel,a.subscription)}else if("channel"===e.payload.type){s=this._renameChannelField(a);var u=i(i({},s),{message:i(i({},s.message),{event:this._renameEvent(s.message.event),type:"space"})});this.listenerManager.announceSpace(u),this._announce("space",u,a.channel,a.subscription)}else if("membership"===e.payload.type){var c=(s=this._renameChannelField(a)).message.data,d=c.uuid,h=c.channel,p=r(c,["uuid","channel"]);p.user=d,p.space=h;var f=i(i({},s),{message:i(i({},s.message),{event:this._renameEvent(s.message.event),data:p})});this.listenerManager.announceMembership(f),this._announce("membership",f,a.channel,a.subscription)}}else if(3===e.messageType)(a={}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,a.data={messageTimetoken:e.payload.data.messageTimetoken,actionTimetoken:e.payload.data.actionTimetoken,type:e.payload.data.type,uuid:e.issuingClientId,value:e.payload.data.value},a.event=e.payload.event,this.listenerManager.announceMessageAction(a),this._announce("messageAction",a,a.channel,a.subscription);else if(4===e.messageType){(a={}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId;var g=e.payload;if(this.modules.cryptoModule){var m=void 0;try{m=(y=this.modules.cryptoModule.decrypt(e.payload))instanceof ArrayBuffer?JSON.parse(this._decoder.decode(y)):y}catch(e){m=null,a.error="Error while decrypting message content: ".concat(e.message)}null!==m&&(g=m)}e.userMetadata&&(a.userMetadata=e.userMetadata),a.message=g.message,a.file={id:g.file.id,name:g.file.name,url:this.getFileUrl({id:g.file.id,name:g.file.name,channel:t})},this.listenerManager.announceFile(a),this._announce("file",a,a.channel,a.subscription)}else{if((a={channel:null,subscription:null}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),this.modules.cryptoModule){m=void 0;try{var y;m=(y=this.modules.cryptoModule.decrypt(e.payload))instanceof ArrayBuffer?JSON.parse(this._decoder.decode(y)):y}catch(e){m=null,a.error="Error while decrypting message content: ".concat(e.message)}a.message=null!=m?m:e.payload}else a.message=e.payload;a.actualChannel=null!=o?t:null,a.subscribedChannel=null!=o?o:t,this.listenerManager.announceMessage(a),this._announce("message",a,a.channel,a.subscription)}},e.prototype.addListener=function(e,t,n){var i=this;t&&n?(null==t||t.forEach(function(t){i._channelListenerMap[t]?i._channelListenerMap[t].includes(e)||i._channelListenerMap[t].push(e):i._channelListenerMap[t]=[e]}),null==n||n.forEach(function(t){i._groupListenerMap[t]?i._groupListenerMap[t].includes(e)||i._groupListenerMap[t].push(e):i._groupListenerMap[t]=[e]})):this.listenerManager.addListener(e)},e.prototype.removeListener=function(e,t,n){var i=this;t&&n?(null==t||t.forEach(function(t){var n;i._channelListenerMap[t]=null===(n=i._channelListenerMap[t])||void 0===n?void 0:n.filter(function(t){return t!==e})}),null==n||n.forEach(function(t){var n;i._groupListenerMap[t]=null===(n=i._groupListenerMap[t])||void 0===n?void 0:n.filter(function(t){return t!==e})})):this.listenerManager.removeListener(e)},e.prototype.removeAllListeners=function(){this.listenerManager.removeAllListeners()},e.prototype._renameEvent=function(e){return"set"===e?"updated":"removed"},e.prototype._renameChannelField=function(e){var t=e.channel,n=r(e,["channel"]);return n.spaceId=t,n},e.prototype._announce=function(e,t,n,i){var r,o;null===(r=this._channelListenerMap[n])||void 0===r||r.forEach(function(n){return n[e]&&n[e](t)}),null===(o=this._groupListenerMap[i])||void 0===o||o.forEach(function(n){return n[e]&&n[e](t)})},e}(),pn=function(){function e(){}return e.prototype.subscribe=function(){var e,t;this.pubnub.subscribe(i({channels:this.channelNames,channelGroups:this.groupNames},(null===(t=null===(e=this.options)||void 0===e?void 0:e.cursor)||void 0===t?void 0:t.timetoken)&&{timetoken:this.options.cursor.timetoken}))},e.prototype.unsubscribe=function(){this.pubnub.unsubscribe({channels:this.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),channelGroups:this.groupNames.filter(function(e){return!e.endsWith("-pnpres")})})},Object.defineProperty(e.prototype,"onMessage",{set:function(e){this.listener.message=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onPresence",{set:function(e){this.listener.presence=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSignal",{set:function(e){this.listener.signal=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onObjects",{set:function(e){this.listener.objects=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMessageAction",{set:function(e){this.listener.messageAction=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onFile",{set:function(e){this.listener.file=e},enumerable:!1,configurable:!0}),e.prototype.addListener=function(e){this.eventEmitter.addListener(e,this.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),this.groupNames.filter(function(e){return!e.endsWith("-pnpres")}))},e.prototype.removeListener=function(e){this.eventEmitter.removeListener(e,this.channelNames,this.groupNames)},Object.defineProperty(e.prototype,"channels",{get:function(){return this.channelNames.slice(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelGroups",{get:function(){return this.groupNames.slice(0)},enumerable:!1,configurable:!0}),e}(),fn=function(e){function n(t){var n=t.channels,i=void 0===n?[]:n,r=t.channelGroups,o=void 0===r?[]:r,a=t.subscriptionOptions,s=t.eventEmitter,c=t.pubnub,d=e.call(this)||this;return d.channelNames=[],d.groupNames=[],d.subscriptionList=[],d.options=a,d.eventEmitter=s,d.pubnub=c,i.filter(function(e){return!e.endsWith("-pnpres")}).forEach(function(e){var t=d.pubnub.channel(e).subscription(d.options);d.channelNames=u(u([],l(d.channelNames),!1),l(t.channels),!1),d.subscriptionList.push(t)}),o.filter(function(e){return!e.endsWith("-pnpres")}).forEach(function(e){var t=d.pubnub.channelGroup(e).subscription(d.options);d.groupNames=u(u([],l(d.groupNames),!1),l(t.channelGroups),!1),d.subscriptionList.push(t)}),d.listener={},s.addListener(d.listener,d.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),d.groupNames.filter(function(e){return!e.endsWith("-pnpres")})),d}return t(n,e),n.prototype.addSubscription=function(e){this.subscriptionList.push(e),this.channelNames=u(u([],l(this.channelNames),!1),l(e.channels),!1),this.groupNames=u(u([],l(this.groupNames),!1),l(e.channelGroups),!1),this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)},n.prototype.removeSubscription=function(e){var t=e.channels,n=e.channelGroups;this.channelNames=this.channelNames.filter(function(e){return!t.includes(e)}),this.groupNames=this.groupNames.filter(function(e){return!n.includes(e)}),this.subscriptionList=this.subscriptionList.filter(function(t){return t!==e}),this.eventEmitter.removeListener(this.listener,t,n)},n.prototype.addSubscriptionSet=function(e){this.subscriptionList=u(u([],l(this.subscriptionList),!1),l(e.subscriptions),!1),this.channelNames=u(u([],l(this.channelNames),!1),l(e.channels),!1),this.groupNames=u(u([],l(this.groupNames),!1),l(e.channelGroups),!1),this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)},n.prototype.removeSubscriptionSet=function(e){var t=e.channels,n=e.channelGroups;this.channelNames=this.channelNames.filter(function(e){return!t.includes(e)}),this.groupNames=this.groupNames.filter(function(e){return!n.includes(e)}),this.subscriptionList=this.subscriptionList.filter(function(t){return!e.subscriptions.includes(t)}),this.eventEmitter.removeListener(this.listener,t,n)},Object.defineProperty(n.prototype,"subscriptions",{get:function(){return this.subscriptionList.slice(0)},enumerable:!1,configurable:!0}),n}(pn),gn=function(e){function n(t){var n=t.channels,i=t.channelGroups,r=t.subscriptionOptions,o=t.eventEmitter,a=t.pubnub,s=e.call(this)||this;return s.channelNames=[],s.groupNames=[],s.channelNames=n,s.groupNames=i,s.options=r,s.pubnub=a,s.eventEmitter=o,s.listener={},o.addListener(s.listener,s.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),s.groupNames.filter(function(e){return!e.endsWith("-pnpres")})),s}return t(n,e),n.prototype.addSubscription=function(e){return new fn({channels:u(u([],l(this.channelNames),!1),l(e.channels),!1),channelGroups:u(u([],l(this.groupNames),!1),l(e.channelGroups),!1),subscriptionOptions:i(i({},this.options),null==e?void 0:e.options),eventEmitter:this.eventEmitter,pubnub:this.pubnub})},n}(pn),mn=function(){function e(e,t,n){this.name=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:(null==e?void 0:e.receivePresenceEvents)?[this.name,"".concat(this.name,"-pnpres")]:[this.name],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),yn=function(){function e(e,t,n){this.name=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:[],channelGroups:(null==e?void 0:e.receivePresenceEvents)?[this.name,"".concat(this.name,"-pnpres")]:[this.name],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),bn=function(){function e(e,t,n){this.id=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),vn=function(){function e(e,t,n){this.id=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),wn=function(){function e(e){var t=this,n=e.networking,r=e.cbor,o=new y({setup:e});this._config=o;var a=new _({config:o}),c=e.cryptography;n.init(o);var d=new H(o,r);this._tokenManager=d;var h=new D({maximumSamplesCount:6e4});this._telemetryManager=h;var p=this._config.cryptoModule,f={config:o,networking:n,crypto:a,cryptography:c,tokenManager:d,telemetryManager:h,PubNubFile:e.PubNubFile,cryptoModule:p};this.File=e.PubNubFile,this.encryptFile=function(e,t){return 1==arguments.length&&"string"!=typeof e&&f.cryptoModule?(t=e,f.cryptoModule.encryptFile(t,this.File)):c.encryptFile(e,t,this.File)},this.decryptFile=function(e,t){return 1==arguments.length&&"string"!=typeof e&&f.cryptoModule?(t=e,f.cryptoModule.decryptFile(t,this.File)):c.decryptFile(e,t,this.File)};var g=X.bind(this,f,Ye),m=X.bind(this,f,se),b=X.bind(this,f,ue),w=X.bind(this,f,de),C=X.bind(this,f,Ke),x=new F;if(this._listenerManager=x,this.iAmHere=X.bind(this,f,ue),this.iAmAway=X.bind(this,f,se),this.setPresenceState=X.bind(this,f,de),this.handshake=X.bind(this,f,Xe),this.receiveMessages=X.bind(this,f,Ze),this._eventEmitter=new hn({modules:f,listenerManager:this._listenerManager,getFileUrl:function(e){return we(f,e)}}),!0===o.enableEventEngine){if(o.maintainPresenceState&&(this.presenceState={},this.setState=function(e){var n,i;return null===(n=e.channels)||void 0===n||n.forEach(function(n){return t.presenceState[n]=e.state}),null===(i=e.channelGroups)||void 0===i||i.forEach(function(n){return t.presenceState[n]=e.state}),t.setPresenceState({channels:e.channels,channelGroups:e.channelGroups,state:t.presenceState})}),o.getHeartbeatInterval()){var A=new cn({heartbeat:this.iAmHere,leave:this.iAmAway,heartbeatDelay:function(){return new Promise(function(e){return setTimeout(e,1e3*f.config.getHeartbeatInterval())})},retryDelay:function(e){return new Promise(function(t){return setTimeout(t,e)})},config:f.config,presenceState:this.presenceState,emitStatus:function(e){x.announceStatus(e)}});this.presenceEventEngine=A,this.join=this.presenceEventEngine.join.bind(A),this.leave=this.presenceEventEngine.leave.bind(A),this.leaveAll=this.presenceEventEngine.leaveAll.bind(A)}var S=new Ht({handshake:this.handshake,receiveMessages:this.receiveMessages,delay:function(e){return new Promise(function(t){return setTimeout(t,e)})},join:this.join,leave:this.leave,leaveAll:this.leaveAll,presenceState:this.presenceState,config:f.config,emitMessages:function(e){var n,i;try{for(var r=s(e),o=r.next();!o.done;o=r.next()){var a=o.value;t._eventEmitter.emitEvent(a)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},emitStatus:function(e){x.announceStatus(e)}});this.subscribe=S.subscribe.bind(S),this.unsubscribe=S.unsubscribe.bind(S),this.unsubscribeAll=S.unsubscribeAll.bind(S),this.reconnect=S.reconnect.bind(S),this.disconnect=S.disconnect.bind(S),this.destroy=S.dispose.bind(S),this.getSubscribedChannels=S.getSubscribedChannels.bind(S),this.getSubscribedChannelGroups=S.getSubscribedChannelGroups.bind(S),this.eventEngine=S}else{var E=new I({timeEndpoint:g,leaveEndpoint:m,heartbeatEndpoint:b,setStateEndpoint:w,subscribeEndpoint:C,crypto:f.crypto,config:f.config,listenerManager:x,getFileUrl:function(e){return we(f,e)},cryptoModule:f.cryptoModule,eventEmitter:this._eventEmitter});this.subscribe=E.adaptSubscribeChange.bind(E),this.unsubscribe=E.adaptUnsubscribeChange.bind(E),this.disconnect=E.disconnect.bind(E),this.reconnect=E.reconnect.bind(E),this.unsubscribeAll=E.unsubscribeAll.bind(E),this.getSubscribedChannels=E.getSubscribedChannels.bind(E),this.getSubscribedChannelGroups=E.getSubscribedChannelGroups.bind(E),this.setState=E.adaptStateChange.bind(E),this.presence=E.adaptPresenceChange.bind(E),this.destroy=function(e){E.unsubscribeAll(e),E.disconnect()}}this.addListener=this._eventEmitter.addListener.bind(this._eventEmitter),this.removeListener=this._eventEmitter.removeListener.bind(this._eventEmitter),this.removeAllListeners=this._eventEmitter.removeAllListeners.bind(this._eventEmitter),this.parseToken=d.parseToken.bind(d),this.setToken=d.setToken.bind(d),this.getToken=d.getToken.bind(d),this.channelGroups={listGroups:X.bind(this,f,te),listChannels:X.bind(this,f,ne),addChannels:X.bind(this,f,Z),removeChannels:X.bind(this,f,J),deleteGroup:X.bind(this,f,ee)},this.push={addChannels:X.bind(this,f,ie),removeChannels:X.bind(this,f,re),deleteDevice:X.bind(this,f,ae),listChannels:X.bind(this,f,oe)},this.hereNow=X.bind(this,f,he),this.whereNow=X.bind(this,f,le),this.getState=X.bind(this,f,ce),this.grant=X.bind(this,f,Le),this.grantToken=X.bind(this,f,Fe),this.audit=X.bind(this,f,Ue),this.revokeToken=X.bind(this,f,He),this.publish=X.bind(this,f,ze),this.fire=function(e,n){return e.replicate=!1,e.storeInHistory=!1,t.publish(e,n)},this.signal=X.bind(this,f,Ge),this.history=X.bind(this,f,Qe),this.deleteMessages=X.bind(this,f,qe),this.messageCounts=X.bind(this,f,We),this.fetchMessages=X.bind(this,f,Ve),this.addMessageAction=X.bind(this,f,pe),this.removeMessageAction=X.bind(this,f,fe),this.getMessageActions=X.bind(this,f,ge),this.listFiles=X.bind(this,f,me);var T=X.bind(this,f,ye);this.publishFile=X.bind(this,f,be),this.sendFile=ve({generateUploadUrl:T,publishFile:this.publishFile,modules:f}),this.getFileUrl=function(e){return we(f,e)},this.downloadFile=X.bind(this,f,Ce),this.deleteFile=X.bind(this,f,xe),this.channel=function(e){return new mn(e,t._eventEmitter,t)},this.channelGroup=function(e){return new yn(e,t._eventEmitter,t)},this.channelMetadata=function(e){return new bn(e,t._eventEmitter,t)},this.userMetadata=function(e){return new vn(e,t._eventEmitter,t)},this.subscriptionSet=function(e){return new fn({channels:e.channels,channelGroups:e.channelGroups,subscriptionOptions:e.subscriptionOptions,eventEmitter:t._eventEmitter,pubnub:t})},this.objects={getAllUUIDMetadata:X.bind(this,f,Ae),getUUIDMetadata:X.bind(this,f,Se),setUUIDMetadata:X.bind(this,f,Ee),removeUUIDMetadata:X.bind(this,f,Te),getAllChannelMetadata:X.bind(this,f,ke),getChannelMetadata:X.bind(this,f,_e),setChannelMetadata:X.bind(this,f,Oe),removeChannelMetadata:X.bind(this,f,Pe),getChannelMembers:X.bind(this,f,Me),setChannelMembers:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,Ie,i({type:"set"},e)],l(n),!1))},removeChannelMembers:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,Ie,i({type:"delete"},e)],l(n),!1))},getMemberships:X.bind(this,f,Ne),setMemberships:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,De,i({type:"set"},e)],l(n),!1))},removeMemberships:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,De,i({type:"delete"},e)],l(n),!1))}},this.createUser=function(e){return t.objects.setUUIDMetadata({uuid:e.userId,data:e.data,include:e.include})},this.updateUser=this.createUser,this.removeUser=function(e){return t.objects.removeUUIDMetadata({uuid:null==e?void 0:e.userId})},this.fetchUser=function(e){return t.objects.getUUIDMetadata({uuid:null==e?void 0:e.userId,include:null==e?void 0:e.include})},this.fetchUsers=this.objects.getAllUUIDMetadata,this.createSpace=function(e){return t.objects.setChannelMetadata({channel:e.spaceId,data:e.data,include:e.include})},this.updateSpace=this.createSpace,this.removeSpace=function(e){return t.objects.removeChannelMetadata({channel:e.spaceId})},this.fetchSpace=function(e){return t.objects.getChannelMetadata({channel:e.spaceId,include:e.include})},this.fetchSpaces=this.objects.getAllChannelMetadata,this.addMemberships=function(e){var n,i;return"string"==typeof e.spaceId?t.objects.setChannelMembers({channel:e.spaceId,uuids:null===(n=e.users)||void 0===n?void 0:n.map(function(e){return"string"==typeof e?e:{id:e.userId,custom:e.custom,status:e.status}}),limit:0}):t.objects.setMemberships({uuid:e.userId,channels:null===(i=e.spaces)||void 0===i?void 0:i.map(function(e){return"string"==typeof e?e:{id:e.spaceId,custom:e.custom,status:e.status}}),limit:0})},this.updateMemberships=this.addMemberships,this.removeMemberships=function(e){return"string"==typeof e.spaceId?t.objects.removeChannelMembers({channel:e.spaceId,uuids:e.userIds,limit:0}):t.objects.removeMemberships({uuid:e.userId,channels:e.spaceIds,limit:0})},this.fetchMemberships=function(e){return"string"==typeof e.spaceId?t.objects.getChannelMembers({channel:e.spaceId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,UUIDFields:e.include.userFields,customUUIDFields:e.include.customUserFields,statusField:e.include.statusField,UUIDStatusField:e.include.userStatusField,UUIDTypeField:e.include.userTypeField,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map(function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("user","uuid"),i]})):null}).then(function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map(function(e){return{user:e.uuid,custom:e.custom,updated:e.updated,eTag:e.eTag}}),e}):t.objects.getMemberships({uuid:e.userId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,channelFields:e.include.spaceFields,customChannelFields:e.include.customSpaceFields,statusField:e.include.statusField,channelStatusField:e.include.spaceStatusField,channelTypeField:e.include.spaceTypeField,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map(function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("space","channel"),i]})):null}).then(function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map(function(e){return{space:e.channel,custom:e.custom,updated:e.updated,eTag:e.eTag}}),e})},this.time=g,this.stop=this.destroy,this.encrypt=function(e,t){if(void 0===t&&f.cryptoModule){var n=f.cryptoModule.encrypt(e);return"string"==typeof n?n:v(n)}return a.encrypt(e,t)},this.decrypt=function(e,t){if(void 0===t&&p){var n=f.cryptoModule.decrypt(e);return n instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(n)):n}return a.decrypt(e,t)},this.getAuthKey=f.config.getAuthKey.bind(f.config),this.setAuthKey=f.config.setAuthKey.bind(f.config),this.getUUID=f.config.getUUID.bind(f.config),this.setUUID=f.config.setUUID.bind(f.config),this.getUserId=f.config.getUserId.bind(f.config),this.setUserId=f.config.setUserId.bind(f.config),this.getFilterExpression=f.config.getFilterExpression.bind(f.config),this.setFilterExpression=f.config.setFilterExpression.bind(f.config),this.setCipherKey=function(t){return f.config.setCipherKey(t,e,f)},this.setHeartbeatInterval=f.config.setHeartbeatInterval.bind(f.config),n.hasModule("proxy")&&(this.setProxy=function(e){f.config.setProxy(e),t.reconnect()})}return e.prototype.getVersion=function(){return this._config.getVersion()},e.prototype._addPnsdkSuffix=function(e,t){this._config._addPnsdkSuffix(e,t)},e.prototype.networkDownDetected=function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)},e.prototype.networkUpDetected=function(){this._listenerManager.announceNetworkUp(),this.reconnect()},e.notificationPayload=function(e,t){return new j(e,t)},e.generateUUID=function(){return m()},e.OPERATIONS=N,e.CATEGORIES=M,e.LinearRetryPolicy=dn.LinearRetryPolicy,e.ExponentialRetryPolicy=dn.ExponentialRetryPolicy,e}(),Cn=function(){function e(e){var t=this;this._modules={},Object.keys(e).forEach(function(n){t._modules[n]=e[n].bind(t)})}return e.prototype.init=function(e){this._config=e,Array.isArray(this._config.origin)?this._currentSubDomain=Math.floor(Math.random()*this._config.origin.length):this._currentSubDomain=0,this._coreParams={},this.shiftStandardOrigin()},e.prototype.nextOrigin=function(){var e=this._config.secure?"https://":"http://";if("string"==typeof this._config.origin)return"".concat(e).concat(this._config.origin);this._currentSubDomain+=1,this._currentSubDomain>=this._config.origin.length&&(this._currentSubDomain=0);var t=this._config.origin[this._currentSubDomain];return"".concat(e).concat(t)},e.prototype.hasModule=function(e){return e in this._modules},e.prototype.shiftStandardOrigin=function(){return this._standardOrigin=this.nextOrigin(),this._standardOrigin},e.prototype.getStandardOrigin=function(){return this._standardOrigin},e.prototype.POSTFILE=function(e,t,n){return this._modules.postfile(e,t,n)},e.prototype.GETFILE=function(e,t,n){return this._modules.getfile(e,t,n)},e.prototype.POST=function(e,t,n,i){return this._modules.post(e,t,n,i)},e.prototype.PATCH=function(e,t,n,i){return this._modules.patch(e,t,n,i)},e.prototype.GET=function(e,t,n){return this._modules.get(e,t,n)},e.prototype.DELETE=function(e,t,n){return this._modules.del(e,t,n)},e.prototype._detectErrorCategory=function(e){if("ENOTFOUND"===e.code)return M.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return M.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return M.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return M.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return M.PNNetworkIssuesCategory;if(e.timeout)return M.PNTimeoutCategory;if("ETIMEDOUT"===e.code)return M.PNNetworkIssuesCategory;if(e.response){if(e.response.badRequest)return M.PNBadRequestCategory;if(e.response.forbidden)return M.PNAccessDeniedCategory}return M.PNUnknownCategory},e}();function xn(e){var t=function(e){return e&&"object"==typeof e&&e.constructor===Object};if(!t(e))return e;var n={};return Object.keys(e).forEach(function(i){var r=function(e){return"string"==typeof e||e instanceof String}(i),o=i,a=e[i];Array.isArray(i)||r&&i.indexOf(",")>=0?o=(r?i.split(","):i).reduce(function(e,t){return e+String.fromCharCode(t)},""):(function(e){return"number"==typeof e&&isFinite(e)}(i)||r&&!isNaN(i))&&(o=String.fromCharCode(r?parseInt(i,10):10)),n[o]=t(a)?xn(a):a}),n}var An=function(){function e(e,t){this._base64ToBinary=t,this._decode=e}return e.prototype.decodeToken=function(e){var t="";e.length%4==3?t="=":e.length%4==2&&(t="==");var n=e.replace(/-/gi,"+").replace(/_/gi,"/")+t,i=this._decode(this._base64ToBinary(n));if("object"==typeof i)return i},e}(),Sn={exports:{}},En={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<i.length;r++)if((n=i[r])===t||n.fn===t){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var r=(n=n.slice(0)).length;i<r;++i)n[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(En);var Tn=In;In.default=In,In.stable=Ln,In.stableStringify=Ln;var kn="[...]",_n="[Circular]",On=[],Pn=[];function Mn(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function In(e,t,n,i){var r;void 0===i&&(i=Mn()),Dn(e,"",0,[],void 0,0,i);try{r=0===Pn.length?JSON.stringify(e,t,n):JSON.stringify(e,Bn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==On.length;){var o=On.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return r}function Nn(e,t,n,i){var r=Object.getOwnPropertyDescriptor(i,n);void 0!==r.get?r.configurable?(Object.defineProperty(i,n,{value:e}),On.push([i,n,t,r])):Pn.push([t,n,e]):(i[n]=e,On.push([i,n,t]))}function Dn(e,t,n,i,r,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Nn(_n,e,t,r);if(void 0!==a.depthLimit&&o>a.depthLimit)return void Nn(kn,e,t,r);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Nn(kn,e,t,r);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)Dn(e[s],s,s,i,e,o,a);else{var l=Object.keys(e);for(s=0;s<l.length;s++){var u=l[s];Dn(e[u],u,s,i,e,o,a)}}i.pop()}}function Un(e,t){return e<t?-1:e>t?1:0}function Ln(e,t,n,i){void 0===i&&(i=Mn());var r,o=Rn(e,"",0,[],void 0,0,i)||e;try{r=0===Pn.length?JSON.stringify(o,t,n):JSON.stringify(o,Bn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==On.length;){var a=On.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return r}function Rn(e,t,n,i,r,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Nn(_n,e,t,r);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==a.depthLimit&&o>a.depthLimit)return void Nn(kn,e,t,r);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Nn(kn,e,t,r);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)Rn(e[s],s,s,i,e,o,a);else{var l={},u=Object.keys(e).sort(Un);for(s=0;s<u.length;s++){var c=u[s];Rn(e[c],c,s,i,e,o,a),l[c]=e[c]}if(void 0===r)return l;On.push([r,t,e]),r[t]=l}i.pop()}}function Bn(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(Pn.length>0)for(var i=0;i<Pn.length;i++){var r=Pn[i];if(r[1]===t&&r[0]===n){n=r[2],Pn.splice(i,1);break}}return e.call(this,t,n)}}var jn,Fn="undefined"!=typeof Symbol&&Symbol,Hn=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0},$n="Function.prototype.bind called on incompatible ",zn=Array.prototype.slice,Gn=Object.prototype.toString,Qn="[object Function]",qn=function(e){var t=this;if("function"!=typeof t||Gn.call(t)!==Qn)throw new TypeError($n+t);for(var n,i=zn.call(arguments,1),r=function(){if(this instanceof n){var r=t.apply(this,i.concat(zn.call(arguments)));return Object(r)===r?r:this}return t.apply(e,i.concat(zn.call(arguments)))},o=Math.max(0,t.length-i.length),a=[],s=0;s<o;s++)a.push("$"+s);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n},Wn=Function.prototype.bind||qn,Vn=Wn.call(Function.call,Object.prototype.hasOwnProperty),Yn=SyntaxError,Kn=Function,Xn=TypeError,Zn=function(e){try{return Kn('"use strict"; return ('+e+").constructor;")()}catch(e){}},Jn=Object.getOwnPropertyDescriptor;if(Jn)try{Jn({},"")}catch(e){Jn=null}var ei=function(){throw new Xn},ti=Jn?function(){try{return ei}catch(e){try{return Jn(arguments,"callee").get}catch(e){return ei}}}():ei,ni="function"==typeof Fn&&"function"==typeof Symbol&&"symbol"==typeof Fn("foo")&&"symbol"==typeof Symbol("bar")&&Hn(),ii=Object.getPrototypeOf||function(e){return e.__proto__},ri={},oi="undefined"==typeof Uint8Array?jn:ii(Uint8Array),ai={"%AggregateError%":"undefined"==typeof AggregateError?jn:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?jn:ArrayBuffer,"%ArrayIteratorPrototype%":ni?ii([][Symbol.iterator]()):jn,"%AsyncFromSyncIteratorPrototype%":jn,"%AsyncFunction%":ri,"%AsyncGenerator%":ri,"%AsyncGeneratorFunction%":ri,"%AsyncIteratorPrototype%":ri,"%Atomics%":"undefined"==typeof Atomics?jn:Atomics,"%BigInt%":"undefined"==typeof BigInt?jn:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?jn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?jn:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?jn:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?jn:FinalizationRegistry,"%Function%":Kn,"%GeneratorFunction%":ri,"%Int8Array%":"undefined"==typeof Int8Array?jn:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?jn:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?jn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni?ii(ii([][Symbol.iterator]())):jn,"%JSON%":"object"==typeof JSON?JSON:jn,"%Map%":"undefined"==typeof Map?jn:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ni?ii((new Map)[Symbol.iterator]()):jn,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?jn:Promise,"%Proxy%":"undefined"==typeof Proxy?jn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?jn:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?jn:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ni?ii((new Set)[Symbol.iterator]()):jn,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?jn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni?ii(""[Symbol.iterator]()):jn,"%Symbol%":ni?Symbol:jn,"%SyntaxError%":Yn,"%ThrowTypeError%":ti,"%TypedArray%":oi,"%TypeError%":Xn,"%Uint8Array%":"undefined"==typeof Uint8Array?jn:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?jn:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?jn:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?jn:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?jn:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?jn:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?jn:WeakSet},si=function e(t){var n;if("%AsyncFunction%"===t)n=Zn("async function () {}");else if("%GeneratorFunction%"===t)n=Zn("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=Zn("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var r=e("%AsyncGenerator%");r&&(n=ii(r.prototype))}return ai[t]=n,n},li={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ui=Wn,ci=Vn,di=ui.call(Function.call,Array.prototype.concat),hi=ui.call(Function.apply,Array.prototype.splice),pi=ui.call(Function.call,String.prototype.replace),fi=ui.call(Function.call,String.prototype.slice),gi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mi=/\\(\\)?/g,yi=function(e){var t=fi(e,0,1),n=fi(e,-1);if("%"===t&&"%"!==n)throw new Yn("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Yn("invalid intrinsic syntax, expected opening `%`");var i=[];return pi(e,gi,function(e,t,n,r){i[i.length]=n?pi(r,mi,"$1"):t||e}),i},bi=function(e,t){var n,i=e;if(ci(li,i)&&(i="%"+(n=li[i])[0]+"%"),ci(ai,i)){var r=ai[i];if(r===ri&&(r=si(i)),void 0===r&&!t)throw new Xn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new Yn("intrinsic "+e+" does not exist!")},vi=function(e,t){if("string"!=typeof e||0===e.length)throw new Xn("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Xn('"allowMissing" argument must be a boolean');var n=yi(e),i=n.length>0?n[0]:"",r=bi("%"+i+"%",t),o=r.name,a=r.value,s=!1,l=r.alias;l&&(i=l[0],hi(n,di([0,1],l)));for(var u=1,c=!0;u<n.length;u+=1){var d=n[u],h=fi(d,0,1),p=fi(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===p||"'"===p||"`"===p)&&h!==p)throw new Yn("property names with quotes must have matching quotes");if("constructor"!==d&&c||(s=!0),ci(ai,o="%"+(i+="."+d)+"%"))a=ai[o];else if(null!=a){if(!(d in a)){if(!t)throw new Xn("base intrinsic for "+e+" exists, but the property is not available.");return}if(Jn&&u+1>=n.length){var f=Jn(a,d);a=(c=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:a[d]}else c=ci(a,d),a=a[d];c&&!s&&(ai[o]=a)}}return a},wi={exports:{}};!function(e){var t=Wn,n=vi,i=n("%Function.prototype.apply%"),r=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(r,i),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var n=o(t,r,arguments);return a&&s&&a(n,"length").configurable&&s(n,"length",{value:1+l(0,e.length-(arguments.length-1))}),n};var u=function(){return o(t,i,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u}(wi);var Ci=vi,xi=wi.exports,Ai=xi(Ci("String.prototype.indexOf")),Si=d(Object.freeze({__proto__:null,default:{}})),Ei="function"==typeof Map&&Map.prototype,Ti=Object.getOwnPropertyDescriptor&&Ei?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ki=Ei&&Ti&&"function"==typeof Ti.get?Ti.get:null,_i=Ei&&Map.prototype.forEach,Oi="function"==typeof Set&&Set.prototype,Pi=Object.getOwnPropertyDescriptor&&Oi?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mi=Oi&&Pi&&"function"==typeof Pi.get?Pi.get:null,Ii=Oi&&Set.prototype.forEach,Ni="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Di="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ui="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Li=Boolean.prototype.valueOf,Ri=Object.prototype.toString,Bi=Function.prototype.toString,ji=String.prototype.match,Fi=String.prototype.slice,Hi=String.prototype.replace,$i=String.prototype.toUpperCase,zi=String.prototype.toLowerCase,Gi=RegExp.prototype.test,Qi=Array.prototype.concat,qi=Array.prototype.join,Wi=Array.prototype.slice,Vi=Math.floor,Yi="function"==typeof BigInt?BigInt.prototype.valueOf:null,Ki=Object.getOwnPropertySymbols,Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Zi="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Ji="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,er=Object.prototype.propertyIsEnumerable,tr=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function nr(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Gi.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var i=e<0?-Vi(-e):Vi(e);if(i!==e){var r=String(i),o=Fi.call(t,r.length+1);return Hi.call(r,n,"$&_")+"."+Hi.call(Hi.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Hi.call(t,n,"$&_")}var ir=Si,rr=ir.custom,or=cr(rr)?rr:null;function ar(e,t,n){var i="double"===(n.quoteStyle||t)?'"':"'";return i+e+i}function sr(e){return Hi.call(String(e),/"/g,""")}function lr(e){return!("[object Array]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}function ur(e){return!("[object RegExp]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}function cr(e){if(Zi)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Xi)return!1;try{return Xi.call(e),!0}catch(e){}return!1}var dr=Object.prototype.hasOwnProperty||function(e){return e in this};function hr(e,t){return dr.call(e,t)}function pr(e){return Ri.call(e)}function fr(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}function gr(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return gr(Fi.call(e,0,t.maxStringLength),t)+i}return ar(Hi.call(Hi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,mr),"single",t)}function mr(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+$i.call(t.toString(16))}function yr(e){return"Object("+e+")"}function br(e){return e+" { ? }"}function vr(e,t,n,i){return e+" ("+t+") {"+(i?wr(n,i):qi.call(n,", "))+"}"}function wr(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+qi.call(e,","+n)+"\n"+t.prev}function Cr(e,t){var n=lr(e),i=[];if(n){i.length=e.length;for(var r=0;r<e.length;r++)i[r]=hr(e,r)?t(e[r],e):""}var o,a="function"==typeof Ki?Ki(e):[];if(Zi){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)hr(e,l)&&(n&&String(Number(l))===l&&l<e.length||Zi&&o["$"+l]instanceof Symbol||(Gi.call(/[^\w$]/,l)?i.push(t(l,e)+": "+t(e[l],e)):i.push(l+": "+t(e[l],e))));if("function"==typeof Ki)for(var u=0;u<a.length;u++)er.call(e,a[u])&&i.push("["+t(a[u])+"]: "+t(e[a[u]],e));return i}var xr=vi,Ar=function(e,t){var n=Ci(e,!!t);return"function"==typeof n&&Ai(e,".prototype.")>-1?xi(n):n},Sr=function e(t,n,i,r){var o=n||{};if(hr(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(hr(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!hr(o,"customInspect")||o.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(hr(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(hr(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return gr(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?nr(t,l):l}if("bigint"==typeof t){var u=String(t)+"n";return s?nr(t,u):u}var d=void 0===o.depth?5:o.depth;if(void 0===i&&(i=0),i>=d&&d>0&&"object"==typeof t)return lr(t)?"[Array]":"[Object]";var h=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=qi.call(Array(e.indent+1)," ")}return{base:n,prev:qi.call(Array(t+1),n)}}(o,i);if(void 0===r)r=[];else if(fr(r,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(r=Wi.call(r)).push(n),a){var s={depth:o.depth};return hr(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),e(t,s,i+1,r)}return e(t,o,i+1,r)}if("function"==typeof t&&!ur(t)){var f=function(e){if(e.name)return e.name;var t=ji.call(Bi.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),g=Cr(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(g.length>0?" { "+qi.call(g,", ")+" }":"")}if(cr(t)){var m=Zi?Hi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Xi.call(t);return"object"!=typeof t||Zi?m:yr(m)}if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var y="<"+zi.call(String(t.nodeName)),b=t.attributes||[],v=0;v<b.length;v++)y+=" "+b[v].name+"="+ar(sr(b[v].value),"double",o);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+"</"+zi.call(String(t.nodeName))+">"}if(lr(t)){if(0===t.length)return"[]";var w=Cr(t,p);return h&&!function(e){for(var t=0;t<e.length;t++)if(fr(e[t],"\n")>=0)return!1;return!0}(w)?"["+wr(w,h)+"]":"[ "+qi.call(w,", ")+" ]"}if(function(e){return!("[object Error]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t)){var C=Cr(t,p);return"cause"in Error.prototype||!("cause"in t)||er.call(t,"cause")?0===C.length?"["+String(t)+"]":"{ ["+String(t)+"] "+qi.call(C,", ")+" }":"{ ["+String(t)+"] "+qi.call(Qi.call("[cause]: "+p(t.cause),C),", ")+" }"}if("object"==typeof t&&a){if(or&&"function"==typeof t[or]&&ir)return ir(t,{depth:d-i});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!ki||!e||"object"!=typeof e)return!1;try{ki.call(e);try{Mi.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var x=[];return _i&&_i.call(t,function(e,n){x.push(p(n,t,!0)+" => "+p(e,t))}),vr("Map",ki.call(t),x,h)}if(function(e){if(!Mi||!e||"object"!=typeof e)return!1;try{Mi.call(e);try{ki.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var A=[];return Ii&&Ii.call(t,function(e){A.push(p(e,t))}),vr("Set",Mi.call(t),A,h)}if(function(e){if(!Ni||!e||"object"!=typeof e)return!1;try{Ni.call(e,Ni);try{Di.call(e,Di)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return br("WeakMap");if(function(e){if(!Di||!e||"object"!=typeof e)return!1;try{Di.call(e,Di);try{Ni.call(e,Ni)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return br("WeakSet");if(function(e){if(!Ui||!e||"object"!=typeof e)return!1;try{return Ui.call(e),!0}catch(e){}return!1}(t))return br("WeakRef");if(function(e){return!("[object Number]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t))return yr(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!Yi)return!1;try{return Yi.call(e),!0}catch(e){}return!1}(t))return yr(p(Yi.call(t)));if(function(e){return!("[object Boolean]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t))return yr(Li.call(t));if(function(e){return!("[object String]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t))return yr(p(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===c)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t)&&!ur(t)){var S=Cr(t,p),E=tr?tr(t)===Object.prototype:t instanceof Object||t.constructor===Object,T=t instanceof Object?"":"null prototype",k=!E&&Ji&&Object(t)===t&&Ji in t?Fi.call(pr(t),8,-1):T?"Object":"",_=(E||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(k||T?"["+qi.call(Qi.call([],k||[],T||[]),": ")+"] ":"");return 0===S.length?_+"{}":h?_+"{"+wr(S,h)+"}":_+"{ "+qi.call(S,", ")+" }"}return String(t)},Er=xr("%TypeError%"),Tr=xr("%WeakMap%",!0),kr=xr("%Map%",!0),_r=Ar("WeakMap.prototype.get",!0),Or=Ar("WeakMap.prototype.set",!0),Pr=Ar("WeakMap.prototype.has",!0),Mr=Ar("Map.prototype.get",!0),Ir=Ar("Map.prototype.set",!0),Nr=Ar("Map.prototype.has",!0),Dr=function(e,t){for(var n,i=e;null!==(n=i.next);i=n)if(n.key===t)return i.next=n.next,n.next=e.next,e.next=n,n},Ur=String.prototype.replace,Lr=/%20/g,Rr="RFC3986",Br={default:Rr,formatters:{RFC1738:function(e){return Ur.call(e,Lr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Rr},jr=Br,Fr=Object.prototype.hasOwnProperty,Hr=Array.isArray,$r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),zr=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)void 0!==e[i]&&(n[i]=e[i]);return n},Gr={arrayToObject:zr,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var r=t[i],o=r.obj[r.prop],a=Object.keys(o),s=0;s<a.length;++s){var l=a[s],u=o[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:o,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Hr(n)){for(var i=[],r=0;r<n.length;++r)void 0!==n[r]&&i.push(n[r]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,n){var i=e.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,n,i,r){if(0===e.length)return e;var o=e;if("symbol"==typeof e?o=Symbol.prototype.toString.call(e):"string"!=typeof e&&(o=String(e)),"iso-8859-1"===n)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",s=0;s<o.length;++s){var l=o.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===jr.RFC1738&&(40===l||41===l)?a+=o.charAt(s):l<128?a+=$r[l]:l<2048?a+=$r[192|l>>6]+$r[128|63&l]:l<55296||l>=57344?a+=$r[224|l>>12]+$r[128|l>>6&63]+$r[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&o.charCodeAt(s)),a+=$r[240|l>>18]+$r[128|l>>12&63]+$r[128|l>>6&63]+$r[128|63&l])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Hr(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(Hr(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!Fr.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var r=t;return Hr(t)&&!Hr(n)&&(r=zr(t,i)),Hr(t)&&Hr(n)?(n.forEach(function(n,r){if(Fr.call(t,r)){var o=t[r];o&&"object"==typeof o&&n&&"object"==typeof n?t[r]=e(o,n,i):t.push(n)}else t[r]=n}),t):Object.keys(n).reduce(function(t,r){var o=n[r];return Fr.call(t,r)?t[r]=e(t[r],o,i):t[r]=o,t},r)}},Qr=function(){var e,t,n,i={assert:function(e){if(!i.has(e))throw new Er("Side channel does not contain "+Sr(e))},get:function(i){if(Tr&&i&&("object"==typeof i||"function"==typeof i)){if(e)return _r(e,i)}else if(kr){if(t)return Mr(t,i)}else if(n)return function(e,t){var n=Dr(e,t);return n&&n.value}(n,i)},has:function(i){if(Tr&&i&&("object"==typeof i||"function"==typeof i)){if(e)return Pr(e,i)}else if(kr){if(t)return Nr(t,i)}else if(n)return function(e,t){return!!Dr(e,t)}(n,i);return!1},set:function(i,r){Tr&&i&&("object"==typeof i||"function"==typeof i)?(e||(e=new Tr),Or(e,i,r)):kr?(t||(t=new kr),Ir(t,i,r)):(n||(n={key:{},next:null}),function(e,t,n){var i=Dr(e,t);i?i.value=n:e.next={key:t,next:e.next,value:n}}(n,i,r))}};return i},qr=Gr,Wr=Br,Vr=Object.prototype.hasOwnProperty,Yr={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Kr=Array.isArray,Xr=Array.prototype.push,Zr=function(e,t){Xr.apply(e,Kr(t)?t:[t])},Jr=Date.prototype.toISOString,eo=Wr.default,to={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:qr.encode,encodeValuesOnly:!1,format:eo,formatter:Wr.formatters[eo],indices:!1,serializeDate:function(e){return Jr.call(e)},skipNulls:!1,strictNullHandling:!1},no={},io=function e(t,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m){for(var y,b=t,v=m,w=0,C=!1;void 0!==(v=v.get(no))&&!C;){var x=v.get(t);if(w+=1,void 0!==x){if(x===w)throw new RangeError("Cyclic object value");C=!0}void 0===v.get(no)&&(w=0)}if("function"==typeof l?b=l(n,b):b instanceof Date?b=d(b):"comma"===i&&Kr(b)&&(b=qr.maybeMap(b,function(e){return e instanceof Date?d(e):e})),null===b){if(o)return s&&!f?s(n,to.encoder,g,"key",h):n;b=""}if("string"==typeof(y=b)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||qr.isBuffer(b))return s?[p(f?n:s(n,to.encoder,g,"key",h))+"="+p(s(b,to.encoder,g,"value",h))]:[p(n)+"="+p(String(b))];var A,S=[];if(void 0===b)return S;if("comma"===i&&Kr(b))f&&s&&(b=qr.maybeMap(b,s)),A=[{value:b.length>0?b.join(",")||null:void 0}];else if(Kr(l))A=l;else{var E=Object.keys(b);A=u?E.sort(u):E}for(var T=r&&Kr(b)&&1===b.length?n+"[]":n,k=0;k<A.length;++k){var _=A[k],O="object"==typeof _&&void 0!==_.value?_.value:b[_];if(!a||null!==O){var P=Kr(b)?"function"==typeof i?i(T,_):T:T+(c?"."+_:"["+_+"]");m.set(t,w);var M=Qr();M.set(no,m),Zr(S,e(O,P,i,r,o,a,"comma"===i&&f&&Kr(b)?null:s,l,u,c,d,h,p,f,g,M))}}return S},ro=Gr,oo=Object.prototype.hasOwnProperty,ao=Array.isArray,so={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ro.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},lo=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},uo=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},co=function(e,t,n,i){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(r),s=a?r.slice(0,a.index):r,l=[];if(s){if(!n.plainObjects&&oo.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var u=0;n.depth>0&&null!==(a=o.exec(r))&&u<n.depth;){if(u+=1,!n.plainObjects&&oo.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+r.slice(a.index)+"]"),function(e,t,n,i){for(var r=i?t:uo(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=r:"__proto__"!==l&&(a[l]=r):a={0:r}}r=a}return r}(l,t,n,i)}},ho=function(e,t){var n,i=e,r=function(e){if(!e)return to;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||to.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Wr.default;if(void 0!==e.format){if(!Vr.call(Wr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Wr.formatters[n],r=to.filter;return("function"==typeof e.filter||Kr(e.filter))&&(r=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:to.addQueryPrefix,allowDots:void 0===e.allowDots?to.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:to.charsetSentinel,delimiter:void 0===e.delimiter?to.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:to.encode,encoder:"function"==typeof e.encoder?e.encoder:to.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:to.encodeValuesOnly,filter:r,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:to.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:to.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:to.strictNullHandling}}(t);"function"==typeof r.filter?i=(0,r.filter)("",i):Kr(r.filter)&&(n=r.filter);var o,a=[];if("object"!=typeof i||null===i)return"";o=t&&t.arrayFormat in Yr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=Yr[o];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l="comma"===s&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),r.sort&&n.sort(r.sort);for(var u=Qr(),c=0;c<n.length;++c){var d=n[c];r.skipNulls&&null===i[d]||Zr(a,io(i[d],d,s,l,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var h=a.join(r.delimiter),p=!0===r.addQueryPrefix?"?":"";return r.charsetSentinel&&("iso-8859-1"===r.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),h.length>0?p+h:""},po={formats:Br,parse:function(e,t){var n=function(e){if(!e)return so;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?so.charset:e.charset;return{allowDots:void 0===e.allowDots?so.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:so.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:so.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:so.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:so.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:so.comma,decoder:"function"==typeof e.decoder?e.decoder:so.decoder,delimiter:"string"==typeof e.delimiter||ro.isRegExp(e.delimiter)?e.delimiter:so.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:so.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:so.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:so.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:so.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:so.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var i="string"==typeof e?function(e,t){var n,i={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=r.split(t.delimiter,o),s=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?l="utf-8":"utf8=%26%2310003%3B"===a[n]&&(l="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var u,c,d=a[n],h=d.indexOf("]="),p=-1===h?d.indexOf("="):h+1;-1===p?(u=t.decoder(d,so.decoder,l,"key"),c=t.strictNullHandling?null:""):(u=t.decoder(d.slice(0,p),so.decoder,l,"key"),c=ro.maybeMap(uo(d.slice(p+1),t),function(e){return t.decoder(e,so.decoder,l,"value")})),c&&t.interpretNumericEntities&&"iso-8859-1"===l&&(c=lo(c)),d.indexOf("[]=")>-1&&(c=ao(c)?[c]:c),oo.call(i,u)?i[u]=ro.combine(i[u],c):i[u]=c}return i}(e,n):e,r=n.plainObjects?Object.create(null):{},o=Object.keys(i),a=0;a<o.length;++a){var s=o[a],l=co(s,i[s],n,"string"==typeof e);r=ro.merge(r,l,n)}return!0===n.allowSparse?r:ro.compact(r)},stringify:ho},fo={};!function(e){function t(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(l)throw a}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.type=e=>e.split(/ *; */).shift(),e.params=e=>{const n={};var i,r=t(e.split(/ *; */));try{for(r.s();!(i=r.n()).done;){const e=i.value.split(/ *= */),t=e.shift(),r=e.shift();t&&r&&(n[t]=r)}}catch(e){r.e(e)}finally{r.f()}return n},e.parseLinks=e=>{const n={};var i,r=t(e.split(/ *, */));try{for(r.s();!(i=r.n()).done;){const e=i.value.split(/ *; */),t=e[0].slice(1,-1);n[e[1].split(/ *= */)[1].slice(1,-1)]=t}}catch(e){r.e(e)}finally{r.f()}return n},e.cleanHeader=(e,t)=>(delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e),e.isObject=e=>null!==e&&"object"==typeof e,e.hasOwn=Object.hasOwn||function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(e),t)},e.mixin=(t,n)=>{for(const i in n)e.hasOwn(n,i)&&(t[i]=n[i])}}(fo);const go=Si,mo=fo.isObject,yo=fo.hasOwn;var bo=vo;function vo(){}vo.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},vo.prototype.parse=function(e){return this._parser=e,this},vo.prototype.responseType=function(e){return this._responseType=e,this},vo.prototype.serialize=function(e){return this._serializer=e,this},vo.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(const t in e)if(yo(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload}return this},vo.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};const wo=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),Co=new Set([408,413,429,500,502,503,504,521,522,524]);vo.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){}if(t&&t.status&&Co.has(t.status))return!0;if(e){if(e.code&&wo.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},vo.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},vo.prototype.then=function(e,t){if(!this._fullfilledPromise){const e=this;this._endCalled,this._fullfilledPromise=new Promise((t,n)=>{e.on("abort",()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void n(this.timedoutError);const e=new Error("Aborted");e.code="ABORTED",e.status=this.status,e.method=this.method,e.url=this.url,n(e)}),e.end((e,i)=>{e?n(e):t(i)})})}return this._fullfilledPromise.then(e,t)},vo.prototype.catch=function(e){return this.then(void 0,e)},vo.prototype.use=function(e){return e(this),this},vo.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},vo.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},vo.prototype.get=function(e){return this._header[e.toLowerCase()]},vo.prototype.getHeader=vo.prototype.get,vo.prototype.set=function(e,t){if(mo(e)){for(const t in e)yo(e,t)&&this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},vo.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},vo.prototype.field=function(e,t,n){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(mo(e)){for(const t in e)yo(e,t)&&this.field(t,e[t]);return this}if(Array.isArray(t)){for(const n in t)yo(t,n)&&this.field(e,t[n]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),n?this._getFormData().append(e,t,n):this._getFormData().append(e,t),this},vo.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(go.gte(process.version,"v13.0.0")&&go.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},vo.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization",`Basic ${i(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`)}return this},vo.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},vo.prototype.redirects=function(e){return this._maxRedirects=e,this},vo.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},vo.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},vo.prototype.send=function(e){const t=mo(e);let n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&mo(this._data))for(const t in e){if("bigint"==typeof e[t]&&!e[t].toJSON)throw new Error("Cannot serialize BigInt value to json");yo(e,t)&&(this._data[t]=e[t])}else{if("bigint"==typeof e)throw new Error("Cannot send value of type BigInt");"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],n&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?`${this._data}&${e}`:e:(this._data||"")+e):this._data=e}return!t||this._isHost(e)||n||this.type("json"),this},vo.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},vo.prototype._finalizeQueryString=function(){const e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){const e=this.url.indexOf("?");if(e>=0){const t=this.url.slice(e+1).split("&");"function"==typeof this._sort?t.sort(this._sort):t.sort(),this.url=this.url.slice(0,e)+"?"+t.join("&")}}},vo.prototype._appendQueryString=()=>{},vo.prototype._timeoutError=function(e,t,n){if(this._aborted)return;const i=new Error(`${e+t}ms exceeded`);i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)},vo.prototype._setTimeouts=function(){const e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(()=>{e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(()=>{e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};const xo=fo;var Ao=So;function So(){}function Eo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return To(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?To(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function To(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ko(){this._defaults=[]}So.prototype.get=function(e){return this.header[e.toLowerCase()]},So.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=xo.type(t);const n=xo.params(t);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(this[e]=n[e]);this.links={};try{e.link&&(this.links=xo.parseLinks(e.link))}catch(e){}},So.prototype._setStatusProperties=function(e){const t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e};for(var _o=0,Oo=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];_o<Oo.length;_o++){const e=Oo[_o];ko.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._defaults.push({fn:e,args:n}),this}}ko.prototype._setDefaults=function(e){var t,n=Eo(this._defaults);try{for(n.s();!(t=n.n()).done;){const n=t.value;e[n.fn](...n.args)}}catch(e){n.e(e)}finally{n.f()}};var Po=ko;!function(e,t){function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}let r;r="undefined"!=typeof window?window:"undefined"==typeof self?void 0:self;const o=En.exports,a=Tn,s=po,l=bo,u=fo.isObject,c=fo.mixin,d=fo.hasOwn,h=Ao,p=Po;function f(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};const g=t=e.exports;t.Request=x,g.getXHR=()=>{if(r.XMLHttpRequest)return new r.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const m="".trim?e=>e.trim():e=>e.replace(/(^\s*|\s*$)/g,"");function y(e){if(!u(e))return e;const t=[];for(const n in e)d(e,n)&&b(t,n,e[n]);return t.join("&")}function b(e,t,i){if(void 0!==i)if(null!==i)if(Array.isArray(i)){var r,o=n(i);try{for(o.s();!(r=o.n()).done;)b(e,t,r.value)}catch(e){o.e(e)}finally{o.f()}}else if(u(i))for(const n in i)d(i,n)&&b(e,`${t}[${n}]`,i[n]);else e.push(encodeURI(t)+"="+encodeURIComponent(i));else e.push(encodeURI(t))}function v(e){const t={},n=e.split("&");let i,r;for(let e=0,o=n.length;e<o;++e)i=n[e],r=i.indexOf("="),-1===r?t[decodeURIComponent(i)]="":t[decodeURIComponent(i.slice(0,r))]=decodeURIComponent(i.slice(r+1));return t}function w(e){return/[/+]json($|[^-\w])/i.test(e)}function C(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){const t=e.split(/\r?\n/),n={};let i,r,o,a;for(let e=0,s=t.length;e<s;++e)r=t[e],i=r.indexOf(":"),-1!==i&&(o=r.slice(0,i).toLowerCase(),a=m(r.slice(i+1)),n[o]=a);return n}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function x(e,t){const n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",()=>{let e,t=null,i=null;try{i=new C(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=e.status||i.status,n.callback(e,i)):n.callback(null,i)})}g.serializeObject=y,g.parseString=v,g.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},g.serialize={"application/x-www-form-urlencoded":s.stringify,"application/json":a},g.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},c(C.prototype,h.prototype),C.prototype._parseBody=function(e){let t=g.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&w(this.type)&&(t=g.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},C.prototype.toError=function(){const e=this.req,t=e.method,n=e.url,i=`cannot ${t} ${n} (${this.status})`,r=new Error(i);return r.status=this.status,r.method=t,r.url=n,r},g.Response=C,o(x.prototype),c(x.prototype,l.prototype),x.prototype.type=function(e){return this.set("Content-Type",g.types[e]||e),this},x.prototype.accept=function(e){return this.set("Accept",g.types[e]||e),this},x.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});const i=n.encoder?n.encoder:e=>{if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,i)},x.prototype.query=function(e){return"string"!=typeof e&&(e=y(e)),e&&this._query.push(e),this},x.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},x.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},x.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();const n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},x.prototype.crossDomainError=function(){const e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},x.prototype.agent=function(){return this},x.prototype.ca=x.prototype.agent,x.prototype.buffer=x.prototype.ca,x.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},x.prototype.pipe=x.prototype.write,x.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},x.prototype.end=function(e){this._endCalled,this._endCalled=!0,this._callback=e||f,this._finalizeQueryString(),this._end()},x.prototype._setUploadTimeout=function(){const e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},x.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const e=this;this.xhr=g.getXHR();const t=this.xhr;let n=this._formData||this._data;this._setTimeouts(),t.addEventListener("readystatechange",()=>{const n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4!==n)return;let i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")});const i=(t,n)=>{n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){const e=this._header["content-type"];let t=this._serializer||g.serialize[e?e.split(";")[0]:""];!t&&w(e)&&(t=g.serialize["application/json"]),t&&(n=t(n))}for(const e in this.header)null!==this.header[e]&&d(this.header,e)&&t.setRequestHeader(e,this.header[e]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},g.agent=()=>new p;for(var A=0,S=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];A<S.length;A++){const e=S[A];p.prototype[e.toLowerCase()]=function(t,n){const i=new g.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}}function E(e,t,n){const i=g("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}p.prototype.del=p.prototype.delete,g.get=(e,t,n)=>{const i=g("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},g.head=(e,t,n)=>{const i=g("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},g.options=(e,t,n)=>{const i=g("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},g.del=E,g.delete=E,g.patch=(e,t,n)=>{const i=g("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},g.post=(e,t,n)=>{const i=g("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},g.put=(e,t,n)=>{const i=g("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}}(Sn,Sn.exports);var Mo=Sn.exports;function Io(e){var t=(new Date).getTime(),n=(new Date).toISOString(),i=console&&console.log?console:window&&window.console&&window.console.log?window.console:console;i.log("<<<<<"),i.log("[".concat(n,"]"),"\n",e.url,"\n",e.qs),i.log("-----"),e.on("response",function(n){var r=(new Date).getTime()-t,o=(new Date).toISOString();i.log(">>>>>>"),i.log("[".concat(o," / ").concat(r,"]"),"\n",e.url,"\n",e.qs,"\n",n.text),i.log("-----")})}function No(e,t,n){var i=this;this._config.logVerbosity&&(e=e.use(Io)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e));var r=e;if(t.abortSignal)var o=t.abortSignal.subscribe(function(){r.abort(),o()});return!0===t.forceBuffered?r="undefined"==typeof Blob?r.buffer().responseType("arraybuffer"):r.responseType("arraybuffer"):!1===t.forceBuffered&&(r=r.buffer(!1)),(r=r.timeout(t.timeout)).on("abort",function(){return n({category:M.PNUnknownCategory,error:!0,operation:t.operation,errorData:new Error("Aborted")},null)}),r.end(function(e,r){var o,a={};if(a.error=null!==e,a.operation=t.operation,r&&r.status&&(a.statusCode=r.status),e){if(e.response&&e.response.text&&!i._config.logVerbosity)try{a.errorData=JSON.parse(e.response.text)}catch(t){a.errorData=e}else a.errorData=e;return a.category=i._detectErrorCategory(e),n(a,null)}if(t.ignoreBody)o={headers:r.headers,redirects:r.redirects,response:r};else try{o=JSON.parse(r.text)}catch(e){return a.errorData=r,a.error=!0,n(a,null)}return o.error&&1===o.error&&o.status&&o.message&&o.service?(a.errorData=o,a.statusCode=o.status,a.error=!0,a.category=i._detectErrorCategory(a),n(a,null)):(o.error&&o.error.message&&(a.errorData=o.error),n(a,o))}),r}function Do(e,t,n){return o(this,void 0,void 0,function(){var i;return a(this,function(r){switch(r.label){case 0:return i=Mo.post(e),t.forEach(function(e){var t=e.key,n=e.value;i=i.field(t,n)}),i.attach("file",n,{contentType:"application/octet-stream"}),[4,i];case 1:return[2,r.sent()]}})})}function Uo(e,t,n){var i=Mo.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return No.call(this,i,t,n)}function Lo(e,t,n){var i=Mo.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return No.call(this,i,t,n)}function Ro(e,t,n,i){var r=Mo.post(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return No.call(this,r,n,i)}function Bo(e,t,n,i){var r=Mo.patch(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return No.call(this,r,n,i)}function jo(e,t,n){var i=Mo.delete(this.getStandardOrigin()+t.url).set(t.headers).query(e);return No.call(this,i,t,n)}function Fo(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer}var Ho,$o=function(){function e(){}return Object.defineProperty(e.prototype,"algo",{get:function(){return"aes-256-cbc"},enumerable:!1,configurable:!0}),e.prototype.encrypt=function(e,t){return o(this,void 0,void 0,function(){var n;return a(this,function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.encryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.encryptString(n,t)];throw new Error("Cannot encrypt this file. In browsers file encryption supports only string or ArrayBuffer")}})})},e.prototype.decrypt=function(e,t){return o(this,void 0,void 0,function(){var n;return a(this,function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.decryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.decryptString(n,t)];throw new Error("Cannot decrypt this file. In browsers file decryption supports only string or ArrayBuffer")}})})},e.prototype.encryptFile=function(e,t,n){return o(this,void 0,void 0,function(){var i,r,o;return a(this,function(a){switch(a.label){case 0:if(t.data.byteLength<=0)throw new Error("encryption error. empty content");return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.data.arrayBuffer()];case 2:return r=a.sent(),[4,this.encryptArrayBuffer(i,r)];case 3:return o=a.sent(),[2,n.create({name:t.name,mimeType:"application/octet-stream",data:o})]}})})},e.prototype.decryptFile=function(e,t,n){return o(this,void 0,void 0,function(){var i,r,o;return a(this,function(a){switch(a.label){case 0:return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.data.arrayBuffer()];case 2:return r=a.sent(),[4,this.decryptArrayBuffer(i,r)];case 3:return o=a.sent(),[2,n.create({name:t.name,data:o})]}})})},e.prototype.getKey=function(t){return o(this,void 0,void 0,function(){var n,i,r;return a(this,function(o){switch(o.label){case 0:return[4,crypto.subtle.digest("SHA-256",e.encoder.encode(t))];case 1:return n=o.sent(),i=Array.from(new Uint8Array(n)).map(function(e){return e.toString(16).padStart(2,"0")}).join(""),r=e.encoder.encode(i.slice(0,32)).buffer,[2,crypto.subtle.importKey("raw",r,"AES-CBC",!0,["encrypt","decrypt"])]}})})},e.prototype.encryptArrayBuffer=function(e,t){return o(this,void 0,void 0,function(){var n,i,r;return a(this,function(o){switch(o.label){case 0:return n=crypto.getRandomValues(new Uint8Array(16)),i=Fo,r=[n.buffer],[4,crypto.subtle.encrypt({name:"AES-CBC",iv:n},e,t)];case 1:return[2,i.apply(void 0,r.concat([o.sent()]))]}})})},e.prototype.decryptArrayBuffer=function(t,n){return o(this,void 0,void 0,function(){var i;return a(this,function(r){switch(r.label){case 0:if(i=n.slice(0,16),n.slice(e.IV_LENGTH).byteLength<=0)throw new Error("decryption error: empty content");return[4,crypto.subtle.decrypt({name:"AES-CBC",iv:i},t,n.slice(e.IV_LENGTH))];case 1:return[2,r.sent()]}})})},e.prototype.encryptString=function(t,n){return o(this,void 0,void 0,function(){var i,r,o,s;return a(this,function(a){switch(a.label){case 0:return i=crypto.getRandomValues(new Uint8Array(16)),r=e.encoder.encode(n).buffer,[4,crypto.subtle.encrypt({name:"AES-CBC",iv:i},t,r)];case 1:return o=a.sent(),s=Fo(i.buffer,o),[2,e.decoder.decode(s)]}})})},e.prototype.decryptString=function(t,n){return o(this,void 0,void 0,function(){var i,r,o,s;return a(this,function(a){switch(a.label){case 0:return i=e.encoder.encode(n).buffer,r=i.slice(0,16),o=i.slice(16),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:r},t,o)];case 1:return s=a.sent(),[2,e.decoder.decode(s)]}})})},e.IV_LENGTH=16,e.encoder=new TextEncoder,e.decoder=new TextDecoder,e}(),zo=(Ho=function(){function e(e){if(e instanceof File)this.data=e,this.name=this.data.name,this.mimeType=this.data.type;else if(e.data){var t=e.data;this.data=new File([t],e.name,{type:e.mimeType}),this.name=e.name,e.mimeType&&(this.mimeType=e.mimeType)}if(void 0===this.data)throw new Error("Couldn't construct a file out of supplied options.");if(void 0===this.name)throw new Error("Couldn't guess filename out of the options. Please provide one.")}return e.create=function(e){return new this(e)},e.prototype.toBuffer=function(){return o(this,void 0,void 0,function(){return a(this,function(e){throw new Error("This feature is only supported in Node.js environments.")})})},e.prototype.toStream=function(){return o(this,void 0,void 0,function(){return a(this,function(e){throw new Error("This feature is only supported in Node.js environments.")})})},e.prototype.toFileUri=function(){return o(this,void 0,void 0,function(){return a(this,function(e){throw new Error("This feature is only supported in react native environments.")})})},e.prototype.toBlob=function(){return o(this,void 0,void 0,function(){return a(this,function(e){return[2,this.data]})})},e.prototype.toArrayBuffer=function(){return o(this,void 0,void 0,function(){var e=this;return a(this,function(t){return[2,new Promise(function(t,n){var i=new FileReader;i.addEventListener("load",function(){if(i.result instanceof ArrayBuffer)return t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsArrayBuffer(e.data)})]})})},e.prototype.toString=function(){return o(this,void 0,void 0,function(){var e=this;return a(this,function(t){return[2,new Promise(function(t,n){var i=new FileReader;i.addEventListener("load",function(){if("string"==typeof i.result)return t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsBinaryString(e.data)})]})})},e.prototype.toFile=function(){return o(this,void 0,void 0,function(){return a(this,function(e){return[2,this.data]})})},e}(),Ho.supportsFile="undefined"!=typeof File,Ho.supportsBlob="undefined"!=typeof Blob,Ho.supportsArrayBuffer="undefined"!=typeof ArrayBuffer,Ho.supportsBuffer=!1,Ho.supportsStream=!1,Ho.supportsString=!0,Ho.supportsEncryptFile=!0,Ho.supportsFileUri=!1,Ho),Go=function(){function e(e){this.config=e,this.cryptor=new _({config:e}),this.fileCryptor=new $o}return Object.defineProperty(e.prototype,"identifier",{get:function(){return""},enumerable:!1,configurable:!0}),e.prototype.encrypt=function(e){var t="string"==typeof e?e:(new TextDecoder).decode(e);return{data:this.cryptor.encrypt(t),metadata:null}},e.prototype.decrypt=function(e){var t="string"==typeof e.data?e.data:v(e.data);return this.cryptor.decrypt(t)},e.prototype.encryptFile=function(e,t){var n;return o(this,void 0,void 0,function(){return a(this,function(i){return[2,this.fileCryptor.encryptFile(null===(n=this.config)||void 0===n?void 0:n.cipherKey,e,t)]})})},e.prototype.decryptFile=function(e,t){return o(this,void 0,void 0,function(){return a(this,function(n){return[2,this.fileCryptor.decryptFile(this.config.cipherKey,e,t)]})})},e}(),Qo=function(){function e(e){this.cipherKey=e.cipherKey,this.CryptoJS=T,this.encryptedKey=this.CryptoJS.SHA256(this.cipherKey)}return Object.defineProperty(e.prototype,"algo",{get:function(){return"AES-CBC"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return"ACRH"},enumerable:!1,configurable:!0}),e.prototype.getIv=function(){return crypto.getRandomValues(new Uint8Array(e.BLOCK_SIZE))},e.prototype.getKey=function(){return o(this,void 0,void 0,function(){var t,n;return a(this,function(i){switch(i.label){case 0:return t=e.encoder.encode(this.cipherKey),[4,crypto.subtle.digest("SHA-256",t.buffer)];case 1:return n=i.sent(),[2,crypto.subtle.importKey("raw",n,this.algo,!0,["encrypt","decrypt"])]}})})},e.prototype.encrypt=function(t){if(0===("string"==typeof t?t:e.decoder.decode(t)).length)throw new Error("encryption error. empty content");var n=this.getIv();return{metadata:n,data:b(this.CryptoJS.AES.encrypt(t,this.encryptedKey,{iv:this.bufferToWordArray(n),mode:this.CryptoJS.mode.CBC}).ciphertext.toString(this.CryptoJS.enc.Base64))}},e.prototype.decrypt=function(t){var n=this.bufferToWordArray(new Uint8ClampedArray(t.metadata)),i=this.bufferToWordArray(new Uint8ClampedArray(t.data));return e.encoder.encode(this.CryptoJS.AES.decrypt({ciphertext:i},this.encryptedKey,{iv:n,mode:this.CryptoJS.mode.CBC}).toString(this.CryptoJS.enc.Utf8)).buffer},e.prototype.encryptFileData=function(e){return o(this,void 0,void 0,function(){var t,n,i;return a(this,function(r){switch(r.label){case 0:return[4,this.getKey()];case 1:return t=r.sent(),n=this.getIv(),i={},[4,crypto.subtle.encrypt({name:this.algo,iv:n},t,e)];case 2:return[2,(i.data=r.sent(),i.metadata=n,i)]}})})},e.prototype.decryptFileData=function(e){return o(this,void 0,void 0,function(){var t;return a(this,function(n){switch(n.label){case 0:return[4,this.getKey()];case 1:return t=n.sent(),[2,crypto.subtle.decrypt({name:this.algo,iv:e.metadata},t,e.data)]}})})},e.prototype.bufferToWordArray=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n[t/4|0]|=e[t]<<24-8*t;return this.CryptoJS.lib.WordArray.create(n,e.length)},e.BLOCK_SIZE=16,e.encoder=new TextEncoder,e.decoder=new TextDecoder,e}(),qo=function(){function e(e){var t;this.defaultCryptor=e.default,this.cryptors=null!==(t=e.cryptors)&&void 0!==t?t:[]}return e.legacyCryptoModule=function(e){var t;return new this({default:new Go({cipherKey:e.cipherKey,useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t}),cryptors:[new Qo({cipherKey:e.cipherKey})]})},e.aesCbcCryptoModule=function(e){var t;return new this({default:new Qo({cipherKey:e.cipherKey}),cryptors:[new Go({cipherKey:e.cipherKey,useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t})]})},e.withDefaultCryptor=function(e){return new this({default:e})},e.prototype.getAllCryptors=function(){return u([this.defaultCryptor],l(this.cryptors),!1)},e.prototype.encrypt=function(e){var t=this.defaultCryptor.encrypt(e);if(!t.metadata)return t.data;var n=this.getHeaderData(t);return this.concatArrayBuffer(n,t.data)},e.prototype.decrypt=function(e){var t="string"==typeof e?b(e):e,n=Wo.tryParse(t),i=this.getCryptor(n),r=n.length>0?t.slice(n.length-n.metadataLength,n.length):null;if(t.slice(n.length).byteLength<=0)throw new Error("decryption error. empty content");return i.decrypt({data:t.slice(n.length),metadata:r})},e.prototype.encryptFile=function(e,t){return o(this,void 0,void 0,function(){var n,i;return a(this,function(r){switch(r.label){case 0:return this.defaultCryptor.identifier===Wo.LEGACY_IDENTIFIER?[2,this.defaultCryptor.encryptFile(e,t)]:[4,this.getFileData(e.data)];case 1:return n=r.sent(),[4,this.defaultCryptor.encryptFileData(n)];case 2:return i=r.sent(),[2,t.create({name:e.name,mimeType:"application/octet-stream",data:this.concatArrayBuffer(this.getHeaderData(i),i.data)})]}})})},e.prototype.decryptFile=function(t,n){return o(this,void 0,void 0,function(){var i,r,o,s,l,u,c,d;return a(this,function(a){switch(a.label){case 0:return[4,t.data.arrayBuffer()];case 1:return i=a.sent(),r=Wo.tryParse(i),(null==(o=this.getCryptor(r))?void 0:o.identifier)===e.LEGACY_IDENTIFIER?[2,o.decryptFile(t,n)]:[4,this.getFileData(i)];case 2:return s=a.sent(),l=s.slice(r.length-r.metadataLength,r.length),c=(u=n).create,d={name:t.name},[4,this.defaultCryptor.decryptFileData({data:i.slice(r.length),metadata:l})];case 3:return[2,c.apply(u,[(d.data=a.sent(),d)])]}})})},e.prototype.getCryptor=function(e){if(""===e){var t=this.getAllCryptors().find(function(e){return""===e.identifier});if(t)return t;throw new Error("unknown cryptor error")}if(e instanceof Vo)return this.getCryptorFromId(e.identifier)},e.prototype.getCryptorFromId=function(e){var t=this.getAllCryptors().find(function(t){return e===t.identifier});if(t)return t;throw Error("unknown cryptor error")},e.prototype.concatArrayBuffer=function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer},e.prototype.getHeaderData=function(e){if(e.metadata){var t=Wo.from(this.defaultCryptor.identifier,e.metadata),n=new Uint8Array(t.length),i=0;return n.set(t.data,i),i+=t.length-e.metadata.byteLength,n.set(new Uint8Array(e.metadata),i),n.buffer}},e.prototype.getFileData=function(t){return o(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return t instanceof Blob?[4,t.arrayBuffer()]:[3,2];case 1:return[2,n.sent()];case 2:if(t instanceof ArrayBuffer)return[2,t];if("string"==typeof t)return[2,e.encoder.encode(t)];throw new Error("Cannot decrypt/encrypt file. In browsers file encrypt/decrypt supported for string, ArrayBuffer or Blob")}})})},e.LEGACY_IDENTIFIER="",e.encoder=new TextEncoder,e.decoder=new TextDecoder,e}(),Wo=function(){function e(){}return e.from=function(t,n){if(t!==e.LEGACY_IDENTIFIER)return new Vo(t,n.byteLength)},e.tryParse=function(t){var n=new Uint8Array(t),i="";if(n.byteLength>=4&&(i=n.slice(0,4),this.decoder.decode(i)!==e.SENTINEL))return"";if(!(n.byteLength>=5))throw new Error("decryption error. invalid header version");if(n[4]>e.MAX_VERSION)throw new Error("unknown cryptor error");var r="",o=5+e.IDENTIFIER_LENGTH;if(!(n.byteLength>=o))throw new Error("decryption error. invalid crypto identifier");r=n.slice(5,o);var a=null;if(!(n.byteLength>=o+1))throw new Error("decryption error. invalid metadata length");return a=n[o],o+=1,255===a&&n.byteLength>=o+2&&(a=new Uint16Array(n.slice(o,o+2)).reduce(function(e,t){return(e<<8)+t},0),o+=2),new Vo(this.decoder.decode(r),a)},e.SENTINEL="PNED",e.LEGACY_IDENTIFIER="",e.IDENTIFIER_LENGTH=4,e.VERSION=1,e.MAX_VERSION=1,e.decoder=new TextDecoder,e}(),Vo=function(){function e(e,t){this._identifier=e,this._metadataLength=t}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},set:function(e){this._identifier=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadataLength",{get:function(){return this._metadataLength},set:function(e){this._metadataLength=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return Wo.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return Wo.SENTINEL.length+1+Wo.IDENTIFIER_LENGTH+(this.metadataLength<255?1:3)+this.metadataLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){var e=0,t=new Uint8Array(this.length),n=new TextEncoder;t.set(n.encode(Wo.SENTINEL)),t[e+=Wo.SENTINEL.length]=this.version,e++,this.identifier&&t.set(n.encode(this.identifier),e),e+=Wo.IDENTIFIER_LENGTH;var i=this.metadataLength;return i<255?t[e]=i:t.set([255,i>>8,255&i],e),t},enumerable:!1,configurable:!0}),e.IDENTIFIER_LENGTH=4,e.SENTINEL="PNED",e}();function Yo(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}var Ko=function(e){function n(t){var n=this,i=t.listenToBrowserNetworkEvents,r=void 0===i||i;return t.sdkFamily="Web",t.networking=new Cn({del:jo,get:Lo,post:Ro,patch:Bo,sendBeacon:Yo,getfile:Uo,postfile:Do}),t.cbor=new An(function(e){return xn(p.decode(e))},b),t.PubNubFile=zo,t.cryptography=new $o,t.initCryptoModule=function(e){return new qo({default:new Go({cipherKey:e.cipherKey,useRandomIVs:e.useRandomIVs}),cryptors:[new Qo({cipherKey:e.cipherKey})]})},n=e.call(this,t)||this,r&&(window.addEventListener("offline",function(){n.networkDownDetected()}),window.addEventListener("online",function(){n.networkUpDetected()})),n}return t(n,e),n.CryptoModule=qo,n}(wn);return Ko}()},8859:(e,t,n)=>{var i=n(3661),r=n(1380),o=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,e.exports=a},8879:(e,t,n)=>{var i=n(4335)(Object.getPrototypeOf,Object);e.exports=i},8963:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e<0?"-":"",i=Math.abs(e).toString();for(;i.length<t;)i="0"+i;return n+i},e.exports=t.default},8984:(e,t,n)=>{var i=n(5527),r=n(3650),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9012:e=>{e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},9059:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}},e.exports=t.default},9106:(e,t,n)=>{var i=n(9516),r=n(170);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));var s,l=n&&n.encode||o,u=n&&n.serialize;return(s=u?u(t,n):i.isURLSearchParams(t)?t.toString():new r(t,n).toString(l))&&(e+=(-1===e.indexOf("?")?"?":"&")+s),e}},9137:e=>{e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9325:(e,t,n)=>{var i=n(4840),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},9326:(e,t,n)=>{var i=n(1769),r=n(2428),o=n(6449),a=n(361),s=n(294),l=n(7797);e.exports=function(e,t,n){for(var u=-1,c=(t=i(t,e)).length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(o(e)||r(e))}},9344:(e,t,n)=>{var i=n(3805),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9417:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isProtectedDayOfYearToken=function(e){return-1!==n.indexOf(e)},t.isProtectedWeekYearToken=function(e){return-1!==i.indexOf(e)},t.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))};var n=["D","DD"],i=["YY","YYYY"]},9490:(e,t,n)=>{e.exports={isBrowser:!0,classes:{URLSearchParams:n(2002),FormData:n(243),Blob},protocols:["http","https","file","blob","url","data"]}},9516:(e,t,n)=>{var i,r=n(9012),o=Object.prototype.toString,a=(i=Object.create(null),function(e){var t=o.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function u(e){return void 0===e}var c=s("ArrayBuffer");function d(e){return"number"==typeof e}function h(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=s("Date"),g=s("File"),m=s("Blob"),y=s("FileList");function b(e){return"[object Function]"===o.call(e)}var v=s("URLSearchParams");function w(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var C,x=(C="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return C&&e instanceof C});var A,S=s("HTMLFormElement"),E=(A=Object.prototype.hasOwnProperty,function(e,t){return A.call(e,t)});e.exports={isArray:l,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:d,isObject:h,isPlainObject:p,isEmptyObject:function(e){return e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype},isUndefined:u,isDate:f,isFile:g,isBlob:m,isFunction:b,isStream:function(e){return h(e)&&b(e.pipe)},isURLSearchParams:v,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:w,merge:function e(){var t={};function n(n,i){p(t[i])&&p(n)?t[i]=e(t[i],n):p(n)?t[i]=e({},n):l(n)?t[i]=n.slice():t[i]=n}for(var i=0,r=arguments.length;i<r;i++)w(arguments[i],n);return t},extend:function(e,t,n){return w(t,function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,i){var r,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a=r[o],i&&!i(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;if(l(e))return e;var t=e.length;if(!d(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:x,isFileList:y,forEachEntry:function(e,t){for(var n,i=(e&&e[Symbol.iterator]).call(e);(n=i.next())&&!n.done;){var r=n.value;t.call(e,r[0],r[1])}},matchAll:function(e,t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:S,hasOwnProperty:E}},9615:(e,t,n)=>{var i=n(9137),r=n(4680);e.exports=function(e,t,n){var o=!i(t);return e&&(o||!1===n)?r(e,t):t}},9638:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,i.default)(e),n=(0,r.default)(t).getTime()-(0,o.default)(t).getTime();return Math.round(n/l)+1};var i=s(n(5039)),r=s(n(3076)),o=s(n(7674)),a=s(n(427));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},9641:e=>{e.exports={version:"0.30.1"}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9720:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()},e.exports=t.default},9752:(e,t,n)=>{var i=n(3729),r=n(9344),o=n(641),a=n(5389),s=n(8879),l=n(6449),u=n(3656),c=n(1882),d=n(3805),h=n(7167);e.exports=function(e,t,n){var p=l(e),f=p||u(e)||h(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=f?p?new g:[]:d(e)&&c(g)?r(s(e)):{}}return(f?i:o)(e,function(e,i,r){return t(n,e,i,r)}),n}},9770:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[r++]=a)}return o}},9784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);if(isNaN(t))return t;return t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default},9799:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(1,arguments);var n=t||{},s=n.locale,l=s&&s.options&&s.options.firstWeekContainsDate,u=null==l?1:(0,a.default)(l),c=null==n.firstWeekContainsDate?u:(0,a.default)(n.firstWeekContainsDate),d=(0,i.default)(e,t),h=new Date(0);return h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0),(0,o.default)(h,t)};var i=s(n(2036)),r=s(n(427)),o=s(n(930)),a=s(n(9784));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9935:e=>{e.exports=function(){return!1}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.nc=void 0;var i=n(2505),r=n.n(i);const o=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new Map;class l{constructor(e,t){if(this._$cssResult$=!0,t!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=s.get(this.cssText);return o&&void 0===e&&(s.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const u=(e,...t)=>{const n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new l(n,a)},c=o?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new l("string"==typeof e?e:e+"",a))(t)})(e):e;var d;const h=window.trustedTypes,p=h?h.emptyScript:"",f=window.reactiveElementPolyfillSupport,g={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},m=(e,t)=>t!==e&&(t==t||e==e),y={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:m};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const i=this._$Eh(n,t);void 0!==i&&(this._$Eu.set(i,n),e.push(i))}),e}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||y}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static _$Eh(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}addController(e){var t,n;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{o?e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(t=>{const n=document.createElement("style"),i=window.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,e.appendChild(n)})})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ES(e,t,n=y){var i,r;const o=this.constructor._$Eh(e,n);if(void 0!==o&&!0===n.reflect){const a=(null!==(r=null===(i=n.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==r?r:g.toAttribute)(t,n.type);this._$Ei=e,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Ei=null}}_$AK(e,t){var n,i,r;const o=this.constructor,a=o._$Eu.get(e);if(void 0!==a&&this._$Ei!==a){const e=o.getPropertyOptions(a),s=e.converter,l=null!==(r=null!==(i=null===(n=s)||void 0===n?void 0:n.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==r?r:g.fromAttribute;this._$Ei=a,this[a]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||m)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Ei!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((e,t)=>this[t]=e),this._$Et=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(n)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach((e,t)=>this._$ES(t,this[t],e)),this._$EC=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:b}),(null!==(d=globalThis.reactiveElementVersions)&&void 0!==d?d:globalThis.reactiveElementVersions=[]).push("1.3.1");const w=globalThis.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:e=>e}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,A="?"+x,S=`<${A}>`,E=document,T=(e="")=>E.createComment(e),k=e=>null===e||"object"!=typeof e&&"function"!=typeof e,_=Array.isArray,O=e=>{var t;return _(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,I=/>/g,N=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,D=/'/g,U=/"/g,L=/^(?:script|style|textarea|title)$/i,R=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),B=R(1),j=R(2),F=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),$=new WeakMap,z=E.createTreeWalker(E,129,null,!1),G=(e,t)=>{const n=e.length-1,i=[];let r,o=2===t?"<svg>":"",a=P;for(let t=0;t<n;t++){const n=e[t];let s,l,u=-1,c=0;for(;c<n.length&&(a.lastIndex=c,l=a.exec(n),null!==l);)c=a.lastIndex,a===P?"!--"===l[1]?a=M:void 0!==l[1]?a=I:void 0!==l[2]?(L.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=N):void 0!==l[3]&&(a=N):a===N?">"===l[0]?(a=null!=r?r:P,u=-1):void 0===l[1]?u=-2:(u=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?N:'"'===l[3]?U:D):a===U||a===D?a=N:a===M||a===I?a=P:(a=N,r=void 0);const d=a===N&&e[t+1].startsWith("/>")?" ":"";o+=a===P?n+S:u>=0?(i.push(s),n.slice(0,u)+"$lit$"+n.slice(u)+x+d):n+x+(-2===u?(i.push(void 0),t):d)}const s=o+(e[n]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==C?C.createHTML(s):s,i]};class Q{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,o=0;const a=e.length-1,s=this.parts,[l,u]=G(e,t);if(this.el=Q.createElement(l,n),z.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=z.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(x)){const n=u[o++];if(e.push(t),void 0!==n){const e=i.getAttribute(n.toLowerCase()+"$lit$").split(x),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:r,name:t[2],strings:e,ctor:"."===t[1]?K:"?"===t[1]?Z:"@"===t[1]?J:Y})}else s.push({type:6,index:r})}for(const t of e)i.removeAttribute(t)}if(L.test(i.tagName)){const e=i.textContent.split(x),t=e.length-1;if(t>0){i.textContent=w?w.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],T()),z.nextNode(),s.push({type:2,index:++r});i.append(e[t],T())}}}else if(8===i.nodeType)if(i.data===A)s.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf(x,e+1));)s.push({type:7,index:r}),e+=x.length-1}r++}}static createElement(e,t){const n=E.createElement("template");return n.innerHTML=e,n}}function q(e,t,n=e,i){var r,o,a,s;if(t===F)return t;let l=void 0!==i?null===(r=n._$Cl)||void 0===r?void 0:r[i]:n._$Cu;const u=k(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===u?l=void 0:(l=new u(e),l._$AT(e,n,i)),void 0!==i?(null!==(a=(s=n)._$Cl)&&void 0!==a?a:s._$Cl=[])[i]=l:n._$Cu=l),void 0!==l&&(t=q(e,l._$AS(e,t.values),l,i)),t}class W{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:n},parts:i}=this._$AD,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:E).importNode(n,!0);z.currentNode=r;let o=z.nextNode(),a=0,s=0,l=i[0];for(;void 0!==l;){if(a===l.index){let t;2===l.type?t=new V(o,o.nextSibling,this,e):1===l.type?t=new l.ctor(o,l.name,l.strings,this,e):6===l.type&&(t=new ee(o,this,e)),this.v.push(t),l=i[++s]}a!==(null==l?void 0:l.index)&&(o=z.nextNode(),a++)}return r}m(e){let t=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class V{constructor(e,t,n,i){var r;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cg=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=q(this,e,t),k(e)?e===H||null==e||""===e?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==F&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.k(e):O(e)?this.S(e):this.$(e)}M(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.M(e))}$(e){this._$AH!==H&&k(this._$AH)?this._$AA.nextSibling.data=e:this.k(E.createTextNode(e)),this._$AH=e}T(e){var t;const{values:n,_$litType$:i}=e,r="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.m(n);else{const e=new W(r,this),t=e.p(this.options);e.m(n),this.k(t),this._$AH=e}}_$AC(e){let t=$.get(e.strings);return void 0===t&&$.set(e.strings,t=new Q(e)),t}S(e){_(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new V(this.M(T()),this.M(T()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cg=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class Y{constructor(e,t,n,i,r){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const r=this.strings;let o=!1;if(void 0===r)e=q(this,e,t,0),o=!k(e)||e!==this._$AH&&e!==F,o&&(this._$AH=e);else{const i=e;let a,s;for(e=r[0],a=0;a<r.length-1;a++)s=q(this,i[n+a],t,a),s===F&&(s=this._$AH[a]),o||(o=!k(s)||s!==this._$AH[a]),s===H?e=H:e!==H&&(e+=(null!=s?s:"")+r[a+1]),this._$AH[a]=s}o&&!i&&this.C(e)}C(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class K extends Y{constructor(){super(...arguments),this.type=3}C(e){this.element[this.name]=e===H?void 0:e}}const X=w?w.emptyScript:"";class Z extends Y{constructor(){super(...arguments),this.type=4}C(e){e&&e!==H?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class J extends Y{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=q(this,e,t,0))&&void 0!==n?n:H)===F)return;const i=this._$AH,r=e===H&&i!==H||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==H&&(i===H||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class ee{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){q(this,e)}}const te={L:"$lit$",P:x,V:A,I:1,N:G,R:W,j:O,D:q,H:V,F:Y,O:Z,W:J,B:K,Z:ee},ne=window.litHtmlPolyfillSupport;var ie,re;null==ne||ne(Q,V),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.2.2");class oe extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=((e,t,n)=>{var i,r;const o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t;let a=o._$litPart$;if(void 0===a){const e=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;o._$litPart$=a=new V(t.insertBefore(T(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return F}}oe.finalized=!0,oe._$litElement$=!0,null===(ie=globalThis.litElementHydrateSupport)||void 0===ie||ie.call(globalThis,{LitElement:oe});const ae=globalThis.litElementPolyfillSupport;null==ae||ae({LitElement:oe});(null!==(re=globalThis.litElementVersions)&&void 0!==re?re:globalThis.litElementVersions=[]).push("3.2.0");const se=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t),le=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(n){n.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function ue(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):le(e,t)}function ce(e){return ue({...e,state:!0})}function de(e,t){return(({finisher:e,descriptor:t})=>(n,i)=>{var r;if(void 0===i){const i=null!==(r=n.originalKey)&&void 0!==r?r:n.key,o=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(n.key)}:{...n,key:i};return null!=e&&(o.finisher=function(t){e(t,i)}),o}{const r=n.constructor;void 0!==t&&Object.defineProperty(n,i,t(i)),null==e||e(r,i)}})({descriptor:n=>{const i={get(){var t,n;return null!==(n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof n?Symbol():"__"+n;i.get=function(){var n,i;return void 0===this[t]&&(this[t]=null!==(i=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(e))&&void 0!==i?i:null),this[t]}}return i}})}var he;null===(he=window.HTMLSlotElement)||void 0===he||he.prototype.assignedElements;const pe=1,fe=2,ge=e=>(...t)=>({_$litDirective$:e,values:t});class me{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const ye=ge(class extends me{constructor(e){var t;if(super(e),e.type!==pe||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.et){this.et=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!(null===(n=this.st)||void 0===n?void 0:n.has(e))&&this.et.add(e);return this.render(t)}const r=e.element.classList;this.et.forEach(e=>{e in t||(r.remove(e),this.et.delete(e))});for(const e in t){const n=!!t[e];n===this.et.has(e)||(null===(i=this.st)||void 0===i?void 0:i.has(e))||(n?(r.add(e),this.et.add(e)):(r.remove(e),this.et.delete(e)))}return F}}),{H:be}=te,ve=(e,t)=>{var n,i;const r=e._$AN;if(void 0===r)return!1;for(const e of r)null===(i=(n=e)._$AO)||void 0===i||i.call(n,t,!1),ve(e,t);return!0},we=e=>{let t,n;do{if(void 0===(t=e._$AM))break;n=t._$AN,n.delete(e),e=t}while(0===(null==n?void 0:n.size))},Ce=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Se(t)}};function xe(e){void 0!==this._$AN?(we(this),this._$AM=e,Ce(this)):this._$AM=e}function Ae(e,t=!1,n=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)ve(i[e],!1),we(i[e]);else null!=i&&(ve(i,!1),we(i));else ve(this,e)}const Se=e=>{var t,n,i,r;e.type==fe&&(null!==(t=(i=e)._$AP)&&void 0!==t||(i._$AP=Ae),null!==(n=(r=e)._$AQ)&&void 0!==n||(r._$AQ=xe))};class Ee extends me{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Ce(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?null===(n=this.reconnected)||void 0===n||n.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),t&&(ve(this,e),we(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const Te=()=>new ke;class ke{}const _e=new WeakMap,Oe=ge(class extends Ee{render(e){return H}update(e,[t]){var n;const i=t!==this.U;return i&&void 0!==this.U&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.U=t,this.ht=null===(n=e.options)||void 0===n?void 0:n.host,this.ot(this.lt=e.element)),H}ot(e){var t;if("function"==typeof this.U){const n=null!==(t=this.ht)&&void 0!==t?t:globalThis;let i=_e.get(n);void 0===i&&(i=new WeakMap,_e.set(n,i)),void 0!==i.get(this.U)&&this.U.call(this.ht,void 0),i.set(this.U,e),void 0!==e&&this.U.call(this.ht,e)}else this.U.value=e}get rt(){var e,t,n;return"function"==typeof this.U?null===(t=_e.get(null!==(e=this.ht)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.U):null===(n=this.U)||void 0===n?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),Pe=e=>{const t=e.replace(/\D/g,"").substring(0,10),n=t.substring(0,3),i=t.substring(3,6),r=t.substring(6,10);return t.length>5?`(${n}) ${i}-${r}`:t.length>2?`(${n}) ${i}`:t.length>0?`(${n}`:""},Me=e=>{const t=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(t){return[t[1]?"+1 ":"","(",t[2],") ",t[3],"-",t[4]].join("")}return e},Ie=e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105},Ne=e=>e.altKey||e.ctrlKey||e.metaKey,De=e=>{const t=e.keyCode;return e.shiftKey||35===t||36===t||8===t||9===t||13===t||46===t||t>36&&t<41||(e.ctrlKey||e.metaKey)&&(65===t||67===t||76===t||86===t||88===t||90===t)},Ue=ge(class extends me{constructor(e){var t;if(super(e),e.type!==pe||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ct){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach(e=>{null==t[e]&&(this.ct.delete(e),e.includes("-")?n.removeProperty(e):n[e]="")});for(const e in t){const i=t[e];null!=i&&(this.ct.add(e),e.includes("-")?n.setProperty(e,i):n[e]=i)}return F}}),Le="#646987",Re="#ffffff",Be=e=>({r:parseInt(e.substring(1,3),16),g:parseInt(e.substring(3,5),16),b:parseInt(e.substring(5,7),16)}),je=(e,t,n)=>"#"+[e,t,n].map(e=>{const t=e.toString(16);return 1===t.length?"0"+t:t}).join(""),Fe=(e,t)=>{let n=parseInt(e.substr(1,2),16),i=parseInt(e.substr(3,2),16),r=parseInt(e.substr(5,2),16);return n=Math.round(n*(1-t)+255*t),i=Math.round(i*(1-t)+255*t),r=Math.round(r*(1-t)+255*t),"#"+n.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")+r.toString(16).padStart(2,"0")},He=(e,t)=>2===e||70392===t;var $e=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 ze=class extends oe{constructor(){super(...arguments),this.heading="",this.subtitle="",this.selected=!1,this.primaryColor=Le,this.backgroundColor=Re,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black"}render(){return B`
|
|
1
|
+
var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){return i(e,o,r)}},79:(e,t,n)=>{var i=n(3702),r=n(80),o=n(4739),a=n(8655),s=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},80:(e,t,n)=>{var i=n(6025),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},85:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,i.default)(e),s=(0,r.default)(n,t).getTime()-(0,o.default)(n,t).getTime();return Math.round(s/l)+1};var i=s(n(5039)),r=s(n(930)),o=s(n(9799)),a=s(n(427));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},104:(e,t,n)=>{var i=n(3661);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},170:(e,t,n)=>{var i=n(6440);function r(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function o(e,t){this._pairs=[],e&&i(e,this,t)}var a=o.prototype;a.append=function(e,t){this._pairs.push([e,t])},a.toString=function(e){var t=e?function(t){return e.call(this,t,r)}:r;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")},e.exports=o},243:e=>{e.exports=FormData},270:(e,t,n)=>{var i=n(7068),r=n(346);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,a,e,s))}},289:(e,t,n)=>{var i=n(2651);e.exports=function(e){return i(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},311:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(r.length)}}},e.exports=t.default},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},427:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default},521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),s=n-o;return Math.floor(s/a)+1};var i=o(n(5039)),r=o(n(427));function o(e){return e&&e.__esModule?e:{default:e}}var a=864e5;e.exports=t.default},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},583:(e,t,n)=>{var i=n(7237),r=n(7255),o=n(8586),a=n(7797);e.exports=function(e){return o(e)?i(a(e)):r(e)}},620:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(8963))&&i.__esModule?i:{default:i};var o={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,r.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,r.default)(n+1,2)},d:function(e,t){return(0,r.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return(0,r.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,r.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,r.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,r.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return(0,r.default)(o,t.length)}};t.default=o,e.exports=t.default},631:(e,t,n)=>{var i=n(8077),r=n(9326);e.exports=function(e,t){return null!=e&&r(e,t,i)}},641:(e,t,n)=>{var i=n(6649),r=n(5950);e.exports=function(e,t){return e&&i(e,t,r)}},659:(e,t,n)=>{var i=n(1873),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,s=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=a.call(e);return i&&(t?e[s]=n:delete e[s]),r}},663:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;var a,s=o[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}},e.exports=t.default},689:(e,t,n)=>{var i=n(2),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=i(e),c=u.length;if(c!=i(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:r.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var y=e[h=u[d]],b=t[h];if(o)var v=l?o(b,y,h,t,e,s):o(y,b,h,e,t,s);if(!(void 0===v?y===b||a(y,b,n,o,s):v)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var w=e.constructor,C=t.constructor;w==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof C&&C instanceof C||(g=!1)}return s.delete(e),s.delete(t),g}},695:(e,t,n)=>{var i=n(8096),r=n(2428),o=n(6449),a=n(3656),s=n(361),l=n(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&r(e),d=!n&&!c&&a(e),h=!n&&!c&&!d&&l(e),p=n||c||d||h,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||f.push(m);return f}},756:(e,t,n)=>{var i=n(3805);e.exports=function(e){return e==e&&!i(e)}},776:(e,t,n)=>{var i=n(756),r=n(5950);e.exports=function(e){for(var t=r(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,i(a)]}return t}},786:(e,t,n)=>{e.exports=n(1894)},828:(e,t,n)=>{var i=n(4647),r=n(3222),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=r(e))&&e.replace(o,i).replace(a,"")}},882:e=>{e.exports=function(e,t,n,i){var r=-1,o=null==e?0:e.length;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}},909:(e,t,n)=>{var i=n(641),r=n(8329)(i);e.exports=r},930:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(1,arguments);var n=t||{},a=n.locale,s=a&&a.options&&a.options.weekStartsOn,l=null==s?0:(0,o.default)(s),u=null==n.weekStartsOn?l:(0,o.default)(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=(0,i.default)(e),d=c.getUTCDay(),h=(d<u?7:0)+d-u;return c.setUTCDate(c.getUTCDate()-h),c.setUTCHours(0,0,0,0),c};var i=a(n(5039)),r=a(n(427)),o=a(n(9784));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var i=n(79),r=n(8223),o=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!r||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},1042:(e,t,n)=>{var i=n(6110)(Object,"create");e.exports=i},1074:e=>{e.exports=function(e){return e.split("")}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1175:(e,t,n)=>{var i=n(6025);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},1287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(e,t,i){var r,o=n[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};t.default=i,e.exports=t.default},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1420:(e,t,n)=>{var i=n(79);e.exports=function(){this.__data__=new i,this.size=0}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1545:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var i,r=n||{};if("formatting"===(r.context?String(r.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}return i[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default},1549:(e,t,n)=>{var i=n(2032),r=n(3862),o=n(6721),a=n(2749),s=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},1601:e=>{e.exports=function(e){return e[1]}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1769:(e,t,n)=>{var i=n(6449),r=n(8586),o=n(1802),a=n(3222);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(a(e))}},1799:(e,t,n)=>{var i=n(7217),r=n(270);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var c=(u=n[a])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var p=new i;if(o)var f=o(d,h,c,e,t,p);if(!(void 0===f?r(h,d,3,o,p):f))return!1}}return!0}},1802:(e,t,n)=>{var i=n(2224),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=i(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)}),t});e.exports=a},1873:(e,t,n)=>{var i=n(9325).Symbol;e.exports=i},1882:(e,t,n)=>{var i=n(2552),r=n(3805);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1894:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},1986:(e,t,n)=>{var i=n(1873),r=n(7828),o=n(5288),a=n(5911),s=n(317),l=n(4247),u=i?i.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&i;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=h.get(e);if(g)return g==t;i|=2,h.set(e,t);var m=a(p(e),p(t),i,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},2e3:(e,t,n)=>{var i=n(3945),r=n(2429),o=n(5389),a=n(6449);e.exports=function(e,t){return function(n,s){var l=a(n)?i:r,u=t?t():{};return l(n,e,o(s,2),u)}}},2002:(e,t,n)=>{var i=n(170);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:i},2012:(e,t,n)=>{var i=n(9516),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(i.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=i.trim(e.slice(0,o)).toLowerCase(),n=i.trim(e.slice(o+1)),t){if(a[t]&&r.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},2013:(e,t,n)=>{var i=n(3360),r=n(2e3),o=Object.prototype.hasOwnProperty,a=r(function(e,t,n){o.call(e,n)?e[n].push(t):i(e,n,[t])});e.exports=a},2032:(e,t,n)=>{var i=n(1042);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},2036:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(1,arguments);var n=(0,i.default)(e),s=n.getUTCFullYear(),l=t||{},u=l.locale,c=u&&u.options&&u.options.firstWeekContainsDate,d=null==c?1:(0,a.default)(c),h=null==l.firstWeekContainsDate?d:(0,a.default)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var f=(0,o.default)(p,t),g=new Date(0);g.setUTCFullYear(s,0,h),g.setUTCHours(0,0,0,0);var m=(0,o.default)(g,t);return n.getTime()>=f.getTime()?s+1:n.getTime()>=m.getTime()?s:s-1};var i=s(n(5039)),r=s(n(427)),o=s(n(930)),a=s(n(9784));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2054:e=>{var t="\\ud800-\\udfff",n="["+t+"]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+i+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+l+")*"),d="(?:"+[o+i+"?",i,a,s,n].join("|")+")",h=RegExp(r+"(?="+r+")|"+d+c,"g");e.exports=function(e){return e.match(h)||[]}},2193:(e,t,n)=>{var i=n(8984),r=n(5861),o=n(2428),a=n(6449),s=n(4894),l=n(3656),u=n(5527),c=n(7167),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||o(e)))return!e.length;var t=r(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!i(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var i=n(4528),r=n(6449);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},2224:(e,t,n)=>{var i=n(104);e.exports=function(e){var t=i(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2225:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",s="\\d+",l="["+n+"]",u="["+i+"]",c="[^"+t+o+s+n+i+r+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+r+"]",f="(?:"+u+"|"+c+")",g="(?:"+p+"|"+c+")",m="(?:['’](?:d|ll|m|re|s|t|ve))?",y="(?:['’](?:D|LL|M|RE|S|T|VE))?",b="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?",w=v+b+("(?:\\u200d(?:"+["[^"+t+"]",d,h].join("|")+")"+v+b+")*"),C="(?:"+[l,d,h].join("|")+")"+w,x=RegExp([p+"?"+u+"+"+m+"(?="+[a,p,"$"].join("|")+")",g+"+"+y+"(?="+[a,p+f,"$"].join("|")+")",p+"?"+f+"+"+m,p+"+"+y,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,C].join("|"),"g");e.exports=function(e){return e.match(x)||[]}},2428:(e,t,n)=>{var i=n(7534),r=n(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},2429:(e,t,n)=>{var i=n(909);e.exports=function(e,t,n,r){return i(e,function(e,i,o){t(r,e,n(e),o)}),r}},2461:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(n(1287)),r=l(n(4994)),o=l(n(6376)),a=l(n(2568)),s=l(n(5024));function l(e){return e&&e.__esModule?e:{default:e}}var u={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:o.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=u,e.exports=t.default},2485:(e,t)=>{var n;!function(){var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)i.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},2505:(e,t,n)=>{e.exports=n(8015)},2507:(e,t,n)=>{var i=n(8754),r=n(9698),o=n(3912),a=n(3222);e.exports=function(e){return function(t){t=a(t);var n=r(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?i(n,1).join(""):t.slice(1);return s[e]()+l}}},2552:(e,t,n)=>{var i=n(1873),r=n(659),o=n(9350),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):o(e)}},2568:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(1545))&&i.__esModule?i:{default:i};var o={ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};t.default=o,e.exports=t.default},2651:(e,t,n)=>{var i=n(4218);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:(e,t,n)=>{var i=n(1042),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},2804:(e,t,n)=>{var i=n(6110)(n(9325),"Promise");e.exports=i},2881:(e,t,n)=>{var i=n(9516),r=n(7412);e.exports=function(e,t,n,o){var a=this||r;return i.forEach(o,function(i){e=i.call(a,e,t,n)}),e}},2949:(e,t,n)=>{var i=n(2651);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},3040:(e,t,n)=>{var i=n(1549),r=n(79),o=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},3076:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t};var i=o(n(5039)),r=o(n(427));function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},3191:(e,t,n)=>{var i=n(8563);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,i=new Promise(function(e){n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,r,o){n.reason||(n.reason=new i(e,r,o),t(n.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},r.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},3221:e=>{e.exports=function(e){return function(t,n,i){for(var r=-1,o=Object(t),a=i(t),s=a.length;s--;){var l=a[e?s:++r];if(!1===n(o[l],l,o))break}return t}}},3222:(e,t,n)=>{var i=n(7556);e.exports=function(e){return null==e?"":i(e)}},3243:(e,t,n)=>{var i=n(6110),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},3345:e=>{e.exports=function(){return[]}},3360:(e,t,n)=>{var i=n(3243);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3471:(e,t,n)=>{var i=n(9516);function r(){this.handlers=[]}r.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.clear=function(){this.handlers&&(this.handlers=[])},r.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},3488:e=>{e.exports=function(e){return e}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},3650:(e,t,n)=>{var i=n(4335)(Object.keys,Object);e.exports=i},3656:(e,t,n)=>{e=n.nmd(e);var i=n(9325),r=n(9935),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||r;e.exports=l},3661:(e,t,n)=>{var i=n(3040),r=n(7670),o=n(289),a=n(4509),s=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},3663:(e,t,n)=>{var i=n(1799),r=n(776),o=n(7197);e.exports=function(e){var t=r(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3729:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},3786:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(t);return(0,r.default)(e,-n)};var i=a(n(9784)),r=a(n(5011)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3864:e=>{e.exports=function(e){return!(!e||!e.__CANCEL__)}},3912:(e,t,n)=>{var i=n(1074),r=n(9698),o=n(2054);e.exports=function(e){return r(e)?o(e):i(e)}},3916:(e,t,n)=>{var i=n(3360),r=n(641),o=n(5389);e.exports=function(e,t){var n={};return t=o(t,3),r(e,function(e,r,o){i(n,r,t(e,r,o))}),n}},3945:e=>{e.exports=function(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var a=e[r];t(i,a,n(a),e)}return i}},3948:(e,t,n)=>{var i=n(9516);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(r)&&s.push("path="+r),i.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},3950:e=>{e.exports=function(){}},4058:(e,t,n)=>{var i=n(4792),r=n(5539)(function(e,t,n){return t=t.toLowerCase(),e+(n?i(t):t)});e.exports=r},4124:(e,t,n)=>{var i=n(5539)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=i},4202:(e,t,n)=>{var i=n(9516);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},4298:(e,t,n)=>{var i=n(9516);e.exports=function(e){function t(e,n,r,o){var a=e[o++];if("__proto__"===a)return!0;var s=Number.isFinite(+a),l=o>=e.length;return a=!a&&i.isArray(r)?r.length:a,l?(i.hasOwnProperty(r,a)?r[a]=[r[a],n]:r[a]=n,!s):(r[a]&&i.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&i.isArray(r[a])&&(r[a]=function(e){var t,n,i={},r=Object.keys(e),o=r.length;for(t=0;t<o;t++)i[n=r[t]]=e[n];return i}(r[a])),!s)}if(i.isFormData(e)&&i.isFunction(e.entries)){var n={};return i.forEachEntry(e,function(e,r){t(function(e){return i.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),r,n,0)}),n}return null}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4394:(e,t,n)=>{var i=n(2552),r=n(346);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},4490:(e,t,n)=>{var i=n(9516),r=n(2881),o=n(3864),a=n(7412),s=n(8563),l=n(7018);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,null,e.transformRequest),l(e.headers,"Accept"),l(e.headers,"Content-Type"),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return u(e),t.data=r.call(e,t.data,t.headers,t.status,e.transformResponse),t},function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)})}},4509:(e,t,n)=>{var i=n(2651);e.exports=function(e){return i(this,e).has(e)}},4528:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},4552:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},4647:(e,t,n)=>{var i=n(4552)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=i},4664:(e,t,n)=>{var i=n(9770),r=n(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),i(a(e),function(t){return o.call(e,t)}))}:r;e.exports=s},4680:e=>{e.exports=function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},4739:(e,t,n)=>{var i=n(6025);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},4792:(e,t,n)=>{var i=n(3222),r=n(5808);e.exports=function(e){return r(i(e).toLowerCase())}},4840:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},4841:(e,t,n)=>{var i=n(9641).version,r=n(5845),o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var a={};o.transitional=function(e,t,n){return function(o,s,l){if(!1===e)throw new r(function(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(s," has been removed"+(t?" in "+t:"")),r.ERR_DEPRECATED);return t&&!a[s]&&(a[s]=!0),!e||e(o,s,l)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new r("options must be an object",r.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),o=i.length;o-- >0;){var a=i[o],s=t[a];if(s){var l=e[a],u=void 0===l||s(l,a,e);if(!0!==u)throw new r("option "+a+" must be "+u,r.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new r("Unknown option "+a,r.ERR_BAD_OPTION)}},validators:o}},4894:(e,t,n)=>{var i=n(1882),r=n(294);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},4896:e=>{e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},4901:(e,t,n)=>{var i=n(2552),r=n(294),o=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!a[i(e)]}},4932:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},4994:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,r=(i=n(9059))&&i.__esModule?i:{default:i};var o={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=o,e.exports=t.default},5011:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,r.default)(e).getTime(),a=(0,i.default)(t);return new Date(n+a)};var i=a(n(9784)),r=a(n(5039)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5019:(e,t,n)=>{var i=n(9516);e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},5024:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(663));function r(e){return e&&e.__esModule?e:{default:e}}var o={ordinalNumber:(0,r(n(311)).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,i.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,i.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};t.default=o,e.exports=t.default},5039:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)};var i,r=(i=n(427))&&i.__esModule?i:{default:i};e.exports=t.default},5042:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(521)),r=c(n(9638)),o=c(n(5891)),a=c(n(85)),s=c(n(2036)),l=c(n(8963)),u=c(n(620));function c(e){return e&&e.__esModule?e:{default:e}}var d="midnight",h="noon",p="morning",f="afternoon",g="evening",m="night",y={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,i){var r=(0,s.default)(e,i),o=r>0?r:1-r;if("YY"===t){var a=o%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):(0,l.default)(o,t.length)},R:function(e,t){var n=(0,o.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return(0,l.default)(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return(0,l.default)(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return(0,l.default)(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=(0,a.default)(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):(0,l.default)(r,t.length)},I:function(e,t,n){var i=(0,r.default)(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var r=(0,i.default)(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):(0,l.default)(r,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return(0,l.default)(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return(0,l.default)(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return(0,l.default)(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,r=e.getUTCHours();switch(i=12===r?h:0===r?d:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,r=e.getUTCHours();switch(i=r>=17?g:r>=12?f:r>=4?p:m,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):(0,l.default)(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return v(r);case"XXXX":case"XX":return w(r);default:return w(r,":")}},x:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return v(r);case"xxxx":case"xx":return w(r);default:return w(r,":")}},O:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b(r,":");default:return"GMT"+w(r,":")}},z:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b(r,":");default:return"GMT"+w(r,":")}},t:function(e,t,n,i){var r=i._originalDate||e,o=Math.floor(r.getTime()/1e3);return(0,l.default)(o,t.length)},T:function(e,t,n,i){var r=(i._originalDate||e).getTime();return(0,l.default)(r,t.length)}};function b(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+(0,l.default)(o,2)}function v(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):w(e,t)}function w(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+(0,l.default)(Math.floor(r/60),2)+n+(0,l.default)(r%60,2)}var C=y;t.default=C,e.exports=t.default},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},5072:e=>{var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var o={},a=[],s=0;s<e.length;s++){var l=e[s],u=i.base?l[0]+i.base:l[0],c=o[u]||0,d="".concat(u," ").concat(c);o[u]=c+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=r(p,i);i.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function r(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var o=i(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var l=i(e,r),u=0;u<o.length;u++){var c=n(o[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},5083:(e,t,n)=>{var i=n(1882),r=n(7296),o=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,h=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?h:s).test(a(e))}},5102:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)};var i,r=(i=n(427))&&i.__esModule?i:{default:i};e.exports=t.default},5155:(e,t,n)=>{var i=n(9516),r=n(9106),o=n(3471),a=n(4490),s=n(5343),l=n(9615),u=n(4841),c=u.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=t.paramsSerializer;null!=r&&(i.isFunction(r)?t.paramsSerializer={serialize:r}:u.assertOptions(r,{encode:c.function,serialize:c.function},!0));var o=[],l=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});var d,h=[];if(this.interceptors.response.forEach(function(e){h.push(e.fulfilled,e.rejected)}),!l){var p=[a,void 0];for(Array.prototype.unshift.apply(p,o),p=p.concat(h),d=Promise.resolve(t);p.length;)d=d.then(p.shift(),p.shift());return d}for(var f=t;o.length;){var g=o.shift(),m=o.shift();try{f=g(f)}catch(e){m(e);break}}try{d=a(f)}catch(e){return Promise.reject(e)}for(;h.length;)d=d.then(h.shift(),h.shift());return d},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url,e.allowAbsoluteUrls);return r(t,e.params,e.paramsSerializer)},i.forEach(["delete","get","head","options"],function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),i.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,r){return this.request(s(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)}),e.exports=d},5160:e=>{e.exports=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++i<r;)o[i]=e[i+t];return o}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5343:(e,t,n)=>{var i=n(9516);e.exports=function(e,t){t=t||{};var n={};function r(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isEmptyObject(t)?i.merge({},e):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function o(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function a(e){if(!i.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function l(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return i.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=u[e]||o,r=t(e);i.isUndefined(r)&&t!==l||(n[e]=r)}),n}},5389:(e,t,n)=>{var i=n(3663),r=n(7978),o=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?r(e[0],e[1]):i(e):s(e)}},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5481:(e,t,n)=>{var i=n(9325)["__core-js_shared__"];e.exports=i},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5539:(e,t,n)=>{var i=n(882),r=n(828),o=n(6645),a=RegExp("['’]","g");e.exports=function(e){return function(t){return i(o(r(t).replace(a,"")),e,"")}}},5541:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(1601),r=n.n(i),o=n(6314),a=n.n(o)()(r());a.push([e.id,"@media screen and (min-width: 767px) {\n .meetelise-chat.pane.launcher__desktop {\n right: -32px;\n }\n}\n",""]);const s=a},5580:(e,t,n)=>{var i=n(6110)(n(9325),"DataView");e.exports=i},5592:(e,t,n)=>{var i=n(9516),r=n(7522),o=n(3948),a=n(9106),s=n(9615),l=n(2012),u=n(4202),c=n(4896),d=n(5845),h=n(8563),p=n(5656),f=n(5721);e.exports=function(e){return new Promise(function(t,n){var g,m=e.data,y=e.headers,b=e.responseType,v=e.withXSRFToken;function w(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}i.isFormData(m)&&i.isStandardBrowserEnv()&&delete y["Content-Type"];var C=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(x+":"+A)}var S=s(e.baseURL,e.url,e.allowAbsoluteUrls);function E(){if(C){var i="getAllResponseHeaders"in C?l(C.getAllResponseHeaders()):null,o={data:b&&"text"!==b&&"json"!==b?C.response:C.responseText,status:C.status,statusText:C.statusText,headers:i,config:e,request:C};r(function(e){t(e),w()},function(e){n(e),w()},o),C=null}}if(C.open(e.method.toUpperCase(),a(S,e.params,e.paramsSerializer),!0),C.timeout=e.timeout,"onloadend"in C?C.onloadend=E:C.onreadystatechange=function(){C&&4===C.readyState&&(0!==C.status||C.responseURL&&0===C.responseURL.indexOf("file:"))&&setTimeout(E)},C.onabort=function(){C&&(n(new d("Request aborted",d.ECONNABORTED,e,C)),C=null)},C.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,C)),C=null},C.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,i.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,C)),C=null},i.isStandardBrowserEnv()&&(v&&i.isFunction(v)&&(v=v(e)),v||!1!==v&&u(S))){var k=e.xsrfHeaderName&&e.xsrfCookieName&&o.read(e.xsrfCookieName);k&&(y[e.xsrfHeaderName]=k)}"setRequestHeader"in C&&i.forEach(y,function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete y[t]:C.setRequestHeader(t,e)}),i.isUndefined(e.withCredentials)||(C.withCredentials=!!e.withCredentials),b&&"json"!==b&&(C.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&C.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&C.upload&&C.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(g=function(t){C&&(n(!t||t.type?new h(null,e,C):t),C.abort(),C=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g))),m||!1===m||0===m||""===m||(m=null);var T=p(S);T&&-1===f.protocols.indexOf(T)?n(new d("Unsupported protocol "+T+":",d.ERR_BAD_REQUEST,e)):C.send(m)})}},5656:e=>{e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},5721:(e,t,n)=>{e.exports=n(9490)},5749:(e,t,n)=>{var i=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},5808:(e,t,n)=>{var i=n(2507)("toUpperCase");e.exports=i},5816:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(1,arguments),!(0,i.default)(e)&&"number"!=typeof e)return!1;var t=(0,r.default)(e);return!isNaN(Number(t))};var i=a(n(5102)),r=a(n(5039)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5845:(e,t,n)=>{var i=n(9516);function r(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}i.inherits(r,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=r.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(r,a),Object.defineProperty(o,"isAxiosError",{value:!0}),r.from=function(e,t,n,a,s,l){var u=Object.create(o);return i.toFlatObject(e,u,function(e){return e!==Error.prototype}),r.call(u,e.message,t,n,a,s),u.cause=e,u.name=e.name,l&&Object.assign(u,l),u},e.exports=r},5861:(e,t,n)=>{var i=n(5580),r=n(8223),o=n(2804),a=n(6545),s=n(8303),l=n(2552),u=n(7473),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(i),m=u(r),y=u(o),b=u(a),v=u(s),w=l;(i&&w(new i(new ArrayBuffer(1)))!=f||r&&w(new r)!=c||o&&w(o.resolve())!=d||a&&w(new a)!=h||s&&w(new s)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return f;case m:return c;case y:return d;case b:return h;case v:return p}return t}),e.exports=w},5891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(1,arguments);var t=(0,i.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,o.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,o.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var i=a(n(5039)),r=a(n(427)),o=a(n(3076));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},5911:(e,t,n)=>{var i=n(8859),r=n(4248),o=n(9219);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var y=e[f],b=t[f];if(a)var v=u?a(b,y,f,t,e,l):a(y,b,f,e,t,l);if(void 0!==v){if(v)continue;g=!1;break}if(m){if(!r(t,function(e,t){if(!o(m,t)&&(y===e||s(y,e,n,a,l)))return m.push(t)})){g=!1;break}}else if(y!==b&&!s(y,b,n,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},5950:(e,t,n)=>{var i=n(695),r=n(8984),o=n(4894);e.exports=function(e){return o(e)?i(e):r(e)}},6009:(e,t,n)=>{e=n.nmd(e);var i=n(4840),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&i.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6025:(e,t,n)=>{var i=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},6069:(e,t,n)=>{var i=n(9516),r=n(6440),o=n(5721);e.exports=function(e,t){return r(e,new o.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return o.isNode&&i.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}},6110:(e,t,n)=>{var i=n(5083),r=n(392);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,i,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);i&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},6353:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){(0,h.default)(2,arguments);var p=String(t),v=n||{},w=v.locale||r.default,C=w.options&&w.options.firstWeekContainsDate,x=null==C?1:(0,d.default)(C),A=null==v.firstWeekContainsDate?x:(0,d.default)(v.firstWeekContainsDate);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=w.options&&w.options.weekStartsOn,E=null==S?0:(0,d.default)(S),k=null==v.weekStartsOn?E:(0,d.default)(v.weekStartsOn);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var T=(0,a.default)(e);if(!(0,i.default)(T))throw new RangeError("Invalid time value");var _=(0,u.default)(T),O=(0,o.default)(T,_),P={firstWeekContainsDate:A,weekStartsOn:k,locale:w,_originalDate:T},M=p.match(g).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,l.default[t])(e,w.formatLong,P):e}).join("").match(f).map(function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return n.match(m)[1].replace(y,"'");var r=s.default[i];if(r)return!v.useAdditionalWeekYearTokens&&(0,c.isProtectedWeekYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),!v.useAdditionalDayOfYearTokens&&(0,c.isProtectedDayOfYearToken)(n)&&(0,c.throwProtectedError)(n,t,e),r(O,n,w.localize,P);if(i.match(b))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("");return M};var i=p(n(5816)),r=p(n(2461)),o=p(n(3786)),a=p(n(5039)),s=p(n(5042)),l=p(n(6680)),u=p(n(9720)),c=n(9417),d=p(n(9784)),h=p(n(427));function p(e){return e&&e.__esModule?e:{default:e}}var f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,y=/''/g,b=/[a-zA-Z]/;e.exports=t.default},6376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(e,t,i,r){return n[e]};t.default=i,e.exports=t.default},6440:(e,t,n)=>{var i=n(9516),r=n(5845),o=n(786);function a(e){return i.isPlainObject(e)||i.isArray(e)}function s(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function l(e,t,n){return e?e.concat(t).map(function(e,t){return e=s(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var u=i.toFlatObject(i,{},null,function(e){return/^is[A-Z]/.test(e)});e.exports=function(e,t,n){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new(o||FormData);var c,d=(n=i.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!i.isUndefined(t[e])})).metaTokens,h=n.visitor||y,p=n.dots,f=n.indexes,g=(n.Blob||"undefined"!=typeof Blob&&Blob)&&((c=t)&&i.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator]);if(!i.isFunction(h))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(i.isDate(e))return e.toISOString();if(!g&&i.isBlob(e))throw new r("Blob is not supported. Use a Buffer instead.");return i.isArrayBuffer(e)||i.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function y(e,n,r){var o=e;if(e&&!r&&"object"==typeof e)if(i.endsWith(n,"{}"))n=d?n:n.slice(0,-2),e=JSON.stringify(e);else if(i.isArray(e)&&function(e){return i.isArray(e)&&!e.some(a)}(e)||i.isFileList(e)||i.endsWith(n,"[]")&&(o=i.toArray(e)))return n=s(n),o.forEach(function(e,r){!i.isUndefined(e)&&null!==e&&t.append(!0===f?l([n],r,p):null===f?n:n+"[]",m(e))}),!1;return!!a(e)||(t.append(l(r,n,p),m(e)),!1)}var b=[],v=Object.assign(u,{defaultVisitor:y,convertValue:m,isVisitable:a});if(!i.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!i.isUndefined(n)){if(-1!==b.indexOf(n))throw Error("Circular reference detected in "+r.join("."));b.push(n),i.forEach(n,function(n,o){!0===(!(i.isUndefined(n)||null===n)&&h.call(t,n,i.isString(o)?o.trim():o,r,v))&&e(n,r?r.concat(o):[o])}),b.pop()}}(e),t}},6449:e=>{var t=Array.isArray;e.exports=t},6545:(e,t,n)=>{var i=n(6110)(n(9325),"Set");e.exports=i},6645:(e,t,n)=>{var i=n(1733),r=n(5434),o=n(3222),a=n(2225);e.exports=function(e,t,n){return e=o(e),void 0===(t=n?void 0:t)?r(e)?a(e):i(e):e.match(t)||[]}},6649:(e,t,n)=>{var i=n(3221)();e.exports=i},6680:(e,t)=>{function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={p:i,P:function(e,t){var r,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",n(a,t)).replace("{{time}}",i(s,t))}},o=r;t.default=o,e.exports=t.default},6721:(e,t,n)=>{var i=n(1042),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},7018:(e,t,n)=>{var i=n(9516);e.exports=function(e,t){i.forEach(e,function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])})}},7035:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)({},e)};var i,r=(i=n(7390))&&i.__esModule?i:{default:i};e.exports=t.default},7068:(e,t,n)=>{var i=n(7217),r=n(5911),o=n(1986),a=n(689),s=n(5861),l=n(6449),u=n(3656),c=n(7167),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var b=l(e),v=l(t),w=b?h:s(e),C=v?h:s(t),x=(w=w==d?p:w)==p,A=(C=C==d?p:C)==p,S=w==C;if(S&&u(e)){if(!u(t))return!1;b=!0,x=!1}if(S&&!x)return y||(y=new i),b||c(e)?r(e,t,n,g,m,y):o(e,t,w,n,g,m,y);if(!(1&n)){var E=x&&f.call(e,"__wrapped__"),k=A&&f.call(t,"__wrapped__");if(E||k){var T=E?e.value():e,_=k?t.value():t;return y||(y=new i),m(T,_,n,g,y)}}return!!S&&(y||(y=new i),a(e,t,n,g,m,y))}},7167:(e,t,n)=>{var i=n(4901),r=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?r(a):i;e.exports=s},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},7217:(e,t,n)=>{var i=n(79),r=n(1420),o=n(938),a=n(3605),s=n(9817),l=n(945);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,n)=>{var i=n(7422);e.exports=function(e){return function(t){return i(t,e)}}},7296:(e,t,n)=>{var i,r=n(5481),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7390:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},e.exports=t.default},7412:(e,t,n)=>{var i=n(9516),r=n(7018),o=n(5845),a=n(4896),s=n(6440),l=n(6069),u=n(5721),c=n(4298),d={"Content-Type":"application/x-www-form-urlencoded"};function h(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var p,f={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(p=n(5592)),p),transformRequest:[function(e,t){r(t,"Accept"),r(t,"Content-Type");var n,o=t&&t["Content-Type"]||"",a=o.indexOf("application/json")>-1,u=i.isObject(e);if(u&&i.isHTMLForm(e)&&(e=new FormData(e)),i.isFormData(e))return a?JSON.stringify(c(e)):e;if(i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return h(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(u){if(-1!==o.indexOf("application/x-www-form-urlencoded"))return l(e,this.formSerializer).toString();if((n=i.isFileList(e))||o.indexOf("multipart/form-data")>-1){var d=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,d&&new d,this.formSerializer)}}return u||a?(h(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&i.isString(e)&&(n&&!this.responseType||r)){var a=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:u.classes.FormData,Blob:u.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],function(e){f.headers[e]={}}),i.forEach(["post","put","patch"],function(e){f.headers[e]=i.merge(d)}),e.exports=f},7422:(e,t,n)=>{var i=n(1769),r=n(7797);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7522:(e,t,n)=>{var i=n(5845);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new i("Request failed with status code "+n.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},7534:(e,t,n)=>{var i=n(2552),r=n(346);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},7556:(e,t,n)=>{var i=n(1873),r=n(4932),o=n(6449),a=n(4394),s=i?i.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7659:e=>{var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},7670:(e,t,n)=>{var i=n(2651);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},7674:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,i.default)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,r.default)(n)};var i=a(n(5891)),r=a(n(3076)),o=a(n(427));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},7797:(e,t,n)=>{var i=n(4394);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7825:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},7828:(e,t,n)=>{var i=n(9325).Uint8Array;e.exports=i},7978:(e,t,n)=>{var i=n(270),r=n(8156),o=n(631),a=n(8586),s=n(756),l=n(7197),u=n(7797);e.exports=function(e,t){return a(e)&&s(t)?l(u(e),t):function(n){var a=r(n,e);return void 0===a&&a===t?o(n,e):i(t,a,3)}}},7980:e=>{e.exports=function(e){return function(t){return e.apply(null,t)}}},8015:(e,t,n)=>{var i=n(9516),r=n(9012),o=n(5155),a=n(5343),s=n(7412),l=n(4298);var u=function e(t){var n=new o(t),s=r(o.prototype.request,n);return i.extend(s,o.prototype,n),i.extend(s,n),s.create=function(n){return e(a(t,n))},s}(s);u.Axios=o,u.CanceledError=n(8563),u.CancelToken=n(3191),u.isCancel=n(3864),u.VERSION=n(9641).version,u.toFormData=n(6440),u.AxiosError=n(5845),u.Cancel=u.CanceledError,u.all=function(e){return Promise.all(e)},u.spread=n(7980),u.isAxiosError=n(5019),u.formToJSON=function(e){return l(i.isHTMLForm(e)?new FormData(e):e)},e.exports=u,e.exports.default=u},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8096:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},8156:(e,t,n)=>{var i=n(7422);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},8223:(e,t,n)=>{var i=n(6110)(n(9325),"Map");e.exports=i},8303:(e,t,n)=>{var i=n(6110)(n(9325),"WeakMap");e.exports=i},8329:(e,t,n)=>{var i=n(4894);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==r(s[a],a,s););return n}}},8563:(e,t,n)=>{var i=n(5845);function r(e,t,n){i.call(this,null==e?"canceled":e,i.ERR_CANCELED,t,n),this.name="CanceledError"}n(9516).inherits(r,i,{__CANCEL__:!0}),e.exports=r},8586:(e,t,n)=>{var i=n(6449),r=n(4394),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},8655:(e,t,n)=>{var i=n(6025);e.exports=function(e){return i(this.__data__,e)>-1}},8754:(e,t,n)=>{var i=n(5160);e.exports=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:i(e,t,n)}},8805:function(e,t,n){e.exports=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};function r(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function o(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}function a(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function u(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function d(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),t}var h={exports:{}};!function(e){!function(t,n){var i=Math.pow(2,-24),r=Math.pow(2,32),o=Math.pow(2,53),a={encode:function(e){var t,i=new ArrayBuffer(256),a=new DataView(i),s=0;function l(e){for(var n=i.byteLength,r=s+e;n<r;)n*=2;if(n!==i.byteLength){var o=a;i=new ArrayBuffer(n),a=new DataView(i);for(var l=s+3>>2,u=0;u<l;++u)a.setUint32(4*u,o.getUint32(4*u))}return t=e,a}function u(){s+=t}function c(e){u(l(1).setUint8(s,e))}function d(e){for(var t=l(e.length),n=0;n<e.length;++n)t.setUint8(s+n,e[n]);u()}function h(e,t){t<24?c(e<<5|t):t<256?(c(e<<5|24),c(t)):t<65536?(c(e<<5|25),function(e){u(l(2).setUint16(s,e))}(t)):t<4294967296?(c(e<<5|26),function(e){u(l(4).setUint32(s,e))}(t)):(c(e<<5|27),function(e){var t=e%r,n=(e-t)/r,i=l(8);i.setUint32(s,n),i.setUint32(s+4,t),u()}(t))}if(function e(t){var i;if(!1===t)return c(244);if(!0===t)return c(245);if(null===t)return c(246);if(t===n)return c(247);switch(typeof t){case"number":if(Math.floor(t)===t){if(0<=t&&t<=o)return h(0,t);if(-o<=t&&t<0)return h(1,-(t+1))}return c(251),function(e){u(l(8).setFloat64(s,e))}(t);case"string":var r=[];for(i=0;i<t.length;++i){var a=t.charCodeAt(i);a<128?r.push(a):a<2048?(r.push(192|a>>6),r.push(128|63&a)):a<55296?(r.push(224|a>>12),r.push(128|a>>6&63),r.push(128|63&a)):(a=(1023&a)<<10,a|=1023&t.charCodeAt(++i),a+=65536,r.push(240|a>>18),r.push(128|a>>12&63),r.push(128|a>>6&63),r.push(128|63&a))}return h(3,r.length),d(r);default:var p;if(Array.isArray(t))for(h(4,p=t.length),i=0;i<p;++i)e(t[i]);else if(t instanceof Uint8Array)h(2,t.length),d(t);else{var f=Object.keys(t);for(h(5,p=f.length),i=0;i<p;++i){var g=f[i];e(g),e(t[g])}}}}(e),"slice"in i)return i.slice(0,s);for(var p=new ArrayBuffer(s),f=new DataView(p),g=0;g<s;++g)f.setUint8(g,a.getUint8(g));return p},decode:function(e,t,o){var a=new DataView(e),s=0;function l(e,t){return s+=t,e}function u(t){return l(new Uint8Array(e,s,t),t)}function c(){return l(a.getUint8(s),1)}function d(){return l(a.getUint16(s),2)}function h(){return l(a.getUint32(s),4)}function p(){return 255===a.getUint8(s)&&(s+=1,!0)}function f(e){if(e<24)return e;if(24===e)return c();if(25===e)return d();if(26===e)return h();if(27===e)return h()*r+h();if(31===e)return-1;throw"Invalid length encoding"}function g(e){var t=c();if(255===t)return-1;var n=f(31&t);if(n<0||t>>5!==e)throw"Invalid indefinite length element";return n}function m(e,t){for(var n=0;n<t;++n){var i=c();128&i&&(i<224?(i=(31&i)<<6|63&c(),t-=1):i<240?(i=(15&i)<<12|(63&c())<<6|63&c(),t-=2):(i=(15&i)<<18|(63&c())<<12|(63&c())<<6|63&c(),t-=3)),i<65536?e.push(i):(i-=65536,e.push(55296|i>>10),e.push(56320|1023&i))}}"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof o&&(o=function(){return n});var y=function e(){var r,h,y=c(),b=y>>5,v=31&y;if(7===b)switch(v){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),n=d(),r=32768&n,o=31744&n,a=1023&n;if(31744===o)o=261120;else if(0!==o)o+=114688;else if(0!==a)return a*i;return t.setUint32(0,r<<16|o<<13|a<<13),t.getFloat32(0)}();case 26:return l(a.getFloat32(s),4);case 27:return l(a.getFloat64(s),8)}if((h=f(v))<0&&(b<2||6<b))throw"Invalid length";switch(b){case 0:return h;case 1:return-1-h;case 2:if(h<0){for(var w=[],C=0;(h=g(b))>=0;)C+=h,w.push(u(h));var x=new Uint8Array(C),A=0;for(r=0;r<w.length;++r)x.set(w[r],A),A+=w[r].length;return x}return u(h);case 3:var S=[];if(h<0)for(;(h=g(b))>=0;)m(S,h);else m(S,h);return String.fromCharCode.apply(null,S);case 4:var E;if(h<0)for(E=[];!p();)E.push(e());else for(E=new Array(h),r=0;r<h;++r)E[r]=e();return E;case 5:var k={};for(r=0;r<h||h<0&&!p();++r)k[e()]=e();return k;case 6:return t(e(),h);case 7:switch(h){case 20:return!1;case 21:return!0;case 22:return null;case 23:return n;default:return o(h)}}}();if(s!==e.byteLength)throw"Remaining bytes";return y}};e.exports?e.exports=a:t.CBOR||(t.CBOR=a)}(c)}(h);var p=h.exports,f={exports:{}};!function(e,t){!function(e){var t="0.1.0",n={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function i(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}function r(e,t){var i=n[t||"all"];return i&&i.test(e)||!1}i.isUUID=r,i.VERSION=t,e.uuid=i,e.isUUID=r}(t),null!==e&&(e.exports=t.uuid)}(f,f.exports);var g=f.exports,m=function(){return g.uuid?g.uuid():g()},y=function(){function e(e){var t,n,i,r,o=e.setup;if(this._PNSDKSuffix={},this.instanceId="pn-".concat(m()),this.secretKey=o.secretKey||o.secret_key,this.subscribeKey=o.subscribeKey||o.subscribe_key,this.publishKey=o.publishKey||o.publish_key,this.sdkName=o.sdkName,this.sdkFamily=o.sdkFamily,this.partnerId=o.partnerId,this.setAuthKey(o.authKey),this.cryptoModule=o.cryptoModule,this.setFilterExpression(o.filterExpression),"string"!=typeof o.origin&&!Array.isArray(o.origin)&&void 0!==o.origin)throw new Error("Origin must be either undefined, a string or a list of strings.");if(this.origin=o.origin||Array.from({length:20},function(e,t){return"ps".concat(t+1,".pndsn.com")}),this.secure=o.ssl||!1,this.restore=o.restore||!1,this.proxy=o.proxy,this.keepAlive=o.keepAlive,this.keepAliveSettings=o.keepAliveSettings,this.autoNetworkDetection=o.autoNetworkDetection||!1,this.dedupeOnSubscribe=o.dedupeOnSubscribe||!1,this.maximumCacheSize=o.maximumCacheSize||100,this.customEncrypt=o.customEncrypt,this.customDecrypt=o.customDecrypt,this.fileUploadPublishRetryLimit=null!==(t=o.fileUploadPublishRetryLimit)&&void 0!==t?t:5,this.useRandomIVs=null===(n=o.useRandomIVs)||void 0===n||n,this.enableEventEngine=null!==(i=o.enableEventEngine)&&void 0!==i&&i,this.maintainPresenceState=null===(r=o.maintainPresenceState)||void 0===r||r,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=o.logVerbosity||!1,this.suppressLeaveEvents=o.suppressLeaveEvents||!1,this.announceFailedHeartbeats=o.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=o.announceSuccessfulHeartbeats||!1,this.useInstanceId=o.useInstanceId||!1,this.useRequestId=o.useRequestId||!1,this.requestMessageCountThreshold=o.requestMessageCountThreshold,o.retryConfiguration&&this._setRetryConfiguration(o.retryConfiguration),this.setTransactionTimeout(o.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(o.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(o.useSendBeacon||!0),o.presenceTimeout?this.setPresenceTimeout(o.presenceTimeout):this._presenceTimeout=300,null!=o.heartbeatInterval&&this.setHeartbeatInterval(o.heartbeatInterval),"string"==typeof o.userId){if("string"==typeof o.uuid)throw new Error("Only one of the following configuration options has to be provided: `uuid` or `userId`");this.setUserId(o.userId)}else{if("string"!=typeof o.uuid)throw new Error("One of the following configuration options has to be provided: `uuid` or `userId`");this.setUUID(o.uuid)}this.setCipherKey(o.cipherKey,o)}return e.prototype.getAuthKey=function(){return this.authKey},e.prototype.setAuthKey=function(e){return this.authKey=e,this},e.prototype.setCipherKey=function(e,t,n){var i;return this.cipherKey=e,this.cipherKey&&(this.cryptoModule=null!==(i=t.cryptoModule)&&void 0!==i?i:t.initCryptoModule({cipherKey:this.cipherKey,useRandomIVs:this.useRandomIVs}),n&&(n.cryptoModule=this.cryptoModule)),this},e.prototype.getUUID=function(){return this.UUID},e.prototype.setUUID=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing uuid parameter. Provide a valid string uuid");return this.UUID=e,this},e.prototype.getUserId=function(){return this.UUID},e.prototype.setUserId=function(e){if(!e||"string"!=typeof e||0===e.trim().length)throw new Error("Missing or invalid userId parameter. Provide a valid string userId");return this.UUID=e,this},e.prototype.getFilterExpression=function(){return this.filterExpression},e.prototype.setFilterExpression=function(e){return this.filterExpression=e,this},e.prototype.getPresenceTimeout=function(){return this._presenceTimeout},e.prototype.setPresenceTimeout=function(e){return this._presenceTimeout=e>=20?e:20,this.setHeartbeatInterval(this._presenceTimeout/2-1),this},e.prototype.setProxy=function(e){this.proxy=e},e.prototype.getHeartbeatInterval=function(){return this._heartbeatInterval},e.prototype.setHeartbeatInterval=function(e){return this._heartbeatInterval=e,this},e.prototype.getSubscribeTimeout=function(){return this._subscribeRequestTimeout},e.prototype.setSubscribeTimeout=function(e){return this._subscribeRequestTimeout=e,this},e.prototype.getTransactionTimeout=function(){return this._transactionalRequestTimeout},e.prototype.setTransactionTimeout=function(e){return this._transactionalRequestTimeout=e,this},e.prototype.isSendBeaconEnabled=function(){return this._useSendBeacon},e.prototype.setSendBeaconConfig=function(e){return this._useSendBeacon=e,this},e.prototype.getVersion=function(){return"7.6.3"},e.prototype._setRetryConfiguration=function(e){if(e.minimumdelay<2)throw new Error("Minimum delay can not be set less than 2 seconds for retry");if(e.maximumDelay>150)throw new Error("Maximum delay can not be set more than 150 seconds for retry");if(e.maximumDelay&&maximumRetry>6)throw new Error("Maximum retry for exponential retry policy can not be more than 6");if(e.maximumRetry>10)throw new Error("Maximum retry for linear retry policy can not be more than 10");this.retryConfiguration=e},e.prototype._addPnsdkSuffix=function(e,t){this._PNSDKSuffix[e]=t},e.prototype._getPnsdkSuffix=function(e){var t=this;return Object.keys(this._PNSDKSuffix).reduce(function(n,i){return n+e+t._PNSDKSuffix[i]},"")},e}();function b(e){var t=e.replace(/==?$/,""),n=Math.floor(t.length/4*3),i=new ArrayBuffer(n),r=new Uint8Array(i),o=0;function a(){var e=t.charAt(o++),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);if(-1===n)throw new Error("Illegal character at ".concat(o,": ").concat(t.charAt(o-1)));return n}for(var s=0;s<n;s+=3){var l=a(),u=a(),c=a(),d=a(),h=(63&l)<<2|u>>4,p=(15&u)<<4|c>>2,f=(3&c)<<6|d;r[s]=h,64!=c&&(r[s+1]=p),64!=d&&(r[s+2]=f)}return i}function v(e){for(var t,n="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(e),o=r.byteLength,a=o%3,s=o-a,l=0;l<s;l+=3)n+=i[(16515072&(t=r[l]<<16|r[l+1]<<8|r[l+2]))>>18]+i[(258048&t)>>12]+i[(4032&t)>>6]+i[63&t];return 1==a?n+=i[(252&(t=r[s]))>>2]+i[(3&t)<<4]+"==":2==a&&(n+=i[(64512&(t=r[s]<<8|r[s+1]))>>10]+i[(1008&t)>>4]+i[(15&t)<<2]+"="),n}var w,C,x,A,S,E=E||function(e){var t={},n=t.lib={},i=function(){},r=n.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=n.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var r=0;r<e;r++)t[i+r>>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(i+r)%4*8;else if(65535<n.length)for(r=0;r<e;r+=4)t[i+r>>>2]=n[r>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i<t;i+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),a=t.enc={},s=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++){var r=t[i>>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new o.init(n,t/2)}},l=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++)n.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new o.init(n,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},c=n.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,a=this.blockSize,s=r/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,r=e.min(4*t,r),t){for(var l=0;l<t;l+=a)this._doProcessBlock(i,l);l=i.splice(0,t),n.sigBytes-=r}return new o.init(l,r)},clone:function(){var e=r.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=c.extend({cfg:r.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=t.algo={};return t}(Math);!function(e){for(var t=E,n=(r=t.lib).WordArray,i=r.Hasher,r=t.algo,o=[],a=[],s=function(e){return 4294967296*(e-(0|e))|0},l=2,u=0;64>u;){var c;e:{c=l;for(var d=e.sqrt(c),h=2;h<=d;h++)if(!(c%h)){c=!1;break e}c=!0}c&&(8>u&&(o[u]=s(e.pow(l,.5))),a[u]=s(e.pow(l,1/3)),u++),l++}var p=[];r=r.SHA256=i.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var f=p[h-15],g=p[h-2];p[h]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[h-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[h-16]}f=d+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&u^~l&c)+a[h]+p[h],g=((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+(i&r^i&o^r&o),d=c,c=u,u=l,l=s+f|0,s=o,o=r,r=i,i=f+g|0}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+c|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=e.floor(i/4294967296),n[15+(r+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=i._createHelper(r),t.HmacSHA256=i._createHmacHelper(r)}(Math),C=(w=E).enc.Utf8,w.algo.HMAC=w.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=C.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),o=this._iKey=t.clone(),a=r.words,s=o.words,l=0;l<n;l++)a[l]^=1549556828,s[l]^=909522486;r.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}}),A=(x=E).lib.WordArray,x.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp(),e=[];for(var r=0;r<n;r+=3)for(var o=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,a=0;4>a&&r+.75*a<n;a++)e.push(i.charAt(o>>>6*(3-a)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;(i=n.charAt(64))&&-1!=(i=e.indexOf(i))&&(t=i);for(var i=[],r=0,o=0;o<t;o++)if(o%4){var a=n.indexOf(e.charAt(o-1))<<o%4*2,s=n.indexOf(e.charAt(o))>>>6-o%4*2;i[r>>>2]|=(a|s)<<24-r%4*8,r++}return A.create(i,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){function t(e,t,n,i,r,o,a){return((e=e+(t&n|~t&i)+r+a)<<o|e>>>32-o)+t}function n(e,t,n,i,r,o,a){return((e=e+(t&i|n&~i)+r+a)<<o|e>>>32-o)+t}function i(e,t,n,i,r,o,a){return((e=e+(t^n^i)+r+a)<<o|e>>>32-o)+t}function r(e,t,n,i,r,o,a){return((e=e+(n^(t|~i))+r+a)<<o|e>>>32-o)+t}for(var o=E,a=(l=o.lib).WordArray,s=l.Hasher,l=o.algo,u=[],c=0;64>c;c++)u[c]=4294967296*e.abs(e.sin(c+1))|0;l=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,o){for(var a=0;16>a;a++){var s=e[l=o+a];e[l]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}a=this._hash.words;var l=e[o+0],c=(s=e[o+1],e[o+2]),d=e[o+3],h=e[o+4],p=e[o+5],f=e[o+6],g=e[o+7],m=e[o+8],y=e[o+9],b=e[o+10],v=e[o+11],w=e[o+12],C=e[o+13],x=e[o+14],A=e[o+15],S=t(S=a[0],T=a[1],k=a[2],E=a[3],l,7,u[0]),E=t(E,S,T,k,s,12,u[1]),k=t(k,E,S,T,c,17,u[2]),T=t(T,k,E,S,d,22,u[3]);S=t(S,T,k,E,h,7,u[4]),E=t(E,S,T,k,p,12,u[5]),k=t(k,E,S,T,f,17,u[6]),T=t(T,k,E,S,g,22,u[7]),S=t(S,T,k,E,m,7,u[8]),E=t(E,S,T,k,y,12,u[9]),k=t(k,E,S,T,b,17,u[10]),T=t(T,k,E,S,v,22,u[11]),S=t(S,T,k,E,w,7,u[12]),E=t(E,S,T,k,C,12,u[13]),k=t(k,E,S,T,x,17,u[14]),S=n(S,T=t(T,k,E,S,A,22,u[15]),k,E,s,5,u[16]),E=n(E,S,T,k,f,9,u[17]),k=n(k,E,S,T,v,14,u[18]),T=n(T,k,E,S,l,20,u[19]),S=n(S,T,k,E,p,5,u[20]),E=n(E,S,T,k,b,9,u[21]),k=n(k,E,S,T,A,14,u[22]),T=n(T,k,E,S,h,20,u[23]),S=n(S,T,k,E,y,5,u[24]),E=n(E,S,T,k,x,9,u[25]),k=n(k,E,S,T,d,14,u[26]),T=n(T,k,E,S,m,20,u[27]),S=n(S,T,k,E,C,5,u[28]),E=n(E,S,T,k,c,9,u[29]),k=n(k,E,S,T,g,14,u[30]),S=i(S,T=n(T,k,E,S,w,20,u[31]),k,E,p,4,u[32]),E=i(E,S,T,k,m,11,u[33]),k=i(k,E,S,T,v,16,u[34]),T=i(T,k,E,S,x,23,u[35]),S=i(S,T,k,E,s,4,u[36]),E=i(E,S,T,k,h,11,u[37]),k=i(k,E,S,T,g,16,u[38]),T=i(T,k,E,S,b,23,u[39]),S=i(S,T,k,E,C,4,u[40]),E=i(E,S,T,k,l,11,u[41]),k=i(k,E,S,T,d,16,u[42]),T=i(T,k,E,S,f,23,u[43]),S=i(S,T,k,E,y,4,u[44]),E=i(E,S,T,k,w,11,u[45]),k=i(k,E,S,T,A,16,u[46]),S=r(S,T=i(T,k,E,S,c,23,u[47]),k,E,l,6,u[48]),E=r(E,S,T,k,g,10,u[49]),k=r(k,E,S,T,x,15,u[50]),T=r(T,k,E,S,p,21,u[51]),S=r(S,T,k,E,w,6,u[52]),E=r(E,S,T,k,d,10,u[53]),k=r(k,E,S,T,b,15,u[54]),T=r(T,k,E,S,s,21,u[55]),S=r(S,T,k,E,m,6,u[56]),E=r(E,S,T,k,A,10,u[57]),k=r(k,E,S,T,f,15,u[58]),T=r(T,k,E,S,C,21,u[59]),S=r(S,T,k,E,h,6,u[60]),E=r(E,S,T,k,v,10,u[61]),k=r(k,E,S,T,c,15,u[62]),T=r(T,k,E,S,y,21,u[63]),a[0]=a[0]+S|0,a[1]=a[1]+T|0,a[2]=a[2]+k|0,a[3]=a[3]+E|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var o=e.floor(i/4294967296);for(n[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,i=0;4>i;i++)r=n[i],n[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=s._createHelper(l),o.HmacMD5=s._createHmacHelper(l)}(Math),function(){var e,t=E,n=(e=t.lib).Base,i=e.WordArray,r=(e=t.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(s=this.cfg).hasher.create(),r=i.create(),o=r.words,a=s.keySize,s=s.iterations;o.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();r.concat(l)}return r.sigBytes=4*a,r}});t.EvpKDF=function(e,t,n){return r.create(n).compute(e,t)}}(),E.lib.Cipher||function(){var e=(h=E).lib,t=e.Base,n=e.WordArray,i=e.BufferedBlockAlgorithm,r=h.enc.Base64,o=h.algo.EvpKDF,a=e.Cipher=i.extend({cfg:t.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,i){return("string"==typeof n?p:d).encrypt(e,t,n,i)},decrypt:function(t,n,i){return("string"==typeof n?p:d).decrypt(e,t,n,i)}}}});e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var s=h.mode={},l=function(e,t,n){var i=this._iv;i?this._iv=void 0:i=this._prevBlock;for(var r=0;r<n;r++)e[t+r]^=i[r]},u=(e.BlockCipherMode=t.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();u.Encryptor=u.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;l.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),u.Decryptor=u.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,r=e.slice(t,t+i);n.decryptBlock(e,t),l.call(this,e,t,i),this._prevBlock=r}}),s=s.CBC=u,u=(h.pad={}).Pkcs7={pad:function(e,t){for(var i,r=(i=(i=4*t)-e.sigBytes%i)<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(r);i=n.create(o,i),e.concat(i)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:s,padding:u}),reset:function(){a.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var c=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),d=(s=(h.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?n.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t=(e=r.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var i=n.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return c.create({ciphertext:e,salt:i})}},e.SerializableCipher=t.extend({cfg:t.extend({format:s}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var r=e.createEncryptor(n,i);return t=r.finalize(t),r=r.cfg,c.create({ciphertext:t,key:n,iv:r.iv,algorithm:e,mode:r.mode,padding:r.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),h=(h.kdf={}).OpenSSL={execute:function(e,t,i,r){return r||(r=n.random(8)),e=o.create({keySize:t+i}).compute(e,r),i=n.create(e.words.slice(t),4*i),e.sigBytes=4*t,c.create({key:e,iv:i,salt:r})}},p=e.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:h}),encrypt:function(e,t,n,i){return n=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize),i.iv=n.iv,(e=d.encrypt.call(this,e,t,n.key,i)).mixIn(n),e},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),n=i.kdf.execute(n,e.keySize,e.ivSize,t.salt),i.iv=n.iv,d.decrypt.call(this,e,t,n.key,i)}})}(),function(){for(var e=E,t=e.lib.BlockCipher,n=e.algo,i=[],r=[],o=[],a=[],s=[],l=[],u=[],c=[],d=[],h=[],p=[],f=0;256>f;f++)p[f]=128>f?f<<1:f<<1^283;var g=0,m=0;for(f=0;256>f;f++){var y=(y=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&y^99;i[g]=y,r[y]=g;var b=p[g],v=p[b],w=p[v],C=257*p[y]^16843008*y;o[g]=C<<24|C>>>8,a[g]=C<<16|C>>>16,s[g]=C<<8|C>>>24,l[g]=C,C=16843009*w^65537*v^257*b^16843008*g,u[y]=C<<24|C>>>8,c[y]=C<<16|C>>>16,d[y]=C<<8|C>>>24,h[y]=C,g?(g=b^p[p[p[w^b]]],m^=p[p[m]]):g=m=1}var x=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=t.extend({_doReset:function(){for(var e=(n=this._key).words,t=n.sigBytes/4,n=4*((this._nRounds=t+6)+1),r=this._keySchedule=[],o=0;o<n;o++)if(o<t)r[o]=e[o];else{var a=r[o-1];o%t?6<t&&4==o%t&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=x[o/t|0]<<24),r[o]=r[o-t]^a}for(e=this._invKeySchedule=[],t=0;t<n;t++)o=n-t,a=t%4?r[o]:r[o-4],e[t]=4>t||4>=o?a:u[i[a>>>24]]^c[i[a>>>16&255]]^d[i[a>>>8&255]]^h[i[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,s,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,c,d,h,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,o,a,s){for(var l=this._nRounds,u=e[t]^n[0],c=e[t+1]^n[1],d=e[t+2]^n[2],h=e[t+3]^n[3],p=4,f=1;f<l;f++){var g=i[u>>>24]^r[c>>>16&255]^o[d>>>8&255]^a[255&h]^n[p++],m=i[c>>>24]^r[d>>>16&255]^o[h>>>8&255]^a[255&u]^n[p++],y=i[d>>>24]^r[h>>>16&255]^o[u>>>8&255]^a[255&c]^n[p++];h=i[h>>>24]^r[u>>>16&255]^o[c>>>8&255]^a[255&d]^n[p++],u=g,c=m,d=y}g=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^n[p++],m=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^n[p++],y=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^n[p++],h=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[p++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=h},keySize:8}),e.AES=t._createHelper(n)}(),E.mode.ECB=((S=E.lib.BlockCipherMode.extend()).Encryptor=S.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),S.Decryptor=S.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),S);var k=E;function T(e){var t,n=[];for(t=0;t<e.length;t+=1)n[t/4|0]|=e[t]<<24-8*t;return k.lib.WordArray.create(n,e.length)}var _=function(){function e(e){var t=e.config;this._config=t,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return e.prototype.HMACSHA256=function(e){return k.HmacSHA256(e,this._config.secretKey).toString(k.enc.Base64)},e.prototype.SHA256=function(e){return k.SHA256(e).toString(k.enc.Hex)},e.prototype._parseOptions=function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),-1===this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())&&(t.keyEncoding=this._defaultOptions.keyEncoding),-1===this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))&&(t.keyLength=this._defaultOptions.keyLength),-1===this._allowedModes.indexOf(t.mode.toLowerCase())&&(t.mode=this._defaultOptions.mode),t},e.prototype._decodeKey=function(e,t){return"base64"===t.keyEncoding?k.enc.Base64.parse(e):"hex"===t.keyEncoding?k.enc.Hex.parse(e):e},e.prototype._getPaddedKey=function(e,t){return e=this._decodeKey(e,t),t.encryptKey?k.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e},e.prototype._getMode=function(e){return"ecb"===e.mode?k.mode.ECB:k.mode.CBC},e.prototype._getIV=function(e){return"cbc"===e.mode?k.enc.Utf8.parse(this._iv):null},e.prototype._getRandomIV=function(){return k.lib.WordArray.random(16)},e.prototype.encrypt=function(e,t,n){return this._config.customEncrypt?this._config.customEncrypt(e):this.pnEncrypt(e,t,n)},e.prototype.decrypt=function(e,t,n){return this._config.customDecrypt?this._config.customDecrypt(e):this.pnDecrypt(e,t,n)},e.prototype.pnEncrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),r=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var o=this._getRandomIV(),a=k.AES.encrypt(e,r,{iv:o,mode:i}).ciphertext;return o.clone().concat(a.clone()).toString(k.enc.Base64)}var s=this._getIV(n);return k.AES.encrypt(e,r,{iv:s,mode:i}).ciphertext.toString(k.enc.Base64)||e},e.prototype.pnDecrypt=function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var i=this._getMode(n),r=this._getPaddedKey(t||this._config.cipherKey,n);if(this._config.useRandomIVs){var o=T((l=new Uint8ClampedArray(b(e))).slice(0,16)),a=T(l.slice(16));try{var s=k.AES.decrypt({ciphertext:a},r,{iv:o,mode:i}).toString(k.enc.Utf8);return JSON.parse(s)}catch(e){return null}}else{o=this._getIV(n);try{var l=k.enc.Base64.parse(e);return s=k.AES.decrypt({ciphertext:l},r,{iv:o,mode:i}).toString(k.enc.Utf8),JSON.parse(s)}catch(e){return null}}},e}(),O=function(){function e(e){var t=e.timeEndpoint;this._timeEndpoint=t}return e.prototype.onReconnection=function(e){this._reconnectionCallback=e},e.prototype.startPolling=function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)},e.prototype.stopPolling=function(){clearInterval(this._timeTimer)},e.prototype._performTimeLoop=function(){var e=this;this._timeEndpoint(function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())})},e}(),P=function(){function e(e){var t=e.config;this.hashHistory=[],this._config=t}return e.prototype.getKey=function(e){var t=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e.payload)).toString(),n=e.publishMetaData.publishTimetoken;return"".concat(n,"-").concat(t)},e.prototype.isDuplicate=function(e){return this.hashHistory.includes(this.getKey(e))},e.prototype.addEntry=function(e){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))},e.prototype.clearHistory=function(){this.hashHistory=[]},e}(),M={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory",PNDisconnectedCategory:"PNDisconnectedCategory",PNConnectionErrorCategory:"PNConnectionErrorCategory",PNDisconnectedUnexpectedlyCategory:"PNDisconnectedUnexpectedlyCategory"},I=function(){function e(e){var t=e.subscribeEndpoint,n=e.leaveEndpoint,i=e.heartbeatEndpoint,r=e.setStateEndpoint,o=e.timeEndpoint,a=e.getFileUrl,s=e.config,l=e.crypto,u=e.listenerManager,c=e.cryptoModule,d=e.eventEmitter;this._listenerManager=u,this._config=s,this._leaveEndpoint=n,this._heartbeatEndpoint=i,this._setStateEndpoint=r,this._subscribeEndpoint=t,this._getFileUrl=a,this._crypto=l,this._cryptoModule=c,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new O({timeEndpoint:o}),this._dedupingManager=new P({config:s}),this._cryptoModule&&(this._decoder=new TextDecoder),this._eventEmitter=d}return e.prototype.adaptStateChange=function(e,t){var n=this,i=e.state,r=e.channels,o=void 0===r?[]:r,a=e.channelGroups,s=void 0===a?[]:a,l=e.withHeartbeat,u=void 0!==l&&l;if(o.forEach(function(e){e in n._channels&&(n._channels[e].state=i)}),s.forEach(function(e){e in n._channelGroups&&(n._channelGroups[e].state=i)}),u){var c={};return o.forEach(function(e){return c[e]=i}),s.forEach(function(e){return c[e]=i}),this._heartbeatEndpoint({channels:o,channelGroups:s,state:c},t)}return this._setStateEndpoint({state:i,channels:o,channelGroups:s},t)},e.prototype.adaptPresenceChange=function(e){var t=this,n=e.connected,i=e.channels,r=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o;n?(r.forEach(function(e){t._heartbeatChannels[e]={state:{}}}),a.forEach(function(e){t._heartbeatChannelGroups[e]={state:{}}})):(r.forEach(function(e){e in t._heartbeatChannels&&delete t._heartbeatChannels[e]}),a.forEach(function(e){e in t._heartbeatChannelGroups&&delete t._heartbeatChannelGroups[e]}),!1===this._config.suppressLeaveEvents&&this._leaveEndpoint({channels:r,channelGroups:a},function(e){t._listenerManager.announceStatus(e)})),this.reconnect()},e.prototype.adaptSubscribeChange=function(e){var t=this,n=e.timetoken,i=e.channels,r=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o,s=e.withPresence,l=void 0!==s&&s,u=e.withHeartbeats,c=void 0!==u&&u;this._config.subscribeKey&&""!==this._config.subscribeKey?(n&&(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=n),"0"!==this._currentTimetoken&&0!==this._currentTimetoken&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),r.forEach(function(e){t._channels[e]={state:{}},l&&(t._presenceChannels[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannels[e]={}),t._pendingChannelSubscriptions.push(e)}),a.forEach(function(e){t._channelGroups[e]={state:{}},l&&(t._presenceChannelGroups[e]={}),(c||t._config.getHeartbeatInterval())&&(t._heartbeatChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)}),this._subscriptionStatusAnnounced=!1,this.reconnect()):console&&console.log},e.prototype.adaptUnsubscribeChange=function(e,t){var n=this,i=e.channels,r=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o,s=[],l=[];r.forEach(function(e){e in n._channels&&(delete n._channels[e],s.push(e),e in n._heartbeatChannels&&delete n._heartbeatChannels[e]),e in n._presenceChannels&&(delete n._presenceChannels[e],s.push(e))}),a.forEach(function(e){e in n._channelGroups&&(delete n._channelGroups[e],l.push(e),e in n._heartbeatChannelGroups&&delete n._heartbeatChannelGroups[e]),e in n._presenceChannelGroups&&(delete n._presenceChannelGroups[e],l.push(e))}),0===s.length&&0===l.length||(!1!==this._config.suppressLeaveEvents||t||this._leaveEndpoint({channels:s,channelGroups:l},function(e){e.affectedChannels=s,e.affectedChannelGroups=l,e.currentTimetoken=n._currentTimetoken,e.lastTimetoken=n._lastTimetoken,n._listenerManager.announceStatus(e)}),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())},e.prototype.unsubscribeAll=function(e){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},e)},e.prototype.getHeartbeatChannels=function(){return Object.keys(this._heartbeatChannels)},e.prototype.getHeartbeatChannelGroups=function(){return Object.keys(this._heartbeatChannelGroups)},e.prototype.getSubscribedChannels=function(){return Object.keys(this._channels)},e.prototype.getSubscribedChannelGroups=function(){return Object.keys(this._channelGroups)},e.prototype.reconnect=function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()},e.prototype.disconnect=function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()},e.prototype._registerHeartbeatTimer=function(){this._stopHeartbeatTimer(),0!==this._config.getHeartbeatInterval()&&void 0!==this._config.getHeartbeatInterval()&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))},e.prototype._stopHeartbeatTimer=function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)},e.prototype._performHeartbeatLoop=function(){var e=this,t=this.getHeartbeatChannels(),n=this.getHeartbeatChannelGroups(),i={};0===t.length&&0===n.length||(this.getSubscribedChannels().forEach(function(t){var n=e._channels[t].state;Object.keys(n).length&&(i[t]=n)}),this.getSubscribedChannelGroups().forEach(function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(i[t]=n)}),this._heartbeatEndpoint({channels:t,channelGroups:n,state:i},function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),t.error&&e._config.autoNetworkDetection&&e._isOnline&&(e._isOnline=!1,e.disconnect(),e._listenerManager.announceNetworkDown(),e.reconnect()),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)}.bind(this)))},e.prototype._startSubscribeLoop=function(){var e=this;this._stopSubscribeLoop();var t={},n=[],i=[];if(Object.keys(this._channels).forEach(function(i){var r=e._channels[i].state;Object.keys(r).length&&(t[i]=r),n.push(i)}),Object.keys(this._presenceChannels).forEach(function(e){n.push("".concat(e,"-pnpres"))}),Object.keys(this._channelGroups).forEach(function(n){var r=e._channelGroups[n].state;Object.keys(r).length&&(t[n]=r),i.push(n)}),Object.keys(this._presenceChannelGroups).forEach(function(e){i.push("".concat(e,"-pnpres"))}),0!==n.length||0!==i.length){var r={channels:n,channelGroups:i,state:t,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(r,this._processSubscribeResponse.bind(this))}},e.prototype._processSubscribeResponse=function(e,t){var n=this;if(e.error){if(e.errorData&&"Aborted"===e.errorData.message)return;e.category===M.PNTimeoutCategory?this._startSubscribeLoop():e.category===M.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection(function(){n._config.autoNetworkDetection&&!n._isOnline&&(n._isOnline=!0,n._listenerManager.announceNetworkUp()),n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:M.PNReconnectedCategory,operation:e.operation,lastTimetoken:n._lastTimetoken,currentTimetoken:n._currentTimetoken};n._listenerManager.announceStatus(t)}),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):e.category===M.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e)}else{if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=t.metadata.timetoken),!this._subscriptionStatusAnnounced){var i={};i.category=M.PNConnectedCategory,i.operation=e.operation,i.affectedChannels=this._pendingChannelSubscriptions,i.subscribedChannels=this.getSubscribedChannels(),i.affectedChannelGroups=this._pendingChannelGroupSubscriptions,i.lastTimetoken=this._lastTimetoken,i.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(i),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var r=t.messages||[],o=this._config,a=o.requestMessageCountThreshold,s=o.dedupeOnSubscribe;if(a&&r.length>=a){var l={};l.category=M.PNRequestMessageCountExceededCategory,l.operation=e.operation,this._listenerManager.announceStatus(l)}r.forEach(function(e){if(e.channel,e.subscriptionMatch,s){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}n._eventEmitter.emitEvent(e)}),this._region=t.metadata.region,this._startSubscribeLoop()}},e.prototype._stopSubscribeLoop=function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)},e.prototype._renameEvent=function(e){return"set"===e?"updated":"removed"},e.prototype._renameChannelField=function(e){var t=e.channel,n=r(e,["channel"]);return n.spaceId=t,n},e}(),N={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNSignalOperation:"PNSignalOperation",PNAddMessageActionOperation:"PNAddActionOperation",PNRemoveMessageActionOperation:"PNRemoveMessageActionOperation",PNGetMessageActionsOperation:"PNGetMessageActionsOperation",PNCreateUserOperation:"PNCreateUserOperation",PNUpdateUserOperation:"PNUpdateUserOperation",PNDeleteUserOperation:"PNDeleteUserOperation",PNGetUserOperation:"PNGetUsersOperation",PNGetUsersOperation:"PNGetUsersOperation",PNCreateSpaceOperation:"PNCreateSpaceOperation",PNUpdateSpaceOperation:"PNUpdateSpaceOperation",PNDeleteSpaceOperation:"PNDeleteSpaceOperation",PNGetSpaceOperation:"PNGetSpacesOperation",PNGetSpacesOperation:"PNGetSpacesOperation",PNGetMembersOperation:"PNGetMembersOperation",PNUpdateMembersOperation:"PNUpdateMembersOperation",PNGetMembershipsOperation:"PNGetMembershipsOperation",PNUpdateMembershipsOperation:"PNUpdateMembershipsOperation",PNListFilesOperation:"PNListFilesOperation",PNGenerateUploadUrlOperation:"PNGenerateUploadUrlOperation",PNPublishFileOperation:"PNPublishFileOperation",PNGetFileUrlOperation:"PNGetFileUrlOperation",PNDownloadFileOperation:"PNDownloadFileOperation",PNGetAllUUIDMetadataOperation:"PNGetAllUUIDMetadataOperation",PNGetUUIDMetadataOperation:"PNGetUUIDMetadataOperation",PNSetUUIDMetadataOperation:"PNSetUUIDMetadataOperation",PNRemoveUUIDMetadataOperation:"PNRemoveUUIDMetadataOperation",PNGetAllChannelMetadataOperation:"PNGetAllChannelMetadataOperation",PNGetChannelMetadataOperation:"PNGetChannelMetadataOperation",PNSetChannelMetadataOperation:"PNSetChannelMetadataOperation",PNRemoveChannelMetadataOperation:"PNRemoveChannelMetadataOperation",PNSetMembersOperation:"PNSetMembersOperation",PNSetMembershipsOperation:"PNSetMembershipsOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerGrantToken:"PNAccessManagerGrantToken",PNAccessManagerAudit:"PNAccessManagerAudit",PNAccessManagerRevokeToken:"PNAccessManagerRevokeToken",PNHandshakeOperation:"PNHandshakeOperation",PNReceiveMessagesOperation:"PNReceiveMessagesOperation"},D=function(){function e(e){this._maximumSamplesCount=100,this._trackedLatencies={},this._latencies={},this._telemetryExcludeOperations=[N.PNSubscribeOperation,N.PNReceiveMessagesOperation,N.PNHandshakeOperation],this._maximumSamplesCount=e.maximumSamplesCount||this._maximumSamplesCount}return e.prototype.operationsLatencyForRequest=function(){var e=this,t={};return Object.keys(this._latencies).forEach(function(n){var i=e._latencies[n],r=e._averageLatency(i);r>0&&(t["l_".concat(n)]=r)}),t},e.prototype.startLatencyMeasure=function(e,t){!this._telemetryExcludeOperations.includes(e)&&t&&(this._trackedLatencies[t]=Date.now())},e.prototype.stopLatencyMeasure=function(e,t){if(!this._telemetryExcludeOperations.includes(e)&&t){var n=this._endpointName(e),i=this._latencies[n],r=this._trackedLatencies[t];i||(this._latencies[n]=[],i=this._latencies[n]),i.push(Date.now()-r),i.length>this._maximumSamplesCount&&i.splice(0,i.length-this._maximumSamplesCount),delete this._trackedLatencies[t]}},e.prototype._averageLatency=function(e){return Math.floor(e.reduce(function(e,t){return e+t},0)/e.length)},e.prototype._endpointName=function(e){var t=null;switch(e){case N.PNPublishOperation:t="pub";break;case N.PNSignalOperation:t="sig";break;case N.PNHistoryOperation:case N.PNFetchMessagesOperation:case N.PNDeleteMessagesOperation:case N.PNMessageCounts:t="hist";break;case N.PNUnsubscribeOperation:case N.PNWhereNowOperation:case N.PNHereNowOperation:case N.PNHeartbeatOperation:case N.PNSetStateOperation:case N.PNGetStateOperation:t="pres";break;case N.PNAddChannelsToGroupOperation:case N.PNRemoveChannelsFromGroupOperation:case N.PNChannelGroupsOperation:case N.PNRemoveGroupOperation:case N.PNChannelsForGroupOperation:t="cg";break;case N.PNPushNotificationEnabledChannelsOperation:case N.PNRemoveAllPushNotificationsOperation:t="push";break;case N.PNCreateUserOperation:case N.PNUpdateUserOperation:case N.PNDeleteUserOperation:case N.PNGetUserOperation:case N.PNGetUsersOperation:case N.PNCreateSpaceOperation:case N.PNUpdateSpaceOperation:case N.PNDeleteSpaceOperation:case N.PNGetSpaceOperation:case N.PNGetSpacesOperation:case N.PNGetMembersOperation:case N.PNUpdateMembersOperation:case N.PNGetMembershipsOperation:case N.PNUpdateMembershipsOperation:t="obj";break;case N.PNAddMessageActionOperation:case N.PNRemoveMessageActionOperation:case N.PNGetMessageActionsOperation:t="msga";break;case N.PNAccessManagerGrant:case N.PNAccessManagerAudit:t="pam";break;case N.PNAccessManagerGrantToken:case N.PNAccessManagerRevokeToken:t="pamv3";break;default:t="time"}return t},e}(),U=function(){function e(e,t,n){this._payload=e,this._setDefaultPayloadStructure(),this.title=t,this.body=n}return Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this._title=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{set:function(e){this._subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{set:function(e){this._body=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{set:function(e){this._badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{set:function(e){this._sound=e},enumerable:!1,configurable:!0}),e.prototype._setDefaultPayloadStructure=function(){},e.prototype.toObject=function(){return{}},e}(),L=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"configurations",{set:function(e){e&&e.length&&(this._configurations=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.aps},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.aps.alert.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){e&&e.length&&(this._payload.aps.alert.subtitle=e,this._subtitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.aps.alert.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this._badge},set:function(e){null!=e&&(this._payload.aps.badge=e,this._badge=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.aps.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.aps={alert:{}}},n.prototype.toObject=function(){var e=this,t=i({},this._payload),n=t.aps,r=n.alert;if(this._isSilent&&(n["content-available"]=1),"apns2"===this._apnsPushType){if(!this._configurations||!this._configurations.length)throw new ReferenceError("APNS2 configuration is missing");var o=[];this._configurations.forEach(function(t){o.push(e._objectFromAPNS2Configuration(t))}),o.length&&(t.pn_push=o)}return r&&Object.keys(r).length||delete n.alert,this._isSilent&&(delete n.alert,delete n.badge,delete n.sound,r={}),this._isSilent||Object.keys(r).length?t:null},n.prototype._objectFromAPNS2Configuration=function(e){var t=this;if(!e.targets||!e.targets.length)throw new ReferenceError("At least one APNS2 target should be provided");var n=[];e.targets.forEach(function(e){n.push(t._objectFromAPNSTarget(e))});var i=e.collapseId,r=e.expirationDate,o={auth_method:"token",targets:n,version:"v2"};return i&&i.length&&(o.collapse_id=i),r&&(o.expiration=r.toISOString()),o},n.prototype._objectFromAPNSTarget=function(e){if(!e.topic||!e.topic.length)throw new TypeError("Target 'topic' undefined.");var t=e.topic,n=e.environment,i=void 0===n?"development":n,r=e.excludedDevices,o=void 0===r?[]:r,a={topic:t,environment:i};return o.length&&(a.excluded_devices=o),a},n}(U),R=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"backContent",{get:function(){return this._backContent},set:function(e){e&&e.length&&(this._payload.back_content=e,this._backContent=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"backTitle",{get:function(){return this._backTitle},set:function(e){e&&e.length&&(this._payload.back_title=e,this._backTitle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"count",{get:function(){return this._count},set:function(e){null!=e&&(this._payload.count=e,this._count=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._type},set:function(e){e&&e.length&&(this._payload.type=e,this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"subtitle",{get:function(){return this.backTitle},set:function(e){this.backTitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this.backContent},set:function(e){this.backContent=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"badge",{get:function(){return this.count},set:function(e){this.count=e},enumerable:!1,configurable:!0}),n.prototype.toObject=function(){return Object.keys(this._payload).length?i({},this._payload):null},n}(U),B=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),Object.defineProperty(n.prototype,"notification",{get:function(){return this._payload.notification},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this._payload.data},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},set:function(e){e&&e.length&&(this._payload.notification.title=e,this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"body",{get:function(){return this._body},set:function(e){e&&e.length&&(this._payload.notification.body=e,this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sound",{get:function(){return this._sound},set:function(e){e&&e.length&&(this._payload.notification.sound=e,this._sound=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"icon",{get:function(){return this._icon},set:function(e){e&&e.length&&(this._payload.notification.icon=e,this._icon=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tag",{get:function(){return this._tag},set:function(e){e&&e.length&&(this._payload.notification.tag=e,this._tag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"silent",{set:function(e){this._isSilent=e},enumerable:!1,configurable:!0}),n.prototype._setDefaultPayloadStructure=function(){this._payload.notification={},this._payload.data={}},n.prototype.toObject=function(){var e=i({},this._payload.data),t=null,n={};if(Object.keys(this._payload).length>2){var o=this._payload;o.notification,o.data;var a=r(o,["notification","data"]);e=i(i({},e),a)}return this._isSilent?e.notification=this._payload.notification:t=this._payload.notification,Object.keys(e).length&&(n.data=e),t&&Object.keys(t).length&&(n.notification=t),Object.keys(n).length?n:null},n}(U),j=function(){function e(e,t){this._payload={apns:{},mpns:{},fcm:{}},this._title=e,this._body=t,this.apns=new L(this._payload.apns,e,t),this.mpns=new R(this._payload.mpns,e,t),this.fcm=new B(this._payload.fcm,e,t)}return Object.defineProperty(e.prototype,"debugging",{set:function(e){this._debugging=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitle",{get:function(){return this._subtitle},set:function(e){this._subtitle=e,this.apns.subtitle=e,this.mpns.subtitle=e,this.fcm.subtitle=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"badge",{get:function(){return this._badge},set:function(e){this._badge=e,this.apns.badge=e,this.mpns.badge=e,this.fcm.badge=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sound",{get:function(){return this._sound},set:function(e){this._sound=e,this.apns.sound=e,this.mpns.sound=e,this.fcm.sound=e},enumerable:!1,configurable:!0}),e.prototype.buildPayload=function(e){var t={};if(e.includes("apns")||e.includes("apns2")){this.apns._apnsPushType=e.includes("apns")?"apns":"apns2";var n=this.apns.toObject();n&&Object.keys(n).length&&(t.pn_apns=n)}if(e.includes("mpns")){var i=this.mpns.toObject();i&&Object.keys(i).length&&(t.pn_mpns=i)}if(e.includes("fcm")){var r=this.fcm.toObject();r&&Object.keys(r).length&&(t.pn_gcm=r)}return Object.keys(t).length&&this._debugging&&(t.pn_debug=!0),t},e}(),F=function(){function e(){this._listeners=[]}return e.prototype.addListener=function(e){this._listeners.includes(e)||this._listeners.push(e)},e.prototype.removeListener=function(e){var t=[];this._listeners.forEach(function(n){n!==e&&t.push(n)}),this._listeners=t},e.prototype.removeAllListeners=function(){this._listeners=[]},e.prototype.announcePresence=function(e){this._listeners.forEach(function(t){t.presence&&t.presence(e)})},e.prototype.announceStatus=function(e){this._listeners.forEach(function(t){t.status&&t.status(e)})},e.prototype.announceMessage=function(e){this._listeners.forEach(function(t){t.message&&t.message(e)})},e.prototype.announceSignal=function(e){this._listeners.forEach(function(t){t.signal&&t.signal(e)})},e.prototype.announceMessageAction=function(e){this._listeners.forEach(function(t){t.messageAction&&t.messageAction(e)})},e.prototype.announceFile=function(e){this._listeners.forEach(function(t){t.file&&t.file(e)})},e.prototype.announceObjects=function(e){this._listeners.forEach(function(t){t.objects&&t.objects(e)})},e.prototype.announceUser=function(e){this._listeners.forEach(function(t){t.user&&t.user(e)})},e.prototype.announceSpace=function(e){this._listeners.forEach(function(t){t.space&&t.space(e)})},e.prototype.announceMembership=function(e){this._listeners.forEach(function(t){t.membership&&t.membership(e)})},e.prototype.announceNetworkUp=function(){var e={};e.category=M.PNNetworkUpCategory,this.announceStatus(e)},e.prototype.announceNetworkDown=function(){var e={};e.category=M.PNNetworkDownCategory,this.announceStatus(e)},e}(),H=function(){function e(e,t){this._config=e,this._cbor=t}return e.prototype.setToken=function(e){e&&e.length>0?this._token=e:this._token=void 0},e.prototype.getToken=function(){return this._token},e.prototype.extractPermissions=function(e){var t={read:!1,write:!1,manage:!1,delete:!1,get:!1,update:!1,join:!1};return!(128&~e)&&(t.join=!0),!(64&~e)&&(t.update=!0),!(32&~e)&&(t.get=!0),!(8&~e)&&(t.delete=!0),!(4&~e)&&(t.manage=!0),!(2&~e)&&(t.write=!0),!(1&~e)&&(t.read=!0),t},e.prototype.parseToken=function(e){var t=this,n=this._cbor.decodeToken(e);if(void 0!==n){var i=n.res.uuid?Object.keys(n.res.uuid):[],r=Object.keys(n.res.chan),o=Object.keys(n.res.grp),a=n.pat.uuid?Object.keys(n.pat.uuid):[],s=Object.keys(n.pat.chan),l=Object.keys(n.pat.grp),u={version:n.v,timestamp:n.t,ttl:n.ttl,authorized_uuid:n.uuid},c=i.length>0,d=r.length>0,h=o.length>0;(c||d||h)&&(u.resources={},c&&(u.resources.uuids={},i.forEach(function(e){u.resources.uuids[e]=t.extractPermissions(n.res.uuid[e])})),d&&(u.resources.channels={},r.forEach(function(e){u.resources.channels[e]=t.extractPermissions(n.res.chan[e])})),h&&(u.resources.groups={},o.forEach(function(e){u.resources.groups[e]=t.extractPermissions(n.res.grp[e])})));var p=a.length>0,f=s.length>0,g=l.length>0;return(p||f||g)&&(u.patterns={},p&&(u.patterns.uuids={},a.forEach(function(e){u.patterns.uuids[e]=t.extractPermissions(n.pat.uuid[e])})),f&&(u.patterns.channels={},s.forEach(function(e){u.patterns.channels[e]=t.extractPermissions(n.pat.chan[e])})),g&&(u.patterns.groups={},l.forEach(function(e){u.patterns.groups[e]=t.extractPermissions(n.pat.grp[e])}))),Object.keys(n.meta).length>0&&(u.meta=n.meta),u.signature=n.sig,u}},e}();function $(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())})}function z(e){return function(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}(e).sort()}var G={signPamFromParams:function(e){return z(e).map(function(t){return"".concat(t,"=").concat($(e[t]))}).join("&")},endsWith:function(e,t){return-1!==e.indexOf(t,this.length-t.length)},createPromise:function(){var e,t;return{promise:new Promise(function(n,i){e=n,t=i}),reject:t,fulfill:e}},encodeString:$,stringToArrayBuffer:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return t},removeSingleOccurance:function(e,t){var n=Object.fromEntries(t.map(function(e){return[e,!1]}));return e.filter(function(e){return!(t.includes(e)&&!n[e]&&(n[e]=!0,1))})},findUniqueCommonElements:function(e,t){return __spreadArray([],__read(e),!1).filter(function(n){return t.includes(n)&&e.indexOf(n)===e.lastIndexOf(n)&&t.indexOf(n)===t.lastIndexOf(n)})}},Q=function(e){function n(t,n){var i=this.constructor,r=e.call(this,t)||this;return r.name=r.constructor.name,r.status=n,r.message=t,Object.setPrototypeOf(r,i.prototype),r}return t(n,e),n}(Error);function q(e){return(t={message:e}).type="validationError",t.error=!0,t;var t}function W(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.usePatch&&e.usePatch(t,n)?e.patchURL(t,n):e.useGetFile&&e.useGetFile(t,n)?e.getFileURL(t,n):e.getURL(t,n)}function V(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-".concat(e.sdkFamily);e.partnerId&&(t+="-".concat(e.partnerId)),t+="/".concat(e.getVersion());var n=e._getPnsdkSuffix(" ");return n.length>0&&(t+=n),t}function Y(e,t,n){return t.usePost&&t.usePost(e,n)?"POST":t.usePatch&&t.usePatch(e,n)?"PATCH":t.useDelete&&t.useDelete(e,n)?"DELETE":t.useGetFile&&t.useGetFile(e,n)?"GETFILE":"GET"}function K(e,t,n,i,r){var o=e.config,a=e.crypto,s=Y(e,r,i);n.timestamp=Math.floor((new Date).getTime()/1e3),"PNPublishOperation"===r.getOperation()&&r.usePost&&r.usePost(e,i)&&(s="GET"),"GETFILE"===s&&(s="GET");var l="".concat(s,"\n").concat(o.publishKey,"\n").concat(t,"\n").concat(G.signPamFromParams(n),"\n");if("POST"===s)l+="string"==typeof(u=r.postPayload(e,i))?u:JSON.stringify(u);else if("PATCH"===s){var u;l+="string"==typeof(u=r.patchPayload(e,i))?u:JSON.stringify(u)}var c="v2.".concat(a.HMACSHA256(l));c=(c=(c=c.replace(/\+/g,"-")).replace(/\//g,"_")).replace(/=+$/,""),n.signature=c}function X(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.networking,a=e.config,s=e.telemetryManager,l=e.tokenManager,u=m(),c=null,d=null,h={};t.getOperation()===N.PNTimeOperation||t.getOperation()===N.PNChannelGroupsOperation?c=n[0]:(h=n[0],c=n[1]),"undefined"==typeof Promise||c||(d=G.createPromise());var p=t.validateParams(e,h);if(p)return c?c(q(p)):d?(d.reject(new Q("Validation failed, check status for details",q(p))),d.promise):void 0;var f,g=t.prepareParams(e,h),y=W(t,e,h),b={url:y,operation:t.getOperation(),timeout:t.getRequestTimeout(e),headers:t.getRequestHeaders?t.getRequestHeaders():{},ignoreBody:"function"==typeof t.ignoreBody&&t.ignoreBody(e),forceBuffered:"function"==typeof t.forceBuffered?t.forceBuffered(e,h):null,abortSignal:"function"==typeof t.getAbortSignal?t.getAbortSignal(e,h):null};g.uuid=a.UUID,g.pnsdk=V(a);var v=s.operationsLatencyForRequest();if(Object.keys(v).length&&(g=i(i({},g),v)),a.useInstanceId&&(g.instanceid=a.instanceId),a.useRequestId&&(g.requestid=u),t.isAuthSupported()){var w=l.getToken()||a.getAuthKey();w&&(g.auth=w)}a.secretKey&&K(e,y,g,h,t);var C=function(n,i){if(n.error)return t.handleError&&t.handleError(e,h,n),void(c?c(n):d&&d.reject(new Q("PubNub call failed, check status for details",n)));s.stopLatencyMeasure(t.getOperation(),u);var r=t.handleResponse(e,i,h);"function"!=typeof(null==r?void 0:r.then)&&(r=Promise.resolve(r)),r.then(function(e){c?c(n,e):d&&d.fulfill(e)}).catch(function(e){if(c){var n=e;t.getOperation()===N.PNSubscribeOperation&&(n={statusCode:400,error:!0,operation:t.getOperation(),errorData:e,category:M.PNUnknownCategory}),c(n,null)}else d&&d.reject(new Q("PubNub call failed, check status for details",e))})};if(s.startLatencyMeasure(t.getOperation(),u),"POST"===Y(e,t,h)){var x=t.postPayload(e,h);f=o.POST(g,x,b,C)}else"PATCH"===Y(e,t,h)?(x=t.patchPayload(e,h),f=o.PATCH(g,x,b,C)):f="DELETE"===Y(e,t,h)?o.DELETE(g,b,C):"GETFILE"===Y(e,t,h)?o.GETFILE(g,b,C):o.GET(g,b,C);return t.getOperation()===N.PNSubscribeOperation?f:d?d.promise:void 0}var Z=Object.freeze({__proto__:null,getOperation:function(){return N.PNAddChannelsToGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,r=e.config;return i?n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),J=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveChannelsFromGroupOperation},validateParams:function(e,t){var n=t.channels,i=t.channelGroup,r=e.config;return i?n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}},handleResponse:function(){return{}}}),ee=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n),"/remove")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},handleResponse:function(){return{}}}),te=Object.freeze({__proto__:null,getOperation:function(){return N.PNChannelGroupsOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v1/channel-registration/sub-key/".concat(t.subscribeKey,"/channel-group")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{groups:t.payload.groups}}}),ne=Object.freeze({__proto__:null,getOperation:function(){return N.PNChannelsForGroupOperation},validateParams:function(e,t){var n=t.channelGroup,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"},getURL:function(e,t){var n=t.channelGroup,i=e.config;return"/v1/channel-registration/sub-key/".concat(i.subscribeKey,"/channel-group/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{channels:t.payload.channels}}}),ie=Object.freeze({__proto__:null,getOperation:function(){return N.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.channels,o=t.topic,a=e.config;return n?i?"apns2"!==i||o?r&&0!==r.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.channels,o=void 0===r?[]:r,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,add:o.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),re=Object.freeze({__proto__:null,getOperation:function(){return N.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.channels,o=t.topic,a=e.config;return n?i?"apns2"!==i||o?r&&0!==r.length?a.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.channels,o=void 0===r?[]:r,a=t.environment,s=void 0===a?"development":a,l=t.topic,u={type:n,remove:o.join(",")};return"apns2"===n&&delete(u=i(i({},u),{environment:s,topic:l})).type,u},handleResponse:function(){return{}}}),oe=Object.freeze({__proto__:null,getOperation:function(){return N.PNPushNotificationEnabledChannelsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.topic,o=e.config;return n?i?"apns2"!==i||r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.environment,o=void 0===r?"development":r,a=t.topic,s=t.start,l=t.count,u={type:n};return"apns2"===n&&delete(u=i(i({},u),{environment:o,topic:a})).type,s&&(u.start=s),l&&l>0&&(u.count=l),u},handleResponse:function(e,t){return{channels:t}}}),ae=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveAllPushNotificationsOperation},validateParams:function(e,t){var n=t.device,i=t.pushGateway,r=t.topic,o=e.config;return n?i?"apns2"!==i||r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing APNS2 topic":"Missing GW Type (pushGateway: gcm, apns or apns2)":"Missing Device ID (device)"},getURL:function(e,t){var n=t.device,i=t.pushGateway,r=e.config;return"apns2"===i?"/v2/push/sub-key/".concat(r.subscribeKey,"/devices-apns2/").concat(n,"/remove"):"/v1/push/sub-key/".concat(r.subscribeKey,"/devices/").concat(n,"/remove")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.pushGateway,r=t.environment,o=void 0===r?"development":r,a=t.topic,s={type:n};return"apns2"===n&&delete(s=i(i({},s),{environment:o,topic:a})).type,s},handleResponse:function(){return{}}}),se=Object.freeze({__proto__:null,getOperation:function(){return N.PNUnsubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(o),"/leave")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,r={};return i.length>0&&(r["channel-group"]=i.join(",")),r},handleResponse:function(){return{}}}),le=Object.freeze({__proto__:null,getOperation:function(){return N.PNWhereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,r=void 0===i?n.UUID:i;return"/v2/presence/sub-key/".concat(n.subscribeKey,"/uuid/").concat(G.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}}),ue=Object.freeze({__proto__:null,getOperation:function(){return N.PNHeartbeatOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(o),"/heartbeat")},isAuthSupported:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,r=t.state,o=e.config,a={};return i.length>0&&(a["channel-group"]=i.join(",")),r&&(a.state=JSON.stringify(r)),a.heartbeat=o.getPresenceTimeout(),a},handleResponse:function(){return{}}}),ce=Object.freeze({__proto__:null,getOperation:function(){return N.PNGetStateOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.uuid,r=void 0===i?n.UUID:i,o=t.channels,a=void 0===o?[]:o,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(s),"/uuid/").concat(r)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,i=void 0===n?[]:n,r={};return i.length>0&&(r["channel-group"]=i.join(",")),r},handleResponse:function(e,t,n){var i=n.channels,r=void 0===i?[]:i,o=n.channelGroups,a=void 0===o?[]:o,s={};return 1===r.length&&0===a.length?s[r[0]]=t.payload:s=t.payload,{channels:s}}}),de=Object.freeze({__proto__:null,getOperation:function(){return N.PNSetStateOperation},validateParams:function(e,t){var n=e.config,i=t.state,r=t.channels,o=void 0===r?[]:r,a=t.channelGroups,s=void 0===a?[]:a;return i?n.subscribeKey?0===o.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/presence/sub-key/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(o),"/uuid/").concat(G.encodeString(n.UUID),"/data")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.state,i=t.channelGroups,r=void 0===i?[]:i,o={};return o.state=JSON.stringify(n),r.length>0&&(o["channel-group"]=r.join(",")),o},handleResponse:function(e,t){return{state:t.payload}}}),he=Object.freeze({__proto__:null,getOperation:function(){return N.PNHereNowOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=t.channelGroups,a=void 0===o?[]:o,s="/v2/presence/sub-key/".concat(n.subscribeKey);if(r.length>0||a.length>0){var l=r.length>0?r.join(","):",";s+="/channel/".concat(G.encodeString(l))}return s},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o=t.includeUUIDs,a=void 0===o||o,s=t.includeState,l=void 0!==s&&s,u=t.queryParameters,c=void 0===u?{}:u,d={};return a||(d.disable_uuids=1),l&&(d.state=1),r.length>0&&(d["channel-group"]=r.join(",")),i(i({},d),c)},handleResponse:function(e,t,n){var i=n.channels,r=void 0===i?[]:i,o=n.channelGroups,a=void 0===o?[]:o,s=n.includeUUIDs,l=void 0===s||s,u=n.includeState,c=void 0!==u&&u;return r.length>1||a.length>0||0===a.length&&0===r.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var i=t.payload.channels[n],r=[];return e.channels[n]={occupants:r,name:n,occupancy:i.occupancy},l&&i.uuids.forEach(function(e){c?r.push({state:e.state,uuid:e.uuid}):r.push({state:null,uuid:e})}),e}),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[r[0]]={occupants:n,name:r[0],occupancy:t.occupancy},l&&t.uuids&&t.uuids.forEach(function(e){c?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e}()},handleError:function(e,t,n){402!==n.statusCode||this.getURL(e,t).includes("channel")||(n.errorData.message="You have tried to perform a Global Here Now operation, your keyset configuration does not support that. Please provide a channel, or enable the Global Here Now feature from the Portal.")}}),pe=Object.freeze({__proto__:null,getOperation:function(){return N.PNAddMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.action,r=t.channel;return t.messageTimetoken?n.subscribeKey?r?i?i.value?i.type?i.type.length>15?"Action.type value exceed maximum length of 15":void 0:"Missing Action.type":"Missing Action.value":"Missing Action":"Missing message channel":"Missing Subscribe Key":"Missing message timetoken"},usePost:function(){return!0},postURL:function(e,t){var n=e.config,i=t.channel,r=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(i),"/message/").concat(r)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},getRequestHeaders:function(){return{"Content-Type":"application/json"}},isAuthSupported:function(){return!0},prepareParams:function(){return{}},postPayload:function(e,t){return t.action},handleResponse:function(e,t){return{data:t.data}}}),fe=Object.freeze({__proto__:null,getOperation:function(){return N.PNRemoveMessageActionOperation},validateParams:function(e,t){var n=e.config,i=t.channel,r=t.actionTimetoken;return t.messageTimetoken?r?n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key":"Missing action timetoken":"Missing message timetoken"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config,i=t.channel,r=t.actionTimetoken,o=t.messageTimetoken;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(i),"/message/").concat(o,"/action/").concat(r)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{data:t.data}}}),ge=Object.freeze({__proto__:null,getOperation:function(){return N.PNGetMessageActionsOperation},validateParams:function(e,t){var n=e.config,i=t.channel;return n.subscribeKey?i?void 0:"Missing message channel":"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channel;return"/v1/message-actions/".concat(n.subscribeKey,"/channel/").concat(G.encodeString(i))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.limit,i=t.start,r=t.end,o={};return n&&(o.limit=n),i&&(o.start=i),r&&(o.end=r),o},handleResponse:function(e,t){var n={data:t.data,start:null,end:null};return n.data.length&&(n.end=n.data[n.data.length-1].actionTimetoken,n.start=n.data[0].actionTimetoken),n}}),me={getOperation:function(){return N.PNListFilesOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"channel can't be empty"},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/files")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.limit&&(n.limit=t.limit),t.next&&(n.next=t.next),n},handleResponse:function(e,t){return{status:t.status,data:t.data,next:t.next,count:t.count}}},ye={getOperation:function(){return N.PNGenerateUploadUrlOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?void 0:"name can't be empty":"channel can't be empty"},usePost:function(){return!0},postURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/generate-upload-url")},postPayload:function(e,t){return{name:t.name}},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data,file_upload_request:t.file_upload_request}}},be={getOperation:function(){return N.PNPublishFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.fileId)?(null==t?void 0:t.fileName)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},getURL:function(e,t){var n=e.config,i=n.publishKey,r=n.subscribeKey,o=function(e,t){var n=JSON.stringify(t);if(e.cryptoModule){var i=e.cryptoModule.encrypt(n);n="string"==typeof i?i:v(i),n=JSON.stringify(n)}return n||""}(e,{message:t.message,file:{name:t.fileName,id:t.fileId}});return"/v1/files/publish-file/".concat(i,"/").concat(r,"/0/").concat(G.encodeString(t.channel),"/0/").concat(G.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.ttl&&(n.ttl=t.ttl),void 0!==t.storeInHistory&&(n.store=t.storeInHistory?"1":"0"),t.meta&&"object"==typeof t.meta&&(n.meta=JSON.stringify(t.meta)),n},handleResponse:function(e,t){return{timetoken:t[2]}}},ve=function(e){var t=function(e){var t=this,n=e.generateUploadUrl,i=e.publishFile,r=e.modules,s=r.PubNubFile,l=r.config,u=r.cryptography,c=r.cryptoModule,d=r.networking;return function(e){var r=e.channel,h=e.file,p=e.message,f=e.cipherKey,g=e.meta,m=e.ttl,y=e.storeInHistory;return o(t,void 0,void 0,function(){var e,t,o,b,v,w,C,x,A,S,E,k,T,_,O,P,M,I,N,D,U,L,R,B,j,F,H,$,z;return a(this,function(a){switch(a.label){case 0:if(!r)throw new Q("Validation failed, check status for details",q("channel can't be empty"));if(!h)throw new Q("Validation failed, check status for details",q("file can't be empty"));return e=s.create(h),[4,n({channel:r,name:e.name})];case 1:return t=a.sent(),o=t.file_upload_request,b=o.url,v=o.form_fields,w=t.data,C=w.id,x=w.name,s.supportsEncryptFile&&(f||c)?null!=f?[3,3]:[4,c.encryptFile(e,s)]:[3,6];case 2:return A=a.sent(),[3,5];case 3:return[4,u.encryptFile(f,e,s)];case 4:A=a.sent(),a.label=5;case 5:e=A,a.label=6;case 6:S=v,e.mimeType&&(S=v.map(function(t){return"Content-Type"===t.key?{key:t.key,value:e.mimeType}:t})),a.label=7;case 7:return a.trys.push([7,21,,22]),s.supportsFileUri&&h.uri?(T=(k=d).POSTFILE,_=[b,S],[4,e.toFileUri()]):[3,10];case 8:return[4,T.apply(k,_.concat([a.sent()]))];case 9:return E=a.sent(),[3,20];case 10:return s.supportsFile?(P=(O=d).POSTFILE,M=[b,S],[4,e.toFile()]):[3,13];case 11:return[4,P.apply(O,M.concat([a.sent()]))];case 12:return E=a.sent(),[3,20];case 13:return s.supportsBuffer?(N=(I=d).POSTFILE,D=[b,S],[4,e.toBuffer()]):[3,16];case 14:return[4,N.apply(I,D.concat([a.sent()]))];case 15:return E=a.sent(),[3,20];case 16:return s.supportsBlob?(L=(U=d).POSTFILE,R=[b,S],[4,e.toBlob()]):[3,19];case 17:return[4,L.apply(U,R.concat([a.sent()]))];case 18:return E=a.sent(),[3,20];case 19:throw new Error("Unsupported environment");case 20:return[3,22];case 21:throw(B=a.sent()).response&&"string"==typeof B.response.text?(j=B.response.text,F=/<Message>(.*)<\/Message>/gi.exec(j),new Q(F?"Upload to bucket failed: ".concat(F[1]):"Upload to bucket failed.",B)):new Q("Upload to bucket failed.",B);case 22:if(204!==E.status)throw new Q("Upload to bucket was unsuccessful",E);H=l.fileUploadPublishRetryLimit,$=!1,z={timetoken:"0"},a.label=23;case 23:return a.trys.push([23,25,,26]),[4,i({channel:r,message:p,fileId:C,fileName:x,meta:g,storeInHistory:y,ttl:m})];case 24:return z=a.sent(),$=!0,[3,26];case 25:return a.sent(),H-=1,[3,26];case 26:if(!$&&H>0)return[3,23];a.label=27;case 27:if($)return[2,{timetoken:z.timetoken,id:C,name:x}];throw new Q("Publish failed. You may want to execute that operation manually using pubnub.publishFile",{channel:r,id:C,name:x})}})})}}(e);return function(e,n){var i=t(e);return"function"==typeof n?(i.then(function(e){return n(null,e)}).catch(function(e){return n(e,null)}),i):i}},we=function(e,t){var n=t.channel,i=t.id,r=t.name,o=e.config,a=e.networking,s=e.tokenManager;if(!n)throw new Q("Validation failed, check status for details",q("channel can't be empty"));if(!i)throw new Q("Validation failed, check status for details",q("file id can't be empty"));if(!r)throw new Q("Validation failed, check status for details",q("file name can't be empty"));var l="/v1/files/".concat(o.subscribeKey,"/channels/").concat(G.encodeString(n),"/files/").concat(i,"/").concat(r),u={};u.uuid=o.getUUID(),u.pnsdk=V(o);var c=s.getToken()||o.getAuthKey();c&&(u.auth=c),o.secretKey&&K(e,l,u,{},{getOperation:function(){return"PubNubGetFileUrlOperation"}});var d=Object.keys(u).map(function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(u[e]))}).join("&");return""!==d?"".concat(a.getStandardOrigin()).concat(l,"?").concat(d):"".concat(a.getStandardOrigin()).concat(l)},Ce={getOperation:function(){return N.PNDownloadFileOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.name)?(null==t?void 0:t.id)?void 0:"id can't be empty":"name can't be empty":"channel can't be empty"},useGetFile:function(){return!0},getFileURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},ignoreBody:function(){return!0},forceBuffered:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t,n){var i=e.PubNubFile,r=e.config,s=e.cryptography,l=e.cryptoModule;return o(void 0,void 0,void 0,function(){var e,o,u,c;return a(this,function(a){switch(a.label){case 0:return e=t.response.body,i.supportsEncryptFile&&(n.cipherKey||l)?null!=n.cipherKey?[3,2]:[4,l.decryptFile(i.create({data:e,name:n.name}),i)]:[3,5];case 1:return o=a.sent().data,[3,4];case 2:return[4,s.decrypt(null!==(u=n.cipherKey)&&void 0!==u?u:r.cipherKey,e)];case 3:o=a.sent(),a.label=4;case 4:e=o,a.label=5;case 5:return[2,i.create({data:e,name:null!==(c=t.response.name)&&void 0!==c?c:n.name,mimeType:t.response.type})]}})})}},xe={getOperation:function(){return N.PNListFilesOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.id)?(null==t?void 0:t.name)?void 0:"file name can't be empty":"file id can't be empty":"channel can't be empty"},useDelete:function(){return!0},getURL:function(e,t){var n=e.config;return"/v1/files/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/files/").concat(t.id,"/").concat(t.name)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status}}},Ae={getOperation:function(){return N.PNGetAllUUIDMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(r=t.include)||void 0===r?void 0:r.totalCount),(null===(o=null==t?void 0:t.page)||void 0===o?void 0:o.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,next:t.next,prev:t.prev}}},Se={getOperation:function(){return N.PNGetUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r=e.config,o={};return o.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:r.getUUID(),o.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&o.include.pop(),o.include=o.include.join(","),o},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Ee={getOperation:function(){return N.PNSetUUIDMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.data))return"Data cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r=e.config,o={};return o.uuid=null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:r.getUUID(),o.include=["status","type","custom"],(null==t?void 0:t.include)&&!1===(null===(i=t.include)||void 0===i?void 0:i.customFields)&&o.include.pop(),o.include=o.include.join(","),o},handleResponse:function(e,t){return{status:t.status,data:t.data}}},ke={getOperation:function(){return N.PNRemoveUUIDMetadataOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i=e.config;return{uuid:null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Te={getOperation:function(){return N.PNGetAllChannelMetadataOperation},validateParams:function(){},getURL:function(e){var t=e.config;return"/v2/objects/".concat(t.subscribeKey,"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["status","type"]};return(null==t?void 0:t.include)&&(null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),h.include=h.include.join(","),(null===(i=null==t?void 0:t.include)||void 0===i?void 0:i.totalCount)&&(h.count=null===(r=t.include)||void 0===r?void 0:r.totalCount),(null===(o=null==t?void 0:t.page)||void 0===o?void 0:o.next)&&(h.start=null===(a=t.page)||void 0===a?void 0:a.next),(null===(s=null==t?void 0:t.page)||void 0===s?void 0:s.prev)&&(h.end=null===(u=t.page)||void 0===u?void 0:u.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),h.limit=null!==(c=null==t?void 0:t.limit)&&void 0!==c?c:100,(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},_e={getOperation:function(){return N.PNGetChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Oe={getOperation:function(){return N.PNSetChannelMetadataOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.data)?void 0:"Data cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel))},patchPayload:function(e,t){return t.data},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i={include:["status","type","custom"]};return(null==t?void 0:t.include)&&!1===(null===(n=t.include)||void 0===n?void 0:n.customFields)&&i.include.pop(),i.include=i.include.join(","),i},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Pe={getOperation:function(){return N.PNRemoveChannelMetadataOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"Channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{status:t.status,data:t.data}}},Me={getOperation:function(){return N.PNGetMembersOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channel))return"channel cannot be empty"},getURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/uuids")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h,p,f,g,m,y={include:[]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.statusField)&&y.include.push("status"),(null===(i=t.include)||void 0===i?void 0:i.customFields)&&y.include.push("custom"),(null===(r=t.include)||void 0===r?void 0:r.UUIDFields)&&y.include.push("uuid"),(null===(o=t.include)||void 0===o?void 0:o.customUUIDFields)&&y.include.push("uuid.custom"),(null===(a=t.include)||void 0===a?void 0:a.UUIDStatusField)&&y.include.push("uuid.status"),(null===(s=t.include)||void 0===s?void 0:s.UUIDTypeField)&&y.include.push("uuid.type")),y.include=y.include.join(","),(null===(u=null==t?void 0:t.include)||void 0===u?void 0:u.totalCount)&&(y.count=null===(c=t.include)||void 0===c?void 0:c.totalCount),(null===(d=null==t?void 0:t.page)||void 0===d?void 0:d.next)&&(y.start=null===(h=t.page)||void 0===h?void 0:h.next),(null===(p=null==t?void 0:t.page)||void 0===p?void 0:p.prev)&&(y.end=null===(f=t.page)||void 0===f?void 0:f.prev),(null==t?void 0:t.filter)&&(y.filter=t.filter),y.limit=null!==(g=null==t?void 0:t.limit)&&void 0!==g?g:100,(null==t?void 0:t.sort)&&(y.sort=Object.entries(null!==(m=t.sort)&&void 0!==m?m:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),y},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ie={getOperation:function(){return N.PNSetMembersOperation},validateParams:function(e,t){return(null==t?void 0:t.channel)?(null==t?void 0:t.uuids)&&0!==(null==t?void 0:t.uuids.length)?void 0:"UUIDs cannot be empty":"Channel cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n=e.config;return"/v2/objects/".concat(n.subscribeKey,"/channels/").concat(G.encodeString(t.channel),"/uuids")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.uuids.map(function(e){return"string"==typeof e?{uuid:{id:e}}:{uuid:{id:e.id},custom:e.custom,status:e.status}}),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["uuid.status","uuid.type","type"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customUUIDFields)&&h.include.push("uuid.custom"),(null===(r=t.include)||void 0===r?void 0:r.UUIDFields)&&h.include.push("uuid")),h.include=h.include.join(","),(null===(o=null==t?void 0:t.include)||void 0===o?void 0:o.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ne={getOperation:function(){return N.PNGetMembershipsOperation},validateParams:function(){},getURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=null==t?void 0:t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h,p,f,g,m,y={include:[]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.statusField)&&y.include.push("status"),(null===(i=t.include)||void 0===i?void 0:i.customFields)&&y.include.push("custom"),(null===(r=t.include)||void 0===r?void 0:r.channelFields)&&y.include.push("channel"),(null===(o=t.include)||void 0===o?void 0:o.customChannelFields)&&y.include.push("channel.custom"),(null===(a=t.include)||void 0===a?void 0:a.channelStatusField)&&y.include.push("channel.status"),(null===(s=t.include)||void 0===s?void 0:s.channelTypeField)&&y.include.push("channel.type")),y.include=y.include.join(","),(null===(u=null==t?void 0:t.include)||void 0===u?void 0:u.totalCount)&&(y.count=null===(c=t.include)||void 0===c?void 0:c.totalCount),(null===(d=null==t?void 0:t.page)||void 0===d?void 0:d.next)&&(y.start=null===(h=t.page)||void 0===h?void 0:h.next),(null===(p=null==t?void 0:t.page)||void 0===p?void 0:p.prev)&&(y.end=null===(f=t.page)||void 0===f?void 0:f.prev),(null==t?void 0:t.filter)&&(y.filter=t.filter),y.limit=null!==(g=null==t?void 0:t.limit)&&void 0!==g?g:100,(null==t?void 0:t.sort)&&(y.sort=Object.entries(null!==(m=t.sort)&&void 0!==m?m:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),y},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},De={getOperation:function(){return N.PNSetMembershipsOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)||0===(null==t?void 0:t.channels.length))return"Channels cannot be empty"},usePatch:function(){return!0},patchURL:function(e,t){var n,i=e.config;return"/v2/objects/".concat(i.subscribeKey,"/uuids/").concat(G.encodeString(null!==(n=t.uuid)&&void 0!==n?n:i.getUUID()),"/channels")},patchPayload:function(e,t){var n;return(n={set:[],delete:[]})[t.type]=t.channels.map(function(e){return"string"==typeof e?{channel:{id:e}}:{channel:{id:e.id},custom:e.custom,status:e.status}}),n},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n,i,r,o,a,s,u,c,d,h={include:["channel.status","channel.type","status"]};return(null==t?void 0:t.include)&&((null===(n=t.include)||void 0===n?void 0:n.customFields)&&h.include.push("custom"),(null===(i=t.include)||void 0===i?void 0:i.customChannelFields)&&h.include.push("channel.custom"),(null===(r=t.include)||void 0===r?void 0:r.channelFields)&&h.include.push("channel")),h.include=h.include.join(","),(null===(o=null==t?void 0:t.include)||void 0===o?void 0:o.totalCount)&&(h.count=!0),(null===(a=null==t?void 0:t.page)||void 0===a?void 0:a.next)&&(h.start=null===(s=t.page)||void 0===s?void 0:s.next),(null===(u=null==t?void 0:t.page)||void 0===u?void 0:u.prev)&&(h.end=null===(c=t.page)||void 0===c?void 0:c.prev),(null==t?void 0:t.filter)&&(h.filter=t.filter),null!=t.limit&&(h.limit=t.limit),(null==t?void 0:t.sort)&&(h.sort=Object.entries(null!==(d=t.sort)&&void 0!==d?d:{}).map(function(e){var t=l(e,2),n=t[0],i=t[1];return"asc"===i||"desc"===i?"".concat(n,":").concat(i):n})),h},handleResponse:function(e,t){return{status:t.status,data:t.data,totalCount:t.totalCount,prev:t.prev,next:t.next}}},Ue=Object.freeze({__proto__:null,getOperation:function(){return N.PNAccessManagerAudit},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/audit/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channel,i=t.channelGroup,r=t.authKeys,o=void 0===r?[]:r,a={};return n&&(a.channel=n),i&&(a["channel-group"]=i),o.length>0&&(a.auth=o.join(",")),a},handleResponse:function(e,t){return t.payload}}),Le=Object.freeze({__proto__:null,getOperation:function(){return N.PNAccessManagerGrant},validateParams:function(e,t){var n=e.config;return n.subscribeKey?n.publishKey?n.secretKey?null==t.uuids||t.authKeys?null==t.uuids||null==t.channels&&null==t.channelGroups?void 0:"Both channel/channelgroup and uuid cannot be used in the same request":"authKeys are required for grant request on uuids":"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"},getURL:function(e){var t=e.config;return"/v2/auth/grant/sub-key/".concat(t.subscribeKey)},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e,t){var n=t.channels,i=void 0===n?[]:n,r=t.channelGroups,o=void 0===r?[]:r,a=t.uuids,s=void 0===a?[]:a,l=t.ttl,u=t.read,c=void 0!==u&&u,d=t.write,h=void 0!==d&&d,p=t.manage,f=void 0!==p&&p,g=t.get,m=void 0!==g&&g,y=t.join,b=void 0!==y&&y,v=t.update,w=void 0!==v&&v,C=t.authKeys,x=void 0===C?[]:C,A=t.delete,S={};return S.r=c?"1":"0",S.w=h?"1":"0",S.m=f?"1":"0",S.d=A?"1":"0",S.g=m?"1":"0",S.j=b?"1":"0",S.u=w?"1":"0",i.length>0&&(S.channel=i.join(",")),o.length>0&&(S["channel-group"]=o.join(",")),x.length>0&&(S.auth=x.join(",")),s.length>0&&(S["target-uuid"]=s.join(",")),(l||0===l)&&(S.ttl=l),S},handleResponse:function(){return{}}});function Re(e){var t,n,i,r,o=void 0!==(null==e?void 0:e.authorizedUserId),a=void 0!==(null===(t=null==e?void 0:e.resources)||void 0===t?void 0:t.users),s=void 0!==(null===(n=null==e?void 0:e.resources)||void 0===n?void 0:n.spaces),l=void 0!==(null===(i=null==e?void 0:e.patterns)||void 0===i?void 0:i.users),u=void 0!==(null===(r=null==e?void 0:e.patterns)||void 0===r?void 0:r.spaces);return l||a||u||s||o}function Be(e){var t=0;return e.join&&(t|=128),e.update&&(t|=64),e.get&&(t|=32),e.delete&&(t|=8),e.manage&&(t|=4),e.write&&(t|=2),e.read&&(t|=1),t}function je(e,t){if(Re(t))return function(e,t){var n=t.ttl,i=t.resources,r=t.patterns,o=t.meta,a=t.authorizedUserId,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.users,u=i.spaces,c=i.groups;l&&Object.keys(l).forEach(function(e){s.permissions.resources.uuids[e]=Be(l[e])}),u&&Object.keys(u).forEach(function(e){s.permissions.resources.channels[e]=Be(u[e])}),c&&Object.keys(c).forEach(function(e){s.permissions.resources.groups[e]=Be(c[e])})}if(r){var d=r.users,h=r.spaces,p=r.groups;d&&Object.keys(d).forEach(function(e){s.permissions.patterns.uuids[e]=Be(d[e])}),h&&Object.keys(h).forEach(function(e){s.permissions.patterns.channels[e]=Be(h[e])}),p&&Object.keys(p).forEach(function(e){s.permissions.patterns.groups[e]=Be(p[e])})}return(n||0===n)&&(s.ttl=n),o&&(s.permissions.meta=o),a&&(s.permissions.uuid="".concat(a)),s}(0,t);var n=t.ttl,i=t.resources,r=t.patterns,o=t.meta,a=t.authorized_uuid,s={ttl:0,permissions:{resources:{channels:{},groups:{},uuids:{},users:{},spaces:{}},patterns:{channels:{},groups:{},uuids:{},users:{},spaces:{}},meta:{}}};if(i){var l=i.uuids,u=i.channels,c=i.groups;l&&Object.keys(l).forEach(function(e){s.permissions.resources.uuids[e]=Be(l[e])}),u&&Object.keys(u).forEach(function(e){s.permissions.resources.channels[e]=Be(u[e])}),c&&Object.keys(c).forEach(function(e){s.permissions.resources.groups[e]=Be(c[e])})}if(r){var d=r.uuids,h=r.channels,p=r.groups;d&&Object.keys(d).forEach(function(e){s.permissions.patterns.uuids[e]=Be(d[e])}),h&&Object.keys(h).forEach(function(e){s.permissions.patterns.channels[e]=Be(h[e])}),p&&Object.keys(p).forEach(function(e){s.permissions.patterns.groups[e]=Be(p[e])})}return(n||0===n)&&(s.ttl=n),o&&(s.permissions.meta=o),a&&(s.permissions.uuid="".concat(a)),s}var Fe=Object.freeze({__proto__:null,getOperation:function(){return N.PNAccessManagerGrantToken},extractPermissions:Be,validateParams:function(e,t){var n,i,r,o,a,s,l=e.config;if(!l.subscribeKey)return"Missing Subscribe Key";if(!l.publishKey)return"Missing Publish Key";if(!l.secretKey)return"Missing Secret Key";if(!t.resources&&!t.patterns)return"Missing either Resources or Patterns.";var u=void 0!==(null==t?void 0:t.authorized_uuid),c=void 0!==(null===(n=null==t?void 0:t.resources)||void 0===n?void 0:n.uuids),d=void 0!==(null===(i=null==t?void 0:t.resources)||void 0===i?void 0:i.channels),h=void 0!==(null===(r=null==t?void 0:t.resources)||void 0===r?void 0:r.groups),p=void 0!==(null===(o=null==t?void 0:t.patterns)||void 0===o?void 0:o.uuids),f=void 0!==(null===(a=null==t?void 0:t.patterns)||void 0===a?void 0:a.channels),g=void 0!==(null===(s=null==t?void 0:t.patterns)||void 0===s?void 0:s.groups),m=u||c||p||d||f||h||g;return Re(t)&&m?"Cannot mix `users`, `spaces` and `authorizedUserId` with `uuids`, `channels`, `groups` and `authorized_uuid`":(!t.resources||t.resources.uuids&&0!==Object.keys(t.resources.uuids).length||t.resources.channels&&0!==Object.keys(t.resources.channels).length||t.resources.groups&&0!==Object.keys(t.resources.groups).length||t.resources.users&&0!==Object.keys(t.resources.users).length||t.resources.spaces&&0!==Object.keys(t.resources.spaces).length)&&(!t.patterns||t.patterns.uuids&&0!==Object.keys(t.patterns.uuids).length||t.patterns.channels&&0!==Object.keys(t.patterns.channels).length||t.patterns.groups&&0!==Object.keys(t.patterns.groups).length||t.patterns.users&&0!==Object.keys(t.patterns.users).length||t.patterns.spaces&&0!==Object.keys(t.patterns.spaces).length)?void 0:"Missing values for either Resources or Patterns."},postURL:function(e){var t=e.config;return"/v3/pam/".concat(t.subscribeKey,"/grant")},usePost:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(){return{}},postPayload:function(e,t){return je(0,t)},handleResponse:function(e,t){return t.data.token}}),He={getOperation:function(){return N.PNAccessManagerRevokeToken},validateParams:function(e,t){return e.config.secretKey?t?void 0:"token can't be empty":"Missing Secret Key"},getURL:function(e,t){var n=e.config;return"/v3/pam/".concat(n.subscribeKey,"/grant/").concat(G.encodeString(t))},useDelete:function(){return!0},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!1},prepareParams:function(e){return{uuid:e.config.getUUID()}},handleResponse:function(e,t){return{status:t.status,data:t.data}}};function $e(e,t){var n=JSON.stringify(t);if(e.cryptoModule){var i=e.cryptoModule.encrypt(n);n="string"==typeof i?i:v(i),n=JSON.stringify(n)}return n||""}var ze=Object.freeze({__proto__:null,getOperation:function(){return N.PNPublishOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},usePost:function(e,t){var n=t.sendByPost;return void 0!==n&&n},getURL:function(e,t){var n=e.config,i=t.channel,r=$e(e,t.message);return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(G.encodeString(i),"/0/").concat(G.encodeString(r))},postURL:function(e,t){var n=e.config,i=t.channel;return"/publish/".concat(n.publishKey,"/").concat(n.subscribeKey,"/0/").concat(G.encodeString(i),"/0")},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},postPayload:function(e,t){return $e(e,t.message)},prepareParams:function(e,t){var n=t.meta,i=t.replicate,r=void 0===i||i,o=t.storeInHistory,a=t.ttl,s={};return null!=o&&(s.store=o?"1":"0"),a&&(s.ttl=a),!1===r&&(s.norep="true"),n&&"object"==typeof n&&(s.meta=JSON.stringify(n)),s},handleResponse:function(e,t){return{timetoken:t[2]}}}),Ge=Object.freeze({__proto__:null,getOperation:function(){return N.PNSignalOperation},validateParams:function(e,t){var n=e.config,i=t.message;return t.channel?i?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"},getURL:function(e,t){var n,i=e.config,r=t.channel,o=(n=t.message,JSON.stringify(n));return"/signal/".concat(i.publishKey,"/").concat(i.subscribeKey,"/0/").concat(G.encodeString(r),"/0/").concat(G.encodeString(o))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(){return{}},handleResponse:function(e,t){return{timetoken:t[2]}}}),Qe=Object.freeze({__proto__:null,getOperation:function(){return N.PNHistoryOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channel,i=e.config;return"/v2/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,r=t.reverse,o=t.count,a=void 0===o?100:o,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d={include_token:"true"};return d.count=a,n&&(d.start=n),i&&(d.end=i),l&&(d.string_message_token="true"),null!=r&&(d.reverse=r.toString()),c&&(d.include_meta="true"),d},handleResponse:function(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return Array.isArray(t[0])&&t[0].forEach(function(t){var i=function(e,t){var n={};if(!e.cryptoModule)return n.payload=t,n;try{var i=e.cryptoModule.decrypt(t),r=i instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(i)):i;return n.payload=r,n}catch(i){e.config.logVerbosity&&console&&console.log,n.payload=t,n.error="Error while decrypting message content: ".concat(i.message)}return n}(e,t.message),r={timetoken:t.timetoken,entry:i.payload};t.meta&&(r.meta=t.meta),i.error&&(r.error=i.error),n.messages.push(r)}),n}}),qe=Object.freeze({__proto__:null,getOperation:function(){return N.PNDeleteMessagesOperation},validateParams:function(e,t){var n=t.channel,i=e.config;return n?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},useDelete:function(){return!0},getURL:function(e,t){var n=t.channel,i=e.config;return"/v3/history/sub-key/".concat(i.subscribeKey,"/channel/").concat(G.encodeString(n))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.start,i=t.end,r={};return n&&(r.start=n),i&&(r.end=i),r},handleResponse:function(e,t){return t.payload}}),We=Object.freeze({__proto__:null,getOperation:function(){return N.PNMessageCounts},validateParams:function(e,t){var n=t.channels,i=t.timetoken,r=t.channelTimetokens,o=e.config;return n?i&&r?"timetoken and channelTimetokens are incompatible together":r&&r.length>1&&n.length!==r.length?"Length of channelTimetokens and channels do not match":o.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"},getURL:function(e,t){var n=t.channels,i=e.config,r=n.join(",");return"/v3/history/sub-key/".concat(i.subscribeKey,"/message-counts/").concat(G.encodeString(r))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.timetoken,i=t.channelTimetokens,r={};if(i&&1===i.length){var o=l(i,1)[0];r.timetoken=o}else i?r.channelsTimetoken=i.join(","):n&&(r.timetoken=n);return r},handleResponse:function(e,t){return{channels:t.channels}}}),Ve=Object.freeze({__proto__:null,getOperation:function(){return N.PNFetchMessagesOperation},validateParams:function(e,t){var n=t.channels,i=t.includeMessageActions,r=void 0!==i&&i,o=e.config;if(!n||0===n.length)return"Missing channels";if(!o.subscribeKey)return"Missing Subscribe Key";if(r&&n.length>1)throw new TypeError("History can return actions data for a single channel only. Either pass a single channel or disable the includeMessageActions flag.")},getURL:function(e,t){var n=t.channels,i=void 0===n?[]:n,r=t.includeMessageActions,o=void 0!==r&&r,a=e.config,s=o?"history-with-actions":"history",l=i.length>0?i.join(","):",";return"/v3/".concat(s,"/sub-key/").concat(a.subscribeKey,"/channel/").concat(G.encodeString(l))},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=t.channels,i=t.start,r=t.end,o=t.includeMessageActions,a=t.count,s=t.stringifiedTimeToken,l=void 0!==s&&s,u=t.includeMeta,c=void 0!==u&&u,d=t.includeUuid,h=t.includeUUID,p=void 0===h||h,f=t.includeMessageType,g=void 0===f||f,m={};return m.max=a||(n.length>1||!0===o?25:100),i&&(m.start=i),r&&(m.end=r),l&&(m.string_message_token="true"),c&&(m.include_meta="true"),p&&!1!==d&&(m.include_uuid="true"),g&&(m.include_message_type="true"),m},handleResponse:function(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(i){n.channels[i]=[],(t.channels[i]||[]).forEach(function(t){var r={},o=function(e,t){var n={};if(!e.cryptoModule)return n.payload=t,n;try{var i=e.cryptoModule.decrypt(t),r=i instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(i)):i;return n.payload=r,n}catch(i){e.config.logVerbosity&&console&&console.log,n.payload=t,n.error="Error while decrypting message content: ".concat(i.message)}return n}(e,t.message);r.channel=i,r.timetoken=t.timetoken,r.message=o.payload,r.messageType=t.message_type,r.uuid=t.uuid,t.actions&&(r.actions=t.actions,r.data=t.actions),t.meta&&(r.meta=t.meta),o.error&&(r.error=o.error),n.channels[i].push(r)})}),t.more&&(n.more=t.more),n}}),Ye=Object.freeze({__proto__:null,getOperation:function(){return N.PNTimeOperation},getURL:function(){return"/time/0"},getRequestTimeout:function(e){return e.config.getTransactionTimeout()},prepareParams:function(){return{}},isAuthSupported:function(){return!1},handleResponse:function(e,t){return{timetoken:t[0]}},validateParams:function(){}}),Ke=Object.freeze({__proto__:null,getOperation:function(){return N.PNSubscribeOperation},validateParams:function(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(G.encodeString(o),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n=e.config,i=t.state,r=t.channelGroups,o=void 0===r?[]:r,a=t.timetoken,s=t.filterExpression,l=t.region,u={heartbeat:n.getPresenceTimeout()};return o.length>0&&(u["channel-group"]=o.join(",")),s&&s.length>0&&(u["filter-expr"]=s),Object.keys(i).length&&(u.state=JSON.stringify(i)),a&&(u.tt=a),l&&(u.tr=l),u},handleResponse:function(e,t){var n=[];t.m.forEach(function(e){var t={timetoken:e.p.t,region:e.p.r},i={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(i)});var i={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:i}}}),Xe={getOperation:function(){return N.PNHandshakeOperation},validateParams:function(e,t){if(!(null==t?void 0:t.channels)&&!(null==t?void 0:t.channelGroups))return"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(G.encodeString(o),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),n.tt=0,t.state&&(n.state=JSON.stringify(t.state)),t.filterExpression&&t.filterExpression.length>0&&(n["filter-expr"]=t.filterExpression),n.ee="",n},handleResponse:function(e,t){return{region:t.t.r,timetoken:t.t.t}}},Ze={getOperation:function(){return N.PNReceiveMessagesOperation},validateParams:function(e,t){return(null==t?void 0:t.channels)||(null==t?void 0:t.channelGroups)?(null==t?void 0:t.timetoken)?(null==t?void 0:t.region)?void 0:"region can not be empty":"timetoken can not be empty":"channels and channleGroups both should not be empty"},getURL:function(e,t){var n=e.config,i=t.channels,r=void 0===i?[]:i,o=r.length>0?r.join(","):",";return"/v2/subscribe/".concat(n.subscribeKey,"/").concat(G.encodeString(o),"/0")},getRequestTimeout:function(e){return e.config.getSubscribeTimeout()},isAuthSupported:function(){return!0},getAbortSignal:function(e,t){return t.abortSignal},prepareParams:function(e,t){var n={};return t.channelGroups&&t.channelGroups.length>0&&(n["channel-group"]=t.channelGroups.join(",")),t.filterExpression&&t.filterExpression.length>0&&(n["filter-expr"]=t.filterExpression),n.tt=t.timetoken,n.tr=t.region,n.ee="",n},handleResponse:function(e,t){var n=[];return t.m.forEach(function(e){var t={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,messageType:e.e,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:{timetoken:e.p.t,region:e.p.r}};n.push(t)}),{messages:n,metadata:{region:t.t.r,timetoken:t.t.t}}}},Je=function(){function e(e){void 0===e&&(e=!1),this.sync=e,this.listeners=new Set}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},e.prototype.notify=function(e){var t=this,n=function(){t.listeners.forEach(function(t){t(e)})};this.sync?n():setTimeout(n,0)},e}(),et=function(){function e(e){this.label=e,this.transitionMap=new Map,this.enterEffects=[],this.exitEffects=[]}return e.prototype.transition=function(e,t){var n;if(this.transitionMap.has(t.type))return null===(n=this.transitionMap.get(t.type))||void 0===n?void 0:n(e,t)},e.prototype.on=function(e,t){return this.transitionMap.set(e,t),this},e.prototype.with=function(e,t){return[this,e,null!=t?t:[]]},e.prototype.onEnter=function(e){return this.enterEffects.push(e),this},e.prototype.onExit=function(e){return this.exitEffects.push(e),this},e}(),tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.describe=function(e){return new et(e)},n.prototype.start=function(e,t){this.currentState=e,this.currentContext=t,this.notify({type:"engineStarted",state:e,context:t})},n.prototype.transition=function(e){var t,n,i,r,o,a;if(!this.currentState)throw new Error("Start the engine first");this.notify({type:"eventReceived",event:e});var u=this.currentState.transition(this.currentContext,e);if(u){var c=l(u,3),d=c[0],h=c[1],p=c[2];try{for(var f=s(this.currentState.exitEffects),g=f.next();!g.done;g=f.next()){var m=g.value;this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var y=this.currentState;this.currentState=d;var b=this.currentContext;this.currentContext=h,this.notify({type:"transitionDone",fromState:y,fromContext:b,toState:d,toContext:h,event:e});try{for(var v=s(p),w=v.next();!w.done;w=v.next())m=w.value,this.notify({type:"invocationDispatched",invocation:m})}catch(e){i={error:e}}finally{try{w&&!w.done&&(r=v.return)&&r.call(v)}finally{if(i)throw i.error}}try{for(var C=s(this.currentState.enterEffects),x=C.next();!x.done;x=C.next())m=x.value,this.notify({type:"invocationDispatched",invocation:m(this.currentContext)})}catch(e){o={error:e}}finally{try{x&&!x.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}}},n}(Je),nt=function(){function e(e){this.dependencies=e,this.instances=new Map,this.handlers=new Map}return e.prototype.on=function(e,t){this.handlers.set(e,t)},e.prototype.dispatch=function(e){if("CANCEL"!==e.type){var t=this.handlers.get(e.type);if(!t)throw new Error("Unhandled invocation '".concat(e.type,"'"));var n=t(e.payload,this.dependencies);e.managed&&this.instances.set(e.type,n),n.start()}else if(this.instances.has(e.payload)){var i=this.instances.get(e.payload);null==i||i.cancel(),this.instances.delete(e.payload)}},e.prototype.dispose=function(){var e,t;try{for(var n=s(this.instances.entries()),i=n.next();!i.done;i=n.next()){var r=l(i.value,2),o=r[0];r[1].cancel(),this.instances.delete(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e}();function it(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:null==t?void 0:t.apply(void 0,u([],l(n),!1))}};return n.type=e,n}function rt(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:t.apply(void 0,u([],l(n),!1)),managed:!1}};return n.type=e,n}function ot(e,t){var n=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return{type:e,payload:t.apply(void 0,u([],l(n),!1)),managed:!0}};return n.type=e,n.cancel={type:"CANCEL",payload:e,managed:!1},n}var at=function(e){function n(){var t=this.constructor,n=e.call(this,"The operation was aborted.")||this;return n.name="AbortError",Object.setPrototypeOf(n,t.prototype),n}return t(n,e),n}(Error),st=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._aborted=!1,t}return t(n,e),Object.defineProperty(n.prototype,"aborted",{get:function(){return this._aborted},enumerable:!1,configurable:!0}),n.prototype.throwIfAborted=function(){if(this._aborted)throw new at},n.prototype.abort=function(){this._aborted=!0,this.notify(new at)},n}(Je),lt=function(e){function n(t,n,i){var r=e.call(this,t,n)||this;return r.asyncFunction=i,r.abortSignal=new st,r}return t(n,e),n.prototype.start=function(){this.asyncFunction(this.payload,this.abortSignal,this.dependencies).catch(function(e){})},n.prototype.cancel=function(){this.abortSignal.abort()},n}(function(e,t){this.payload=e,this.dependencies=t}),ut=function(e){return function(t,n){return new lt(t,n,e)}},ct=ot("HANDSHAKE",function(e,t){return{channels:e,groups:t}}),dt=ot("RECEIVE_MESSAGES",function(e,t,n){return{channels:e,groups:t,cursor:n}}),ht=rt("EMIT_MESSAGES",function(e){return e}),pt=rt("EMIT_STATUS",function(e){return e}),ft=ot("RECEIVE_RECONNECT",function(e){return e}),gt=ot("HANDSHAKE_RECONNECT",function(e){return e}),mt=it("SUBSCRIPTION_CHANGED",function(e,t){return{channels:e,groups:t}}),yt=it("SUBSCRIPTION_RESTORED",function(e,t,n,i){return{channels:e,groups:t,cursor:{timetoken:n,region:null!=i?i:0}}}),bt=it("HANDSHAKE_SUCCESS",function(e){return e}),vt=it("HANDSHAKE_FAILURE",function(e){return e}),wt=it("HANDSHAKE_RECONNECT_SUCCESS",function(e){return{cursor:e}}),Ct=it("HANDSHAKE_RECONNECT_FAILURE",function(e){return e}),xt=it("HANDSHAKE_RECONNECT_GIVEUP",function(e){return e}),At=it("RECEIVE_SUCCESS",function(e,t){return{cursor:e,events:t}}),St=it("RECEIVE_FAILURE",function(e){return e}),Et=it("RECEIVE_RECONNECT_SUCCESS",function(e,t){return{cursor:e,events:t}}),kt=it("RECEIVE_RECONNECT_FAILURE",function(e){return e}),Tt=it("RECEIVING_RECONNECT_GIVEUP",function(e){return e}),_t=it("DISCONNECT",function(){return{}}),Ot=it("RECONNECT",function(e,t){return{cursor:{timetoken:null!=e?e:"",region:null!=t?t:0}}}),Pt=it("UNSUBSCRIBE_ALL",function(){return{}}),Mt=function(e){function n(t,n){var r=e.call(this,n)||this;return r.on(ct.type,ut(function(e,n,s){var l=s.handshake,u=s.presenceState,c=s.config;return o(r,void 0,void 0,function(){var r,o;return a(this,function(a){switch(a.label){case 0:n.throwIfAborted(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,l(i({abortSignal:n,channels:e.channels,channelGroups:e.groups,filterExpression:c.filterExpression},c.maintainPresenceState&&{state:u}))];case 2:return r=a.sent(),[2,t.transition(bt(r))];case 3:return(o=a.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof Q?[2,t.transition(vt(o))]:[3,4];case 4:return[2]}})})})),r.on(dt.type,ut(function(e,n,i){var s=i.receiveMessages,l=i.config;return o(r,void 0,void 0,function(){var i,r;return a(this,function(o){switch(o.label){case 0:n.throwIfAborted(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region,filterExpression:l.filterExpression})];case 2:return i=o.sent(),t.transition(At(i.metadata,i.messages)),[3,4];case 3:return(r=o.sent())instanceof Error&&"Aborted"===r.message?[2]:r instanceof Q&&!n.aborted?[2,t.transition(St(r))]:[3,4];case 4:return[2]}})})})),r.on(ht.type,ut(function(e,t,n){var i=n.emitMessages;return o(r,void 0,void 0,function(){return a(this,function(t){return e.length>0&&i(e),[2]})})})),r.on(pt.type,ut(function(e,t,n){var i=n.emitStatus;return o(r,void 0,void 0,function(){return a(this,function(t){return i(e),[2]})})})),r.on(ft.type,ut(function(e,n,i){var s=i.receiveMessages,l=i.delay,u=i.config;return o(r,void 0,void 0,function(){var i,r;return a(this,function(o){switch(o.label){case 0:return u.retryConfiguration&&u.retryConfiguration.shouldRetry(e.reason,e.attempts)?(n.throwIfAborted(),[4,l(u.retryConfiguration.getDelay(e.attempts,e.reason))]):[3,6];case 1:o.sent(),n.throwIfAborted(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,s({abortSignal:n,channels:e.channels,channelGroups:e.groups,timetoken:e.cursor.timetoken,region:e.cursor.region,filterExpression:u.filterExpression})];case 3:return i=o.sent(),[2,t.transition(Et(i.metadata,i.messages))];case 4:return(r=o.sent())instanceof Error&&"Aborted"===r.message?[2]:r instanceof Q?[2,t.transition(kt(r))]:[3,5];case 5:return[3,7];case 6:return[2,t.transition(Tt(new Q(u.retryConfiguration.getGiveupReason(e.reason,e.attempts))))];case 7:return[2]}})})})),r.on(gt.type,ut(function(e,n,s){var l=s.handshake,u=s.delay,c=s.presenceState,d=s.config;return o(r,void 0,void 0,function(){var r,o;return a(this,function(a){switch(a.label){case 0:return d.retryConfiguration&&d.retryConfiguration.shouldRetry(e.reason,e.attempts)?(n.throwIfAborted(),[4,u(d.retryConfiguration.getDelay(e.attempts,e.reason))]):[3,6];case 1:a.sent(),n.throwIfAborted(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,l(i({abortSignal:n,channels:e.channels,channelGroups:e.groups,filterExpression:d.filterExpression},d.maintainPresenceState&&{state:c}))];case 3:return r=a.sent(),[2,t.transition(wt(r))];case 4:return(o=a.sent())instanceof Error&&"Aborted"===o.message?[2]:o instanceof Q?[2,t.transition(Ct(o))]:[3,5];case 5:return[3,7];case 6:return[2,t.transition(xt(new Q(d.retryConfiguration.getGiveupReason(e.reason,e.attempts))))];case 7:return[2]}})})})),r}return t(n,e),n}(nt),It=new et("HANDSHAKE_FAILED");It.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),It.on(Ot.type,function(e,t){return jt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor||e.cursor})}),It.on(yt.type,function(e,t){var n,i;return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region?t.payload.cursor.region:null!==(i=null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)&&void 0!==i?i:0}})}),It.on(Pt.type,function(e){return Ft.with()});var Nt=new et("HANDSHAKE_STOPPED");Nt.on(mt.type,function(e,t){return Nt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Nt.on(Ot.type,function(e,t){return jt.with(i(i({},e),{cursor:t.payload.cursor||e.cursor}))}),Nt.on(yt.type,function(e,t){var n;return Nt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)||0}})}),Nt.on(Pt.type,function(e){return Ft.with()});var Dt=new et("RECEIVE_FAILED");Dt.on(Ot.type,function(e,t){var n;return jt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(n=t.payload.cursor)||void 0===n?void 0:n.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Dt.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Dt.on(yt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Dt.on(Pt.type,function(e){return Ft.with(void 0)});var Ut=new et("RECEIVE_STOPPED");Ut.on(mt.type,function(e,t){return Ut.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Ut.on(yt.type,function(e,t){return Ut.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Ut.on(Ot.type,function(e,t){var n;return jt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:t.payload.cursor.timetoken?null===(n=t.payload.cursor)||void 0===n?void 0:n.timetoken:e.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Ut.on(Pt.type,function(){return Ft.with(void 0)});var Lt=new et("RECEIVE_RECONNECTING");Lt.onEnter(function(e){return ft(e)}),Lt.onExit(function(){return ft.cancel}),Lt.on(Et.type,function(e,t){return Rt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[ht(t.payload.events)])}),Lt.on(kt.type,function(e,t){return Lt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))}),Lt.on(Tt.type,function(e,t){var n;return Dt.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[pt({category:M.PNDisconnectedUnexpectedlyCategory,error:null===(n=t.payload)||void 0===n?void 0:n.message})])}),Lt.on(_t.type,function(e){return Ut.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[pt({category:M.PNDisconnectedCategory})])}),Lt.on(yt.type,function(e,t){return Rt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Lt.on(mt.type,function(e,t){return Rt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Lt.on(Pt.type,function(e){return Ft.with(void 0,[pt({category:M.PNDisconnectedCategory})])});var Rt=new et("RECEIVING");Rt.onEnter(function(e){return dt(e.channels,e.groups,e.cursor)}),Rt.onExit(function(){return dt.cancel}),Rt.on(At.type,function(e,t){return Rt.with({channels:e.channels,groups:e.groups,cursor:t.payload.cursor},[ht(t.payload.events)])}),Rt.on(mt.type,function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Ft.with(void 0):Rt.with({cursor:e.cursor,channels:t.payload.channels,groups:t.payload.groups})}),Rt.on(yt.type,function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Ft.with(void 0):Rt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||e.cursor.region}})}),Rt.on(St.type,function(e,t){return Lt.with(i(i({},e),{attempts:0,reason:t.payload}))}),Rt.on(_t.type,function(e){return Ut.with({channels:e.channels,groups:e.groups,cursor:e.cursor},[pt({category:M.PNDisconnectedCategory})])}),Rt.on(Pt.type,function(e){return Ft.with(void 0,[pt({category:M.PNDisconnectedCategory})])});var Bt=new et("HANDSHAKE_RECONNECTING");Bt.onEnter(function(e){return gt(e)}),Bt.onExit(function(){return gt.cancel}),Bt.on(wt.type,function(e,t){var n,i,r={timetoken:(null===(n=e.cursor)||void 0===n?void 0:n.timetoken)?null===(i=e.cursor)||void 0===i?void 0:i.timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region};return Rt.with({channels:e.channels,groups:e.groups,cursor:r},[pt({category:M.PNConnectedCategory})])}),Bt.on(Ct.type,function(e,t){return Bt.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))}),Bt.on(xt.type,function(e,t){var n;return It.with({groups:e.groups,channels:e.channels,cursor:e.cursor,reason:t.payload},[pt({category:M.PNConnectionErrorCategory,error:null===(n=t.payload)||void 0===n?void 0:n.message})])}),Bt.on(_t.type,function(e){return Nt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}),Bt.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),Bt.on(yt.type,function(e,t){var n,i;return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:(null===(n=t.payload.cursor)||void 0===n?void 0:n.region)||(null===(i=null==e?void 0:e.cursor)||void 0===i?void 0:i.region)||0}})}),Bt.on(Pt.type,function(e){return Ft.with(void 0)});var jt=new et("HANDSHAKING");jt.onEnter(function(e){return ct(e.channels,e.groups)}),jt.onExit(function(){return ct.cancel}),jt.on(mt.type,function(e,t){return 0===t.payload.channels.length&&0===t.payload.groups.length?Ft.with(void 0):jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:e.cursor})}),jt.on(bt.type,function(e,t){var n,i;return Rt.with({channels:e.channels,groups:e.groups,cursor:{timetoken:(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.timetoken)?null===(i=null==e?void 0:e.cursor)||void 0===i?void 0:i.timetoken:t.payload.timetoken,region:t.payload.region}},[pt({category:M.PNConnectedCategory})])}),jt.on(vt.type,function(e,t){return Bt.with({channels:e.channels,groups:e.groups,cursor:e.cursor,attempts:0,reason:t.payload})}),jt.on(_t.type,function(e){return Nt.with({channels:e.channels,groups:e.groups,cursor:e.cursor})}),jt.on(yt.type,function(e,t){var n;return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:{timetoken:t.payload.cursor.timetoken,region:t.payload.cursor.region||(null===(n=null==e?void 0:e.cursor)||void 0===n?void 0:n.region)||0}})}),jt.on(Pt.type,function(e){return Ft.with()});var Ft=new et("UNSUBSCRIBED");Ft.on(mt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups})}),Ft.on(yt.type,function(e,t){return jt.with({channels:t.payload.channels,groups:t.payload.groups,cursor:t.payload.cursor})});var Ht=function(){function e(e){var t=this;this.engine=new tt,this.channels=[],this.groups=[],this.dependencies=e,this.dispatcher=new Mt(this.engine,e),this._unsubscribeEngine=this.engine.subscribe(function(e){"invocationDispatched"===e.type&&t.dispatcher.dispatch(e.invocation)}),this.engine.start(Ft,void 0)}return Object.defineProperty(e.prototype,"_engine",{get:function(){return this.engine},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){var t=this,n=e.channels,i=e.channelGroups,r=e.timetoken,o=e.withPresence;this.channels=u(u([],l(this.channels),!1),l(null!=n?n:[]),!1),this.groups=u(u([],l(this.groups),!1),l(null!=i?i:[]),!1),o&&(this.channels.map(function(e){return t.channels.push("".concat(e,"-pnpres"))}),this.groups.map(function(e){return t.groups.push("".concat(e,"-pnpres"))})),r?this.engine.transition(yt(Array.from(new Set(u(u([],l(this.channels),!1),l(null!=n?n:[]),!1))),Array.from(new Set(u(u([],l(this.groups),!1),l(null!=i?i:[]),!1))),r)):this.engine.transition(mt(Array.from(new Set(u(u([],l(this.channels),!1),l(null!=n?n:[]),!1))),Array.from(new Set(u(u([],l(this.groups),!1),l(null!=i?i:[]),!1))))),this.dependencies.join&&this.dependencies.join({channels:Array.from(new Set(this.channels.filter(function(e){return!e.endsWith("-pnpres")}))),groups:Array.from(new Set(this.groups.filter(function(e){return!e.endsWith("-pnpres")})))})},e.prototype.unsubscribe=function(e){var t=this,n=e.channels,i=void 0===n?[]:n,r=e.channelGroups,o=void 0===r?[]:r,a=G.removeSingleOccurance(this.channels,u(u([],l(i),!1),l(i.map(function(e){return"".concat(e,"-pnpres")})),!1)),s=G.removeSingleOccurance(this.groups,u(u([],l(o),!1),l(o.map(function(e){return"".concat(e,"-pnpres")})),!1));if(new Set(this.channels).size!==new Set(a).size||new Set(this.groups).size!==new Set(s).size){var c=G.findUniqueCommonElements(this.channels,i),d=G.findUniqueCommonElements(this.groups,o);this.dependencies.presenceState&&(null==c||c.forEach(function(e){return delete t.dependencies.presenceState[e]}),null==d||d.forEach(function(e){return delete t.dependencies.presenceState[e]})),this.channels=a,this.groups=s,this.engine.transition(mt(Array.from(new Set(this.channels.slice(0))),Array.from(new Set(this.groups.slice(0))))),this.dependencies.leave&&this.dependencies.leave({channels:c.slice(0),groups:d.slice(0)})}},e.prototype.unsubscribeAll=function(){this.channels=[],this.groups=[],this.dependencies.presenceState&&(this.dependencies.presenceState={}),this.engine.transition(mt(this.channels.slice(0),this.groups.slice(0))),this.dependencies.leaveAll&&this.dependencies.leaveAll()},e.prototype.reconnect=function(e){var t=e.timetoken,n=e.region;this.engine.transition(Ot(t,n))},e.prototype.disconnect=function(){this.engine.transition(_t()),this.dependencies.leaveAll&&this.dependencies.leaveAll()},e.prototype.getSubscribedChannels=function(){return Array.from(new Set(this.channels))},e.prototype.getSubscribedChannelGroups=function(){return Array.from(new Set(this.groups))},e.prototype.dispose=function(){this.disconnect(),this._unsubscribeEngine(),this.dispatcher.dispose()},e}(),$t=it("RECONNECT",function(){return{}}),zt=it("DISCONNECT",function(){return{}}),Gt=it("JOINED",function(e,t){return{channels:e,groups:t}}),Qt=it("LEFT",function(e,t){return{channels:e,groups:t}}),qt=it("LEFT_ALL",function(){return{}}),Wt=it("HEARTBEAT_SUCCESS",function(e){return{statusCode:e}}),Vt=it("HEARTBEAT_FAILURE",function(e){return e}),Yt=it("HEARTBEAT_GIVEUP",function(){return{}}),Kt=it("TIMES_UP",function(){return{}}),Xt=rt("HEARTBEAT",function(e,t){return{channels:e,groups:t}}),Zt=rt("LEAVE",function(e,t){return{channels:e,groups:t}}),Jt=rt("EMIT_STATUS",function(e){return e}),en=ot("WAIT",function(){return{}}),tn=ot("DELAYED_HEARTBEAT",function(e){return e}),nn=function(e){function n(t,n){var r=e.call(this,n)||this;return r.on(Xt.type,ut(function(e,n,s){var l=s.heartbeat,u=s.presenceState,c=s.config;return o(r,void 0,void 0,function(){var n;return a(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,l(i({channels:e.channels,channelGroups:e.groups},c.maintainPresenceState&&{state:u}))];case 1:return r.sent(),t.transition(Wt(200)),[3,3];case 2:return(n=r.sent())instanceof Q?[2,t.transition(Vt(n))]:[3,3];case 3:return[2]}})})})),r.on(Zt.type,ut(function(e,t,n){var i=n.leave,s=n.config;return o(r,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:if(s.suppressLeaveEvents)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i({channels:e.channels,channelGroups:e.groups})];case 2:case 3:return t.sent(),[3,4];case 4:return[2]}})})})),r.on(en.type,ut(function(e,n,i){var s=i.heartbeatDelay;return o(r,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return n.throwIfAborted(),[4,s()];case 1:return e.sent(),n.throwIfAborted(),[2,t.transition(Kt())]}})})})),r.on(tn.type,ut(function(e,n,s){var l=s.heartbeat,u=s.retryDelay,c=s.presenceState,d=s.config;return o(r,void 0,void 0,function(){var r;return a(this,function(o){switch(o.label){case 0:return d.retryConfiguration&&d.retryConfiguration.shouldRetry(e.reason,e.attempts)?(n.throwIfAborted(),[4,u(d.retryConfiguration.getDelay(e.attempts,e.reason))]):[3,6];case 1:o.sent(),n.throwIfAborted(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,l(i({channels:e.channels,channelGroups:e.groups},d.maintainPresenceState&&{state:c}))];case 3:return o.sent(),[2,t.transition(Wt(200))];case 4:return(r=o.sent())instanceof Error&&"Aborted"===r.message?[2]:r instanceof Q?[2,t.transition(Vt(r))]:[3,5];case 5:return[3,7];case 6:return[2,t.transition(Yt())];case 7:return[2]}})})})),r.on(Jt.type,ut(function(e,t,n){var s=n.emitStatus,l=n.config;return o(r,void 0,void 0,function(){var t;return a(this,function(n){return l.announceFailedHeartbeats&&!0===(null===(t=null==e?void 0:e.status)||void 0===t?void 0:t.error)?s(e.status):l.announceSuccessfulHeartbeats&&200===e.statusCode&&s(i(i({},e),{operation:N.PNHeartbeatOperation,error:!1})),[2]})})})),r}return t(n,e),n}(nt),rn=new et("HEARTBEAT_STOPPED");rn.on(Gt.type,function(e,t){return rn.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),rn.on(Qt.type,function(e,t){return rn.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})})}),rn.on($t.type,function(e,t){return ln.with({channels:e.channels,groups:e.groups})}),rn.on(qt.type,function(e,t){return un.with(void 0)});var on=new et("HEARTBEAT_COOLDOWN");on.onEnter(function(){return en()}),on.onExit(function(){return en.cancel}),on.on(Kt.type,function(e,t){return ln.with({channels:e.channels,groups:e.groups})}),on.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),on.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),on.on(zt.type,function(e){return rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),on.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var an=new et("HEARTBEAT_FAILED");an.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),an.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),an.on($t.type,function(e,t){return ln.with({channels:e.channels,groups:e.groups})}),an.on(zt.type,function(e,t){return rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),an.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var sn=new et("HEARBEAT_RECONNECTING");sn.onEnter(function(e){return tn(e)}),sn.onExit(function(){return tn.cancel}),sn.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),sn.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),sn.on(zt.type,function(e,t){rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),sn.on(Wt.type,function(e,t){return on.with({channels:e.channels,groups:e.groups})}),sn.on(Vt.type,function(e,t){return sn.with(i(i({},e),{attempts:e.attempts+1,reason:t.payload}))}),sn.on(Yt.type,function(e,t){return an.with({channels:e.channels,groups:e.groups})}),sn.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var ln=new et("HEARTBEATING");ln.onEnter(function(e){return Xt(e.channels,e.groups)}),ln.on(Wt.type,function(e,t){return on.with({channels:e.channels,groups:e.groups})}),ln.on(Gt.type,function(e,t){return ln.with({channels:u(u([],l(e.channels),!1),l(t.payload.channels),!1),groups:u(u([],l(e.groups),!1),l(t.payload.groups),!1)})}),ln.on(Qt.type,function(e,t){return ln.with({channels:e.channels.filter(function(e){return!t.payload.channels.includes(e)}),groups:e.groups.filter(function(e){return!t.payload.groups.includes(e)})},[Zt(t.payload.channels,t.payload.groups)])}),ln.on(Vt.type,function(e,t){return sn.with(i(i({},e),{attempts:0,reason:t.payload}))}),ln.on(zt.type,function(e){return rn.with({channels:e.channels,groups:e.groups},[Zt(e.channels,e.groups)])}),ln.on(qt.type,function(e,t){return un.with(void 0,[Zt(e.channels,e.groups)])});var un=new et("HEARTBEAT_INACTIVE");un.on(Gt.type,function(e,t){return ln.with({channels:t.payload.channels,groups:t.payload.groups})});var cn=function(){function e(e){var t=this;this.engine=new tt,this.channels=[],this.groups=[],this.dispatcher=new nn(this.engine,e),this.dependencies=e,this._unsubscribeEngine=this.engine.subscribe(function(e){"invocationDispatched"===e.type&&t.dispatcher.dispatch(e.invocation)}),this.engine.start(un,void 0)}return Object.defineProperty(e.prototype,"_engine",{get:function(){return this.engine},enumerable:!1,configurable:!0}),e.prototype.join=function(e){var t=e.channels,n=e.groups;this.channels=u(u([],l(this.channels),!1),l(null!=t?t:[]),!1),this.groups=u(u([],l(this.groups),!1),l(null!=n?n:[]),!1),this.engine.transition(Gt(this.channels.slice(0),this.groups.slice(0)))},e.prototype.leave=function(e){var t=this,n=e.channels,i=e.groups;this.dependencies.presenceState&&(null==n||n.forEach(function(e){return delete t.dependencies.presenceState[e]}),null==i||i.forEach(function(e){return delete t.dependencies.presenceState[e]})),this.engine.transition(Qt(null!=n?n:[],null!=i?i:[]))},e.prototype.leaveAll=function(){this.engine.transition(qt())},e.prototype.dispose=function(){this._unsubscribeEngine(),this.dispatcher.dispose()},e}(),dn=function(){function e(){}return e.LinearRetryPolicy=function(e){return{delay:e.delay,maximumRetry:e.maximumRetry,shouldRetry:function(e,t){var n;return 403!==(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)&&this.maximumRetry>t},getDelay:function(e,t){var n;return 1e3*((null!==(n=t.retryAfter)&&void 0!==n?n:this.delay)+Math.random())},getGiveupReason:function(e,t){var n;return this.maximumRetry<=t?"retry attempts exhaused.":403===(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)?"forbidden operation.":"unknown error"}}},e.ExponentialRetryPolicy=function(e){return{minimumDelay:e.minimumDelay,maximumDelay:e.maximumDelay,maximumRetry:e.maximumRetry,shouldRetry:function(e,t){var n;return 403!==(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)&&this.maximumRetry>t},getDelay:function(e,t){var n;return 1e3*((null!==(n=t.retryAfter)&&void 0!==n?n:Math.min(Math.pow(2,e),this.maximumDelay))+Math.random())},getGiveupReason:function(e,t){var n;return this.maximumRetry<=t?"retry attempts exhaused.":403===(null===(n=null==e?void 0:e.status)||void 0===n?void 0:n.statusCode)?"forbidden operation.":"unknown error"}}},e}(),hn=function(){function e(e){var t=e.modules,n=e.listenerManager,i=e.getFileUrl;this.modules=t,this.listenerManager=n,this.getFileUrl=i,this._channelListenerMap=new Map,this._groupListenerMap=new Map,t.cryptoModule&&(this._decoder=new TextDecoder)}return e.prototype.emitEvent=function(e){var t=e.channel,n=e.publishMetaData,o=e.subscriptionMatch;if(t===o&&(o=null),e.channel.endsWith("-pnpres")){var a={channel:null,subscription:null};t&&(a.channel=t.substring(0,t.lastIndexOf("-pnpres"))),o&&(a.subscription=o.substring(0,o.lastIndexOf("-pnpres"))),a.action=e.payload.action,a.state=e.payload.data,a.timetoken=n.timetoken,a.occupancy=e.payload.occupancy,a.uuid=e.payload.uuid,a.timestamp=e.payload.timestamp,e.payload.join&&(a.join=e.payload.join),e.payload.leave&&(a.leave=e.payload.leave),e.payload.timeout&&(a.timeout=e.payload.timeout),a.actualChannel=null!=o?t:null,a.subscribedChannel=null!=o?o:t,this.listenerManager.announcePresence(a),this._announce("presence",a,a.channel,a.subscription)}else if(1===e.messageType)(a={channel:null,subscription:null}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),a.message=e.payload,this.listenerManager.announceSignal(a),this._announce("signal",a,a.channel,a.subscription);else if(2===e.messageType){if((a={channel:null,subscription:null}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),a.message={event:e.payload.event,type:e.payload.type,data:e.payload.data},this.listenerManager.announceObjects(a),this._announce("objects",a,a.channel,a.subscription),"uuid"===e.payload.type){var s=this._renameChannelField(a),l=i(i({},s),{message:i(i({},s.message),{event:this._renameEvent(s.message.event),type:"user"})});this.listenerManager.announceUser(l),this._announce("user",l,a.channel,a.subscription)}else if("channel"===e.payload.type){s=this._renameChannelField(a);var u=i(i({},s),{message:i(i({},s.message),{event:this._renameEvent(s.message.event),type:"space"})});this.listenerManager.announceSpace(u),this._announce("space",u,a.channel,a.subscription)}else if("membership"===e.payload.type){var c=(s=this._renameChannelField(a)).message.data,d=c.uuid,h=c.channel,p=r(c,["uuid","channel"]);p.user=d,p.space=h;var f=i(i({},s),{message:i(i({},s.message),{event:this._renameEvent(s.message.event),data:p})});this.listenerManager.announceMembership(f),this._announce("membership",f,a.channel,a.subscription)}}else if(3===e.messageType)(a={}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,a.data={messageTimetoken:e.payload.data.messageTimetoken,actionTimetoken:e.payload.data.actionTimetoken,type:e.payload.data.type,uuid:e.issuingClientId,value:e.payload.data.value},a.event=e.payload.event,this.listenerManager.announceMessageAction(a),this._announce("messageAction",a,a.channel,a.subscription);else if(4===e.messageType){(a={}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId;var g=e.payload;if(this.modules.cryptoModule){var m=void 0;try{m=(y=this.modules.cryptoModule.decrypt(e.payload))instanceof ArrayBuffer?JSON.parse(this._decoder.decode(y)):y}catch(e){m=null,a.error="Error while decrypting message content: ".concat(e.message)}null!==m&&(g=m)}e.userMetadata&&(a.userMetadata=e.userMetadata),a.message=g.message,a.file={id:g.file.id,name:g.file.name,url:this.getFileUrl({id:g.file.id,name:g.file.name,channel:t})},this.listenerManager.announceFile(a),this._announce("file",a,a.channel,a.subscription)}else{if((a={channel:null,subscription:null}).channel=t,a.subscription=o,a.timetoken=n.timetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),this.modules.cryptoModule){m=void 0;try{var y;m=(y=this.modules.cryptoModule.decrypt(e.payload))instanceof ArrayBuffer?JSON.parse(this._decoder.decode(y)):y}catch(e){m=null,a.error="Error while decrypting message content: ".concat(e.message)}a.message=null!=m?m:e.payload}else a.message=e.payload;a.actualChannel=null!=o?t:null,a.subscribedChannel=null!=o?o:t,this.listenerManager.announceMessage(a),this._announce("message",a,a.channel,a.subscription)}},e.prototype.addListener=function(e,t,n){var i=this;t&&n?(null==t||t.forEach(function(t){i._channelListenerMap[t]?i._channelListenerMap[t].includes(e)||i._channelListenerMap[t].push(e):i._channelListenerMap[t]=[e]}),null==n||n.forEach(function(t){i._groupListenerMap[t]?i._groupListenerMap[t].includes(e)||i._groupListenerMap[t].push(e):i._groupListenerMap[t]=[e]})):this.listenerManager.addListener(e)},e.prototype.removeListener=function(e,t,n){var i=this;t&&n?(null==t||t.forEach(function(t){var n;i._channelListenerMap[t]=null===(n=i._channelListenerMap[t])||void 0===n?void 0:n.filter(function(t){return t!==e})}),null==n||n.forEach(function(t){var n;i._groupListenerMap[t]=null===(n=i._groupListenerMap[t])||void 0===n?void 0:n.filter(function(t){return t!==e})})):this.listenerManager.removeListener(e)},e.prototype.removeAllListeners=function(){this.listenerManager.removeAllListeners()},e.prototype._renameEvent=function(e){return"set"===e?"updated":"removed"},e.prototype._renameChannelField=function(e){var t=e.channel,n=r(e,["channel"]);return n.spaceId=t,n},e.prototype._announce=function(e,t,n,i){var r,o;null===(r=this._channelListenerMap[n])||void 0===r||r.forEach(function(n){return n[e]&&n[e](t)}),null===(o=this._groupListenerMap[i])||void 0===o||o.forEach(function(n){return n[e]&&n[e](t)})},e}(),pn=function(){function e(){}return e.prototype.subscribe=function(){var e,t;this.pubnub.subscribe(i({channels:this.channelNames,channelGroups:this.groupNames},(null===(t=null===(e=this.options)||void 0===e?void 0:e.cursor)||void 0===t?void 0:t.timetoken)&&{timetoken:this.options.cursor.timetoken}))},e.prototype.unsubscribe=function(){this.pubnub.unsubscribe({channels:this.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),channelGroups:this.groupNames.filter(function(e){return!e.endsWith("-pnpres")})})},Object.defineProperty(e.prototype,"onMessage",{set:function(e){this.listener.message=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onPresence",{set:function(e){this.listener.presence=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSignal",{set:function(e){this.listener.signal=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onObjects",{set:function(e){this.listener.objects=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMessageAction",{set:function(e){this.listener.messageAction=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onFile",{set:function(e){this.listener.file=e},enumerable:!1,configurable:!0}),e.prototype.addListener=function(e){this.eventEmitter.addListener(e,this.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),this.groupNames.filter(function(e){return!e.endsWith("-pnpres")}))},e.prototype.removeListener=function(e){this.eventEmitter.removeListener(e,this.channelNames,this.groupNames)},Object.defineProperty(e.prototype,"channels",{get:function(){return this.channelNames.slice(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelGroups",{get:function(){return this.groupNames.slice(0)},enumerable:!1,configurable:!0}),e}(),fn=function(e){function n(t){var n=t.channels,i=void 0===n?[]:n,r=t.channelGroups,o=void 0===r?[]:r,a=t.subscriptionOptions,s=t.eventEmitter,c=t.pubnub,d=e.call(this)||this;return d.channelNames=[],d.groupNames=[],d.subscriptionList=[],d.options=a,d.eventEmitter=s,d.pubnub=c,i.filter(function(e){return!e.endsWith("-pnpres")}).forEach(function(e){var t=d.pubnub.channel(e).subscription(d.options);d.channelNames=u(u([],l(d.channelNames),!1),l(t.channels),!1),d.subscriptionList.push(t)}),o.filter(function(e){return!e.endsWith("-pnpres")}).forEach(function(e){var t=d.pubnub.channelGroup(e).subscription(d.options);d.groupNames=u(u([],l(d.groupNames),!1),l(t.channelGroups),!1),d.subscriptionList.push(t)}),d.listener={},s.addListener(d.listener,d.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),d.groupNames.filter(function(e){return!e.endsWith("-pnpres")})),d}return t(n,e),n.prototype.addSubscription=function(e){this.subscriptionList.push(e),this.channelNames=u(u([],l(this.channelNames),!1),l(e.channels),!1),this.groupNames=u(u([],l(this.groupNames),!1),l(e.channelGroups),!1),this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)},n.prototype.removeSubscription=function(e){var t=e.channels,n=e.channelGroups;this.channelNames=this.channelNames.filter(function(e){return!t.includes(e)}),this.groupNames=this.groupNames.filter(function(e){return!n.includes(e)}),this.subscriptionList=this.subscriptionList.filter(function(t){return t!==e}),this.eventEmitter.removeListener(this.listener,t,n)},n.prototype.addSubscriptionSet=function(e){this.subscriptionList=u(u([],l(this.subscriptionList),!1),l(e.subscriptions),!1),this.channelNames=u(u([],l(this.channelNames),!1),l(e.channels),!1),this.groupNames=u(u([],l(this.groupNames),!1),l(e.channelGroups),!1),this.eventEmitter.addListener(this.listener,e.channels,e.channelGroups)},n.prototype.removeSubscriptionSet=function(e){var t=e.channels,n=e.channelGroups;this.channelNames=this.channelNames.filter(function(e){return!t.includes(e)}),this.groupNames=this.groupNames.filter(function(e){return!n.includes(e)}),this.subscriptionList=this.subscriptionList.filter(function(t){return!e.subscriptions.includes(t)}),this.eventEmitter.removeListener(this.listener,t,n)},Object.defineProperty(n.prototype,"subscriptions",{get:function(){return this.subscriptionList.slice(0)},enumerable:!1,configurable:!0}),n}(pn),gn=function(e){function n(t){var n=t.channels,i=t.channelGroups,r=t.subscriptionOptions,o=t.eventEmitter,a=t.pubnub,s=e.call(this)||this;return s.channelNames=[],s.groupNames=[],s.channelNames=n,s.groupNames=i,s.options=r,s.pubnub=a,s.eventEmitter=o,s.listener={},o.addListener(s.listener,s.channelNames.filter(function(e){return!e.endsWith("-pnpres")}),s.groupNames.filter(function(e){return!e.endsWith("-pnpres")})),s}return t(n,e),n.prototype.addSubscription=function(e){return new fn({channels:u(u([],l(this.channelNames),!1),l(e.channels),!1),channelGroups:u(u([],l(this.groupNames),!1),l(e.channelGroups),!1),subscriptionOptions:i(i({},this.options),null==e?void 0:e.options),eventEmitter:this.eventEmitter,pubnub:this.pubnub})},n}(pn),mn=function(){function e(e,t,n){this.name=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:(null==e?void 0:e.receivePresenceEvents)?[this.name,"".concat(this.name,"-pnpres")]:[this.name],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),yn=function(){function e(e,t,n){this.name=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:[],channelGroups:(null==e?void 0:e.receivePresenceEvents)?[this.name,"".concat(this.name,"-pnpres")]:[this.name],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),bn=function(){function e(e,t,n){this.id=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),vn=function(){function e(e,t,n){this.id=e,this.eventEmitter=t,this.pubnub=n}return e.prototype.subscription=function(e){return new gn({channels:[this.id],channelGroups:[],subscriptionOptions:e,eventEmitter:this.eventEmitter,pubnub:this.pubnub})},e}(),wn=function(){function e(e){var t=this,n=e.networking,r=e.cbor,o=new y({setup:e});this._config=o;var a=new _({config:o}),c=e.cryptography;n.init(o);var d=new H(o,r);this._tokenManager=d;var h=new D({maximumSamplesCount:6e4});this._telemetryManager=h;var p=this._config.cryptoModule,f={config:o,networking:n,crypto:a,cryptography:c,tokenManager:d,telemetryManager:h,PubNubFile:e.PubNubFile,cryptoModule:p};this.File=e.PubNubFile,this.encryptFile=function(e,t){return 1==arguments.length&&"string"!=typeof e&&f.cryptoModule?(t=e,f.cryptoModule.encryptFile(t,this.File)):c.encryptFile(e,t,this.File)},this.decryptFile=function(e,t){return 1==arguments.length&&"string"!=typeof e&&f.cryptoModule?(t=e,f.cryptoModule.decryptFile(t,this.File)):c.decryptFile(e,t,this.File)};var g=X.bind(this,f,Ye),m=X.bind(this,f,se),b=X.bind(this,f,ue),w=X.bind(this,f,de),C=X.bind(this,f,Ke),x=new F;if(this._listenerManager=x,this.iAmHere=X.bind(this,f,ue),this.iAmAway=X.bind(this,f,se),this.setPresenceState=X.bind(this,f,de),this.handshake=X.bind(this,f,Xe),this.receiveMessages=X.bind(this,f,Ze),this._eventEmitter=new hn({modules:f,listenerManager:this._listenerManager,getFileUrl:function(e){return we(f,e)}}),!0===o.enableEventEngine){if(o.maintainPresenceState&&(this.presenceState={},this.setState=function(e){var n,i;return null===(n=e.channels)||void 0===n||n.forEach(function(n){return t.presenceState[n]=e.state}),null===(i=e.channelGroups)||void 0===i||i.forEach(function(n){return t.presenceState[n]=e.state}),t.setPresenceState({channels:e.channels,channelGroups:e.channelGroups,state:t.presenceState})}),o.getHeartbeatInterval()){var A=new cn({heartbeat:this.iAmHere,leave:this.iAmAway,heartbeatDelay:function(){return new Promise(function(e){return setTimeout(e,1e3*f.config.getHeartbeatInterval())})},retryDelay:function(e){return new Promise(function(t){return setTimeout(t,e)})},config:f.config,presenceState:this.presenceState,emitStatus:function(e){x.announceStatus(e)}});this.presenceEventEngine=A,this.join=this.presenceEventEngine.join.bind(A),this.leave=this.presenceEventEngine.leave.bind(A),this.leaveAll=this.presenceEventEngine.leaveAll.bind(A)}var S=new Ht({handshake:this.handshake,receiveMessages:this.receiveMessages,delay:function(e){return new Promise(function(t){return setTimeout(t,e)})},join:this.join,leave:this.leave,leaveAll:this.leaveAll,presenceState:this.presenceState,config:f.config,emitMessages:function(e){var n,i;try{for(var r=s(e),o=r.next();!o.done;o=r.next()){var a=o.value;t._eventEmitter.emitEvent(a)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},emitStatus:function(e){x.announceStatus(e)}});this.subscribe=S.subscribe.bind(S),this.unsubscribe=S.unsubscribe.bind(S),this.unsubscribeAll=S.unsubscribeAll.bind(S),this.reconnect=S.reconnect.bind(S),this.disconnect=S.disconnect.bind(S),this.destroy=S.dispose.bind(S),this.getSubscribedChannels=S.getSubscribedChannels.bind(S),this.getSubscribedChannelGroups=S.getSubscribedChannelGroups.bind(S),this.eventEngine=S}else{var E=new I({timeEndpoint:g,leaveEndpoint:m,heartbeatEndpoint:b,setStateEndpoint:w,subscribeEndpoint:C,crypto:f.crypto,config:f.config,listenerManager:x,getFileUrl:function(e){return we(f,e)},cryptoModule:f.cryptoModule,eventEmitter:this._eventEmitter});this.subscribe=E.adaptSubscribeChange.bind(E),this.unsubscribe=E.adaptUnsubscribeChange.bind(E),this.disconnect=E.disconnect.bind(E),this.reconnect=E.reconnect.bind(E),this.unsubscribeAll=E.unsubscribeAll.bind(E),this.getSubscribedChannels=E.getSubscribedChannels.bind(E),this.getSubscribedChannelGroups=E.getSubscribedChannelGroups.bind(E),this.setState=E.adaptStateChange.bind(E),this.presence=E.adaptPresenceChange.bind(E),this.destroy=function(e){E.unsubscribeAll(e),E.disconnect()}}this.addListener=this._eventEmitter.addListener.bind(this._eventEmitter),this.removeListener=this._eventEmitter.removeListener.bind(this._eventEmitter),this.removeAllListeners=this._eventEmitter.removeAllListeners.bind(this._eventEmitter),this.parseToken=d.parseToken.bind(d),this.setToken=d.setToken.bind(d),this.getToken=d.getToken.bind(d),this.channelGroups={listGroups:X.bind(this,f,te),listChannels:X.bind(this,f,ne),addChannels:X.bind(this,f,Z),removeChannels:X.bind(this,f,J),deleteGroup:X.bind(this,f,ee)},this.push={addChannels:X.bind(this,f,ie),removeChannels:X.bind(this,f,re),deleteDevice:X.bind(this,f,ae),listChannels:X.bind(this,f,oe)},this.hereNow=X.bind(this,f,he),this.whereNow=X.bind(this,f,le),this.getState=X.bind(this,f,ce),this.grant=X.bind(this,f,Le),this.grantToken=X.bind(this,f,Fe),this.audit=X.bind(this,f,Ue),this.revokeToken=X.bind(this,f,He),this.publish=X.bind(this,f,ze),this.fire=function(e,n){return e.replicate=!1,e.storeInHistory=!1,t.publish(e,n)},this.signal=X.bind(this,f,Ge),this.history=X.bind(this,f,Qe),this.deleteMessages=X.bind(this,f,qe),this.messageCounts=X.bind(this,f,We),this.fetchMessages=X.bind(this,f,Ve),this.addMessageAction=X.bind(this,f,pe),this.removeMessageAction=X.bind(this,f,fe),this.getMessageActions=X.bind(this,f,ge),this.listFiles=X.bind(this,f,me);var k=X.bind(this,f,ye);this.publishFile=X.bind(this,f,be),this.sendFile=ve({generateUploadUrl:k,publishFile:this.publishFile,modules:f}),this.getFileUrl=function(e){return we(f,e)},this.downloadFile=X.bind(this,f,Ce),this.deleteFile=X.bind(this,f,xe),this.channel=function(e){return new mn(e,t._eventEmitter,t)},this.channelGroup=function(e){return new yn(e,t._eventEmitter,t)},this.channelMetadata=function(e){return new bn(e,t._eventEmitter,t)},this.userMetadata=function(e){return new vn(e,t._eventEmitter,t)},this.subscriptionSet=function(e){return new fn({channels:e.channels,channelGroups:e.channelGroups,subscriptionOptions:e.subscriptionOptions,eventEmitter:t._eventEmitter,pubnub:t})},this.objects={getAllUUIDMetadata:X.bind(this,f,Ae),getUUIDMetadata:X.bind(this,f,Se),setUUIDMetadata:X.bind(this,f,Ee),removeUUIDMetadata:X.bind(this,f,ke),getAllChannelMetadata:X.bind(this,f,Te),getChannelMetadata:X.bind(this,f,_e),setChannelMetadata:X.bind(this,f,Oe),removeChannelMetadata:X.bind(this,f,Pe),getChannelMembers:X.bind(this,f,Me),setChannelMembers:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,Ie,i({type:"set"},e)],l(n),!1))},removeChannelMembers:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,Ie,i({type:"delete"},e)],l(n),!1))},getMemberships:X.bind(this,f,Ne),setMemberships:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,De,i({type:"set"},e)],l(n),!1))},removeMemberships:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return X.call.apply(X,u([t,f,De,i({type:"delete"},e)],l(n),!1))}},this.createUser=function(e){return t.objects.setUUIDMetadata({uuid:e.userId,data:e.data,include:e.include})},this.updateUser=this.createUser,this.removeUser=function(e){return t.objects.removeUUIDMetadata({uuid:null==e?void 0:e.userId})},this.fetchUser=function(e){return t.objects.getUUIDMetadata({uuid:null==e?void 0:e.userId,include:null==e?void 0:e.include})},this.fetchUsers=this.objects.getAllUUIDMetadata,this.createSpace=function(e){return t.objects.setChannelMetadata({channel:e.spaceId,data:e.data,include:e.include})},this.updateSpace=this.createSpace,this.removeSpace=function(e){return t.objects.removeChannelMetadata({channel:e.spaceId})},this.fetchSpace=function(e){return t.objects.getChannelMetadata({channel:e.spaceId,include:e.include})},this.fetchSpaces=this.objects.getAllChannelMetadata,this.addMemberships=function(e){var n,i;return"string"==typeof e.spaceId?t.objects.setChannelMembers({channel:e.spaceId,uuids:null===(n=e.users)||void 0===n?void 0:n.map(function(e){return"string"==typeof e?e:{id:e.userId,custom:e.custom,status:e.status}}),limit:0}):t.objects.setMemberships({uuid:e.userId,channels:null===(i=e.spaces)||void 0===i?void 0:i.map(function(e){return"string"==typeof e?e:{id:e.spaceId,custom:e.custom,status:e.status}}),limit:0})},this.updateMemberships=this.addMemberships,this.removeMemberships=function(e){return"string"==typeof e.spaceId?t.objects.removeChannelMembers({channel:e.spaceId,uuids:e.userIds,limit:0}):t.objects.removeMemberships({uuid:e.userId,channels:e.spaceIds,limit:0})},this.fetchMemberships=function(e){return"string"==typeof e.spaceId?t.objects.getChannelMembers({channel:e.spaceId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,UUIDFields:e.include.userFields,customUUIDFields:e.include.customUserFields,statusField:e.include.statusField,UUIDStatusField:e.include.userStatusField,UUIDTypeField:e.include.userTypeField,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map(function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("user","uuid"),i]})):null}).then(function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map(function(e){return{user:e.uuid,custom:e.custom,updated:e.updated,eTag:e.eTag}}),e}):t.objects.getMemberships({uuid:e.userId,filter:e.filter,limit:e.limit,page:e.page,include:{customFields:e.include.customFields,channelFields:e.include.spaceFields,customChannelFields:e.include.customSpaceFields,statusField:e.include.statusField,channelStatusField:e.include.spaceStatusField,channelTypeField:e.include.spaceTypeField,totalCount:e.include.totalCount},sort:null!=e.sort?Object.fromEntries(Object.entries(e.sort).map(function(e){var t=l(e,2),n=t[0],i=t[1];return[n.replace("space","channel"),i]})):null}).then(function(e){var t;return e.data=null===(t=e.data)||void 0===t?void 0:t.map(function(e){return{space:e.channel,custom:e.custom,updated:e.updated,eTag:e.eTag}}),e})},this.time=g,this.stop=this.destroy,this.encrypt=function(e,t){if(void 0===t&&f.cryptoModule){var n=f.cryptoModule.encrypt(e);return"string"==typeof n?n:v(n)}return a.encrypt(e,t)},this.decrypt=function(e,t){if(void 0===t&&p){var n=f.cryptoModule.decrypt(e);return n instanceof ArrayBuffer?JSON.parse((new TextDecoder).decode(n)):n}return a.decrypt(e,t)},this.getAuthKey=f.config.getAuthKey.bind(f.config),this.setAuthKey=f.config.setAuthKey.bind(f.config),this.getUUID=f.config.getUUID.bind(f.config),this.setUUID=f.config.setUUID.bind(f.config),this.getUserId=f.config.getUserId.bind(f.config),this.setUserId=f.config.setUserId.bind(f.config),this.getFilterExpression=f.config.getFilterExpression.bind(f.config),this.setFilterExpression=f.config.setFilterExpression.bind(f.config),this.setCipherKey=function(t){return f.config.setCipherKey(t,e,f)},this.setHeartbeatInterval=f.config.setHeartbeatInterval.bind(f.config),n.hasModule("proxy")&&(this.setProxy=function(e){f.config.setProxy(e),t.reconnect()})}return e.prototype.getVersion=function(){return this._config.getVersion()},e.prototype._addPnsdkSuffix=function(e,t){this._config._addPnsdkSuffix(e,t)},e.prototype.networkDownDetected=function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)},e.prototype.networkUpDetected=function(){this._listenerManager.announceNetworkUp(),this.reconnect()},e.notificationPayload=function(e,t){return new j(e,t)},e.generateUUID=function(){return m()},e.OPERATIONS=N,e.CATEGORIES=M,e.LinearRetryPolicy=dn.LinearRetryPolicy,e.ExponentialRetryPolicy=dn.ExponentialRetryPolicy,e}(),Cn=function(){function e(e){var t=this;this._modules={},Object.keys(e).forEach(function(n){t._modules[n]=e[n].bind(t)})}return e.prototype.init=function(e){this._config=e,Array.isArray(this._config.origin)?this._currentSubDomain=Math.floor(Math.random()*this._config.origin.length):this._currentSubDomain=0,this._coreParams={},this.shiftStandardOrigin()},e.prototype.nextOrigin=function(){var e=this._config.secure?"https://":"http://";if("string"==typeof this._config.origin)return"".concat(e).concat(this._config.origin);this._currentSubDomain+=1,this._currentSubDomain>=this._config.origin.length&&(this._currentSubDomain=0);var t=this._config.origin[this._currentSubDomain];return"".concat(e).concat(t)},e.prototype.hasModule=function(e){return e in this._modules},e.prototype.shiftStandardOrigin=function(){return this._standardOrigin=this.nextOrigin(),this._standardOrigin},e.prototype.getStandardOrigin=function(){return this._standardOrigin},e.prototype.POSTFILE=function(e,t,n){return this._modules.postfile(e,t,n)},e.prototype.GETFILE=function(e,t,n){return this._modules.getfile(e,t,n)},e.prototype.POST=function(e,t,n,i){return this._modules.post(e,t,n,i)},e.prototype.PATCH=function(e,t,n,i){return this._modules.patch(e,t,n,i)},e.prototype.GET=function(e,t,n){return this._modules.get(e,t,n)},e.prototype.DELETE=function(e,t,n){return this._modules.del(e,t,n)},e.prototype._detectErrorCategory=function(e){if("ENOTFOUND"===e.code)return M.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return M.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return M.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return M.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return M.PNNetworkIssuesCategory;if(e.timeout)return M.PNTimeoutCategory;if("ETIMEDOUT"===e.code)return M.PNNetworkIssuesCategory;if(e.response){if(e.response.badRequest)return M.PNBadRequestCategory;if(e.response.forbidden)return M.PNAccessDeniedCategory}return M.PNUnknownCategory},e}();function xn(e){var t=function(e){return e&&"object"==typeof e&&e.constructor===Object};if(!t(e))return e;var n={};return Object.keys(e).forEach(function(i){var r=function(e){return"string"==typeof e||e instanceof String}(i),o=i,a=e[i];Array.isArray(i)||r&&i.indexOf(",")>=0?o=(r?i.split(","):i).reduce(function(e,t){return e+String.fromCharCode(t)},""):(function(e){return"number"==typeof e&&isFinite(e)}(i)||r&&!isNaN(i))&&(o=String.fromCharCode(r?parseInt(i,10):10)),n[o]=t(a)?xn(a):a}),n}var An=function(){function e(e,t){this._base64ToBinary=t,this._decode=e}return e.prototype.decodeToken=function(e){var t="";e.length%4==3?t="=":e.length%4==2&&(t="==");var n=e.replace(/-/gi,"+").replace(/_/gi,"/")+t,i=this._decode(this._base64ToBinary(n));if("object"==typeof i)return i},e}(),Sn={exports:{}},En={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<i.length;r++)if((n=i[r])===t||n.fn===t){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var r=(n=n.slice(0)).length;i<r;++i)n[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(En);var kn=In;In.default=In,In.stable=Ln,In.stableStringify=Ln;var Tn="[...]",_n="[Circular]",On=[],Pn=[];function Mn(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function In(e,t,n,i){var r;void 0===i&&(i=Mn()),Dn(e,"",0,[],void 0,0,i);try{r=0===Pn.length?JSON.stringify(e,t,n):JSON.stringify(e,Bn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==On.length;){var o=On.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return r}function Nn(e,t,n,i){var r=Object.getOwnPropertyDescriptor(i,n);void 0!==r.get?r.configurable?(Object.defineProperty(i,n,{value:e}),On.push([i,n,t,r])):Pn.push([t,n,e]):(i[n]=e,On.push([i,n,t]))}function Dn(e,t,n,i,r,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Nn(_n,e,t,r);if(void 0!==a.depthLimit&&o>a.depthLimit)return void Nn(Tn,e,t,r);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Nn(Tn,e,t,r);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)Dn(e[s],s,s,i,e,o,a);else{var l=Object.keys(e);for(s=0;s<l.length;s++){var u=l[s];Dn(e[u],u,s,i,e,o,a)}}i.pop()}}function Un(e,t){return e<t?-1:e>t?1:0}function Ln(e,t,n,i){void 0===i&&(i=Mn());var r,o=Rn(e,"",0,[],void 0,0,i)||e;try{r=0===Pn.length?JSON.stringify(o,t,n):JSON.stringify(o,Bn(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==On.length;){var a=On.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return r}function Rn(e,t,n,i,r,o,a){var s;if(o+=1,"object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e)return void Nn(_n,e,t,r);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==a.depthLimit&&o>a.depthLimit)return void Nn(Tn,e,t,r);if(void 0!==a.edgesLimit&&n+1>a.edgesLimit)return void Nn(Tn,e,t,r);if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)Rn(e[s],s,s,i,e,o,a);else{var l={},u=Object.keys(e).sort(Un);for(s=0;s<u.length;s++){var c=u[s];Rn(e[c],c,s,i,e,o,a),l[c]=e[c]}if(void 0===r)return l;On.push([r,t,e]),r[t]=l}i.pop()}}function Bn(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(Pn.length>0)for(var i=0;i<Pn.length;i++){var r=Pn[i];if(r[1]===t&&r[0]===n){n=r[2],Pn.splice(i,1);break}}return e.call(this,t,n)}}var jn,Fn="undefined"!=typeof Symbol&&Symbol,Hn=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0},$n="Function.prototype.bind called on incompatible ",zn=Array.prototype.slice,Gn=Object.prototype.toString,Qn="[object Function]",qn=function(e){var t=this;if("function"!=typeof t||Gn.call(t)!==Qn)throw new TypeError($n+t);for(var n,i=zn.call(arguments,1),r=function(){if(this instanceof n){var r=t.apply(this,i.concat(zn.call(arguments)));return Object(r)===r?r:this}return t.apply(e,i.concat(zn.call(arguments)))},o=Math.max(0,t.length-i.length),a=[],s=0;s<o;s++)a.push("$"+s);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n},Wn=Function.prototype.bind||qn,Vn=Wn.call(Function.call,Object.prototype.hasOwnProperty),Yn=SyntaxError,Kn=Function,Xn=TypeError,Zn=function(e){try{return Kn('"use strict"; return ('+e+").constructor;")()}catch(e){}},Jn=Object.getOwnPropertyDescriptor;if(Jn)try{Jn({},"")}catch(e){Jn=null}var ei=function(){throw new Xn},ti=Jn?function(){try{return ei}catch(e){try{return Jn(arguments,"callee").get}catch(e){return ei}}}():ei,ni="function"==typeof Fn&&"function"==typeof Symbol&&"symbol"==typeof Fn("foo")&&"symbol"==typeof Symbol("bar")&&Hn(),ii=Object.getPrototypeOf||function(e){return e.__proto__},ri={},oi="undefined"==typeof Uint8Array?jn:ii(Uint8Array),ai={"%AggregateError%":"undefined"==typeof AggregateError?jn:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?jn:ArrayBuffer,"%ArrayIteratorPrototype%":ni?ii([][Symbol.iterator]()):jn,"%AsyncFromSyncIteratorPrototype%":jn,"%AsyncFunction%":ri,"%AsyncGenerator%":ri,"%AsyncGeneratorFunction%":ri,"%AsyncIteratorPrototype%":ri,"%Atomics%":"undefined"==typeof Atomics?jn:Atomics,"%BigInt%":"undefined"==typeof BigInt?jn:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?jn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?jn:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?jn:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?jn:FinalizationRegistry,"%Function%":Kn,"%GeneratorFunction%":ri,"%Int8Array%":"undefined"==typeof Int8Array?jn:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?jn:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?jn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ni?ii(ii([][Symbol.iterator]())):jn,"%JSON%":"object"==typeof JSON?JSON:jn,"%Map%":"undefined"==typeof Map?jn:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ni?ii((new Map)[Symbol.iterator]()):jn,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?jn:Promise,"%Proxy%":"undefined"==typeof Proxy?jn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?jn:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?jn:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ni?ii((new Set)[Symbol.iterator]()):jn,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?jn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ni?ii(""[Symbol.iterator]()):jn,"%Symbol%":ni?Symbol:jn,"%SyntaxError%":Yn,"%ThrowTypeError%":ti,"%TypedArray%":oi,"%TypeError%":Xn,"%Uint8Array%":"undefined"==typeof Uint8Array?jn:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?jn:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?jn:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?jn:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?jn:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?jn:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?jn:WeakSet},si=function e(t){var n;if("%AsyncFunction%"===t)n=Zn("async function () {}");else if("%GeneratorFunction%"===t)n=Zn("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=Zn("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var r=e("%AsyncGenerator%");r&&(n=ii(r.prototype))}return ai[t]=n,n},li={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ui=Wn,ci=Vn,di=ui.call(Function.call,Array.prototype.concat),hi=ui.call(Function.apply,Array.prototype.splice),pi=ui.call(Function.call,String.prototype.replace),fi=ui.call(Function.call,String.prototype.slice),gi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mi=/\\(\\)?/g,yi=function(e){var t=fi(e,0,1),n=fi(e,-1);if("%"===t&&"%"!==n)throw new Yn("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Yn("invalid intrinsic syntax, expected opening `%`");var i=[];return pi(e,gi,function(e,t,n,r){i[i.length]=n?pi(r,mi,"$1"):t||e}),i},bi=function(e,t){var n,i=e;if(ci(li,i)&&(i="%"+(n=li[i])[0]+"%"),ci(ai,i)){var r=ai[i];if(r===ri&&(r=si(i)),void 0===r&&!t)throw new Xn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new Yn("intrinsic "+e+" does not exist!")},vi=function(e,t){if("string"!=typeof e||0===e.length)throw new Xn("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Xn('"allowMissing" argument must be a boolean');var n=yi(e),i=n.length>0?n[0]:"",r=bi("%"+i+"%",t),o=r.name,a=r.value,s=!1,l=r.alias;l&&(i=l[0],hi(n,di([0,1],l)));for(var u=1,c=!0;u<n.length;u+=1){var d=n[u],h=fi(d,0,1),p=fi(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===p||"'"===p||"`"===p)&&h!==p)throw new Yn("property names with quotes must have matching quotes");if("constructor"!==d&&c||(s=!0),ci(ai,o="%"+(i+="."+d)+"%"))a=ai[o];else if(null!=a){if(!(d in a)){if(!t)throw new Xn("base intrinsic for "+e+" exists, but the property is not available.");return}if(Jn&&u+1>=n.length){var f=Jn(a,d);a=(c=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:a[d]}else c=ci(a,d),a=a[d];c&&!s&&(ai[o]=a)}}return a},wi={exports:{}};!function(e){var t=Wn,n=vi,i=n("%Function.prototype.apply%"),r=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(r,i),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var n=o(t,r,arguments);return a&&s&&a(n,"length").configurable&&s(n,"length",{value:1+l(0,e.length-(arguments.length-1))}),n};var u=function(){return o(t,i,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u}(wi);var Ci=vi,xi=wi.exports,Ai=xi(Ci("String.prototype.indexOf")),Si=d(Object.freeze({__proto__:null,default:{}})),Ei="function"==typeof Map&&Map.prototype,ki=Object.getOwnPropertyDescriptor&&Ei?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ti=Ei&&ki&&"function"==typeof ki.get?ki.get:null,_i=Ei&&Map.prototype.forEach,Oi="function"==typeof Set&&Set.prototype,Pi=Object.getOwnPropertyDescriptor&&Oi?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mi=Oi&&Pi&&"function"==typeof Pi.get?Pi.get:null,Ii=Oi&&Set.prototype.forEach,Ni="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Di="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ui="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Li=Boolean.prototype.valueOf,Ri=Object.prototype.toString,Bi=Function.prototype.toString,ji=String.prototype.match,Fi=String.prototype.slice,Hi=String.prototype.replace,$i=String.prototype.toUpperCase,zi=String.prototype.toLowerCase,Gi=RegExp.prototype.test,Qi=Array.prototype.concat,qi=Array.prototype.join,Wi=Array.prototype.slice,Vi=Math.floor,Yi="function"==typeof BigInt?BigInt.prototype.valueOf:null,Ki=Object.getOwnPropertySymbols,Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Zi="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Ji="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,er=Object.prototype.propertyIsEnumerable,tr=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function nr(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Gi.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var i=e<0?-Vi(-e):Vi(e);if(i!==e){var r=String(i),o=Fi.call(t,r.length+1);return Hi.call(r,n,"$&_")+"."+Hi.call(Hi.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Hi.call(t,n,"$&_")}var ir=Si,rr=ir.custom,or=cr(rr)?rr:null;function ar(e,t,n){var i="double"===(n.quoteStyle||t)?'"':"'";return i+e+i}function sr(e){return Hi.call(String(e),/"/g,""")}function lr(e){return!("[object Array]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}function ur(e){return!("[object RegExp]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}function cr(e){if(Zi)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Xi)return!1;try{return Xi.call(e),!0}catch(e){}return!1}var dr=Object.prototype.hasOwnProperty||function(e){return e in this};function hr(e,t){return dr.call(e,t)}function pr(e){return Ri.call(e)}function fr(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}function gr(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return gr(Fi.call(e,0,t.maxStringLength),t)+i}return ar(Hi.call(Hi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,mr),"single",t)}function mr(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+$i.call(t.toString(16))}function yr(e){return"Object("+e+")"}function br(e){return e+" { ? }"}function vr(e,t,n,i){return e+" ("+t+") {"+(i?wr(n,i):qi.call(n,", "))+"}"}function wr(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+qi.call(e,","+n)+"\n"+t.prev}function Cr(e,t){var n=lr(e),i=[];if(n){i.length=e.length;for(var r=0;r<e.length;r++)i[r]=hr(e,r)?t(e[r],e):""}var o,a="function"==typeof Ki?Ki(e):[];if(Zi){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)hr(e,l)&&(n&&String(Number(l))===l&&l<e.length||Zi&&o["$"+l]instanceof Symbol||(Gi.call(/[^\w$]/,l)?i.push(t(l,e)+": "+t(e[l],e)):i.push(l+": "+t(e[l],e))));if("function"==typeof Ki)for(var u=0;u<a.length;u++)er.call(e,a[u])&&i.push("["+t(a[u])+"]: "+t(e[a[u]],e));return i}var xr=vi,Ar=function(e,t){var n=Ci(e,!!t);return"function"==typeof n&&Ai(e,".prototype.")>-1?xi(n):n},Sr=function e(t,n,i,r){var o=n||{};if(hr(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(hr(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!hr(o,"customInspect")||o.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(hr(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(hr(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return gr(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?nr(t,l):l}if("bigint"==typeof t){var u=String(t)+"n";return s?nr(t,u):u}var d=void 0===o.depth?5:o.depth;if(void 0===i&&(i=0),i>=d&&d>0&&"object"==typeof t)return lr(t)?"[Array]":"[Object]";var h=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=qi.call(Array(e.indent+1)," ")}return{base:n,prev:qi.call(Array(t+1),n)}}(o,i);if(void 0===r)r=[];else if(fr(r,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(r=Wi.call(r)).push(n),a){var s={depth:o.depth};return hr(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),e(t,s,i+1,r)}return e(t,o,i+1,r)}if("function"==typeof t&&!ur(t)){var f=function(e){if(e.name)return e.name;var t=ji.call(Bi.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),g=Cr(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(g.length>0?" { "+qi.call(g,", ")+" }":"")}if(cr(t)){var m=Zi?Hi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Xi.call(t);return"object"!=typeof t||Zi?m:yr(m)}if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var y="<"+zi.call(String(t.nodeName)),b=t.attributes||[],v=0;v<b.length;v++)y+=" "+b[v].name+"="+ar(sr(b[v].value),"double",o);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+"</"+zi.call(String(t.nodeName))+">"}if(lr(t)){if(0===t.length)return"[]";var w=Cr(t,p);return h&&!function(e){for(var t=0;t<e.length;t++)if(fr(e[t],"\n")>=0)return!1;return!0}(w)?"["+wr(w,h)+"]":"[ "+qi.call(w,", ")+" ]"}if(function(e){return!("[object Error]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t)){var C=Cr(t,p);return"cause"in Error.prototype||!("cause"in t)||er.call(t,"cause")?0===C.length?"["+String(t)+"]":"{ ["+String(t)+"] "+qi.call(C,", ")+" }":"{ ["+String(t)+"] "+qi.call(Qi.call("[cause]: "+p(t.cause),C),", ")+" }"}if("object"==typeof t&&a){if(or&&"function"==typeof t[or]&&ir)return ir(t,{depth:d-i});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Ti||!e||"object"!=typeof e)return!1;try{Ti.call(e);try{Mi.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var x=[];return _i&&_i.call(t,function(e,n){x.push(p(n,t,!0)+" => "+p(e,t))}),vr("Map",Ti.call(t),x,h)}if(function(e){if(!Mi||!e||"object"!=typeof e)return!1;try{Mi.call(e);try{Ti.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var A=[];return Ii&&Ii.call(t,function(e){A.push(p(e,t))}),vr("Set",Mi.call(t),A,h)}if(function(e){if(!Ni||!e||"object"!=typeof e)return!1;try{Ni.call(e,Ni);try{Di.call(e,Di)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return br("WeakMap");if(function(e){if(!Di||!e||"object"!=typeof e)return!1;try{Di.call(e,Di);try{Ni.call(e,Ni)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return br("WeakSet");if(function(e){if(!Ui||!e||"object"!=typeof e)return!1;try{return Ui.call(e),!0}catch(e){}return!1}(t))return br("WeakRef");if(function(e){return!("[object Number]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t))return yr(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!Yi)return!1;try{return Yi.call(e),!0}catch(e){}return!1}(t))return yr(p(Yi.call(t)));if(function(e){return!("[object Boolean]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t))return yr(Li.call(t));if(function(e){return!("[object String]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t))return yr(p(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===c)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==pr(e)||Ji&&"object"==typeof e&&Ji in e)}(t)&&!ur(t)){var S=Cr(t,p),E=tr?tr(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",T=!E&&Ji&&Object(t)===t&&Ji in t?Fi.call(pr(t),8,-1):k?"Object":"",_=(E||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(T||k?"["+qi.call(Qi.call([],T||[],k||[]),": ")+"] ":"");return 0===S.length?_+"{}":h?_+"{"+wr(S,h)+"}":_+"{ "+qi.call(S,", ")+" }"}return String(t)},Er=xr("%TypeError%"),kr=xr("%WeakMap%",!0),Tr=xr("%Map%",!0),_r=Ar("WeakMap.prototype.get",!0),Or=Ar("WeakMap.prototype.set",!0),Pr=Ar("WeakMap.prototype.has",!0),Mr=Ar("Map.prototype.get",!0),Ir=Ar("Map.prototype.set",!0),Nr=Ar("Map.prototype.has",!0),Dr=function(e,t){for(var n,i=e;null!==(n=i.next);i=n)if(n.key===t)return i.next=n.next,n.next=e.next,e.next=n,n},Ur=String.prototype.replace,Lr=/%20/g,Rr="RFC3986",Br={default:Rr,formatters:{RFC1738:function(e){return Ur.call(e,Lr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Rr},jr=Br,Fr=Object.prototype.hasOwnProperty,Hr=Array.isArray,$r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),zr=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)void 0!==e[i]&&(n[i]=e[i]);return n},Gr={arrayToObject:zr,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var r=t[i],o=r.obj[r.prop],a=Object.keys(o),s=0;s<a.length;++s){var l=a[s],u=o[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:o,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Hr(n)){for(var i=[],r=0;r<n.length;++r)void 0!==n[r]&&i.push(n[r]);t.obj[t.prop]=i}}}(t),e},decode:function(e,t,n){var i=e.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(e){return i}},encode:function(e,t,n,i,r){if(0===e.length)return e;var o=e;if("symbol"==typeof e?o=Symbol.prototype.toString.call(e):"string"!=typeof e&&(o=String(e)),"iso-8859-1"===n)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",s=0;s<o.length;++s){var l=o.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||r===jr.RFC1738&&(40===l||41===l)?a+=o.charAt(s):l<128?a+=$r[l]:l<2048?a+=$r[192|l>>6]+$r[128|63&l]:l<55296||l>=57344?a+=$r[224|l>>12]+$r[128|l>>6&63]+$r[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&o.charCodeAt(s)),a+=$r[240|l>>18]+$r[128|l>>12&63]+$r[128|l>>6&63]+$r[128|63&l])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Hr(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(Hr(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!Fr.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var r=t;return Hr(t)&&!Hr(n)&&(r=zr(t,i)),Hr(t)&&Hr(n)?(n.forEach(function(n,r){if(Fr.call(t,r)){var o=t[r];o&&"object"==typeof o&&n&&"object"==typeof n?t[r]=e(o,n,i):t.push(n)}else t[r]=n}),t):Object.keys(n).reduce(function(t,r){var o=n[r];return Fr.call(t,r)?t[r]=e(t[r],o,i):t[r]=o,t},r)}},Qr=function(){var e,t,n,i={assert:function(e){if(!i.has(e))throw new Er("Side channel does not contain "+Sr(e))},get:function(i){if(kr&&i&&("object"==typeof i||"function"==typeof i)){if(e)return _r(e,i)}else if(Tr){if(t)return Mr(t,i)}else if(n)return function(e,t){var n=Dr(e,t);return n&&n.value}(n,i)},has:function(i){if(kr&&i&&("object"==typeof i||"function"==typeof i)){if(e)return Pr(e,i)}else if(Tr){if(t)return Nr(t,i)}else if(n)return function(e,t){return!!Dr(e,t)}(n,i);return!1},set:function(i,r){kr&&i&&("object"==typeof i||"function"==typeof i)?(e||(e=new kr),Or(e,i,r)):Tr?(t||(t=new Tr),Ir(t,i,r)):(n||(n={key:{},next:null}),function(e,t,n){var i=Dr(e,t);i?i.value=n:e.next={key:t,next:e.next,value:n}}(n,i,r))}};return i},qr=Gr,Wr=Br,Vr=Object.prototype.hasOwnProperty,Yr={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Kr=Array.isArray,Xr=Array.prototype.push,Zr=function(e,t){Xr.apply(e,Kr(t)?t:[t])},Jr=Date.prototype.toISOString,eo=Wr.default,to={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:qr.encode,encodeValuesOnly:!1,format:eo,formatter:Wr.formatters[eo],indices:!1,serializeDate:function(e){return Jr.call(e)},skipNulls:!1,strictNullHandling:!1},no={},io=function e(t,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m){for(var y,b=t,v=m,w=0,C=!1;void 0!==(v=v.get(no))&&!C;){var x=v.get(t);if(w+=1,void 0!==x){if(x===w)throw new RangeError("Cyclic object value");C=!0}void 0===v.get(no)&&(w=0)}if("function"==typeof l?b=l(n,b):b instanceof Date?b=d(b):"comma"===i&&Kr(b)&&(b=qr.maybeMap(b,function(e){return e instanceof Date?d(e):e})),null===b){if(o)return s&&!f?s(n,to.encoder,g,"key",h):n;b=""}if("string"==typeof(y=b)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||qr.isBuffer(b))return s?[p(f?n:s(n,to.encoder,g,"key",h))+"="+p(s(b,to.encoder,g,"value",h))]:[p(n)+"="+p(String(b))];var A,S=[];if(void 0===b)return S;if("comma"===i&&Kr(b))f&&s&&(b=qr.maybeMap(b,s)),A=[{value:b.length>0?b.join(",")||null:void 0}];else if(Kr(l))A=l;else{var E=Object.keys(b);A=u?E.sort(u):E}for(var k=r&&Kr(b)&&1===b.length?n+"[]":n,T=0;T<A.length;++T){var _=A[T],O="object"==typeof _&&void 0!==_.value?_.value:b[_];if(!a||null!==O){var P=Kr(b)?"function"==typeof i?i(k,_):k:k+(c?"."+_:"["+_+"]");m.set(t,w);var M=Qr();M.set(no,m),Zr(S,e(O,P,i,r,o,a,"comma"===i&&f&&Kr(b)?null:s,l,u,c,d,h,p,f,g,M))}}return S},ro=Gr,oo=Object.prototype.hasOwnProperty,ao=Array.isArray,so={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ro.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},lo=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},uo=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},co=function(e,t,n,i){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(r),s=a?r.slice(0,a.index):r,l=[];if(s){if(!n.plainObjects&&oo.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var u=0;n.depth>0&&null!==(a=o.exec(r))&&u<n.depth;){if(u+=1,!n.plainObjects&&oo.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+r.slice(a.index)+"]"),function(e,t,n,i){for(var r=i?t:uo(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=r:"__proto__"!==l&&(a[l]=r):a={0:r}}r=a}return r}(l,t,n,i)}},ho=function(e,t){var n,i=e,r=function(e){if(!e)return to;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||to.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Wr.default;if(void 0!==e.format){if(!Vr.call(Wr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Wr.formatters[n],r=to.filter;return("function"==typeof e.filter||Kr(e.filter))&&(r=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:to.addQueryPrefix,allowDots:void 0===e.allowDots?to.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:to.charsetSentinel,delimiter:void 0===e.delimiter?to.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:to.encode,encoder:"function"==typeof e.encoder?e.encoder:to.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:to.encodeValuesOnly,filter:r,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:to.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:to.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:to.strictNullHandling}}(t);"function"==typeof r.filter?i=(0,r.filter)("",i):Kr(r.filter)&&(n=r.filter);var o,a=[];if("object"!=typeof i||null===i)return"";o=t&&t.arrayFormat in Yr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=Yr[o];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l="comma"===s&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),r.sort&&n.sort(r.sort);for(var u=Qr(),c=0;c<n.length;++c){var d=n[c];r.skipNulls&&null===i[d]||Zr(a,io(i[d],d,s,l,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var h=a.join(r.delimiter),p=!0===r.addQueryPrefix?"?":"";return r.charsetSentinel&&("iso-8859-1"===r.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),h.length>0?p+h:""},po={formats:Br,parse:function(e,t){var n=function(e){if(!e)return so;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?so.charset:e.charset;return{allowDots:void 0===e.allowDots?so.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:so.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:so.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:so.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:so.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:so.comma,decoder:"function"==typeof e.decoder?e.decoder:so.decoder,delimiter:"string"==typeof e.delimiter||ro.isRegExp(e.delimiter)?e.delimiter:so.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:so.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:so.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:so.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:so.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:so.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var i="string"==typeof e?function(e,t){var n,i={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=r.split(t.delimiter,o),s=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?l="utf-8":"utf8=%26%2310003%3B"===a[n]&&(l="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var u,c,d=a[n],h=d.indexOf("]="),p=-1===h?d.indexOf("="):h+1;-1===p?(u=t.decoder(d,so.decoder,l,"key"),c=t.strictNullHandling?null:""):(u=t.decoder(d.slice(0,p),so.decoder,l,"key"),c=ro.maybeMap(uo(d.slice(p+1),t),function(e){return t.decoder(e,so.decoder,l,"value")})),c&&t.interpretNumericEntities&&"iso-8859-1"===l&&(c=lo(c)),d.indexOf("[]=")>-1&&(c=ao(c)?[c]:c),oo.call(i,u)?i[u]=ro.combine(i[u],c):i[u]=c}return i}(e,n):e,r=n.plainObjects?Object.create(null):{},o=Object.keys(i),a=0;a<o.length;++a){var s=o[a],l=co(s,i[s],n,"string"==typeof e);r=ro.merge(r,l,n)}return!0===n.allowSparse?r:ro.compact(r)},stringify:ho},fo={};!function(e){function t(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(l)throw a}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.type=e=>e.split(/ *; */).shift(),e.params=e=>{const n={};var i,r=t(e.split(/ *; */));try{for(r.s();!(i=r.n()).done;){const e=i.value.split(/ *= */),t=e.shift(),r=e.shift();t&&r&&(n[t]=r)}}catch(e){r.e(e)}finally{r.f()}return n},e.parseLinks=e=>{const n={};var i,r=t(e.split(/ *, */));try{for(r.s();!(i=r.n()).done;){const e=i.value.split(/ *; */),t=e[0].slice(1,-1);n[e[1].split(/ *= */)[1].slice(1,-1)]=t}}catch(e){r.e(e)}finally{r.f()}return n},e.cleanHeader=(e,t)=>(delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e),e.isObject=e=>null!==e&&"object"==typeof e,e.hasOwn=Object.hasOwn||function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(e),t)},e.mixin=(t,n)=>{for(const i in n)e.hasOwn(n,i)&&(t[i]=n[i])}}(fo);const go=Si,mo=fo.isObject,yo=fo.hasOwn;var bo=vo;function vo(){}vo.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},vo.prototype.parse=function(e){return this._parser=e,this},vo.prototype.responseType=function(e){return this._responseType=e,this},vo.prototype.serialize=function(e){return this._serializer=e,this},vo.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(const t in e)if(yo(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload}return this},vo.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};const wo=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),Co=new Set([408,413,429,500,502,503,504,521,522,524]);vo.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){}if(t&&t.status&&Co.has(t.status))return!0;if(e){if(e.code&&wo.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},vo.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},vo.prototype.then=function(e,t){if(!this._fullfilledPromise){const e=this;this._endCalled,this._fullfilledPromise=new Promise((t,n)=>{e.on("abort",()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void n(this.timedoutError);const e=new Error("Aborted");e.code="ABORTED",e.status=this.status,e.method=this.method,e.url=this.url,n(e)}),e.end((e,i)=>{e?n(e):t(i)})})}return this._fullfilledPromise.then(e,t)},vo.prototype.catch=function(e){return this.then(void 0,e)},vo.prototype.use=function(e){return e(this),this},vo.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},vo.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},vo.prototype.get=function(e){return this._header[e.toLowerCase()]},vo.prototype.getHeader=vo.prototype.get,vo.prototype.set=function(e,t){if(mo(e)){for(const t in e)yo(e,t)&&this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},vo.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},vo.prototype.field=function(e,t,n){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(mo(e)){for(const t in e)yo(e,t)&&this.field(t,e[t]);return this}if(Array.isArray(t)){for(const n in t)yo(t,n)&&this.field(e,t[n]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),n?this._getFormData().append(e,t,n):this._getFormData().append(e,t),this},vo.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(go.gte(process.version,"v13.0.0")&&go.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},vo.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization",`Basic ${i(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`)}return this},vo.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},vo.prototype.redirects=function(e){return this._maxRedirects=e,this},vo.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},vo.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},vo.prototype.send=function(e){const t=mo(e);let n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&mo(this._data))for(const t in e){if("bigint"==typeof e[t]&&!e[t].toJSON)throw new Error("Cannot serialize BigInt value to json");yo(e,t)&&(this._data[t]=e[t])}else{if("bigint"==typeof e)throw new Error("Cannot send value of type BigInt");"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],n&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?`${this._data}&${e}`:e:(this._data||"")+e):this._data=e}return!t||this._isHost(e)||n||this.type("json"),this},vo.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},vo.prototype._finalizeQueryString=function(){const e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){const e=this.url.indexOf("?");if(e>=0){const t=this.url.slice(e+1).split("&");"function"==typeof this._sort?t.sort(this._sort):t.sort(),this.url=this.url.slice(0,e)+"?"+t.join("&")}}},vo.prototype._appendQueryString=()=>{},vo.prototype._timeoutError=function(e,t,n){if(this._aborted)return;const i=new Error(`${e+t}ms exceeded`);i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)},vo.prototype._setTimeouts=function(){const e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(()=>{e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(()=>{e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};const xo=fo;var Ao=So;function So(){}function Eo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ko(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ko(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function To(){this._defaults=[]}So.prototype.get=function(e){return this.header[e.toLowerCase()]},So.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=xo.type(t);const n=xo.params(t);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(this[e]=n[e]);this.links={};try{e.link&&(this.links=xo.parseLinks(e.link))}catch(e){}},So.prototype._setStatusProperties=function(e){const t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e};for(var _o=0,Oo=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];_o<Oo.length;_o++){const e=Oo[_o];To.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._defaults.push({fn:e,args:n}),this}}To.prototype._setDefaults=function(e){var t,n=Eo(this._defaults);try{for(n.s();!(t=n.n()).done;){const n=t.value;e[n.fn](...n.args)}}catch(e){n.e(e)}finally{n.f()}};var Po=To;!function(e,t){function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}let r;r="undefined"!=typeof window?window:"undefined"==typeof self?void 0:self;const o=En.exports,a=kn,s=po,l=bo,u=fo.isObject,c=fo.mixin,d=fo.hasOwn,h=Ao,p=Po;function f(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};const g=t=e.exports;t.Request=x,g.getXHR=()=>{if(r.XMLHttpRequest)return new r.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const m="".trim?e=>e.trim():e=>e.replace(/(^\s*|\s*$)/g,"");function y(e){if(!u(e))return e;const t=[];for(const n in e)d(e,n)&&b(t,n,e[n]);return t.join("&")}function b(e,t,i){if(void 0!==i)if(null!==i)if(Array.isArray(i)){var r,o=n(i);try{for(o.s();!(r=o.n()).done;)b(e,t,r.value)}catch(e){o.e(e)}finally{o.f()}}else if(u(i))for(const n in i)d(i,n)&&b(e,`${t}[${n}]`,i[n]);else e.push(encodeURI(t)+"="+encodeURIComponent(i));else e.push(encodeURI(t))}function v(e){const t={},n=e.split("&");let i,r;for(let e=0,o=n.length;e<o;++e)i=n[e],r=i.indexOf("="),-1===r?t[decodeURIComponent(i)]="":t[decodeURIComponent(i.slice(0,r))]=decodeURIComponent(i.slice(r+1));return t}function w(e){return/[/+]json($|[^-\w])/i.test(e)}function C(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){const t=e.split(/\r?\n/),n={};let i,r,o,a;for(let e=0,s=t.length;e<s;++e)r=t[e],i=r.indexOf(":"),-1!==i&&(o=r.slice(0,i).toLowerCase(),a=m(r.slice(i+1)),n[o]=a);return n}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function x(e,t){const n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",()=>{let e,t=null,i=null;try{i=new C(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=e.status||i.status,n.callback(e,i)):n.callback(null,i)})}g.serializeObject=y,g.parseString=v,g.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},g.serialize={"application/x-www-form-urlencoded":s.stringify,"application/json":a},g.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},c(C.prototype,h.prototype),C.prototype._parseBody=function(e){let t=g.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&w(this.type)&&(t=g.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},C.prototype.toError=function(){const e=this.req,t=e.method,n=e.url,i=`cannot ${t} ${n} (${this.status})`,r=new Error(i);return r.status=this.status,r.method=t,r.url=n,r},g.Response=C,o(x.prototype),c(x.prototype,l.prototype),x.prototype.type=function(e){return this.set("Content-Type",g.types[e]||e),this},x.prototype.accept=function(e){return this.set("Accept",g.types[e]||e),this},x.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});const i=n.encoder?n.encoder:e=>{if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,i)},x.prototype.query=function(e){return"string"!=typeof e&&(e=y(e)),e&&this._query.push(e),this},x.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},x.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},x.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();const n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},x.prototype.crossDomainError=function(){const e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},x.prototype.agent=function(){return this},x.prototype.ca=x.prototype.agent,x.prototype.buffer=x.prototype.ca,x.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},x.prototype.pipe=x.prototype.write,x.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},x.prototype.end=function(e){this._endCalled,this._endCalled=!0,this._callback=e||f,this._finalizeQueryString(),this._end()},x.prototype._setUploadTimeout=function(){const e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},x.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const e=this;this.xhr=g.getXHR();const t=this.xhr;let n=this._formData||this._data;this._setTimeouts(),t.addEventListener("readystatechange",()=>{const n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4!==n)return;let i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")});const i=(t,n)=>{n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){const e=this._header["content-type"];let t=this._serializer||g.serialize[e?e.split(";")[0]:""];!t&&w(e)&&(t=g.serialize["application/json"]),t&&(n=t(n))}for(const e in this.header)null!==this.header[e]&&d(this.header,e)&&t.setRequestHeader(e,this.header[e]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},g.agent=()=>new p;for(var A=0,S=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];A<S.length;A++){const e=S[A];p.prototype[e.toLowerCase()]=function(t,n){const i=new g.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}}function E(e,t,n){const i=g("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}p.prototype.del=p.prototype.delete,g.get=(e,t,n)=>{const i=g("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},g.head=(e,t,n)=>{const i=g("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},g.options=(e,t,n)=>{const i=g("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},g.del=E,g.delete=E,g.patch=(e,t,n)=>{const i=g("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},g.post=(e,t,n)=>{const i=g("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},g.put=(e,t,n)=>{const i=g("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}}(Sn,Sn.exports);var Mo=Sn.exports;function Io(e){var t=(new Date).getTime(),n=(new Date).toISOString(),i=console&&console.log?console:window&&window.console&&window.console.log?window.console:console;i.log("<<<<<"),i.log("[".concat(n,"]"),"\n",e.url,"\n",e.qs),i.log("-----"),e.on("response",function(n){var r=(new Date).getTime()-t,o=(new Date).toISOString();i.log(">>>>>>"),i.log("[".concat(o," / ").concat(r,"]"),"\n",e.url,"\n",e.qs,"\n",n.text),i.log("-----")})}function No(e,t,n){var i=this;this._config.logVerbosity&&(e=e.use(Io)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e));var r=e;if(t.abortSignal)var o=t.abortSignal.subscribe(function(){r.abort(),o()});return!0===t.forceBuffered?r="undefined"==typeof Blob?r.buffer().responseType("arraybuffer"):r.responseType("arraybuffer"):!1===t.forceBuffered&&(r=r.buffer(!1)),(r=r.timeout(t.timeout)).on("abort",function(){return n({category:M.PNUnknownCategory,error:!0,operation:t.operation,errorData:new Error("Aborted")},null)}),r.end(function(e,r){var o,a={};if(a.error=null!==e,a.operation=t.operation,r&&r.status&&(a.statusCode=r.status),e){if(e.response&&e.response.text&&!i._config.logVerbosity)try{a.errorData=JSON.parse(e.response.text)}catch(t){a.errorData=e}else a.errorData=e;return a.category=i._detectErrorCategory(e),n(a,null)}if(t.ignoreBody)o={headers:r.headers,redirects:r.redirects,response:r};else try{o=JSON.parse(r.text)}catch(e){return a.errorData=r,a.error=!0,n(a,null)}return o.error&&1===o.error&&o.status&&o.message&&o.service?(a.errorData=o,a.statusCode=o.status,a.error=!0,a.category=i._detectErrorCategory(a),n(a,null)):(o.error&&o.error.message&&(a.errorData=o.error),n(a,o))}),r}function Do(e,t,n){return o(this,void 0,void 0,function(){var i;return a(this,function(r){switch(r.label){case 0:return i=Mo.post(e),t.forEach(function(e){var t=e.key,n=e.value;i=i.field(t,n)}),i.attach("file",n,{contentType:"application/octet-stream"}),[4,i];case 1:return[2,r.sent()]}})})}function Uo(e,t,n){var i=Mo.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return No.call(this,i,t,n)}function Lo(e,t,n){var i=Mo.get(this.getStandardOrigin()+t.url).set(t.headers).query(e);return No.call(this,i,t,n)}function Ro(e,t,n,i){var r=Mo.post(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return No.call(this,r,n,i)}function Bo(e,t,n,i){var r=Mo.patch(this.getStandardOrigin()+n.url).query(e).set(n.headers).send(t);return No.call(this,r,n,i)}function jo(e,t,n){var i=Mo.delete(this.getStandardOrigin()+t.url).set(t.headers).query(e);return No.call(this,i,t,n)}function Fo(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer}var Ho,$o=function(){function e(){}return Object.defineProperty(e.prototype,"algo",{get:function(){return"aes-256-cbc"},enumerable:!1,configurable:!0}),e.prototype.encrypt=function(e,t){return o(this,void 0,void 0,function(){var n;return a(this,function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.encryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.encryptString(n,t)];throw new Error("Cannot encrypt this file. In browsers file encryption supports only string or ArrayBuffer")}})})},e.prototype.decrypt=function(e,t){return o(this,void 0,void 0,function(){var n;return a(this,function(i){switch(i.label){case 0:return[4,this.getKey(e)];case 1:if(n=i.sent(),t instanceof ArrayBuffer)return[2,this.decryptArrayBuffer(n,t)];if("string"==typeof t)return[2,this.decryptString(n,t)];throw new Error("Cannot decrypt this file. In browsers file decryption supports only string or ArrayBuffer")}})})},e.prototype.encryptFile=function(e,t,n){return o(this,void 0,void 0,function(){var i,r,o;return a(this,function(a){switch(a.label){case 0:if(t.data.byteLength<=0)throw new Error("encryption error. empty content");return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.data.arrayBuffer()];case 2:return r=a.sent(),[4,this.encryptArrayBuffer(i,r)];case 3:return o=a.sent(),[2,n.create({name:t.name,mimeType:"application/octet-stream",data:o})]}})})},e.prototype.decryptFile=function(e,t,n){return o(this,void 0,void 0,function(){var i,r,o;return a(this,function(a){switch(a.label){case 0:return[4,this.getKey(e)];case 1:return i=a.sent(),[4,t.data.arrayBuffer()];case 2:return r=a.sent(),[4,this.decryptArrayBuffer(i,r)];case 3:return o=a.sent(),[2,n.create({name:t.name,data:o})]}})})},e.prototype.getKey=function(t){return o(this,void 0,void 0,function(){var n,i,r;return a(this,function(o){switch(o.label){case 0:return[4,crypto.subtle.digest("SHA-256",e.encoder.encode(t))];case 1:return n=o.sent(),i=Array.from(new Uint8Array(n)).map(function(e){return e.toString(16).padStart(2,"0")}).join(""),r=e.encoder.encode(i.slice(0,32)).buffer,[2,crypto.subtle.importKey("raw",r,"AES-CBC",!0,["encrypt","decrypt"])]}})})},e.prototype.encryptArrayBuffer=function(e,t){return o(this,void 0,void 0,function(){var n,i,r;return a(this,function(o){switch(o.label){case 0:return n=crypto.getRandomValues(new Uint8Array(16)),i=Fo,r=[n.buffer],[4,crypto.subtle.encrypt({name:"AES-CBC",iv:n},e,t)];case 1:return[2,i.apply(void 0,r.concat([o.sent()]))]}})})},e.prototype.decryptArrayBuffer=function(t,n){return o(this,void 0,void 0,function(){var i;return a(this,function(r){switch(r.label){case 0:if(i=n.slice(0,16),n.slice(e.IV_LENGTH).byteLength<=0)throw new Error("decryption error: empty content");return[4,crypto.subtle.decrypt({name:"AES-CBC",iv:i},t,n.slice(e.IV_LENGTH))];case 1:return[2,r.sent()]}})})},e.prototype.encryptString=function(t,n){return o(this,void 0,void 0,function(){var i,r,o,s;return a(this,function(a){switch(a.label){case 0:return i=crypto.getRandomValues(new Uint8Array(16)),r=e.encoder.encode(n).buffer,[4,crypto.subtle.encrypt({name:"AES-CBC",iv:i},t,r)];case 1:return o=a.sent(),s=Fo(i.buffer,o),[2,e.decoder.decode(s)]}})})},e.prototype.decryptString=function(t,n){return o(this,void 0,void 0,function(){var i,r,o,s;return a(this,function(a){switch(a.label){case 0:return i=e.encoder.encode(n).buffer,r=i.slice(0,16),o=i.slice(16),[4,crypto.subtle.decrypt({name:"AES-CBC",iv:r},t,o)];case 1:return s=a.sent(),[2,e.decoder.decode(s)]}})})},e.IV_LENGTH=16,e.encoder=new TextEncoder,e.decoder=new TextDecoder,e}(),zo=(Ho=function(){function e(e){if(e instanceof File)this.data=e,this.name=this.data.name,this.mimeType=this.data.type;else if(e.data){var t=e.data;this.data=new File([t],e.name,{type:e.mimeType}),this.name=e.name,e.mimeType&&(this.mimeType=e.mimeType)}if(void 0===this.data)throw new Error("Couldn't construct a file out of supplied options.");if(void 0===this.name)throw new Error("Couldn't guess filename out of the options. Please provide one.")}return e.create=function(e){return new this(e)},e.prototype.toBuffer=function(){return o(this,void 0,void 0,function(){return a(this,function(e){throw new Error("This feature is only supported in Node.js environments.")})})},e.prototype.toStream=function(){return o(this,void 0,void 0,function(){return a(this,function(e){throw new Error("This feature is only supported in Node.js environments.")})})},e.prototype.toFileUri=function(){return o(this,void 0,void 0,function(){return a(this,function(e){throw new Error("This feature is only supported in react native environments.")})})},e.prototype.toBlob=function(){return o(this,void 0,void 0,function(){return a(this,function(e){return[2,this.data]})})},e.prototype.toArrayBuffer=function(){return o(this,void 0,void 0,function(){var e=this;return a(this,function(t){return[2,new Promise(function(t,n){var i=new FileReader;i.addEventListener("load",function(){if(i.result instanceof ArrayBuffer)return t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsArrayBuffer(e.data)})]})})},e.prototype.toString=function(){return o(this,void 0,void 0,function(){var e=this;return a(this,function(t){return[2,new Promise(function(t,n){var i=new FileReader;i.addEventListener("load",function(){if("string"==typeof i.result)return t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsBinaryString(e.data)})]})})},e.prototype.toFile=function(){return o(this,void 0,void 0,function(){return a(this,function(e){return[2,this.data]})})},e}(),Ho.supportsFile="undefined"!=typeof File,Ho.supportsBlob="undefined"!=typeof Blob,Ho.supportsArrayBuffer="undefined"!=typeof ArrayBuffer,Ho.supportsBuffer=!1,Ho.supportsStream=!1,Ho.supportsString=!0,Ho.supportsEncryptFile=!0,Ho.supportsFileUri=!1,Ho),Go=function(){function e(e){this.config=e,this.cryptor=new _({config:e}),this.fileCryptor=new $o}return Object.defineProperty(e.prototype,"identifier",{get:function(){return""},enumerable:!1,configurable:!0}),e.prototype.encrypt=function(e){var t="string"==typeof e?e:(new TextDecoder).decode(e);return{data:this.cryptor.encrypt(t),metadata:null}},e.prototype.decrypt=function(e){var t="string"==typeof e.data?e.data:v(e.data);return this.cryptor.decrypt(t)},e.prototype.encryptFile=function(e,t){var n;return o(this,void 0,void 0,function(){return a(this,function(i){return[2,this.fileCryptor.encryptFile(null===(n=this.config)||void 0===n?void 0:n.cipherKey,e,t)]})})},e.prototype.decryptFile=function(e,t){return o(this,void 0,void 0,function(){return a(this,function(n){return[2,this.fileCryptor.decryptFile(this.config.cipherKey,e,t)]})})},e}(),Qo=function(){function e(e){this.cipherKey=e.cipherKey,this.CryptoJS=k,this.encryptedKey=this.CryptoJS.SHA256(this.cipherKey)}return Object.defineProperty(e.prototype,"algo",{get:function(){return"AES-CBC"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return"ACRH"},enumerable:!1,configurable:!0}),e.prototype.getIv=function(){return crypto.getRandomValues(new Uint8Array(e.BLOCK_SIZE))},e.prototype.getKey=function(){return o(this,void 0,void 0,function(){var t,n;return a(this,function(i){switch(i.label){case 0:return t=e.encoder.encode(this.cipherKey),[4,crypto.subtle.digest("SHA-256",t.buffer)];case 1:return n=i.sent(),[2,crypto.subtle.importKey("raw",n,this.algo,!0,["encrypt","decrypt"])]}})})},e.prototype.encrypt=function(t){if(0===("string"==typeof t?t:e.decoder.decode(t)).length)throw new Error("encryption error. empty content");var n=this.getIv();return{metadata:n,data:b(this.CryptoJS.AES.encrypt(t,this.encryptedKey,{iv:this.bufferToWordArray(n),mode:this.CryptoJS.mode.CBC}).ciphertext.toString(this.CryptoJS.enc.Base64))}},e.prototype.decrypt=function(t){var n=this.bufferToWordArray(new Uint8ClampedArray(t.metadata)),i=this.bufferToWordArray(new Uint8ClampedArray(t.data));return e.encoder.encode(this.CryptoJS.AES.decrypt({ciphertext:i},this.encryptedKey,{iv:n,mode:this.CryptoJS.mode.CBC}).toString(this.CryptoJS.enc.Utf8)).buffer},e.prototype.encryptFileData=function(e){return o(this,void 0,void 0,function(){var t,n,i;return a(this,function(r){switch(r.label){case 0:return[4,this.getKey()];case 1:return t=r.sent(),n=this.getIv(),i={},[4,crypto.subtle.encrypt({name:this.algo,iv:n},t,e)];case 2:return[2,(i.data=r.sent(),i.metadata=n,i)]}})})},e.prototype.decryptFileData=function(e){return o(this,void 0,void 0,function(){var t;return a(this,function(n){switch(n.label){case 0:return[4,this.getKey()];case 1:return t=n.sent(),[2,crypto.subtle.decrypt({name:this.algo,iv:e.metadata},t,e.data)]}})})},e.prototype.bufferToWordArray=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n[t/4|0]|=e[t]<<24-8*t;return this.CryptoJS.lib.WordArray.create(n,e.length)},e.BLOCK_SIZE=16,e.encoder=new TextEncoder,e.decoder=new TextDecoder,e}(),qo=function(){function e(e){var t;this.defaultCryptor=e.default,this.cryptors=null!==(t=e.cryptors)&&void 0!==t?t:[]}return e.legacyCryptoModule=function(e){var t;return new this({default:new Go({cipherKey:e.cipherKey,useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t}),cryptors:[new Qo({cipherKey:e.cipherKey})]})},e.aesCbcCryptoModule=function(e){var t;return new this({default:new Qo({cipherKey:e.cipherKey}),cryptors:[new Go({cipherKey:e.cipherKey,useRandomIVs:null===(t=e.useRandomIVs)||void 0===t||t})]})},e.withDefaultCryptor=function(e){return new this({default:e})},e.prototype.getAllCryptors=function(){return u([this.defaultCryptor],l(this.cryptors),!1)},e.prototype.encrypt=function(e){var t=this.defaultCryptor.encrypt(e);if(!t.metadata)return t.data;var n=this.getHeaderData(t);return this.concatArrayBuffer(n,t.data)},e.prototype.decrypt=function(e){var t="string"==typeof e?b(e):e,n=Wo.tryParse(t),i=this.getCryptor(n),r=n.length>0?t.slice(n.length-n.metadataLength,n.length):null;if(t.slice(n.length).byteLength<=0)throw new Error("decryption error. empty content");return i.decrypt({data:t.slice(n.length),metadata:r})},e.prototype.encryptFile=function(e,t){return o(this,void 0,void 0,function(){var n,i;return a(this,function(r){switch(r.label){case 0:return this.defaultCryptor.identifier===Wo.LEGACY_IDENTIFIER?[2,this.defaultCryptor.encryptFile(e,t)]:[4,this.getFileData(e.data)];case 1:return n=r.sent(),[4,this.defaultCryptor.encryptFileData(n)];case 2:return i=r.sent(),[2,t.create({name:e.name,mimeType:"application/octet-stream",data:this.concatArrayBuffer(this.getHeaderData(i),i.data)})]}})})},e.prototype.decryptFile=function(t,n){return o(this,void 0,void 0,function(){var i,r,o,s,l,u,c,d;return a(this,function(a){switch(a.label){case 0:return[4,t.data.arrayBuffer()];case 1:return i=a.sent(),r=Wo.tryParse(i),(null==(o=this.getCryptor(r))?void 0:o.identifier)===e.LEGACY_IDENTIFIER?[2,o.decryptFile(t,n)]:[4,this.getFileData(i)];case 2:return s=a.sent(),l=s.slice(r.length-r.metadataLength,r.length),c=(u=n).create,d={name:t.name},[4,this.defaultCryptor.decryptFileData({data:i.slice(r.length),metadata:l})];case 3:return[2,c.apply(u,[(d.data=a.sent(),d)])]}})})},e.prototype.getCryptor=function(e){if(""===e){var t=this.getAllCryptors().find(function(e){return""===e.identifier});if(t)return t;throw new Error("unknown cryptor error")}if(e instanceof Vo)return this.getCryptorFromId(e.identifier)},e.prototype.getCryptorFromId=function(e){var t=this.getAllCryptors().find(function(t){return e===t.identifier});if(t)return t;throw Error("unknown cryptor error")},e.prototype.concatArrayBuffer=function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer},e.prototype.getHeaderData=function(e){if(e.metadata){var t=Wo.from(this.defaultCryptor.identifier,e.metadata),n=new Uint8Array(t.length),i=0;return n.set(t.data,i),i+=t.length-e.metadata.byteLength,n.set(new Uint8Array(e.metadata),i),n.buffer}},e.prototype.getFileData=function(t){return o(this,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return t instanceof Blob?[4,t.arrayBuffer()]:[3,2];case 1:return[2,n.sent()];case 2:if(t instanceof ArrayBuffer)return[2,t];if("string"==typeof t)return[2,e.encoder.encode(t)];throw new Error("Cannot decrypt/encrypt file. In browsers file encrypt/decrypt supported for string, ArrayBuffer or Blob")}})})},e.LEGACY_IDENTIFIER="",e.encoder=new TextEncoder,e.decoder=new TextDecoder,e}(),Wo=function(){function e(){}return e.from=function(t,n){if(t!==e.LEGACY_IDENTIFIER)return new Vo(t,n.byteLength)},e.tryParse=function(t){var n=new Uint8Array(t),i="";if(n.byteLength>=4&&(i=n.slice(0,4),this.decoder.decode(i)!==e.SENTINEL))return"";if(!(n.byteLength>=5))throw new Error("decryption error. invalid header version");if(n[4]>e.MAX_VERSION)throw new Error("unknown cryptor error");var r="",o=5+e.IDENTIFIER_LENGTH;if(!(n.byteLength>=o))throw new Error("decryption error. invalid crypto identifier");r=n.slice(5,o);var a=null;if(!(n.byteLength>=o+1))throw new Error("decryption error. invalid metadata length");return a=n[o],o+=1,255===a&&n.byteLength>=o+2&&(a=new Uint16Array(n.slice(o,o+2)).reduce(function(e,t){return(e<<8)+t},0),o+=2),new Vo(this.decoder.decode(r),a)},e.SENTINEL="PNED",e.LEGACY_IDENTIFIER="",e.IDENTIFIER_LENGTH=4,e.VERSION=1,e.MAX_VERSION=1,e.decoder=new TextDecoder,e}(),Vo=function(){function e(e,t){this._identifier=e,this._metadataLength=t}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},set:function(e){this._identifier=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadataLength",{get:function(){return this._metadataLength},set:function(e){this._metadataLength=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return Wo.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return Wo.SENTINEL.length+1+Wo.IDENTIFIER_LENGTH+(this.metadataLength<255?1:3)+this.metadataLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){var e=0,t=new Uint8Array(this.length),n=new TextEncoder;t.set(n.encode(Wo.SENTINEL)),t[e+=Wo.SENTINEL.length]=this.version,e++,this.identifier&&t.set(n.encode(this.identifier),e),e+=Wo.IDENTIFIER_LENGTH;var i=this.metadataLength;return i<255?t[e]=i:t.set([255,i>>8,255&i],e),t},enumerable:!1,configurable:!0}),e.IDENTIFIER_LENGTH=4,e.SENTINEL="PNED",e}();function Yo(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}var Ko=function(e){function n(t){var n=this,i=t.listenToBrowserNetworkEvents,r=void 0===i||i;return t.sdkFamily="Web",t.networking=new Cn({del:jo,get:Lo,post:Ro,patch:Bo,sendBeacon:Yo,getfile:Uo,postfile:Do}),t.cbor=new An(function(e){return xn(p.decode(e))},b),t.PubNubFile=zo,t.cryptography=new $o,t.initCryptoModule=function(e){return new qo({default:new Go({cipherKey:e.cipherKey,useRandomIVs:e.useRandomIVs}),cryptors:[new Qo({cipherKey:e.cipherKey})]})},n=e.call(this,t)||this,r&&(window.addEventListener("offline",function(){n.networkDownDetected()}),window.addEventListener("online",function(){n.networkUpDetected()})),n}return t(n,e),n.CryptoModule=qo,n}(wn);return Ko}()},8859:(e,t,n)=>{var i=n(3661),r=n(1380),o=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,e.exports=a},8879:(e,t,n)=>{var i=n(4335)(Object.getPrototypeOf,Object);e.exports=i},8963:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e<0?"-":"",i=Math.abs(e).toString();for(;i.length<t;)i="0"+i;return n+i},e.exports=t.default},8984:(e,t,n)=>{var i=n(5527),r=n(3650),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9012:e=>{e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},9059:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}},e.exports=t.default},9106:(e,t,n)=>{var i=n(9516),r=n(170);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));var s,l=n&&n.encode||o,u=n&&n.serialize;return(s=u?u(t,n):i.isURLSearchParams(t)?t.toString():new r(t,n).toString(l))&&(e+=(-1===e.indexOf("?")?"?":"&")+s),e}},9137:e=>{e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9325:(e,t,n)=>{var i=n(4840),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},9326:(e,t,n)=>{var i=n(1769),r=n(2428),o=n(6449),a=n(361),s=n(294),l=n(7797);e.exports=function(e,t,n){for(var u=-1,c=(t=i(t,e)).length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(o(e)||r(e))}},9344:(e,t,n)=>{var i=n(3805),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9417:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isProtectedDayOfYearToken=function(e){return-1!==n.indexOf(e)},t.isProtectedWeekYearToken=function(e){return-1!==i.indexOf(e)},t.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))};var n=["D","DD"],i=["YY","YYYY"]},9490:(e,t,n)=>{e.exports={isBrowser:!0,classes:{URLSearchParams:n(2002),FormData:n(243),Blob},protocols:["http","https","file","blob","url","data"]}},9516:(e,t,n)=>{var i,r=n(9012),o=Object.prototype.toString,a=(i=Object.create(null),function(e){var t=o.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function u(e){return void 0===e}var c=s("ArrayBuffer");function d(e){return"number"==typeof e}function h(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=s("Date"),g=s("File"),m=s("Blob"),y=s("FileList");function b(e){return"[object Function]"===o.call(e)}var v=s("URLSearchParams");function w(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var C,x=(C="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return C&&e instanceof C});var A,S=s("HTMLFormElement"),E=(A=Object.prototype.hasOwnProperty,function(e,t){return A.call(e,t)});e.exports={isArray:l,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:d,isObject:h,isPlainObject:p,isEmptyObject:function(e){return e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype},isUndefined:u,isDate:f,isFile:g,isBlob:m,isFunction:b,isStream:function(e){return h(e)&&b(e.pipe)},isURLSearchParams:v,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:w,merge:function e(){var t={};function n(n,i){p(t[i])&&p(n)?t[i]=e(t[i],n):p(n)?t[i]=e({},n):l(n)?t[i]=n.slice():t[i]=n}for(var i=0,r=arguments.length;i<r;i++)w(arguments[i],n);return t},extend:function(e,t,n){return w(t,function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,i){var r,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a=r[o],i&&!i(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;if(l(e))return e;var t=e.length;if(!d(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:x,isFileList:y,forEachEntry:function(e,t){for(var n,i=(e&&e[Symbol.iterator]).call(e);(n=i.next())&&!n.done;){var r=n.value;t.call(e,r[0],r[1])}},matchAll:function(e,t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:S,hasOwnProperty:E}},9615:(e,t,n)=>{var i=n(9137),r=n(4680);e.exports=function(e,t,n){var o=!i(t);return e&&(o||!1===n)?r(e,t):t}},9638:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,i.default)(e),n=(0,r.default)(t).getTime()-(0,o.default)(t).getTime();return Math.round(n/l)+1};var i=s(n(5039)),r=s(n(3076)),o=s(n(7674)),a=s(n(427));function s(e){return e&&e.__esModule?e:{default:e}}var l=6048e5;e.exports=t.default},9641:e=>{e.exports={version:"0.30.1"}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9720:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()},e.exports=t.default},9752:(e,t,n)=>{var i=n(3729),r=n(9344),o=n(641),a=n(5389),s=n(8879),l=n(6449),u=n(3656),c=n(1882),d=n(3805),h=n(7167);e.exports=function(e,t,n){var p=l(e),f=p||u(e)||h(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=f?p?new g:[]:d(e)&&c(g)?r(s(e)):{}}return(f?i:o)(e,function(e,i,r){return t(n,e,i,r)}),n}},9770:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[r++]=a)}return o}},9784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);if(isNaN(t))return t;return t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default},9799:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(1,arguments);var n=t||{},s=n.locale,l=s&&s.options&&s.options.firstWeekContainsDate,u=null==l?1:(0,a.default)(l),c=null==n.firstWeekContainsDate?u:(0,a.default)(n.firstWeekContainsDate),d=(0,i.default)(e,t),h=new Date(0);return h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0),(0,o.default)(h,t)};var i=s(n(2036)),r=s(n(427)),o=s(n(930)),a=s(n(9784));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9935:e=>{e.exports=function(){return!1}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.nc=void 0;var i=n(2505),r=n.n(i);const o=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new Map;class l{constructor(e,t){if(this._$cssResult$=!0,t!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=s.get(this.cssText);return o&&void 0===e&&(s.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const u=(e,...t)=>{const n=1===e.length?e[0]:t.reduce((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1],e[0]);return new l(n,a)},c=o?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new l("string"==typeof e?e:e+"",a))(t)})(e):e;var d;const h=window.trustedTypes,p=h?h.emptyScript:"",f=window.reactiveElementPolyfillSupport,g={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},m=(e,t)=>t!==e&&(t==t||e==e),y={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:m};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const i=this._$Eh(n,t);void 0!==i&&(this._$Eu.set(i,n),e.push(i))}),e}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||y}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static _$Eh(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}addController(e){var t,n;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{o?e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(t=>{const n=document.createElement("style"),i=window.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,e.appendChild(n)})})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ES(e,t,n=y){var i,r;const o=this.constructor._$Eh(e,n);if(void 0!==o&&!0===n.reflect){const a=(null!==(r=null===(i=n.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==r?r:g.toAttribute)(t,n.type);this._$Ei=e,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Ei=null}}_$AK(e,t){var n,i,r;const o=this.constructor,a=o._$Eu.get(e);if(void 0!==a&&this._$Ei!==a){const e=o.getPropertyOptions(a),s=e.converter,l=null!==(r=null!==(i=null===(n=s)||void 0===n?void 0:n.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==r?r:g.fromAttribute;this._$Ei=a,this[a]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||m)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Ei!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((e,t)=>this[t]=e),this._$Et=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(n)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach((e,t)=>this._$ES(t,this[t],e)),this._$EC=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var v;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:b}),(null!==(d=globalThis.reactiveElementVersions)&&void 0!==d?d:globalThis.reactiveElementVersions=[]).push("1.3.1");const w=globalThis.trustedTypes,C=w?w.createPolicy("lit-html",{createHTML:e=>e}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,A="?"+x,S=`<${A}>`,E=document,k=(e="")=>E.createComment(e),T=e=>null===e||"object"!=typeof e&&"function"!=typeof e,_=Array.isArray,O=e=>{var t;return _(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,I=/>/g,N=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,D=/'/g,U=/"/g,L=/^(?:script|style|textarea|title)$/i,R=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),B=R(1),j=R(2),F=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),$=new WeakMap,z=E.createTreeWalker(E,129,null,!1),G=(e,t)=>{const n=e.length-1,i=[];let r,o=2===t?"<svg>":"",a=P;for(let t=0;t<n;t++){const n=e[t];let s,l,u=-1,c=0;for(;c<n.length&&(a.lastIndex=c,l=a.exec(n),null!==l);)c=a.lastIndex,a===P?"!--"===l[1]?a=M:void 0!==l[1]?a=I:void 0!==l[2]?(L.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=N):void 0!==l[3]&&(a=N):a===N?">"===l[0]?(a=null!=r?r:P,u=-1):void 0===l[1]?u=-2:(u=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?N:'"'===l[3]?U:D):a===U||a===D?a=N:a===M||a===I?a=P:(a=N,r=void 0);const d=a===N&&e[t+1].startsWith("/>")?" ":"";o+=a===P?n+S:u>=0?(i.push(s),n.slice(0,u)+"$lit$"+n.slice(u)+x+d):n+x+(-2===u?(i.push(void 0),t):d)}const s=o+(e[n]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==C?C.createHTML(s):s,i]};class Q{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,o=0;const a=e.length-1,s=this.parts,[l,u]=G(e,t);if(this.el=Q.createElement(l,n),z.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=z.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(x)){const n=u[o++];if(e.push(t),void 0!==n){const e=i.getAttribute(n.toLowerCase()+"$lit$").split(x),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:r,name:t[2],strings:e,ctor:"."===t[1]?K:"?"===t[1]?Z:"@"===t[1]?J:Y})}else s.push({type:6,index:r})}for(const t of e)i.removeAttribute(t)}if(L.test(i.tagName)){const e=i.textContent.split(x),t=e.length-1;if(t>0){i.textContent=w?w.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],k()),z.nextNode(),s.push({type:2,index:++r});i.append(e[t],k())}}}else if(8===i.nodeType)if(i.data===A)s.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf(x,e+1));)s.push({type:7,index:r}),e+=x.length-1}r++}}static createElement(e,t){const n=E.createElement("template");return n.innerHTML=e,n}}function q(e,t,n=e,i){var r,o,a,s;if(t===F)return t;let l=void 0!==i?null===(r=n._$Cl)||void 0===r?void 0:r[i]:n._$Cu;const u=T(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===u?l=void 0:(l=new u(e),l._$AT(e,n,i)),void 0!==i?(null!==(a=(s=n)._$Cl)&&void 0!==a?a:s._$Cl=[])[i]=l:n._$Cu=l),void 0!==l&&(t=q(e,l._$AS(e,t.values),l,i)),t}class W{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:n},parts:i}=this._$AD,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:E).importNode(n,!0);z.currentNode=r;let o=z.nextNode(),a=0,s=0,l=i[0];for(;void 0!==l;){if(a===l.index){let t;2===l.type?t=new V(o,o.nextSibling,this,e):1===l.type?t=new l.ctor(o,l.name,l.strings,this,e):6===l.type&&(t=new ee(o,this,e)),this.v.push(t),l=i[++s]}a!==(null==l?void 0:l.index)&&(o=z.nextNode(),a++)}return r}m(e){let t=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class V{constructor(e,t,n,i){var r;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cg=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=q(this,e,t),T(e)?e===H||null==e||""===e?(this._$AH!==H&&this._$AR(),this._$AH=H):e!==this._$AH&&e!==F&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.k(e):O(e)?this.S(e):this.$(e)}M(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.M(e))}$(e){this._$AH!==H&&T(this._$AH)?this._$AA.nextSibling.data=e:this.k(E.createTextNode(e)),this._$AH=e}T(e){var t;const{values:n,_$litType$:i}=e,r="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.m(n);else{const e=new W(r,this),t=e.p(this.options);e.m(n),this.k(t),this._$AH=e}}_$AC(e){let t=$.get(e.strings);return void 0===t&&$.set(e.strings,t=new Q(e)),t}S(e){_(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new V(this.M(k()),this.M(k()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cg=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class Y{constructor(e,t,n,i,r){this.type=1,this._$AH=H,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const r=this.strings;let o=!1;if(void 0===r)e=q(this,e,t,0),o=!T(e)||e!==this._$AH&&e!==F,o&&(this._$AH=e);else{const i=e;let a,s;for(e=r[0],a=0;a<r.length-1;a++)s=q(this,i[n+a],t,a),s===F&&(s=this._$AH[a]),o||(o=!T(s)||s!==this._$AH[a]),s===H?e=H:e!==H&&(e+=(null!=s?s:"")+r[a+1]),this._$AH[a]=s}o&&!i&&this.C(e)}C(e){e===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class K extends Y{constructor(){super(...arguments),this.type=3}C(e){this.element[this.name]=e===H?void 0:e}}const X=w?w.emptyScript:"";class Z extends Y{constructor(){super(...arguments),this.type=4}C(e){e&&e!==H?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class J extends Y{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=q(this,e,t,0))&&void 0!==n?n:H)===F)return;const i=this._$AH,r=e===H&&i!==H||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==H&&(i===H||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class ee{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){q(this,e)}}const te={L:"$lit$",P:x,V:A,I:1,N:G,R:W,j:O,D:q,H:V,F:Y,O:Z,W:J,B:K,Z:ee},ne=window.litHtmlPolyfillSupport;var ie,re;null==ne||ne(Q,V),(null!==(v=globalThis.litHtmlVersions)&&void 0!==v?v:globalThis.litHtmlVersions=[]).push("2.2.2");class oe extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=((e,t,n)=>{var i,r;const o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t;let a=o._$litPart$;if(void 0===a){const e=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;o._$litPart$=a=new V(t.insertBefore(k(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return F}}oe.finalized=!0,oe._$litElement$=!0,null===(ie=globalThis.litElementHydrateSupport)||void 0===ie||ie.call(globalThis,{LitElement:oe});const ae=globalThis.litElementPolyfillSupport;null==ae||ae({LitElement:oe});(null!==(re=globalThis.litElementVersions)&&void 0!==re?re:globalThis.litElementVersions=[]).push("3.2.0");const se=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t),le=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(n){n.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function ue(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):le(e,t)}function ce(e){return ue({...e,state:!0})}function de(e,t){return(({finisher:e,descriptor:t})=>(n,i)=>{var r;if(void 0===i){const i=null!==(r=n.originalKey)&&void 0!==r?r:n.key,o=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(n.key)}:{...n,key:i};return null!=e&&(o.finisher=function(t){e(t,i)}),o}{const r=n.constructor;void 0!==t&&Object.defineProperty(n,i,t(i)),null==e||e(r,i)}})({descriptor:n=>{const i={get(){var t,n;return null!==(n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof n?Symbol():"__"+n;i.get=function(){var n,i;return void 0===this[t]&&(this[t]=null!==(i=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(e))&&void 0!==i?i:null),this[t]}}return i}})}var he;null===(he=window.HTMLSlotElement)||void 0===he||he.prototype.assignedElements;const pe=1,fe=2,ge=e=>(...t)=>({_$litDirective$:e,values:t});class me{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const ye=ge(class extends me{constructor(e){var t;if(super(e),e.type!==pe||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.et){this.et=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!(null===(n=this.st)||void 0===n?void 0:n.has(e))&&this.et.add(e);return this.render(t)}const r=e.element.classList;this.et.forEach(e=>{e in t||(r.remove(e),this.et.delete(e))});for(const e in t){const n=!!t[e];n===this.et.has(e)||(null===(i=this.st)||void 0===i?void 0:i.has(e))||(n?(r.add(e),this.et.add(e)):(r.remove(e),this.et.delete(e)))}return F}}),{H:be}=te,ve=(e,t)=>{var n,i;const r=e._$AN;if(void 0===r)return!1;for(const e of r)null===(i=(n=e)._$AO)||void 0===i||i.call(n,t,!1),ve(e,t);return!0},we=e=>{let t,n;do{if(void 0===(t=e._$AM))break;n=t._$AN,n.delete(e),e=t}while(0===(null==n?void 0:n.size))},Ce=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Se(t)}};function xe(e){void 0!==this._$AN?(we(this),this._$AM=e,Ce(this)):this._$AM=e}function Ae(e,t=!1,n=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)ve(i[e],!1),we(i[e]);else null!=i&&(ve(i,!1),we(i));else ve(this,e)}const Se=e=>{var t,n,i,r;e.type==fe&&(null!==(t=(i=e)._$AP)&&void 0!==t||(i._$AP=Ae),null!==(n=(r=e)._$AQ)&&void 0!==n||(r._$AQ=xe))};class Ee extends me{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Ce(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n,i;e!==this.isConnected&&(this.isConnected=e,e?null===(n=this.reconnected)||void 0===n||n.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),t&&(ve(this,e),we(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const ke=()=>new Te;class Te{}const _e=new WeakMap,Oe=ge(class extends Ee{render(e){return H}update(e,[t]){var n;const i=t!==this.U;return i&&void 0!==this.U&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.U=t,this.ht=null===(n=e.options)||void 0===n?void 0:n.host,this.ot(this.lt=e.element)),H}ot(e){var t;if("function"==typeof this.U){const n=null!==(t=this.ht)&&void 0!==t?t:globalThis;let i=_e.get(n);void 0===i&&(i=new WeakMap,_e.set(n,i)),void 0!==i.get(this.U)&&this.U.call(this.ht,void 0),i.set(this.U,e),void 0!==e&&this.U.call(this.ht,e)}else this.U.value=e}get rt(){var e,t,n;return"function"==typeof this.U?null===(t=_e.get(null!==(e=this.ht)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.U):null===(n=this.U)||void 0===n?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),Pe=e=>{const t=e.replace(/\D/g,"").substring(0,10),n=t.substring(0,3),i=t.substring(3,6),r=t.substring(6,10);return t.length>5?`(${n}) ${i}-${r}`:t.length>2?`(${n}) ${i}`:t.length>0?`(${n}`:""},Me=e=>{const t=(""+e).replace(/\D/g,"").match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(t){return[t[1]?"+1 ":"","(",t[2],") ",t[3],"-",t[4]].join("")}return e},Ie=e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105},Ne=e=>e.altKey||e.ctrlKey||e.metaKey,De=e=>{const t=e.keyCode;return e.shiftKey||35===t||36===t||8===t||9===t||13===t||46===t||t>36&&t<41||(e.ctrlKey||e.metaKey)&&(65===t||67===t||76===t||86===t||88===t||90===t)},Ue=ge(class extends me{constructor(e){var t;if(super(e),e.type!==pe||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return null==i?t:t+`${n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:n}=e.element;if(void 0===this.ct){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach(e=>{null==t[e]&&(this.ct.delete(e),e.includes("-")?n.removeProperty(e):n[e]="")});for(const e in t){const i=t[e];null!=i&&(this.ct.add(e),e.includes("-")?n.setProperty(e,i):n[e]=i)}return F}}),Le="#646987",Re="#ffffff",Be=e=>({r:parseInt(e.substring(1,3),16),g:parseInt(e.substring(3,5),16),b:parseInt(e.substring(5,7),16)}),je=(e,t,n)=>"#"+[e,t,n].map(e=>{const t=e.toString(16);return 1===t.length?"0"+t:t}).join(""),Fe=(e,t)=>{let n=parseInt(e.substr(1,2),16),i=parseInt(e.substr(3,2),16),r=parseInt(e.substr(5,2),16);return n=Math.round(n*(1-t)+255*t),i=Math.round(i*(1-t)+255*t),r=Math.round(r*(1-t)+255*t),"#"+n.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")+r.toString(16).padStart(2,"0")},He=(e,t)=>2===e||70392===t;var $e=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 ze=class extends oe{constructor(){super(...arguments),this.heading="",this.subtitle="",this.selected=!1,this.primaryColor=Le,this.backgroundColor=Re,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black"}render(){return B`
|
|
2
2
|
<div
|
|
3
3
|
class="tour-type-option"
|
|
4
4
|
tabindex="0"
|
|
@@ -68,7 +68,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
68
68
|
h2 {
|
|
69
69
|
font-weight: 400;
|
|
70
70
|
}
|
|
71
|
-
`],$e([ue({type:String})],ze.prototype,"heading",void 0),$e([ue({type:String})],ze.prototype,"subtitle",void 0),$e([ue({type:Boolean})],ze.prototype,"selected",void 0),$e([ue({attribute:!1})],ze.prototype,"onClick",void 0),$e([ue({attribute:!0})],ze.prototype,"primaryColor",void 0),$e([ue({attribute:!0})],ze.prototype,"backgroundColor",void 0),$e([ue({attribute:!0})],ze.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),$e([ue({attribute:!0})],ze.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),ze=$e([se("tour-type-option")],ze);var Ve={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const Ye=function(e,t,n){var i,r=Ve[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Ke(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xe={date:Ke({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ke({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ke({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var Ze={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const Je=function(e,t,n,i){return Ze[e]};function et(e){return function(t,n){var i,r=n||{};if("formatting"===(r.context?String(r.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const tt={ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:et({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:et({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:et({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:et({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:et({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function nt(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;var a,s=o[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var it,rt={ordinalNumber:(it={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(it.matchPattern);if(!n)return null;var i=n[0],r=e.match(it.parsePattern);if(!r)return null;var o=it.valueCallback?it.valueCallback(r[0]):r[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(i.length)}}),era:nt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:nt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:nt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:nt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const ot={code:"en-US",formatDistance:Ye,formatLong:Xe,formatRelative:Je,localize:tt,match:rt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function at(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function st(e,t){Ge(2,arguments);var n=Qe(e).getTime(),i=at(t);return new Date(n+i)}function lt(e){Ge(1,arguments);var t=Qe(e),n=t.getUTCDay(),i=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-i),t.setUTCHours(0,0,0,0),t}function ut(e){Ge(1,arguments);var t=Qe(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=lt(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=lt(o);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function ct(e){Ge(1,arguments);var t=Qe(e),n=lt(t).getTime()-function(e){Ge(1,arguments);var t=ut(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),lt(n)}(t).getTime();return Math.round(n/6048e5)+1}function dt(e,t){Ge(1,arguments);var n=t||{},i=n.locale,r=i&&i.options&&i.options.weekStartsOn,o=null==r?0:at(r),a=null==n.weekStartsOn?o:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Qe(e),l=s.getUTCDay(),u=(l<a?7:0)+l-a;return s.setUTCDate(s.getUTCDate()-u),s.setUTCHours(0,0,0,0),s}function ht(e,t){Ge(1,arguments);var n=Qe(e),i=n.getUTCFullYear(),r=t||{},o=r.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:at(a),l=null==r.firstWeekContainsDate?s:at(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(i+1,0,l),u.setUTCHours(0,0,0,0);var c=dt(u,t),d=new Date(0);d.setUTCFullYear(i,0,l),d.setUTCHours(0,0,0,0);var h=dt(d,t);return n.getTime()>=c.getTime()?i+1:n.getTime()>=h.getTime()?i:i-1}function pt(e,t){Ge(1,arguments);var n=Qe(e),i=dt(n,t).getTime()-function(e,t){Ge(1,arguments);var n=t||{},i=n.locale,r=i&&i.options&&i.options.firstWeekContainsDate,o=null==r?1:at(r),a=null==n.firstWeekContainsDate?o:at(n.firstWeekContainsDate),s=ht(e,t),l=new Date(0);return l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0),dt(l,t)}(n,t).getTime();return Math.round(i/6048e5)+1}function ft(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}const gt={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return ft("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):ft(n+1,2)},d:function(e,t){return ft(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return ft(e.getUTCHours()%12||12,t.length)},H:function(e,t){return ft(e.getUTCHours(),t.length)},m:function(e,t){return ft(e.getUTCMinutes(),t.length)},s:function(e,t){return ft(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds();return ft(Math.floor(i*Math.pow(10,n-3)),t.length)}};var mt="midnight",yt="noon",bt="morning",vt="afternoon",wt="evening",Ct="night",xt={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return gt.y(e,t)},Y:function(e,t,n,i){var r=ht(e,i),o=r>0?r:1-r;return"YY"===t?ft(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):ft(o,t.length)},R:function(e,t){return ft(ut(e),t.length)},u:function(e,t){return ft(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ft(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ft(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return gt.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return ft(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=pt(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},I:function(e,t,n){var i=ct(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):ft(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):gt.d(e,t)},D:function(e,t,n){var i=function(e){Ge(1,arguments);var t=Qe(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=n-t.getTime();return Math.floor(i/864e5)+1}(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):ft(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ft(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return ft(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,r=e.getUTCHours();switch(i=12===r?yt:0===r?mt:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,r=e.getUTCHours();switch(i=r>=17?wt:r>=12?vt:r>=4?bt:Ct,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return gt.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):gt.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):ft(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):ft(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):gt.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):gt.s(e,t)},S:function(e,t){return gt.S(e,t)},X:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return St(r);case"XXXX":case"XX":return Et(r);default:return Et(r,":")}},x:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return St(r);case"xxxx":case"xx":return Et(r);default:return Et(r,":")}},O:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+At(r,":");default:return"GMT"+Et(r,":")}},z:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+At(r,":");default:return"GMT"+Et(r,":")}},t:function(e,t,n,i){var r=i._originalDate||e;return ft(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,i){return ft((i._originalDate||e).getTime(),t.length)}};function At(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+ft(o,2)}function St(e,t){return e%60==0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Et(e,t)}function Et(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+ft(Math.floor(r/60),2)+n+ft(r%60,2)}const Tt=xt;function kt(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function _t(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}var Ot={p:_t,P:function(e,t){var n,i=e.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return kt(e,t);switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",kt(r,t)).replace("{{time}}",_t(o,t))}};const Pt=Ot;function Mt(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var It=["D","DD"],Nt=["YY","YYYY"];function Dt(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var Ut=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rt=/^'([^]*?)'?$/,Bt=/''/g,jt=/[a-zA-Z]/;function Ft(e,t,n){Ge(2,arguments);var i=String(t),r=n||{},o=r.locale||ot,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:at(a),l=null==r.firstWeekContainsDate?s:at(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:at(u),d=null==r.weekStartsOn?c:at(r.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var h=Qe(e);if(!We(h))throw new RangeError("Invalid time value");var p=function(e,t){return Ge(2,arguments),st(e,-at(t))}(h,Mt(h)),f={firstWeekContainsDate:l,weekStartsOn:d,locale:o,_originalDate:h};return i.match(Lt).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,Pt[t])(e,o.formatLong,f):e}).join("").match(Ut).map(function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return n.match(Rt)[1].replace(Bt,"'");var a,s=Tt[i];if(s)return r.useAdditionalWeekYearTokens||(a=n,-1===Nt.indexOf(a))||Dt(n,t,e),!r.useAdditionalDayOfYearTokens&&function(e){return-1!==It.indexOf(e)}(n)&&Dt(n,t,e),s(p,n,o.localize,f);if(i.match(jt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("")}const Ht=(e,t)=>new Date(e,t+1,0).getDate(),$t=(e,t)=>new Date(e,t,1).getDay(),zt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Gt=["January","February","March","April","May","June","July","August","September","October","November","December"];function Qt(e){Ge(1,arguments);var t=Qe(e);return t.setHours(0,0,0,0),t}function qt(e,t){Ge(2,arguments);var n=Qt(e),i=Qt(t);return n.getTime()===i.getTime()}var Wt=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 Vt=class extends oe{constructor(){var e;super(...arguments),this._selectedDate=this.defaultDate,this.now=new Date,this._monthShown=this.defaultMonth&&-1!==Gt.indexOf(this.defaultMonth)?Gt.indexOf(this.defaultMonth):this.now.getMonth(),this.yearShown=null!==(e=this.defaultYear)&&void 0!==e?e:this.now.getFullYear()}set selectedDate(e){const t=this._selectedDate;this._selectedDate=e,this.requestUpdate("selectedDate",t),this.dispatchEvent(new Event("change",{composed:!0,bubbles:!0}))}get selectedDate(){return this._selectedDate}updated(e){if(e.has("defaultDate")){const t=e.get("defaultDate");if(!this.defaultDate)return void(this.selectedDate=void 0);t&&qt(this.defaultDate,t)||(this.selectedDate=this.defaultDate)}}set monthShown(e){const t=this._monthShown;12===e?(this._monthShown=0,this.yearShown++):-1===e?(this._monthShown=11,this.yearShown--):this._monthShown=e,this.requestUpdate("monthShown",t)}get monthShown(){return this._monthShown}render(){const e=Ht(this.yearShown,this.monthShown),t=zt[$t(this.yearShown,this.monthShown)],n=(i=this.yearShown,r=this.monthShown,Ht(r>0?i:i-1,(e=>e>0?e-1:11)(r)));var i,r;const o=zt[((e,t)=>($t(e,t)+Ht(e,t)%7-1)%7)(this.yearShown,this.monthShown)],a=[];if("Sunday"!==t){for(let e=zt.indexOf(t);e>0;e--)a.push(n+1-e)}const s=new Array(e).fill(null).map((e,t)=>t+1),l=[];if("Saturday"!==o){const e=[...zt].reverse().indexOf(o);for(let t=1;t<=e;t++)l.push(t)}const u=[...a,...s,...l].map((e,t)=>{var n,i,r;const o=this.yearShown<this.now.getFullYear()||this.yearShown===this.now.getFullYear()&&this.monthShown<this.now.getMonth()||this.yearShown===this.now.getFullYear()&&this.monthShown===this.now.getMonth()&&e<this.now.getDate(),l=t<a.length||t>=a.length+s.length,u=!l&&this.now.getMonth()===this.monthShown&&this.now.getDate()===e,c=!!this.selectedDate&&!l&&this.monthShown===function(e){return Ge(1,arguments),Qe(e).getMonth()}(this.selectedDate)&&this.yearShown===function(e){return Ge(1,arguments),Qe(e).getFullYear()}(this.selectedDate)&&e===function(e){return Ge(1,arguments),Qe(e).getDate()}(this.selectedDate),d=Ft(new Date(this.yearShown,this.monthShown,e),"y-MM-dd"),h=!(null===(n=this.availabilities)||void 0===n?void 0:n[d])||0===(null===(r=null===(i=this.availabilities)||void 0===i?void 0:i[d])||void 0===r?void 0:r.length);return B`<button
|
|
71
|
+
`],$e([ue({type:String})],ze.prototype,"heading",void 0),$e([ue({type:String})],ze.prototype,"subtitle",void 0),$e([ue({type:Boolean})],ze.prototype,"selected",void 0),$e([ue({attribute:!1})],ze.prototype,"onClick",void 0),$e([ue({attribute:!0})],ze.prototype,"primaryColor",void 0),$e([ue({attribute:!0})],ze.prototype,"backgroundColor",void 0),$e([ue({attribute:!0})],ze.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),$e([ue({attribute:!0})],ze.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),ze=$e([se("tour-type-option")],ze);var Ve={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const Ye=function(e,t,n){var i,r=Ve[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Ke(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Xe={date:Ke({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ke({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ke({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var Ze={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const Je=function(e,t,n,i){return Ze[e]};function et(e){return function(t,n){var i,r=n||{};if("formatting"===(r.context?String(r.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=r.width?String(r.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}return i[e.argumentCallback?e.argumentCallback(t):t]}}const tt={ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:et({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:et({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:et({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:et({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:et({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function nt(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;var a,s=o[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var it,rt={ordinalNumber:(it={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(it.matchPattern);if(!n)return null;var i=n[0],r=e.match(it.parsePattern);if(!r)return null;var o=it.valueCallback?it.valueCallback(r[0]):r[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(i.length)}}),era:nt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:nt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:nt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:nt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const ot={code:"en-US",formatDistance:Ye,formatLong:Xe,formatRelative:Je,localize:tt,match:rt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function at(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function st(e,t){Ge(2,arguments);var n=Qe(e).getTime(),i=at(t);return new Date(n+i)}function lt(e){Ge(1,arguments);var t=Qe(e),n=t.getUTCDay(),i=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-i),t.setUTCHours(0,0,0,0),t}function ut(e){Ge(1,arguments);var t=Qe(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=lt(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=lt(o);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function ct(e){Ge(1,arguments);var t=Qe(e),n=lt(t).getTime()-function(e){Ge(1,arguments);var t=ut(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),lt(n)}(t).getTime();return Math.round(n/6048e5)+1}function dt(e,t){Ge(1,arguments);var n=t||{},i=n.locale,r=i&&i.options&&i.options.weekStartsOn,o=null==r?0:at(r),a=null==n.weekStartsOn?o:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Qe(e),l=s.getUTCDay(),u=(l<a?7:0)+l-a;return s.setUTCDate(s.getUTCDate()-u),s.setUTCHours(0,0,0,0),s}function ht(e,t){Ge(1,arguments);var n=Qe(e),i=n.getUTCFullYear(),r=t||{},o=r.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:at(a),l=null==r.firstWeekContainsDate?s:at(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(i+1,0,l),u.setUTCHours(0,0,0,0);var c=dt(u,t),d=new Date(0);d.setUTCFullYear(i,0,l),d.setUTCHours(0,0,0,0);var h=dt(d,t);return n.getTime()>=c.getTime()?i+1:n.getTime()>=h.getTime()?i:i-1}function pt(e,t){Ge(1,arguments);var n=Qe(e),i=dt(n,t).getTime()-function(e,t){Ge(1,arguments);var n=t||{},i=n.locale,r=i&&i.options&&i.options.firstWeekContainsDate,o=null==r?1:at(r),a=null==n.firstWeekContainsDate?o:at(n.firstWeekContainsDate),s=ht(e,t),l=new Date(0);return l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0),dt(l,t)}(n,t).getTime();return Math.round(i/6048e5)+1}function ft(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}const gt={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return ft("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):ft(n+1,2)},d:function(e,t){return ft(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return ft(e.getUTCHours()%12||12,t.length)},H:function(e,t){return ft(e.getUTCHours(),t.length)},m:function(e,t){return ft(e.getUTCMinutes(),t.length)},s:function(e,t){return ft(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds();return ft(Math.floor(i*Math.pow(10,n-3)),t.length)}};var mt="midnight",yt="noon",bt="morning",vt="afternoon",wt="evening",Ct="night",xt={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return gt.y(e,t)},Y:function(e,t,n,i){var r=ht(e,i),o=r>0?r:1-r;return"YY"===t?ft(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):ft(o,t.length)},R:function(e,t){return ft(ut(e),t.length)},u:function(e,t){return ft(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ft(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ft(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return gt.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return ft(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=pt(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},I:function(e,t,n){var i=ct(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):ft(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):gt.d(e,t)},D:function(e,t,n){var i=function(e){Ge(1,arguments);var t=Qe(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=n-t.getTime();return Math.floor(i/864e5)+1}(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):ft(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var r=e.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ft(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return ft(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i,r=e.getUTCHours();switch(i=12===r?yt:0===r?mt:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i,r=e.getUTCHours();switch(i=r>=17?wt:r>=12?vt:r>=4?bt:Ct,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var i=e.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return gt.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):gt.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):ft(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):ft(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):gt.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):gt.s(e,t)},S:function(e,t){return gt.S(e,t)},X:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return St(r);case"XXXX":case"XX":return Et(r);default:return Et(r,":")}},x:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"x":return St(r);case"xxxx":case"xx":return Et(r);default:return Et(r,":")}},O:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+At(r,":");default:return"GMT"+Et(r,":")}},z:function(e,t,n,i){var r=(i._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+At(r,":");default:return"GMT"+Et(r,":")}},t:function(e,t,n,i){var r=i._originalDate||e;return ft(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,i){return ft((i._originalDate||e).getTime(),t.length)}};function At(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+ft(o,2)}function St(e,t){return e%60==0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Et(e,t)}function Et(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+ft(Math.floor(r/60),2)+n+ft(r%60,2)}const kt=xt;function Tt(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function _t(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}var Ot={p:_t,P:function(e,t){var n,i=e.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return Tt(e,t);switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Tt(r,t)).replace("{{time}}",_t(o,t))}};const Pt=Ot;function Mt(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var It=["D","DD"],Nt=["YY","YYYY"];function Dt(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var Ut=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rt=/^'([^]*?)'?$/,Bt=/''/g,jt=/[a-zA-Z]/;function Ft(e,t,n){Ge(2,arguments);var i=String(t),r=n||{},o=r.locale||ot,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:at(a),l=null==r.firstWeekContainsDate?s:at(r.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:at(u),d=null==r.weekStartsOn?c:at(r.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var h=Qe(e);if(!We(h))throw new RangeError("Invalid time value");var p=function(e,t){return Ge(2,arguments),st(e,-at(t))}(h,Mt(h)),f={firstWeekContainsDate:l,weekStartsOn:d,locale:o,_originalDate:h};return i.match(Lt).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,Pt[t])(e,o.formatLong,f):e}).join("").match(Ut).map(function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return n.match(Rt)[1].replace(Bt,"'");var a,s=kt[i];if(s)return r.useAdditionalWeekYearTokens||(a=n,-1===Nt.indexOf(a))||Dt(n,t,e),!r.useAdditionalDayOfYearTokens&&function(e){return-1!==It.indexOf(e)}(n)&&Dt(n,t,e),s(p,n,o.localize,f);if(i.match(jt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n}).join("")}const Ht=(e,t)=>new Date(e,t+1,0).getDate(),$t=(e,t)=>new Date(e,t,1).getDay(),zt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Gt=["January","February","March","April","May","June","July","August","September","October","November","December"];function Qt(e){Ge(1,arguments);var t=Qe(e);return t.setHours(0,0,0,0),t}function qt(e,t){Ge(2,arguments);var n=Qt(e),i=Qt(t);return n.getTime()===i.getTime()}var Wt=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 Vt=class extends oe{constructor(){var e;super(...arguments),this._selectedDate=this.defaultDate,this.now=new Date,this._monthShown=this.defaultMonth&&-1!==Gt.indexOf(this.defaultMonth)?Gt.indexOf(this.defaultMonth):this.now.getMonth(),this.yearShown=null!==(e=this.defaultYear)&&void 0!==e?e:this.now.getFullYear()}set selectedDate(e){const t=this._selectedDate;this._selectedDate=e,this.requestUpdate("selectedDate",t),this.dispatchEvent(new Event("change",{composed:!0,bubbles:!0}))}get selectedDate(){return this._selectedDate}updated(e){if(e.has("defaultDate")){const t=e.get("defaultDate");if(!this.defaultDate)return void(this.selectedDate=void 0);t&&qt(this.defaultDate,t)||(this.selectedDate=this.defaultDate)}}set monthShown(e){const t=this._monthShown;12===e?(this._monthShown=0,this.yearShown++):-1===e?(this._monthShown=11,this.yearShown--):this._monthShown=e,this.requestUpdate("monthShown",t)}get monthShown(){return this._monthShown}render(){const e=Ht(this.yearShown,this.monthShown),t=zt[$t(this.yearShown,this.monthShown)],n=(i=this.yearShown,r=this.monthShown,Ht(r>0?i:i-1,(e=>e>0?e-1:11)(r)));var i,r;const o=zt[((e,t)=>($t(e,t)+Ht(e,t)%7-1)%7)(this.yearShown,this.monthShown)],a=[];if("Sunday"!==t){for(let e=zt.indexOf(t);e>0;e--)a.push(n+1-e)}const s=new Array(e).fill(null).map((e,t)=>t+1),l=[];if("Saturday"!==o){const e=[...zt].reverse().indexOf(o);for(let t=1;t<=e;t++)l.push(t)}const u=[...a,...s,...l].map((e,t)=>{var n,i,r;const o=this.yearShown<this.now.getFullYear()||this.yearShown===this.now.getFullYear()&&this.monthShown<this.now.getMonth()||this.yearShown===this.now.getFullYear()&&this.monthShown===this.now.getMonth()&&e<this.now.getDate(),l=t<a.length||t>=a.length+s.length,u=!l&&this.now.getMonth()===this.monthShown&&this.now.getDate()===e,c=!!this.selectedDate&&!l&&this.monthShown===function(e){return Ge(1,arguments),Qe(e).getMonth()}(this.selectedDate)&&this.yearShown===function(e){return Ge(1,arguments),Qe(e).getFullYear()}(this.selectedDate)&&e===function(e){return Ge(1,arguments),Qe(e).getDate()}(this.selectedDate),d=Ft(new Date(this.yearShown,this.monthShown,e),"y-MM-dd"),h=!(null===(n=this.availabilities)||void 0===n?void 0:n[d])||0===(null===(r=null===(i=this.availabilities)||void 0===i?void 0:i[d])||void 0===r?void 0:r.length);return B`<button
|
|
72
72
|
?disabled=${o||h||l}
|
|
73
73
|
class="dayNumber ${ye({past:o,differentMonth:l,today:u,selected:c,noAvailabilities:h})}"
|
|
74
74
|
>
|
|
@@ -452,7 +452,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
452
452
|
</li>`)}
|
|
453
453
|
</ul>`:""}
|
|
454
454
|
</div>
|
|
455
|
-
`}};function En(e,t){Ge(1,arguments);var n=Qe(e);if(isNaN(n.getTime()))throw new RangeError("Invalid time value");var i=null!=t&&t.format?String(t.format):"extended",r=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==i&&"basic"!==i)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==r&&"time"!==r&&"complete"!==r)throw new RangeError("representation must be 'date', 'time', or 'complete'");var o="",a="",s="extended"===i?"-":"",l="extended"===i?":":"";if("time"!==r){var u=ft(n.getDate(),2),c=ft(n.getMonth()+1,2),d=ft(n.getFullYear(),4);o="".concat(d).concat(s).concat(c).concat(s).concat(u)}if("date"!==r){var h=n.getTimezoneOffset();if(0!==h){var p=Math.abs(h),f=ft(Math.floor(p/60),2),g=ft(p%60,2);a="".concat(h<0?"+":"-").concat(f,":").concat(g)}else a="Z";var m=""===o?"":"T",y=[ft(n.getHours(),2),ft(n.getMinutes(),2),ft(n.getSeconds(),2)].join(l);o="".concat(o).concat(m).concat(y).concat(a)}return o}function
|
|
455
|
+
`}};function En(e,t){Ge(1,arguments);var n=Qe(e);if(isNaN(n.getTime()))throw new RangeError("Invalid time value");var i=null!=t&&t.format?String(t.format):"extended",r=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==i&&"basic"!==i)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==r&&"time"!==r&&"complete"!==r)throw new RangeError("representation must be 'date', 'time', or 'complete'");var o="",a="",s="extended"===i?"-":"",l="extended"===i?":":"";if("time"!==r){var u=ft(n.getDate(),2),c=ft(n.getMonth()+1,2),d=ft(n.getFullYear(),4);o="".concat(d).concat(s).concat(c).concat(s).concat(u)}if("date"!==r){var h=n.getTimezoneOffset();if(0!==h){var p=Math.abs(h),f=ft(Math.floor(p/60),2),g=ft(p%60,2);a="".concat(h<0?"+":"-").concat(f,":").concat(g)}else a="Z";var m=""===o?"":"T",y=[ft(n.getHours(),2),ft(n.getMinutes(),2),ft(n.getSeconds(),2)].join(l);o="".concat(o).concat(m).concat(y).concat(a)}return o}function kn(e,t){Ge(2,arguments);var n=Qe(e),i=at(t);return isNaN(i)?new Date(NaN):i?(n.setDate(n.getDate()+i),n):n}var Tn;Sn.styles=[u`
|
|
456
456
|
:host {
|
|
457
457
|
--light-grey: #e3e3e3;
|
|
458
458
|
--active-option-color: #f5f7f9;
|
|
@@ -546,7 +546,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
546
546
|
.option.active {
|
|
547
547
|
background-color: var(--active-option-color);
|
|
548
548
|
}
|
|
549
|
-
`,xn],An([ue({attribute:!1})],Sn.prototype,"options",void 0),An([ue({type:String})],Sn.prototype,"placeholder",void 0),An([ue({type:String})],Sn.prototype,"value",void 0),An([ce()],Sn.prototype,"activeOption",void 0),An([ce()],Sn.prototype,"isOpen",void 0),An([ce()],Sn.prototype,"activeOptionIndex",void 0),An([de("#select",!0)],Sn.prototype,"meSelect",void 0),Sn=An([se("me-select")],Sn),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(
|
|
549
|
+
`,xn],An([ue({attribute:!1})],Sn.prototype,"options",void 0),An([ue({type:String})],Sn.prototype,"placeholder",void 0),An([ue({type:String})],Sn.prototype,"value",void 0),An([ce()],Sn.prototype,"activeOption",void 0),An([ce()],Sn.prototype,"isOpen",void 0),An([ce()],Sn.prototype,"activeOptionIndex",void 0),An([de("#select",!0)],Sn.prototype,"meSelect",void 0),Sn=An([se("me-select")],Sn),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(Tn||(Tn={}));var _n=n(2013),On=n.n(_n);function Pn(e){return Ge(1,arguments),Qe(e).getTime()<Date.now()}Math.pow(10,8);var Mn=6e4,In=36e5;function Nn(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(Dn.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],Dn.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Dn.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=Dn.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(Un);if(!n)return new Date(NaN);var i=!!n[4],r=Bn(n[1]),o=Bn(n[2])-1,a=Bn(n[3]),s=Bn(n[4]),l=Bn(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<=(Fn[t]||(Hn(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(Hn(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(Ln);if(!t)return NaN;var n=jn(t[1]),i=jn(t[2]),r=jn(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*In+i*Mn+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(Rn);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*In+r*Mn)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var Dn={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Un=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ln=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rn=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Bn(e){return e?parseInt(e):1}function jn(e){return e&&parseFloat(e.replace(",","."))||0}var Fn=[31,null,31,30,31,30,31,31,30,31,30,31];function Hn(e){return e%400==0||e%4==0&&e%100!=0}const $n={buildingId:null,availabilities:{}},zn=()=>{$n.buildingId=null,$n.availabilities={}},Gn=async e=>{e&&($n.buildingId=e);const t=$n.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=$n.availabilities;if(n[t])return n[t];const i=Qt(Date.now()),o=En(function(e){Ge(1,arguments);var t=Qe(e);return t.setHours(23,59,59,999),t}(kn(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(En(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return $n.availabilities[t]=s.data,s.data},Qn=async(e,t)=>{var n,i;const r=await Gn(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},qn=async()=>{var e,t,n,i,r,o;return{[hr.Guided]:!!(null===(t=null===(e=await Qn(Tn.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[hr.Self]:!!(null===(i=null===(n=await Qn(Tn.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[hr.Virtual]:!!(null===(o=null===(r=await Qn(Tn.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}},Wn=async(e,t)=>{var n,i;const r=await Qn(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter(e=>We(Nn(e))&&!Pn(Nn(e))):[])||void 0===n?void 0:n.map(e=>Vn(e))};return On()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],e=>Ft(new Date(e.datetime),"yyyy-MM-dd"))},Vn=e=>({datetime:e.slice(0,19),offset:e.slice(19)});var Yn=n(3916),Kn=n.n(Yn),Xn=n(2485),Zn=n.n(Xn);const Jn=e=>`https://app.meetelise.com/platformApi/webchat/${e}/chat-ui-feature-flag`;var ei;async function ti(e){if(!e)return!1;try{return(await r().get(Jn(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"}(ei||(ei={}));const ni=(e,t={})=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,...t})},ii=j`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
550
550
|
<rect x="1" y="1" width="22" height="22" stroke="black" stroke-width="2" rx="2"/>
|
|
551
551
|
</svg>
|
|
552
552
|
`,ri=(j`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
|
|
@@ -1178,7 +1178,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
1178
1178
|
gap: 12px;
|
|
1179
1179
|
align-items: center;
|
|
1180
1180
|
}
|
|
1181
|
-
`;class hi{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:pi(),incomingProcessedLeadSource:this.incomingProcessedLeadSource,webchatVersion:null!==(t="MISSING_ENV_VAR".npm_package_version)&&void 0!==t?t:"1.20.155"})})}}const pi=()=>{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:bn("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:bn("bozzuto_ad_source")}}};var fi;!function(e){e.error="error",e.info="info",e.warn="warn"}(fi||(fi={}));const gi=async({logType:e,buildingSlug:t,orgSlug:n,logTitle:i,logData:o})=>{await r().post("https://app.meetelise.com/platformApi/webchat/logging",{...o},{headers:{"Content-Type":"application/json","building-slug":null!=t?t:"","org-slug":null!=n?n:"","log-type":null!=e?e:fi.error,"log-title":i.toUpperCase().replace(/\s/g,"_")}})},mi=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){}};function yi(){return bi()?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 bi=()=>(window.location.search.match(/\?/g)||[]).length>1;var vi=n(2193),wi=n.n(vi);function Ci(e){return"avb"===e?"AVB Company Website":"windsor"===e?"Windsorcommunities.com":"property-website"}const xi=class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=yi();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(pi()).filter(e=>e)},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t){if(!yn(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Nn(t.timestamp)}}}const a={leadSource:t,leadId:n,buildingSlug:e,timestamp:En(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Nn(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&&!yn(Nn(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){}return n}}catch(e){return null}return null}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:t,referrer:n,campaignSources:i}){try{return(await r().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,{query_params:t,building_slug:e,referrer:n,campaign_sources:i})).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 c=null,d=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(c=e),d=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:wi()(c)?null:c,extras:null!=d?d: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}){try{const i={queryParams:yi(),buildingSlug:n,referrer:document.referrer,campaignSources:pi()};let r=!1;const o=n?this.getLeadSourceBodyIfValid(n):null;if(o){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=o.leadSource,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(i);if(!e)return this.leadSource=o.leadSource,this.leadSource;this.leadSource=e,r=!0}}const a=await this.fetchCurrentParsedLeadSource(i);if(this.leadSource=a,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!a){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSource}if(n){const t=!!a&&a.length>0;this.updateLeadSourceLocalStorage(n,a,e,!t&&!r,r)}return a}catch(e){}return null}},Ai=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 Si,Ei,Ti;!function(e){e.EMOJI="emoji",e.PILLS="pills",e.MINIMIZED="minimized"}(Si||(Si={})),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"}(Ei||(Ei={})),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"}(Ti||(Ti={}));const ki=(e,t)=>{if("self"===e){return!["SCHEDULED_BY_ME_MANAGED_BY_ME","SCHEDULED_BY_ME_MANAGED_BY_CONCIERGE","SCHEDULED_BY_ME_MANAGED_BY_CLIENT"].includes(t)}if("virtual"===e){return!["SCHEDULED_BY_ME_MANAGED_BY_CLIENT"].includes(t)}return!1};async function _i(e,t){var n;const i=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}/v2`,o=(await r().get(i)).data;try{o.welcomeMessage=Oi(null!==(n=o.welcomeMessage)&&void 0!==n?n:"",o.userFirstName)}catch(e){}return o}const Oi=(e,t)=>e.replace(/elise/gi,t);var Pi=n(7035),Mi=n(6353);function Ii(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 Ni(e,t){var n=function(e){if(!Ui[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;Ui[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 Ui[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=Di[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 Di={year:0,month:1,day:2,hour:3,minute:4,second:5};var Ui={};function Li(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 Ri=36e5,Bi={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ji(e,t,n){var i,r,o;if(!e)return 0;if(i=Bi.timezoneZ.exec(e))return 0;if(i=Bi.timezoneHH.exec(e))return Hi(o=parseInt(i[1],10))?-o*Ri:NaN;if(i=Bi.timezoneHHMM.exec(e)){o=parseInt(i[2],10);var a=parseInt(i[3],10);return Hi(o,a)?(r=Math.abs(o)*Ri+6e4*a,"+"===i[1]?-r:r):NaN}if(function(e){if($i[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),$i[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return Li(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=Fi(s,e),u=n?l:function(e,t,n){var i=e.getTime(),r=i-t,o=Fi(new Date(r),n);if(t===o)return t;r-=o-t;var a=Fi(new Date(r),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function Fi(e,t){var n=Ni(e,t),i=Li(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 Hi(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var $i={};var zi={X:function(e,t,n,i){var r=Gi(i.timeZone,e);if(0===r)return"Z";switch(t){case"X":return Wi(r);case"XXXX":case"XX":return qi(r);default:return qi(r,":")}},x:function(e,t,n,i){var r=Gi(i.timeZone,e);switch(t){case"x":return Wi(r);case"xxxx":case"xx":return qi(r);default:return qi(r,":")}},O:function(e,t,n,i){var r=Gi(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+Qi(o,2)}(r,":");default:return"GMT"+qi(r,":")}},z:function(e,t,n,i){switch(t){case"z":case"zz":case"zzz":return Ii("short",e,i);default:return Ii("long",e,i)}}};function Gi(e,t){var n=e?ji(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Qi(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function qi(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+Qi(Math.floor(r/60),2)+n+Qi(Math.floor(r%60),2)}function Wi(e,t){return e%60==0?(e>0?"-":"+")+Qi(Math.abs(e)/60,2):qi(e,t)}const Vi=zi;var Yi=n(9784),Ki=n(9720);var Xi=36e5,Zi=6e4,Ji={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 er(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:Yi(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=Ji.dateTimePattern.exec(e);i?(n.date=i[1],t=i[3]):(i=Ji.datePattern.exec(e))?(n.date=i[1],t=i[2]):(n.date=null,t=e);if(t){var r=Ji.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=Ji.YYY[t],r=Ji.YYYYY[t];if(n=Ji.YYYY.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=Ji.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=Ji.MM.exec(e))return i=new Date(0),or(t,r=parseInt(n[1],10)-1)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Ji.DDD.exec(e)){i=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=rr(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=Ji.MMDD.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return or(t,r,s)?(i.setUTCFullYear(t,r,s),i):new Date(NaN)}if(n=Ji.Www.exec(e))return ar(t,o=parseInt(n[1],10)-1)?tr(t,o):new Date(NaN);if(n=Ji.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return ar(t,o,l)?tr(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(),c=0;if(r.time&&(c=function(e){var t,n,i;if(t=Ji.HH.exec(e))return sr(n=parseFloat(t[1].replace(",",".")))?n%24*Xi:NaN;if(t=Ji.HHMM.exec(e))return sr(n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")))?n%24*Xi+i*Zi:NaN;if(t=Ji.HHMMSS.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return sr(n,i,r)?n%24*Xi+i*Zi+1e3*r:NaN}return null}(r.time),isNaN(c)))return new Date(NaN);if(r.timeZone||n.timeZone){if(l=ji(r.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=Ki(new Date(u+c)),l=Ki(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function tr(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 nr=[31,28,31,30,31,30,31,31,30,31,30,31],ir=[31,29,31,30,31,30,31,31,30,31,30,31];function rr(e){return e%400==0||e%4==0&&e%100!=0}function or(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var i=rr(e);if(i&&n>ir[t])return!1;if(!i&&n>nr[t])return!1}return!0}function ar(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function sr(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var lr=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ur(e,t,n,i){var r=Pi(i);return r.timeZone=t,r.originalDate=e,function(e,t,n){var i=String(t),r=n||{},o=i.match(lr);if(o){var a=er(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,"'"+Vi[t[0]](a,t,null,r)+"'");return i?o.substring(0,n-1)+o.substring(n+1):o},i)}return Mi(e,i,r)}(function(e,t,n){var i=er(e,n),r=ji(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)}var cr=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 dr=class extends oe{constructor(){super(...arguments),this.tourTypeOptions=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.selfGuidedTourEnabled=!1,this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.orgSlug="",this.hasDynamicSchedulingEnabled=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingName="",this.tourType=null,this.shouldShowTourType={[hr.Guided]:!0,[hr.Self]:!0,[hr.Virtual]:!0},this.email="",this.phoneNumber="",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.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.primaryColor=Le,this.backgroundColor=Re,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.firstNameInputValue="",this.lastNameInputValue="",this.leadSourceInputValue="",this.errorGettingAvailabilities=!1,this._setAvailabilities=async()=>{try{const[e,t]=await Promise.all([Ai(this.buildingId,this.hasDynamicSchedulingEnabled),qn()]);this.shouldAllowScheduling=e,this.shouldAllowScheduleLoading=!1,this.calendarTimeZone=await(async e=>{var t;return null!==(t=(await Gn(e)).calendarTimeZone)&&void 0!==t?t:Intl.DateTimeFormat().resolvedOptions().timeZone})(this.buildingId),gi({logTitle:"AVAILABILITIES_EXIST_FOR_TOUR_TYPE",logData:t,logType:fi.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 gi({logTitle:"NO_AVAILABILITIES_EXIST",logData:null,logType:fi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});this.shouldShowTourType={[hr.Guided]:this.tourTypeOptions.map(e=>e.value).includes("WITH_AGENT")&&(t[hr.Guided]||!!this.escortedToursLink),[hr.Self]:this.tourTypeOptions.map(e=>e.value).includes("SELF_GUIDED")&&(t[hr.Self]||!!this.sgtUrl),[hr.Virtual]:this.tourTypeOptions.map(e=>e.value).includes("VIRTUAL_SHOWING")&&(t[hr.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 Wn(pr[this.tourType]),this.waitingForAvailabilities=!1}catch(e){this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,gi({logTitle:"ERROR_LOADING_AVAILABILITIES",logData:{error:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}},this._setDefaultSelectedDateAndTimes=async(e,t)=>{var n,i,r;const o=await Gn(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 qt("string"==typeof e?Nn(e):e,t)}):[],l=null==s?void 0:s[0];a&&l&&a!==kn.Unknown&&a!==kn.MediaTour&&(this.selectedDate=Qt("string"==typeof l?Nn(l):l),this.tourType=fr[a],this.selectedTime="string"==typeof l?Vn(l):(e=>({datetime:Ft(e,"yyyy-MM-dd'T'HH:mm:ss"),offset:Ft(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===kn.Unknown||e.tourType===kn.MediaTour)return!1;const t=fr[e.tourType],n=this._getTourTypeOffered(t);return!!n&&(!ki(t,n)&&e.availabilities&&e.availabilities.length>0)}),i=n[0];return i?i.tourType:null},this._getTourTypeOffered=e=>e===hr.Guided?this.escortedToursTypeOffered:e===hr.Self?this.selfGuidedToursTypeOffered:e===hr.Virtual?this.virtualToursTypeOffered:null,this.firstUpdated=async()=>{await this._setAvailabilities()},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await Wn(pr[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const n=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,i=this.phoneNumber.slice(0,n).replace(/\D/g,""),r=this.phoneNumber.slice(n).replace(/\D/g,""),o=`${i.slice(0,-1)}${r}`;this.phoneNumber=Pe(o),this.phoneInput.value=this.phoneNumber;const a=n-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,n).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,i=n-e>-1?n-e:0;this.phoneInput.setSelectionRange(i,i)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(n).split(/\d+/)[0].length||0)+1,t=n+e<this.phoneNumber.length?n+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,n)+e.key+this.phoneNumber.slice(n);this.phoneNumber=Pe(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(!e.key)return;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const n=this.phoneInput.selectionStart,i=n?this.phoneInput.value.slice(n).replace(/\D/g,""):"";this.phoneNumber=Pe(this.phoneInput.value);let r=0,o=i.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&(null===(n=this.emailInput)||void 0===n?void 0:n.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length&&vn(this.phoneNumber)}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,n]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(n)]},this.submit=async()=>{var e,t,n,i,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const C=new URLSearchParams(window.location.search);let x=null;x=this.selectedLeadSource&&this.selectedLeadSource.value&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:this.leadSourceInputValue&&this.leadSourceInputValue.length>0?this.leadSourceInputValue:this.currentLeadSource;const A=[...new Set(x?[x,"property-website"]:["property-website"])];this.firstNameInput&&(this.firstNameInputValue=this.firstNameInput.value),this.lastNameInput&&(this.lastNameInputValue=this.lastNameInput.value),this.leadSourceInputValue=x,ni("scheduleTourSubmitted",{email:this.email,phone:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,firstName:null!==(n=null===(t=this.firstNameInput)||void 0===t?void 0:t.value)&&void 0!==n?n:this.firstNameInputValue,lastName:null!==(o=null===(i=this.lastNameInput)||void 0===i?void 0:i.value)&&void 0!==o?o:this.lastNameInputValue,tourType:gr[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,originatingSource:A.find(e=>"property-website"!==e)||null});const S={referrer:document.referrer,email_address:this.email,phone_number:`+1${null===(a=this.phoneNumber.match(/\d/g))||void 0===a?void 0:a.join("")}`,building_id:this.buildingId,first_name:null!==(l=null===(s=this.firstNameInput)||void 0===s?void 0:s.value)&&void 0!==l?l:this.firstNameInputValue,last_name:null!==(c=null===(u=this.lastNameInput)||void 0===u?void 0:u.value)&&void 0!==c?c:this.lastNameInputValue,tour_type:gr[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,cancel_existing_tours:this.promptForReschedule,lead_sources:[...new Set(x?[x,Ci(this.orgSlug)]:[Ci(this.orgSlug)])],query_params:Object.fromEntries(C.entries()),conversation_tracking_id:null===(d=this.leadSourceClient)||void 0===d?void 0:d.chatId,lead_sources_with_timestamps:(null!==(f=null===(h=this.leadSourceMultitouchClient)||void 0===h?void 0:h.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(p=this.selectedLeadSource)||void 0===p?void 0:p.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}))&&void 0!==f?f:[]).map(e=>gn({...e}))};this.isSubmitting=!0;try{await r().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",S,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG","org-slug":this.orgSlug}}),null===(g=this.leadSourceClient)||void 0===g||g.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(m=this.leadSourceMultitouchClient)||void 0===m||m.resetLeadSourceTouchpoints(),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e,n=(null===(b=null===(y=t.response)||void 0===y?void 0:y.data)||void 0===b?void 0:b.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[Ft(this.selectedDate,"yyyy-MM-dd")];e&&(this.availabilitiesGroupedByDay[Ft(this.selectedDate,"yyyy-MM-dd")]=e.filter(e=>e!==this.selectedTime))}}else{if(409===(null===(v=t.response)||void 0===v?void 0:v.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===(w=t.response)||void 0===w?void 0:w.status)&&!this.promptForReschedule)return this.isSubmitting=!1,this.tourIsBooked=!1,zn(),this.availabilitiesGroupedByDay=await Wn(pr[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:()=>B`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>B`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>B` <action-confirm-button
|
|
1181
|
+
`;class hi{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:pi(),incomingProcessedLeadSource:this.incomingProcessedLeadSource,webchatVersion:null!==(t="MISSING_ENV_VAR".npm_package_version)&&void 0!==t?t:"1.20.155"})})}}const pi=()=>{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:bn("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:bn("bozzuto_ad_source")}}};var fi;!function(e){e.error="error",e.info="info",e.warn="warn"}(fi||(fi={}));const gi=async({logType:e,buildingSlug:t,orgSlug:n,logTitle:i,logData:o})=>{await r().post("https://app.meetelise.com/platformApi/webchat/logging",{...o},{headers:{"Content-Type":"application/json","building-slug":null!=t?t:"","org-slug":null!=n?n:"","log-type":null!=e?e:fi.error,"log-title":i.toUpperCase().replace(/\s/g,"_")}})},mi=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){}};function yi(){return bi()?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 bi=()=>(window.location.search.match(/\?/g)||[]).length>1;var vi=n(2193),wi=n.n(vi);function Ci(e){return"avb"===e?"AVB Company Website":"windsor"===e?"Windsorcommunities.com":"property-website"}const xi=class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=yi();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(pi()).filter(e=>e)},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t){if(!yn(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Nn(t.timestamp)}}}const a={leadSource:t,leadId:n,buildingSlug:e,timestamp:En(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Nn(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&&!yn(Nn(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){}return n}}catch(e){return null}return null}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:t,referrer:n,campaignSources:i}){try{return(await r().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,{query_params:t,building_slug:e,referrer:n,campaign_sources:i})).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 c=null,d=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(c=e),d=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:wi()(c)?null:c,extras:null!=d?d: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}){try{const i={queryParams:yi(),buildingSlug:n,referrer:document.referrer,campaignSources:pi()};let r=!1;const o=n?this.getLeadSourceBodyIfValid(n):null;if(o){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=o.leadSource,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(i);if(!e)return this.leadSource=o.leadSource,this.leadSource;this.leadSource=e,r=!0}}const a=await this.fetchCurrentParsedLeadSource(i);if(this.leadSource=a,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!a){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSource}if(n){const t=!!a&&a.length>0;this.updateLeadSourceLocalStorage(n,a,e,!t&&!r,r)}return a}catch(e){}return null}},Ai=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 Si,Ei,ki;!function(e){e.EMOJI="emoji",e.PILLS="pills",e.MINIMIZED="minimized"}(Si||(Si={})),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"}(Ei||(Ei={})),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"}(ki||(ki={}));const Ti=(e,t)=>{if("self"===e){return!["SCHEDULED_BY_ME_MANAGED_BY_ME","SCHEDULED_BY_ME_MANAGED_BY_CONCIERGE","SCHEDULED_BY_ME_MANAGED_BY_CLIENT"].includes(t)}if("virtual"===e){return!["SCHEDULED_BY_ME_MANAGED_BY_CLIENT"].includes(t)}return!1};async function _i(e,t){var n;const i=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}/v2`,o=(await r().get(i)).data;try{o.welcomeMessage=Oi(null!==(n=o.welcomeMessage)&&void 0!==n?n:"",o.userFirstName)}catch(e){}return o}const Oi=(e,t)=>e.replace(/elise/gi,t);var Pi=n(7035),Mi=n(6353);function Ii(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 Ni(e,t){var n=function(e){if(!Ui[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;Ui[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 Ui[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=Di[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 Di={year:0,month:1,day:2,hour:3,minute:4,second:5};var Ui={};function Li(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 Ri=36e5,Bi={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ji(e,t,n){var i,r,o;if(!e)return 0;if(i=Bi.timezoneZ.exec(e))return 0;if(i=Bi.timezoneHH.exec(e))return Hi(o=parseInt(i[1],10))?-o*Ri:NaN;if(i=Bi.timezoneHHMM.exec(e)){o=parseInt(i[2],10);var a=parseInt(i[3],10);return Hi(o,a)?(r=Math.abs(o)*Ri+6e4*a,"+"===i[1]?-r:r):NaN}if(function(e){if($i[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),$i[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return Li(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=Fi(s,e),u=n?l:function(e,t,n){var i=e.getTime(),r=i-t,o=Fi(new Date(r),n);if(t===o)return t;r-=o-t;var a=Fi(new Date(r),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function Fi(e,t){var n=Ni(e,t),i=Li(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 Hi(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var $i={};var zi={X:function(e,t,n,i){var r=Gi(i.timeZone,e);if(0===r)return"Z";switch(t){case"X":return Wi(r);case"XXXX":case"XX":return qi(r);default:return qi(r,":")}},x:function(e,t,n,i){var r=Gi(i.timeZone,e);switch(t){case"x":return Wi(r);case"xxxx":case"xx":return qi(r);default:return qi(r,":")}},O:function(e,t,n,i){var r=Gi(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+Qi(o,2)}(r,":");default:return"GMT"+qi(r,":")}},z:function(e,t,n,i){switch(t){case"z":case"zz":case"zzz":return Ii("short",e,i);default:return Ii("long",e,i)}}};function Gi(e,t){var n=e?ji(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Qi(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function qi(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+Qi(Math.floor(r/60),2)+n+Qi(Math.floor(r%60),2)}function Wi(e,t){return e%60==0?(e>0?"-":"+")+Qi(Math.abs(e)/60,2):qi(e,t)}const Vi=zi;var Yi=n(9784),Ki=n(9720);var Xi=36e5,Zi=6e4,Ji={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 er(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:Yi(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=Ji.dateTimePattern.exec(e);i?(n.date=i[1],t=i[3]):(i=Ji.datePattern.exec(e))?(n.date=i[1],t=i[2]):(n.date=null,t=e);if(t){var r=Ji.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=Ji.YYY[t],r=Ji.YYYYY[t];if(n=Ji.YYYY.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=Ji.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=Ji.MM.exec(e))return i=new Date(0),or(t,r=parseInt(n[1],10)-1)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Ji.DDD.exec(e)){i=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=rr(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=Ji.MMDD.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return or(t,r,s)?(i.setUTCFullYear(t,r,s),i):new Date(NaN)}if(n=Ji.Www.exec(e))return ar(t,o=parseInt(n[1],10)-1)?tr(t,o):new Date(NaN);if(n=Ji.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return ar(t,o,l)?tr(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(),c=0;if(r.time&&(c=function(e){var t,n,i;if(t=Ji.HH.exec(e))return sr(n=parseFloat(t[1].replace(",",".")))?n%24*Xi:NaN;if(t=Ji.HHMM.exec(e))return sr(n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")))?n%24*Xi+i*Zi:NaN;if(t=Ji.HHMMSS.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return sr(n,i,r)?n%24*Xi+i*Zi+1e3*r:NaN}return null}(r.time),isNaN(c)))return new Date(NaN);if(r.timeZone||n.timeZone){if(l=ji(r.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=Ki(new Date(u+c)),l=Ki(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function tr(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 nr=[31,28,31,30,31,30,31,31,30,31,30,31],ir=[31,29,31,30,31,30,31,31,30,31,30,31];function rr(e){return e%400==0||e%4==0&&e%100!=0}function or(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var i=rr(e);if(i&&n>ir[t])return!1;if(!i&&n>nr[t])return!1}return!0}function ar(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function sr(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var lr=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ur(e,t,n,i){var r=Pi(i);return r.timeZone=t,r.originalDate=e,function(e,t,n){var i=String(t),r=n||{},o=i.match(lr);if(o){var a=er(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,"'"+Vi[t[0]](a,t,null,r)+"'");return i?o.substring(0,n-1)+o.substring(n+1):o},i)}return Mi(e,i,r)}(function(e,t,n){var i=er(e,n),r=ji(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)}var cr=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 dr=class extends oe{constructor(){super(...arguments),this.tourTypeOptions=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.selfGuidedTourEnabled=!1,this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.orgSlug="",this.hasDynamicSchedulingEnabled=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingName="",this.tourType=null,this.shouldShowTourType={[hr.Guided]:!0,[hr.Self]:!0,[hr.Virtual]:!0},this.email="",this.phoneNumber="",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.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.primaryColor=Le,this.backgroundColor=Re,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.firstNameInputValue="",this.lastNameInputValue="",this.leadSourceInputValue="",this.errorGettingAvailabilities=!1,this._setAvailabilities=async()=>{try{const[e,t]=await Promise.all([Ai(this.buildingId,this.hasDynamicSchedulingEnabled),qn()]);this.shouldAllowScheduling=e,this.shouldAllowScheduleLoading=!1,this.calendarTimeZone=await(async e=>{var t;return null!==(t=(await Gn(e)).calendarTimeZone)&&void 0!==t?t:Intl.DateTimeFormat().resolvedOptions().timeZone})(this.buildingId),gi({logTitle:"AVAILABILITIES_EXIST_FOR_TOUR_TYPE",logData:t,logType:fi.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 gi({logTitle:"NO_AVAILABILITIES_EXIST",logData:null,logType:fi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});this.shouldShowTourType={[hr.Guided]:this.tourTypeOptions.map(e=>e.value).includes("WITH_AGENT")&&(t[hr.Guided]||!!this.escortedToursLink),[hr.Self]:this.tourTypeOptions.map(e=>e.value).includes("SELF_GUIDED")&&(t[hr.Self]||!!this.sgtUrl),[hr.Virtual]:this.tourTypeOptions.map(e=>e.value).includes("VIRTUAL_SHOWING")&&(t[hr.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 Wn(pr[this.tourType]),this.waitingForAvailabilities=!1}catch(e){this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,gi({logTitle:"ERROR_LOADING_AVAILABILITIES",logData:{error:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}},this._setDefaultSelectedDateAndTimes=async(e,t)=>{var n,i,r;const o=await Gn(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 qt("string"==typeof e?Nn(e):e,t)}):[],l=null==s?void 0:s[0];a&&l&&a!==Tn.Unknown&&a!==Tn.MediaTour&&(this.selectedDate=Qt("string"==typeof l?Nn(l):l),this.tourType=fr[a],this.selectedTime="string"==typeof l?Vn(l):(e=>({datetime:Ft(e,"yyyy-MM-dd'T'HH:mm:ss"),offset:Ft(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===Tn.Unknown||e.tourType===Tn.MediaTour)return!1;const t=fr[e.tourType],n=this._getTourTypeOffered(t);return!!n&&(!Ti(t,n)&&e.availabilities&&e.availabilities.length>0)}),i=n[0];return i?i.tourType:null},this._getTourTypeOffered=e=>e===hr.Guided?this.escortedToursTypeOffered:e===hr.Self?this.selfGuidedToursTypeOffered:e===hr.Virtual?this.virtualToursTypeOffered:null,this.firstUpdated=async()=>{await this._setAvailabilities()},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await Wn(pr[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const n=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,i=this.phoneNumber.slice(0,n).replace(/\D/g,""),r=this.phoneNumber.slice(n).replace(/\D/g,""),o=`${i.slice(0,-1)}${r}`;this.phoneNumber=Pe(o),this.phoneInput.value=this.phoneNumber;const a=n-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,n).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,i=n-e>-1?n-e:0;this.phoneInput.setSelectionRange(i,i)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(n).split(/\d+/)[0].length||0)+1,t=n+e<this.phoneNumber.length?n+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,n)+e.key+this.phoneNumber.slice(n);this.phoneNumber=Pe(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(!e.key)return;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const n=this.phoneInput.selectionStart,i=n?this.phoneInput.value.slice(n).replace(/\D/g,""):"";this.phoneNumber=Pe(this.phoneInput.value);let r=0,o=i.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&(null===(n=this.emailInput)||void 0===n?void 0:n.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length&&vn(this.phoneNumber)}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,n]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(n)]},this.submit=async()=>{var e,t,n,i,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const C=new URLSearchParams(window.location.search);let x=null;x=this.selectedLeadSource&&this.selectedLeadSource.value&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:this.leadSourceInputValue&&this.leadSourceInputValue.length>0?this.leadSourceInputValue:this.currentLeadSource;const A=[...new Set(x?[x,"property-website"]:["property-website"])];this.firstNameInput&&(this.firstNameInputValue=this.firstNameInput.value),this.lastNameInput&&(this.lastNameInputValue=this.lastNameInput.value),this.leadSourceInputValue=x,ni("scheduleTourSubmitted",{email:this.email,phone:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,firstName:null!==(n=null===(t=this.firstNameInput)||void 0===t?void 0:t.value)&&void 0!==n?n:this.firstNameInputValue,lastName:null!==(o=null===(i=this.lastNameInput)||void 0===i?void 0:i.value)&&void 0!==o?o:this.lastNameInputValue,tourType:gr[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,originatingSource:A.find(e=>"property-website"!==e)||null});const S={referrer:document.referrer,email_address:this.email,phone_number:`+1${null===(a=this.phoneNumber.match(/\d/g))||void 0===a?void 0:a.join("")}`,building_id:this.buildingId,first_name:null!==(l=null===(s=this.firstNameInput)||void 0===s?void 0:s.value)&&void 0!==l?l:this.firstNameInputValue,last_name:null!==(c=null===(u=this.lastNameInput)||void 0===u?void 0:u.value)&&void 0!==c?c:this.lastNameInputValue,tour_type:gr[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,cancel_existing_tours:this.promptForReschedule,lead_sources:[...new Set(x?[x,Ci(this.orgSlug)]:[Ci(this.orgSlug)])],query_params:Object.fromEntries(C.entries()),conversation_tracking_id:null===(d=this.leadSourceClient)||void 0===d?void 0:d.chatId,lead_sources_with_timestamps:(null!==(f=null===(h=this.leadSourceMultitouchClient)||void 0===h?void 0:h.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(p=this.selectedLeadSource)||void 0===p?void 0:p.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}))&&void 0!==f?f:[]).map(e=>gn({...e}))};this.isSubmitting=!0;try{await r().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",S,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE","org-slug":this.orgSlug}}),null===(g=this.leadSourceClient)||void 0===g||g.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(m=this.leadSourceMultitouchClient)||void 0===m||m.resetLeadSourceTouchpoints(),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e,n=(null===(b=null===(y=t.response)||void 0===y?void 0:y.data)||void 0===b?void 0:b.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[Ft(this.selectedDate,"yyyy-MM-dd")];e&&(this.availabilitiesGroupedByDay[Ft(this.selectedDate,"yyyy-MM-dd")]=e.filter(e=>e!==this.selectedTime))}}else{if(409===(null===(v=t.response)||void 0===v?void 0:v.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===(w=t.response)||void 0===w?void 0:w.status)&&!this.promptForReschedule)return this.isSubmitting=!1,this.tourIsBooked=!1,zn(),this.availabilitiesGroupedByDay=await Wn(pr[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:()=>B`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>B`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>B` <action-confirm-button
|
|
1182
1182
|
id="schedule-bttn"
|
|
1183
1183
|
.onClick=${this.submit}
|
|
1184
1184
|
.isLoading=${this.isSubmitting}
|
|
@@ -1193,7 +1193,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
1193
1193
|
subtitle="on your own"
|
|
1194
1194
|
.primaryColor=${this.primaryColor}
|
|
1195
1195
|
.backgroundColor=${this.backgroundColor}
|
|
1196
|
-
@click="${async()=>{this.tourType=hr.Self,this.sgtUrl&&
|
|
1196
|
+
@click="${async()=>{this.tourType=hr.Self,this.sgtUrl&&Ti(hr.Self,this.selfGuidedToursTypeOffered)&&window.open(this.sgtUrl,"_blank"),this.availabilitiesGroupedByDay=await Wn(pr[hr.Self]),this._setDefaultSelectedDateAndTimes(pr[hr.Self])}}"
|
|
1197
1197
|
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=hr.Self)}}"
|
|
1198
1198
|
?selected="${this.tourType===hr.Self}"
|
|
1199
1199
|
>
|
|
@@ -1241,7 +1241,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1241
1241
|
subtitle="over video"
|
|
1242
1242
|
.primaryColor=${this.primaryColor}
|
|
1243
1243
|
.backgroundColor=${this.backgroundColor}
|
|
1244
|
-
@click="${async()=>{this.tourType=hr.Virtual,this.virtualToursLink&&
|
|
1244
|
+
@click="${async()=>{this.tourType=hr.Virtual,this.virtualToursLink&&Ti(hr.Virtual,this.virtualToursTypeOffered)&&window.open(this.virtualToursLink,"_blank"),this.availabilitiesGroupedByDay=await Wn(pr[hr.Virtual]),this._setDefaultSelectedDateAndTimes(pr[hr.Virtual])}}"
|
|
1245
1245
|
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=hr.Virtual)}}"
|
|
1246
1246
|
?selected="${this.tourType===hr.Virtual}"
|
|
1247
1247
|
>
|
|
@@ -1259,7 +1259,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1259
1259
|
/>
|
|
1260
1260
|
</svg>`)(this.tourType===hr.Virtual?this.foregroundColorOnPrimaryBackgroundColor:this.foregroundColorOnSecondaryBackgroundColor)}
|
|
1261
1261
|
</tour-type-option>`:""}
|
|
1262
|
-
</div>`}dateAndTimeMenu(){var e;return this.tourType===hr.Self&&this.sgtUrl&&
|
|
1262
|
+
</div>`}dateAndTimeMenu(){var e;return this.tourType===hr.Self&&this.sgtUrl&&Ti(this.tourType,this.selfGuidedToursTypeOffered)?B`<h2 class="journey-header">Date and Time</h2>
|
|
1263
1263
|
<div id="dateAndTimeMenu">
|
|
1264
1264
|
<button
|
|
1265
1265
|
id="self-guided-redirect-bttn"
|
|
@@ -1273,7 +1273,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1273
1273
|
<date-picker
|
|
1274
1274
|
.availabilities=${Kn()(this.availabilitiesGroupedByDay,e=>e.map(e=>new Date(e.offset)))}
|
|
1275
1275
|
.defaultDate=${this.selectedDate}
|
|
1276
|
-
@change=${async e=>{if(this.tourType===hr.Self&&this.sgtUrl&&
|
|
1276
|
+
@change=${async e=>{if(this.tourType===hr.Self&&this.sgtUrl&&Ti(this.tourType,this.selfGuidedToursTypeOffered))window.open(this.sgtUrl,"_blank");else if(this.tourType===hr.Guided&&this.escortedToursLink)window.open(this.escortedToursLink,"_blank");else if(this.tourType===hr.Virtual&&this.virtualToursLink&&Ti(this.tourType,this.virtualToursTypeOffered))window.open(this.virtualToursLink,"_blank");else if(e.target instanceof Vt){const t=this.selectedDate;if(this.selectedDate=e.target.selectedDate,!this.tourType)return;if(t&&e.target.selectedDate&&qt(t,e.target.selectedDate))return;this._setDefaultSelectedDateAndTimes(pr[this.tourType],e.target.selectedDate)}}}
|
|
1277
1277
|
></date-picker>
|
|
1278
1278
|
<div>
|
|
1279
1279
|
<time-picker
|
|
@@ -1373,7 +1373,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1373
1373
|
@change=${()=>{this.requestUpdate()}}
|
|
1374
1374
|
>
|
|
1375
1375
|
</me-select>`:""}
|
|
1376
|
-
</div> `}confirmationMessage(){if(!this.selectedDate||!this.selectedTime||null===this.tourType)return B``;const e=ur(Nn(`${this.selectedTime.datetime}${this.selectedTime.offset}`),this.calendarTimeZone,"h:mmaaa");return this.canceledReschedule?B`
|
|
1376
|
+
</div> `}confirmationMessage(){if(!this.selectedDate||!this.selectedTime||null===this.tourType)return B``;const e=ur(Nn(`${this.selectedTime.datetime}${this.selectedTime.offset}`),this.calendarTimeZone,"MMM d 'at' h:mmaaa");return this.canceledReschedule?B`
|
|
1377
1377
|
<div id="confirmationMessage">
|
|
1378
1378
|
<svg
|
|
1379
1379
|
width="20"
|
|
@@ -1651,7 +1651,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1651
1651
|
</div>
|
|
1652
1652
|
`}
|
|
1653
1653
|
</div>
|
|
1654
|
-
`}};var hr;dr.styles=[di,xn],cr([ue({attribute:!1})],dr.prototype,"tourTypeOptions",void 0),cr([ue({attribute:!0})],dr.prototype,"chatId",void 0),cr([ue({type:Number})],dr.prototype,"buildingId",void 0),cr([ue({attribute:!0})],dr.prototype,"buildingSlug",void 0),cr([ue({attribute:!0})],dr.prototype,"sgtUrl",void 0),cr([ue({attribute:!0})],dr.prototype,"selfGuidedToursTypeOffered",void 0),cr([ue({attribute:!0})],dr.prototype,"selfGuidedTourEnabled",void 0),cr([ue({attribute:!0})],dr.prototype,"escortedToursLink",void 0),cr([ue({attribute:!0})],dr.prototype,"escortedToursTypeOffered",void 0),cr([ue({attribute:!0})],dr.prototype,"virtualToursLink",void 0),cr([ue({attribute:!0})],dr.prototype,"virtualToursTypeOffered",void 0),cr([ue({attribute:!0})],dr.prototype,"orgSlug",void 0),cr([ue({attribute:!0})],dr.prototype,"hasDynamicSchedulingEnabled",void 0),cr([ue({attribute:!0})],dr.prototype,"leadSourceClient",void 0),cr([ue({attribute:!0})],dr.prototype,"leadSourceMultitouchClient",void 0),cr([ue({attribute:!0})],dr.prototype,"buildingName",void 0),cr([ce()],dr.prototype,"tourType",void 0),cr([ce()],dr.prototype,"shouldShowTourType",void 0),cr([ce()],dr.prototype,"email",void 0),cr([ce()],dr.prototype,"phoneNumber",void 0),cr([ce()],dr.prototype,"availabilitiesGroupedByDay",void 0),cr([ce()],dr.prototype,"calendarTimeZone",void 0),cr([ce()],dr.prototype,"waitingForAvailabilities",void 0),cr([ce()],dr.prototype,"selectedDate",void 0),cr([ce()],dr.prototype,"selectedTime",void 0),cr([ce()],dr.prototype,"mobilePageIndex",void 0),cr([ce()],dr.prototype,"isSubmitting",void 0),cr([ce()],dr.prototype,"tourIsBooked",void 0),cr([ce()],dr.prototype,"shouldAllowScheduling",void 0),cr([ce()],dr.prototype,"shouldAllowScheduleLoading",void 0),cr([ce()],dr.prototype,"promptForReschedule",void 0),cr([ce()],dr.prototype,"canceledReschedule",void 0),cr([ue({attribute:!1})],dr.prototype,"leadSources",void 0),cr([ue({attribute:!0})],dr.prototype,"orgLegalName",void 0),cr([ue({attribute:!0})],dr.prototype,"currentLeadSource",void 0),cr([ue({attribute:!0})],dr.prototype,"featureFlagShowDropdown",void 0),cr([ue({attribute:!0})],dr.prototype,"compactDesign",void 0),cr([ue({attribute:!0})],dr.prototype,"primaryColor",void 0),cr([ue({attribute:!0})],dr.prototype,"backgroundColor",void 0),cr([ue({attribute:!0})],dr.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),cr([ue({attribute:!0})],dr.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),cr([de(".nameContainer#firstName input")],dr.prototype,"firstNameInput",void 0),cr([de(".nameContainer#lastName input")],dr.prototype,"lastNameInput",void 0),cr([de(".inputContainer#email input")],dr.prototype,"emailInput",void 0),cr([de(".inputContainer#phone input")],dr.prototype,"phoneInput",void 0),cr([de("me-select#leadSource")],dr.prototype,"selectedLeadSource",void 0),cr([ce()],dr.prototype,"firstNameInputValue",void 0),cr([ce()],dr.prototype,"lastNameInputValue",void 0),cr([ce()],dr.prototype,"leadSourceInputValue",void 0),cr([ce()],dr.prototype,"errorGettingAvailabilities",void 0),dr=cr([se("tour-scheduler")],dr),function(e){e.Guided="guided",e.Self="self",e.Virtual="virtual"}(hr||(hr={}));const pr={[hr.Guided]:
|
|
1654
|
+
`}};var hr;dr.styles=[di,xn],cr([ue({attribute:!1})],dr.prototype,"tourTypeOptions",void 0),cr([ue({attribute:!0})],dr.prototype,"chatId",void 0),cr([ue({type:Number})],dr.prototype,"buildingId",void 0),cr([ue({attribute:!0})],dr.prototype,"buildingSlug",void 0),cr([ue({attribute:!0})],dr.prototype,"sgtUrl",void 0),cr([ue({attribute:!0})],dr.prototype,"selfGuidedToursTypeOffered",void 0),cr([ue({attribute:!0})],dr.prototype,"selfGuidedTourEnabled",void 0),cr([ue({attribute:!0})],dr.prototype,"escortedToursLink",void 0),cr([ue({attribute:!0})],dr.prototype,"escortedToursTypeOffered",void 0),cr([ue({attribute:!0})],dr.prototype,"virtualToursLink",void 0),cr([ue({attribute:!0})],dr.prototype,"virtualToursTypeOffered",void 0),cr([ue({attribute:!0})],dr.prototype,"orgSlug",void 0),cr([ue({attribute:!0})],dr.prototype,"hasDynamicSchedulingEnabled",void 0),cr([ue({attribute:!0})],dr.prototype,"leadSourceClient",void 0),cr([ue({attribute:!0})],dr.prototype,"leadSourceMultitouchClient",void 0),cr([ue({attribute:!0})],dr.prototype,"buildingName",void 0),cr([ce()],dr.prototype,"tourType",void 0),cr([ce()],dr.prototype,"shouldShowTourType",void 0),cr([ce()],dr.prototype,"email",void 0),cr([ce()],dr.prototype,"phoneNumber",void 0),cr([ce()],dr.prototype,"availabilitiesGroupedByDay",void 0),cr([ce()],dr.prototype,"calendarTimeZone",void 0),cr([ce()],dr.prototype,"waitingForAvailabilities",void 0),cr([ce()],dr.prototype,"selectedDate",void 0),cr([ce()],dr.prototype,"selectedTime",void 0),cr([ce()],dr.prototype,"mobilePageIndex",void 0),cr([ce()],dr.prototype,"isSubmitting",void 0),cr([ce()],dr.prototype,"tourIsBooked",void 0),cr([ce()],dr.prototype,"shouldAllowScheduling",void 0),cr([ce()],dr.prototype,"shouldAllowScheduleLoading",void 0),cr([ce()],dr.prototype,"promptForReschedule",void 0),cr([ce()],dr.prototype,"canceledReschedule",void 0),cr([ue({attribute:!1})],dr.prototype,"leadSources",void 0),cr([ue({attribute:!0})],dr.prototype,"orgLegalName",void 0),cr([ue({attribute:!0})],dr.prototype,"currentLeadSource",void 0),cr([ue({attribute:!0})],dr.prototype,"featureFlagShowDropdown",void 0),cr([ue({attribute:!0})],dr.prototype,"compactDesign",void 0),cr([ue({attribute:!0})],dr.prototype,"primaryColor",void 0),cr([ue({attribute:!0})],dr.prototype,"backgroundColor",void 0),cr([ue({attribute:!0})],dr.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),cr([ue({attribute:!0})],dr.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),cr([de(".nameContainer#firstName input")],dr.prototype,"firstNameInput",void 0),cr([de(".nameContainer#lastName input")],dr.prototype,"lastNameInput",void 0),cr([de(".inputContainer#email input")],dr.prototype,"emailInput",void 0),cr([de(".inputContainer#phone input")],dr.prototype,"phoneInput",void 0),cr([de("me-select#leadSource")],dr.prototype,"selectedLeadSource",void 0),cr([ce()],dr.prototype,"firstNameInputValue",void 0),cr([ce()],dr.prototype,"lastNameInputValue",void 0),cr([ce()],dr.prototype,"leadSourceInputValue",void 0),cr([ce()],dr.prototype,"errorGettingAvailabilities",void 0),dr=cr([se("tour-scheduler")],dr),function(e){e.Guided="guided",e.Self="self",e.Virtual="virtual"}(hr||(hr={}));const pr={[hr.Guided]:Tn.WithAgent,[hr.Self]:Tn.SelfGuided,[hr.Virtual]:Tn.VirtualShowing},fr={[Tn.WithAgent]:hr.Guided,[Tn.SelfGuided]:hr.Self,[Tn.VirtualShowing]:hr.Virtual},gr={[hr.Guided]:"escorted-tour",[hr.Self]:"self-guided-tour",[hr.Virtual]:"live-virtual-tour"};const mr=(e,t,n=!0,i=!1,r,o=.01)=>mi({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}),yr=async(e,t,n)=>{const i=.01;if(!e)return mr(n,t,!0,!1,"building_does_not_exist",i),!1;if(!e.launchedDateTime)return mr(n,t,!0,!1,"building_not_launched",i),!1;if(!e.active)return mr(n,t,!0,!1,"building_not_active",i),!1;if(!e.webchatScopeConfigured)return mr(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(Jn(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||(mr(n,t,!0,!1,"building_in_maintenance_mode",i),!1)},br=u`
|
|
1655
1655
|
* {
|
|
1656
1656
|
font-family: "Helvetica Neue", Arial;
|
|
1657
1657
|
font-size: 14px;
|
|
@@ -2546,7 +2546,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2546
2546
|
border-radius: 0px 0px 0px 0px;
|
|
2547
2547
|
}
|
|
2548
2548
|
}
|
|
2549
|
-
`,Ar([ue({type:String})],Sr.prototype,"height",void 0),Ar([ue({type:String})],Sr.prototype,"width",void 0),Ar([ue({type:Boolean})],Sr.prototype,"useRoundedBorders",void 0),Ar([ue({type:String})],Sr.prototype,"headerText",void 0),Ar([ue({attribute:!1})],Sr.prototype,"onCloseClick",void 0),Ar([ce()],Sr.prototype,"isMobileSized",void 0),Ar([ue({attribute:!0})],Sr.prototype,"useGradientDesign",void 0),Sr=Ar([se("details-window")],Sr);var Er=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
|
|
2549
|
+
`,Ar([ue({type:String})],Sr.prototype,"height",void 0),Ar([ue({type:String})],Sr.prototype,"width",void 0),Ar([ue({type:Boolean})],Sr.prototype,"useRoundedBorders",void 0),Ar([ue({type:String})],Sr.prototype,"headerText",void 0),Ar([ue({attribute:!1})],Sr.prototype,"onCloseClick",void 0),Ar([ce()],Sr.prototype,"isMobileSized",void 0),Ar([ue({attribute:!0})],Sr.prototype,"useGradientDesign",void 0),Sr=Ar([se("details-window")],Sr);var Er=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 kr=class extends oe{constructor(){super(...arguments),this.leadSources=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.buildingName="",this.orgLegalName="",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.featureFlagShowDropdown="",this.phoneNumberInputRef=ke(),this.privatePolicyUrl="https://www.meetelise.com/privacy",this.termsOfServiceUrl="_blank",this.firstName="",this.lastName="",this.email="",this.phoneNumber="",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=>{if(!e.target||!this.phoneNumberInputRef.value)return;if(De(e))return;const t=e.target;this.phoneNumber=Pe(t.value),this.phoneNumberInputRef.value.value=this.phoneNumber},this.onChangeMessage=e=>{e.target&&(this.message=e.target.value)},this.enforceFormat=e=>{Ie(e)||De(e)||e.preventDefault()},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&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(this.email)||(this.hasEmailError=!0),this.phoneNumber&&14===this.phoneNumber.length||(this.hasPhoneNumberError=!0),this.windowHeight=525+30*this.getNumErrors()},this.onClick=async()=>{var e,t,n,i,r;if(!(this.isSubmitting||(this.validateFormFields(),this.hasNameError||this.hasEmailError||this.hasPhoneNumberError||this.hasMessageError)))try{this.isSubmitting=!0,this.windowHeight=585;const o=this.selectedLeadSource&&this.selectedLeadSource.value?this.selectedLeadSource.value:this.currentLeadSource;await Tr(this.firstName,this.lastName,this.email,this.phoneNumber,this.message,this.buildingId,this.orgSlug,this.buildingSlug,[...new Set(o?[o,Ci(this.orgSlug)]:[Ci(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.leadSourceMultitouchClient)||void 0===r||r.resetLeadSourceTouchpoints(),this.hasSubmittedForm=!0,this.isSubmitting=!1,this.windowHeight=525}catch(e){this.hasSubmissionError=!0,this.isSubmitting=!1,this.windowHeight=525}},this.getNumErrors=()=>[this.hasNameError,this.hasEmailError,this.hasPhoneNumberError,this.hasMessageError,this.hasSubmissionError].filter(e=>e).length,this.render=()=>(window.customElements.get("details-window")||window.customElements.define("details-window",Sr),window.customElements.get("action-confirm-button")||window.customElements.define("action-confirm-button",xr),this.hasSubmittedForm?B`
|
|
2550
2550
|
<details-window
|
|
2551
2551
|
id="details-window"
|
|
2552
2552
|
headerText=""
|
|
@@ -2671,7 +2671,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2671
2671
|
|
|
2672
2672
|
${ci({buildingName:this.buildingName,phoneNumberInput:this.phoneNumber,emailInput:this.email,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug})}
|
|
2673
2673
|
</details-window>
|
|
2674
|
-
`)}};
|
|
2674
|
+
`)}};kr.styles=[u`
|
|
2675
2675
|
.email-us__name-input,
|
|
2676
2676
|
.email-us__contact_input,
|
|
2677
2677
|
.email-us_message-input {
|
|
@@ -2741,9 +2741,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2741
2741
|
width: 50%;
|
|
2742
2742
|
}
|
|
2743
2743
|
}
|
|
2744
|
-
`,xn],Er([ue({attribute:!1})],
|
|
2744
|
+
`,xn],Er([ue({attribute:!1})],kr.prototype,"leadSources",void 0),Er([ue({attribute:!1})],kr.prototype,"onCloseClicked",void 0),Er([ue({attribute:!0})],kr.prototype,"chatId",void 0),Er([ue({attribute:!1})],kr.prototype,"buildingId",void 0),Er([ue({attribute:!0})],kr.prototype,"buildingSlug",void 0),Er([ue({attribute:!0})],kr.prototype,"orgSlug",void 0),Er([ue({attribute:!0})],kr.prototype,"buildingName",void 0),Er([ue({attribute:!0})],kr.prototype,"orgLegalName",void 0),Er([ue({attribute:!0})],kr.prototype,"leadSourceClient",void 0),Er([ue({attribute:!0})],kr.prototype,"leadSourceMultitouchClient",void 0),Er([ue({attribute:!0})],kr.prototype,"featureFlagShowDropdown",void 0),Er([ue()],kr.prototype,"privatePolicyUrl",void 0),Er([ue()],kr.prototype,"termsOfServiceUrl",void 0),Er([ce()],kr.prototype,"firstName",void 0),Er([ce()],kr.prototype,"lastName",void 0),Er([ce()],kr.prototype,"email",void 0),Er([ce()],kr.prototype,"phoneNumber",void 0),Er([ce()],kr.prototype,"message",void 0),Er([de("me-select#leadSource")],kr.prototype,"selectedLeadSource",void 0),Er([ue({attribute:!0})],kr.prototype,"currentLeadSource",void 0),Er([ce()],kr.prototype,"hasNameError",void 0),Er([ce()],kr.prototype,"hasEmailError",void 0),Er([ce()],kr.prototype,"hasPhoneNumberError",void 0),Er([ce()],kr.prototype,"hasMessageError",void 0),Er([ce()],kr.prototype,"hasSubmittedForm",void 0),Er([ce()],kr.prototype,"windowHeight",void 0),Er([ce()],kr.prototype,"hasSubmissionError",void 0),Er([ce()],kr.prototype,"isSubmitting",void 0),kr=Er([se("email-us-window")],kr);const Tr=async(e,t,n,i,o,a,s,l,u,c,d)=>{const h="+1"+i.replace("(","").replace(")","").replace(" ","").replace("-",""),p=new URLSearchParams(window.location.search),f={email_address:n,building_id:a,lead_sources:u,first_message:o,first_name:e,last_name:t,phone_number:h,referrer:document.referrer,query_params:Object.fromEntries(p.entries()),conversation_tracking_id:c,lead_sources_with_timestamps:(null!=d?d:[]).map(e=>gn({...e}))};ni("emailUsSubmitted",{firstName:e,lastName:t,email:n,phone:h,message:o,originatingSource:u.find(e=>"property-website"!==e)||null}),await r().post("https://app.meetelise.com/platformApi/state/create/emailMe",f,{headers:{"building-slug":l,"org-slug":s,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE"}})},_r=(e="white")=>j`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="17" viewBox="0 0 14 17" fill="none">
|
|
2745
2745
|
<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}"/>
|
|
2746
|
-
</svg>`,Or={},Pr=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],Mr=async e=>{const t=await(async e=>{if(Or[e])return Or[e];const t=`https://app.meetelise.com/platformApi/connectors/talk_js/leasing_office_hours/${e}`,n=await r().get(t);return Or[e]=n.data,n.data})(e);return Pr.map(e=>{const n=t[e];return n?{dayOfWeek:e,startTime:n.start,endTime:n.end}:e})};var Ir=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 Nr=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.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.phoneNumberInputRef=
|
|
2746
|
+
</svg>`,Or={},Pr=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],Mr=async e=>{const t=await(async e=>{if(Or[e])return Or[e];const t=`https://app.meetelise.com/platformApi/connectors/talk_js/leasing_office_hours/${e}`,n=await r().get(t);return Or[e]=n.data,n.data})(e);return Pr.map(e=>{const n=t[e];return n?{dayOfWeek:e,startTime:n.start,endTime:n.end}:e})};var Ir=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 Nr=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.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.phoneNumberInputRef=ke(),this.hasSubmittedForm=!1,this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.submittingTextUsOption=!1,this.officeHoursTextInfo=[],this.firstUpdated=async()=>{this.buildingId&&this.hasCallUsEnabled&&(this.officeHoursTextInfo=await Mr(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 B`<a href="tel:${i}"
|
|
2747
2747
|
>${e}</a
|
|
2748
2748
|
>`},this.enforcePhoneFormat=e=>{Ie(e)||De(e)||e.preventDefault()},this.onSubmitTextUs=async()=>{var e,t,n,i;if(this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumberToText&&14===this.phoneNumberToText.length||(this.hasPhoneNumberError=!0),!this.hasPhoneNumberError)try{this.submittingTextUsOption=!0,await Dr(this.phoneNumberToText,this.buildingId,this.orgSlug,this.buildingSlug,[...new Set(this.currentLeadSource?[this.currentLeadSource,Ci(this.orgSlug)]:[Ci(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.leadSourceMultitouchClient)||void 0===i||i.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(De(e))return;const t=e.target;this.phoneNumberToText=Pe(t.value),this.phoneNumberInputRef.value.value=this.phoneNumberToText},this.renderFormTextUsOption=()=>B` <div class="text-us-wrapper">
|
|
2749
2749
|
<h1 class="text-us-window__header">Send Us a Text</h1>
|
|
@@ -2970,7 +2970,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2970
2970
|
.text-us-window__error {
|
|
2971
2971
|
color: rgb(255, 49, 3);
|
|
2972
2972
|
}
|
|
2973
|
-
`],Ir([ue({attribute:!0})],Nr.prototype,"buildingSlug",void 0),Ir([ue({attribute:!0})],Nr.prototype,"orgSlug",void 0),Ir([ue({attribute:!1})],Nr.prototype,"onCloseClicked",void 0),Ir([ue()],Nr.prototype,"phoneNumberToCall",void 0),Ir([ue()],Nr.prototype,"phoneNumberToText",void 0),Ir([ue({attribute:!1})],Nr.prototype,"buildingId",void 0),Ir([ue({attribute:!1})],Nr.prototype,"buildingName",void 0),Ir([ue({attribute:!0})],Nr.prototype,"chatCallUsHeader",void 0),Ir([ue({attribute:!0})],Nr.prototype,"hasCallUsEnabled",void 0),Ir([ue({attribute:!0})],Nr.prototype,"hasTextUsEnabled",void 0),Ir([ue({attribute:!0})],Nr.prototype,"currentLeadSource",void 0),Ir([ue({attribute:!0})],Nr.prototype,"orgLegalName",void 0),Ir([ue({attribute:!0})],Nr.prototype,"leadSourceClient",void 0),Ir([ue({attribute:!0})],Nr.prototype,"leadSourceMultitouchClient",void 0),Ir([ce()],Nr.prototype,"hasSubmittedForm",void 0),Ir([ce()],Nr.prototype,"hasPhoneNumberError",void 0),Ir([ce()],Nr.prototype,"hasSubmissionError",void 0),Ir([ce()],Nr.prototype,"submittingTextUsOption",void 0),Ir([ue({attribute:!1})],Nr.prototype,"officeHoursTextInfo",void 0),Nr=Ir([se("call-us-window")],Nr);const Dr=async(e,t,n,i,o,a,s)=>{const l="+1"+e.replace("(","").replace(")","").replace(" ","").replace("-",""),u=new URLSearchParams(window.location.search),c={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=>gn({...e}))};ni("textUsSubmitted",{phone:l,originatingSource:o.find(e=>"property-website"!==e)||null}),await r().post("https://app.meetelise.com/platformApi/state/create/textMe",c,{headers:{"building-slug":i,"org-slug":n,"X-SecurityKey":"
|
|
2973
|
+
`],Ir([ue({attribute:!0})],Nr.prototype,"buildingSlug",void 0),Ir([ue({attribute:!0})],Nr.prototype,"orgSlug",void 0),Ir([ue({attribute:!1})],Nr.prototype,"onCloseClicked",void 0),Ir([ue()],Nr.prototype,"phoneNumberToCall",void 0),Ir([ue()],Nr.prototype,"phoneNumberToText",void 0),Ir([ue({attribute:!1})],Nr.prototype,"buildingId",void 0),Ir([ue({attribute:!1})],Nr.prototype,"buildingName",void 0),Ir([ue({attribute:!0})],Nr.prototype,"chatCallUsHeader",void 0),Ir([ue({attribute:!0})],Nr.prototype,"hasCallUsEnabled",void 0),Ir([ue({attribute:!0})],Nr.prototype,"hasTextUsEnabled",void 0),Ir([ue({attribute:!0})],Nr.prototype,"currentLeadSource",void 0),Ir([ue({attribute:!0})],Nr.prototype,"orgLegalName",void 0),Ir([ue({attribute:!0})],Nr.prototype,"leadSourceClient",void 0),Ir([ue({attribute:!0})],Nr.prototype,"leadSourceMultitouchClient",void 0),Ir([ce()],Nr.prototype,"hasSubmittedForm",void 0),Ir([ce()],Nr.prototype,"hasPhoneNumberError",void 0),Ir([ce()],Nr.prototype,"hasSubmissionError",void 0),Ir([ce()],Nr.prototype,"submittingTextUsOption",void 0),Ir([ue({attribute:!1})],Nr.prototype,"officeHoursTextInfo",void 0),Nr=Ir([se("call-us-window")],Nr);const Dr=async(e,t,n,i,o,a,s)=>{const l="+1"+e.replace("(","").replace(")","").replace(" ","").replace("-",""),u=new URLSearchParams(window.location.search),c={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=>gn({...e}))};ni("textUsSubmitted",{phone:l,originatingSource:o.find(e=>"property-website"!==e)||null}),await r().post("https://app.meetelise.com/platformApi/state/create/textMe",c,{headers:{"building-slug":i,"org-slug":n,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE"}})},Ur=u`
|
|
2974
2974
|
:host {
|
|
2975
2975
|
display: block;
|
|
2976
2976
|
position: relative;
|
|
@@ -4019,7 +4019,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4019
4019
|
box-sizing: border-box;
|
|
4020
4020
|
}
|
|
4021
4021
|
}
|
|
4022
|
-
`;var Ao,So,Eo,To
|
|
4022
|
+
`;var Ao,So,Eo,ko,To;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(Ao||(Ao={})),function(e){e.Debit="Debit",e.Credit="Credit"}(So||(So={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}(Eo||(Eo={})),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"}(ko||(ko={}));!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"}(To||(To={}));const _o=u`
|
|
4023
4023
|
:host {
|
|
4024
4024
|
display: block;
|
|
4025
4025
|
--table-header-bg: white;
|
|
@@ -4502,7 +4502,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4502
4502
|
<div class="skeleton-loader">
|
|
4503
4503
|
${Array.from({length:this.cards},(e,t)=>{const n=Array.isArray(this.rowsPerCard)?this.rowsPerCard[t]||2:this.rowsPerCard;return B`<skeleton-card .rows=${n}></skeleton-card>`})}
|
|
4504
4504
|
</div>
|
|
4505
|
-
`}};qo.styles=$o,Qo([ue({type:Number})],qo.prototype,"cards",void 0),Qo([ue({type:Array})],qo.prototype,"rowsPerCard",void 0),qo=Qo([se("skeleton-loader")],qo);var Wo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Vo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[Wr],this.groupedFees={[Fr.OneTime]:[],[Fr.Monthly]:[],[Fr.Quarterly]:[],[Fr.Annually]:[],[Fr.PerOccurrence]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.onAddonSelect=null,this.onRentableItemAdd=null,this.onRentableItemRemove=null}get addOns(){return[...Object.values(this.groupedFees).flat().filter(e=>e.isAddon),...this.rentableItems].sort((e,t)=>{var n,i,r,o;const a=e instanceof Rr,s=t instanceof Rr;if(!a&&!s)return 0;const l=!a||null!==(i=null===(n=e.allItems)||void 0===n?void 0:n.some(e=>e.available))&&void 0!==i&&i;return l===(!s||null!==(o=null===(r=t.allItems)||void 0===r?void 0:r.some(e=>e.available))&&void 0!==o&&o)?0:l?-1:1})}get rentAsFeeQuote(){var e,t;return(null===(e=this.quote)||void 0===e?void 0:e.rentCost)?{sourceFee:{name:"Rent",description:`Unit ${null===(t=this.selectedUnit)||void 0===t?void 0:t.unitNumber}`,frequency:
|
|
4505
|
+
`}};qo.styles=$o,Qo([ue({type:Number})],qo.prototype,"cards",void 0),Qo([ue({type:Array})],qo.prototype,"rowsPerCard",void 0),qo=Qo([se("skeleton-loader")],qo);var Wo=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Vo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[Wr],this.groupedFees={[Fr.OneTime]:[],[Fr.Monthly]:[],[Fr.Quarterly]:[],[Fr.Annually]:[],[Fr.PerOccurrence]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.onAddonSelect=null,this.onRentableItemAdd=null,this.onRentableItemRemove=null}get addOns(){return[...Object.values(this.groupedFees).flat().filter(e=>e.isAddon),...this.rentableItems].sort((e,t)=>{var n,i,r,o;const a=e instanceof Rr,s=t instanceof Rr;if(!a&&!s)return 0;const l=!a||null!==(i=null===(n=e.allItems)||void 0===n?void 0:n.some(e=>e.available))&&void 0!==i&&i;return l===(!s||null!==(o=null===(r=t.allItems)||void 0===r?void 0:r.some(e=>e.available))&&void 0!==o&&o)?0:l?-1:1})}get rentAsFeeQuote(){var e,t;return(null===(e=this.quote)||void 0===e?void 0:e.rentCost)?{sourceFee:{name:"Rent",description:`Unit ${null===(t=this.selectedUnit)||void 0===t?void 0:t.unitNumber}`,frequency:To.MONTHLY,pricingMetadata:{pricingCategory:"MANDATORY"}},amountRange:{fixedValue:this.quote.rentCost,minValue:null,maxValue:null},itemCombination:{quantities:[],toKey:()=>"rent"},isAddon:!1}:null}renderRecurringFeeSection(e,t){return(null==t?void 0:t.length)?B` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t;const n=[],i=[{freq:To.ANNUALLY,title:"Yearly Charges"},{freq:To.MONTHLY,title:"Monthly Charges"},{freq:To.BI_WEEKLY,title:"Bi-Weekly Charges"},{freq:To.WEEKLY,title:"Weekly Charges"},{freq:To.DAILY,title:"Daily Charges"},{freq:To.ONE_TIME,title:"Prior to Move-In"},{freq:To.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!==To.MONTHLY)continue;let i=null!==(t=null==r?void 0:r.filter(t=>{var n;return(null===(n=t.sourceFee)||void 0===n?void 0:n.frequency)===e||!!t.sourceRentableItem&&("monthly"===t.sourceRentableItem.rentFrequency&&e===To.MONTHLY||"annually"===t.sourceRentableItem.rentFrequency&&e===To.ANNUALLY)}))&&void 0!==t?t:[];if(e===To.MONTHLY){const e=this.rentAsFeeQuote;e&&(i=[e,...i])}const a=this.renderRecurringFeeSection(o,i);a&&n.push(a)}return n}renderFeesContent(){return this.selectedUnit?B`
|
|
4506
4506
|
<div class="fees-container">
|
|
4507
4507
|
${this.showSkeletonLoader?B`
|
|
4508
4508
|
<div class="loading-container">
|
|
@@ -4951,7 +4951,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4951
4951
|
<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}"/>
|
|
4952
4952
|
<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}"/>
|
|
4953
4953
|
</svg>
|
|
4954
|
-
`;var va=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 wa=class extends oe{constructor(){super(...arguments),this.isMinimized=!1,this.mobileStyles={},this.isFirstMount=!1,this.autoOpenChatWidget=!1,this.phoneNumber="",this.buildingName="",this.chatId="",this.orgLegalName="",this.chatCallUsHeader="",this.buildingId=0,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.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.onClickMinimize=()=>{},this.onSstClose=ya(),this.overrideRentgrata=!1,this.launcherStyles={},this.primaryColor=Le,this.backgroundColor=Re,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,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=
|
|
4954
|
+
`;var va=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 wa=class extends oe{constructor(){super(...arguments),this.isMinimized=!1,this.mobileStyles={},this.isFirstMount=!1,this.autoOpenChatWidget=!1,this.phoneNumber="",this.buildingName="",this.chatId="",this.orgLegalName="",this.chatCallUsHeader="",this.buildingId=0,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.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.onClickMinimize=()=>{},this.onSstClose=ya(),this.overrideRentgrata=!1,this.launcherStyles={},this.primaryColor=Le,this.backgroundColor=Re,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,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=ke(),this.tourSchedulerRef=ke(),this.calculatorWindowRef=ke(),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(),fa(),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.onClickPhoneOption=e=>{e.preventDefault(),e.stopPropagation(),fa(),this.isCallUsWindowOpen=!0},this.onClickApplyNowOption=e=>{e.preventDefault(),e.stopPropagation(),fa(),window.open(this.applicationLink,"_blank")},this.onClickPriceCalculatorOption=e=>{e.preventDefault(),e.stopPropagation(),fa(),this.isCalculatorWindowOpen=!0},this.onClosePhoneWindow=()=>{this.isCallUsWindowOpen=!1},this.onClickSSTOption=e=>{e.preventDefault(),e.stopPropagation(),fa(),zn(),Gn(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=()=>mn()||this.isMinimized||this.designConcept===Si.MINIMIZED?B` ${this.hasHideMobileFeatures&&mn()?B`<collapse-expand-button
|
|
4955
4955
|
.toExpand=${this.isMobileFeaturesExpanded}
|
|
4956
4956
|
.primaryColor=${this.primaryColor}
|
|
4957
4957
|
.onClick=${this.toggleMobileFeatures}
|
|
@@ -5304,7 +5304,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5304
5304
|
</div>`:""}
|
|
5305
5305
|
</div>
|
|
5306
5306
|
</div>
|
|
5307
|
-
`}}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",
|
|
5307
|
+
`}}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",kr),window.customElements.get("call-us-window")||window.customElements.define("call-us-window",Nr),window.eliseAi.onOpenSST=e=>{this.isSSTWindowOpen=!0,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.onExitChat(),e&&e()},(this.hasChatEnabledDesktop||this.hasChatEnabledMobile)&&(window.eliseAi.onOpenChat=e=>{this.onChatTapped(),this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,e&&e()}),(this.hasCallUsEnabledDesktop||this.hasCallUsEnabledMobile)&&(window.eliseAi.onOpenCallUsWindow=e=>{this.isCallUsWindowOpen=!0,this.isSSTWindowOpen=!1,this.isEmailWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasEmailEnabledDesktop||this.hasEmailEnabledMobile)&&(window.eliseAi.onOpenEmailUsWindow=e=>{this.isEmailWindowOpen=!0,this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasPricingCalculatorEnabledDesktop||this.hasPricingCalculatorEnabledMobile)&&(window.eliseAi.onOpenPriceCalculatorWindow=e=>{this.isCalculatorWindowOpen=!0,e&&e()});const e={top:mn()||void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:mn()||void 0===this.bottom||isNaN(this.bottom)?void 0:`${this.bottom}px`,left:mn()||void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:mn()||void 0===this.right||isNaN(this.right)?void 0:`${this.right}px`};return B`
|
|
5308
5308
|
<div
|
|
5309
5309
|
class=${Zn()({"launcher__mobile-launcher-wrapper":mn()||this.isMinimized,"launcher__mini-launcher-wrapper":!mn()&&!this.isMinimized,"launcher__mini-elevated":"livcor"===this.orgSlug.toLowerCase()&&(mn()||this.isMinimized)})}
|
|
5310
5310
|
style=${Ue({...this.launcherStyles,...this.mobileStyles,top:mn()||void 0===this.top||isNaN(this.top)?void 0!==this.mobileStyles.top?`${this.mobileStyles.top}px`:void 0:this.top-700+"px",bottom:mn()||void 0===this.bottom||isNaN(this.bottom)?void 0!==this.mobileStyles.bottom?`${this.mobileStyles.bottom}px`:"72px":`${this.bottom}px`,left:mn()||void 0===this.left||isNaN(this.left)?void 0!==this.mobileStyles.left?`${this.mobileStyles.left}px`:void 0:`${this.left}px`,right:mn()||void 0===this.right||isNaN(this.right)?void 0!==this.mobileStyles.right?`${this.mobileStyles.right}px`:"18px":`${this.right}px`})}
|
|
@@ -5412,7 +5412,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5412
5412
|
${br}
|
|
5413
5413
|
${vr}
|
|
5414
5414
|
${wr}
|
|
5415
|
-
`,va([ue({attribute:!0})],wa.prototype,"isMinimized",void 0),va([ue()],wa.prototype,"mobileStyles",void 0),va([ue({type:Boolean})],wa.prototype,"isFirstMount",void 0),va([ue({attribute:!1})],wa.prototype,"autoOpenChatWidget",void 0),va([ue()],wa.prototype,"phoneNumber",void 0),va([ue({attribute:!0})],wa.prototype,"buildingName",void 0),va([ue({attribute:!0})],wa.prototype,"chatId",void 0),va([ue({attribute:!0})],wa.prototype,"orgLegalName",void 0),va([ue({attribute:!0})],wa.prototype,"chatCallUsHeader",void 0),va([ue({attribute:!1})],wa.prototype,"buildingId",void 0),va([ue({attribute:!0})],wa.prototype,"buildingSlug",void 0),va([ue({attribute:!0})],wa.prototype,"orgSlug",void 0),va([ue({attribute:!0})],wa.prototype,"sgtUrl",void 0),va([ue({attribute:!0})],wa.prototype,"selfGuidedTourEnabled",void 0),va([ue({attribute:!0})],wa.prototype,"selfGuidedToursTypeOffered",void 0),va([ue({attribute:!0})],wa.prototype,"designConcept",void 0),va([ue({attribute:!0})],wa.prototype,"featureFlagShowDropdown",void 0),va([ue({attribute:!1})],wa.prototype,"leadSources",void 0),va([ue({attribute:!0})],wa.prototype,"currentLeadSource",void 0),va([ue({attribute:!0})],wa.prototype,"escortedToursLink",void 0),va([ue({attribute:!0})],wa.prototype,"escortedToursTypeOffered",void 0),va([ue({attribute:!0})],wa.prototype,"virtualToursLink",void 0),va([ue({attribute:!0})],wa.prototype,"virtualToursTypeOffered",void 0),va([ue({type:Boolean})],wa.prototype,"hasChatEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasChatEnabledMobile",void 0),va([ue({type:Boolean})],wa.prototype,"hasEmailEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasEmailEnabledMobile",void 0),va([ue({attribute:!0})],wa.prototype,"hasApplyNowEnabledDesktop",void 0),va([ue({attribute:!0})],wa.prototype,"hasApplyNowEnabledMobile",void 0),va([ue({attribute:!0})],wa.prototype,"applicationLink",void 0),va([ue({type:Boolean})],wa.prototype,"hasCallUsEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasCallUsEnabledMobile",void 0),va([ue({type:Boolean})],wa.prototype,"hasTextUsEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasTextUsEnabledMobile",void 0),va([ue({type:Boolean})],wa.prototype,"hasSSTEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasSSTEnabledMobile",void 0),va([ue({attribute:!1})],wa.prototype,"tourTypeOptions",void 0),va([ue({attribute:!0})],wa.prototype,"hasDynamicSchedulingEnabled",void 0),va([ue({attribute:!0})],wa.prototype,"hasPricingCalculatorEnabledDesktop",void 0),va([ue({attribute:!0})],wa.prototype,"hasPricingCalculatorEnabledMobile",void 0),va([ue({attribute:!1})],wa.prototype,"hasHideMobileFeatures",void 0),va([ue({type:Number})],wa.prototype,"right",void 0),va([ue({type:Number})],wa.prototype,"bottom",void 0),va([ue({type:Number})],wa.prototype,"top",void 0),va([ue({type:Number})],wa.prototype,"left",void 0),va([ue({attribute:!0})],wa.prototype,"showTourNextToChat",void 0),va([ue({attribute:!1})],wa.prototype,"onChatTapped",void 0),va([ue({attribute:!0})],wa.prototype,"onClickMinimize",void 0),va([ue({attribute:!0})],wa.prototype,"onSstClose",void 0),va([ue({attribute:!0})],wa.prototype,"overrideRentgrata",void 0),va([ue({attribute:!1})],wa.prototype,"launcherStyles",void 0),va([ue({attribute:!0})],wa.prototype,"primaryColor",void 0),va([ue({attribute:!0})],wa.prototype,"backgroundColor",void 0),va([ue({attribute:!0})],wa.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),va([ue({attribute:!0})],wa.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),va([ue({attribute:!0})],wa.prototype,"leadSourceClient",void 0),va([ce()],wa.prototype,"leadSourceMultitouchClient",void 0),va([ce()],wa.prototype,"isEmailWindowOpen",void 0),va([ce()],wa.prototype,"isCallUsWindowOpen",void 0),va([ce()],wa.prototype,"isSSTWindowOpen",void 0),va([ce()],wa.prototype,"isTextUsWindowOpen",void 0),va([ce()],wa.prototype,"isCalculatorWindowOpen",void 0),va([ce()],wa.prototype,"isMobileFeaturesExpanded",void 0),wa=va([se("meetelise-launcher")],wa);const Ca=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",wa)},xa=["app.meetelise.com","staging.eliseai.com","localhost"],Aa={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"}},Sa=e=>{const t=window.location.hostname;if(!xa.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 Aa&&(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=Aa[e];n&&(i[n.desktop]=t,i[n.mobile]=t)}),i};var Ea=n(5072),Ta=n.n(Ea),ka=n(7825),_a=n.n(ka),Oa=n(7659),Pa=n.n(Oa),Ma=n(5056),Ia=n.n(Ma),Na=n(540),Da=n.n(Na),Ua=n(1113),La=n.n(Ua),Ra=n(5541),Ba={};Ba.styleTagTransform=La(),Ba.setAttributes=Ia(),Ba.insert=Pa().bind(null,"head"),Ba.domAPI=_a(),Ba.insertStyleElement=Da();Ta()(Ra.A,Ba);Ra.A&&Ra.A.locals&&Ra.A.locals;async function ja(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 Fa(n.data,t)}return[]}catch(e){return[]}}const Fa=(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)})};var Ha,$a=n(8805),za=n.n($a),Ga=new Uint8Array(16);function Qa(){if(!Ha&&!(Ha="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 Ha(Ga)}const qa=/^(?:[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 Wa=function(e){return"string"==typeof e&&qa.test(e)};for(var Va=[],Ya=0;Ya<256;++Ya)Va.push((Ya+256).toString(16).substr(1));const Ka=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Va[e[t+0]]+Va[e[t+1]]+Va[e[t+2]]+Va[e[t+3]]+"-"+Va[e[t+4]]+Va[e[t+5]]+"-"+Va[e[t+6]]+Va[e[t+7]]+"-"+Va[e[t+8]]+Va[e[t+9]]+"-"+Va[e[t+10]]+Va[e[t+11]]+Va[e[t+12]]+Va[e[t+13]]+Va[e[t+14]]+Va[e[t+15]]).toLowerCase();if(!Wa(n))throw TypeError("Stringified UUID is invalid");return n};const Xa=function(e,t,n){var i=(e=e||{}).random||(e.rng||Qa)();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 Ka(i)},Za=e=>localStorage.removeItem("com.elise.webchat.slug="+e),Ja=(e,t,n)=>{const i=En(new Date),r=n||`lead_${Xa()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:r,timestamp:i,initiatedChat:t})),{leadId:r,timestamp:Nn(i),buildingSlug:e,initiatedChat:t}},es=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(ts(e,i))return i}catch(e){}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},ts=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if(dn(t.timestamp,e))return!1}}catch(e){}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp)&&!yn(t.timestamp,24)};var ns;!function(e){e.noReply="no-reply",e.text="text",e.media="media"}(ns||(ns={}));const is=e=>e.type===os.text,rs=e=>e.type===os.media;var os;!function(e){e.text="text",e.media="media"}(os||(os={}));const as=class{constructor(e,t,n,i=null,r,o,a=null,s=Kl.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.widgetType=Kl.Default,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t,n;const i={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,i],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter(e=>e.message.messageType!==ns.noReply),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const r="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;if(null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:r}),!r&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=r,"ai_message"===e.message.customType){this.simpleChatMessages.some(e=>e.type===os.text&&e.message.includes("confirmed for your tour"))&&ni("scheduledTourEvent",{tourDetails:e.message,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.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=this.simpleChatMessages.some(e=>{if(!is(e))return!1;const t=e.chunks.find(e=>e.isDone);return!t||e.chunks.length===t.order});t&&(this.streamingMessageTimeout=setTimeout(()=>{gi({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:fi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),this.getChannelHistory()},e))},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;ni("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)===ns.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&&gi({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}},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=Ja(this.buildingSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken(async()=>{var t,n,i,r,o,a,s,l;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout(()=>{this.buildingWebchatView&&gi({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:fi.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===Kl.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=>gn({...e}))}}),null===(a=this.leadSourceMultitouchClient)||void 0===a||a.resetLeadSourceTouchpoints()),this.isFirstChatMessageSent||(ni("firstChatMessageSent",{message:e,buildingId:null===(s=this.buildingWebchatView)||void 0===s?void 0:s.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),ni("chatMessageSent",{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}))}),!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)?(gi({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:fi.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:os.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:os.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:os.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}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(za())({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{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&&gi({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}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&&gi({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}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&&gi({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}}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!==ns.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&&gi({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:fi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}shouldCreateAsDevState(){return location.href.startsWith("https://app.meetelise.com/settings/widgets")||location.href.includes("demo/utilities")}},ss=(e,t,n)=>{const i=`tel:${e}`,r=`sms:${e}`,o=`whatsapp://send?phone=${e}}`,a=`facetime:${e}`,s=`facetime-audio:${e}`,l=/(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,u=/(tel|sms):(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,c=/whatsapp:\/\/send\?phone=\d+/g,d=/(facetime|facetime-audio):\d+/g,h=document.body.getElementsByTagName("*");let p=!1;const f=e.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let g=!1,m=!1,y=0;for(let e=0;e<h.length;e++)if(h[e].nodeType===Node.ELEMENT_NODE){if(1===h[e].childNodes.length&&h[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=h[e].textContent;if(!t)continue;const n=t.replace(l,f);t!==n&&(y++,h[e].textContent=n),p=!0,g||(g=!0)}if(h[e].hasAttribute("href")){const t=h[e].getAttribute("href");if(!t)continue;let n="",l=u;t.startsWith("sms:")?n=r:t.startsWith("whatsapp:")?(n=o,l=c):t.startsWith("facetime:")?(n=a,l=d):t.startsWith("facetime-audio:")?(n=s,l=d):n=i;const p=t.replace(l,n);h[e].setAttribute("href",p),m||(m=!0)}}return g&&gi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:f,website:window.location.href},logType:fi.info,buildingSlug:n,orgSlug:t}),m&&gi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:f,website:window.location.href},logType:fi.info,buildingSlug:n,orgSlug:t}),p||gi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:fi.warn,buildingSlug:n,orgSlug:t}),y};var ls=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 us=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Le,this.toExpand=!1}render(){return B`
|
|
5415
|
+
`,va([ue({attribute:!0})],wa.prototype,"isMinimized",void 0),va([ue()],wa.prototype,"mobileStyles",void 0),va([ue({type:Boolean})],wa.prototype,"isFirstMount",void 0),va([ue({attribute:!1})],wa.prototype,"autoOpenChatWidget",void 0),va([ue()],wa.prototype,"phoneNumber",void 0),va([ue({attribute:!0})],wa.prototype,"buildingName",void 0),va([ue({attribute:!0})],wa.prototype,"chatId",void 0),va([ue({attribute:!0})],wa.prototype,"orgLegalName",void 0),va([ue({attribute:!0})],wa.prototype,"chatCallUsHeader",void 0),va([ue({attribute:!1})],wa.prototype,"buildingId",void 0),va([ue({attribute:!0})],wa.prototype,"buildingSlug",void 0),va([ue({attribute:!0})],wa.prototype,"orgSlug",void 0),va([ue({attribute:!0})],wa.prototype,"sgtUrl",void 0),va([ue({attribute:!0})],wa.prototype,"selfGuidedTourEnabled",void 0),va([ue({attribute:!0})],wa.prototype,"selfGuidedToursTypeOffered",void 0),va([ue({attribute:!0})],wa.prototype,"designConcept",void 0),va([ue({attribute:!0})],wa.prototype,"featureFlagShowDropdown",void 0),va([ue({attribute:!1})],wa.prototype,"leadSources",void 0),va([ue({attribute:!0})],wa.prototype,"currentLeadSource",void 0),va([ue({attribute:!0})],wa.prototype,"escortedToursLink",void 0),va([ue({attribute:!0})],wa.prototype,"escortedToursTypeOffered",void 0),va([ue({attribute:!0})],wa.prototype,"virtualToursLink",void 0),va([ue({attribute:!0})],wa.prototype,"virtualToursTypeOffered",void 0),va([ue({type:Boolean})],wa.prototype,"hasChatEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasChatEnabledMobile",void 0),va([ue({type:Boolean})],wa.prototype,"hasEmailEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasEmailEnabledMobile",void 0),va([ue({attribute:!0})],wa.prototype,"hasApplyNowEnabledDesktop",void 0),va([ue({attribute:!0})],wa.prototype,"hasApplyNowEnabledMobile",void 0),va([ue({attribute:!0})],wa.prototype,"applicationLink",void 0),va([ue({type:Boolean})],wa.prototype,"hasCallUsEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasCallUsEnabledMobile",void 0),va([ue({type:Boolean})],wa.prototype,"hasTextUsEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasTextUsEnabledMobile",void 0),va([ue({type:Boolean})],wa.prototype,"hasSSTEnabledDesktop",void 0),va([ue({type:Boolean})],wa.prototype,"hasSSTEnabledMobile",void 0),va([ue({attribute:!1})],wa.prototype,"tourTypeOptions",void 0),va([ue({attribute:!0})],wa.prototype,"hasDynamicSchedulingEnabled",void 0),va([ue({attribute:!0})],wa.prototype,"hasPricingCalculatorEnabledDesktop",void 0),va([ue({attribute:!0})],wa.prototype,"hasPricingCalculatorEnabledMobile",void 0),va([ue({attribute:!1})],wa.prototype,"hasHideMobileFeatures",void 0),va([ue({type:Number})],wa.prototype,"right",void 0),va([ue({type:Number})],wa.prototype,"bottom",void 0),va([ue({type:Number})],wa.prototype,"top",void 0),va([ue({type:Number})],wa.prototype,"left",void 0),va([ue({attribute:!0})],wa.prototype,"showTourNextToChat",void 0),va([ue({attribute:!1})],wa.prototype,"onChatTapped",void 0),va([ue({attribute:!0})],wa.prototype,"onClickMinimize",void 0),va([ue({attribute:!0})],wa.prototype,"onSstClose",void 0),va([ue({attribute:!0})],wa.prototype,"overrideRentgrata",void 0),va([ue({attribute:!1})],wa.prototype,"launcherStyles",void 0),va([ue({attribute:!0})],wa.prototype,"primaryColor",void 0),va([ue({attribute:!0})],wa.prototype,"backgroundColor",void 0),va([ue({attribute:!0})],wa.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),va([ue({attribute:!0})],wa.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),va([ue({attribute:!0})],wa.prototype,"leadSourceClient",void 0),va([ce()],wa.prototype,"leadSourceMultitouchClient",void 0),va([ce()],wa.prototype,"isEmailWindowOpen",void 0),va([ce()],wa.prototype,"isCallUsWindowOpen",void 0),va([ce()],wa.prototype,"isSSTWindowOpen",void 0),va([ce()],wa.prototype,"isTextUsWindowOpen",void 0),va([ce()],wa.prototype,"isCalculatorWindowOpen",void 0),va([ce()],wa.prototype,"isMobileFeaturesExpanded",void 0),wa=va([se("meetelise-launcher")],wa);const Ca=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",wa)},xa=["app.meetelise.com","staging.eliseai.com","localhost"],Aa={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"}},Sa=e=>{const t=window.location.hostname;if(!xa.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 Aa&&(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=Aa[e];n&&(i[n.desktop]=t,i[n.mobile]=t)}),i};var Ea=n(5072),ka=n.n(Ea),Ta=n(7825),_a=n.n(Ta),Oa=n(7659),Pa=n.n(Oa),Ma=n(5056),Ia=n.n(Ma),Na=n(540),Da=n.n(Na),Ua=n(1113),La=n.n(Ua),Ra=n(5541),Ba={};Ba.styleTagTransform=La(),Ba.setAttributes=Ia(),Ba.insert=Pa().bind(null,"head"),Ba.domAPI=_a(),Ba.insertStyleElement=Da();ka()(Ra.A,Ba);Ra.A&&Ra.A.locals&&Ra.A.locals;async function ja(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 Fa(n.data,t)}return[]}catch(e){return[]}}const Fa=(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)})};var Ha,$a=n(8805),za=n.n($a),Ga=new Uint8Array(16);function Qa(){if(!Ha&&!(Ha="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 Ha(Ga)}const qa=/^(?:[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 Wa=function(e){return"string"==typeof e&&qa.test(e)};for(var Va=[],Ya=0;Ya<256;++Ya)Va.push((Ya+256).toString(16).substr(1));const Ka=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Va[e[t+0]]+Va[e[t+1]]+Va[e[t+2]]+Va[e[t+3]]+"-"+Va[e[t+4]]+Va[e[t+5]]+"-"+Va[e[t+6]]+Va[e[t+7]]+"-"+Va[e[t+8]]+Va[e[t+9]]+"-"+Va[e[t+10]]+Va[e[t+11]]+Va[e[t+12]]+Va[e[t+13]]+Va[e[t+14]]+Va[e[t+15]]).toLowerCase();if(!Wa(n))throw TypeError("Stringified UUID is invalid");return n};const Xa=function(e,t,n){var i=(e=e||{}).random||(e.rng||Qa)();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 Ka(i)},Za=e=>localStorage.removeItem("com.elise.webchat.slug="+e),Ja=(e,t,n)=>{const i=En(new Date),r=n||`lead_${Xa()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:r,timestamp:i,initiatedChat:t})),{leadId:r,timestamp:Nn(i),buildingSlug:e,initiatedChat:t}},es=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(ts(e,i))return i}catch(e){}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},ts=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if(dn(t.timestamp,e))return!1}}catch(e){}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp)&&!yn(t.timestamp,24)};var ns;!function(e){e.noReply="no-reply",e.text="text",e.media="media"}(ns||(ns={}));const is=e=>e.type===os.text,rs=e=>e.type===os.media;var os;!function(e){e.text="text",e.media="media"}(os||(os={}));const as=class{constructor(e,t,n,i=null,r,o,a=null,s=Kl.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.widgetType=Kl.Default,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t,n;const i={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,i],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter(e=>e.message.messageType!==ns.noReply),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const r="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;if(null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:r}),!r&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=r,"ai_message"===e.message.customType){this.simpleChatMessages.some(e=>e.type===os.text&&e.message.includes("confirmed for your tour"))&&ni("scheduledTourEvent",{tourDetails:e.message,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.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=this.simpleChatMessages.some(e=>{if(!is(e))return!1;const t=e.chunks.find(e=>e.isDone);return!t||e.chunks.length===t.order});t&&(this.streamingMessageTimeout=setTimeout(()=>{gi({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:fi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),this.getChannelHistory()},e))},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;ni("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)===ns.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&&gi({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}},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=Ja(this.buildingSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken(async()=>{var t,n,i,r,o,a,s,l;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout(()=>{this.buildingWebchatView&&gi({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:fi.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===Kl.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=>gn({...e}))}}),null===(a=this.leadSourceMultitouchClient)||void 0===a||a.resetLeadSourceTouchpoints()),this.isFirstChatMessageSent||(ni("firstChatMessageSent",{message:e,buildingId:null===(s=this.buildingWebchatView)||void 0===s?void 0:s.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),ni("chatMessageSent",{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}))}),!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)?(gi({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:fi.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:os.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:os.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:os.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}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(za())({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{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&&gi({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}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&&gi({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}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&&gi({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:fi.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}}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!==ns.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&&gi({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:fi.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})}}shouldCreateAsDevState(){return location.href.startsWith("https://app.meetelise.com/settings/widgets")||location.href.includes("demo/utilities")}},ss=(e,t,n)=>{const i=`tel:${e}`,r=`sms:${e}`,o=`whatsapp://send?phone=${e}}`,a=`facetime:${e}`,s=`facetime-audio:${e}`,l=/(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,u=/(tel|sms):(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}/g,c=/whatsapp:\/\/send\?phone=\d+/g,d=/(facetime|facetime-audio):\d+/g,h=document.body.getElementsByTagName("*");let p=!1;const f=e.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let g=!1,m=!1,y=0;for(let e=0;e<h.length;e++)if(h[e].nodeType===Node.ELEMENT_NODE){if(1===h[e].childNodes.length&&h[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=h[e].textContent;if(!t)continue;const n=t.replace(l,f);t!==n&&(y++,h[e].textContent=n),p=!0,g||(g=!0)}if(h[e].hasAttribute("href")){const t=h[e].getAttribute("href");if(!t)continue;let n="",l=u;t.startsWith("sms:")?n=r:t.startsWith("whatsapp:")?(n=o,l=c):t.startsWith("facetime:")?(n=a,l=d):t.startsWith("facetime-audio:")?(n=s,l=d):n=i;const p=t.replace(l,n);h[e].setAttribute("href",p),m||(m=!0)}}return g&&gi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:f,website:window.location.href},logType:fi.info,buildingSlug:n,orgSlug:t}),m&&gi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:f,website:window.location.href},logType:fi.info,buildingSlug:n,orgSlug:t}),p||gi({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:fi.warn,buildingSlug:n,orgSlug:t}),y};var ls=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 us=class extends oe{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Le,this.toExpand=!1}render(){return B`
|
|
5416
5416
|
<div
|
|
5417
5417
|
class=${this.toExpand?"button-container mini":"button-container"}
|
|
5418
5418
|
@click=${this.onClick}
|
|
@@ -5901,7 +5901,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5901
5901
|
.checkbox:hover {
|
|
5902
5902
|
opacity: 0.5;
|
|
5903
5903
|
}
|
|
5904
|
-
`,{entries:ps,setPrototypeOf:fs,isFrozen:gs,getPrototypeOf:ms,getOwnPropertyDescriptor:ys}=Object;let{freeze:bs,seal:vs,create:ws}=Object,{apply:Cs,construct:xs}="undefined"!=typeof Reflect&&Reflect;bs||(bs=function(e){return e}),vs||(vs=function(e){return e}),Cs||(Cs=function(e,t,n){return e.apply(t,n)}),xs||(xs=function(e,t){return new e(...t)});const As=Bs(Array.prototype.forEach),Ss=Bs(Array.prototype.lastIndexOf),Es=Bs(Array.prototype.pop),Ts=Bs(Array.prototype.push),ks=Bs(Array.prototype.splice),_s=Bs(String.prototype.toLowerCase),Os=Bs(String.prototype.toString),Ps=Bs(String.prototype.match),Ms=Bs(String.prototype.replace),Is=Bs(String.prototype.indexOf),Ns=Bs(String.prototype.trim),Ds=Bs(Object.prototype.hasOwnProperty),Us=Bs(RegExp.prototype.test),Ls=(Rs=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xs(Rs,t)});var Rs;function Bs(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 Cs(e,t,i)}}function js(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_s;fs&&fs(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(gs(t)||(t[i]=e),r=e)}e[r]=!0}return e}function Fs(e){for(let t=0;t<e.length;t++){Ds(e,t)||(e[t]=null)}return e}function Hs(e){const t=ws(null);for(const[n,i]of ps(e)){Ds(e,n)&&(Array.isArray(i)?t[n]=Fs(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=Hs(i):t[n]=i)}return t}function $s(e,t){for(;null!==e;){const n=ys(e,t);if(n){if(n.get)return Bs(n.get);if("function"==typeof n.value)return Bs(n.value)}e=ms(e)}return function(){return null}}const zs=bs(["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"]),Gs=bs(["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"]),Qs=bs(["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"]),qs=bs(["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"]),Ws=bs(["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"]),Vs=bs(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ys=bs(["#text"]),Ks=bs(["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"]),Xs=bs(["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"]),Zs=bs(["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"]),Js=bs(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),el=vs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tl=vs(/<%[\w\W]*|[\w\W]*%>/gm),nl=vs(/\$\{[\w\W]*/gm),il=vs(/^data-[\-\w.\u00B7-\uFFFF]+$/),rl=vs(/^aria-[\-\w]+$/),ol=vs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),al=vs(/^(?:\w+script|data):/i),sl=vs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ll=vs(/^html$/i),ul=vs(/^[a-z][.\w]*(-[.\w]+)+$/i);var cl=Object.freeze({__proto__:null,ARIA_ATTR:rl,ATTR_WHITESPACE:sl,CUSTOM_ELEMENT:ul,DATA_ATTR:il,DOCTYPE_NAME:ll,ERB_EXPR:tl,IS_ALLOWED_URI:ol,IS_SCRIPT_OR_DATA:al,MUSTACHE_EXPR:el,TMPLIT_EXPR:nl});const dl=1,hl=3,pl=7,fl=8,gl=9,ml=function(){return"undefined"==typeof window?null:window};var yl=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ml();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==gl||!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:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=u.prototype,m=$s(g,"cloneNode"),y=$s(g,"remove"),b=$s(g,"nextSibling"),v=$s(g,"childNodes"),w=$s(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:A,createNodeIterator:S,createDocumentFragment:E,getElementsByTagName:T}=i,{importNode:k}=r;let _={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ps&&"function"==typeof w&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:O,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:L}=cl;let{IS_ALLOWED_URI:R}=cl,B=null;const j=js({},[...zs,...Gs,...Qs,...Ws,...Ys]);let F=null;const H=js({},[...Ks,...Xs,...Zs,...Js]);let $=Object.seal(ws(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}})),z=null,G=null,Q=!0,q=!0,W=!1,V=!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=js({},["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 ce=null;const de=js({},["audio","video","img","source","image","track"]);let he=null;const pe=js({},["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=js({},[fe,ge,me],Os);let Ce=js({},["mi","mo","mn","ms","mtext"]),xe=js({},["annotation-xml"]);const Ae=js({},["title","style","font","a","script"]);let Se=null;const Ee=["application/xhtml+xml","text/html"];let Te=null,ke=null;const _e=i.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Pe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ke||ke!==e){if(e&&"object"==typeof e||(e={}),e=Hs(e),Se=-1===Ee.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Te="application/xhtml+xml"===Se?Os:_s,B=Ds(e,"ALLOWED_TAGS")?js({},e.ALLOWED_TAGS,Te):j,F=Ds(e,"ALLOWED_ATTR")?js({},e.ALLOWED_ATTR,Te):H,ve=Ds(e,"ALLOWED_NAMESPACES")?js({},e.ALLOWED_NAMESPACES,Os):we,he=Ds(e,"ADD_URI_SAFE_ATTR")?js(Hs(pe),e.ADD_URI_SAFE_ATTR,Te):pe,ce=Ds(e,"ADD_DATA_URI_TAGS")?js(Hs(de),e.ADD_DATA_URI_TAGS,Te):de,le=Ds(e,"FORBID_CONTENTS")?js({},e.FORBID_CONTENTS,Te):ue,z=Ds(e,"FORBID_TAGS")?js({},e.FORBID_TAGS,Te):Hs({}),G=Ds(e,"FORBID_ATTR")?js({},e.FORBID_ATTR,Te):Hs({}),se=!!Ds(e,"USE_PROFILES")&&e.USE_PROFILES,Q=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,V=!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,R=e.ALLOWED_URI_REGEXP||ol,ye=e.NAMESPACE||me,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,xe=e.HTML_INTEGRATION_POINTS||xe,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(q=!1),te&&(ee=!0),se&&(B=js({},Ys),F=[],!0===se.html&&(js(B,zs),js(F,Ks)),!0===se.svg&&(js(B,Gs),js(F,Xs),js(F,Js)),!0===se.svgFilters&&(js(B,Qs),js(F,Xs),js(F,Js)),!0===se.mathMl&&(js(B,Ws),js(F,Zs),js(F,Js))),e.ADD_TAGS&&(B===j&&(B=Hs(B)),js(B,e.ADD_TAGS,Te)),e.ADD_ATTR&&(F===H&&(F=Hs(F)),js(F,e.ADD_ATTR,Te)),e.ADD_URI_SAFE_ATTR&&js(he,e.ADD_URI_SAFE_ATTR,Te),e.FORBID_CONTENTS&&(le===ue&&(le=Hs(le)),js(le,e.FORBID_CONTENTS,Te)),oe&&(B["#text"]=!0),X&&js(B,["html","head","body"]),B.table&&(js(B,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ls('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ls('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(""));bs&&bs(e),ke=e}},Me=js({},[...Gs,...Qs,...qs]),Ie=js({},[...Ws,...Vs]),Ne=function(e){Ts(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},De=function(e,t){try{Ts(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ts(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){}},Ue=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=Ps(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=A.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?T.call(t,X?"html":"body")[0]:X?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function je(e,t,i){As(e,e=>{e.call(n,t,i,ke)})}const Fe=function(e){let t=null;if(je(_.beforeSanitizeElements,e,null),Re(e))return Ne(e),!0;const i=Te(e.nodeName);if(je(_.uponSanitizeElement,e,{tagName:i,allowedTags:B}),K&&e.hasChildNodes()&&!Be(e.firstElementChild)&&Us(/<[/\w!]/g,e.innerHTML)&&Us(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===pl)return Ne(e),!0;if(K&&e.nodeType===fl&&Us(/<[/\w]/g,e.data))return Ne(e),!0;if(!B[i]||z[i]){if(!z[i]&&$e(i)){if($.tagNameCheck instanceof RegExp&&Us($.tagNameCheck,i))return!1;if($.tagNameCheck instanceof Function&&$.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=_s(e.tagName),i=_s(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(Me[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]&&(Ae[n]||!Me[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Us(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===hl&&(t=e.textContent,As([O,P,M],e=>{t=Ms(t,e," ")}),e.textContent!==t&&(Ts(n.removed,{element:e.cloneNode()}),e.textContent=t)),je(_.afterSanitizeElements,e,null),!1):(Ne(e),!0)},He=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in _e))return!1;if(q&&!G[t]&&Us(I,t));else if(Q&&Us(N,t));else if(!F[t]||G[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&Us($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&Us($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||"is"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Us($.tagNameCheck,n)||$.tagNameCheck instanceof Function&&$.tagNameCheck(n))))return!1}else if(he[t]);else if(Us(R,Ms(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Is(n,"data:")||!ce[e]){if(W&&!Us(D,Ms(n,U,"")));else if(n)return!1}else;return!0},$e=function(e){return"annotation-xml"!==e&&Ps(e,L)},ze=function(e){je(_.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let r=t.length;for(;r--;){const o=t[r],{name:a,namespaceURI:s,value:l}=o,u=Te(a),c=l;let d="value"===a?c:Ns(c);if(i.attrName=u,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,je(_.uponSanitizeAttribute,e,i),d=i.attrValue,!re||"id"!==u&&"name"!==u||(De(a,e),d="user-content-"+d),K&&Us(/((--!?|])>)|<\/(style|title)/i,d)){De(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){De(a,e);continue}if(!V&&Us(/\/>/i,d)){De(a,e);continue}Y&&As([O,P,M],e=>{d=Ms(d,e," ")});const h=Te(e.nodeName);if(He(h,u,d)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":d=C.createHTML(d);break;case"TrustedScriptURL":d=C.createScriptURL(d)}if(d!==c)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),Re(e)?Ne(e):Es(n.removed)}catch(t){De(a,e)}}else De(a,e)}je(_.afterSanitizeAttributes,e,null)},Ge=function e(t){let n=null;const i=Le(t);for(je(_.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)je(_.uponSanitizeShadowNode,n,null),Fe(n),ze(n),n.content instanceof a&&e(n.content);je(_.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&&!Be(e)){if("function"!=typeof e.toString)throw Ls("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ls("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Pe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Te(e.nodeName);if(!B[t]||z[t])throw Ls("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=Ue("\x3c!----\x3e"),o=i.ownerDocument.importNode(e,!0),o.nodeType===dl&&"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=Ue(e),!i)return ee?null:ne?x:""}i&&J&&Ne(i.firstChild);const c=Le(ae?e:i);for(;s=c.nextNode();)Fe(s),ze(s),s.content instanceof a&&Ge(s.content);if(ae)return e;if(ee){if(te)for(u=E.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(F.shadowroot||F.shadowrootmode)&&(u=k.call(r,u,!0)),u}let d=X?i.outerHTML:i.innerHTML;return X&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Us(ll,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Y&&As([O,P,M],e=>{d=Ms(d,e," ")}),C&&ne?C.createHTML(d):d},n.setConfig=function(){Pe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){ke=null,Z=!1},n.isValidAttribute=function(e,t,n){ke||Pe({});const i=Te(e),r=Te(t);return He(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Ts(_[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Ss(_[e],t);return-1===n?void 0:ks(_[e],n,1)[0]}return Es(_[e])},n.removeHooks=function(e){_[e]=[]},n.removeAllHooks=function(){_={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();class bl 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:[]}}}bl.directiveName="unsafeHTML",bl.resultType=1;const vl=ge(bl);var wl=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 Cl=class extends oe{constructor(){super(...arguments),this.spinSpeed=.4}updated(){this.style.setProperty("--spin-duration",`${this.spinSpeed}s`)}render(){return B`<div class="spinner"></div>`}};Cl.styles=u`
|
|
5904
|
+
`,{entries:ps,setPrototypeOf:fs,isFrozen:gs,getPrototypeOf:ms,getOwnPropertyDescriptor:ys}=Object;let{freeze:bs,seal:vs,create:ws}=Object,{apply:Cs,construct:xs}="undefined"!=typeof Reflect&&Reflect;bs||(bs=function(e){return e}),vs||(vs=function(e){return e}),Cs||(Cs=function(e,t,n){return e.apply(t,n)}),xs||(xs=function(e,t){return new e(...t)});const As=Bs(Array.prototype.forEach),Ss=Bs(Array.prototype.lastIndexOf),Es=Bs(Array.prototype.pop),ks=Bs(Array.prototype.push),Ts=Bs(Array.prototype.splice),_s=Bs(String.prototype.toLowerCase),Os=Bs(String.prototype.toString),Ps=Bs(String.prototype.match),Ms=Bs(String.prototype.replace),Is=Bs(String.prototype.indexOf),Ns=Bs(String.prototype.trim),Ds=Bs(Object.prototype.hasOwnProperty),Us=Bs(RegExp.prototype.test),Ls=(Rs=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xs(Rs,t)});var Rs;function Bs(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 Cs(e,t,i)}}function js(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_s;fs&&fs(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(gs(t)||(t[i]=e),r=e)}e[r]=!0}return e}function Fs(e){for(let t=0;t<e.length;t++){Ds(e,t)||(e[t]=null)}return e}function Hs(e){const t=ws(null);for(const[n,i]of ps(e)){Ds(e,n)&&(Array.isArray(i)?t[n]=Fs(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=Hs(i):t[n]=i)}return t}function $s(e,t){for(;null!==e;){const n=ys(e,t);if(n){if(n.get)return Bs(n.get);if("function"==typeof n.value)return Bs(n.value)}e=ms(e)}return function(){return null}}const zs=bs(["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"]),Gs=bs(["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"]),Qs=bs(["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"]),qs=bs(["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"]),Ws=bs(["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"]),Vs=bs(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ys=bs(["#text"]),Ks=bs(["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"]),Xs=bs(["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"]),Zs=bs(["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"]),Js=bs(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),el=vs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tl=vs(/<%[\w\W]*|[\w\W]*%>/gm),nl=vs(/\$\{[\w\W]*/gm),il=vs(/^data-[\-\w.\u00B7-\uFFFF]+$/),rl=vs(/^aria-[\-\w]+$/),ol=vs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),al=vs(/^(?:\w+script|data):/i),sl=vs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ll=vs(/^html$/i),ul=vs(/^[a-z][.\w]*(-[.\w]+)+$/i);var cl=Object.freeze({__proto__:null,ARIA_ATTR:rl,ATTR_WHITESPACE:sl,CUSTOM_ELEMENT:ul,DATA_ATTR:il,DOCTYPE_NAME:ll,ERB_EXPR:tl,IS_ALLOWED_URI:ol,IS_SCRIPT_OR_DATA:al,MUSTACHE_EXPR:el,TMPLIT_EXPR:nl});const dl=1,hl=3,pl=7,fl=8,gl=9,ml=function(){return"undefined"==typeof window?null:window};var yl=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ml();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==gl||!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:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=u.prototype,m=$s(g,"cloneNode"),y=$s(g,"remove"),b=$s(g,"nextSibling"),v=$s(g,"childNodes"),w=$s(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:A,createNodeIterator:S,createDocumentFragment:E,getElementsByTagName:k}=i,{importNode:T}=r;let _={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ps&&"function"==typeof w&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:O,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:L}=cl;let{IS_ALLOWED_URI:R}=cl,B=null;const j=js({},[...zs,...Gs,...Qs,...Ws,...Ys]);let F=null;const H=js({},[...Ks,...Xs,...Zs,...Js]);let $=Object.seal(ws(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}})),z=null,G=null,Q=!0,q=!0,W=!1,V=!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=js({},["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 ce=null;const de=js({},["audio","video","img","source","image","track"]);let he=null;const pe=js({},["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=js({},[fe,ge,me],Os);let Ce=js({},["mi","mo","mn","ms","mtext"]),xe=js({},["annotation-xml"]);const Ae=js({},["title","style","font","a","script"]);let Se=null;const Ee=["application/xhtml+xml","text/html"];let ke=null,Te=null;const _e=i.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Pe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=Hs(e),Se=-1===Ee.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ke="application/xhtml+xml"===Se?Os:_s,B=Ds(e,"ALLOWED_TAGS")?js({},e.ALLOWED_TAGS,ke):j,F=Ds(e,"ALLOWED_ATTR")?js({},e.ALLOWED_ATTR,ke):H,ve=Ds(e,"ALLOWED_NAMESPACES")?js({},e.ALLOWED_NAMESPACES,Os):we,he=Ds(e,"ADD_URI_SAFE_ATTR")?js(Hs(pe),e.ADD_URI_SAFE_ATTR,ke):pe,ce=Ds(e,"ADD_DATA_URI_TAGS")?js(Hs(de),e.ADD_DATA_URI_TAGS,ke):de,le=Ds(e,"FORBID_CONTENTS")?js({},e.FORBID_CONTENTS,ke):ue,z=Ds(e,"FORBID_TAGS")?js({},e.FORBID_TAGS,ke):Hs({}),G=Ds(e,"FORBID_ATTR")?js({},e.FORBID_ATTR,ke):Hs({}),se=!!Ds(e,"USE_PROFILES")&&e.USE_PROFILES,Q=!1!==e.ALLOW_ARIA_ATTR,q=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,V=!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,R=e.ALLOWED_URI_REGEXP||ol,ye=e.NAMESPACE||me,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,xe=e.HTML_INTEGRATION_POINTS||xe,$=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(q=!1),te&&(ee=!0),se&&(B=js({},Ys),F=[],!0===se.html&&(js(B,zs),js(F,Ks)),!0===se.svg&&(js(B,Gs),js(F,Xs),js(F,Js)),!0===se.svgFilters&&(js(B,Qs),js(F,Xs),js(F,Js)),!0===se.mathMl&&(js(B,Ws),js(F,Zs),js(F,Js))),e.ADD_TAGS&&(B===j&&(B=Hs(B)),js(B,e.ADD_TAGS,ke)),e.ADD_ATTR&&(F===H&&(F=Hs(F)),js(F,e.ADD_ATTR,ke)),e.ADD_URI_SAFE_ATTR&&js(he,e.ADD_URI_SAFE_ATTR,ke),e.FORBID_CONTENTS&&(le===ue&&(le=Hs(le)),js(le,e.FORBID_CONTENTS,ke)),oe&&(B["#text"]=!0),X&&js(B,["html","head","body"]),B.table&&(js(B,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ls('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ls('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(""));bs&&bs(e),Te=e}},Me=js({},[...Gs,...Qs,...qs]),Ie=js({},[...Ws,...Vs]),Ne=function(e){ks(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){y(e)}},De=function(e,t){try{ks(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){ks(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){}},Ue=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=Ps(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=A.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?k.call(t,X?"html":"body")[0]:X?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function je(e,t,i){As(e,e=>{e.call(n,t,i,Te)})}const Fe=function(e){let t=null;if(je(_.beforeSanitizeElements,e,null),Re(e))return Ne(e),!0;const i=ke(e.nodeName);if(je(_.uponSanitizeElement,e,{tagName:i,allowedTags:B}),K&&e.hasChildNodes()&&!Be(e.firstElementChild)&&Us(/<[/\w!]/g,e.innerHTML)&&Us(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===pl)return Ne(e),!0;if(K&&e.nodeType===fl&&Us(/<[/\w]/g,e.data))return Ne(e),!0;if(!B[i]||z[i]){if(!z[i]&&$e(i)){if($.tagNameCheck instanceof RegExp&&Us($.tagNameCheck,i))return!1;if($.tagNameCheck instanceof Function&&$.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=_s(e.tagName),i=_s(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(Me[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]&&(Ae[n]||!Me[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Us(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===hl&&(t=e.textContent,As([O,P,M],e=>{t=Ms(t,e," ")}),e.textContent!==t&&(ks(n.removed,{element:e.cloneNode()}),e.textContent=t)),je(_.afterSanitizeElements,e,null),!1):(Ne(e),!0)},He=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in _e))return!1;if(q&&!G[t]&&Us(I,t));else if(Q&&Us(N,t));else if(!F[t]||G[t]){if(!($e(e)&&($.tagNameCheck instanceof RegExp&&Us($.tagNameCheck,e)||$.tagNameCheck instanceof Function&&$.tagNameCheck(e))&&($.attributeNameCheck instanceof RegExp&&Us($.attributeNameCheck,t)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(t))||"is"===t&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Us($.tagNameCheck,n)||$.tagNameCheck instanceof Function&&$.tagNameCheck(n))))return!1}else if(he[t]);else if(Us(R,Ms(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Is(n,"data:")||!ce[e]){if(W&&!Us(D,Ms(n,U,"")));else if(n)return!1}else;return!0},$e=function(e){return"annotation-xml"!==e&&Ps(e,L)},ze=function(e){je(_.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let r=t.length;for(;r--;){const o=t[r],{name:a,namespaceURI:s,value:l}=o,u=ke(a),c=l;let d="value"===a?c:Ns(c);if(i.attrName=u,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,je(_.uponSanitizeAttribute,e,i),d=i.attrValue,!re||"id"!==u&&"name"!==u||(De(a,e),d="user-content-"+d),K&&Us(/((--!?|])>)|<\/(style|title)/i,d)){De(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){De(a,e);continue}if(!V&&Us(/\/>/i,d)){De(a,e);continue}Y&&As([O,P,M],e=>{d=Ms(d,e," ")});const h=ke(e.nodeName);if(He(h,u,d)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":d=C.createHTML(d);break;case"TrustedScriptURL":d=C.createScriptURL(d)}if(d!==c)try{s?e.setAttributeNS(s,a,d):e.setAttribute(a,d),Re(e)?Ne(e):Es(n.removed)}catch(t){De(a,e)}}else De(a,e)}je(_.afterSanitizeAttributes,e,null)},Ge=function e(t){let n=null;const i=Le(t);for(je(_.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)je(_.uponSanitizeShadowNode,n,null),Fe(n),ze(n),n.content instanceof a&&e(n.content);je(_.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&&!Be(e)){if("function"!=typeof e.toString)throw Ls("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ls("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Pe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=ke(e.nodeName);if(!B[t]||z[t])throw Ls("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=Ue("\x3c!----\x3e"),o=i.ownerDocument.importNode(e,!0),o.nodeType===dl&&"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=Ue(e),!i)return ee?null:ne?x:""}i&&J&&Ne(i.firstChild);const c=Le(ae?e:i);for(;s=c.nextNode();)Fe(s),ze(s),s.content instanceof a&&Ge(s.content);if(ae)return e;if(ee){if(te)for(u=E.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(F.shadowroot||F.shadowrootmode)&&(u=T.call(r,u,!0)),u}let d=X?i.outerHTML:i.innerHTML;return X&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Us(ll,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),Y&&As([O,P,M],e=>{d=Ms(d,e," ")}),C&&ne?C.createHTML(d):d},n.setConfig=function(){Pe(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||Pe({});const i=ke(e),r=ke(t);return He(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&ks(_[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Ss(_[e],t);return-1===n?void 0:Ts(_[e],n,1)[0]}return Es(_[e])},n.removeHooks=function(e){_[e]=[]},n.removeAllHooks=function(){_={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();class bl 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:[]}}}bl.directiveName="unsafeHTML",bl.resultType=1;const vl=ge(bl);var wl=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 Cl=class extends oe{constructor(){super(...arguments),this.spinSpeed=.4}updated(){this.style.setProperty("--spin-duration",`${this.spinSpeed}s`)}render(){return B`<div class="spinner"></div>`}};Cl.styles=u`
|
|
5905
5905
|
.spinner {
|
|
5906
5906
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
5907
5907
|
border-top: 2px solid #c057ff;
|
|
@@ -6116,7 +6116,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6116
6116
|
max-height: 200px;
|
|
6117
6117
|
overflow-y: auto;
|
|
6118
6118
|
}
|
|
6119
|
-
`],Sl([ue({attribute:!0})],El.prototype,"message",void 0),Sl([ue({attribute:!0})],El.prototype,"myPubnub",void 0),Sl([ue({attribute:!0})],El.prototype,"onMount",void 0),Sl([ce()],El.prototype,"showMediaAsCarousel",void 0),Sl([ce()],El.prototype,"activeIndex",void 0),El=Sl([se("pubnub-media")],El);function
|
|
6119
|
+
`],Sl([ue({attribute:!0})],El.prototype,"message",void 0),Sl([ue({attribute:!0})],El.prototype,"myPubnub",void 0),Sl([ue({attribute:!0})],El.prototype,"onMount",void 0),Sl([ce()],El.prototype,"showMediaAsCarousel",void 0),Sl([ce()],El.prototype,"activeIndex",void 0),El=Sl([se("pubnub-media")],El);function kl(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 Tl(e,t){Ge(2,arguments);var n=Qe(e),i=Qe(t),r=kl(n,i),o=Math.abs(function(e,t){Ge(2,arguments);var n=Qt(e),i=Qt(t),r=n.getTime()-Mt(n),o=i.getTime()-Mt(i);return Math.round((r-o)/864e5)}(n,i));n.setDate(n.getDate()-r*o);var a=r*(o-Number(kl(n,i)===-r));return 0===a?0:a}const _l=u`
|
|
6120
6120
|
#utilities-container {
|
|
6121
6121
|
position: fixed;
|
|
6122
6122
|
|
|
@@ -6233,7 +6233,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6233
6233
|
<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}"/>
|
|
6234
6234
|
<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}"/>
|
|
6235
6235
|
</svg>
|
|
6236
|
-
`;var Ml=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.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.onMount=()=>({}),this.isHealthChat=!1,this.widgetType=Kl.Default,this.primaryColor=Le,this.backgroundColor=Re,this.onClickExit=()=>{localStorage.setItem("isChatOpen","false")},this.requiresConsent=!1,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.messageInput.value="",this.autoResizeMessageInput(),0===this.messages.length&&(this.messages=[{timestamp:0,message:e,isLeadMessage:!0,chunks:[{text:e,order:0,isDone:!0}],type:os.text}]),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e)))},this.scrollToChatBottom=()=>{this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"smooth"})},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`}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;
|
|
6236
|
+
`;var Ml=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.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.onMount=()=>({}),this.isHealthChat=!1,this.widgetType=Kl.Default,this.primaryColor=Le,this.backgroundColor=Re,this.onClickExit=()=>{localStorage.setItem("isChatOpen","false")},this.requiresConsent=!1,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.messageInput.value="",this.autoResizeMessageInput(),0===this.messages.length&&(this.messages=[{timestamp:0,message:e,isLeadMessage:!0,chunks:[{text:e,order:0,isDone:!0}],type:os.text}]),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e)))},this.scrollToChatBottom=()=>{this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"smooth"})},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`}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;Tl(new Date,new Date(r))<7&&o===si?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,c,d,h,p;if(!this.buildingSlug)return B``;const f=null===(e=this.building)||void 0===e?void 0:e.id;let g={};if(g=mn()?{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===f&&(g={...g,fontFamily:'"Helvetica Neue", Arial'}),this.widgetType===Kl.Utilities)return B`
|
|
6237
6237
|
<div
|
|
6238
6238
|
id="utilities-container"
|
|
6239
6239
|
class=${ye({"pubnub-container__mobile":mn(),"utilities-container__desktop":!mn()})}
|
|
@@ -6541,7 +6541,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6541
6541
|
</button>
|
|
6542
6542
|
</div>
|
|
6543
6543
|
</div>
|
|
6544
|
-
`}};Il.styles=[xn,hs,ds,cs,_l],Ml([ue({type:Number})],Il.prototype,"right",void 0),Ml([ue({type:Number})],Il.prototype,"bottom",void 0),Ml([ue({type:Number})],Il.prototype,"top",void 0),Ml([ue({type:Number})],Il.prototype,"left",void 0),Ml([ue({attribute:!0})],Il.prototype,"onMount",void 0),Ml([ue({attribute:!0})],Il.prototype,"channel",void 0),Ml([ue({attribute:!0})],Il.prototype,"isHealthChat",void 0),Ml([ue({attribute:!0})],Il.prototype,"myPubnub",void 0),Ml([ue({attribute:!0})],Il.prototype,"orgSlug",void 0),Ml([ue({attribute:!0})],Il.prototype,"buildingSlug",void 0),Ml([ue({attribute:!0})],Il.prototype,"widgetType",void 0),Ml([ue({attribute:!0})],Il.prototype,"building",void 0),Ml([ue({attribute:!0})],Il.prototype,"primaryColor",void 0),Ml([ue({attribute:!0})],Il.prototype,"backgroundColor",void 0),Ml([ue({attribute:!0})],Il.prototype,"onClickExit",void 0),Ml([ue({attribute:!0})],Il.prototype,"requiresConsent",void 0),Ml([de("#message-input",!0)],Il.prototype,"messageInput",void 0),Ml([de("#conversation-body",!0)],Il.prototype,"messageBody",void 0),Ml([ce()],Il.prototype,"messages",void 0),Ml([ce()],Il.prototype,"isLoadingMessages",void 0),Ml([ce()],Il.prototype,"hasReceivedConsent",void 0),Ml([ce()],Il.prototype,"privacyPolicyUrl",void 0),Ml([ce()],Il.prototype,"websitePreviewMapping",void 0),Il=Ml([se("pubnub-chat")],Il);const Nl=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?`${t}/units`:t;class Dl{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>En(Tn(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=yi();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(pi()).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:En(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:En(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));gi({logType:fi.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=Ci(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:En(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Nn(e.timestampInitiallyLogged).getTime()-Nn(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:En(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:En(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=>Nn(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var Ul=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.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=ei.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.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=Kl.Default,this.onWidgetLoaded=ya(),this.onSstClose=ya(),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=Te(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await _i(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){}await yr(e,this.buildingSlug,this.orgSlug)&&(mi({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,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,T,k,_,O,P,M,I,N,D,U,L,R,B,j,F,H,$,z,G,Q,q;const W=this.buildingWebchatView;if(!W)return;W&&this.orgSlug&&Bl(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 V=W.featureFlagWebchatMarketingSourceDropdownConfiguration,Y=W.featureFlagWebchatUseDniPhoneNumberBySource,K=W.featureFlagInsertDniIntoWebsite,X=W.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite,[Z,J]=await Promise.all([ja(this.orgSlug,this.buildingSlug),ti(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Me(W.phoneNumber)),this.leadSources=Z,this.featureFlagShowDropdown=V;const ee=W.textWithUsPhoneNumber?W.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 gi({logType:fi.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug),te=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,ne=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,ie={callDesktop:null!==(c=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==c&&c,callMobile:null!==(h=null===(d=this.buildingWebchatView)||void 0===d?void 0:d.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)&&!!ee)&&void 0!==x&&x,textMobile:null!==(S=(null===(A=this.buildingWebchatView)||void 0===A?void 0:A.shouldShowTextMobile)&&!!ee)&&void 0!==S&&S,sstDesktop:null!==(T=null===(E=this.buildingWebchatView)||void 0===E?void 0:E.shouldShowSstDesktop)&&void 0!==T&&T,sstMobile:null!==(_=null===(k=this.buildingWebchatView)||void 0===k?void 0:k.shouldShowSstMobile)&&void 0!==_&&_,calcDesktop:te,calcMobile:ne};var re,oe;this.enabledChatWidgets=Sa(ie),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(oe=this.handleTourClicked,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",e=>{e.preventDefault(),oe(e)})}),X&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(t=>{t&&t.addEventListener("click",t=>{t.preventDefault(),e(t)})})})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.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===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&(re=null!==(M=null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&void 0!==M?M: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(re)}`)}})),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!==(D=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==D?D:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(U=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==U?U:null,this.webchatConfigHasAutoOpenChat=null!==(L=this.buildingWebchatView.autoOpenChat)&&void 0!==L&&L,this.requiresConsent=null!==(R=this.buildingWebchatView.requiresConsentForChat)&&void 0!==R&&R,this.hideMobileFeatures=null!==(B=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==B&&B,this.privacyPolicyUrl=null!==(j=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==j?j:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===Si.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===Si.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===Si.EMOJI&&(this.designConcept=Si.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Le),null===this.backgroundColor&&(this.backgroundColor=Re);const ae=null!==(H=null===(F=this.buildingWebchatView)||void 0===F?void 0:F.phoneNumber)&&void 0!==H?H:"";let se=null;if(Y&&(se=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:Me(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(z=null===($=this.LeadSourceClient)||void 0===$?void 0:$.leadSource)&&void 0!==z?z:null),se&&!se.isMatch&&(se.number=ae)),K&&(null==se?void 0:se.number)){const e=ss(se.number,this.orgSlug,this.buildingSlug);e>0&&mi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const le=localStorage.getItem("eliseai_phone_number_devtest");le&&ss(le,this.orgSlug,this.buildingSlug),this.phoneNumberForSource=se||{number:ae,isMatch:!1,isPropertyWebsiteCatchall:!0};const ue=null!==(Q=null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&void 0!==Q?Q:null;if(ue&&(this.leadSources.includes(ue)||this.leadSources.push(ue)),Gn(W.id),J&&this.buildingSlug&&(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isLiveOnApplications)){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(\?.*)?$/,/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=Nl(o,e);l.setAttribute("href",s),a++,gi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:fi.info,buildingSlug:n,orgSlug:t})}}return 0===a&&gi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:fi.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}`,this.orgSlug,this.buildingSlug);e>0&&mi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a;if(!this.buildingWebchatView)return;const s=es(this.buildingSlug),l=ts(this.buildingSlug,s)?s:Ja(this.buildingSlug,!1);if(!l.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new xi,this.LeadSourceMultitouchClient=new Dl(this.orgSlug,this.buildingSlug),this.myPubnub=new as(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,l.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel;const u=await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(n=null===(t=this.myPubnub)||void 0===t?void 0:t.leadUserId)&&void 0!==n?n:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));u&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(u),"property-website"!==Ci(this.orgSlug)?this.myPubnub.leadSource=null!==(r=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==r?r:Ci(this.orgSlug):this.myPubnub.leadSource=null!==(a=null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource)&&void 0!==a?a:null,l.initiatedChat&&await this.myPubnub.initializePubnub(s)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!Pn(Nn(t)));return!!e&&!!n&&!mn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",En(function(e,t){return Ge(2,arguments),st(e,6e4*at(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,u,c,d,h,p,f,g,m,y,b,v,w;if("Tab"===e.key){const C=this.displayPubnubChat?null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"):null!==(g=null!==(u=null===(l=null===(s=null===(a=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("meetelise-launcher"))||void 0===o?void 0:o.shadowRoot)||void 0===a?void 0:a.getElementById("email-us-window"))||void 0===s?void 0:s.shadowRoot)||void 0===l?void 0:l.getElementById("email-us-form"))&&void 0!==u?u:null===(f=null===(p=null===(h=null===(d=null===(c=this.shadowRoot)||void 0===c?void 0:c.getElementById("meetelise-launcher"))||void 0===d?void 0:d.shadowRoot)||void 0===h?void 0:h.getElementById("tour-scheduler-window"))||void 0===p?void 0:p.shadowRoot)||void 0===f?void 0:f.getElementById("scheduler-container"))&&void 0!==g?g:null===(w=null===(v=null===(b=null===(y=null===(m=this.shadowRoot)||void 0===m?void 0:m.getElementById("meetelise-launcher"))||void 0===y?void 0:y.shadowRoot)||void 0===b?void 0:b.getElementById("call-us-window"))||void 0===v?void 0:v.shadowRoot)||void 0===w?void 0:w.getElementById("details-window");if(!C)return;e.preventDefault();const x=C.querySelectorAll("input, me-select, textarea, action-confirm-button, [tabindex]"),A=Array.from(x),S=A.findIndex(e=>e.matches(":focus"));A[(S+1)%A.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 hi(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(),Za(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)}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){gi({logType:fi.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;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),super.disconnectedCallback()}render(){var e,t,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,T,k,_,O,P,M,I,N,D,U;Ca();const L=this.hideLauncher&&!this.isLoading&&!mn();return B`
|
|
6544
|
+
`}};Il.styles=[xn,hs,ds,cs,_l],Ml([ue({type:Number})],Il.prototype,"right",void 0),Ml([ue({type:Number})],Il.prototype,"bottom",void 0),Ml([ue({type:Number})],Il.prototype,"top",void 0),Ml([ue({type:Number})],Il.prototype,"left",void 0),Ml([ue({attribute:!0})],Il.prototype,"onMount",void 0),Ml([ue({attribute:!0})],Il.prototype,"channel",void 0),Ml([ue({attribute:!0})],Il.prototype,"isHealthChat",void 0),Ml([ue({attribute:!0})],Il.prototype,"myPubnub",void 0),Ml([ue({attribute:!0})],Il.prototype,"orgSlug",void 0),Ml([ue({attribute:!0})],Il.prototype,"buildingSlug",void 0),Ml([ue({attribute:!0})],Il.prototype,"widgetType",void 0),Ml([ue({attribute:!0})],Il.prototype,"building",void 0),Ml([ue({attribute:!0})],Il.prototype,"primaryColor",void 0),Ml([ue({attribute:!0})],Il.prototype,"backgroundColor",void 0),Ml([ue({attribute:!0})],Il.prototype,"onClickExit",void 0),Ml([ue({attribute:!0})],Il.prototype,"requiresConsent",void 0),Ml([de("#message-input",!0)],Il.prototype,"messageInput",void 0),Ml([de("#conversation-body",!0)],Il.prototype,"messageBody",void 0),Ml([ce()],Il.prototype,"messages",void 0),Ml([ce()],Il.prototype,"isLoadingMessages",void 0),Ml([ce()],Il.prototype,"hasReceivedConsent",void 0),Ml([ce()],Il.prototype,"privacyPolicyUrl",void 0),Ml([ce()],Il.prototype,"websitePreviewMapping",void 0),Il=Ml([se("pubnub-chat")],Il);const Nl=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?`${t}/units`:t;class Dl{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>En(kn(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=yi();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(pi()).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:En(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:En(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));gi({logType:fi.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=Ci(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:En(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:En(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Nn(e.timestampInitiallyLogged).getTime()-Nn(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:En(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:En(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=>Nn(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var Ul=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.buildingSlug="",this.orgSlug="",this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=ei.always,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.displayPubnubChat=!1,this.myPubnub=null,this.LeadSourceClient=null,this.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=Kl.Default,this.onWidgetLoaded=ya(),this.onSstClose=ya(),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=ke(),this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const e=await _i(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){}await yr(e,this.buildingSlug,this.orgSlug)&&(mi({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,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,k,T,_,O,P,M,I,N,D,U,L,R,B,j,F,H,$,z,G,Q,q;const W=this.buildingWebchatView;if(!W)return;W&&this.orgSlug&&Bl(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 V=W.featureFlagWebchatMarketingSourceDropdownConfiguration,Y=W.featureFlagWebchatUseDniPhoneNumberBySource,K=W.featureFlagInsertDniIntoWebsite,X=W.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite,[Z,J]=await Promise.all([ja(this.orgSlug,this.buildingSlug),ti(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Me(W.phoneNumber)),this.leadSources=Z,this.featureFlagShowDropdown=V;const ee=W.textWithUsPhoneNumber?W.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 gi({logType:fi.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t}}),null}return null})(this.buildingSlug),te=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,ne=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,ie={callDesktop:null!==(c=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==c&&c,callMobile:null!==(h=null===(d=this.buildingWebchatView)||void 0===d?void 0:d.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)&&!!ee)&&void 0!==x&&x,textMobile:null!==(S=(null===(A=this.buildingWebchatView)||void 0===A?void 0:A.shouldShowTextMobile)&&!!ee)&&void 0!==S&&S,sstDesktop:null!==(k=null===(E=this.buildingWebchatView)||void 0===E?void 0:E.shouldShowSstDesktop)&&void 0!==k&&k,sstMobile:null!==(_=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==_&&_,calcDesktop:te,calcMobile:ne};var re,oe;this.enabledChatWidgets=Sa(ie),this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(oe=this.handleTourClicked,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");t&&t.startsWith("https://app.meetelise.com/")&&e.addEventListener("click",e=>{e.preventDefault(),oe(e)})}),X&&(e=>{document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(t=>{t&&t.addEventListener("click",t=>{t.preventDefault(),e(t)})})})(this.handleTourClicked),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.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===(O=this.LeadSourceClient)||void 0===O?void 0:O.leadSource)&&(re=null!==(M=null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&void 0!==M?M: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(re)}`)}})),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!==(D=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==D?D:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(U=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==U?U:null,this.webchatConfigHasAutoOpenChat=null!==(L=this.buildingWebchatView.autoOpenChat)&&void 0!==L&&L,this.requiresConsent=null!==(R=this.buildingWebchatView.requiresConsentForChat)&&void 0!==R&&R,this.hideMobileFeatures=null!==(B=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==B&&B,this.privacyPolicyUrl=null!==(j=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==j?j:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===Si.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===Si.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===Si.EMOJI&&(this.designConcept=Si.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Le),null===this.backgroundColor&&(this.backgroundColor=Re);const ae=null!==(H=null===(F=this.buildingWebchatView)||void 0===F?void 0:F.phoneNumber)&&void 0!==H?H:"";let se=null;if(Y&&(se=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:Me(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(z=null===($=this.LeadSourceClient)||void 0===$?void 0:$.leadSource)&&void 0!==z?z:null),se&&!se.isMatch&&(se.number=ae)),K&&(null==se?void 0:se.number)){const e=ss(se.number,this.orgSlug,this.buildingSlug);e>0&&mi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const le=localStorage.getItem("eliseai_phone_number_devtest");le&&ss(le,this.orgSlug,this.buildingSlug),this.phoneNumberForSource=se||{number:ae,isMatch:!1,isPropertyWebsiteCatchall:!0};const ue=null!==(Q=null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&void 0!==Q?Q:null;if(ue&&(this.leadSources.includes(ue)||this.leadSources.push(ue)),Gn(W.id),J&&this.buildingSlug&&(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isLiveOnApplications)){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(\?.*)?$/,/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=Nl(o,e);l.setAttribute("href",s),a++,gi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:fi.info,buildingSlug:n,orgSlug:t})}}return 0===a&&gi({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:fi.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}`,this.orgSlug,this.buildingSlug);e>0&&mi({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a;if(!this.buildingWebchatView)return;const s=es(this.buildingSlug),l=ts(this.buildingSlug,s)?s:Ja(this.buildingSlug,!1);if(!l.leadId)throw new Error("Lead ID is null");this.LeadSourceClient=new xi,this.LeadSourceMultitouchClient=new Dl(this.orgSlug,this.buildingSlug),this.myPubnub=new as(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,l.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType),this.LeadSourceClient.chatId=this.myPubnub.channel;const u=await(null===(e=this.LeadSourceClient)||void 0===e?void 0:e.generateUserLeadSource({leadId:null!==(n=null===(t=this.myPubnub)||void 0===t?void 0:t.leadUserId)&&void 0!==n?n:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));u&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(u),"property-website"!==Ci(this.orgSlug)?this.myPubnub.leadSource=null!==(r=null===(i=this.LeadSourceClient)||void 0===i?void 0:i.leadSource)&&void 0!==r?r:Ci(this.orgSlug):this.myPubnub.leadSource=null!==(a=null===(o=this.LeadSourceClient)||void 0===o?void 0:o.leadSource)&&void 0!==a?a:null,l.initiatedChat&&await this.myPubnub.initializePubnub(s)},this.shouldAutoOpenChat=e=>{const t=sessionStorage.getItem("alreadyAutoOpenedTimestamp"),n=!t||!(t&&!Pn(Nn(t)));return!!e&&!!n&&!mn()},this.updateAlreadyAutoOpenedTimestamp=()=>{sessionStorage.setItem("alreadyAutoOpenedTimestamp",En(function(e,t){return Ge(2,arguments),st(e,6e4*at(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,u,c,d,h,p,f,g,m,y,b,v,w;if("Tab"===e.key){const C=this.displayPubnubChat?null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"):null!==(g=null!==(u=null===(l=null===(s=null===(a=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("meetelise-launcher"))||void 0===o?void 0:o.shadowRoot)||void 0===a?void 0:a.getElementById("email-us-window"))||void 0===s?void 0:s.shadowRoot)||void 0===l?void 0:l.getElementById("email-us-form"))&&void 0!==u?u:null===(f=null===(p=null===(h=null===(d=null===(c=this.shadowRoot)||void 0===c?void 0:c.getElementById("meetelise-launcher"))||void 0===d?void 0:d.shadowRoot)||void 0===h?void 0:h.getElementById("tour-scheduler-window"))||void 0===p?void 0:p.shadowRoot)||void 0===f?void 0:f.getElementById("scheduler-container"))&&void 0!==g?g:null===(w=null===(v=null===(b=null===(y=null===(m=this.shadowRoot)||void 0===m?void 0:m.getElementById("meetelise-launcher"))||void 0===y?void 0:y.shadowRoot)||void 0===b?void 0:b.getElementById("call-us-window"))||void 0===v?void 0:v.shadowRoot)||void 0===w?void 0:w.getElementById("details-window");if(!C)return;e.preventDefault();const x=C.querySelectorAll("input, me-select, textarea, action-confirm-button, [tabindex]"),A=Array.from(x),S=A.findIndex(e=>e.matches(":focus"));A[(S+1)%A.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 hi(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(),Za(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)}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){gi({logType:fi.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;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),window.removeEventListener("keydown",this.handleKeydownTab),super.disconnectedCallback()}render(){var e,t,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m,y,b,v,w,C,x,A,S,E,k,T,_,O,P,M,I,N,D,U;Ca();const L=this.hideLauncher&&!this.isLoading&&!mn();return B`
|
|
6545
6545
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6546
6546
|
<div id="aria-describe-info" style="display: none;">
|
|
6547
6547
|
EliseAI widget that allows you to chat with a virtual assistant, book
|
|
@@ -6618,7 +6618,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6618
6618
|
selfGuidedToursTypeOffered="${null===(A=this.buildingWebchatView)||void 0===A?void 0:A.selfGuidedToursTypeOffered}"
|
|
6619
6619
|
selfGuidedTourEnabled="${null===(S=this.buildingWebchatView)||void 0===S?void 0:S.isSelfGuidedTourEnabled}"
|
|
6620
6620
|
designConcept="${null!==(E=this.designConcept)&&void 0!==E?E:""}"
|
|
6621
|
-
currentLeadSource="${null!==(_=null!==(
|
|
6621
|
+
currentLeadSource="${null!==(_=null!==(T=null===(k=this.LeadSourceClient)||void 0===k?void 0:k.leadSource)&&void 0!==T?T:null)&&void 0!==_?_:""}"
|
|
6622
6622
|
featureFlagShowDropdown="${this.featureFlagShowDropdown}"
|
|
6623
6623
|
.leadSources="${null!==(O=this.leadSources)&&void 0!==O?O:[]}"
|
|
6624
6624
|
escortedToursLink="${null!==(M=null===(P=this.buildingWebchatView)||void 0===P?void 0:P.escortedToursLink)&&void 0!==M?M:""}"
|
|
@@ -6776,7 +6776,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6776
6776
|
/>
|
|
6777
6777
|
</svg>
|
|
6778
6778
|
</button>
|
|
6779
|
-
</div>`}};$l.styles=[Fl],Hl([ue({type:Number})],$l.prototype,"right",void 0),Hl([ue({type:Number})],$l.prototype,"bottom",void 0),Hl([ue({type:Number})],$l.prototype,"top",void 0),Hl([ue({type:Number})],$l.prototype,"left",void 0),Hl([ue({attribute:!0})],$l.prototype,"isChatOpen",void 0),Hl([ue({attribute:!0})],$l.prototype,"onClickCloseChat",void 0),Hl([ue({attribute:!0})],$l.prototype,"onClickOpenChat",void 0),$l=Hl([se("simple-launcher")],$l);var zl=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.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=
|
|
6779
|
+
</div>`}};$l.styles=[Fl],Hl([ue({type:Number})],$l.prototype,"right",void 0),Hl([ue({type:Number})],$l.prototype,"bottom",void 0),Hl([ue({type:Number})],$l.prototype,"top",void 0),Hl([ue({type:Number})],$l.prototype,"left",void 0),Hl([ue({attribute:!0})],$l.prototype,"isChatOpen",void 0),Hl([ue({attribute:!0})],$l.prototype,"onClickCloseChat",void 0),Hl([ue({attribute:!0})],$l.prototype,"onClickOpenChat",void 0),$l=Hl([se("simple-launcher")],$l);var zl=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.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=ke(),this.firstUpdated=async()=>{await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=es(this.healthcareId),t=ts(this.healthcareId,e)?e:Ja(this.healthcareId,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new as(this.healthcareId,null,"",this.currentLeadSource,t.leadId,null,null,Kl.Healthcare),t.initiatedChat&&await this.myPubnub.initializePubnub(e),mn()||(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(),Za(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 Ca(),this.isLoading?B``:B`
|
|
6780
6780
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
6781
6781
|
<div id="aria-describe-info" style="display: none;">
|
|
6782
6782
|
EliseAI widget that allows you to chat with a virtual assistant, book
|
|
@@ -6864,7 +6864,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6864
6864
|
line-height: 150%;
|
|
6865
6865
|
font-size: 16px;
|
|
6866
6866
|
}
|
|
6867
|
-
`,zl([ue({type:String})],Gl.prototype,"healthcareId",void 0),zl([ue({type:Number})],Gl.prototype,"right",void 0),zl([ue({type:Number})],Gl.prototype,"bottom",void 0),zl([ue({type:Number})],Gl.prototype,"top",void 0),zl([ue({type:Number})],Gl.prototype,"left",void 0),zl([ce()],Gl.prototype,"launcher",void 0),zl([ce()],Gl.prototype,"currentLeadSource",void 0),zl([ce()],Gl.prototype,"displayPubnubChat",void 0),zl([ce()],Gl.prototype,"myPubnub",void 0),zl([ce()],Gl.prototype,"requiresConsent",void 0),zl([ce()],Gl.prototype,"privacyPolicyUrl",void 0),zl([ce()],Gl.prototype,"isLoading",void 0),Gl=zl([se("health-chat")],Gl);var Ql=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 ql=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=
|
|
6867
|
+
`,zl([ue({type:String})],Gl.prototype,"healthcareId",void 0),zl([ue({type:Number})],Gl.prototype,"right",void 0),zl([ue({type:Number})],Gl.prototype,"bottom",void 0),zl([ue({type:Number})],Gl.prototype,"top",void 0),zl([ue({type:Number})],Gl.prototype,"left",void 0),zl([ce()],Gl.prototype,"launcher",void 0),zl([ce()],Gl.prototype,"currentLeadSource",void 0),zl([ce()],Gl.prototype,"displayPubnubChat",void 0),zl([ce()],Gl.prototype,"myPubnub",void 0),zl([ce()],Gl.prototype,"requiresConsent",void 0),zl([ce()],Gl.prototype,"privacyPolicyUrl",void 0),zl([ce()],Gl.prototype,"isLoading",void 0),Gl=zl([se("health-chat")],Gl);var Ql=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 ql=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=ke(),this.firstUpdated=async()=>{(await async function(e){if(!e)return!1;const t="e2e-test-yardi-building";try{return(await r().get(Jn(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=es(this.orgSlug),t=ts(this.orgSlug,e)?e:Ja(this.orgSlug,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new as(this.orgSlug,null,this.orgSlug,this.currentLeadSource,t.leadId,null,null,Kl.Utilities),t.initiatedChat&&await this.myPubnub.initializePubnub(e),mn()||(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(),Za(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 Ca(),this.isLoading?B``:B`
|
|
6868
6868
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
6869
6869
|
<div id="aria-describe-info" style="display: none;">
|
|
6870
6870
|
EliseAI widget that allows you to chat with a virtual assistant, book
|