@talkjs/core 0.0.6 → 1.0.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.
@@ -90,23 +90,21 @@ function o() {
90
90
  }
91
91
  class u {
92
92
  constructor(e2, t2, s2) {
93
- this.layer = e2, this.states = t2, this.transitions = s2, this.key = void 0, this._state = t2[0];
93
+ this.layer = e2, this.states = t2, this.transitions = s2, this._state = t2[0];
94
94
  }
95
95
  get state() {
96
96
  return this._state;
97
97
  }
98
- transition(e2, t2) {
99
- const s2 = this.transitions[e2];
100
- if (!s2) return;
101
- if (!this.canTransition(e2, t2)) return;
102
- const n2 = this.state, r2 = this.key;
103
- this._state = s2.to, "LOCK" === s2.keyRequired ? this.key = t2 : "UNLOCK" === s2.keyRequired && (this.key = void 0), s2.afterTransition({ from: n2, to: this.state, fromKey: r2, toKey: this.key });
98
+ transition(e2) {
99
+ const t2 = this.transitions[e2];
100
+ if (!t2) return;
101
+ if (!this.canTransition(e2)) return;
102
+ const s2 = this.state;
103
+ this._state = t2.to, t2.afterTransition({ from: s2, to: this.state });
104
104
  }
105
- canTransition(e2, t2) {
106
- const s2 = this.transitions[e2];
107
- if (!s2) return false;
108
- const { from: n2, keyRequired: r2 } = s2;
109
- return !(void 0 !== r2 && !t2) && (("UNLOCK" !== r2 || void 0 === this.key || t2 === this.key) && ("ANY" === n2 || n2.includes(this.state)));
105
+ canTransition(e2) {
106
+ const t2 = this.transitions[e2];
107
+ return !!t2 && ("ANY" === t2.from || t2.from.includes(this.state));
110
108
  }
111
109
  }
112
110
  function c(e2) {
@@ -247,7 +245,7 @@ class b {
247
245
  void 0 !== this.timeout && (clearTimeout(this.timeout), this.timeout = void 0);
248
246
  }
249
247
  }
250
- class y {
248
+ class w {
251
249
  constructor() {
252
250
  this.i = -1;
253
251
  }
@@ -258,9 +256,9 @@ class y {
258
256
  this.i = -1;
259
257
  }
260
258
  }
261
- class w {
259
+ class y {
262
260
  constructor(e2, t2) {
263
- this.handlers = t2, this.seqCounter = new y(), this.responseHandlers = {}, this.heartbeats = new A(this), this.socket = new v(e2, { onUpstreamRestarting: () => {
261
+ this.handlers = t2, this.seqCounter = new w(), this.responseHandlers = {}, this.heartbeats = new A(this), this.socket = new v(e2, { onUpstreamRestarting: () => {
264
262
  this.heartbeats.serverActive(), this.handlers.onUpstreamRestarting();
265
263
  }, onOpen: () => {
266
264
  this.heartbeats.clientActive(), this.heartbeats.serverActive(), this.handlers.onReady();
@@ -329,33 +327,36 @@ class A {
329
327
  }
330
328
  class C {
331
329
  constructor(e2, t2, s2) {
332
- this.authProvider = t2, this.handlers = s2, this.stateMachine = new u("AuthenticatedConnection", ["WAITING_FOR_WS", "WAITING_FOR_TOKEN", "WAITING_FOR_SESSION", "READY", "TERMINATED"], { getAuthToken: { from: ["WAITING_FOR_WS"], to: "WAITING_FOR_TOKEN", afterTransition: () => __async(this, null, function* () {
333
- const e3 = yield this.authProvider.getToken();
334
- "WAITING_FOR_TOKEN" === this.stateMachine.state && this.stateMachine.transition("sendAuthToken", e3);
335
- }) }, sendAuthToken: { from: ["WAITING_FOR_TOKEN", "WAITING_FOR_SESSION", "READY"], to: "WAITING_FOR_SESSION", keyRequired: "LOCK", afterTransition: ({ from: e3, fromKey: t3, toKey: s3 }) => {
336
- "WAITING_FOR_SESSION" === e3 && t3 === s3 || (this.renewSession(s3), this.lastSentAuthToken = s3);
337
- } }, ready: { from: ["WAITING_FOR_SESSION"], to: "READY", keyRequired: "UNLOCK", afterTransition: () => {
338
- this.handlers.onReady();
339
- } }, refreshAuthToken: { from: ["WAITING_FOR_SESSION", "READY"], to: "WAITING_FOR_TOKEN", afterTransition: () => {
340
- this.authProvider.refreshToken();
341
- } }, notReady: { from: ["WAITING_FOR_TOKEN", "WAITING_FOR_SESSION", "READY"], to: "WAITING_FOR_WS", afterTransition: ({ from: e3 }) => {
342
- "READY" === e3 && this.handlers.onNotReady();
330
+ this.authProvider = t2, this.handlers = s2, this.stateMachine = new u("AuthenticatedConnection", ["WAITING_FOR_WS", "LOGGING_IN", "RENEWING_SESSION", "READY", "TERMINATED"], { logIn: { from: ["WAITING_FOR_WS"], to: "LOGGING_IN", afterTransition: () => __async(this, null, function* () {
331
+ yield this.renewSession();
332
+ }) }, logInFailed: { from: ["LOGGING_IN"], to: "LOGGING_IN", afterTransition: () => __async(this, null, function* () {
333
+ this.authProvider.refreshToken(), yield this.renewSession();
334
+ }) }, scheduledReauth: { from: ["READY"], to: "RENEWING_SESSION", afterTransition: () => __async(this, null, function* () {
335
+ yield this.renewSession();
336
+ }) }, scheduledReauthFailed: { from: ["RENEWING_SESSION"], to: "RENEWING_SESSION", afterTransition: () => __async(this, null, function* () {
337
+ this.authProvider.refreshToken(), yield this.renewSession();
338
+ }) }, authenticated: { from: ["LOGGING_IN", "RENEWING_SESSION"], to: "READY", afterTransition: ({ from: e3 }) => {
339
+ "LOGGING_IN" === e3 && this.handlers.onReady();
340
+ } }, authExpired: { from: ["READY", "RENEWING_SESSION"], to: "LOGGING_IN", afterTransition: () => __async(this, null, function* () {
341
+ this.handlers.onNotReady(), this.authProvider.refreshToken(), yield this.renewSession();
342
+ }) }, wsDisconnected: { from: ["READY", "LOGGING_IN", "RENEWING_SESSION"], to: "WAITING_FOR_WS", afterTransition: ({ from: e3 }) => {
343
+ "READY" !== e3 && "RENEWING_SESSION" !== e3 || this.handlers.onNotReady(), this.authProvider.clearScheduledRefresh();
343
344
  } }, destroy: { from: "ANY", to: "TERMINATED", afterTransition: () => {
344
- this.connection.destroy();
345
- } } }), this.connection = new w(e2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onReady: () => this.stateMachine.transition("getAuthToken"), onNotReady: () => {
346
- this.authProvider.clearScheduledRefresh(), this.stateMachine.transition("notReady");
345
+ this.authProvider.clearScheduledRefresh(), this.connection.destroy();
346
+ } } }), this.connection = new y(e2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onReady: () => this.stateMachine.transition("logIn"), onNotReady: () => {
347
+ this.stateMachine.transition("wsDisconnected");
347
348
  }, onAuthExpired: () => {
348
- this.authProvider.clearScheduledRefresh(), "READY" === this.stateMachine.state && (this.stateMachine.transition("refreshAuthToken"), this.handlers.onNotReady());
349
+ this.stateMachine.transition("authExpired");
349
350
  }, onPublish: (e3, t3) => {
350
351
  this.handlers.onPublish(e3, t3);
351
- } }), t2.onTokenChanged((e3) => {
352
- this.stateMachine.canTransition("sendAuthToken", e3) && this.stateMachine.transition("sendAuthToken", e3);
352
+ } }), t2.onTokenChanged(() => {
353
+ "READY" === this.stateMachine.state && this.stateMachine.transition("scheduledReauth");
353
354
  });
354
355
  }
355
356
  call(e2, t2, s2) {
356
357
  const n2 = this.connection.call(e2, t2, s2);
357
358
  return n2.then((e3) => {
358
- e3.ok || "server" !== e3.where || 401 !== e3.value.status || "WAITING_FOR_TOKEN" === this.stateMachine.state || "WAITING_FOR_SESSION" === this.stateMachine.state || this.stateMachine.transition("refreshAuthToken");
359
+ e3.ok || "server" !== e3.where || 401 !== e3.value.status || "READY" !== this.stateMachine.state && "RENEWING_SESSION" !== this.stateMachine.state || this.stateMachine.transition("authExpired");
359
360
  }), n2;
360
361
  }
361
362
  stopWs() {
@@ -367,16 +368,16 @@ class C {
367
368
  destroy() {
368
369
  this.stateMachine.transition("destroy");
369
370
  }
370
- renewSession(e2) {
371
+ renewSession() {
371
372
  return __async(this, null, function* () {
372
- const s2 = yield this.connection.call("POST", ["session", "renew"], { token: e2 });
373
+ const e2 = yield this.authProvider.getToken(), s2 = yield this.connection.call("POST", ["session", "renew"], { token: e2 });
373
374
  if (!s2.ok && "client" === s2.where) return;
374
375
  const n2 = s2.value;
375
376
  if (n2.status, 200 === n2.status) {
376
377
  const t2 = n2.data.expiresInSeconds;
377
- return void (null !== t2 && t2 < 120 ? (console.error(`[TalkJS] Authenticated with a token that expires in ${t2}s. Treating it as already expired and refreshing. Newly generated tokens should last at least 10 minutes.`), this.stateMachine.transition("refreshAuthToken")) : (this.authProvider.scheduleRefresh(t2), this.authProvider.emitTokenAccepted(e2), this.lastAcceptedAuthToken = e2, this.stateMachine.canTransition("ready", e2) && this.stateMachine.transition("ready", e2)));
378
+ return void (null !== t2 && t2 < 120 ? (console.warn(`[TalkJS] Authenticated with a token that expires in ${t2}s. Treating it as already expired and refreshing. Newly generated tokens should last at least 10 minutes.`), "LOGGING_IN" === this.stateMachine.state ? this.stateMachine.transition("logInFailed") : "RENEWING_SESSION" === this.stateMachine.state && this.stateMachine.transition("scheduledReauthFailed")) : (this.authProvider.scheduleRefresh(t2), this.authProvider.emitTokenAccepted(e2), this.stateMachine.canTransition("authenticated") && this.stateMachine.transition("authenticated")));
378
379
  }
379
- if (401 === n2.status) return void this.stateMachine.transition("refreshAuthToken");
380
+ if (401 === n2.status) return void ("LOGGING_IN" === this.stateMachine.state ? this.stateMachine.transition("logInFailed") : "RENEWING_SESSION" === this.stateMachine.state && this.stateMachine.transition("scheduledReauthFailed"));
380
381
  if (400 === n2.status) return void this.authProvider.emitTokenRefreshFailed(t("Authentication", n2));
381
382
  if (402 === n2.status) return void this.authProvider.emitTokenRefreshFailed(t("Authentication", n2));
382
383
  const r2 = 5e3 * Math.random() + 5e3;
@@ -498,7 +499,7 @@ class k {
498
499
  }
499
500
  }
500
501
  const x = "undefined" != typeof window ? (_a = window.queueMicrotask) != null ? _a : setTimeout : setTimeout;
501
- class T {
502
+ class S {
502
503
  constructor(e2, t2) {
503
504
  this.clearPendingBatch = e2, this.sendCalls = t2, this.sent = false, x(() => this.send());
504
505
  }
@@ -509,14 +510,14 @@ class T {
509
510
  this.sent = true;
510
511
  }
511
512
  }
512
- class S extends T {
513
+ class T extends S {
513
514
  constructor(e2, t2) {
514
515
  super(t2, () => {
515
516
  this.sendSubscribe(), this.sendGet();
516
517
  }), this.connection = e2, this.getCalls = [], this.subscribeCalls = [];
517
518
  }
518
519
  canPush(e2, t2) {
519
- return S.isCorrectBatchTypeFor(e2, t2);
520
+ return T.isCorrectBatchTypeFor(e2, t2);
520
521
  }
521
522
  static isCorrectBatchTypeFor(e2, t2) {
522
523
  return s(t2, ["users", "*"]) && ("GET" === e2 || "SUBSCRIBE" === e2);
@@ -542,7 +543,7 @@ class S extends T {
542
543
  this.connection.call("SUBSCRIBE", ["users"], { ids: e2 }).then((e3) => this.subscribeCalls.forEach((t2) => t2.deferred.resolve(e3)));
543
544
  }
544
545
  }
545
- class D extends T {
546
+ class D extends S {
546
547
  constructor(e2, t2, s2) {
547
548
  super(s2, () => this.sendMutate()), this.conversationId = e2, this.connection = t2, this.calls = [];
548
549
  }
@@ -589,7 +590,7 @@ class I {
589
590
  return this.connection.isConnected();
590
591
  }
591
592
  createEmptyBatchFor(e2, t2) {
592
- if (S.isCorrectBatchTypeFor(e2, t2)) return new S(this.connection, () => this.pendingBatch = null);
593
+ if (T.isCorrectBatchTypeFor(e2, t2)) return new T(this.connection, () => this.pendingBatch = null);
593
594
  if (D.isCorrectBatchTypeFor(e2, t2)) {
594
595
  const e3 = t2[1];
595
596
  return new D(e3, this.connection, () => this.pendingBatch = null);
@@ -649,7 +650,7 @@ class M {
649
650
  function R(e2) {
650
651
  return e2.map((e3) => encodeURIComponent(e3)).join();
651
652
  }
652
- class _ {
653
+ class N {
653
654
  constructor() {
654
655
  this.paths = {};
655
656
  }
@@ -669,9 +670,9 @@ class _ {
669
670
  Object.values(this.paths).forEach((t2) => e2(t2));
670
671
  }
671
672
  }
672
- class O {
673
+ class _ {
673
674
  constructor(e2, t2, s2) {
674
- this.handlers = s2, this.targetSubscriptions = new _(), this.connection = new B(e2, t2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onSubscriptionsLost: () => {
675
+ this.handlers = s2, this.targetSubscriptions = new N(), this.connection = new B(e2, t2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onSubscriptionsLost: () => {
675
676
  this.targetSubscriptions.forEach((e3) => {
676
677
  this.resubscribe(e3);
677
678
  }), this.handlers.onResubscribeSent();
@@ -705,10 +706,10 @@ class O {
705
706
  return this.connection.isConnected();
706
707
  }
707
708
  }
708
- function N(e2, t2) {
709
+ function P(e2, t2) {
709
710
  return void 0 === t2 ? e2 : t2;
710
711
  }
711
- function P(e2, t2) {
712
+ function O(e2, t2) {
712
713
  if (void 0 === t2) return e2;
713
714
  if (null === t2) return {};
714
715
  const s2 = __spreadValues({}, e2);
@@ -880,7 +881,7 @@ class H extends W {
880
881
  this.mutate(e2, (s2) => {
881
882
  const n2 = s2.value.snapshot;
882
883
  if (null === n2) return console.warn("[TalkJS] Received a 'used edited' event for a user that we thought didn't exist."), s2;
883
- return c({ snapshot: { id: n2.id, name: N(n2.name, t2.diff.name), custom: P(n2.custom, t2.diff.custom), locale: N(n2.locale, t2.diff.locale), photoUrl: N(n2.photoUrl, t2.diff.photoUrl), role: N(n2.role, t2.diff.role), welcomeMessage: N(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
884
+ return c({ snapshot: { id: n2.id, name: P(n2.name, t2.diff.name), custom: O(n2.custom, t2.diff.custom), locale: P(n2.locale, t2.diff.locale), photoUrl: P(n2.photoUrl, t2.diff.photoUrl), role: P(n2.role, t2.diff.role), welcomeMessage: P(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
884
885
  });
885
886
  }
886
887
  getFromCache() {
@@ -892,7 +893,7 @@ class H extends W {
892
893
  teardownNested(e2) {
893
894
  }
894
895
  }
895
- const L = /\uFE0F/g, G = String.fromCharCode(8205);
896
+ const G = /\uFE0F/g, L = String.fromCharCode(8205);
896
897
  function z(e2) {
897
898
  if (":arslan:" === e2.text) return ":arslan:";
898
899
  const t2 = function({ text: e3, kind: t3 }) {
@@ -902,7 +903,7 @@ function z(e2) {
902
903
  let s3 = 0, n2 = 0, r2 = 0;
903
904
  for (; r2 < e4.length; ) s3 = e4.charCodeAt(r2++), n2 ? (t4.push((65536 + (n2 - 55296 << 10) + (s3 - 56320)).toString(16)), n2 = 0) : 55296 <= s3 && s3 <= 56319 ? n2 = s3 : t4.push(s3.toString(16));
904
905
  return t4.join("-");
905
- }((s2 = e3).indexOf(G) < 0 ? s2.replace(L, "") : s2) : (_a2 = Y[e3]) != null ? _a2 : function(e4) {
906
+ }((s2 = e3).indexOf(L) < 0 ? s2.replace(G, "") : s2) : (_a2 = Y[e3]) != null ? _a2 : function(e4) {
906
907
  if (/;-?\)/.test(e4)) return "1f609";
907
908
  if (e4 = e4.replace(/;/g, ":"), /:-o/i.test(e4)) return "1f631";
908
909
  return e4 = e4.replace(/-/g, "").toLowerCase(), J[e4];
@@ -912,15 +913,15 @@ function z(e2) {
912
913
  return t2 ? String.fromCodePoint(parseInt(t2, 16)) : e2.text;
913
914
  }
914
915
  const J = { ":)": "1f642", ":o": "1f62e", ":]": "1f60f", ":d": "1f600", xd: "1f61d", ":p": "1f61c", ":@": "1f621", ":[": "1f621", ":(": "1f626", ":'(": "1f62d", ":’(": "1f62d", ":*": "1f618", ":/": "1f614", ":s": "1f616", ":|": "1f633", ":$": "263a", ":x": "1f637", "<3": "2764", "</3": "1f494" }, Y = { ":thumbsup:": "1f44d", ":thumbsdown:": "1f44e", ":poop:": "1f4a9" };
915
- var Q, K = {};
916
- function V(e2, t2) {
916
+ var Q, V = {};
917
+ function Z(e2, t2) {
917
918
  const s2 = t2.lastIndex;
918
919
  let n2;
919
920
  const r2 = [];
920
921
  for (; null !== (n2 = t2.exec(e2)); ) r2.push(n2);
921
922
  return t2.lastIndex = s2, r2;
922
923
  }
923
- function Z(e2) {
924
+ function K(e2) {
924
925
  const t2 = e2.replace(/%2F/g, "/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/, "$1");
925
926
  return decodeURIComponent(t2);
926
927
  }
@@ -930,16 +931,16 @@ function X(e2, t2) {
930
931
  }
931
932
  }
932
933
  !function() {
933
- if (Q) return K;
934
+ if (Q) return V;
934
935
  function e2(e3) {
935
936
  return String.fromCharCode(parseInt(e3.slice(1), 16));
936
937
  }
937
938
  function t2(e3) {
938
939
  return `%${`00${e3.charCodeAt(0).toString(16)}`.slice(-2)}`;
939
940
  }
940
- Q = 1, Object.defineProperty(K, "__esModule", { value: true }), K.encode = function(t3) {
941
+ Q = 1, Object.defineProperty(V, "__esModule", { value: true }), V.encode = function(t3) {
941
942
  return btoa(encodeURIComponent(t3).replace(/%[0-9A-F]{2}/g, e2));
942
- }, K.decode = function(e3) {
943
+ }, V.decode = function(e3) {
943
944
  return decodeURIComponent(Array.from(atob(e3), t2).join(""));
944
945
  };
945
946
  }(), ((e2) => {
@@ -1003,15 +1004,15 @@ function ie(e2, t2) {
1003
1004
  }(t4);
1004
1005
  return ae(e5, s3);
1005
1006
  }(e4.children, t3);
1006
- if ("file" === e4.type && "video" === e4.subtype) return `🎥 ${Z(e4.url)}`;
1007
- if ("file" === e4.type && "image" === e4.subtype) return `📷 ${Z(e4.url)}`;
1008
- if ("file" === e4.type && "audio" === e4.subtype) return `🎧 ${Z(e4.url)}`;
1007
+ if ("file" === e4.type && "video" === e4.subtype) return `🎥 ${K(e4.url)}`;
1008
+ if ("file" === e4.type && "image" === e4.subtype) return `📷 ${K(e4.url)}`;
1009
+ if ("file" === e4.type && "audio" === e4.subtype) return `🎧 ${K(e4.url)}`;
1009
1010
  if ("file" === e4.type && "voice" === e4.subtype) {
1010
1011
  const t4 = e4.duration;
1011
1012
  if (void 0 === t4) return "🎙️";
1012
1013
  return `🎙️ (${Math.floor(t4 / 60)}:${Math.floor(t4 % 60).toString().padStart(2, "0")})`;
1013
1014
  }
1014
- if ("file" === e4.type) return e4.subtype, `📎 ${Z(e4.url)}`;
1015
+ if ("file" === e4.type) return e4.subtype, `📎 ${K(e4.url)}`;
1015
1016
  if ("location" === e4.type) return "📍";
1016
1017
  return "";
1017
1018
  }(e3, t2));
@@ -1097,7 +1098,7 @@ class oe extends $ {
1097
1098
  messageEdited(e2, t2) {
1098
1099
  this.mutate(e2, (s2) => {
1099
1100
  if (null === s2.value.data) return s2;
1100
- return c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: s2.value.data.referencedMessageId, editedAt: N(s2.value.data.editedAt, t2.diff.editedAt), custom: P(s2.value.data.custom, t2.diff.custom), content: N(s2.value.data.content, t2.diff.content) } });
1101
+ return c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: s2.value.data.referencedMessageId, editedAt: P(s2.value.data.editedAt, t2.diff.editedAt), custom: O(s2.value.data.custom, t2.diff.custom), content: P(s2.value.data.content, t2.diff.content) } });
1101
1102
  });
1102
1103
  }
1103
1104
  messageDeleted(e2, t2) {
@@ -1353,11 +1354,11 @@ class pe extends W {
1353
1354
  }
1354
1355
  function fe(e2, t2) {
1355
1356
  const s2 = t2;
1356
- return { id: e2.id, createdAt: e2.createdAt, subject: N(e2.subject, s2.subject), photoUrl: N(e2.photoUrl, s2.photoUrl), welcomeMessages: N(e2.welcomeMessages, s2.welcomeMessages), custom: P(e2.custom, s2.custom), lastMessageAt: N(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: N(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: N(e2.isUnread, s2.isUnread), access: N(e2.access, s2.access), notify: N(e2.notify, s2.notify), readUntil: N(e2.readUntil, s2.readUntil), joinedAt: e2.joinedAt };
1357
+ return { id: e2.id, createdAt: e2.createdAt, subject: P(e2.subject, s2.subject), photoUrl: P(e2.photoUrl, s2.photoUrl), welcomeMessages: P(e2.welcomeMessages, s2.welcomeMessages), custom: O(e2.custom, s2.custom), lastMessageAt: P(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: P(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: P(e2.isUnread, s2.isUnread), access: P(e2.access, s2.access), notify: P(e2.notify, s2.notify), readUntil: P(e2.readUntil, s2.readUntil), joinedAt: e2.joinedAt };
1357
1358
  }
1358
1359
  class me {
1359
1360
  constructor(e2, t2, s2) {
1360
- this.realtimeClient = s2, this.userStores = {}, this.messageWindowStores = {}, this.conversationStores = {}, this.emitMutex = new j(), this.seqOffset = 0, this.seqInThisConnection = 0, this.refetchOnNextNetworkLoss = true, this.connection = new O(e2, t2, { onUpstreamRestarting: () => {
1361
+ this.realtimeClient = s2, this.userStores = {}, this.messageWindowStores = {}, this.conversationStores = {}, this.emitMutex = new j(), this.seqOffset = 0, this.seqInThisConnection = 0, this.refetchOnNextNetworkLoss = true, this.connection = new _(e2, t2, { onUpstreamRestarting: () => {
1361
1362
  this.refetchOnNextNetworkLoss = false;
1362
1363
  }, onReady: () => {
1363
1364
  this.refetchOnNextNetworkLoss = true;
@@ -1667,7 +1668,7 @@ function be(e2, s2) {
1667
1668
  if (s2.ok) return s2.value;
1668
1669
  throw "SESSION_DESTROYED" === s2.value ? new Error(`${e2} failed because the session was destroyed`) : new Error(t((_a2 = s2.value.operation) != null ? _a2 : e2, s2.value));
1669
1670
  }
1670
- class ye {
1671
+ class we {
1671
1672
  constructor(e2, t2) {
1672
1673
  this.id = e2, this._realtimeClient = t2;
1673
1674
  }
@@ -1698,7 +1699,7 @@ class ye {
1698
1699
  return this._realtimeClient.subscribe(["users", this.brandedId], e2);
1699
1700
  }
1700
1701
  }
1701
- class we {
1702
+ class ye {
1702
1703
  constructor(e2, t2, s2) {
1703
1704
  this.userId = e2, this.conversationId = t2, this._realtimeClient = s2;
1704
1705
  }
@@ -1800,7 +1801,7 @@ function Ee(e2, t2) {
1800
1801
  const n2 = s2;
1801
1802
  let r2 = 0;
1802
1803
  const i2 = [];
1803
- for (const a2 of V(s2, e2)) {
1804
+ for (const a2 of Z(s2, e2)) {
1804
1805
  a2.index - r2 > 0 && i2.push(n2.substring(r2, a2.index));
1805
1806
  const e3 = t2(a2);
1806
1807
  Array.isArray(e3) ? i2.push(...e3) : i2.push(e3), r2 = a2.index + a2[0].length;
@@ -1810,18 +1811,18 @@ function Ee(e2, t2) {
1810
1811
  }
1811
1812
  const ke = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1812
1813
  var xe = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(xe || {});
1813
- const Te = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
1814
+ const Se = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
1814
1815
  const t2 = [];
1815
1816
  return 1 & e2 || t2.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/), 2 & e2 || t2.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/), 4 & e2 || t2.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/), new RegExp(t2.map((e3) => e3.source).join("|"), "g");
1816
- }), Se = { _: 1, "*": 4, "~": 2 };
1817
+ }), Te = { _: 1, "*": 4, "~": 2 };
1817
1818
  function De(e2) {
1818
1819
  return Ie(e2, 0);
1819
1820
  }
1820
1821
  function Ie(e2, t2 = 0) {
1821
- const s2 = Te[t2], n2 = s2 ? function(e3) {
1822
+ const s2 = Se[t2], n2 = s2 ? function(e3) {
1822
1823
  const t3 = Fe.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${ke}])(?:${e3.source})(?=[\\s${ke}]|$)`, "g")), s3 = Ee(t3, (e4) => {
1823
1824
  const t4 = e4[0][1], s4 = e4[1] || e4[2] || e4[3] || e4[4] || e4[5] || e4[6];
1824
- return [" ", { type: xe[Se[t4]], children: [s4] }];
1825
+ return [" ", { type: xe[Te[t4]], children: [s4] }];
1825
1826
  });
1826
1827
  return (e4) => {
1827
1828
  const [t4, ...n3] = s3(" " + e4);
@@ -1857,7 +1858,7 @@ function Me(e2, t2) {
1857
1858
  function Re(e2) {
1858
1859
  throw new Error("Unhandled case for value: '" + e2 + "'");
1859
1860
  }
1860
- var _e = function() {
1861
+ var Ne = function() {
1861
1862
  function e2(e3) {
1862
1863
  void 0 === e3 && (e3 = {}), this.tagName = "", this.attrs = {}, this.innerHTML = "", this.whitespaceRegex = /\s+/, this.tagName = e3.tagName || "", this.attrs = e3.attrs || {}, this.innerHTML = e3.innerHtml || e3.innerHTML || "";
1863
1864
  }
@@ -1906,12 +1907,12 @@ var _e = function() {
1906
1907
  return t2.join(" ");
1907
1908
  }, e2;
1908
1909
  }();
1909
- var Oe = function() {
1910
+ var _e = function() {
1910
1911
  function e2(e3) {
1911
1912
  void 0 === e3 && (e3 = {}), this.newWindow = false, this.truncate = {}, this.className = "", this.newWindow = e3.newWindow || false, this.truncate = e3.truncate || {}, this.className = e3.className || "";
1912
1913
  }
1913
1914
  return e2.prototype.build = function(e3) {
1914
- return new _e({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
1915
+ return new Ne({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
1915
1916
  }, e2.prototype.createAttrs = function(e3) {
1916
1917
  var t2 = { href: e3.getAnchorHref() }, s2 = this.createCssClass(e3);
1917
1918
  return s2 && (t2.class = s2), this.newWindow && (t2.target = "_blank", t2.rel = "noopener noreferrer"), this.truncate && this.truncate.length && this.truncate.length < e3.getAnchorText().length && (t2.title = e3.getAnchorHref()), t2;
@@ -1981,7 +1982,7 @@ var Oe = function() {
1981
1982
  }(e4, t3, s3);
1982
1983
  }(e3, s2);
1983
1984
  }, e2;
1984
- }(), Ne = function() {
1985
+ }(), Pe = function() {
1985
1986
  function e2(e3) {
1986
1987
  this.__jsduckDummyDocProp = null, this.matchedText = "", this.offset = 0, this.tagBuilder = e3.tagBuilder, this.matchedText = e3.matchedText, this.offset = e3.offset;
1987
1988
  }
@@ -1996,18 +1997,18 @@ var Oe = function() {
1996
1997
  }, e2.prototype.buildTag = function() {
1997
1998
  return this.tagBuilder.build(this);
1998
1999
  }, e2;
1999
- }(), Pe = function(e2, t2) {
2000
- return Pe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2000
+ }(), Oe = function(e2, t2) {
2001
+ return Oe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2001
2002
  e3.__proto__ = t3;
2002
2003
  } || function(e3, t3) {
2003
2004
  for (var s2 in t3) t3.hasOwnProperty(s2) && (e3[s2] = t3[s2]);
2004
- }, Pe(e2, t2);
2005
+ }, Oe(e2, t2);
2005
2006
  };
2006
2007
  function Ue(e2, t2) {
2007
2008
  function s2() {
2008
2009
  this.constructor = e2;
2009
2010
  }
2010
- Pe(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2011
+ Oe(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2011
2012
  }
2012
2013
  var je, $e = function() {
2013
2014
  return $e = Object.assign || function(e2) {
@@ -2028,7 +2029,7 @@ var je, $e = function() {
2028
2029
  }, t2.prototype.getAnchorText = function() {
2029
2030
  return this.email;
2030
2031
  }, t2;
2031
- }(Ne), qe = function(e2) {
2032
+ }(Pe), qe = function(e2) {
2032
2033
  function t2(t3) {
2033
2034
  var s2 = e2.call(this, t3) || this;
2034
2035
  return s2.serviceName = "", s2.hashtag = "", s2.serviceName = t3.serviceName, s2.hashtag = t3.hashtag, s2;
@@ -2054,7 +2055,7 @@ var je, $e = function() {
2054
2055
  }, t2.prototype.getAnchorText = function() {
2055
2056
  return "#" + this.hashtag;
2056
2057
  }, t2;
2057
- }(Ne), He = function(e2) {
2058
+ }(Pe), He = function(e2) {
2058
2059
  function t2(t3) {
2059
2060
  var s2 = e2.call(this, t3) || this;
2060
2061
  return s2.serviceName = "twitter", s2.mention = "", s2.mention = t3.mention, s2.serviceName = t3.serviceName, s2;
@@ -2082,7 +2083,7 @@ var je, $e = function() {
2082
2083
  var t3 = e2.prototype.getCssClassSuffixes.call(this), s2 = this.getServiceName();
2083
2084
  return s2 && t3.push(s2), t3;
2084
2085
  }, t2;
2085
- }(Ne), Le = function(e2) {
2086
+ }(Pe), Ge = function(e2) {
2086
2087
  function t2(t3) {
2087
2088
  var s2 = e2.call(this, t3) || this;
2088
2089
  return s2.number = "", s2.plusSign = false, s2.number = t3.number, s2.plusSign = t3.plusSign, s2;
@@ -2098,7 +2099,7 @@ var je, $e = function() {
2098
2099
  }, t2.prototype.getAnchorText = function() {
2099
2100
  return this.matchedText;
2100
2101
  }, t2;
2101
- }(Ne), Ge = function(e2) {
2102
+ }(Pe), Le = function(e2) {
2102
2103
  function t2(t3) {
2103
2104
  var s2 = e2.call(this, t3) || this;
2104
2105
  return s2.url = "", s2.urlMatchType = "scheme", s2.protocolUrlMatch = false, s2.protocolRelativeMatch = false, s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.schemePrefixRegex = /^(https?:\/\/)?/i, s2.wwwPrefixRegex = /^(https?:\/\/)?(www\.)?/i, s2.protocolRelativeRegex = /^\/\//, s2.protocolPrepended = false, s2.urlMatchType = t3.urlMatchType, s2.url = t3.url, s2.protocolUrlMatch = t3.protocolUrlMatch, s2.protocolRelativeMatch = t3.protocolRelativeMatch, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
@@ -2131,9 +2132,9 @@ var je, $e = function() {
2131
2132
  return t3;
2132
2133
  }
2133
2134
  }, t2;
2134
- }(Ne), ze = function(e2) {
2135
+ }(Pe), ze = function(e2) {
2135
2136
  this.__jsduckDummyDocProp = null, this.tagBuilder = e2.tagBuilder;
2136
- }, Je = /[A-Za-z]/, Ye = /[\d]/, Qe = /[\D]/, Ke = /\s/, Ve = /['"]/, Ze = /[\x00-\x1F\x7F]/, Xe = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, et = Xe + /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source + /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, tt = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, st = et + tt, nt = et + tt, rt = "(?:[" + tt + "]{1,3}\\.){3}[" + tt + "]{1,3}", it = "[" + nt + "](?:[" + nt + "\\-]{0,61}[" + nt + "])?", at = function(e2) {
2137
+ }, Je = /[A-Za-z]/, Ye = /[\d]/, Qe = /[\D]/, Ve = /\s/, Ze = /['"]/, Ke = /[\x00-\x1F\x7F]/, Xe = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, et = Xe + /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source + /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, tt = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, st = et + tt, nt = et + tt, rt = "(?:[" + tt + "]{1,3}\\.){3}[" + tt + "]{1,3}", it = "[" + nt + "](?:[" + nt + "\\-]{0,61}[" + nt + "])?", at = function(e2) {
2137
2138
  return "(?=(" + it + "))\\" + e2;
2138
2139
  }, ot = function(e2) {
2139
2140
  return "(?:" + at(e2) + "(?:\\." + at(e2 + 1) + "){0,126}|" + rt + ")";
@@ -2168,7 +2169,7 @@ var je, $e = function() {
2168
2169
  b2(h2);
2169
2170
  break;
2170
2171
  case 7:
2171
- y2(h2);
2172
+ w2(h2);
2172
2173
  break;
2173
2174
  default:
2174
2175
  Re(c2);
@@ -2177,7 +2178,7 @@ var je, $e = function() {
2177
2178
  }
2178
2179
  return C2(), r2;
2179
2180
  function d2(e4) {
2180
- "m" === e4 ? w2(1) : s2.test(e4) && w2();
2181
+ "m" === e4 ? y2(1) : s2.test(e4) && y2();
2181
2182
  }
2182
2183
  function p2(e4, t4) {
2183
2184
  ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new pt($e($e({}, l2), { hasMailtoPrefix: true }))) : A2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : A2());
@@ -2197,10 +2198,10 @@ var je, $e = function() {
2197
2198
  function b2(e4) {
2198
2199
  "-" === e4 || "." === e4 ? C2() : ut.test(e4) ? c2 = 5 : C2();
2199
2200
  }
2200
- function y2(e4) {
2201
+ function w2(e4) {
2201
2202
  "." === e4 || "-" === e4 ? C2() : ut.test(e4) ? (c2 = 5, l2 = new pt($e($e({}, l2), { hasDomainDot: true }))) : C2();
2202
2203
  }
2203
- function w2(e4) {
2204
+ function y2(e4) {
2204
2205
  void 0 === e4 && (e4 = 2), c2 = e4, l2 = new pt({ idx: u2 });
2205
2206
  }
2206
2207
  function A2() {
@@ -2263,8 +2264,8 @@ var je, $e = function() {
2263
2264
  var b2 = s3.indexOf(v2);
2264
2265
  s3 = s3.substr(b2), u3 = u3.substr(b2), p2 += b2;
2265
2266
  }
2266
- var y2 = u3 ? "scheme" : l2 ? "www" : "tld", w2 = !!u3;
2267
- o2.push(new Ge({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: y2, url: s3, protocolUrlMatch: w2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2267
+ var w2 = u3 ? "scheme" : l2 ? "www" : "tld", y2 = !!u3;
2268
+ o2.push(new Le({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: w2, url: s3, protocolUrlMatch: y2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2268
2269
  }, c2 = this; null !== (t3 = s2.exec(e3)); ) u2();
2269
2270
  return o2;
2270
2271
  }, t2.prototype.matchHasUnbalancedClosingParen = function(e3) {
@@ -2287,10 +2288,10 @@ var je, $e = function() {
2287
2288
  var n2 = new RegExp("^((.?//)?[-." + nt + "]*[-" + nt + "]\\.[-" + nt + "]+)").exec(e3);
2288
2289
  return null === n2 ? -1 : (s2 += n2[1].length, e3 = e3.slice(n2[1].length), /^[^-.A-Za-z0-9:\/?#]/.test(e3) ? s2 : -1);
2289
2290
  }, t2;
2290
- }(ze), bt = new RegExp("#[_" + nt + "]{1,139}(?![_" + nt + "])", "g"), yt = new RegExp("[^" + nt + "]"), wt = function(e2) {
2291
+ }(ze), bt = new RegExp("#[_" + nt + "]{1,139}(?![_" + nt + "])", "g"), wt = new RegExp("[^" + nt + "]"), yt = function(e2) {
2291
2292
  function t2(t3) {
2292
2293
  var s2 = e2.call(this, t3) || this;
2293
- return s2.serviceName = "twitter", s2.matcherRegex = bt, s2.nonWordCharRegex = yt, s2.serviceName = t3.serviceName, s2;
2294
+ return s2.serviceName = "twitter", s2.matcherRegex = bt, s2.nonWordCharRegex = wt, s2.serviceName = t3.serviceName, s2;
2294
2295
  }
2295
2296
  return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2296
2297
  for (var t3, s2 = this.matcherRegex, n2 = this.nonWordCharRegex, r2 = this.serviceName, i2 = this.tagBuilder, a2 = []; null !== (t3 = s2.exec(e3)); ) {
@@ -2310,16 +2311,16 @@ var je, $e = function() {
2310
2311
  return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2311
2312
  for (var t3, s2 = this.matcherRegex, n2 = this.tagBuilder, r2 = []; null !== (t3 = s2.exec(e3)); ) {
2312
2313
  var i2 = t3[0], a2 = i2.replace(/[^0-9,;#]/g, ""), o2 = !(!t3[1] && !t3[2]), u2 = 0 == t3.index ? "" : e3.substr(t3.index - 1, 1), c2 = e3.substr(t3.index + i2.length, 1), l2 = !u2.match(/\d/) && !c2.match(/\d/);
2313
- this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new Le({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2314
+ this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new Ge({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2314
2315
  }
2315
2316
  return r2;
2316
2317
  }, t2.prototype.testMatch = function(e3) {
2317
2318
  return Qe.test(e3);
2318
2319
  }, t2;
2319
- }(ze), Et = new RegExp("@[_" + nt + "]{1,50}(?![_" + nt + "])", "g"), kt = new RegExp("@[_." + nt + "]{1,30}(?![_" + nt + "])", "g"), xt = new RegExp("@[-_." + nt + "]{1,50}(?![-_" + nt + "])", "g"), Tt = new RegExp("[^" + nt + "]"), St = function(e2) {
2320
+ }(ze), Et = new RegExp("@[_" + nt + "]{1,50}(?![_" + nt + "])", "g"), kt = new RegExp("@[_." + nt + "]{1,30}(?![_" + nt + "])", "g"), xt = new RegExp("@[-_." + nt + "]{1,50}(?![-_" + nt + "])", "g"), St = new RegExp("[^" + nt + "]"), Tt = function(e2) {
2320
2321
  function t2(t3) {
2321
2322
  var s2 = e2.call(this, t3) || this;
2322
- return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Et, instagram: kt, soundcloud: xt }, s2.nonWordCharRegex = Tt, s2.serviceName = t3.serviceName, s2;
2323
+ return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Et, instagram: kt, soundcloud: xt }, s2.nonWordCharRegex = St, s2.serviceName = t3.serviceName, s2;
2323
2324
  }
2324
2325
  return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2325
2326
  var t3, s2 = this.serviceName, n2 = this.matcherRegexes[this.serviceName], r2 = this.nonWordCharRegex, i2 = this.tagBuilder, a2 = [];
@@ -2351,10 +2352,10 @@ function Dt(e2, t2) {
2351
2352
  v2(f2);
2352
2353
  break;
2353
2354
  case 4:
2354
- y2(f2);
2355
+ w2(f2);
2355
2356
  break;
2356
2357
  case 5:
2357
- w2(f2);
2358
+ y2(f2);
2358
2359
  break;
2359
2360
  case 6:
2360
2361
  A2(f2);
@@ -2372,10 +2373,10 @@ function Dt(e2, t2) {
2372
2373
  x2(f2);
2373
2374
  break;
2374
2375
  case 11:
2375
- T2(f2);
2376
+ S2(f2);
2376
2377
  break;
2377
2378
  case 12:
2378
- S2(f2);
2379
+ T2(f2);
2379
2380
  break;
2380
2381
  case 13:
2381
2382
  D2();
@@ -2396,10 +2397,10 @@ function Dt(e2, t2) {
2396
2397
  R2(f2);
2397
2398
  break;
2398
2399
  case 19:
2399
- _2(f2);
2400
+ N2(f2);
2400
2401
  break;
2401
2402
  case 20:
2402
- O2(f2);
2403
+ _2(f2);
2403
2404
  break;
2404
2405
  default:
2405
2406
  Re(h2);
@@ -2407,28 +2408,28 @@ function Dt(e2, t2) {
2407
2408
  c2++;
2408
2409
  }
2409
2410
  function m2(e3) {
2410
- "<" === e3 && P2();
2411
+ "<" === e3 && O2();
2411
2412
  }
2412
2413
  function g2(e3) {
2413
- "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new It($e($e({}, p2), { isClosing: true }))) : "<" === e3 ? P2() : Je.test(e3) ? (h2 = 3, p2 = new It($e($e({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2414
+ "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new It($e($e({}, p2), { isClosing: true }))) : "<" === e3 ? O2() : Je.test(e3) ? (h2 = 3, p2 = new It($e($e({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2414
2415
  }
2415
2416
  function v2(e3) {
2416
- Ke.test(e3) ? (p2 = new It($e($e({}, p2), { name: j2() })), h2 = 4) : "<" === e3 ? P2() : "/" === e3 ? (p2 = new It($e($e({}, p2), { name: j2() })), h2 = 12) : ">" === e3 ? (p2 = new It($e($e({}, p2), { name: j2() })), U2()) : Je.test(e3) || Ye.test(e3) || ":" === e3 || N2();
2417
+ Ve.test(e3) ? (p2 = new It($e($e({}, p2), { name: j2() })), h2 = 4) : "<" === e3 ? O2() : "/" === e3 ? (p2 = new It($e($e({}, p2), { name: j2() })), h2 = 12) : ">" === e3 ? (p2 = new It($e($e({}, p2), { name: j2() })), U2()) : Je.test(e3) || Ye.test(e3) || ":" === e3 || P2();
2417
2418
  }
2418
2419
  function b2(e3) {
2419
- ">" === e3 ? N2() : Je.test(e3) ? h2 = 3 : N2();
2420
- }
2421
- function y2(e3) {
2422
- Ke.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? P2() : "=" === e3 || Ve.test(e3) || Ze.test(e3) ? N2() : h2 = 5);
2420
+ ">" === e3 ? P2() : Je.test(e3) ? h2 = 3 : P2();
2423
2421
  }
2424
2422
  function w2(e3) {
2425
- Ke.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? P2() : Ve.test(e3) && N2();
2423
+ Ve.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : "=" === e3 || Ze.test(e3) || Ke.test(e3) ? P2() : h2 = 5);
2424
+ }
2425
+ function y2(e3) {
2426
+ Ve.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : Ze.test(e3) && P2();
2426
2427
  }
2427
2428
  function A2(e3) {
2428
- Ke.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? P2() : Ve.test(e3) ? N2() : h2 = 5);
2429
+ Ve.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : Ze.test(e3) ? P2() : h2 = 5);
2429
2430
  }
2430
2431
  function C2(e3) {
2431
- Ke.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? N2() : "<" === e3 ? P2() : h2 = 10);
2432
+ Ve.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? P2() : "<" === e3 ? O2() : h2 = 10);
2432
2433
  }
2433
2434
  function E2(e3) {
2434
2435
  '"' === e3 && (h2 = 11);
@@ -2437,22 +2438,22 @@ function Dt(e2, t2) {
2437
2438
  "'" === e3 && (h2 = 11);
2438
2439
  }
2439
2440
  function x2(e3) {
2440
- Ke.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && P2();
2441
- }
2442
- function T2(e3) {
2443
- Ke.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? P2() : (h2 = 4, c2--);
2441
+ Ve.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && O2();
2444
2442
  }
2445
2443
  function S2(e3) {
2444
+ Ve.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : (h2 = 4, c2--);
2445
+ }
2446
+ function T2(e3) {
2446
2447
  ">" === e3 ? (p2 = new It($e($e({}, p2), { isClosing: true })), U2()) : h2 = 4;
2447
2448
  }
2448
2449
  function D2(t3) {
2449
- "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new It($e($e({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new It($e($e({}, p2), { type: "doctype" })), h2 = 20) : N2();
2450
+ "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new It($e($e({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new It($e($e({}, p2), { type: "doctype" })), h2 = 20) : P2();
2450
2451
  }
2451
2452
  function I2(e3) {
2452
- "-" === e3 ? h2 = 15 : ">" === e3 ? N2() : h2 = 16;
2453
+ "-" === e3 ? h2 = 15 : ">" === e3 ? P2() : h2 = 16;
2453
2454
  }
2454
2455
  function F2(e3) {
2455
- "-" === e3 ? h2 = 18 : ">" === e3 ? N2() : h2 = 16;
2456
+ "-" === e3 ? h2 = 18 : ">" === e3 ? P2() : h2 = 16;
2456
2457
  }
2457
2458
  function B2(e3) {
2458
2459
  "-" === e3 && (h2 = 17);
@@ -2463,21 +2464,21 @@ function Dt(e2, t2) {
2463
2464
  function R2(e3) {
2464
2465
  ">" === e3 ? U2() : "!" === e3 ? h2 = 19 : "-" === e3 || (h2 = 16);
2465
2466
  }
2466
- function _2(e3) {
2467
+ function N2(e3) {
2467
2468
  "-" === e3 ? h2 = 17 : ">" === e3 ? U2() : h2 = 16;
2468
2469
  }
2469
- function O2(e3) {
2470
- ">" === e3 ? U2() : "<" === e3 && P2();
2470
+ function _2(e3) {
2471
+ ">" === e3 ? U2() : "<" === e3 && O2();
2471
2472
  }
2472
- function N2() {
2473
+ function P2() {
2473
2474
  h2 = 0, p2 = u2;
2474
2475
  }
2475
- function P2() {
2476
+ function O2() {
2476
2477
  h2 = 1, p2 = new It({ idx: c2 });
2477
2478
  }
2478
2479
  function U2() {
2479
2480
  var t3 = e2.slice(d2, p2.idx);
2480
- t3 && i2(t3, d2), "comment" === p2.type ? a2(p2.idx) : "doctype" === p2.type ? o2(p2.idx) : (p2.isOpening && n2(p2.name, p2.idx), p2.isClosing && r2(p2.name, p2.idx)), N2(), d2 = c2 + 1;
2481
+ t3 && i2(t3, d2), "comment" === p2.type ? a2(p2.idx) : "doctype" === p2.type ? o2(p2.idx) : (p2.isOpening && n2(p2.name, p2.idx), p2.isClosing && r2(p2.name, p2.idx)), P2(), d2 = c2 + 1;
2481
2482
  }
2482
2483
  function j2() {
2483
2484
  var t3 = p2.idx + (p2.isClosing ? 2 : 1);
@@ -2582,15 +2583,15 @@ var It = function(e2) {
2582
2583
  return s2.push(e3.substring(n2)), s2.join("");
2583
2584
  }, e2.prototype.createMatchReturnVal = function(e3) {
2584
2585
  var t2;
2585
- return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof _e ? t2.toAnchorString() : e3.buildTag().toAnchorString();
2586
+ return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Ne ? t2.toAnchorString() : e3.buildTag().toAnchorString();
2586
2587
  }, e2.prototype.getMatchers = function() {
2587
2588
  if (this.matchers) return this.matchers;
2588
- var e3 = this.getTagBuilder(), t2 = [new wt({ tagBuilder: e3, serviceName: this.hashtag }), new dt({ tagBuilder: e3 }), new Ct({ tagBuilder: e3 }), new St({ tagBuilder: e3, serviceName: this.mention }), new vt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
2589
+ var e3 = this.getTagBuilder(), t2 = [new yt({ tagBuilder: e3, serviceName: this.hashtag }), new dt({ tagBuilder: e3 }), new Ct({ tagBuilder: e3 }), new Tt({ tagBuilder: e3, serviceName: this.mention }), new vt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
2589
2590
  return this.matchers = t2;
2590
2591
  }, e2.prototype.getTagBuilder = function() {
2591
2592
  var e3 = this.tagBuilder;
2592
- return e3 || (e3 = this.tagBuilder = new Oe({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
2593
- }, e2.version = "3.14.3", e2.AnchorTagBuilder = Oe, e2.HtmlTag = _e, e2.matcher = { Email: dt, Hashtag: wt, Matcher: ze, Mention: St, Phone: Ct, Url: vt }, e2.match = { Email: We, Hashtag: qe, Match: Ne, Mention: He, Phone: Le, Url: Ge }, e2;
2593
+ return e3 || (e3 = this.tagBuilder = new _e({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
2594
+ }, e2.version = "3.14.3", e2.AnchorTagBuilder = _e, e2.HtmlTag = Ne, e2.matcher = { Email: dt, Hashtag: yt, Matcher: ze, Mention: Tt, Phone: Ct, Url: vt }, e2.match = { Email: We, Hashtag: qe, Match: Pe, Mention: He, Phone: Ge, Url: Le }, e2;
2594
2595
  }();
2595
2596
  function Bt(e2, t2 = e2) {
2596
2597
  return { type: "autolink", url: e2, text: t2 };
@@ -2602,20 +2603,20 @@ const Mt = Ee(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__
2602
2603
  return { type: "mention", id: e3, text: t3 };
2603
2604
  }(decodeURIComponent(t2), s2)), Rt = Ee(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
2604
2605
  return { type: "customemoji", text: e3 };
2605
- }(t2)), _t = Ee(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
2606
+ }(t2)), Nt = Ee(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
2606
2607
  return { type: "link", url: e3, children: t3 };
2607
- }(t2, [s2])), Ot = Ee(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2608
- const { action: n2, params: r2 } = Pt(t2);
2608
+ }(t2, [s2])), _t = Ee(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2609
+ const { action: n2, params: r2 } = Ot(t2);
2609
2610
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
2610
2611
  return { type: "actionlink", action: e3, params: t3, children: s3 };
2611
2612
  }(n2, r2, [s2]);
2612
- }), Nt = Ee(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2613
- const { action: n2, params: r2 } = Pt(t2);
2613
+ }), Pt = Ee(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2614
+ const { action: n2, params: r2 } = Ot(t2);
2614
2615
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
2615
2616
  return { type: "actionbutton", action: e3, params: t3, children: s3 };
2616
2617
  }(n2, r2, [s2]);
2617
2618
  });
2618
- function Pt(e2) {
2619
+ function Ot(e2) {
2619
2620
  const t2 = e2.indexOf("?");
2620
2621
  if (-1 === t2) return { action: e2, params: {} };
2621
2622
  return { action: e2.slice(0, t2), params: Object.fromEntries(new URLSearchParams(e2.slice(t2))) };
@@ -2626,37 +2627,37 @@ const Ut = Ee(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__
2626
2627
  const t2 = /(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;
2627
2628
  let s2 = 0;
2628
2629
  const n2 = [];
2629
- for (const r2 of V(e2, t2)) {
2630
+ for (const r2 of Z(e2, t2)) {
2630
2631
  const t3 = r2[0], i2 = r2[1], a2 = t3.startsWith(i2) ? r2.index : r2.index + 1;
2631
2632
  a2 - s2 > 0 && n2.push(e2.substring(s2, a2));
2632
2633
  const o2 = Bt("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
2633
2634
  n2.push(o2), s2 = a2 + i2.length;
2634
2635
  }
2635
2636
  return s2 < e2.length && n2.push(e2.substring(s2)), n2;
2636
- }, Wt = (e2) => _t(e2).flatMap((e3) => "string" == typeof e3 ? qt(e3) : ["<", ...qt(e3.url), ...qt("|" + e3.children[0] + ">")]), qt = (e2) => {
2637
+ }, Wt = (e2) => Nt(e2).flatMap((e3) => "string" == typeof e3 ? qt(e3) : ["<", ...qt(e3.url), ...qt("|" + e3.children[0] + ">")]), qt = (e2) => {
2637
2638
  const t2 = Ft.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
2638
2639
  let n2 = 0;
2639
2640
  for (const r2 of t2) {
2640
2641
  const t3 = r2.getOffset(), i2 = r2.getMatchedText(), a2 = i2.length;
2641
2642
  let o2 = i2;
2642
- r2 instanceof We ? o2 = "mailto:" + r2.getEmail() : r2 instanceof Ge && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Bt(o2, i2)), n2 = t3 + a2;
2643
+ r2 instanceof We ? o2 = "mailto:" + r2.getEmail() : r2 instanceof Le && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Bt(o2, i2)), n2 = t3 + a2;
2643
2644
  }
2644
2645
  return n2 < e2.length && s2.push(e2.substring(n2)), s2;
2645
2646
  }, Ht = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
2646
- function Lt(e2 = { except: [] }) {
2647
+ function Gt(e2 = { except: [] }) {
2647
2648
  var _a2;
2648
2649
  const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : Ht.filter((t3) => !e2.only.includes(t3));
2649
- return s2.includes("BulletPoint") || t2.multilineSteps.push(Ut, jt), s2.includes("Mention") || t2.singlelineSteps.push(Mt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Rt), s2.includes("Codespan") || t2.multilineSteps.push(Ee(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(_t), s2.includes("Actions") || (t2.singlelineSteps.push(Ot), t2.singlelineSteps.push(Nt)), s2.includes("Wikitext") || t2.singlelineSteps.push(De), s2.includes("Autolink") || t2.singlelineSteps.push(Wt, $t), t2;
2650
+ return s2.includes("BulletPoint") || t2.multilineSteps.push(Ut, jt), s2.includes("Mention") || t2.singlelineSteps.push(Mt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Rt), s2.includes("Codespan") || t2.multilineSteps.push(Ee(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Nt), s2.includes("Actions") || (t2.singlelineSteps.push(_t), t2.singlelineSteps.push(Pt)), s2.includes("Wikitext") || t2.singlelineSteps.push(De), s2.includes("Autolink") || t2.singlelineSteps.push(Wt, $t), t2;
2650
2651
  }
2651
- const Gt = function(e2) {
2652
+ const Lt = function(e2) {
2652
2653
  const t2 = RegExp(`[^${e2}]+${e2}?|${e2}`, "g");
2653
2654
  return (e3) => Array.from(e3.match(t2) || []);
2654
2655
  }("\n");
2655
2656
  function zt(e2, t2 = { except: [] }) {
2656
2657
  let s2 = function(e3, t3) {
2657
2658
  let s3 = [e3];
2658
- return s3 = Jt(s3, t3.multilineSteps), s3 = Jt(s3, [Gt]), s3 = Jt(s3, t3.singlelineSteps), s3 = Yt(s3), s3;
2659
- }(e2, Lt(t2));
2659
+ return s3 = Jt(s3, t3.multilineSteps), s3 = Jt(s3, [Lt]), s3 = Jt(s3, t3.singlelineSteps), s3 = Yt(s3), s3;
2660
+ }(e2, Gt(t2));
2660
2661
  return s2 = Qt(s2, false), s2;
2661
2662
  }
2662
2663
  function Jt(e2, t2) {
@@ -2677,7 +2678,7 @@ function Qt(e2, t2) {
2677
2678
  }
2678
2679
  return n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2;
2679
2680
  }
2680
- class Kt {
2681
+ class Vt {
2681
2682
  constructor(e2, t2, s2) {
2682
2683
  this.id = e2, this.conversationId = t2, this._realtimeClient = s2;
2683
2684
  }
@@ -2698,7 +2699,7 @@ class Kt {
2698
2699
  }
2699
2700
  edit(t2) {
2700
2701
  return __async(this, null, function* () {
2701
- const s2 = { content: Vt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
2702
+ const s2 = { content: Zt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
2702
2703
  e(`Edit message ${this.id} in conversation ${this.conversationId}`, n2);
2703
2704
  });
2704
2705
  }
@@ -2709,7 +2710,7 @@ class Kt {
2709
2710
  });
2710
2711
  }
2711
2712
  }
2712
- function Vt(e2) {
2713
+ function Zt(e2) {
2713
2714
  if ("string" == typeof e2) {
2714
2715
  return [{ type: "text", children: zt(e2) }];
2715
2716
  }
@@ -2718,7 +2719,7 @@ function Vt(e2) {
2718
2719
  }
2719
2720
  if ("content" in e2 && e2.content) return e2.content;
2720
2721
  }
2721
- class Zt {
2722
+ class Kt {
2722
2723
  constructor(e2, t2) {
2723
2724
  this.id = e2, this._realtimeClient = t2;
2724
2725
  }
@@ -2729,10 +2730,10 @@ class Zt {
2729
2730
  return this._realtimeClient.userId;
2730
2731
  }
2731
2732
  participant(e2) {
2732
- return new we("string" == typeof e2 ? e2 : e2.id, this.id, this._realtimeClient);
2733
+ return new ye("string" == typeof e2 ? e2 : e2.id, this.id, this._realtimeClient);
2733
2734
  }
2734
2735
  message(e2) {
2735
- return new Kt(e2, this.brandedId, this._realtimeClient);
2736
+ return new Vt(e2, this.brandedId, this._realtimeClient);
2736
2737
  }
2737
2738
  get() {
2738
2739
  return __async(this, null, function* () {
@@ -2782,7 +2783,7 @@ class Zt {
2782
2783
  send(t2) {
2783
2784
  return __async(this, null, function* () {
2784
2785
  const s2 = { content: Xt(t2), referencedMessageId: es(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: Ae((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
2785
- return new Kt("string" == typeof r2 ? r2 : r2.id, this.brandedId, this._realtimeClient);
2786
+ return new Vt("string" == typeof r2 ? r2 : r2.id, this.brandedId, this._realtimeClient);
2786
2787
  });
2787
2788
  }
2788
2789
  subscribeMessages(e2) {
@@ -2821,7 +2822,7 @@ class ts {
2821
2822
  function ss({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
2822
2823
  var _a2;
2823
2824
  (!r2 || r2 <= 0) && (r2 = 1);
2824
- const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-04-25T12:29:48.685Z" };
2825
+ const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-04-29T08:55:37.472Z" };
2825
2826
  s2 instanceof FormData || (u2["Content-Type"] = (_a2 = n2 == null ? void 0 : n2.contentType) != null ? _a2 : "application/json");
2826
2827
  return a(r2, () => __async(this, null, function* () {
2827
2828
  if (o2) {
@@ -2874,7 +2875,7 @@ const cs = rs.startsWith("app.talkjs.com");
2874
2875
  const ls = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
2875
2876
  } } : new class {
2876
2877
  constructor(e2) {
2877
- this._timeCreated = Date.now(), this._enabled = cs, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-04-25T12:29:48.685Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: window.location.href, referrer: document.referrer, userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: window.location.href, stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2025-04-25T12:29:48.685Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
2878
+ this._timeCreated = Date.now(), this._enabled = cs, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-04-29T08:55:37.472Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: window.location.href, referrer: document.referrer, userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: window.location.href, stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2025-04-29T08:55:37.472Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
2878
2879
  }
2879
2880
  setData({ appId: e2, meId: t2, sessionId: s2 }) {
2880
2881
  this._trackJSData.customer.userId = e2, this._trackJSData.customer.sessionId = `${e2}/${t2}`, this._trackJSData.customer.correlationId = s2;
@@ -2944,9 +2945,6 @@ class ds {
2944
2945
  } }), this.sessionExpiryWarningTimeoutId = void 0, i2 && (n2 || r2)) throw new Error("[TalkJS] If providing a signature for authentication, you must not provide a token or tokenFetcher.");
2945
2946
  n2 ? this.fetchToken(() => n2) : (r2 || (this.usingBokens = true, this.tokenFetcher = () => this.sendBokenRequest(e2, i2)), this.refreshToken());
2946
2947
  }
2947
- get shouldMountFrontendWithSignature() {
2948
- return this.usingBokens && this.requestInProgress;
2949
- }
2950
2948
  get canRefreshToken() {
2951
2949
  return this.usingBokens || !!this.tokenFetcher;
2952
2950
  }
@@ -3133,7 +3131,7 @@ class bs {
3133
3131
  void 0 !== e3.tokenFetcher && t3("function" == typeof e3.tokenFetcher, "The `tokenFetcher` property of TalkSession#constructor must be a function.");
3134
3132
  }(e2);
3135
3133
  const { appId: t2, userId: s2, token: n2, tokenFetcher: r2, signature: i2 } = e2;
3136
- this._appId = t2, this._apiUrls = e2.apiUrls ? new ts(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : fs, this._authProvider = new ds(this._apiUrls, t2, s2, n2, r2, i2), this._realtimeClient = new ge(this._apiUrls.getRealtimeWsUrl(t2, s2, "0.0.5", e2.clientBuild), s2, this._authProvider), this.currentUser = new ye(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3134
+ this._appId = t2, this._apiUrls = e2.apiUrls ? new ts(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : fs, this._authProvider = new ds(this._apiUrls, t2, s2, n2, r2, i2), this._realtimeClient = new ge(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.0.0", e2.clientBuild), s2, this._authProvider), this.currentUser = new we(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3137
3135
  console.error(`[TalkSession] ${e3}`);
3138
3136
  }), function(e3, t3, s3) {
3139
3137
  return __async(this, null, function* () {
@@ -3158,10 +3156,10 @@ class bs {
3158
3156
  }), { unsubscribe: () => t2.resolve("UNSUBSCRIBED") };
3159
3157
  }
3160
3158
  user(e2) {
3161
- return new ye(e2, this._realtimeClient);
3159
+ return new we(e2, this._realtimeClient);
3162
3160
  }
3163
3161
  conversation(e2) {
3164
- return new Zt(e2, this._realtimeClient);
3162
+ return new Kt(e2, this._realtimeClient);
3165
3163
  }
3166
3164
  terminate(e2) {
3167
3165
  gs.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
@@ -3170,22 +3168,22 @@ class bs {
3170
3168
  return this._realtimeClient.isConnected();
3171
3169
  }
3172
3170
  uploadFile(e2, t2) {
3173
- return ys(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3171
+ return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3174
3172
  }
3175
3173
  uploadImage(e2, t2) {
3176
- return ys(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3174
+ return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3177
3175
  }
3178
3176
  uploadVideo(e2, t2) {
3179
- return ys(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3177
+ return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3180
3178
  }
3181
3179
  uploadAudio(e2, t2) {
3182
- return ys(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3180
+ return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3183
3181
  }
3184
3182
  uploadVoice(e2, t2) {
3185
- return ys(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3183
+ return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3186
3184
  }
3187
3185
  }
3188
- function ys(_0, _1, _2, _3) {
3186
+ function ws(_0, _1, _2, _3) {
3189
3187
  return __async(this, arguments, function* (e2, t2, s2, { subtype: n2, filename: r2, width: i2, height: a2, duration: o2 }) {
3190
3188
  const u2 = new FormData();
3191
3189
  return u2.set("file", s2, r2), void 0 !== n2 && u2.set("subtype", n2), void 0 !== i2 && u2.set("width", i2.toString()), void 0 !== a2 && u2.set("height", a2.toString()), void 0 !== o2 && u2.set("duration", o2.toString()), ss({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {