@sesamy/sesamy-js 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- var xr = Object.defineProperty;
2
- var Ar = (t, e, n) => e in t ? xr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var B = (t, e, n) => (Ar(t, typeof e != "symbol" ? e + "" : e, n), n);
1
+ var $r = Object.defineProperty;
2
+ var Nr = (t, e, n) => e in t ? $r(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var q = (t, e, n) => (Nr(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  function ue(t, e) {
5
5
  const n = new CustomEvent(t, {
6
6
  detail: e,
@@ -59,7 +59,7 @@ var de = At(function(t, e) {
59
59
  };
60
60
  });
61
61
  xt(de);
62
- var $r = xt(At(function(t, e) {
62
+ var Ur = xt(At(function(t, e) {
63
63
  var n = he && he.__awaiter || function(u, c, f, d) {
64
64
  return new (f || (f = Promise))(function(w, k) {
65
65
  function v(g) {
@@ -327,7 +327,7 @@ var $r = xt(At(function(t, e) {
327
327
  }();
328
328
  e.default = p;
329
329
  }));
330
- const Nr = { timeoutInSeconds: 60 }, Dn = { name: "auth0-spa-js", version: "2.1.3" }, Un = () => Date.now();
330
+ const zr = { timeoutInSeconds: 60 }, Dn = { name: "auth0-spa-js", version: "2.1.3" }, Ln = () => Date.now();
331
331
  let G = class kt extends Error {
332
332
  constructor(e, n) {
333
333
  super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, kt.prototype);
@@ -335,55 +335,55 @@ let G = class kt extends Error {
335
335
  static fromPayload({ error: e, error_description: n }) {
336
336
  return new kt(e, n);
337
337
  }
338
- }, zr = class Rn extends G {
338
+ }, Rr = class Mn extends G {
339
339
  constructor(e, n, r, i = null) {
340
- super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Rn.prototype);
340
+ super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Mn.prototype);
341
341
  }
342
- }, It = class Ln extends G {
342
+ }, It = class Zn extends G {
343
343
  constructor() {
344
- super("timeout", "Timeout"), Object.setPrototypeOf(this, Ln.prototype);
344
+ super("timeout", "Timeout"), Object.setPrototypeOf(this, Zn.prototype);
345
345
  }
346
- }, Dr = class Mn extends It {
346
+ }, Dr = class Kn extends It {
347
347
  constructor(e) {
348
- super(), this.popup = e, Object.setPrototypeOf(this, Mn.prototype);
348
+ super(), this.popup = e, Object.setPrototypeOf(this, Kn.prototype);
349
349
  }
350
- }, Ur = class Zn extends G {
350
+ }, Lr = class Wn extends G {
351
351
  constructor(e) {
352
- super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Zn.prototype);
352
+ super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Wn.prototype);
353
353
  }
354
- }, Rr = class Kn extends G {
354
+ }, Mr = class Hn extends G {
355
355
  constructor(e, n, r) {
356
- super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Kn.prototype);
356
+ super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Hn.prototype);
357
357
  }
358
- }, Wn = class Hn extends G {
358
+ }, Fn = class Jn extends G {
359
359
  constructor(e, n) {
360
- super("missing_refresh_token", `Missing Refresh Token (audience: '${Ht(e, ["default"])}', scope: '${Ht(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Hn.prototype);
360
+ super("missing_refresh_token", `Missing Refresh Token (audience: '${Ft(e, ["default"])}', scope: '${Ft(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Jn.prototype);
361
361
  }
362
362
  };
363
- function Ht(t, e = []) {
363
+ function Ft(t, e = []) {
364
364
  return t && !e.includes(t) ? t : "";
365
365
  }
366
366
  const Qe = () => window.crypto, dt = () => {
367
367
  const t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";
368
368
  let e = "";
369
369
  return Array.from(Qe().getRandomValues(new Uint8Array(43))).forEach((n) => e += t[n % t.length]), e;
370
- }, Ft = (t) => btoa(t), St = (t) => {
370
+ }, Jt = (t) => btoa(t), St = (t) => {
371
371
  var { clientId: e } = t, n = te(t, ["clientId"]);
372
372
  return new URLSearchParams(((r) => Object.keys(r).filter((i) => r[i] !== void 0).reduce((i, o) => Object.assign(Object.assign({}, i), { [o]: r[o] }), {}))(Object.assign({ client_id: e }, n))).toString();
373
- }, Jt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Lr = async (t, e) => {
373
+ }, Xt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Zr = async (t, e) => {
374
374
  const n = await fetch(t, e);
375
375
  return { ok: n.ok, json: await n.json() };
376
- }, Mr = async (t, e, n) => {
376
+ }, Kr = async (t, e, n) => {
377
377
  const r = new AbortController();
378
378
  let i;
379
- return e.signal = r.signal, Promise.race([Lr(t, e), new Promise((o, a) => {
379
+ return e.signal = r.signal, Promise.race([Zr(t, e), new Promise((o, a) => {
380
380
  i = setTimeout(() => {
381
381
  r.abort(), a(new Error("Timeout when executing 'fetch'"));
382
382
  }, n);
383
383
  })]).finally(() => {
384
384
  clearTimeout(i);
385
385
  });
386
- }, Zr = async (t, e, n, r, i, o, a) => {
386
+ }, Wr = async (t, e, n, r, i, o, a) => {
387
387
  return s = { auth: { audience: e, scope: n }, timeout: i, fetchUrl: t, fetchOptions: r, useFormData: a }, h = o, new Promise(function(p, u) {
388
388
  const c = new MessageChannel();
389
389
  c.port1.onmessage = function(f) {
@@ -391,27 +391,27 @@ const Qe = () => window.crypto, dt = () => {
391
391
  }, h.postMessage(s, [c.port2]);
392
392
  });
393
393
  var s, h;
394
- }, Kr = async (t, e, n, r, i, o, a = 1e4) => i ? Zr(t, e, n, r, a, i, o) : Mr(t, r, a);
395
- async function Wr(t, e) {
394
+ }, Hr = async (t, e, n, r, i, o, a = 1e4) => i ? Wr(t, e, n, r, a, i, o) : Kr(t, r, a);
395
+ async function Fr(t, e) {
396
396
  var { baseUrl: n, timeout: r, audience: i, scope: o, auth0Client: a, useFormData: s } = t, h = te(t, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
397
397
  const p = s ? St(h) : JSON.stringify(h);
398
398
  return await async function(u, c, f, d, w, k, v) {
399
399
  let E, _ = null;
400
- for (let x = 0; x < 3; x++)
400
+ for (let j = 0; j < 3; j++)
401
401
  try {
402
- E = await Kr(u, f, d, w, k, v, c), _ = null;
402
+ E = await Hr(u, f, d, w, k, v, c), _ = null;
403
403
  break;
404
- } catch (R) {
405
- _ = R;
404
+ } catch (D) {
405
+ _ = D;
406
406
  }
407
407
  if (_)
408
408
  throw _;
409
- const g = E.json, { error: l, error_description: b } = g, T = te(g, ["error", "error_description"]), { ok: O } = E;
409
+ const g = E.json, { error: l, error_description: b } = g, P = te(g, ["error", "error_description"]), { ok: O } = E;
410
410
  if (!O) {
411
- const x = b || `HTTP error. Unable to fetch ${u}`;
412
- throw l === "mfa_required" ? new Rr(l, x, T.mfa_token) : l === "missing_refresh_token" ? new Wn(f, d) : new G(l || "request_error", x);
411
+ const j = b || `HTTP error. Unable to fetch ${u}`;
412
+ throw l === "mfa_required" ? new Mr(l, j, P.mfa_token) : l === "missing_refresh_token" ? new Fn(f, d) : new G(l || "request_error", j);
413
413
  }
414
- return T;
414
+ return P;
415
415
  }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: p, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Dn)) } }, e, s);
416
416
  }
417
417
  const Fe = (...t) => {
@@ -433,7 +433,7 @@ let pe = class _t {
433
433
  const { scope: n, audience: r, client_id: i } = e;
434
434
  return new _t({ scope: n, audience: r, clientId: i });
435
435
  }
436
- }, Hr = class {
436
+ }, Jr = class {
437
437
  set(e, n) {
438
438
  localStorage.setItem(e, JSON.stringify(n));
439
439
  }
@@ -452,7 +452,7 @@ let pe = class _t {
452
452
  allKeys() {
453
453
  return Object.keys(window.localStorage).filter((e) => e.startsWith("@@auth0spajs@@"));
454
454
  }
455
- }, Fn = class {
455
+ }, Xn = class {
456
456
  constructor() {
457
457
  this.enclosedCache = /* @__PURE__ */ function() {
458
458
  let e = {};
@@ -467,9 +467,9 @@ let pe = class _t {
467
467
  }, allKeys: () => Object.keys(e) };
468
468
  }();
469
469
  }
470
- }, Fr = class {
470
+ }, Xr = class {
471
471
  constructor(e, n, r) {
472
- this.cache = e, this.keyManifest = n, this.nowProvider = r || Un;
472
+ this.cache = e, this.keyManifest = n, this.nowProvider = r || Ln;
473
473
  }
474
474
  async setIdToken(e, n, r) {
475
475
  var i;
@@ -530,7 +530,7 @@ let pe = class _t {
530
530
  return o.prefix === "@@auth0spajs@@" && o.clientId === e.clientId && o.audience === e.audience && h;
531
531
  })[0];
532
532
  }
533
- }, Jr = class {
533
+ }, Vr = class {
534
534
  constructor(e, n, r) {
535
535
  this.storage = e, this.clientId = n, this.cookieDomain = r, this.storageKey = `a0.spajs.txs.${this.clientId}`;
536
536
  }
@@ -544,17 +544,17 @@ let pe = class _t {
544
544
  this.storage.remove(this.storageKey, { cookieDomain: this.cookieDomain });
545
545
  }
546
546
  };
547
- const ze = (t) => typeof t == "number", Xr = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], Vr = (t) => {
547
+ const Ue = (t) => typeof t == "number", Yr = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], Gr = (t) => {
548
548
  if (!t.id_token)
549
549
  throw new Error("ID token is required but missing");
550
550
  const e = ((o) => {
551
551
  const a = o.split("."), [s, h, p] = a;
552
552
  if (a.length !== 3 || !s || !h || !p)
553
553
  throw new Error("ID token could not be decoded");
554
- const u = JSON.parse(Jt(h)), c = { __raw: o }, f = {};
554
+ const u = JSON.parse(Xt(h)), c = { __raw: o }, f = {};
555
555
  return Object.keys(u).forEach((d) => {
556
- c[d] = u[d], Xr.includes(d) || (f[d] = u[d]);
557
- }), { encoded: { header: s, payload: h, signature: p }, header: JSON.parse(Jt(s)), claims: c, user: f };
556
+ c[d] = u[d], Yr.includes(d) || (f[d] = u[d]);
557
+ }), { encoded: { header: s, payload: h, signature: p }, header: JSON.parse(Xt(s)), claims: c, user: f };
558
558
  })(t.id_token);
559
559
  if (!e.claims.iss)
560
560
  throw new Error("Issuer (iss) claim must be a string present in the ID token");
@@ -583,21 +583,21 @@ const ze = (t) => typeof t == "number", Xr = ["iss", "aud", "exp", "nbf", "iat",
583
583
  if (e.claims.nonce !== t.nonce)
584
584
  throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${e.claims.nonce}"`);
585
585
  }
586
- if (t.max_age && !ze(e.claims.auth_time))
586
+ if (t.max_age && !Ue(e.claims.auth_time))
587
587
  throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");
588
- if (e.claims.exp == null || !ze(e.claims.exp))
588
+ if (e.claims.exp == null || !Ue(e.claims.exp))
589
589
  throw new Error("Expiration Time (exp) claim must be a number present in the ID token");
590
- if (!ze(e.claims.iat))
590
+ if (!Ue(e.claims.iat))
591
591
  throw new Error("Issued At (iat) claim must be a number present in the ID token");
592
592
  const n = t.leeway || 60, r = new Date(t.now || Date.now()), i = /* @__PURE__ */ new Date(0);
593
593
  if (i.setUTCSeconds(e.claims.exp + n), r > i)
594
594
  throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${r}) is after expiration time (${i})`);
595
- if (e.claims.nbf != null && ze(e.claims.nbf)) {
595
+ if (e.claims.nbf != null && Ue(e.claims.nbf)) {
596
596
  const o = /* @__PURE__ */ new Date(0);
597
597
  if (o.setUTCSeconds(e.claims.nbf - n), r < o)
598
598
  throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${r}) is before ${o}`);
599
599
  }
600
- if (e.claims.auth_time != null && ze(e.claims.auth_time)) {
600
+ if (e.claims.auth_time != null && Ue(e.claims.auth_time)) {
601
601
  const o = /* @__PURE__ */ new Date(0);
602
602
  if (o.setUTCSeconds(parseInt(e.claims.auth_time) + t.max_age + n), r > o)
603
603
  throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${r}) is after last auth at ${o}`);
@@ -668,26 +668,26 @@ var me = At(function(t, e) {
668
668
  };
669
669
  });
670
670
  xt(me), me.encode, me.parse, me.getAll;
671
- var Yr = me.get, Jn = me.set, Xn = me.remove;
671
+ var Br = me.get, Vn = me.set, Yn = me.remove;
672
672
  const Ie = { get(t) {
673
- const e = Yr(t);
673
+ const e = Br(t);
674
674
  if (e !== void 0)
675
675
  return JSON.parse(e);
676
676
  }, save(t, e, n) {
677
677
  let r = {};
678
- window.location.protocol === "https:" && (r = { secure: !0, sameSite: "none" }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Jn(t, JSON.stringify(e), r);
678
+ window.location.protocol === "https:" && (r = { secure: !0, sameSite: "none" }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Vn(t, JSON.stringify(e), r);
679
679
  }, remove(t, e) {
680
680
  let n = {};
681
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n);
682
- } }, Gr = { get(t) {
681
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), Yn(t, n);
682
+ } }, qr = { get(t) {
683
683
  return Ie.get(t) || Ie.get(`_legacy_${t}`);
684
684
  }, save(t, e, n) {
685
685
  let r = {};
686
- window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Jn(`_legacy_${t}`, JSON.stringify(e), r), Ie.save(t, e, n);
686
+ window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Vn(`_legacy_${t}`, JSON.stringify(e), r), Ie.save(t, e, n);
687
687
  }, remove(t, e) {
688
688
  let n = {};
689
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
690
- } }, Br = { get(t) {
689
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), Yn(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
690
+ } }, Qr = { get(t) {
691
691
  if (typeof sessionStorage > "u")
692
692
  return;
693
693
  const e = sessionStorage.getItem(t);
@@ -697,7 +697,7 @@ const Ie = { get(t) {
697
697
  }, remove(t) {
698
698
  sessionStorage.removeItem(t);
699
699
  } };
700
- function qr(t, e, n) {
700
+ function ei(t, e, n) {
701
701
  var r = e === void 0 ? null : e, i = function(h, p) {
702
702
  var u = atob(h);
703
703
  if (p) {
@@ -710,11 +710,11 @@ function qr(t, e, n) {
710
710
  `, 10) + 1, a = i.substring(o) + (r ? "//# sourceMappingURL=" + r : ""), s = new Blob([a], { type: "application/javascript" });
711
711
  return URL.createObjectURL(s);
712
712
  }
713
- var Xt, Vt, Yt, ht, Qr = (Xt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Vt = null, Yt = !1, function(t) {
714
- return ht = ht || qr(Xt, Vt, Yt), new Worker(ht, t);
713
+ var Vt, Yt, Gt, ht, ti = (Vt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Yt = null, Gt = !1, function(t) {
714
+ return ht = ht || ei(Vt, Yt, Gt), new Worker(ht, t);
715
715
  });
716
716
  const ft = {};
717
- let ei = class {
717
+ let ni = class {
718
718
  constructor(e, n) {
719
719
  this.cache = e, this.clientId = n, this.manifestKey = this.createManifestKeyFrom(this.clientId);
720
720
  }
@@ -740,14 +740,14 @@ let ei = class {
740
740
  return `@@auth0spajs@@::${e}`;
741
741
  }
742
742
  };
743
- const ti = { memory: () => new Fn().enclosedCache, localstorage: () => new Hr() }, Gt = (t) => ti[t], Bt = (t) => {
743
+ const ri = { memory: () => new Xn().enclosedCache, localstorage: () => new Jr() }, Bt = (t) => ri[t], qt = (t) => {
744
744
  const { openUrl: e, onRedirect: n } = t, r = te(t, ["openUrl", "onRedirect"]);
745
745
  return Object.assign(Object.assign({}, r), { openUrl: e === !1 || e ? e : n });
746
- }, pt = new $r();
747
- let ni = class {
746
+ }, pt = new Ur();
747
+ let ii = class {
748
748
  constructor(e) {
749
749
  let n, r;
750
- if (this.userCache = new Fn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
750
+ if (this.userCache = new Xn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
751
751
  await pt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
752
752
  }, this.options = Object.assign(Object.assign(Object.assign({}, this.defaultOptions), e), { authorizationParams: Object.assign(Object.assign({}, this.defaultOptions.authorizationParams), e.authorizationParams) }), typeof window < "u" && (() => {
753
753
  if (!Qe())
@@ -759,14 +759,14 @@ let ni = class {
759
759
  })(), e.cache && e.cacheLocation && console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."), e.cache)
760
760
  r = e.cache;
761
761
  else {
762
- if (n = e.cacheLocation || "memory", !Gt(n))
762
+ if (n = e.cacheLocation || "memory", !Bt(n))
763
763
  throw new Error(`Invalid cache location "${n}"`);
764
- r = Gt(n)();
764
+ r = Bt(n)();
765
765
  }
766
- this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? Ie : Gr, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
767
- const i = e.useCookiesForTransactions ? this.cookieStorage : Br;
766
+ this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? Ie : qr, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
767
+ const i = e.useCookiesForTransactions ? this.cookieStorage : Qr;
768
768
  var o;
769
- this.scope = Fe("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new Jr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Un, this.cacheManager = new Fr(r, r.allKeys ? void 0 : new ei(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new Qr());
769
+ this.scope = Fe("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new Vr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Ln, this.cacheManager = new Xr(r, r.allKeys ? void 0 : new ni(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new ti());
770
770
  }
771
771
  _url(e) {
772
772
  const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Dn)));
@@ -777,14 +777,14 @@ let ni = class {
777
777
  }
778
778
  async _verifyIdToken(e, n, r) {
779
779
  const i = await this.nowProvider();
780
- return Vr({ iss: this.tokenIssuer, aud: this.options.clientId, id_token: e, nonce: n, organization: r, leeway: this.options.leeway, max_age: (o = this.options.authorizationParams.max_age, typeof o != "string" ? o : parseInt(o, 10) || void 0), now: i });
780
+ return Gr({ iss: this.tokenIssuer, aud: this.options.clientId, id_token: e, nonce: n, organization: r, leeway: this.options.leeway, max_age: (o = this.options.authorizationParams.max_age, typeof o != "string" ? o : parseInt(o, 10) || void 0), now: i });
781
781
  var o;
782
782
  }
783
783
  _processOrgHint(e) {
784
784
  e ? this.cookieStorage.save(this.orgHintCookieName, e, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }) : this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain });
785
785
  }
786
786
  async _prepareAuthorizeUrl(e, n, r) {
787
- const i = Ft(dt()), o = Ft(dt()), a = dt(), s = ((u) => {
787
+ const i = Jt(dt()), o = Jt(dt()), a = dt(), s = ((u) => {
788
788
  const c = new Uint8Array(u);
789
789
  return ((f) => {
790
790
  const d = { "+": "-", "/": "_", "=": "" };
@@ -805,7 +805,7 @@ let ni = class {
805
805
  const o = await ((s) => new Promise((h, p) => {
806
806
  let u;
807
807
  const c = setInterval(() => {
808
- s.popup && s.popup.closed && (clearInterval(c), clearTimeout(f), window.removeEventListener("message", u, !1), p(new Ur(s.popup)));
808
+ s.popup && s.popup.closed && (clearInterval(c), clearTimeout(f), window.removeEventListener("message", u, !1), p(new Lr(s.popup)));
809
809
  }, 1e3), f = setTimeout(() => {
810
810
  clearInterval(c), p(new Dr(s.popup)), window.removeEventListener("message", u, !1);
811
811
  }, 1e3 * (s.timeoutInSeconds || 60));
@@ -834,7 +834,7 @@ let ni = class {
834
834
  }
835
835
  async loginWithRedirect(e = {}) {
836
836
  var n;
837
- const r = Bt(e), { openUrl: i, fragment: o, appState: a } = r, s = te(r, ["openUrl", "fragment", "appState"]), h = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, p = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = p, c = te(p, ["url"]);
837
+ const r = qt(e), { openUrl: i, fragment: o, appState: a } = r, s = te(r, ["openUrl", "fragment", "appState"]), h = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, p = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = p, c = te(p, ["url"]);
838
838
  this.transactionManager.create(Object.assign(Object.assign(Object.assign({}, c), { appState: a }), h && { organization: h }));
839
839
  const f = o ? `${u}#${o}` : u;
840
840
  i ? await i(f) : window.location.assign(f);
@@ -851,7 +851,7 @@ let ni = class {
851
851
  if (!s)
852
852
  throw new G("missing_transaction", "Invalid state");
853
853
  if (this.transactionManager.remove(), o)
854
- throw new zr(o, a || o, r, s.appState);
854
+ throw new Rr(o, a || o, r, s.appState);
855
855
  if (!s.code_verifier || s.state && s.state !== r)
856
856
  throw new G("state_mismatch", "Invalid state");
857
857
  const h = s.organization, p = s.nonce, u = s.redirect_uri;
@@ -909,7 +909,7 @@ let ni = class {
909
909
  async getTokenWithPopup(e = {}, n = {}) {
910
910
  var r;
911
911
  const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Fe(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
912
- return n = Object.assign(Object.assign({}, Nr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new pe({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
912
+ return n = Object.assign(Object.assign({}, zr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new pe({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
913
913
  }
914
914
  async isAuthenticated() {
915
915
  return !!await this.getUser();
@@ -920,7 +920,7 @@ let ni = class {
920
920
  return this._url(`/v2/logout?${St(Object.assign({ clientId: e.clientId }, i))}`) + o;
921
921
  }
922
922
  async logout(e = {}) {
923
- const n = Bt(e), { openUrl: r } = n, i = te(n, ["openUrl"]);
923
+ const n = qt(e), { openUrl: r } = n, i = te(n, ["openUrl"]);
924
924
  e.clientId === null ? await this.cacheManager.clear() : await this.cacheManager.clear(e.clientId || this.options.clientId), this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain }), this.cookieStorage.remove(this.isAuthenticatedCookieName, { cookieDomain: this.options.cookieDomain }), this.userCache.remove("@@user@@");
925
925
  const o = this._buildLogoutUrl(i);
926
926
  r ? await r(o) : r !== !1 && window.location.assign(o);
@@ -939,14 +939,14 @@ let ni = class {
939
939
  window.document.body.contains(g) && (window.document.body.removeChild(g), window.removeEventListener("message", b, !1));
940
940
  };
941
941
  let b;
942
- const T = setTimeout(() => {
942
+ const P = setTimeout(() => {
943
943
  _(new It()), l();
944
944
  }, 1e3 * v);
945
945
  b = function(O) {
946
946
  if (O.origin != k || !O.data || O.data.type !== "authorization_response")
947
947
  return;
948
- const x = O.source;
949
- x && x.close(), O.data.response.error ? _(G.fromPayload(O.data.response)) : E(O.data.response), clearTimeout(T), window.removeEventListener("message", b, !1), setTimeout(l, 2e3);
948
+ const j = O.source;
949
+ j && j.close(), O.data.response.error ? _(G.fromPayload(O.data.response)) : E(O.data.response), clearTimeout(P), window.removeEventListener("message", b, !1), setTimeout(l, 2e3);
950
950
  }, window.addEventListener("message", b, !1), window.document.body.appendChild(g), g.setAttribute("src", w);
951
951
  }))(i, this.domainUrl, c);
952
952
  if (o !== f.state)
@@ -962,7 +962,7 @@ let ni = class {
962
962
  if (!(n && n.refresh_token || this.worker)) {
963
963
  if (this.options.useRefreshTokensFallback)
964
964
  return await this._getTokenFromIFrame(e);
965
- throw new Wn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
965
+ throw new Fn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
966
966
  }
967
967
  const r = e.authorizationParams.redirect_uri || this.options.authorizationParams.redirect_uri || window.location.origin, i = typeof e.timeoutInSeconds == "number" ? 1e3 * e.timeoutInSeconds : null;
968
968
  try {
@@ -990,77 +990,87 @@ let ni = class {
990
990
  }
991
991
  }
992
992
  async _requestToken(e, n) {
993
- const { nonceIn: r, organization: i } = n || {}, o = await Wr(Object.assign({ baseUrl: this.domainUrl, client_id: this.options.clientId, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData, timeout: this.httpTimeoutMs }, e), this.worker), a = await this._verifyIdToken(o.id_token, r, i);
993
+ const { nonceIn: r, organization: i } = n || {}, o = await Fr(Object.assign({ baseUrl: this.domainUrl, client_id: this.options.clientId, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData, timeout: this.httpTimeoutMs }, e), this.worker), a = await this._verifyIdToken(o.id_token, r, i);
994
994
  return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({}, o), { decodedToken: a, scope: e.scope, audience: e.audience || "default" }), o.scope ? { oauthTokenScope: o.scope } : null), { client_id: this.options.clientId })), this.cookieStorage.save(this.isAuthenticatedCookieName, !0, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }), this._processOrgHint(i || a.claims.org_id), Object.assign(Object.assign({}, o), { decodedToken: a });
995
995
  }
996
996
  };
997
- async function ri(t) {
998
- const e = new ni(t);
997
+ async function oi(t) {
998
+ const e = new ii(t);
999
999
  return await e.checkSession(), e;
1000
1000
  }
1001
- const Vn = "sesamy.com", ii = "https://logs.sesamy.com/events", Et = "sesamyCacheTimestamp";
1001
+ const Gn = "sesamy.com", ai = "https://logs.sesamy.com/events", Et = "sesamyCacheTimestamp";
1002
1002
  var Q = /* @__PURE__ */ ((t) => (t.READY = "sesamyJsReady", t.AUTHENTICATED = "sesamyJsAuthenticated", t.LOGOUT = "sesamyJsLogout", t.CLEAR_CACHE = "sesamyJsClearCache", t.USER_ATTRIBUTE_CHANGED = "sesamyUserAttributeChanged", t.PURCHASE = "sesamyJsPurchase", t))(Q || {});
1003
- let q;
1003
+ let B;
1004
1004
  const $t = "sesamyAccessToken", Nt = "sesamyExpires";
1005
- function Yn() {
1005
+ function Ut() {
1006
1006
  const t = localStorage.getItem(Nt);
1007
1007
  if (!(t && parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
1008
1008
  return localStorage.getItem($t);
1009
1009
  }
1010
- async function oi(t) {
1011
- if (t.enabled !== !1 && (q = await ri({
1012
- domain: t.endpoint || `token.${Vn}`,
1010
+ async function si(t) {
1011
+ if (t.enabled !== !1 && (B = await oi({
1012
+ domain: t.endpoint || `token.${Gn}`,
1013
1013
  clientId: t.clientId
1014
1014
  }), window.location.search.includes("code=")))
1015
1015
  try {
1016
- await q.handleRedirectCallback();
1017
- const e = await q.getUser();
1016
+ await B.handleRedirectCallback();
1017
+ const e = await B.getUser();
1018
1018
  ue(Q.AUTHENTICATED, e);
1019
1019
  const n = new URL(location.href), r = n.searchParams;
1020
1020
  r.delete("code"), r.delete("state"), n.search = r.toString(), window.history.replaceState({}, document.title, n.toString());
1021
1021
  } catch {
1022
1022
  }
1023
1023
  }
1024
- async function ai() {
1025
- if (Yn())
1024
+ async function ci() {
1025
+ if (Ut())
1026
1026
  return !0;
1027
- if (!q)
1027
+ if (!B)
1028
1028
  throw new Error("Auth0 client not initialized");
1029
- return q.isAuthenticated();
1029
+ return B.isAuthenticated();
1030
1030
  }
1031
- function si() {
1032
- if (!q)
1031
+ async function ui() {
1032
+ if (Ut())
1033
+ return {
1034
+ sub: "local",
1035
+ name: "Local User"
1036
+ };
1037
+ if (!B)
1038
+ throw new Error("Auth0 client not initialized");
1039
+ return B.getUser();
1040
+ }
1041
+ function Bn() {
1042
+ if (!B)
1033
1043
  throw new Error("Auth0 client not initialized");
1034
- return q.loginWithRedirect({
1044
+ return B.loginWithRedirect({
1035
1045
  authorizationParams: {
1036
1046
  redirect_uri: window.location.href
1037
1047
  }
1038
1048
  });
1039
1049
  }
1040
- async function ci(t = !0) {
1041
- const e = Yn();
1050
+ async function li(t = !0) {
1051
+ const e = Ut();
1042
1052
  if (e)
1043
1053
  return e;
1044
1054
  try {
1045
- if (!q)
1055
+ if (!B)
1046
1056
  throw new Error("Auth0 client not initialized");
1047
- return await q.getTokenSilently();
1057
+ return await B.getTokenSilently();
1048
1058
  } catch (n) {
1049
1059
  if (t)
1050
1060
  throw n;
1051
1061
  return null;
1052
1062
  }
1053
1063
  }
1054
- async function ui() {
1055
- if (localStorage.removeItem($t), localStorage.removeItem(Nt), !q)
1064
+ async function di() {
1065
+ if (localStorage.removeItem($t), localStorage.removeItem(Nt), !B)
1056
1066
  throw new Error("Auth0 client not initialized");
1057
- return ue(Q.LOGOUT, {}), q.logout({
1067
+ return ue(Q.LOGOUT, {}), B.logout({
1058
1068
  logoutParams: {
1059
1069
  returnTo: window.location.href
1060
1070
  }
1061
1071
  });
1062
1072
  }
1063
- function li(t) {
1073
+ function hi(t) {
1064
1074
  const e = t.split(".");
1065
1075
  if (e.length !== 3)
1066
1076
  throw new Error("Invalid JWT token format.");
@@ -1071,12 +1081,12 @@ function li(t) {
1071
1081
  );
1072
1082
  return JSON.parse(i);
1073
1083
  }
1074
- async function Gn(t, e) {
1084
+ async function qn(t, e) {
1075
1085
  localStorage.setItem($t, t), e && localStorage.setItem(Nt, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
1076
- const n = li(t);
1086
+ const n = hi(t);
1077
1087
  ue(Q.AUTHENTICATED, n);
1078
1088
  }
1079
- const di = (t, e) => e.skipDedupe || e.method !== "GET", hi = (t, e) => e.method + "@" + t, fi = (t) => t.clone(), qt = ({ skip: t = di, key: e = hi, resolver: n = fi } = {}) => {
1089
+ const fi = (t, e) => e.skipDedupe || e.method !== "GET", pi = (t, e) => e.method + "@" + t, mi = (t) => t.clone(), Qt = ({ skip: t = fi, key: e = pi, resolver: n = mi } = {}) => {
1080
1090
  const r = /* @__PURE__ */ new Map();
1081
1091
  return (i) => (o, a) => {
1082
1092
  if (t(o, a))
@@ -1096,7 +1106,7 @@ const di = (t, e) => e.skipDedupe || e.method !== "GET", hi = (t, e) => e.method
1096
1106
  return r.delete(s), Promise.reject(h);
1097
1107
  }
1098
1108
  };
1099
- }, pi = (t, e) => t * e, mi = (t) => t && t.ok, Qt = ({ delayTimer: t = 500, delayRamp: e = pi, maxAttempts: n = 10, until: r = mi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (p, u) => {
1109
+ }, gi = (t, e) => t * e, yi = (t) => t && t.ok, en = ({ delayTimer: t = 500, delayRamp: e = gi, maxAttempts: n = 10, until: r = yi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (p, u) => {
1100
1110
  let c = 0;
1101
1111
  if (s && s(p, u))
1102
1112
  return h(p, u);
@@ -1123,12 +1133,12 @@ const di = (t, e) => e.skipDedupe || e.method !== "GET", hi = (t, e) => e.method
1123
1133
  throw d;
1124
1134
  return f(null, d);
1125
1135
  });
1126
- }, gi = "application/json", Bn = "Content-Type", ke = Symbol(), qn = Symbol();
1127
- function en(t = {}) {
1136
+ }, vi = "application/json", Qn = "Content-Type", ke = Symbol(), er = Symbol();
1137
+ function tn(t = {}) {
1128
1138
  var e;
1129
- return (e = Object.entries(t).find(([n]) => n.toLowerCase() === Bn.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
1139
+ return (e = Object.entries(t).find(([n]) => n.toLowerCase() === Qn.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
1130
1140
  }
1131
- function tn(t) {
1141
+ function nn(t) {
1132
1142
  return /^application\/.*json.*/.test(t);
1133
1143
  }
1134
1144
  const ge = function(t, e, n = !1) {
@@ -1157,34 +1167,34 @@ const ge = function(t, e, n = !1) {
1157
1167
  return n && i ? new i(...r) : i;
1158
1168
  }
1159
1169
  };
1160
- function yi(t, e = !1) {
1170
+ function wi(t, e = !1) {
1161
1171
  Oe.options = e ? t : ge(Oe.options, t);
1162
1172
  }
1163
- function vi(t, e = !1) {
1173
+ function bi(t, e = !1) {
1164
1174
  Oe.polyfills = e ? t : ge(Oe.polyfills, t);
1165
1175
  }
1166
- function wi(t) {
1176
+ function ki(t) {
1167
1177
  Oe.errorType = t;
1168
1178
  }
1169
- const bi = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1170
- class Qn extends Error {
1179
+ const Ii = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1180
+ class tr extends Error {
1171
1181
  }
1172
- const ki = (t) => {
1182
+ const Si = (t) => {
1173
1183
  const e = /* @__PURE__ */ Object.create(null);
1174
1184
  t = t._addons.reduce((g, l) => l.beforeRequest && l.beforeRequest(g, t._options, e) || g, t);
1175
1185
  const { _url: n, _options: r, _config: i, _catchers: o, _resolvers: a, _middlewares: s, _addons: h } = t, p = new Map(o), u = ge(i.options, r);
1176
1186
  let c = n;
1177
- const f = bi(s)((g, l) => (c = g, i.polyfill("fetch")(g, l)))(n, u), d = new Error(), w = f.catch((g) => {
1187
+ const f = Ii(s)((g, l) => (c = g, i.polyfill("fetch")(g, l)))(n, u), d = new Error(), w = f.catch((g) => {
1178
1188
  throw { [ke]: g };
1179
1189
  }).then((g) => {
1180
1190
  if (!g.ok) {
1181
- const l = new Qn();
1191
+ const l = new tr();
1182
1192
  if (l.cause = d, l.stack = l.stack + `
1183
1193
  CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1184
1194
  throw l;
1185
1195
  return g.text().then((b) => {
1186
- var T;
1187
- if (l.message = b, i.errorType === "json" || ((T = g.headers.get("Content-Type")) === null || T === void 0 ? void 0 : T.split(";")[0]) === "application/json")
1196
+ var P;
1197
+ if (l.message = b, i.errorType === "json" || ((P = g.headers.get("Content-Type")) === null || P === void 0 ? void 0 : P.split(";")[0]) === "application/json")
1188
1198
  try {
1189
1199
  l.json = JSON.parse(b);
1190
1200
  } catch {
@@ -1194,13 +1204,13 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1194
1204
  }
1195
1205
  return g;
1196
1206
  }), k = (g) => g.catch((l) => {
1197
- const b = l.hasOwnProperty(ke), T = b ? l[ke] : l, O = (T == null ? void 0 : T.status) && p.get(T.status) || p.get(T == null ? void 0 : T.name) || b && p.has(ke) && p.get(ke);
1207
+ const b = l.hasOwnProperty(ke), P = b ? l[ke] : l, O = (P == null ? void 0 : P.status) && p.get(P.status) || p.get(P == null ? void 0 : P.name) || b && p.has(ke) && p.get(ke);
1198
1208
  if (O)
1199
- return O(T, t);
1200
- const x = p.get(qn);
1201
- if (x)
1202
- return x(T, t);
1203
- throw T;
1209
+ return O(P, t);
1210
+ const j = p.get(er);
1211
+ if (j)
1212
+ return j(P, t);
1213
+ throw P;
1204
1214
  }), v = (g) => (l) => /* If a callback is provided, then callback with the body result otherwise return the parsed body itself. */ k(g ? w.then((b) => b && b[g]()).then((b) => l ? l(b) : b) : w.then((b) => l ? l(b) : b)), E = {
1205
1215
  _wretchReq: t,
1206
1216
  _fetchReq: f,
@@ -1240,7 +1250,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1240
1250
  ...typeof l.resolver == "function" ? l.resolver(g) : l.resolver
1241
1251
  }), E);
1242
1252
  return a.reduce((g, l) => l(g, t), _);
1243
- }, Ii = {
1253
+ }, _i = {
1244
1254
  _url: "",
1245
1255
  _options: {},
1246
1256
  _config: Oe,
@@ -1290,7 +1300,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1290
1300
  return this.headers({ Accept: t });
1291
1301
  },
1292
1302
  content(t) {
1293
- return this.headers({ [Bn]: t });
1303
+ return this.headers({ [Qn]: t });
1294
1304
  },
1295
1305
  auth(t) {
1296
1306
  return this.headers({ Authorization: t });
@@ -1300,7 +1310,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1300
1310
  return n.set(t, e), { ...this, _catchers: n };
1301
1311
  },
1302
1312
  catcherFallback(t) {
1303
- return this.catcher(qn, t);
1313
+ return this.catcher(er, t);
1304
1314
  },
1305
1315
  resolve(t, e = !1) {
1306
1316
  return { ...this, _resolvers: e ? [t] : [...this._resolvers, t] };
@@ -1319,8 +1329,8 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1319
1329
  },
1320
1330
  fetch(t = this._options.method, e = "", n = null) {
1321
1331
  let r = this.url(e).options({ method: t });
1322
- const i = en(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || tn(i));
1323
- return r = n ? o ? r.json(n, i) : r.body(n) : r, ki(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1332
+ const i = tn(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || nn(i));
1333
+ return r = n ? o ? r.json(n, i) : r.body(n) : r, Si(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1324
1334
  },
1325
1335
  get(t = "") {
1326
1336
  return this.fetch("GET", t);
@@ -1347,23 +1357,23 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1347
1357
  return { ...this, _options: { ...this._options, body: t } };
1348
1358
  },
1349
1359
  json(t, e) {
1350
- const n = en(this._options.headers);
1351
- return this.content(e || tn(n) && n || gi).body(JSON.stringify(t));
1360
+ const n = tn(this._options.headers);
1361
+ return this.content(e || nn(n) && n || vi).body(JSON.stringify(t));
1352
1362
  }
1353
1363
  };
1354
1364
  function le(t = "", e = {}) {
1355
- return { ...Ii, _url: t, _options: e };
1365
+ return { ..._i, _url: t, _options: e };
1356
1366
  }
1357
1367
  le.default = le;
1358
- le.options = yi;
1359
- le.errorType = wi;
1360
- le.polyfills = vi;
1361
- le.WretchError = Qn;
1368
+ le.options = wi;
1369
+ le.errorType = ki;
1370
+ le.polyfills = bi;
1371
+ le.WretchError = tr;
1362
1372
  function re() {
1363
1373
  sessionStorage.removeItem(Et), ue(Q.CLEAR_CACHE, {});
1364
1374
  }
1365
- function Si(t) {
1366
- const e = t.endpoint || `https://api2.${Vn}`, n = (S) => async (I, N) => {
1375
+ function Ei(t) {
1376
+ const e = t.endpoint || `https://api2.${Gn}`, n = (S) => async (I, N) => {
1367
1377
  let K = sessionStorage.getItem(Et);
1368
1378
  K || (K = Date.now().toString(), sessionStorage.setItem(Et, K));
1369
1379
  const X = {
@@ -1376,7 +1386,7 @@ function Si(t) {
1376
1386
  return S(I, X);
1377
1387
  }, r = (S = !0) => (I) => async (N, K) => {
1378
1388
  let X = null;
1379
- if (X = await ci(S), !X) {
1389
+ if (X = await li(S), !X) {
1380
1390
  if (S)
1381
1391
  throw new Error("No access token available");
1382
1392
  return I(N, K);
@@ -1403,8 +1413,8 @@ function Si(t) {
1403
1413
  }, o = le(e).headers({ "Content-Type": "application/json" }).middlewares([
1404
1414
  n,
1405
1415
  r(),
1406
- qt(),
1407
- Qt({
1416
+ Qt(),
1417
+ en({
1408
1418
  delayTimer: 1e3,
1409
1419
  delayRamp: (S, I) => S * I,
1410
1420
  maxAttempts: 3,
@@ -1415,8 +1425,8 @@ function Si(t) {
1415
1425
  n,
1416
1426
  r(!1),
1417
1427
  i,
1418
- qt(),
1419
- Qt({
1428
+ Qt(),
1429
+ en({
1420
1430
  delayTimer: 1e3,
1421
1431
  delayRamp: (S, I) => S * I,
1422
1432
  maxAttempts: 3,
@@ -1476,17 +1486,17 @@ function Si(t) {
1476
1486
  const I = await o.url("/tags").post(S).res();
1477
1487
  return ue(Q.USER_ATTRIBUTE_CHANGED, {}), re(), I.ok;
1478
1488
  }
1479
- async function T(S) {
1489
+ async function P(S) {
1480
1490
  return (await a.url("/tallies").get().json())[S];
1481
1491
  }
1482
1492
  async function O() {
1483
1493
  return await a.url("/tallies").get().json();
1484
1494
  }
1485
- async function x(S) {
1495
+ async function j(S) {
1486
1496
  const I = await a.url(`/tallies/${S}`).delete().res();
1487
1497
  return re(), I.ok;
1488
1498
  }
1489
- async function R(S, I) {
1499
+ async function D(S, I) {
1490
1500
  return await a.url(`/tallies/${S}/push`).post(I).json();
1491
1501
  }
1492
1502
  async function L(S) {
@@ -1498,7 +1508,7 @@ function Si(t) {
1498
1508
  async function A() {
1499
1509
  return await o.url("/payment-issues").get().json();
1500
1510
  }
1501
- async function D(S) {
1511
+ async function z(S) {
1502
1512
  const I = await o.url(`/products/${S}/auto-onboard`).post().json();
1503
1513
  return I.length && re(), I;
1504
1514
  }
@@ -1519,77 +1529,77 @@ function Si(t) {
1519
1529
  getTags: g,
1520
1530
  deleteTag: l,
1521
1531
  setTag: b,
1522
- getTally: T,
1532
+ getTally: P,
1523
1533
  getTallies: O,
1524
- deleteTally: x,
1525
- pushTally: R,
1534
+ deleteTally: j,
1535
+ pushTally: D,
1526
1536
  getProduct: L,
1527
1537
  getPaymentIssues: A,
1528
- autoOnboardProduct: D
1538
+ autoOnboardProduct: z
1529
1539
  };
1530
1540
  }
1531
- const er = "@sesamy/sesamy-js", zt = "1.3.2";
1532
- function nn(t, e, n, r, i) {
1541
+ const nr = "@sesamy/sesamy-js", zt = "1.3.2";
1542
+ function rn(t, e, n, r, i) {
1533
1543
  for (e = e.split ? e.split(".") : e, r = 0; r < e.length; r++)
1534
1544
  t = t ? t[e[r]] : i;
1535
1545
  return t === i ? n : t;
1536
1546
  }
1537
- var Je = "undefined", rn = "object", Tt = function() {
1538
- }, tr = "any", nr = "*", ve = "__", tt = typeof process < "u" ? process : {};
1547
+ var Je = "undefined", on = "object", Pt = function() {
1548
+ }, rr = "any", ir = "*", ve = "__", tt = typeof process < "u" ? process : {};
1539
1549
  tt.env && tt.env.NODE_ENV;
1540
1550
  var J = typeof document < "u";
1541
1551
  tt.versions != null && tt.versions.node != null;
1542
1552
  typeof Deno < "u" && Deno.core;
1543
1553
  J && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
1544
- function rr(t, e) {
1554
+ function or(t, e) {
1545
1555
  return e.charAt(0)[t]() + e.slice(1);
1546
1556
  }
1547
- var _i = rr.bind(null, "toUpperCase"), Ei = rr.bind(null, "toLowerCase");
1548
- function Ti(t) {
1549
- return ir(t) ? _i("null") : typeof t == "object" ? Ci(t) : Object.prototype.toString.call(t).slice(8, -1);
1557
+ var Pi = or.bind(null, "toUpperCase"), Ti = or.bind(null, "toLowerCase");
1558
+ function Oi(t) {
1559
+ return ar(t) ? Pi("null") : typeof t == "object" ? Ai(t) : Object.prototype.toString.call(t).slice(8, -1);
1550
1560
  }
1551
1561
  function nt(t, e) {
1552
1562
  e === void 0 && (e = !0);
1553
- var n = Ti(t);
1554
- return e ? Ei(n) : n;
1563
+ var n = Oi(t);
1564
+ return e ? Ti(n) : n;
1555
1565
  }
1556
1566
  function We(t, e) {
1557
1567
  return typeof e === t;
1558
1568
  }
1559
- var Y = We.bind(null, "function"), se = We.bind(null, "string"), Se = We.bind(null, "undefined"), Pi = We.bind(null, "boolean");
1569
+ var Y = We.bind(null, "function"), se = We.bind(null, "string"), Se = We.bind(null, "undefined"), ji = We.bind(null, "boolean");
1560
1570
  We.bind(null, "symbol");
1561
- function ir(t) {
1571
+ function ar(t) {
1562
1572
  return t === null;
1563
1573
  }
1564
- function Oi(t) {
1574
+ function Ci(t) {
1565
1575
  return nt(t) === "number" && !isNaN(t);
1566
1576
  }
1567
- function or(t) {
1577
+ function sr(t) {
1568
1578
  return nt(t) === "array";
1569
1579
  }
1570
1580
  function V(t) {
1571
- if (!ji(t))
1581
+ if (!xi(t))
1572
1582
  return !1;
1573
1583
  for (var e = t; Object.getPrototypeOf(e) !== null; )
1574
1584
  e = Object.getPrototypeOf(e);
1575
1585
  return Object.getPrototypeOf(t) === e;
1576
1586
  }
1577
- function ji(t) {
1587
+ function xi(t) {
1578
1588
  return t && (typeof t == "object" || t !== null);
1579
1589
  }
1580
- function Ci(t) {
1590
+ function Ai(t) {
1581
1591
  return Y(t.constructor) ? t.constructor.name : null;
1582
1592
  }
1583
- function xi(t) {
1584
- return t instanceof Error || se(t.message) && t.constructor && Oi(t.constructor.stackTraceLimit);
1593
+ function $i(t) {
1594
+ return t instanceof Error || se(t.message) && t.constructor && Ci(t.constructor.stackTraceLimit);
1585
1595
  }
1586
- function ar(t, e) {
1587
- if (typeof e != "object" || ir(e))
1596
+ function cr(t, e) {
1597
+ if (typeof e != "object" || ar(e))
1588
1598
  return !1;
1589
1599
  if (e instanceof t)
1590
1600
  return !0;
1591
1601
  var n = nt(new t(""));
1592
- if (xi(e))
1602
+ if ($i(e))
1593
1603
  for (; e; ) {
1594
1604
  if (nt(e) === n)
1595
1605
  return !0;
@@ -1597,13 +1607,13 @@ function ar(t, e) {
1597
1607
  }
1598
1608
  return !1;
1599
1609
  }
1600
- ar.bind(null, TypeError);
1601
- ar.bind(null, SyntaxError);
1610
+ cr.bind(null, TypeError);
1611
+ cr.bind(null, SyntaxError);
1602
1612
  function ot(t, e) {
1603
1613
  var n = t instanceof Element || t instanceof HTMLDocument;
1604
- return n && e ? Ai(t, e) : n;
1614
+ return n && e ? Ni(t, e) : n;
1605
1615
  }
1606
- function Ai(t, e) {
1616
+ function Ni(t, e) {
1607
1617
  return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
1608
1618
  }
1609
1619
  function at(t) {
@@ -1616,23 +1626,23 @@ at(ot, "form");
1616
1626
  at(ot, "button");
1617
1627
  at(ot, "input");
1618
1628
  at(ot, "select");
1619
- function $i(t) {
1620
- return t ? or(t) ? t : [t] : [];
1629
+ function Ui(t) {
1630
+ return t ? sr(t) ? t : [t] : [];
1621
1631
  }
1622
- function on(t) {
1632
+ function an(t) {
1623
1633
  try {
1624
1634
  return decodeURIComponent(t.replace(/\+/g, " "));
1625
1635
  } catch {
1626
1636
  return null;
1627
1637
  }
1628
1638
  }
1629
- function Ni() {
1639
+ function zi() {
1630
1640
  if (J) {
1631
1641
  var t = navigator, e = t.languages;
1632
1642
  return t.userLanguage || (e && e.length ? e[0] : t.language);
1633
1643
  }
1634
1644
  }
1635
- function zi() {
1645
+ function Ri() {
1636
1646
  try {
1637
1647
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1638
1648
  } catch {
@@ -1641,12 +1651,12 @@ function zi() {
1641
1651
  function Di(t) {
1642
1652
  return function(e) {
1643
1653
  for (var n, r = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; n = i.exec(e); ) {
1644
- var o = on(n[1]), a = on(n[2]);
1654
+ var o = an(n[1]), a = an(n[2]);
1645
1655
  o.substring(o.length - 2) === "[]" ? (r[o = o.substring(0, o.length - 2)] || (r[o] = [])).push(a) : r[o] = a === "" || a;
1646
1656
  }
1647
1657
  for (var s in r) {
1648
1658
  var h = s.split("[");
1649
- h.length > 1 && (Ui(r, h.map(function(p) {
1659
+ h.length > 1 && (Li(r, h.map(function(p) {
1650
1660
  return p.replace(/[?[\]\\ ]/g, "");
1651
1661
  }), r[s]), delete r[s]);
1652
1662
  }
@@ -1659,7 +1669,7 @@ function Di(t) {
1659
1669
  return J && window.location.search.substring(1);
1660
1670
  }(t));
1661
1671
  }
1662
- function Ui(t, e, n) {
1672
+ function Li(t, e, n) {
1663
1673
  for (var r = e.length - 1, i = 0; i < r; ++i) {
1664
1674
  var o = e[i];
1665
1675
  if (o === "__proto__" || o === "constructor")
@@ -1675,7 +1685,7 @@ function st() {
1675
1685
  }
1676
1686
  return t;
1677
1687
  }
1678
- function Ri(t, e) {
1688
+ function Mi(t, e) {
1679
1689
  var n, r, i, o = null, a = 0, s = function() {
1680
1690
  a = /* @__PURE__ */ new Date(), o = null, i = t.apply(n, r);
1681
1691
  };
@@ -1686,7 +1696,7 @@ function Ri(t, e) {
1686
1696
  return n = this, r = arguments, p <= 0 ? (clearTimeout(o), o = null, a = h, i = t.apply(n, r)) : o || (o = setTimeout(s, p)), i;
1687
1697
  };
1688
1698
  }
1689
- var Re = "global", je = ve + "global" + ve, Ce = typeof self === rn && self.self === self && self || typeof global === rn && global.global === global && global || void 0;
1699
+ var De = "global", je = ve + "global" + ve, Ce = typeof self === on && self.self === self && self || typeof global === on && global.global === global && global || void 0;
1690
1700
  function we(t) {
1691
1701
  return Ce[je][t];
1692
1702
  }
@@ -1699,7 +1709,7 @@ function Ae(t) {
1699
1709
  function $e(t, e, n) {
1700
1710
  var r;
1701
1711
  try {
1702
- if (Dt(t)) {
1712
+ if (Rt(t)) {
1703
1713
  var i = window[t];
1704
1714
  r = i[e].bind(i);
1705
1715
  }
@@ -1709,7 +1719,7 @@ function $e(t, e, n) {
1709
1719
  }
1710
1720
  Ce[je] || (Ce[je] = {});
1711
1721
  var Xe = {};
1712
- function Dt(t) {
1722
+ function Rt(t) {
1713
1723
  if (typeof Xe[t] !== Je)
1714
1724
  return Xe[t];
1715
1725
  try {
@@ -1720,25 +1730,25 @@ function Dt(t) {
1720
1730
  }
1721
1731
  return Xe[t] = !0;
1722
1732
  }
1723
- function C() {
1724
- return C = Object.assign || function(t) {
1733
+ function x() {
1734
+ return x = Object.assign || function(t) {
1725
1735
  for (var e = 1; e < arguments.length; e++) {
1726
1736
  var n = arguments[e];
1727
1737
  for (var r in n)
1728
1738
  Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
1729
1739
  }
1730
1740
  return t;
1731
- }, C.apply(this, arguments);
1741
+ }, x.apply(this, arguments);
1732
1742
  }
1733
- var ae = "function", ie = "undefined", Li = "@@redux/" + Math.random().toString(36), an = /* @__PURE__ */ function() {
1743
+ var ae = "function", ie = "undefined", Zi = "@@redux/" + Math.random().toString(36), sn = /* @__PURE__ */ function() {
1734
1744
  return typeof Symbol === ae && Symbol.observable || "@@observable";
1735
1745
  }(), Ve = " != " + ae;
1736
- function sr(t, e, n) {
1746
+ function ur(t, e, n) {
1737
1747
  var r;
1738
1748
  if (typeof e === ae && typeof n === ie && (n = e, e = void 0), typeof n !== ie) {
1739
1749
  if (typeof n !== ae)
1740
1750
  throw new Error("enhancer" + Ve);
1741
- return n(sr)(t, e);
1751
+ return n(ur)(t, e);
1742
1752
  }
1743
1753
  if (typeof t !== ae)
1744
1754
  throw new Error("reducer" + Ve);
@@ -1781,7 +1791,7 @@ function sr(t, e, n) {
1781
1791
  if (typeof d !== ae)
1782
1792
  throw new Error("next reducer" + Ve);
1783
1793
  i = d, f({ type: "@@redux/INIT" });
1784
- } })[an] = function() {
1794
+ } })[sn] = function() {
1785
1795
  var d, w = c;
1786
1796
  return (d = { subscribe: function(k) {
1787
1797
  if (typeof k != "object")
@@ -1790,12 +1800,12 @@ function sr(t, e, n) {
1790
1800
  k.next && k.next(u());
1791
1801
  }
1792
1802
  return v(), { unsubscribe: w(v) };
1793
- } })[an] = function() {
1803
+ } })[sn] = function() {
1794
1804
  return this;
1795
1805
  }, d;
1796
1806
  }, r;
1797
1807
  }
1798
- function Mi(t, e) {
1808
+ function Ki(t, e) {
1799
1809
  var n = e && e.type;
1800
1810
  return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " + ie;
1801
1811
  }
@@ -1809,7 +1819,7 @@ function xe() {
1809
1819
  };
1810
1820
  });
1811
1821
  }
1812
- function Zi() {
1822
+ function Wi() {
1813
1823
  var t = arguments;
1814
1824
  return function(e) {
1815
1825
  return function(n, r, i) {
@@ -1818,39 +1828,39 @@ function Zi() {
1818
1828
  } };
1819
1829
  return o = [].slice.call(t).map(function(p) {
1820
1830
  return p(h);
1821
- }), C({}, a, { dispatch: s = xe.apply(void 0, o)(a.dispatch) });
1831
+ }), x({}, a, { dispatch: s = xe.apply(void 0, o)(a.dispatch) });
1822
1832
  };
1823
1833
  };
1824
1834
  }
1825
- var ce = ve + "anon_id", ye = ve + "user_id", Ee = ve + "user_traits", oe = "userId", _e = "anonymousId", et = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], Pt = ["name", "EVENTS", "config", "loaded"], j = et.reduce(function(t, e) {
1835
+ var ce = ve + "anon_id", ye = ve + "user_id", Ee = ve + "user_traits", oe = "userId", _e = "anonymousId", et = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], Tt = ["name", "EVENTS", "config", "loaded"], C = et.reduce(function(t, e) {
1826
1836
  return t[e] = e, t;
1827
1837
  }, { registerPluginType: function(t) {
1828
1838
  return "registerPlugin:" + t;
1829
1839
  }, pluginReadyType: function(t) {
1830
1840
  return "ready:" + t;
1831
- } }), sn = /^utm_/, cn = /^an_prop_/, un = /^an_trait_/;
1832
- function Ki(t) {
1841
+ } }), cn = /^utm_/, un = /^an_prop_/, ln = /^an_trait_/;
1842
+ function Hi(t) {
1833
1843
  var e = t.storage.setItem;
1834
1844
  return function(n) {
1835
1845
  return function(r) {
1836
1846
  return function(i) {
1837
- if (i.type === j.bootstrap) {
1847
+ if (i.type === C.bootstrap) {
1838
1848
  var o = i.params, a = i.user, s = i.persistedUser, h = i.initialUser, p = s.userId === a.userId;
1839
- s.anonymousId !== a.anonymousId && e(ce, a.anonymousId), p || e(ye, a.userId), h.traits && e(Ee, C({}, p && s.traits ? s.traits : {}, h.traits));
1849
+ s.anonymousId !== a.anonymousId && e(ce, a.anonymousId), p || e(ye, a.userId), h.traits && e(Ee, x({}, p && s.traits ? s.traits : {}, h.traits));
1840
1850
  var u = Object.keys(i.params);
1841
1851
  if (u.length) {
1842
1852
  var c = o.an_uid, f = o.an_event, d = u.reduce(function(w, k) {
1843
- if (k.match(sn) || k.match(/^(d|g)clid/)) {
1844
- var v = k.replace(sn, "");
1853
+ if (k.match(cn) || k.match(/^(d|g)clid/)) {
1854
+ var v = k.replace(cn, "");
1845
1855
  w.campaign[v === "campaign" ? "name" : v] = o[k];
1846
1856
  }
1847
- return k.match(cn) && (w.props[k.replace(cn, "")] = o[k]), k.match(un) && (w.traits[k.replace(un, "")] = o[k]), w;
1857
+ return k.match(un) && (w.props[k.replace(un, "")] = o[k]), k.match(ln) && (w.traits[k.replace(ln, "")] = o[k]), w;
1848
1858
  }, { campaign: {}, props: {}, traits: {} });
1849
- n.dispatch(C({ type: j.params, raw: o }, d, c ? { userId: c } : {})), c && setTimeout(function() {
1859
+ n.dispatch(x({ type: C.params, raw: o }, d, c ? { userId: c } : {})), c && setTimeout(function() {
1850
1860
  return t.identify(c, d.traits);
1851
1861
  }, 0), f && setTimeout(function() {
1852
1862
  return t.track(f, d.props);
1853
- }, 0), Object.keys(d.campaign).length && n.dispatch({ type: j.campaign, campaign: d.campaign });
1863
+ }, 0), Object.keys(d.campaign).length && n.dispatch({ type: C.campaign, campaign: d.campaign });
1854
1864
  }
1855
1865
  }
1856
1866
  return r(i);
@@ -1858,18 +1868,18 @@ function Ki(t) {
1858
1868
  };
1859
1869
  };
1860
1870
  }
1861
- function Wi(t) {
1871
+ function Fi(t) {
1862
1872
  return function(e, n) {
1863
- if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === j.setItemEnd) {
1873
+ if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === C.setItemEnd) {
1864
1874
  if (n.key === ce)
1865
- return C({}, e, { anonymousId: n.value });
1875
+ return x({}, e, { anonymousId: n.value });
1866
1876
  if (n.key === ye)
1867
- return C({}, e, { userId: n.value });
1877
+ return x({}, e, { userId: n.value });
1868
1878
  }
1869
1879
  switch (n.type) {
1870
- case j.identify:
1871
- return Object.assign({}, e, { userId: n.userId, traits: C({}, e.traits, n.traits) });
1872
- case j.reset:
1880
+ case C.identify:
1881
+ return Object.assign({}, e, { userId: n.userId, traits: x({}, e.traits, n.traits) });
1882
+ case C.reset:
1873
1883
  return [ye, ce, Ee].forEach(function(r) {
1874
1884
  t.removeItem(r);
1875
1885
  }), Object.assign({}, e, { userId: null, anonymousId: null, traits: {} });
@@ -1878,49 +1888,49 @@ function Wi(t) {
1878
1888
  }
1879
1889
  };
1880
1890
  }
1881
- function ln(t) {
1891
+ function dn(t) {
1882
1892
  return { userId: t.getItem(ye), anonymousId: t.getItem(ce), traits: t.getItem(Ee) };
1883
1893
  }
1884
1894
  var Ot = function(t) {
1885
1895
  return ve + "TEMP" + ve + t;
1886
1896
  };
1887
- function Hi(t) {
1897
+ function Ji(t) {
1888
1898
  var e = t.storage, n = e.setItem, r = e.removeItem, i = e.getItem;
1889
1899
  return function(o) {
1890
1900
  return function(a) {
1891
1901
  return function(s) {
1892
1902
  var h = s.userId, p = s.traits, u = s.options;
1893
- if (s.type === j.reset && ([ye, Ee, ce].forEach(function(d) {
1903
+ if (s.type === C.reset && ([ye, Ee, ce].forEach(function(d) {
1894
1904
  r(d);
1895
1905
  }), [oe, _e, "traits"].forEach(function(d) {
1896
1906
  Ae(Ot(d));
1897
- })), s.type === j.identify) {
1907
+ })), s.type === C.identify) {
1898
1908
  i(ce) || n(ce, st());
1899
1909
  var c = i(ye), f = i(Ee) || {};
1900
- c && c !== h && o.dispatch({ type: j.userIdChanged, old: { userId: c, traits: f }, new: { userId: h, traits: p }, options: u }), h && n(ye, h), p && n(Ee, C({}, f, p));
1910
+ c && c !== h && o.dispatch({ type: C.userIdChanged, old: { userId: c, traits: f }, new: { userId: h, traits: p }, options: u }), h && n(ye, h), p && n(Ee, x({}, f, p));
1901
1911
  }
1902
1912
  return a(s);
1903
1913
  };
1904
1914
  };
1905
1915
  };
1906
1916
  }
1907
- var Ue = {};
1908
- function dn(t, e) {
1909
- Ue[t] && Y(Ue[t]) && (Ue[t](e), delete Ue[t]);
1917
+ var Re = {};
1918
+ function hn(t, e) {
1919
+ Re[t] && Y(Re[t]) && (Re[t](e), delete Re[t]);
1910
1920
  }
1911
- function cr(t, e, n) {
1921
+ function lr(t, e, n) {
1912
1922
  return new Promise(function(r, i) {
1913
- return e() ? r(t) : n < 1 ? i(C({}, t, { queue: !0 })) : new Promise(function(o) {
1923
+ return e() ? r(t) : n < 1 ? i(x({}, t, { queue: !0 })) : new Promise(function(o) {
1914
1924
  return setTimeout(o, 10);
1915
1925
  }).then(function(o) {
1916
- return cr(t, e, n - 10).then(r, i);
1926
+ return lr(t, e, n - 10).then(r, i);
1917
1927
  });
1918
1928
  });
1919
1929
  }
1920
- function Fi(t) {
1930
+ function Xi(t) {
1921
1931
  return { abort: t };
1922
1932
  }
1923
- function ur(t, e, n) {
1933
+ function dr(t, e, n) {
1924
1934
  var r = {}, i = e(), o = t.getState(), a = o.plugins, s = o.queue, h = o.user;
1925
1935
  if (!o.context.offline && s && s.actions && s.actions.length) {
1926
1936
  var p = s.actions.reduce(function(c, f, d) {
@@ -1931,15 +1941,15 @@ function ur(t, e, n) {
1931
1941
  var f = s.actions[c], d = f.plugin, w = f.payload.type, k = i[d][w];
1932
1942
  if (k && Y(k)) {
1933
1943
  var v, E = function(l, b) {
1934
- return l === void 0 && (l = {}), b === void 0 && (b = {}), [oe, _e].reduce(function(T, O) {
1935
- return l.hasOwnProperty(O) && b[O] && b[O] !== l[O] && (T[O] = b[O]), T;
1944
+ return l === void 0 && (l = {}), b === void 0 && (b = {}), [oe, _e].reduce(function(P, O) {
1945
+ return l.hasOwnProperty(O) && b[O] && b[O] !== l[O] && (P[O] = b[O]), P;
1936
1946
  }, l);
1937
1947
  }(f.payload, h), _ = r[E.meta.rid];
1938
- if (!_ && (v = k({ payload: E, config: a[d].config, instance: n, abort: Fi })) && V(v) && v.abort)
1948
+ if (!_ && (v = k({ payload: E, config: a[d].config, instance: n, abort: Xi })) && V(v) && v.abort)
1939
1949
  return void (r[E.meta.rid] = !0);
1940
1950
  if (!_) {
1941
1951
  var g = w + ":" + d;
1942
- t.dispatch(C({}, E, { type: g, _: { called: g, from: "queueDrain" } }));
1952
+ t.dispatch(x({}, E, { type: g, _: { called: g, from: "queueDrain" } }));
1943
1953
  }
1944
1954
  }
1945
1955
  });
@@ -1953,7 +1963,7 @@ function ur(t, e, n) {
1953
1963
  var mt = function(t) {
1954
1964
  var e = t.data, n = t.action, r = t.instance, i = t.state, o = t.allPlugins, a = t.allMatches, s = t.store, h = t.EVENTS;
1955
1965
  try {
1956
- var p = i.plugins, u = i.context, c = n.type, f = c.match(Te), d = e.exact.map(function(v) {
1966
+ var p = i.plugins, u = i.context, c = n.type, f = c.match(Pe), d = e.exact.map(function(v) {
1957
1967
  return v.pluginName;
1958
1968
  });
1959
1969
  f && (d = a.during.map(function(v) {
@@ -1961,21 +1971,21 @@ var mt = function(t) {
1961
1971
  }));
1962
1972
  var w = /* @__PURE__ */ function(v, E) {
1963
1973
  return function(_, g, l) {
1964
- var b = g.config, T = g.name, O = T + "." + _.type;
1974
+ var b = g.config, P = g.name, O = P + "." + _.type;
1965
1975
  l && (O = l.event);
1966
- var x = _.type.match(Te) ? /* @__PURE__ */ function(R, L, H, A, D) {
1976
+ var j = _.type.match(Pe) ? /* @__PURE__ */ function(D, L, H, A, z) {
1967
1977
  return function(S, I) {
1968
- var N = A ? A.name : R, K = I && Ke(I) ? I : H;
1969
- if (A && (!(K = I && Ke(I) ? I : [R]).includes(R) || K.length !== 1))
1970
- throw new Error("Method " + L + " can only abort " + R + " plugin. " + JSON.stringify(K) + " input valid");
1971
- return C({}, D, { abort: { reason: S, plugins: K, caller: L, _: N } });
1978
+ var N = A ? A.name : D, K = I && Ke(I) ? I : H;
1979
+ if (A && (!(K = I && Ke(I) ? I : [D]).includes(D) || K.length !== 1))
1980
+ throw new Error("Method " + L + " can only abort " + D + " plugin. " + JSON.stringify(K) + " input valid");
1981
+ return x({}, z, { abort: { reason: S, plugins: K, caller: L, _: N } });
1972
1982
  };
1973
- }(T, O, E, l, _) : /* @__PURE__ */ function(R, L) {
1983
+ }(P, O, E, l, _) : /* @__PURE__ */ function(D, L) {
1974
1984
  return function() {
1975
- throw new Error(R.type + " action not cancellable. Remove abort in " + L);
1985
+ throw new Error(D.type + " action not cancellable. Remove abort in " + L);
1976
1986
  };
1977
1987
  }(_, O);
1978
- return { payload: Ji(_), instance: v, config: b || {}, abort: x };
1988
+ return { payload: Vi(_), instance: v, config: b || {}, abort: j };
1979
1989
  };
1980
1990
  }(r, d), k = e.exact.reduce(function(v, E) {
1981
1991
  var _ = E.pluginName, g = E.methodName, l = !1;
@@ -1988,25 +1998,25 @@ var mt = function(t) {
1988
1998
  function b() {
1989
1999
  return Promise.resolve(l);
1990
2000
  }
1991
- var T = function() {
2001
+ var P = function() {
1992
2002
  if (e.namespaced && e.namespaced[g])
1993
- return Promise.resolve(e.namespaced[g].reduce(function(O, x, R) {
2003
+ return Promise.resolve(e.namespaced[g].reduce(function(O, j, D) {
1994
2004
  try {
1995
2005
  return Promise.resolve(O).then(function(L) {
1996
- return x.method && Y(x.method) ? (function(S, I) {
1997
- var N = vn(S);
2006
+ return j.method && Y(j.method) ? (function(S, I) {
2007
+ var N = wn(S);
1998
2008
  if (N && N.name === I) {
1999
- var K = vn(N.method);
2009
+ var K = wn(N.method);
2000
2010
  throw new Error([I + " plugin is calling method " + S, "Plugins cant call self", "Use " + N.method + " " + (K ? "or " + K.method : "") + " in " + I + " plugin insteadof " + S].join(`
2001
2011
  `));
2002
2012
  }
2003
- }(x.methodName, x.pluginName), Promise.resolve(x.method({ payload: L, instance: r, abort: (H = L, A = g, D = x.pluginName, function(S, I) {
2004
- return C({}, H, { abort: { reason: S, plugins: I || [A], caller: c, from: D || A } });
2005
- }), config: pn(x.pluginName, p, o), plugins: p })).then(function(S) {
2013
+ }(j.methodName, j.pluginName), Promise.resolve(j.method({ payload: L, instance: r, abort: (H = L, A = g, z = j.pluginName, function(S, I) {
2014
+ return x({}, H, { abort: { reason: S, plugins: I || [A], caller: c, from: z || A } });
2015
+ }), config: mn(j.pluginName, p, o), plugins: p })).then(function(S) {
2006
2016
  var I = V(S) ? S : {};
2007
- return Promise.resolve(C({}, L, I));
2017
+ return Promise.resolve(x({}, L, I));
2008
2018
  })) : L;
2009
- var H, A, D;
2019
+ var H, A, z;
2010
2020
  });
2011
2021
  } catch (L) {
2012
2022
  return Promise.reject(L);
@@ -2016,7 +2026,7 @@ var mt = function(t) {
2016
2026
  });
2017
2027
  l[g] = n;
2018
2028
  }();
2019
- return T && T.then ? T.then(b) : b();
2029
+ return P && P.then ? P.then(b) : b();
2020
2030
  });
2021
2031
  } catch (l) {
2022
2032
  return Promise.reject(l);
@@ -2024,23 +2034,23 @@ var mt = function(t) {
2024
2034
  }, Promise.resolve({}))).then(function(v) {
2025
2035
  return Promise.resolve(e.exact.reduce(function(E, _, g) {
2026
2036
  try {
2027
- var l = e.exact.length === g + 1, b = _.pluginName, T = o[b];
2037
+ var l = e.exact.length === g + 1, b = _.pluginName, P = o[b];
2028
2038
  return Promise.resolve(E).then(function(O) {
2029
- var x = v[b] ? v[b] : {};
2030
- if (f && (x = O), yt(x, b))
2031
- return gt({ data: x, method: c, instance: r, pluginName: b, store: s }), Promise.resolve(O);
2039
+ var j = v[b] ? v[b] : {};
2040
+ if (f && (j = O), yt(j, b))
2041
+ return gt({ data: j, method: c, instance: r, pluginName: b, store: s }), Promise.resolve(O);
2032
2042
  if (yt(O, b))
2033
2043
  return l && gt({ data: O, method: c, instance: r, store: s }), Promise.resolve(O);
2034
2044
  if (k.hasOwnProperty(b) && k[b] === !0)
2035
- return s.dispatch({ type: "queue", plugin: b, payload: x, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(O);
2036
- var R = w(v[b], o[b]);
2037
- return Promise.resolve(T[c]({ abort: R.abort, payload: x, instance: r, config: pn(b, p, o), plugins: p })).then(function(L) {
2038
- var H = V(L) ? L : {}, A = C({}, O, H), D = v[b];
2039
- if (yt(D, b))
2040
- gt({ data: D, method: c, instance: r, pluginName: b, store: s });
2045
+ return s.dispatch({ type: "queue", plugin: b, payload: j, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(O);
2046
+ var D = w(v[b], o[b]);
2047
+ return Promise.resolve(P[c]({ abort: D.abort, payload: j, instance: r, config: mn(b, p, o), plugins: p })).then(function(L) {
2048
+ var H = V(L) ? L : {}, A = x({}, O, H), z = v[b];
2049
+ if (yt(z, b))
2050
+ gt({ data: z, method: c, instance: r, pluginName: b, store: s });
2041
2051
  else {
2042
2052
  var S = c + ":" + b;
2043
- (S.match(/:/g) || []).length < 2 && !c.match(hn) && !c.match(fn) && r.dispatch(C({}, f ? A : x, { type: S, _: { called: S, from: "submethod" } }));
2053
+ (S.match(/:/g) || []).length < 2 && !c.match(fn) && !c.match(pn) && r.dispatch(x({}, f ? A : j, { type: S, _: { called: S, from: "submethod" } }));
2044
2054
  }
2045
2055
  return Promise.resolve(A);
2046
2056
  });
@@ -2049,11 +2059,11 @@ var mt = function(t) {
2049
2059
  return Promise.reject(O);
2050
2060
  }
2051
2061
  }, Promise.resolve(n))).then(function(E) {
2052
- if (!(c.match(Te) || c.match(/^registerPlugin/) || c.match(fn) || c.match(hn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2062
+ if (!(c.match(Pe) || c.match(/^registerPlugin/) || c.match(pn) || c.match(fn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2053
2063
  if (h.plugins.includes(c), E._ && E._.originalAction === c)
2054
2064
  return E;
2055
- var _ = C({}, E, { _: { originalAction: E.type, called: E.type, from: "engineEnd" } });
2056
- lr(E, e.exact.length) && !c.match(/End$/) && (_ = C({}, _, { type: E.type + "Aborted" })), s.dispatch(_);
2065
+ var _ = x({}, E, { _: { originalAction: E.type, called: E.type, from: "engineEnd" } });
2066
+ hr(E, e.exact.length) && !c.match(/End$/) && (_ = x({}, _, { type: E.type + "Aborted" })), s.dispatch(_);
2057
2067
  }
2058
2068
  return E;
2059
2069
  });
@@ -2061,29 +2071,29 @@ var mt = function(t) {
2061
2071
  } catch (v) {
2062
2072
  return Promise.reject(v);
2063
2073
  }
2064
- }, Te = /Start$/, hn = /^bootstrap/, fn = /^ready/;
2074
+ }, Pe = /Start$/, fn = /^bootstrap/, pn = /^ready/;
2065
2075
  function gt(t) {
2066
2076
  var e = t.pluginName, n = t.method + "Aborted" + (e ? ":" + e : "");
2067
- t.store.dispatch(C({}, t.data, { type: n, _: { called: n, from: "abort" } }));
2077
+ t.store.dispatch(x({}, t.data, { type: n, _: { called: n, from: "abort" } }));
2068
2078
  }
2069
- function pn(t, e, n) {
2079
+ function mn(t, e, n) {
2070
2080
  var r = e[t] || n[t];
2071
2081
  return r && r.config ? r.config : {};
2072
2082
  }
2073
- function mn(t, e) {
2083
+ function gn(t, e) {
2074
2084
  return e.reduce(function(n, r) {
2075
2085
  return r[t] ? n.concat({ methodName: t, pluginName: r.name, method: r[t] }) : n;
2076
2086
  }, []);
2077
2087
  }
2078
- function gn(t, e) {
2079
- var n = t.replace(Te, ""), r = e ? ":" + e : "";
2088
+ function yn(t, e) {
2089
+ var n = t.replace(Pe, ""), r = e ? ":" + e : "";
2080
2090
  return ["" + t + r, "" + n + r, n + "End" + r];
2081
2091
  }
2082
2092
  function yt(t, e) {
2083
2093
  var n = t.abort;
2084
- return !!n && (n === !0 || yn(n, e) || n && yn(n.plugins, e));
2094
+ return !!n && (n === !0 || vn(n, e) || n && vn(n.plugins, e));
2085
2095
  }
2086
- function lr(t, e) {
2096
+ function hr(t, e) {
2087
2097
  var n = t.abort;
2088
2098
  if (!n)
2089
2099
  return !1;
@@ -2095,19 +2105,19 @@ function lr(t, e) {
2095
2105
  function Ke(t) {
2096
2106
  return Array.isArray(t);
2097
2107
  }
2098
- function yn(t, e) {
2108
+ function vn(t, e) {
2099
2109
  return !(!t || !Ke(t)) && t.includes(e);
2100
2110
  }
2101
- function vn(t) {
2111
+ function wn(t) {
2102
2112
  var e = t.match(/(.*):(.*)/);
2103
2113
  return !!e && { method: e[1], name: e[2] };
2104
2114
  }
2105
- function Ji(t) {
2115
+ function Vi(t) {
2106
2116
  return Object.keys(t).reduce(function(e, n) {
2107
2117
  return n === "type" || (e[n] = V(t[n]) ? Object.assign({}, t[n]) : t[n]), e;
2108
2118
  }, {});
2109
2119
  }
2110
- function Xi(t, e, n) {
2120
+ function Yi(t, e, n) {
2111
2121
  var r = {};
2112
2122
  return function(i) {
2113
2123
  return function(o) {
@@ -2118,88 +2128,88 @@ function Xi(t, e, n) {
2118
2128
  }, p = a.type, u = a.plugins, c = a;
2119
2129
  if (a.abort)
2120
2130
  return Promise.resolve(o(a));
2121
- if (p === j.enablePlugin && i.dispatch({ type: j.initializeStart, plugins: u, disabled: [], fromEnable: !0, meta: a.meta }), p === j.disablePlugin && setTimeout(function() {
2122
- return dn(a.meta.rid, { payload: a });
2123
- }, 0), p === j.initializeEnd) {
2131
+ if (p === C.enablePlugin && i.dispatch({ type: C.initializeStart, plugins: u, disabled: [], fromEnable: !0, meta: a.meta }), p === C.disablePlugin && setTimeout(function() {
2132
+ return hn(a.meta.rid, { payload: a });
2133
+ }, 0), p === C.initializeEnd) {
2124
2134
  var f = e(), d = Object.keys(f), w = d.filter(function(l) {
2125
2135
  return u.includes(l);
2126
2136
  }).map(function(l) {
2127
2137
  return f[l];
2128
2138
  }), k = [], v = [], E = a.disabled, _ = w.map(function(l) {
2129
- var b = l.loaded, T = l.name, O = l.config;
2130
- return cr(l, function() {
2139
+ var b = l.loaded, P = l.name, O = l.config;
2140
+ return lr(l, function() {
2131
2141
  return b({ config: O });
2132
- }, 1e4).then(function(x) {
2133
- return r[T] || (i.dispatch({ type: j.pluginReadyType(T), name: T, events: Object.keys(l).filter(function(R) {
2134
- return !Pt.includes(R);
2135
- }) }), r[T] = !0), k = k.concat(T), l;
2136
- }).catch(function(x) {
2137
- if (x instanceof Error)
2138
- throw new Error(x);
2139
- return v = v.concat(x.name), x;
2142
+ }, 1e4).then(function(j) {
2143
+ return r[P] || (i.dispatch({ type: C.pluginReadyType(P), name: P, events: Object.keys(l).filter(function(D) {
2144
+ return !Tt.includes(D);
2145
+ }) }), r[P] = !0), k = k.concat(P), l;
2146
+ }).catch(function(j) {
2147
+ if (j instanceof Error)
2148
+ throw new Error(j);
2149
+ return v = v.concat(j.name), j;
2140
2150
  });
2141
2151
  });
2142
2152
  Promise.all(_).then(function(l) {
2143
2153
  var b = { plugins: k, failed: v, disabled: E };
2144
2154
  setTimeout(function() {
2145
- d.length === _.length + E.length && i.dispatch(C({}, { type: j.ready }, b));
2155
+ d.length === _.length + E.length && i.dispatch(x({}, { type: C.ready }, b));
2146
2156
  }, 0);
2147
2157
  });
2148
2158
  }
2149
2159
  var g = function() {
2150
- if (p !== j.bootstrap)
2160
+ if (p !== C.bootstrap)
2151
2161
  return /^ready:([^:]*)$/.test(p) && setTimeout(function() {
2152
- return ur(i, e, t);
2153
- }, 0), Promise.resolve(function(l, b, T, O, x) {
2162
+ return dr(i, e, t);
2163
+ }, 0), Promise.resolve(function(l, b, P, O, j) {
2154
2164
  try {
2155
- var R = Y(b) ? b() : b, L = l.type, H = L.replace(Te, "");
2165
+ var D = Y(b) ? b() : b, L = l.type, H = L.replace(Pe, "");
2156
2166
  if (l._ && l._.called)
2157
2167
  return Promise.resolve(l);
2158
- var A = T.getState(), D = (N = R, (K = A.plugins) === void 0 && (K = {}), (X = l.options) === void 0 && (X = {}), Object.keys(N).filter(function(m) {
2168
+ var A = P.getState(), z = (N = D, (K = A.plugins) === void 0 && (K = {}), (X = l.options) === void 0 && (X = {}), Object.keys(N).filter(function(m) {
2159
2169
  var y = X.plugins || {};
2160
- return Pi(y[m]) ? y[m] : y.all !== !1 && (!K[m] || K[m].enabled !== !1);
2170
+ return ji(y[m]) ? y[m] : y.all !== !1 && (!K[m] || K[m].enabled !== !1);
2161
2171
  }).map(function(m) {
2162
2172
  return N[m];
2163
2173
  }));
2164
- L === j.initializeStart && l.fromEnable && (D = Object.keys(A.plugins).filter(function(m) {
2174
+ L === C.initializeStart && l.fromEnable && (z = Object.keys(A.plugins).filter(function(m) {
2165
2175
  var y = A.plugins[m];
2166
2176
  return l.plugins.includes(m) && !y.initialized;
2167
2177
  }).map(function(m) {
2168
- return R[m];
2178
+ return D[m];
2169
2179
  }));
2170
- var S = D.map(function(m) {
2180
+ var S = z.map(function(m) {
2171
2181
  return m.name;
2172
- }), I = function(m, y, P) {
2173
- var $ = gn(m).map(function(z) {
2174
- return mn(z, y);
2182
+ }), I = function(m, y, T) {
2183
+ var $ = yn(m).map(function(U) {
2184
+ return gn(U, y);
2175
2185
  });
2176
- return y.reduce(function(z, U) {
2177
- var F = U.name, Z = gn(m, F).map(function(Ne) {
2178
- return mn(Ne, y);
2186
+ return y.reduce(function(U, R) {
2187
+ var F = R.name, Z = yn(m, F).map(function(Ne) {
2188
+ return gn(Ne, y);
2179
2189
  }), W = Z[0], M = Z[1], ee = Z[2];
2180
- return W.length && (z.beforeNS[F] = W), M.length && (z.duringNS[F] = M), ee.length && (z.afterNS[F] = ee), z;
2190
+ return W.length && (U.beforeNS[F] = W), M.length && (U.duringNS[F] = M), ee.length && (U.afterNS[F] = ee), U;
2181
2191
  }, { before: $[0], beforeNS: {}, during: $[1], duringNS: {}, after: $[2], afterNS: {} });
2182
- }(L, D);
2183
- return Promise.resolve(mt({ action: l, data: { exact: I.before, namespaced: I.beforeNS }, state: A, allPlugins: R, allMatches: I, instance: T, store: O, EVENTS: x })).then(function(m) {
2192
+ }(L, z);
2193
+ return Promise.resolve(mt({ action: l, data: { exact: I.before, namespaced: I.beforeNS }, state: A, allPlugins: D, allMatches: I, instance: P, store: O, EVENTS: j })).then(function(m) {
2184
2194
  function y() {
2185
- var z = function() {
2186
- if (L.match(Te))
2187
- return Promise.resolve(mt({ action: C({}, P, { type: H + "End" }), data: { exact: I.after, namespaced: I.afterNS }, state: A, allPlugins: R, allMatches: I, instance: T, store: O, EVENTS: x })).then(function(U) {
2188
- U.meta && U.meta.hasCallback && dn(U.meta.rid, { payload: U });
2195
+ var U = function() {
2196
+ if (L.match(Pe))
2197
+ return Promise.resolve(mt({ action: x({}, T, { type: H + "End" }), data: { exact: I.after, namespaced: I.afterNS }, state: A, allPlugins: D, allMatches: I, instance: P, store: O, EVENTS: j })).then(function(R) {
2198
+ R.meta && R.meta.hasCallback && hn(R.meta.rid, { payload: R });
2189
2199
  });
2190
2200
  }();
2191
- return z && z.then ? z.then(function() {
2201
+ return U && U.then ? U.then(function() {
2192
2202
  return m;
2193
2203
  }) : m;
2194
2204
  }
2195
- if (lr(m, S.length))
2205
+ if (hr(m, S.length))
2196
2206
  return m;
2197
- var P, $ = function() {
2207
+ var T, $ = function() {
2198
2208
  if (L !== H)
2199
- return Promise.resolve(mt({ action: C({}, m, { type: H }), data: { exact: I.during, namespaced: I.duringNS }, state: A, allPlugins: R, allMatches: I, instance: T, store: O, EVENTS: x })).then(function(z) {
2200
- P = z;
2209
+ return Promise.resolve(mt({ action: x({}, m, { type: H }), data: { exact: I.during, namespaced: I.duringNS }, state: A, allPlugins: D, allMatches: I, instance: P, store: O, EVENTS: j })).then(function(U) {
2210
+ T = U;
2201
2211
  });
2202
- P = m;
2212
+ T = m;
2203
2213
  }();
2204
2214
  return $ && $.then ? $.then(y) : y();
2205
2215
  });
@@ -2219,22 +2229,22 @@ function Xi(t, e, n) {
2219
2229
  };
2220
2230
  };
2221
2231
  }
2222
- function Vi(t) {
2232
+ function Gi(t) {
2223
2233
  return function(e) {
2224
2234
  return function(n) {
2225
2235
  return function(r) {
2226
2236
  var i = r.type, o = r.key, a = r.value, s = r.options;
2227
- if (i === j.setItem || i === j.removeItem) {
2237
+ if (i === C.setItem || i === C.removeItem) {
2228
2238
  if (r.abort)
2229
2239
  return n(r);
2230
- i === j.setItem ? t.setItem(o, a, s) : t.removeItem(o, s);
2240
+ i === C.setItem ? t.setItem(o, a, s) : t.removeItem(o, s);
2231
2241
  }
2232
2242
  return n(r);
2233
2243
  };
2234
2244
  };
2235
2245
  };
2236
2246
  }
2237
- var Yi = function() {
2247
+ var Bi = function() {
2238
2248
  var t = this;
2239
2249
  this.before = [], this.after = [], this.addMiddleware = function(e, n) {
2240
2250
  t[n] = t[n].concat(e);
@@ -2258,80 +2268,80 @@ var Yi = function() {
2258
2268
  };
2259
2269
  };
2260
2270
  };
2261
- function Gi(t) {
2271
+ function qi(t) {
2262
2272
  return function(e, n) {
2263
2273
  e === void 0 && (e = {});
2264
2274
  var r = {};
2265
2275
  if (n.type === "initialize:aborted")
2266
2276
  return e;
2267
2277
  if (/^registerPlugin:([^:]*)$/.test(n.type)) {
2268
- var i = wn(n.type, "registerPlugin"), o = t()[i];
2278
+ var i = bn(n.type, "registerPlugin"), o = t()[i];
2269
2279
  if (!o || !i)
2270
2280
  return e;
2271
2281
  var a = n.enabled, s = o.config;
2272
- return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s }, C({}, e, r);
2282
+ return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s }, x({}, e, r);
2273
2283
  }
2274
2284
  if (/^initialize:([^:]*)$/.test(n.type)) {
2275
- var h = wn(n.type, j.initialize), p = t()[h];
2276
- return p && h ? (r[h] = C({}, e[h], { initialized: !0, loaded: !!p.loaded({ config: p.config }) }), C({}, e, r)) : e;
2285
+ var h = bn(n.type, C.initialize), p = t()[h];
2286
+ return p && h ? (r[h] = x({}, e[h], { initialized: !0, loaded: !!p.loaded({ config: p.config }) }), x({}, e, r)) : e;
2277
2287
  }
2278
2288
  if (/^ready:([^:]*)$/.test(n.type))
2279
- return r[n.name] = C({}, e[n.name], { loaded: !0 }), C({}, e, r);
2289
+ return r[n.name] = x({}, e[n.name], { loaded: !0 }), x({}, e, r);
2280
2290
  switch (n.type) {
2281
- case j.disablePlugin:
2282
- return C({}, e, bn(n.plugins, !1, e));
2283
- case j.enablePlugin:
2284
- return C({}, e, bn(n.plugins, !0, e));
2291
+ case C.disablePlugin:
2292
+ return x({}, e, kn(n.plugins, !1, e));
2293
+ case C.enablePlugin:
2294
+ return x({}, e, kn(n.plugins, !0, e));
2285
2295
  default:
2286
2296
  return e;
2287
2297
  }
2288
2298
  };
2289
2299
  }
2290
- function wn(t, e) {
2300
+ function bn(t, e) {
2291
2301
  return t.substring(e.length + 1, t.length);
2292
2302
  }
2293
- function bn(t, e, n) {
2303
+ function kn(t, e, n) {
2294
2304
  return t.reduce(function(r, i) {
2295
- return r[i] = C({}, n[i], { enabled: e }), r;
2305
+ return r[i] = x({}, n[i], { enabled: e }), r;
2296
2306
  }, n);
2297
2307
  }
2298
- function dr(t) {
2308
+ function fr(t) {
2299
2309
  try {
2300
2310
  return JSON.parse(JSON.stringify(t));
2301
2311
  } catch {
2302
2312
  }
2303
2313
  return t;
2304
2314
  }
2305
- var Bi = { last: {}, history: [] };
2306
- function qi(t, e) {
2307
- t === void 0 && (t = Bi);
2315
+ var Qi = { last: {}, history: [] };
2316
+ function eo(t, e) {
2317
+ t === void 0 && (t = Qi);
2308
2318
  var n = e.options, r = e.meta;
2309
- if (e.type === j.track) {
2310
- var i = dr(C({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
2311
- return C({}, t, { last: i, history: t.history.concat(i) });
2319
+ if (e.type === C.track) {
2320
+ var i = fr(x({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
2321
+ return x({}, t, { last: i, history: t.history.concat(i) });
2312
2322
  }
2313
2323
  return t;
2314
2324
  }
2315
- var Qi = { actions: [] };
2316
- function eo(t, e) {
2317
- t === void 0 && (t = Qi);
2325
+ var to = { actions: [] };
2326
+ function no(t, e) {
2327
+ t === void 0 && (t = to);
2318
2328
  var n = e.payload;
2319
2329
  switch (e.type) {
2320
2330
  case "queue":
2321
2331
  var r;
2322
- return r = n && n.type && n.type === j.identify ? [e].concat(t.actions) : t.actions.concat(e), C({}, t, { actions: r });
2332
+ return r = n && n.type && n.type === C.identify ? [e].concat(t.actions) : t.actions.concat(e), x({}, t, { actions: r });
2323
2333
  case "dequeue":
2324
2334
  return [];
2325
2335
  default:
2326
2336
  return t;
2327
2337
  }
2328
2338
  }
2329
- var hr = /#.*$/;
2330
- function to(t) {
2339
+ var pr = /#.*$/;
2340
+ function ro(t) {
2331
2341
  var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
2332
- return "/" + (e && e[3] ? e[3].split("?")[0].replace(hr, "") : "");
2342
+ return "/" + (e && e[3] ? e[3].split("?")[0].replace(pr, "") : "");
2333
2343
  }
2334
- var fr, pr, mr, gr, no = function(t) {
2344
+ var mr, gr, yr, vr, io = function(t) {
2335
2345
  if (t === void 0 && (t = {}), !J)
2336
2346
  return t;
2337
2347
  var e = document, n = e.title, r = e.referrer, i = window, o = i.location, a = i.innerWidth, s = i.innerHeight, h = o.hash, p = o.search, u = function(f) {
@@ -2342,42 +2352,42 @@ var fr, pr, mr, gr, no = function(t) {
2342
2352
  return w.getAttribute("href");
2343
2353
  }
2344
2354
  }();
2345
- return d ? d.match(/\?/) ? d : d + f : window.location.href.replace(hr, "");
2346
- }(p), c = { title: n, url: u, path: to(u), hash: h, search: p, width: a, height: s };
2347
- return r && r !== "" && (c.referrer = r), C({}, c, t);
2348
- }, ro = { last: {}, history: [] };
2349
- function io(t, e) {
2350
- t === void 0 && (t = ro);
2355
+ return d ? d.match(/\?/) ? d : d + f : window.location.href.replace(pr, "");
2356
+ }(p), c = { title: n, url: u, path: ro(u), hash: h, search: p, width: a, height: s };
2357
+ return r && r !== "" && (c.referrer = r), x({}, c, t);
2358
+ }, oo = { last: {}, history: [] };
2359
+ function ao(t, e) {
2360
+ t === void 0 && (t = oo);
2351
2361
  var n = e.options;
2352
- if (e.type === j.page) {
2353
- var r = dr(C({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
2354
- return C({}, t, { last: r, history: t.history.concat(r) });
2362
+ if (e.type === C.page) {
2363
+ var r = fr(x({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
2364
+ return x({}, t, { last: r, history: t.history.concat(r) });
2355
2365
  }
2356
2366
  return t;
2357
2367
  }
2358
- fr = function() {
2368
+ mr = function() {
2359
2369
  if (!J)
2360
2370
  return !1;
2361
2371
  var t = navigator.appVersion;
2362
2372
  return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
2363
- }(), pr = J ? document.referrer : null, mr = Ni(), gr = zi();
2364
- var kn = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!J && !navigator.onLine, os: { name: fr }, userAgent: J ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: gr, locale: mr, campaign: {}, referrer: pr };
2365
- function oo(t, e) {
2366
- t === void 0 && (t = kn);
2373
+ }(), gr = J ? document.referrer : null, yr = zi(), vr = Ri();
2374
+ var In = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!J && !navigator.onLine, os: { name: mr }, userAgent: J ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: vr, locale: yr, campaign: {}, referrer: gr };
2375
+ function so(t, e) {
2376
+ t === void 0 && (t = In);
2367
2377
  var n = t.initialized, r = e.campaign;
2368
2378
  switch (e.type) {
2369
- case j.campaign:
2370
- return C({}, t, { campaign: r });
2371
- case j.offline:
2372
- return C({}, t, { offline: !0 });
2373
- case j.online:
2374
- return C({}, t, { offline: !1 });
2379
+ case C.campaign:
2380
+ return x({}, t, { campaign: r });
2381
+ case C.offline:
2382
+ return x({}, t, { offline: !0 });
2383
+ case C.online:
2384
+ return x({}, t, { offline: !1 });
2375
2385
  default:
2376
- return n ? t : C({}, kn, t, { initialized: !0 });
2386
+ return n ? t : x({}, In, t, { initialized: !0 });
2377
2387
  }
2378
2388
  }
2379
- var ao = ["plugins", "reducers", "storage"];
2380
- function so(t, e, n) {
2389
+ var co = ["plugins", "reducers", "storage"];
2390
+ function uo(t, e, n) {
2381
2391
  if (J) {
2382
2392
  var r = window[(n ? "add" : "remove") + "EventListener"];
2383
2393
  t.split(" ").forEach(function(i) {
@@ -2385,15 +2395,15 @@ function so(t, e, n) {
2385
2395
  });
2386
2396
  }
2387
2397
  }
2388
- function co(t) {
2389
- var e = so.bind(null, "online offline", function(n) {
2398
+ function lo(t) {
2399
+ var e = uo.bind(null, "online offline", function(n) {
2390
2400
  return Promise.resolve(!navigator.onLine).then(t);
2391
2401
  });
2392
2402
  return e(!0), function(n) {
2393
2403
  return e(!1);
2394
2404
  };
2395
2405
  }
2396
- function yr() {
2406
+ function wr() {
2397
2407
  return be("analytics", []), function(t) {
2398
2408
  return function(e, n, r) {
2399
2409
  var i = t(e, n, r), o = i.dispatch;
@@ -2403,18 +2413,18 @@ function yr() {
2403
2413
  };
2404
2414
  };
2405
2415
  }
2406
- function In(t) {
2416
+ function Sn(t) {
2407
2417
  return function() {
2408
- return xe(xe.apply(null, arguments), yr());
2418
+ return xe(xe.apply(null, arguments), wr());
2409
2419
  };
2410
2420
  }
2411
2421
  function vt(t) {
2412
- return t ? or(t) ? t : [t] : [];
2422
+ return t ? sr(t) ? t : [t] : [];
2413
2423
  }
2414
- function Sn(t, e, n) {
2424
+ function _n(t, e, n) {
2415
2425
  t === void 0 && (t = {});
2416
2426
  var r, i, o = st();
2417
- return e && (Ue[o] = (r = e, i = function(a) {
2427
+ return e && (Re[o] = (r = e, i = function(a) {
2418
2428
  for (var s, h = a || Array.prototype.slice.call(arguments), p = 0; p < h.length; p++)
2419
2429
  if (Y(h[p])) {
2420
2430
  s = h[p];
@@ -2423,9 +2433,9 @@ function Sn(t, e, n) {
2423
2433
  return s;
2424
2434
  }(n), function(a) {
2425
2435
  i && i(a), r(a);
2426
- })), C({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
2436
+ })), x({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
2427
2437
  }
2428
- function uo(t) {
2438
+ function ho(t) {
2429
2439
  t === void 0 && (t = {});
2430
2440
  var e = t.reducers || {}, n = t.initialUser || {}, r = (t.plugins || []).reduce(function(m, y) {
2431
2441
  if (Y(y))
@@ -2433,76 +2443,76 @@ function uo(t) {
2433
2443
  if (y.NAMESPACE && (y.name = y.NAMESPACE), !y.name)
2434
2444
  throw new Error("https://lytics.dev/errors/1");
2435
2445
  y.config || (y.config = {});
2436
- var P = y.EVENTS ? Object.keys(y.EVENTS).map(function(U) {
2437
- return y.EVENTS[U];
2446
+ var T = y.EVENTS ? Object.keys(y.EVENTS).map(function(R) {
2447
+ return y.EVENTS[R];
2438
2448
  }) : [];
2439
- m.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (m.methods[y.name] = Object.keys(y.methods).reduce(function(U, F) {
2449
+ m.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (m.methods[y.name] = Object.keys(y.methods).reduce(function(R, F) {
2440
2450
  var Z;
2441
- return U[F] = (Z = y.methods[F], function() {
2451
+ return R[F] = (Z = y.methods[F], function() {
2442
2452
  for (var W = Array.prototype.slice.call(arguments), M = new Array(Z.length), ee = 0; ee < W.length; ee++)
2443
2453
  M[ee] = W[ee];
2444
2454
  return M[M.length] = b, Z.apply({ instance: b }, M);
2445
- }), U;
2455
+ }), R;
2446
2456
  }, {}), delete y.methods);
2447
- var $ = Object.keys(y).concat(P), z = new Set(m.events.concat($));
2448
- if (m.events = Array.from(z), m.pluginsArray = m.pluginsArray.concat(y), m.plugins[y.name])
2457
+ var $ = Object.keys(y).concat(T), U = new Set(m.events.concat($));
2458
+ if (m.events = Array.from(U), m.pluginsArray = m.pluginsArray.concat(y), m.plugins[y.name])
2449
2459
  throw new Error(y.name + "AlreadyLoaded");
2450
2460
  return m.plugins[y.name] = y, m.plugins[y.name].loaded || (m.plugins[y.name].loaded = function() {
2451
2461
  return !0;
2452
2462
  }), m;
2453
2463
  }, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: we, setItem: be, removeItem: Ae }, o = /* @__PURE__ */ function(m) {
2454
- return function(y, P, $) {
2455
- return P.getState("user")[y] || ($ && V($) && $[y] ? $[y] : ln(m)[y] || we(Ot(y)) || null);
2464
+ return function(y, T, $) {
2465
+ return T.getState("user")[y] || ($ && V($) && $[y] ? $[y] : dn(m)[y] || we(Ot(y)) || null);
2456
2466
  };
2457
2467
  }(i), a = r.plugins, s = r.events.filter(function(m) {
2458
- return !Pt.includes(m);
2468
+ return !Tt.includes(m);
2459
2469
  }).sort(), h = new Set(s.concat(et).filter(function(m) {
2460
- return !Pt.includes(m);
2470
+ return !Tt.includes(m);
2461
2471
  })), p = Array.from(h).sort(), u = function() {
2462
2472
  return a;
2463
- }, c = new Yi(), f = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, k = function() {
2473
+ }, c = new Bi(), f = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, k = function() {
2464
2474
  throw new Error("Abort disabled inListener");
2465
- }, v = Di(), E = ln(i), _ = C({}, E, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
2475
+ }, v = Di(), E = dn(i), _ = x({}, E, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
2466
2476
  _.anonymousId || (_.anonymousId = st());
2467
- var g = C({ enable: function(m, y) {
2468
- return new Promise(function(P) {
2469
- I.dispatch({ type: j.enablePlugin, plugins: vt(m), _: { originalAction: j.enablePlugin } }, P, [y]);
2477
+ var g = x({ enable: function(m, y) {
2478
+ return new Promise(function(T) {
2479
+ I.dispatch({ type: C.enablePlugin, plugins: vt(m), _: { originalAction: C.enablePlugin } }, T, [y]);
2470
2480
  });
2471
2481
  }, disable: function(m, y) {
2472
- return new Promise(function(P) {
2473
- I.dispatch({ type: j.disablePlugin, plugins: vt(m), _: { originalAction: j.disablePlugin } }, P, [y]);
2482
+ return new Promise(function(T) {
2483
+ I.dispatch({ type: C.disablePlugin, plugins: vt(m), _: { originalAction: C.disablePlugin } }, T, [y]);
2474
2484
  });
2475
- } }, r.methods), l = !1, b = { identify: function(m, y, P, $) {
2485
+ } }, r.methods), l = !1, b = { identify: function(m, y, T, $) {
2476
2486
  try {
2477
- var z = se(m) ? m : null, U = V(m) ? m : y, F = P || {}, Z = b.user();
2478
- be(Ot(oe), z);
2479
- var W = z || U.userId || o(oe, b, U);
2487
+ var U = se(m) ? m : null, R = V(m) ? m : y, F = T || {}, Z = b.user();
2488
+ be(Ot(oe), U);
2489
+ var W = U || R.userId || o(oe, b, R);
2480
2490
  return Promise.resolve(new Promise(function(M) {
2481
- I.dispatch(C({ type: j.identifyStart, userId: W, traits: U || {}, options: F, anonymousId: Z.anonymousId }, Z.id && Z.id !== z && { previousId: Z.id }), M, [y, P, $]);
2491
+ I.dispatch(x({ type: C.identifyStart, userId: W, traits: R || {}, options: F, anonymousId: Z.anonymousId }, Z.id && Z.id !== U && { previousId: Z.id }), M, [y, T, $]);
2482
2492
  }));
2483
2493
  } catch (M) {
2484
2494
  return Promise.reject(M);
2485
2495
  }
2486
- }, track: function(m, y, P, $) {
2496
+ }, track: function(m, y, T, $) {
2487
2497
  try {
2488
- var z = V(m) ? m.event : m;
2489
- if (!z || !se(z))
2498
+ var U = V(m) ? m.event : m;
2499
+ if (!U || !se(U))
2490
2500
  throw new Error("EventMissing");
2491
- var U = V(m) ? m : y || {}, F = V(P) ? P : {};
2501
+ var R = V(m) ? m : y || {}, F = V(T) ? T : {};
2492
2502
  return Promise.resolve(new Promise(function(Z) {
2493
- I.dispatch({ type: j.trackStart, event: z, properties: U, options: F, userId: o(oe, b, y), anonymousId: o(_e, b, y) }, Z, [y, P, $]);
2503
+ I.dispatch({ type: C.trackStart, event: U, properties: R, options: F, userId: o(oe, b, y), anonymousId: o(_e, b, y) }, Z, [y, T, $]);
2494
2504
  }));
2495
2505
  } catch (Z) {
2496
2506
  return Promise.reject(Z);
2497
2507
  }
2498
- }, page: function(m, y, P) {
2508
+ }, page: function(m, y, T) {
2499
2509
  try {
2500
- var $ = V(m) ? m : {}, z = V(y) ? y : {};
2501
- return Promise.resolve(new Promise(function(U) {
2502
- I.dispatch({ type: j.pageStart, properties: no($), options: z, userId: o(oe, b, $), anonymousId: o(_e, b, $) }, U, [m, y, P]);
2510
+ var $ = V(m) ? m : {}, U = V(y) ? y : {};
2511
+ return Promise.resolve(new Promise(function(R) {
2512
+ I.dispatch({ type: C.pageStart, properties: io($), options: U, userId: o(oe, b, $), anonymousId: o(_e, b, $) }, R, [m, y, T]);
2503
2513
  }));
2504
- } catch (U) {
2505
- return Promise.reject(U);
2514
+ } catch (R) {
2515
+ return Promise.reject(R);
2506
2516
  }
2507
2517
  }, user: function(m) {
2508
2518
  if (m === oe || m === "id")
@@ -2510,156 +2520,156 @@ function uo(t) {
2510
2520
  if (m === _e || m === "anonId")
2511
2521
  return o(_e, b);
2512
2522
  var y = b.getState("user");
2513
- return m ? nn(y, m) : y;
2523
+ return m ? rn(y, m) : y;
2514
2524
  }, reset: function(m) {
2515
2525
  return new Promise(function(y) {
2516
- I.dispatch({ type: j.resetStart }, y, m);
2526
+ I.dispatch({ type: C.resetStart }, y, m);
2517
2527
  });
2518
2528
  }, ready: function(m) {
2519
- return l && m({ plugins: g, instance: b }), b.on(j.ready, function(y) {
2529
+ return l && m({ plugins: g, instance: b }), b.on(C.ready, function(y) {
2520
2530
  m(y), l = !0;
2521
2531
  });
2522
2532
  }, on: function(m, y) {
2523
2533
  if (!m || !Y(y))
2524
2534
  return !1;
2525
- if (m === j.bootstrap)
2535
+ if (m === C.bootstrap)
2526
2536
  throw new Error(".on disabled for " + m);
2527
- var P = /Start$|Start:/;
2537
+ var T = /Start$|Start:/;
2528
2538
  if (m === "*") {
2529
2539
  var $ = function(Z) {
2530
2540
  return function(W) {
2531
2541
  return function(M) {
2532
- return M.type.match(P) && y({ payload: M, instance: b, plugins: a }), W(M);
2542
+ return M.type.match(T) && y({ payload: M, instance: b, plugins: a }), W(M);
2533
2543
  };
2534
2544
  };
2535
- }, z = function(Z) {
2545
+ }, U = function(Z) {
2536
2546
  return function(W) {
2537
2547
  return function(M) {
2538
- return M.type.match(P) || y({ payload: M, instance: b, plugins: a }), W(M);
2548
+ return M.type.match(T) || y({ payload: M, instance: b, plugins: a }), W(M);
2539
2549
  };
2540
2550
  };
2541
2551
  };
2542
- return f($, Ye), f(z, Ge), function() {
2543
- d($, Ye), d(z, Ge);
2552
+ return f($, Ye), f(U, Ge), function() {
2553
+ d($, Ye), d(U, Ge);
2544
2554
  };
2545
2555
  }
2546
- var U = m.match(P) ? Ye : Ge, F = function(Z) {
2556
+ var R = m.match(T) ? Ye : Ge, F = function(Z) {
2547
2557
  return function(W) {
2548
2558
  return function(M) {
2549
2559
  return M.type === m && y({ payload: M, instance: b, plugins: a, abort: k }), W(M);
2550
2560
  };
2551
2561
  };
2552
2562
  };
2553
- return f(F, U), function() {
2554
- return d(F, U);
2563
+ return f(F, R), function() {
2564
+ return d(F, R);
2555
2565
  };
2556
2566
  }, once: function(m, y) {
2557
2567
  if (!m || !Y(y))
2558
2568
  return !1;
2559
- if (m === j.bootstrap)
2569
+ if (m === C.bootstrap)
2560
2570
  throw new Error(".once disabled for " + m);
2561
- var P = b.on(m, function($) {
2562
- y({ payload: $.payload, instance: b, plugins: a, abort: k }), P();
2571
+ var T = b.on(m, function($) {
2572
+ y({ payload: $.payload, instance: b, plugins: a, abort: k }), T();
2563
2573
  });
2564
- return P;
2574
+ return T;
2565
2575
  }, getState: function(m) {
2566
2576
  var y = I.getState();
2567
- return m ? nn(y, m) : Object.assign({}, y);
2577
+ return m ? rn(y, m) : Object.assign({}, y);
2568
2578
  }, dispatch: function(m) {
2569
2579
  var y = se(m) ? { type: m } : m;
2570
2580
  if (et.includes(y.type))
2571
2581
  throw new Error("reserved action " + y.type);
2572
- var P = C({}, y, { _: C({ originalAction: y.type }, m._ || {}) });
2573
- I.dispatch(P);
2574
- }, enablePlugin: g.enable, disablePlugin: g.disable, plugins: g, storage: { getItem: i.getItem, setItem: function(m, y, P) {
2575
- I.dispatch({ type: j.setItemStart, key: m, value: y, options: P });
2582
+ var T = x({}, y, { _: x({ originalAction: y.type }, m._ || {}) });
2583
+ I.dispatch(T);
2584
+ }, enablePlugin: g.enable, disablePlugin: g.disable, plugins: g, storage: { getItem: i.getItem, setItem: function(m, y, T) {
2585
+ I.dispatch({ type: C.setItemStart, key: m, value: y, options: T });
2576
2586
  }, removeItem: function(m, y) {
2577
- I.dispatch({ type: j.removeItemStart, key: m, options: y });
2587
+ I.dispatch({ type: C.removeItemStart, key: m, options: y });
2578
2588
  } }, setAnonymousId: function(m, y) {
2579
2589
  b.storage.setItem(ce, m, y);
2580
- }, events: { core: et, plugins: s } }, T = r.middlewares.concat([function(m) {
2590
+ }, events: { core: et, plugins: s } }, P = r.middlewares.concat([function(m) {
2581
2591
  return function(y) {
2582
- return function(P) {
2583
- return P.meta || (P.meta = Sn()), y(P);
2592
+ return function(T) {
2593
+ return T.meta || (T.meta = _n()), y(T);
2584
2594
  };
2585
2595
  };
2586
- }, w(Ye), Xi(b, u, { all: p, plugins: s }), Vi(i), Ki(b), Hi(b), w(Ge)]), O = { context: oo, user: Wi(i), page: io, track: qi, plugins: Gi(u), queue: eo }, x = xe, R = xe;
2596
+ }, w(Ye), Yi(b, u, { all: p, plugins: s }), Gi(i), Hi(b), Ji(b), w(Ge)]), O = { context: so, user: Fi(i), page: ao, track: eo, plugins: qi(u), queue: no }, j = xe, D = xe;
2587
2597
  if (J && t.debug) {
2588
2598
  var L = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2589
- L && (x = L({ trace: !0, traceLimit: 25 })), R = function() {
2590
- return arguments.length === 0 ? yr() : V(typeof arguments[0]) ? In() : In().apply(null, arguments);
2599
+ L && (j = L({ trace: !0, traceLimit: 25 })), D = function() {
2600
+ return arguments.length === 0 ? wr() : V(typeof arguments[0]) ? Sn() : Sn().apply(null, arguments);
2591
2601
  };
2592
2602
  }
2593
2603
  var H, A = function(m) {
2594
- return Object.keys(m).reduce(function(y, P) {
2595
- return ao.includes(P) || (y[P] = m[P]), y;
2604
+ return Object.keys(m).reduce(function(y, T) {
2605
+ return co.includes(T) || (y[T] = m[T]), y;
2596
2606
  }, {});
2597
- }(t), D = r.pluginsArray.reduce(function(m, y) {
2598
- var P = y.name, $ = y.config, z = y.loaded, U = r.pluginEnabled[P];
2599
- return m[P] = { enabled: U, initialized: !!U && !y.initialize, loaded: !!z({ config: $ }), config: $ }, m;
2600
- }, {}), S = { context: A, user: _, plugins: D }, I = sr(function(m) {
2601
- for (var y = Object.keys(m), P = {}, $ = 0; $ < y.length; $++) {
2602
- var z = y[$];
2603
- typeof m[z] === ae && (P[z] = m[z]);
2607
+ }(t), z = r.pluginsArray.reduce(function(m, y) {
2608
+ var T = y.name, $ = y.config, U = y.loaded, R = r.pluginEnabled[T];
2609
+ return m[T] = { enabled: R, initialized: !!R && !y.initialize, loaded: !!U({ config: $ }), config: $ }, m;
2610
+ }, {}), S = { context: A, user: _, plugins: z }, I = ur(function(m) {
2611
+ for (var y = Object.keys(m), T = {}, $ = 0; $ < y.length; $++) {
2612
+ var U = y[$];
2613
+ typeof m[U] === ae && (T[U] = m[U]);
2604
2614
  }
2605
- var U, F = Object.keys(P);
2615
+ var R, F = Object.keys(T);
2606
2616
  try {
2607
2617
  (function(Z) {
2608
2618
  Object.keys(Z).forEach(function(W) {
2609
2619
  var M = Z[W];
2610
- if (typeof M(void 0, { type: "@@redux/INIT" }) === ie || typeof M(void 0, { type: Li }) === ie)
2620
+ if (typeof M(void 0, { type: "@@redux/INIT" }) === ie || typeof M(void 0, { type: Zi }) === ie)
2611
2621
  throw new Error("reducer " + W + " " + ie);
2612
2622
  });
2613
- })(P);
2623
+ })(T);
2614
2624
  } catch (Z) {
2615
- U = Z;
2625
+ R = Z;
2616
2626
  }
2617
2627
  return function(Z, W) {
2618
- if (Z === void 0 && (Z = {}), U)
2619
- throw U;
2628
+ if (Z === void 0 && (Z = {}), R)
2629
+ throw R;
2620
2630
  for (var M = !1, ee = {}, Ne = 0; Ne < F.length; Ne++) {
2621
- var He = F[Ne], Wt = Z[He], lt = (0, P[He])(Wt, W);
2631
+ var He = F[Ne], Ht = Z[He], lt = (0, T[He])(Ht, W);
2622
2632
  if (typeof lt === ie) {
2623
- var Cr = Mi(He, W);
2624
- throw new Error(Cr);
2633
+ var Ar = Ki(He, W);
2634
+ throw new Error(Ar);
2625
2635
  }
2626
- ee[He] = lt, M = M || lt !== Wt;
2636
+ ee[He] = lt, M = M || lt !== Ht;
2627
2637
  }
2628
2638
  return M ? ee : Z;
2629
2639
  };
2630
- }(C({}, O, e)), S, R(x(Zi.apply(void 0, T))));
2631
- I.dispatch = (H = I.dispatch, function(m, y, P) {
2632
- var $ = C({}, m, { meta: Sn(m.meta, y, vt(P)) });
2640
+ }(x({}, O, e)), S, D(j(Wi.apply(void 0, P))));
2641
+ I.dispatch = (H = I.dispatch, function(m, y, T) {
2642
+ var $ = x({}, m, { meta: _n(m.meta, y, vt(T)) });
2633
2643
  return H.apply(null, [$]);
2634
2644
  });
2635
2645
  var N = Object.keys(a);
2636
- I.dispatch({ type: j.bootstrap, plugins: N, config: A, params: v, user: _, initialUser: n, persistedUser: E });
2646
+ I.dispatch({ type: C.bootstrap, plugins: N, config: A, params: v, user: _, initialUser: n, persistedUser: E });
2637
2647
  var K = N.filter(function(m) {
2638
2648
  return r.pluginEnabled[m];
2639
2649
  }), X = N.filter(function(m) {
2640
2650
  return !r.pluginEnabled[m];
2641
2651
  });
2642
- return I.dispatch({ type: j.registerPlugins, plugins: N, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
2643
- var P = m.bootstrap, $ = m.config, z = m.name;
2644
- P && Y(P) && P({ instance: b, config: $, payload: m }), I.dispatch({ type: j.registerPluginType(z), name: z, enabled: r.pluginEnabled[z], plugin: m }), r.pluginsArray.length === y + 1 && I.dispatch({ type: j.initializeStart, plugins: K, disabled: X });
2645
- }), co(function(m) {
2646
- I.dispatch({ type: m ? j.offline : j.online });
2647
- }), function(m, y, P) {
2652
+ return I.dispatch({ type: C.registerPlugins, plugins: N, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
2653
+ var T = m.bootstrap, $ = m.config, U = m.name;
2654
+ T && Y(T) && T({ instance: b, config: $, payload: m }), I.dispatch({ type: C.registerPluginType(U), name: U, enabled: r.pluginEnabled[U], plugin: m }), r.pluginsArray.length === y + 1 && I.dispatch({ type: C.initializeStart, plugins: K, disabled: X });
2655
+ }), lo(function(m) {
2656
+ I.dispatch({ type: m ? C.offline : C.online });
2657
+ }), function(m, y, T) {
2648
2658
  setInterval(function() {
2649
- return ur(m, y, P);
2659
+ return dr(m, y, T);
2650
2660
  }, 3e3);
2651
2661
  }(I, u, b), b;
2652
2662
  }
2653
- var Ye = "before", Ge = "after", Le = "cookie", fe = br(), vr = ct, lo = ct;
2654
- function wr(t) {
2663
+ var Ye = "before", Ge = "after", Le = "cookie", fe = Ir(), br = ct, fo = ct;
2664
+ function kr(t) {
2655
2665
  return fe ? ct(t, "", -1) : Ae(t);
2656
2666
  }
2657
- function br() {
2667
+ function Ir() {
2658
2668
  if (fe !== void 0)
2659
2669
  return fe;
2660
2670
  var t = "cookiecookie";
2661
2671
  try {
2662
- ct(t, t), fe = document.cookie.indexOf(t) !== -1, wr(t);
2672
+ ct(t, t), fe = document.cookie.indexOf(t) !== -1, kr(t);
2663
2673
  } catch {
2664
2674
  fe = !1;
2665
2675
  }
@@ -2671,15 +2681,15 @@ function ct(t, e, n, r, i, o) {
2671
2681
  return fe === !1 && (a ? be(t, e) : we(t)), a ? document.cookie = t + "=" + encodeURIComponent(e) + (n ? "; expires=" + new Date(+/* @__PURE__ */ new Date() + 1e3 * n).toUTCString() + (r ? "; path=" + r : "") + (i ? "; domain=" + i : "") + (o ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + t + "=")[1] || "").split(";")[0]);
2672
2682
  }
2673
2683
  }
2674
- var Me = "localStorage", ho = Dt.bind(null, "localStorage");
2684
+ var Me = "localStorage", po = Rt.bind(null, "localStorage");
2675
2685
  $e("localStorage", "getItem", we);
2676
2686
  $e("localStorage", "setItem", be);
2677
2687
  $e("localStorage", "removeItem", Ae);
2678
- var Ze = "sessionStorage", fo = Dt.bind(null, "sessionStorage");
2688
+ var Ze = "sessionStorage", mo = Rt.bind(null, "sessionStorage");
2679
2689
  $e("sessionStorage", "getItem", we);
2680
2690
  $e("sessionStorage", "setItem", be);
2681
2691
  $e("sessionStorage", "removeItem", Ae);
2682
- function Pe(t) {
2692
+ function Te(t) {
2683
2693
  var e = t;
2684
2694
  try {
2685
2695
  if ((e = JSON.parse(t)) === "true")
@@ -2694,57 +2704,57 @@ function Pe(t) {
2694
2704
  if (e !== null && e !== "")
2695
2705
  return e;
2696
2706
  }
2697
- var po = ho(), mo = fo(), go = br();
2698
- function kr(t, e) {
2707
+ var go = po(), yo = mo(), vo = Ir();
2708
+ function Sr(t, e) {
2699
2709
  if (t) {
2700
- var n = Ut(e), r = !Zt(n), i = Rt(n) ? Pe(localStorage.getItem(t)) : void 0;
2710
+ var n = Dt(e), r = !Kt(n), i = Lt(n) ? Te(localStorage.getItem(t)) : void 0;
2701
2711
  if (r && !Se(i))
2702
2712
  return i;
2703
- var o = Lt(n) ? Pe(vr(t)) : void 0;
2713
+ var o = Mt(n) ? Te(br(t)) : void 0;
2704
2714
  if (r && o)
2705
2715
  return o;
2706
- var a = Mt(n) ? Pe(sessionStorage.getItem(t)) : void 0;
2716
+ var a = Zt(n) ? Te(sessionStorage.getItem(t)) : void 0;
2707
2717
  if (r && a)
2708
2718
  return a;
2709
2719
  var s = we(t);
2710
2720
  return r ? s : { localStorage: i, sessionStorage: a, cookie: o, global: s };
2711
2721
  }
2712
2722
  }
2713
- function yo(t, e, n) {
2723
+ function wo(t, e, n) {
2714
2724
  if (t && !Se(e)) {
2715
- var r = {}, i = Ut(n), o = JSON.stringify(e), a = !Zt(i);
2716
- return Rt(i) && (r[Me] = Be(Me, e, Pe(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Me] : Lt(i) && (r[Le] = Be(Le, e, Pe(vr(t))), lo(t, o), a) ? r[Le] : Mt(i) && (r[Ze] = Be(Ze, e, Pe(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ze] : (r[Re] = Be(Re, e, we(t)), be(t, e), a ? r[Re] : r);
2725
+ var r = {}, i = Dt(n), o = JSON.stringify(e), a = !Kt(i);
2726
+ return Lt(i) && (r[Me] = Be(Me, e, Te(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Me] : Mt(i) && (r[Le] = Be(Le, e, Te(br(t))), fo(t, o), a) ? r[Le] : Zt(i) && (r[Ze] = Be(Ze, e, Te(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ze] : (r[De] = Be(De, e, we(t)), be(t, e), a ? r[De] : r);
2717
2727
  }
2718
2728
  }
2719
- function vo(t, e) {
2729
+ function bo(t, e) {
2720
2730
  if (t) {
2721
- var n = Ut(e), r = kr(t, nr), i = {};
2722
- return !Se(r.localStorage) && Rt(n) && (localStorage.removeItem(t), i[Me] = r.localStorage), !Se(r.cookie) && Lt(n) && (wr(t), i[Le] = r.cookie), !Se(r.sessionStorage) && Mt(n) && (sessionStorage.removeItem(t), i[Ze] = r.sessionStorage), !Se(r.global) && ut(n, Re) && (Ae(t), i[Re] = r.global), i;
2731
+ var n = Dt(e), r = Sr(t, ir), i = {};
2732
+ return !Se(r.localStorage) && Lt(n) && (localStorage.removeItem(t), i[Me] = r.localStorage), !Se(r.cookie) && Mt(n) && (kr(t), i[Le] = r.cookie), !Se(r.sessionStorage) && Zt(n) && (sessionStorage.removeItem(t), i[Ze] = r.sessionStorage), !Se(r.global) && ut(n, De) && (Ae(t), i[De] = r.global), i;
2723
2733
  }
2724
2734
  }
2725
- function Ut(t) {
2726
- return t ? se(t) ? t : t.storage : tr;
2727
- }
2728
- function Rt(t) {
2729
- return po && ut(t, Me);
2735
+ function Dt(t) {
2736
+ return t ? se(t) ? t : t.storage : rr;
2730
2737
  }
2731
2738
  function Lt(t) {
2732
- return go && ut(t, Le);
2739
+ return go && ut(t, Me);
2733
2740
  }
2734
2741
  function Mt(t) {
2735
- return mo && ut(t, Ze);
2742
+ return vo && ut(t, Le);
2736
2743
  }
2737
2744
  function Zt(t) {
2738
- return t === nr || t === "all";
2745
+ return yo && ut(t, Ze);
2746
+ }
2747
+ function Kt(t) {
2748
+ return t === ir || t === "all";
2739
2749
  }
2740
2750
  function ut(t, e) {
2741
- return t === tr || t === e || Zt(t);
2751
+ return t === rr || t === e || Kt(t);
2742
2752
  }
2743
2753
  function Be(t, e, n) {
2744
2754
  return { location: t, current: e, previous: n };
2745
2755
  }
2746
- var wo = { setItem: yo, getItem: kr, removeItem: vo };
2747
- function bo(t, e, n) {
2756
+ var ko = { setItem: wo, getItem: Sr, removeItem: bo };
2757
+ function Io(t, e, n) {
2748
2758
  return e in t ? Object.defineProperty(t, e, {
2749
2759
  value: n,
2750
2760
  enumerable: !0,
@@ -2752,7 +2762,7 @@ function bo(t, e, n) {
2752
2762
  writable: !0
2753
2763
  }) : t[e] = n, t;
2754
2764
  }
2755
- function _n(t, e) {
2765
+ function En(t, e) {
2756
2766
  var n = Object.keys(t);
2757
2767
  if (Object.getOwnPropertySymbols) {
2758
2768
  var r = Object.getOwnPropertySymbols(t);
@@ -2762,24 +2772,24 @@ function _n(t, e) {
2762
2772
  }
2763
2773
  return n;
2764
2774
  }
2765
- function En(t) {
2775
+ function Pn(t) {
2766
2776
  for (var e = 1; e < arguments.length; e++) {
2767
2777
  var n = arguments[e] != null ? arguments[e] : {};
2768
- e % 2 ? _n(Object(n), !0).forEach(function(r) {
2769
- bo(t, r, n[r]);
2770
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : _n(Object(n)).forEach(function(r) {
2778
+ e % 2 ? En(Object(n), !0).forEach(function(r) {
2779
+ Io(t, r, n[r]);
2780
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : En(Object(n)).forEach(function(r) {
2771
2781
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
2772
2782
  });
2773
2783
  }
2774
2784
  return t;
2775
2785
  }
2776
- function ko() {
2786
+ function So() {
2777
2787
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
2778
- storage: wo
2788
+ storage: ko
2779
2789
  };
2780
- return uo(En(En({}, e), t));
2790
+ return ho(Pn(Pn({}, e), t));
2781
2791
  }
2782
- function Io(t, e) {
2792
+ function _o(t, e) {
2783
2793
  e = e || {};
2784
2794
  var n, r, i = [], o = e.max || 1 / 0;
2785
2795
  function a() {
@@ -2801,7 +2811,7 @@ function Io(t, e) {
2801
2811
  }
2802
2812
  };
2803
2813
  }
2804
- function So(t) {
2814
+ function Eo(t) {
2805
2815
  if (typeof window > "u")
2806
2816
  return;
2807
2817
  const { addEventListener: e, history: n, location: r } = window;
@@ -2813,52 +2823,52 @@ function So(t) {
2813
2823
  const s = n[a];
2814
2824
  n[a] = function(...h) {
2815
2825
  var c;
2816
- const p = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = Eo(p);
2826
+ const p = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = To(p);
2817
2827
  return i !== u && (i = u, setTimeout(() => t(p), 0)), s.apply(n, h);
2818
2828
  };
2819
2829
  });
2820
2830
  }
2821
- function _o(t, e) {
2831
+ function Po(t, e) {
2822
2832
  const n = t.indexOf(e);
2823
2833
  return n > -1 ? t.slice(0, n) : t;
2824
2834
  }
2825
- function Eo(t) {
2826
- return ["#", "?"].forEach((e) => t = _o(t, e)), t;
2835
+ function To(t) {
2836
+ return ["#", "?"].forEach((e) => t = Po(t, e)), t;
2827
2837
  }
2828
- function To() {
2829
- So(() => {
2838
+ function Oo() {
2839
+ Eo(() => {
2830
2840
  ne.page();
2831
2841
  });
2832
2842
  }
2833
- function Po(t) {
2843
+ function jo(t) {
2834
2844
  if (t === void 0 && (t = {}), !J)
2835
- return Tt;
2836
- var e = Pn(), n = jt(), r = Tn(), i = qe(r, e), o = qe(n, e), a = [], s = [], h = [], p = r, u = i, c = o, f = Object.keys(t);
2845
+ return Pt;
2846
+ var e = On(), n = jt(), r = Tn(), i = qe(r, e), o = qe(n, e), a = [], s = [], h = [], p = r, u = i, c = o, f = Object.keys(t);
2837
2847
  if (!f.length)
2838
- return Tt;
2848
+ return Pt;
2839
2849
  var d = f.map(function(k) {
2840
2850
  return Number(k);
2841
- }), w = Ri(function() {
2842
- var k = Pn(), v = function(A, D) {
2843
- return D.map(function(S) {
2851
+ }), w = Mi(function() {
2852
+ var k = On(), v = function(A, z) {
2853
+ return z.map(function(S) {
2844
2854
  return S === 100 ? A - 5 : A * (S / 100);
2845
2855
  });
2846
2856
  }(k, d), E = jt(), _ = Tn(), g = qe(_, k), l = qe(E, k);
2847
2857
  if (u = g > u ? g : u, c = l < c ? l : c, !(a.length >= d.length)) {
2848
- var b = p === _, T = "up";
2849
- b ? T = "initial" : p <= _ && (T = "down");
2850
- var O = v, x = d;
2851
- (T === "up" || b) && (O = v.slice().reverse(), x = d.slice().reverse());
2852
- var R = x.reduce(function(A, D, S) {
2858
+ var b = p === _, P = "up";
2859
+ b ? P = "initial" : p <= _ && (P = "down");
2860
+ var O = v, j = d;
2861
+ (P === "up" || b) && (O = v.slice().reverse(), j = d.slice().reverse());
2862
+ var D = j.reduce(function(A, z, S) {
2853
2863
  var I = O[S];
2854
- return h.includes(D) && _ <= I && (h = h.filter(function(N) {
2855
- return N !== D;
2856
- }), A.singleFunction = D), T === "down" && !a.includes(D) && _ >= I && D > o ? (s.push(D), A.callbacks = A.callbacks.concat(D), A) : T === "up" && !a.includes(D) && _ <= I && D <= g ? (A.foundFunc = [D], A) : (b && _ >= I && A.foundFunc.length === 0 && (A.foundFunc = [D]), !s.includes(D) && _ >= I && (s.push(D), A.singleFunction ? h.push(D) : A.singleFunction = D), A);
2857
- }, { foundFunc: [], singleFunction: null, callbacks: [], direction: T });
2858
- if (p = _, T === "down" && R.callbacks && R.callbacks.forEach(function(A) {
2859
- Y(t[A]) && (t[A]({ trigger: A, direction: T, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(A));
2860
- }), R.singleFunction) {
2861
- var L = R.singleFunction, H = R.direction;
2864
+ return h.includes(z) && _ <= I && (h = h.filter(function(N) {
2865
+ return N !== z;
2866
+ }), A.singleFunction = z), P === "down" && !a.includes(z) && _ >= I && z > o ? (s.push(z), A.callbacks = A.callbacks.concat(z), A) : P === "up" && !a.includes(z) && _ <= I && z <= g ? (A.foundFunc = [z], A) : (b && _ >= I && A.foundFunc.length === 0 && (A.foundFunc = [z]), !s.includes(z) && _ >= I && (s.push(z), A.singleFunction ? h.push(z) : A.singleFunction = z), A);
2867
+ }, { foundFunc: [], singleFunction: null, callbacks: [], direction: P });
2868
+ if (p = _, P === "down" && D.callbacks && D.callbacks.forEach(function(A) {
2869
+ Y(t[A]) && (t[A]({ trigger: A, direction: P, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(A));
2870
+ }), D.singleFunction) {
2871
+ var L = D.singleFunction, H = D.direction;
2862
2872
  Y(t[L]) && t[L]({ trigger: L, direction: H, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(L);
2863
2873
  }
2864
2874
  }
@@ -2870,13 +2880,13 @@ function Po(t) {
2870
2880
  function jt() {
2871
2881
  return J ? document.body.scrollTop || document.documentElement.scrollTop : 0;
2872
2882
  }
2873
- function Oo() {
2883
+ function Co() {
2874
2884
  return J ? window.innerHeight || document.documentElement.clientHeight : 0;
2875
2885
  }
2876
2886
  function Tn() {
2877
- return Math.round(jt() + Oo());
2887
+ return Math.round(jt() + Co());
2878
2888
  }
2879
- function Pn() {
2889
+ function On() {
2880
2890
  if (!J)
2881
2891
  return 0;
2882
2892
  var t = document.body, e = document.documentElement;
@@ -2885,10 +2895,10 @@ function Pn() {
2885
2895
  function qe(t, e) {
2886
2896
  return Math.round(t / e * 100);
2887
2897
  }
2888
- var On = "EventListener";
2889
- function jo(t) {
2898
+ var jn = "EventListener";
2899
+ function xo(t) {
2890
2900
  return function(e, n, r, i) {
2891
- var o = r || Tt, a = i || !1;
2901
+ var o = r || Pt, a = i || !1;
2892
2902
  if (!J)
2893
2903
  return o;
2894
2904
  var s = rt(n), h = rt(e, !0);
@@ -2899,9 +2909,9 @@ function jo(t) {
2899
2909
  var p = [];
2900
2910
  return function u(c) {
2901
2911
  c && (p = []);
2902
- for (var f = c ? "add" + On : "remove" + On, d = 0; d < h.length; d++) {
2912
+ for (var f = c ? "add" + jn : "remove" + jn, d = 0; d < h.length; d++) {
2903
2913
  var w = h[d];
2904
- p[d] = c ? a && a.once ? Co(o) : o : p[d] || o;
2914
+ p[d] = c ? a && a.once ? Ao(o) : o : p[d] || o;
2905
2915
  for (var k = 0; k < s.length; k++)
2906
2916
  w[f] ? w["on" + s[k]] = c ? p[d] : null : w[f](s[k], p[d], a);
2907
2917
  }
@@ -2920,31 +2930,31 @@ function rt(t, e) {
2920
2930
  r[i] = t[i];
2921
2931
  return r;
2922
2932
  }
2923
- var o = $i(t);
2933
+ var o = Ui(t);
2924
2934
  return e ? o.map(function(a) {
2925
2935
  return se(a) ? rt(a, !0) : a;
2926
2936
  }).flat() : o;
2927
2937
  }
2928
- function Co(t, e) {
2938
+ function Ao(t, e) {
2929
2939
  var n;
2930
2940
  return function() {
2931
2941
  return t && (n = t.apply(e || this, arguments), t = null), n;
2932
2942
  };
2933
2943
  }
2934
- var wt = jo("Event");
2935
- function Ir(t, e) {
2944
+ var wt = xo("Event");
2945
+ function _r(t, e) {
2936
2946
  return J && Y(window[t]) ? (n = window[t], r = e, (i = window) === void 0 && (i = null), Y(n) ? function() {
2937
2947
  n.apply(i, arguments), r.apply(i, arguments);
2938
2948
  } : r) : window[t] = e;
2939
2949
  var n, r, i;
2940
2950
  }
2941
- Ir.bind(null, "onerror");
2942
- Ir.bind(null, "onload");
2943
- var Sr = typeof window > "u", jn = "hidden";
2944
- function xo(t) {
2945
- if (Sr)
2951
+ _r.bind(null, "onerror");
2952
+ _r.bind(null, "onload");
2953
+ var Er = typeof window > "u", Cn = "hidden";
2954
+ function $o(t) {
2955
+ if (Er)
2946
2956
  return !1;
2947
- var e = Ao(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2957
+ var e = No(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2948
2958
  return t(!!document[e]);
2949
2959
  }, i = function() {
2950
2960
  return document.addEventListener(n, r);
@@ -2953,15 +2963,15 @@ function xo(t) {
2953
2963
  return document.removeEventListener(n, r), i;
2954
2964
  };
2955
2965
  }
2956
- function Ao() {
2966
+ function No() {
2957
2967
  var t = ["webkit", "moz", "ms", "o"];
2958
- return Sr || jn in document ? jn : t.reduce(function(e, n) {
2968
+ return Er || Cn in document ? Cn : t.reduce(function(e, n) {
2959
2969
  var r = n + "Hidden";
2960
2970
  return !e && r in document ? r : e;
2961
2971
  }, null);
2962
2972
  }
2963
- var $o = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
2964
- function No(t, e) {
2973
+ var Uo = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
2974
+ function zo(t, e) {
2965
2975
  e === void 0 && (e = {});
2966
2976
  var n = /* @__PURE__ */ function(a, s) {
2967
2977
  var h = this, p = !1;
@@ -2972,10 +2982,10 @@ function No(t, e) {
2972
2982
  };
2973
2983
  }(t, e.throttle || 1e4), r = [];
2974
2984
  function i() {
2975
- var a = xo(function(s) {
2985
+ var a = $o(function(s) {
2976
2986
  s || n({ type: "tabVisible" });
2977
2987
  });
2978
- return r = [a].concat($o.map(function(s) {
2988
+ return r = [a].concat(Uo.map(function(s) {
2979
2989
  return wt(document, s, n);
2980
2990
  })).concat(wt(window, "load", n)).concat(wt(window, "scroll", n, { capture: !0, passive: !0 })), o;
2981
2991
  }
@@ -2988,16 +2998,16 @@ function No(t, e) {
2988
2998
  return o(), i;
2989
2999
  };
2990
3000
  }
2991
- function zo(t) {
3001
+ function Ro(t) {
2992
3002
  var e, n, r = t.onIdle, i = t.onWakeUp, o = t.onHeartbeat, a = t.timeout, s = a === void 0 ? 1e4 : a, h = t.throttle, p = h === void 0 ? 2e3 : h, u = !1, c = !1, f = /* @__PURE__ */ new Date(), d = function() {
2993
3003
  return clearTimeout(e);
2994
3004
  };
2995
3005
  function w(v) {
2996
- d(), o && !u && o(De(f), v), i && u && (u = !1, i(De(n), v), f = /* @__PURE__ */ new Date()), e = setTimeout(function() {
2997
- u = !0, r && (n = /* @__PURE__ */ new Date(), r(De(f), v));
3006
+ d(), o && !u && o(ze(f), v), i && u && (u = !1, i(ze(n), v), f = /* @__PURE__ */ new Date()), e = setTimeout(function() {
3007
+ u = !0, r && (n = /* @__PURE__ */ new Date(), r(ze(f), v));
2998
3008
  }, s);
2999
3009
  }
3000
- var k = No(w, { throttle: p });
3010
+ var k = zo(w, { throttle: p });
3001
3011
  return { disable: function() {
3002
3012
  c = !0, u = !1, d();
3003
3013
  var v = k();
@@ -3005,26 +3015,26 @@ function zo(t) {
3005
3015
  return c = !1, f = /* @__PURE__ */ new Date(), w({ type: "load" }), v();
3006
3016
  };
3007
3017
  }, getStatus: function() {
3008
- return { isIdle: u, isDisabled: c, active: u ? 0 : De(f, c), idle: u ? De(n, c) : 0 };
3018
+ return { isIdle: u, isDisabled: c, active: u ? 0 : ze(f, c), idle: u ? ze(n, c) : 0 };
3009
3019
  } };
3010
3020
  }
3011
- function De(t, e) {
3021
+ function ze(t, e) {
3012
3022
  return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
3013
3023
  }
3014
- const Cn = 5e3;
3024
+ const xn = 5e3;
3015
3025
  class Do {
3016
3026
  constructor(e) {
3017
- B(this, "element");
3018
- B(this, "isInViewport", !1);
3019
- B(this, "isAwake", !1);
3020
- B(this, "isFlushing");
3021
- B(this, "observer");
3022
- B(this, "lastEventAt", Date.now());
3023
- B(this, "registeredView", !1);
3024
- B(this, "viewCallback");
3025
- B(this, "activeDurationCallback");
3026
- B(this, "idleDurationCallback");
3027
- B(this, "scrollCallback");
3027
+ q(this, "element");
3028
+ q(this, "isInViewport", !1);
3029
+ q(this, "isAwake", !1);
3030
+ q(this, "isFlushing");
3031
+ q(this, "observer");
3032
+ q(this, "lastEventAt", Date.now());
3033
+ q(this, "registeredView", !1);
3034
+ q(this, "viewCallback");
3035
+ q(this, "activeDurationCallback");
3036
+ q(this, "idleDurationCallback");
3037
+ q(this, "scrollCallback");
3028
3038
  this.element = e.element, this.viewCallback = e.viewCallback, this.activeDurationCallback = e.activeDurationCallback, this.idleDurationCallback = e.idleDurationCallback, this.scrollCallback = e.scrollCallback, this.observer = new IntersectionObserver(
3029
3039
  (n) => {
3030
3040
  n.forEach((r) => {
@@ -3034,11 +3044,11 @@ class Do {
3034
3044
  {
3035
3045
  threshold: 0
3036
3046
  }
3037
- ), this.observer.observe(this.element), zo({
3047
+ ), this.observer.observe(this.element), Ro({
3038
3048
  onIdle: (n) => this.handleAwake(!1, n),
3039
3049
  onWakeUp: (n) => this.handleAwake(!0, n),
3040
- timeout: Cn
3041
- }), Po({
3050
+ timeout: xn
3051
+ }), jo({
3042
3052
  25: this.handleScroll.bind(this),
3043
3053
  50: this.handleScroll.bind(this),
3044
3054
  75: this.handleScroll.bind(this),
@@ -3056,7 +3066,7 @@ class Do {
3056
3066
  e ? (this.isAwake = !0, this.trackInViewport()) : this.handleAwake(!1), this.isInViewport = e;
3057
3067
  }
3058
3068
  handleAwake(e, n = Math.round((Date.now() - this.lastEventAt) / 1e3)) {
3059
- this.isAwake = e, this.lastEventAt = e ? Date.now() - n * Cn : Date.now(), this.isInViewport && this.trackAwake(e, n);
3069
+ this.isAwake = e, this.lastEventAt = e ? Date.now() - n * xn : Date.now(), this.isInViewport && this.trackAwake(e, n);
3060
3070
  }
3061
3071
  handleScroll(e) {
3062
3072
  this.scrollCallback && this.scrollCallback(e);
@@ -3073,16 +3083,16 @@ class Do {
3073
3083
  this.registeredView || (this.registeredView = !0, this.viewCallback && this.viewCallback());
3074
3084
  }
3075
3085
  }
3076
- const xn = "sesamy_session_id";
3077
- function Uo() {
3078
- let t = sessionStorage.getItem(xn);
3079
- return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(xn, t)), t;
3086
+ const An = "sesamy_session_id";
3087
+ function Lo() {
3088
+ let t = sessionStorage.getItem(An);
3089
+ return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(An, t)), t;
3080
3090
  }
3081
- let _r = !1, Ct, An, it;
3082
- function Ro({ clientId: t, enabled: e = !0, endpoint: n = ii }) {
3083
- if (Ct = t, An = e, it = n, !An)
3091
+ let Pr = !1, Ct, $n, it;
3092
+ function Mo({ clientId: t, enabled: e = !0, endpoint: n = ai }) {
3093
+ if (Ct = t, $n = e, it = n, !$n)
3084
3094
  return;
3085
- To();
3095
+ Oo();
3086
3096
  const r = new Do({
3087
3097
  element: document.body,
3088
3098
  viewCallback: () => {
@@ -3108,24 +3118,24 @@ function Ro({ clientId: t, enabled: e = !0, endpoint: n = ii }) {
3108
3118
  });
3109
3119
  }
3110
3120
  });
3111
- Zo(document.body, () => {
3121
+ Wo(document.body, () => {
3112
3122
  r.flush();
3113
- }), Ko(document.body, () => {
3123
+ }), Ho(document.body, () => {
3114
3124
  r.handleVisibilityChange();
3115
3125
  }), window.addEventListener(Q.AUTHENTICATED, async (i) => {
3116
3126
  const o = i;
3117
3127
  await ne.identify(o.detail.sub);
3118
3128
  }), window.addEventListener(Q.LOGOUT, async () => {
3119
- await ne.track("logout", {}), Kt.flush(), await ne.reset();
3129
+ await ne.track("logout", {}), Wt.flush(), await ne.reset();
3120
3130
  });
3121
3131
  }
3122
- function Er(t) {
3132
+ function Tr(t) {
3123
3133
  return JSON.stringify(
3124
3134
  t.map((e) => ({
3125
3135
  ...e,
3126
3136
  clientId: Ct,
3127
3137
  requestId: Math.random().toString(36).slice(2, 9),
3128
- sessionId: Uo(),
3138
+ sessionId: Lo(),
3129
3139
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
3130
3140
  version: zt,
3131
3141
  event: e.event,
@@ -3138,18 +3148,18 @@ function Er(t) {
3138
3148
  referrer: document.referrer
3139
3149
  },
3140
3150
  locale: navigator.language,
3141
- library: er,
3151
+ library: nr,
3142
3152
  userAgent: navigator.userAgent,
3143
3153
  clientId: Ct
3144
3154
  }
3145
3155
  }))
3146
3156
  );
3147
3157
  }
3148
- const Kt = Io(
3158
+ const Wt = _o(
3149
3159
  async (t) => {
3150
3160
  if (t.length > 0) {
3151
- const e = Er(t);
3152
- _r ? navigator.sendBeacon(it, e) : (await fetch(it, {
3161
+ const e = Tr(t);
3162
+ Pr ? navigator.sendBeacon(it, e) : (await fetch(it, {
3153
3163
  method: "POST",
3154
3164
  body: e,
3155
3165
  headers: {
@@ -3170,12 +3180,12 @@ function bt(t) {
3170
3180
  if (t.anonymousId)
3171
3181
  if ((e = t.properties) != null && e.flushing) {
3172
3182
  const n = { ...t };
3173
- delete n.properties.flushing, navigator.sendBeacon(it, Er([n]));
3183
+ delete n.properties.flushing, navigator.sendBeacon(it, Tr([n]));
3174
3184
  } else
3175
- Kt.push(t);
3185
+ Wt.push(t);
3176
3186
  }
3177
- const ne = ko({
3178
- app: er,
3187
+ const ne = So({
3188
+ app: nr,
3179
3189
  version: zt,
3180
3190
  plugins: [
3181
3191
  {
@@ -3212,40 +3222,40 @@ const ne = ko({
3212
3222
  }
3213
3223
  ]
3214
3224
  });
3215
- function Lo(t, e) {
3225
+ function Zo(t, e) {
3216
3226
  ne.track(t, e);
3217
3227
  }
3218
- function Mo() {
3219
- return _r = !0, Kt.flush();
3228
+ function Ko() {
3229
+ return Pr = !0, Wt.flush();
3220
3230
  }
3221
- const Tr = /* @__PURE__ */ new Map();
3222
- function Zo(t, e) {
3223
- Tr.set(t, e);
3231
+ const Or = /* @__PURE__ */ new Map();
3232
+ function Wo(t, e) {
3233
+ Or.set(t, e);
3224
3234
  }
3225
3235
  window.addEventListener("beforeunload", () => {
3226
- Tr.forEach((t, e) => {
3236
+ Or.forEach((t, e) => {
3227
3237
  t.bind(e)();
3228
- }), Mo();
3238
+ }), Ko();
3229
3239
  });
3230
- const Pr = /* @__PURE__ */ new Map();
3231
- function Ko(t, e) {
3232
- Pr.set(t, e);
3240
+ const jr = /* @__PURE__ */ new Map();
3241
+ function Ho(t, e) {
3242
+ jr.set(t, e);
3233
3243
  }
3234
3244
  window.addEventListener("visibilitychange", () => {
3235
- document.visibilityState !== "visible" && Pr.forEach((t, e) => {
3245
+ document.visibilityState !== "visible" && jr.forEach((t, e) => {
3236
3246
  t.bind(e)();
3237
3247
  });
3238
3248
  });
3239
- const Or = "sesamySignedURLs";
3240
- function jr() {
3241
- const t = sessionStorage.getItem(Or);
3249
+ const Cr = "sesamySignedURLs";
3250
+ function xr() {
3251
+ const t = sessionStorage.getItem(Cr);
3242
3252
  return t ? JSON.parse(t) : [];
3243
3253
  }
3244
- function Wo(t) {
3245
- const e = jr();
3246
- e.push(t), sessionStorage.setItem(Or, JSON.stringify(e));
3254
+ function Fo(t) {
3255
+ const e = xr();
3256
+ e.push(t), sessionStorage.setItem(Cr, JSON.stringify(e));
3247
3257
  }
3248
- function Ho(t) {
3258
+ function Jo(t) {
3249
3259
  const {
3250
3260
  getEntitlement: e,
3251
3261
  getEntitlements: n,
@@ -3268,17 +3278,18 @@ function Ho(t) {
3268
3278
  pushTally: g,
3269
3279
  deleteTally: l,
3270
3280
  getProduct: b,
3271
- autoOnboardProduct: T
3272
- } = Si(t), O = {
3281
+ getPaymentIssues: P,
3282
+ autoOnboardProduct: O
3283
+ } = Ei(t), j = {
3273
3284
  auth: {
3274
3285
  getUser: p,
3275
- isAuthenticated: ai,
3276
- loginWithRedirect: si,
3277
- logout: ui,
3278
- setToken: Gn
3286
+ isAuthenticated: ci,
3287
+ loginWithRedirect: Bn,
3288
+ logout: di,
3289
+ setToken: qn
3279
3290
  },
3280
3291
  analytics: {
3281
- track: Lo
3292
+ track: Zo
3282
3293
  },
3283
3294
  tags: {
3284
3295
  list: u,
@@ -3289,7 +3300,7 @@ function Ho(t) {
3289
3300
  get: e,
3290
3301
  list: n,
3291
3302
  access: r,
3292
- signedLinks: jr
3303
+ signedLinks: xr
3293
3304
  },
3294
3305
  contracts: {
3295
3306
  get: o,
@@ -3316,40 +3327,41 @@ function Ho(t) {
3316
3327
  },
3317
3328
  products: {
3318
3329
  get: b,
3319
- autoOnboard: T
3330
+ autoOnboard: O
3320
3331
  },
3321
- getVersion: Fo,
3332
+ getVersion: Xo,
3333
+ getPaymentIssues: P,
3322
3334
  clearCache: re
3323
3335
  };
3324
- return t.namespace && (window[t.namespace] = O), O;
3336
+ return t.namespace && (window[t.namespace] = j), j;
3325
3337
  }
3326
- function Fo() {
3338
+ function Xo() {
3327
3339
  return zt;
3328
3340
  }
3329
- function Jo() {
3341
+ function Vo() {
3330
3342
  const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token"), n = t.get("expires_in");
3331
3343
  if (e) {
3332
- Gn(e, n ? parseInt(n, 10) : void 0);
3344
+ qn(e, n ? parseInt(n, 10) : void 0);
3333
3345
  const r = new URL(window.location.href);
3334
3346
  t.delete("access_token"), t.delete("expires_in"), r.hash = t.toString(), window.history.replaceState(null, "", r);
3335
3347
  }
3336
3348
  }
3337
- const $n = "sesamy-refresh", Nn = "force-refetch-entitlements";
3338
- function Xo() {
3339
- const t = new URLSearchParams(window.location.search), e = t.get(Nn), n = t.get($n);
3349
+ const Nn = "sesamy-refresh", Un = "force-refetch-entitlements";
3350
+ function Yo() {
3351
+ const t = new URLSearchParams(window.location.search), e = t.get(Un), n = t.get(Nn);
3340
3352
  if (e !== null || n !== null) {
3341
3353
  const r = new URL(window.location.href);
3342
- t.delete(Nn), t.delete($n), r.search = t.toString(), re(), window.history.replaceState(null, "", r);
3354
+ t.delete(Un), t.delete(Nn), r.search = t.toString(), re(), window.history.replaceState(null, "", r);
3343
3355
  }
3344
3356
  }
3345
- function Vo() {
3357
+ function Go() {
3346
3358
  const t = new URLSearchParams(window.location.search), e = t.get("token"), n = t.get("se");
3347
3359
  if (!n || !e)
3348
3360
  return;
3349
3361
  const r = parseInt(n, 10);
3350
3362
  if (Number.isNaN(r) || r < Date.now())
3351
3363
  return;
3352
- Wo({
3364
+ Fo({
3353
3365
  url: window.location.href.split("?")[0],
3354
3366
  token: e,
3355
3367
  expiresAt: r,
@@ -3358,37 +3370,47 @@ function Vo() {
3358
3370
  const i = new URL(window.location.href);
3359
3371
  i.searchParams.delete("ss"), i.searchParams.delete("se"), i.searchParams.delete("sp"), i.searchParams.delete("so"), i.searchParams.delete("token"), window.history.replaceState(null, "", i);
3360
3372
  }
3361
- const zn = "sesamy-purchase";
3362
- function Yo() {
3363
- const t = new URLSearchParams(window.location.search), e = t.get(zn);
3373
+ const zn = "sesamy-user";
3374
+ async function Bo() {
3375
+ const e = new URLSearchParams(window.location.search).get(zn);
3376
+ if (!e)
3377
+ return;
3378
+ const n = await ui();
3379
+ (n == null ? void 0 : n.email) !== e && Bn();
3380
+ const r = new URL(window.location.href);
3381
+ r.searchParams.delete(zn), window.history.replaceState(null, "", r);
3382
+ }
3383
+ const Rn = "sesamy-purchase";
3384
+ function qo() {
3385
+ const t = new URLSearchParams(window.location.search), e = t.get(Rn);
3364
3386
  if (e !== null) {
3365
3387
  const n = new URL(window.location.href);
3366
- t.delete(zn), n.search = t.toString(), ue(Q.PURCHASE, { itemSrc: e }), re(), window.history.replaceState(null, "", n);
3388
+ t.delete(Rn), n.search = t.toString(), ue(Q.PURCHASE, { itemSrc: e }), re(), window.history.replaceState(null, "", n);
3367
3389
  }
3368
3390
  }
3369
- async function Go(t) {
3370
- Ro({
3391
+ async function Qo(t) {
3392
+ Mo({
3371
3393
  clientId: t.clientId,
3372
3394
  // The default client id can be overridden by the config
3373
3395
  ...t.analytics
3374
- }), await oi({
3396
+ }), await si({
3375
3397
  clientId: t.clientId,
3376
3398
  // The default client id can be overridden by the config
3377
3399
  ...t.auth
3378
3400
  });
3379
- const e = Ho(t.api || {});
3380
- return ue(Q.READY, {}), Jo(), Xo(), Vo(), Yo(), e;
3401
+ const e = Jo(t.api || {});
3402
+ return ue(Q.READY, {}), Vo(), Yo(), Go(), await Bo(), qo(), e;
3381
3403
  }
3382
3404
  if (typeof document < "u") {
3383
3405
  const t = document.getElementById("sesamy-js");
3384
3406
  if (t != null && t.textContent)
3385
3407
  try {
3386
3408
  const e = JSON.parse(t.textContent);
3387
- Go(e);
3409
+ Qo(e);
3388
3410
  } catch (e) {
3389
3411
  console.error("Failed to parse config", e);
3390
3412
  }
3391
3413
  }
3392
3414
  export {
3393
- Go as init
3415
+ Qo as init
3394
3416
  };