@talkjs/core 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/talkSession.cjs +1 -1
- package/dist/talkSession.d.ts +9 -3
- package/dist/talkSession.js +745 -611
- package/package.json +1 -1
package/dist/talkSession.js
CHANGED
|
@@ -238,8 +238,8 @@ class b {
|
|
|
238
238
|
void 0 !== this.timeout && (clearTimeout(this.timeout), this.timeout = void 0);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
const
|
|
242
|
-
class
|
|
241
|
+
const w = "undefined" != typeof window ? (_a = window.queueMicrotask) != null ? _a : setTimeout : setTimeout;
|
|
242
|
+
class y {
|
|
243
243
|
constructor() {
|
|
244
244
|
this.i = -1;
|
|
245
245
|
}
|
|
@@ -252,7 +252,7 @@ class w {
|
|
|
252
252
|
}
|
|
253
253
|
class k {
|
|
254
254
|
constructor(e2, t2) {
|
|
255
|
-
this.handlers = t2, this.seqCounter = new
|
|
255
|
+
this.handlers = t2, this.seqCounter = new y(), this.responseHandlers = {}, this.heartbeats = new S(this), this.socket = new v(e2, { onUpstreamRestarting: () => {
|
|
256
256
|
this.heartbeats.serverActive(), this.handlers.onUpstreamRestarting();
|
|
257
257
|
}, onOpen: () => {
|
|
258
258
|
this.heartbeats.clientActive(), this.heartbeats.serverActive(), this.handlers.onReady();
|
|
@@ -270,7 +270,7 @@ class k {
|
|
|
270
270
|
}
|
|
271
271
|
sync() {
|
|
272
272
|
return __async(this, null, function* () {
|
|
273
|
-
yield new Promise((e3) =>
|
|
273
|
+
yield new Promise((e3) => w(() => e3()));
|
|
274
274
|
const e2 = Object.values(this.responseHandlers).map((e3) => e3.promise.catch(() => {
|
|
275
275
|
}));
|
|
276
276
|
return Promise.all(e2);
|
|
@@ -303,7 +303,7 @@ class k {
|
|
|
303
303
|
this.socket.terminate();
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
class
|
|
306
|
+
class S {
|
|
307
307
|
constructor(e2) {
|
|
308
308
|
this.connection = e2, this.clientInactivityTimer = new b(25e3), this.serverInactivityTimer = new b(1e4), this.serverTimeoutTimer = new b(5e3);
|
|
309
309
|
}
|
|
@@ -327,7 +327,7 @@ class C {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
class
|
|
330
|
+
class C {
|
|
331
331
|
constructor(e2, t2, s2) {
|
|
332
332
|
this.authProvider = t2, this.handlers = s2, this.stateMachine = new i("AuthenticatedConnection", ["WAITING_FOR_WS", "LOGGING_IN", "RENEWING_SESSION", "READY", "TERMINATED"], { logIn: { from: ["WAITING_FOR_WS"], to: "LOGGING_IN", afterTransition: () => __async(this, null, function* () {
|
|
333
333
|
yield this.renewSession();
|
|
@@ -378,9 +378,13 @@ class T {
|
|
|
378
378
|
}
|
|
379
379
|
renewSession() {
|
|
380
380
|
return __async(this, null, function* () {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
381
|
+
let e2;
|
|
382
|
+
try {
|
|
383
|
+
const t3 = this.authProvider.getCachedToken();
|
|
384
|
+
e2 = t3 || (yield this.authProvider.getToken());
|
|
385
|
+
} catch (e3) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
384
388
|
const t2 = yield this.connection.call({ method: "POST", path: ["session", "renew"], data: { token: e2 }, headers: {} });
|
|
385
389
|
if (!t2.ok && "client" === t2.where) return;
|
|
386
390
|
const s2 = t2.value;
|
|
@@ -399,7 +403,7 @@ class T {
|
|
|
399
403
|
});
|
|
400
404
|
}
|
|
401
405
|
}
|
|
402
|
-
class
|
|
406
|
+
class T {
|
|
403
407
|
constructor(e2, t2, s2) {
|
|
404
408
|
this.handlers = s2, this.stateMachine = new i("StopStartConnection", ["STOPPED", "WAITING_FOR_WS", "READY", "TERMINATED"], { unexpectedDisconnect: { from: ["READY"], to: "WAITING_FOR_WS", afterTransition: () => {
|
|
405
409
|
this.inactivityTimer.stop(), this.handlers.onNotReady();
|
|
@@ -413,7 +417,7 @@ class I {
|
|
|
413
417
|
}), this.handlers.onReady();
|
|
414
418
|
} }, destroy: { from: "ANY", to: "TERMINATED", afterTransition: () => {
|
|
415
419
|
this.inactivityTimer.stop(), this.connection.destroy();
|
|
416
|
-
} } }), this.pendingCalls = 0, this.activeSubscriptions = 0, this.inactivityTimer = new b(3e3), this.connection = new
|
|
420
|
+
} } }), this.pendingCalls = 0, this.activeSubscriptions = 0, this.inactivityTimer = new b(3e3), this.connection = new C(e2, t2, { onUpstreamRestarting: () => {
|
|
417
421
|
this.handlers.onUpstreamRestarting();
|
|
418
422
|
}, onReady: () => {
|
|
419
423
|
this.stateMachine.transition("ready");
|
|
@@ -452,7 +456,7 @@ class I {
|
|
|
452
456
|
logTrace(e2, t2, s2) {
|
|
453
457
|
}
|
|
454
458
|
}
|
|
455
|
-
class
|
|
459
|
+
class I {
|
|
456
460
|
constructor(e2, t2, s2) {
|
|
457
461
|
this.handlers = s2, this.stateMachine = new i("QueuedConnection", ["NOT_READY", "PROCESSING_QUEUE", "READY", "TERMINATED"], { processQueue: { from: ["NOT_READY"], to: "PROCESSING_QUEUE", afterTransition: () => {
|
|
458
462
|
this.sendQueuedCalls();
|
|
@@ -467,7 +471,7 @@ class S {
|
|
|
467
471
|
e3 == null ? void 0 : e3.clientErr("SESSION_DESTROYED");
|
|
468
472
|
}
|
|
469
473
|
this.connection.destroy();
|
|
470
|
-
} } }), this.subscribeQueue = {}, this.callQueue = [], this.connection = new
|
|
474
|
+
} } }), this.subscribeQueue = {}, this.callQueue = [], this.connection = new T(e2, t2, { onUpstreamRestarting: () => {
|
|
471
475
|
this.handlers.onUpstreamRestarting();
|
|
472
476
|
}, onReady: () => {
|
|
473
477
|
this.stateMachine.transition("processQueue");
|
|
@@ -558,13 +562,13 @@ function M(e2) {
|
|
|
558
562
|
}
|
|
559
563
|
})(e3)));
|
|
560
564
|
}
|
|
561
|
-
function
|
|
565
|
+
function _(e2, t2) {
|
|
562
566
|
return void 0 === t2 ? e2 : t2;
|
|
563
567
|
}
|
|
564
|
-
function
|
|
568
|
+
function A(e2, t2) {
|
|
565
569
|
return void 0 === t2 ? e2 : x(t2);
|
|
566
570
|
}
|
|
567
|
-
function
|
|
571
|
+
function N(e2, t2) {
|
|
568
572
|
if (void 0 === t2) return e2;
|
|
569
573
|
if (null === t2) return x({});
|
|
570
574
|
const s2 = __spreadValues({}, e2);
|
|
@@ -592,10 +596,10 @@ function D(e2, t2) {
|
|
|
592
596
|
}
|
|
593
597
|
return true;
|
|
594
598
|
}
|
|
595
|
-
const
|
|
599
|
+
const R = "undefined" != typeof window ? (_b = window.queueMicrotask) != null ? _b : setTimeout : setTimeout;
|
|
596
600
|
class O {
|
|
597
601
|
constructor(e2, t2, s2) {
|
|
598
|
-
this.headers = e2, this.clearPendingBatch = t2, this.sendCalls = s2, this.sent = false,
|
|
602
|
+
this.headers = e2, this.clearPendingBatch = t2, this.sendCalls = s2, this.sent = false, R(() => this.send());
|
|
599
603
|
}
|
|
600
604
|
send() {
|
|
601
605
|
this.sent || (this.sent = true, this.clearPendingBatch(), this.sendCalls());
|
|
@@ -669,7 +673,7 @@ class j extends O {
|
|
|
669
673
|
}
|
|
670
674
|
class $ {
|
|
671
675
|
constructor(e2, t2, s2) {
|
|
672
|
-
this.pendingBatch = null, this.connection = new
|
|
676
|
+
this.pendingBatch = null, this.connection = new I(e2, t2, s2);
|
|
673
677
|
}
|
|
674
678
|
sync() {
|
|
675
679
|
return __async(this, null, function* () {
|
|
@@ -756,21 +760,21 @@ class q {
|
|
|
756
760
|
this.currentDelayMs = this.initialDelayMs;
|
|
757
761
|
}
|
|
758
762
|
}
|
|
759
|
-
function
|
|
763
|
+
function L(e2) {
|
|
760
764
|
return e2.map((e3) => encodeURIComponent(e3)).join();
|
|
761
765
|
}
|
|
762
|
-
class
|
|
766
|
+
class B {
|
|
763
767
|
constructor() {
|
|
764
768
|
this.paths = {};
|
|
765
769
|
}
|
|
766
770
|
add(e2) {
|
|
767
|
-
this.paths[
|
|
771
|
+
this.paths[L(e2)] = e2;
|
|
768
772
|
}
|
|
769
773
|
delete(e2) {
|
|
770
|
-
delete this.paths[
|
|
774
|
+
delete this.paths[L(e2)];
|
|
771
775
|
}
|
|
772
776
|
has(e2) {
|
|
773
|
-
return Object.hasOwnProperty.call(this.paths,
|
|
777
|
+
return Object.hasOwnProperty.call(this.paths, L(e2));
|
|
774
778
|
}
|
|
775
779
|
clear() {
|
|
776
780
|
this.paths = {};
|
|
@@ -781,7 +785,7 @@ class L {
|
|
|
781
785
|
}
|
|
782
786
|
class G {
|
|
783
787
|
constructor(e2, t2, s2) {
|
|
784
|
-
this.handlers = s2, this.targetSubscriptions = new
|
|
788
|
+
this.handlers = s2, this.targetSubscriptions = new B(), this.connection = new W(e2, t2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onSubscriptionsLost: () => {
|
|
785
789
|
this.targetSubscriptions.forEach((e3) => {
|
|
786
790
|
this.resubscribe(e3);
|
|
787
791
|
}), this.handlers.onResubscribeSent();
|
|
@@ -870,7 +874,7 @@ class H {
|
|
|
870
874
|
return this.getPointer;
|
|
871
875
|
}
|
|
872
876
|
}
|
|
873
|
-
class
|
|
877
|
+
class z extends H {
|
|
874
878
|
constructor(e2, t2) {
|
|
875
879
|
super(e2), this.onTeardown = t2, this._error = null, this._lastGoodState = Promise.resolve(void 0), this.registerNewState(e2.resultPromise);
|
|
876
880
|
}
|
|
@@ -899,7 +903,7 @@ class J extends H {
|
|
|
899
903
|
}));
|
|
900
904
|
}
|
|
901
905
|
}
|
|
902
|
-
class
|
|
906
|
+
class J extends z {
|
|
903
907
|
constructor(e2, t2) {
|
|
904
908
|
const s2 = new Promise((e3) => setTimeout(e3)).then(() => this.fetchInitial(e2));
|
|
905
909
|
super({ seq: e2, resultPromise: s2 }, t2.onTeardown), this.initialSeq = e2, this.getDeepMutex = new F(), this.lastDeep = void 0;
|
|
@@ -945,7 +949,7 @@ class z extends J {
|
|
|
945
949
|
});
|
|
946
950
|
}
|
|
947
951
|
}
|
|
948
|
-
class Y extends
|
|
952
|
+
class Y extends J {
|
|
949
953
|
constructor(e2, t2, s2) {
|
|
950
954
|
super(e2, s2), this.emitMutex = t2, this.externallyIdleTimer = new Q(), this.externallyIdle = true, this.internallyIdleTimer = new Q(), this.internallyIdle = true, this.referencedByOtherStores = 0, this.listeners = [], this.lastEmitSeq = void 0, this.lastEmitResult = void 0, t2.runExclusive(() => __async(this, null, function* () {
|
|
951
955
|
yield this.emit(e2);
|
|
@@ -1179,7 +1183,7 @@ class ue extends Y {
|
|
|
1179
1183
|
this.mutate(e2, (s2) => {
|
|
1180
1184
|
const n2 = s2.value.snapshot;
|
|
1181
1185
|
if (null === n2) return console.warn("[TalkJS] Received a 'used edited' event for a user that we thought didn't exist."), s2;
|
|
1182
|
-
return o({ snapshot: { id: n2.id, name:
|
|
1186
|
+
return o({ snapshot: { id: n2.id, name: _(n2.name, t2.diff.name), custom: N(n2.custom, t2.diff.custom), locale: _(n2.locale, t2.diff.locale), photoUrl: _(n2.photoUrl, t2.diff.photoUrl), role: _(n2.role, t2.diff.role), welcomeMessage: _(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
|
|
1183
1187
|
});
|
|
1184
1188
|
}
|
|
1185
1189
|
getFromCache() {
|
|
@@ -1196,7 +1200,7 @@ class ue extends Y {
|
|
|
1196
1200
|
});
|
|
1197
1201
|
}
|
|
1198
1202
|
}
|
|
1199
|
-
class de extends
|
|
1203
|
+
class de extends J {
|
|
1200
1204
|
constructor(e2, t2, s2, n2) {
|
|
1201
1205
|
super(e2, {}), this.conversationId = t2, this.message = s2, this.realtimeClient = n2;
|
|
1202
1206
|
}
|
|
@@ -1248,7 +1252,7 @@ class de extends z {
|
|
|
1248
1252
|
const n2 = s2.value.data.content, a2 = (r2 = n2, void 0 === (i2 = t2.diff.content) ? r2 : E(i2));
|
|
1249
1253
|
var r2, i2;
|
|
1250
1254
|
const c2 = n2 === a2 ? s2.value.data.plaintext : ie(a2, {});
|
|
1251
|
-
return o({ 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:
|
|
1255
|
+
return o({ 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: _(s2.value.data.editedAt, t2.diff.editedAt), custom: N(s2.value.data.custom, t2.diff.custom), plaintext: c2, content: a2, reactions: pe(s2.value.data.reactions, t2.diff.reactions) } });
|
|
1252
1256
|
});
|
|
1253
1257
|
}
|
|
1254
1258
|
messageDeleted(e2, t2) {
|
|
@@ -1273,7 +1277,7 @@ function pe(e2, t2) {
|
|
|
1273
1277
|
if (void 0 === t2) return e2;
|
|
1274
1278
|
const s2 = e2.map((e3) => {
|
|
1275
1279
|
const s3 = t2[e3.emoji];
|
|
1276
|
-
return void 0 === s3 ? e3 : x(null === s3 ? __spreadProps(__spreadValues({}, e3), { count: 0 }) : { emoji: e3.emoji, count:
|
|
1280
|
+
return void 0 === s3 ? e3 : x(null === s3 ? __spreadProps(__spreadValues({}, e3), { count: 0 }) : { emoji: e3.emoji, count: _(e3.count, s3.count), currentUserReacted: _(e3.currentUserReacted, s3.currentUserReacted) });
|
|
1277
1281
|
}).filter((e3) => e3.count > 0), n2 = new Set(s2.map((e3) => e3.emoji));
|
|
1278
1282
|
for (const e3 in t2) {
|
|
1279
1283
|
const a2 = t2[e3];
|
|
@@ -1281,7 +1285,7 @@ function pe(e2, t2) {
|
|
|
1281
1285
|
}
|
|
1282
1286
|
return s2.sort((e3, t3) => e3.emoji.localeCompare(t3.emoji)), x(s2);
|
|
1283
1287
|
}
|
|
1284
|
-
class me extends
|
|
1288
|
+
class me extends J {
|
|
1285
1289
|
constructor(e2, t2, s2, n2) {
|
|
1286
1290
|
super(e2, {}), this.createdAt = t2, this.dataStore = s2, this.referencedDataStore = n2;
|
|
1287
1291
|
}
|
|
@@ -1329,7 +1333,7 @@ class fe extends Y {
|
|
|
1329
1333
|
return this.onlyUsedInternally && this.mostRecentState.resultPromise.then((e3) => {
|
|
1330
1334
|
if (e3.ok && null !== e3.value.inWindow) {
|
|
1331
1335
|
const t2 = 30 - e3.value.inWindow.length;
|
|
1332
|
-
t2 > 0 && this.
|
|
1336
|
+
t2 > 0 && this.loadMore(t2);
|
|
1333
1337
|
}
|
|
1334
1338
|
}), super.listen(e2);
|
|
1335
1339
|
}
|
|
@@ -1377,20 +1381,22 @@ class fe extends Y {
|
|
|
1377
1381
|
return o({ snapshot: x(s2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot)), loadedAll: null === t2.windowEnd });
|
|
1378
1382
|
});
|
|
1379
1383
|
}
|
|
1380
|
-
loadMore(e2) {
|
|
1384
|
+
loadMore(e2 = 30) {
|
|
1381
1385
|
return __async(this, null, function* () {
|
|
1382
1386
|
if (this.pendingLoadMore) return this.pendingLoadMore;
|
|
1383
1387
|
const t2 = r();
|
|
1384
|
-
this.pendingLoadMore = t2.promise
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1388
|
+
this.pendingLoadMore = t2.promise;
|
|
1389
|
+
const s2 = yield this.mostRecentState.resultPromise;
|
|
1390
|
+
if (!s2.ok) {
|
|
1391
|
+
if ("client" === s2.where) throw t2.reject(s2.value), this.pendingLoadMore = void 0, s2.value;
|
|
1392
|
+
{
|
|
1393
|
+
const e3 = p("Loading more messages", s2.value);
|
|
1394
|
+
throw t2.reject(s2.value), this.pendingLoadMore = void 0, e3;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
if (null === s2.value.windowEnd) return t2.resolve(), void (this.pendingLoadMore = void 0);
|
|
1398
|
+
const n2 = s2.value.windowEnd.cursor, a2 = yield ge({ count: e2, cursor: n2, conversationId: this.conversationId, realtimeClient: this.realtimeClient });
|
|
1399
|
+
t2.resolve(), this.pendingLoadMore = void 0, yield this.handlers.onLoadedMore({ type: "virtual.messages.loadedmore", conversationId: this.conversationId, data: a2 });
|
|
1394
1400
|
});
|
|
1395
1401
|
}
|
|
1396
1402
|
loadedMore(e2, t2) {
|
|
@@ -1525,13 +1531,13 @@ class be extends Y {
|
|
|
1525
1531
|
});
|
|
1526
1532
|
}
|
|
1527
1533
|
}
|
|
1528
|
-
function
|
|
1534
|
+
function we(e2, t2) {
|
|
1529
1535
|
for (let s2 in e2) Object.prototype.hasOwnProperty.call(e2, s2) && t2(e2[s2], s2);
|
|
1530
1536
|
}
|
|
1531
|
-
function
|
|
1537
|
+
function ye(e2, t2) {
|
|
1532
1538
|
return (function(e3, t3) {
|
|
1533
1539
|
let s2 = {}, n2 = 0;
|
|
1534
|
-
return
|
|
1540
|
+
return we(e3, (e4, a2) => {
|
|
1535
1541
|
const [r2, i2] = t3([a2, e4], n2++);
|
|
1536
1542
|
s2[r2] = i2;
|
|
1537
1543
|
}), s2;
|
|
@@ -1549,7 +1555,7 @@ class ke extends Y {
|
|
|
1549
1555
|
if (!t2.ok) return t2;
|
|
1550
1556
|
const s2 = t2.value.data;
|
|
1551
1557
|
if (s2.many) return o({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
|
|
1552
|
-
return o({ data: s2, userSubscriptions:
|
|
1558
|
+
return o({ data: s2, userSubscriptions: ye(s2.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 });
|
|
1553
1559
|
});
|
|
1554
1560
|
}
|
|
1555
1561
|
equal(e2, t2) {
|
|
@@ -1566,7 +1572,7 @@ class ke extends Y {
|
|
|
1566
1572
|
});
|
|
1567
1573
|
}
|
|
1568
1574
|
typingAvailable(e2, t2) {
|
|
1569
|
-
this.mutate(e2, () => o({ data: t2.state, userSubscriptions: t2.state.many ? {} :
|
|
1575
|
+
this.mutate(e2, () => o({ data: t2.state, userSubscriptions: t2.state.many ? {} : ye(t2.state.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 }));
|
|
1570
1576
|
}
|
|
1571
1577
|
typingChanged(e2, t2) {
|
|
1572
1578
|
this.mutate(e2, (s2) => {
|
|
@@ -1574,7 +1580,7 @@ class ke extends Y {
|
|
|
1574
1580
|
if (void 0 === t2.diff.many) {
|
|
1575
1581
|
if (true === s2.value.data.many) return s2;
|
|
1576
1582
|
const n2 = __spreadValues({}, s2.value.data.usersTyping), a2 = __spreadValues({}, s2.value.userSubscriptions);
|
|
1577
|
-
return
|
|
1583
|
+
return we(t2.diff.usersTyping, (e3, t3) => {
|
|
1578
1584
|
var _a2;
|
|
1579
1585
|
"number" == typeof e3 ? (n2[t3] = e3, a2[t3] = this.realtimeClient.internalSubscribe(["users", t3])) : null === e3 && (delete n2[t3], (_a2 = a2[t3]) == null ? void 0 : _a2.unsubscribe(), delete a2[t3]);
|
|
1580
1586
|
}), o({ data: { usersTyping: n2, many: false }, userSubscriptions: a2, lastChanged: e2 });
|
|
@@ -1582,7 +1588,7 @@ class ke extends Y {
|
|
|
1582
1588
|
if (true === t2.diff.many) return s2.value.data.many ? s2 : o({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
|
|
1583
1589
|
if (false === t2.diff.many) {
|
|
1584
1590
|
if (false === s2.value.data.many) return s2;
|
|
1585
|
-
const n2 =
|
|
1591
|
+
const n2 = ye(t2.diff.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3]));
|
|
1586
1592
|
return o({ data: t2.diff, userSubscriptions: n2, lastChanged: e2 });
|
|
1587
1593
|
}
|
|
1588
1594
|
throw t2.diff, "Unreachable";
|
|
@@ -1592,7 +1598,7 @@ class ke extends Y {
|
|
|
1592
1598
|
this.mutate(e2, (t3) => null === t3.value.data ? t3 : o({ data: null, lastChanged: e2 }));
|
|
1593
1599
|
}
|
|
1594
1600
|
teardownNested(e2) {
|
|
1595
|
-
e2.data &&
|
|
1601
|
+
e2.data && we(e2.userSubscriptions, (e3) => e3.unsubscribe());
|
|
1596
1602
|
}
|
|
1597
1603
|
anyChildChanged(e2, t2, s2) {
|
|
1598
1604
|
return __async(this, null, function* () {
|
|
@@ -1606,7 +1612,7 @@ class ke extends Y {
|
|
|
1606
1612
|
});
|
|
1607
1613
|
}
|
|
1608
1614
|
}
|
|
1609
|
-
class
|
|
1615
|
+
class Se extends Y {
|
|
1610
1616
|
constructor(e2, t2, s2, n2, a2, r2) {
|
|
1611
1617
|
super(e2, a2, r2), this.conversationId = t2, this.participant = s2, this.realtimeClient = n2, this.unsubscribeDebounceMs = 0;
|
|
1612
1618
|
}
|
|
@@ -1617,7 +1623,7 @@ class Ce extends Y {
|
|
|
1617
1623
|
return __async(this, null, function* () {
|
|
1618
1624
|
const t2 = this.realtimeClient.internalSubscribe(["users", this.userId]);
|
|
1619
1625
|
if ("object" == typeof this.participant) return o({ lastChanged: e2, user: t2, data: this.participant });
|
|
1620
|
-
const s2 = yield
|
|
1626
|
+
const s2 = yield Ce(this.conversationId, this.userId, this.realtimeClient);
|
|
1621
1627
|
return s2.ok ? o({ lastChanged: e2, user: t2, data: s2.value }) : (t2.unsubscribe(), s2);
|
|
1622
1628
|
});
|
|
1623
1629
|
}
|
|
@@ -1657,14 +1663,14 @@ class Ce extends Y {
|
|
|
1657
1663
|
participantEdited(e2, t2) {
|
|
1658
1664
|
this.mutate(e2, (s2) => {
|
|
1659
1665
|
if (null === s2.value.data) return s2;
|
|
1660
|
-
return o({ lastChanged: e2, user: s2.value.user, data: { id: s2.value.data.id, access:
|
|
1666
|
+
return o({ lastChanged: e2, user: s2.value.user, data: { id: s2.value.data.id, access: _(s2.value.data.access, t2.diff.access), notify: _(s2.value.data.notify, t2.diff.notify), joinedAt: s2.value.data.joinedAt } });
|
|
1661
1667
|
});
|
|
1662
1668
|
}
|
|
1663
1669
|
participantDeleted(e2, t2) {
|
|
1664
1670
|
this.mutate(e2, (t3) => null === t3.value.data ? t3 : o({ lastChanged: e2, user: t3.value.user, data: null }));
|
|
1665
1671
|
}
|
|
1666
1672
|
sideCreated(e2, t2) {
|
|
1667
|
-
const s2 =
|
|
1673
|
+
const s2 = Ce(this.conversationId, this.userId, this.realtimeClient);
|
|
1668
1674
|
this.mutate(e2, (t3) => __async(this, null, function* () {
|
|
1669
1675
|
if (null !== t3.value.data) return t3;
|
|
1670
1676
|
const n2 = yield s2;
|
|
@@ -1685,19 +1691,19 @@ class Ce extends Y {
|
|
|
1685
1691
|
});
|
|
1686
1692
|
}
|
|
1687
1693
|
}
|
|
1688
|
-
function
|
|
1694
|
+
function Ce(e2, t2, s2) {
|
|
1689
1695
|
return __async(this, null, function* () {
|
|
1690
1696
|
const n2 = yield s2.call({ method: "GET", path: ["me", "conversations", e2, "participants", t2], data: {}, flags: { bypassCache: true } });
|
|
1691
1697
|
return n2.ok ? o(n2.value.data) : "server" === n2.where && 404 === n2.value.status || "server" === n2.where && 403 === n2.value.status && "NOT_A_PARTICIPANT" === n2.value.errorCode ? o(null) : n2;
|
|
1692
1698
|
});
|
|
1693
1699
|
}
|
|
1694
|
-
class
|
|
1700
|
+
class Te extends Y {
|
|
1695
1701
|
constructor(e2, t2, s2, n2, a2, r2) {
|
|
1696
1702
|
super(e2, a2, r2), this.getParticipantDataStore = t2, this.conversationId = s2, this.realtimeClient = n2, this.handlers = r2, this.unsubscribeDebounceMs = 3e4, this.pendingLoadMore = void 0;
|
|
1697
1703
|
}
|
|
1698
1704
|
fetchInitial(e2) {
|
|
1699
1705
|
return __async(this, null, function* () {
|
|
1700
|
-
const t2 = yield
|
|
1706
|
+
const t2 = yield Ie({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: 10 });
|
|
1701
1707
|
return t2.ok ? null === t2.value.participants ? o({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null }) : xe({ seq: e2, participants: t2.value.participants, cursor: t2.value.nextCursor, getParticipantDataStore: this.getParticipantDataStore }) : t2;
|
|
1702
1708
|
});
|
|
1703
1709
|
}
|
|
@@ -1726,20 +1732,22 @@ class Ie extends Y {
|
|
|
1726
1732
|
return a2.sort((e3, t3) => t3.joinedAt - e3.joinedAt), o({ snapshot: x(a2), loadedAll: null === t2.windowEnd });
|
|
1727
1733
|
});
|
|
1728
1734
|
}
|
|
1729
|
-
loadMore(e2) {
|
|
1735
|
+
loadMore(e2 = 10) {
|
|
1730
1736
|
return __async(this, null, function* () {
|
|
1731
1737
|
if (this.pendingLoadMore) return this.pendingLoadMore;
|
|
1732
1738
|
const t2 = r();
|
|
1733
|
-
this.pendingLoadMore = t2.promise
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1739
|
+
this.pendingLoadMore = t2.promise;
|
|
1740
|
+
const s2 = yield this.mostRecentState.resultPromise;
|
|
1741
|
+
if (!s2.ok) {
|
|
1742
|
+
if ("client" === s2.where) throw t2.reject(s2.value), this.pendingLoadMore = void 0, s2.value;
|
|
1743
|
+
{
|
|
1744
|
+
const e3 = p("Loading more participants", s2.value);
|
|
1745
|
+
throw t2.reject(e3), this.pendingLoadMore = void 0, e3;
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
if (null === s2.value.windowEnd) return t2.resolve(), void (this.pendingLoadMore = void 0);
|
|
1749
|
+
const n2 = s2.value.windowEnd.cursor, a2 = yield Ie({ count: e2, cursor: n2, conversationId: this.conversationId, realtimeClient: this.realtimeClient });
|
|
1750
|
+
t2.resolve(), this.pendingLoadMore = void 0, yield this.handlers.onLoadedMore({ type: "virtual.participants.loadedmore", conversationId: this.conversationId, data: a2 });
|
|
1743
1751
|
});
|
|
1744
1752
|
}
|
|
1745
1753
|
loadedMore(e2, t2) {
|
|
@@ -1770,7 +1778,7 @@ class Ie extends Y {
|
|
|
1770
1778
|
this.mutate(e2, (t3) => null === t3.value.stores ? t3 : (this.teardownNested(t3.value), o({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null })));
|
|
1771
1779
|
}
|
|
1772
1780
|
}
|
|
1773
|
-
function
|
|
1781
|
+
function Ie(_0) {
|
|
1774
1782
|
return __async(this, arguments, function* ({ cursor: e2, realtimeClient: t2, conversationId: s2, count: n2 }) {
|
|
1775
1783
|
const a2 = { limit: n2, cursor: e2 }, r2 = yield t2.call({ method: "GET", path: ["me", "conversations", s2, "participants"], data: a2, flags: { bypassCache: true } });
|
|
1776
1784
|
if (r2.ok) {
|
|
@@ -1793,7 +1801,7 @@ class Ee extends Y {
|
|
|
1793
1801
|
fetchInitial(e2) {
|
|
1794
1802
|
return __async(this, null, function* () {
|
|
1795
1803
|
const t2 = yield Me({ realtimeClient: this.realtimeClient, count: 20 });
|
|
1796
|
-
return t2.ok ? null === t2.value.conversations ? o({ lastChanged: e2, stores: null, windowEnd: null }) :
|
|
1804
|
+
return t2.ok ? null === t2.value.conversations ? o({ lastChanged: e2, stores: null, windowEnd: null }) : _e({ seq: e2, conversations: t2.value.conversations, cursor: t2.value.nextCursor, getConvDataStore: this.getConvDataStore }) : t2;
|
|
1797
1805
|
});
|
|
1798
1806
|
}
|
|
1799
1807
|
teardownNested(e2) {
|
|
@@ -1825,24 +1833,26 @@ class Ee extends Y {
|
|
|
1825
1833
|
}), o({ snapshot: x(a2), loadedAll: null === t2.windowEnd });
|
|
1826
1834
|
});
|
|
1827
1835
|
}
|
|
1828
|
-
loadMore(e2) {
|
|
1836
|
+
loadMore(e2 = 20) {
|
|
1829
1837
|
return __async(this, null, function* () {
|
|
1830
1838
|
if (this.pendingLoadMore) return this.pendingLoadMore;
|
|
1831
1839
|
const t2 = r();
|
|
1832
|
-
this.pendingLoadMore = t2.promise
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1840
|
+
this.pendingLoadMore = t2.promise;
|
|
1841
|
+
const s2 = yield this.mostRecentState.resultPromise;
|
|
1842
|
+
if (!s2.ok) {
|
|
1843
|
+
if ("client" === s2.where) throw t2.reject(s2.value), this.pendingLoadMore = void 0, s2.value;
|
|
1844
|
+
{
|
|
1845
|
+
const e3 = p("Loading more conversations", s2.value);
|
|
1846
|
+
throw t2.reject(e3), this.pendingLoadMore = void 0, e3;
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
if (null === s2.value.windowEnd) return t2.resolve(), void (this.pendingLoadMore = void 0);
|
|
1850
|
+
const n2 = s2.value.windowEnd.cursor, a2 = yield Me({ count: e2, cursor: n2, realtimeClient: this.realtimeClient });
|
|
1851
|
+
t2.resolve(), this.pendingLoadMore = void 0, yield this.handlers.onLoadedMore({ type: "virtual.conversations.loadedmore", data: a2 });
|
|
1842
1852
|
});
|
|
1843
1853
|
}
|
|
1844
1854
|
loadedMore(e2, t2) {
|
|
1845
|
-
this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.conversations ? (console.warn("[TalkJS] When loading more conversations, the user stopped existing, which should be impossible."), s2) :
|
|
1855
|
+
this.mutate(e2, (s2) => null === s2.value.windowEnd ? s2 : t2.data.ok ? null === t2.data.value.conversations ? (console.warn("[TalkJS] When loading more conversations, the user stopped existing, which should be impossible."), s2) : _e({ seq: e2, prevStores: s2.value.stores, conversations: t2.data.value.conversations, cursor: t2.data.value.nextCursor, getConvDataStore: this.getConvDataStore }) : t2.data);
|
|
1846
1856
|
}
|
|
1847
1857
|
userCreated(e2, t2) {
|
|
1848
1858
|
this.mutate(e2, (e3) => null !== e3.value.stores ? e3 : o({ lastChanged: e3.value.lastChanged, stores: {}, windowEnd: null }));
|
|
@@ -1891,13 +1901,13 @@ function Me(_0) {
|
|
|
1891
1901
|
return a2.ok || "server" !== a2.where || 404 !== a2.value.status || "USER_NOT_FOUND" !== a2.value.errorCode ? a2 : o({ conversations: null, nextCursor: null });
|
|
1892
1902
|
});
|
|
1893
1903
|
}
|
|
1894
|
-
function
|
|
1904
|
+
function _e({ seq: e2, prevStores: t2, conversations: s2, cursor: n2, getConvDataStore: a2 }) {
|
|
1895
1905
|
const r2 = t2 ? __spreadValues({}, t2) : {};
|
|
1896
1906
|
for (const e3 of s2) void 0 === r2[e3.id] && (r2[e3.id] = a2(e3));
|
|
1897
1907
|
if (null === n2) return o({ lastChanged: e2, stores: r2, windowEnd: null });
|
|
1898
1908
|
return o({ lastChanged: e2, stores: r2, windowEnd: { cursor: n2, oldestMessageTs: Math.min(...s2.map((e3) => e3.lastMessageAt)) } });
|
|
1899
1909
|
}
|
|
1900
|
-
class
|
|
1910
|
+
class Ae extends Y {
|
|
1901
1911
|
constructor(e2, t2, s2, n2, a2) {
|
|
1902
1912
|
super(e2, n2, a2), this.conversation = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 0;
|
|
1903
1913
|
}
|
|
@@ -1942,13 +1952,13 @@ class Ne extends Y {
|
|
|
1942
1952
|
});
|
|
1943
1953
|
}
|
|
1944
1954
|
participantEdited(e2, t2) {
|
|
1945
|
-
this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'participant.edited' event for a conversation that we thought didn't exist."), s2) : o({ lastChanged: e2, snapshot:
|
|
1955
|
+
this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'participant.edited' event for a conversation that we thought didn't exist."), s2) : o({ lastChanged: e2, snapshot: Ne(s2.value.snapshot, t2.diff), messageWindow: s2.value.messageWindow }));
|
|
1946
1956
|
}
|
|
1947
1957
|
conversationEdited(e2, t2) {
|
|
1948
|
-
this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'conversation.edited' event for a conversation that we thought didn't exist."), s2) : o({ lastChanged: e2, snapshot:
|
|
1958
|
+
this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'conversation.edited' event for a conversation that we thought didn't exist."), s2) : o({ lastChanged: e2, snapshot: Ne(s2.value.snapshot, t2.diff), messageWindow: s2.value.messageWindow }));
|
|
1949
1959
|
}
|
|
1950
1960
|
sideEdited(e2, t2) {
|
|
1951
|
-
this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'side.edited' event for a conversation that we thought didn't exist."), s2) : o({ lastChanged: e2, snapshot:
|
|
1961
|
+
this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'side.edited' event for a conversation that we thought didn't exist."), s2) : o({ lastChanged: e2, snapshot: Ne(s2.value.snapshot, t2.diff), messageWindow: s2.value.messageWindow }));
|
|
1952
1962
|
}
|
|
1953
1963
|
sideCreated(e2, t2) {
|
|
1954
1964
|
this.mutate(e2, (s2) => s2.value.snapshot ? s2 : o({ lastChanged: e2, snapshot: t2.state, messageWindow: s2.value.messageWindow }));
|
|
@@ -1963,9 +1973,9 @@ class Ne extends Y {
|
|
|
1963
1973
|
});
|
|
1964
1974
|
}
|
|
1965
1975
|
}
|
|
1966
|
-
function
|
|
1976
|
+
function Ne(e2, t2) {
|
|
1967
1977
|
const s2 = t2;
|
|
1968
|
-
return { id: e2.id, createdAt: e2.createdAt, subject:
|
|
1978
|
+
return { id: e2.id, createdAt: e2.createdAt, subject: _(e2.subject, s2.subject), photoUrl: _(e2.photoUrl, s2.photoUrl), welcomeMessages: A(e2.welcomeMessages, s2.welcomeMessages), custom: N(e2.custom, s2.custom), lastMessageAt: _(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: _(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: _(e2.isUnread, s2.isUnread), access: _(e2.access, s2.access), notify: _(e2.notify, s2.notify), readUntil: _(e2.readUntil, s2.readUntil), everyoneReadUntil: _(e2.everyoneReadUntil, s2.everyoneReadUntil), joinedAt: e2.joinedAt };
|
|
1969
1979
|
}
|
|
1970
1980
|
class De extends Y {
|
|
1971
1981
|
constructor(e2, t2, s2, n2, a2) {
|
|
@@ -2017,7 +2027,7 @@ class De extends Y {
|
|
|
2017
2027
|
});
|
|
2018
2028
|
}
|
|
2019
2029
|
}
|
|
2020
|
-
class
|
|
2030
|
+
class Re extends Y {
|
|
2021
2031
|
constructor(e2, t2, s2, n2, a2) {
|
|
2022
2032
|
super(e2, n2, a2), this.participantData = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 3e4;
|
|
2023
2033
|
}
|
|
@@ -2225,8 +2235,8 @@ class Oe {
|
|
|
2225
2235
|
if (e(t2, ["users", "*"])) return new ue(this.virtualSeq, t2[1], this.realtimeClient, this.emitMutex, { onTeardown: s2 });
|
|
2226
2236
|
if (e(t2, ["me", "conversations", "*"])) return new be(this.virtualSeq, this.subscribeConvData(t2[2]), this.realtimeClient, this.emitMutex, { onTeardown: s2 });
|
|
2227
2237
|
if (e(t2, ["me", "conversations", "*", "messages"])) return new fe(this.virtualSeq, t2[2], this.realtimeClient, this.emitMutex, { onTeardown: s2, onLoadedMore: (e2) => this.onVirtualPublish(e2) });
|
|
2228
|
-
if (e(t2, ["me", "conversations", "*", "participants"])) return new
|
|
2229
|
-
if (e(t2, ["me", "conversations", "*", "participants", "*"])) return new
|
|
2238
|
+
if (e(t2, ["me", "conversations", "*", "participants"])) return new Te(this.virtualSeq, (e2) => this.subscribeParticipantData(t2[2], e2), t2[2], this.realtimeClient, this.emitMutex, { onTeardown: s2, onLoadedMore: (e2) => this.onVirtualPublish(e2) });
|
|
2239
|
+
if (e(t2, ["me", "conversations", "*", "participants", "*"])) return new Re(this.virtualSeq, this.subscribeParticipantData(t2[2], t2[4]), this.realtimeClient, this.emitMutex, { onTeardown: s2 });
|
|
2230
2240
|
if (e(t2, ["me", "conversations", "*", "typing"])) return new ke(this.virtualSeq, t2[2], this.realtimeClient, this.emitMutex, { onTeardown: s2 });
|
|
2231
2241
|
if (e(t2, ["me", "conversations"])) return new Ee(this.virtualSeq, (e2) => this.subscribeConvData(e2), this.realtimeClient, this.emitMutex, { onTeardown: s2, onLoadedMore: (e2) => this.onVirtualPublish(e2) });
|
|
2232
2242
|
if (e(t2, ["users", "*", "online"])) return new De(this.virtualSeq, t2[1], this.realtimeClient, this.emitMutex, { onTeardown: s2 });
|
|
@@ -2238,7 +2248,7 @@ class Oe {
|
|
|
2238
2248
|
const e3 = this.convDataStores[t2];
|
|
2239
2249
|
return { store: e3, unsubscribe: e3.registerInternalSubscription() };
|
|
2240
2250
|
}
|
|
2241
|
-
const s2 = new
|
|
2251
|
+
const s2 = new Ae(this.virtualSeq, e2, this.realtimeClient, this.emitMutex, { onTeardown: () => {
|
|
2242
2252
|
delete this.convDataStores[t2];
|
|
2243
2253
|
} });
|
|
2244
2254
|
return this.convDataStores[t2] = s2, { store: s2, unsubscribe: s2.registerInternalSubscription() };
|
|
@@ -2247,7 +2257,7 @@ class Oe {
|
|
|
2247
2257
|
var _a2, _b2;
|
|
2248
2258
|
const s2 = "string" == typeof t2 ? t2 : t2.id, n2 = (_a2 = this.participantDataStores[e2]) == null ? void 0 : _a2[s2];
|
|
2249
2259
|
if (n2) return { store: n2, unsubscribe: n2.registerInternalSubscription() };
|
|
2250
|
-
const a2 = (_b2 = this.participantDataStores[e2]) != null ? _b2 : {}, r2 = new
|
|
2260
|
+
const a2 = (_b2 = this.participantDataStores[e2]) != null ? _b2 : {}, r2 = new Se(this.virtualSeq, e2, t2, this.realtimeClient, this.emitMutex, { onTeardown: () => {
|
|
2251
2261
|
delete a2[s2], 0 === Object.keys(a2).length && delete this.participantDataStores[e2];
|
|
2252
2262
|
} });
|
|
2253
2263
|
return a2[s2] = r2, this.participantDataStores[e2] = a2, { store: r2, unsubscribe: r2.registerInternalSubscription() };
|
|
@@ -2266,7 +2276,7 @@ class je {
|
|
|
2266
2276
|
get() {
|
|
2267
2277
|
return __async(this, null, function* () {
|
|
2268
2278
|
const e2 = yield this._realtimeClient.getUser(this.brandedId);
|
|
2269
|
-
return
|
|
2279
|
+
return ca("Get user " + this.id, e2);
|
|
2270
2280
|
});
|
|
2271
2281
|
}
|
|
2272
2282
|
set(e2) {
|
|
@@ -2290,53 +2300,7 @@ class je {
|
|
|
2290
2300
|
return this._realtimeClient.subscribe(["users", this.brandedId, "online"], e2);
|
|
2291
2301
|
}
|
|
2292
2302
|
}
|
|
2293
|
-
|
|
2294
|
-
constructor(e2, t2, s2) {
|
|
2295
|
-
this.userId = e2, this.conversationId = t2, this._realtimeClient = s2;
|
|
2296
|
-
}
|
|
2297
|
-
get brandedUserId() {
|
|
2298
|
-
return this.userId;
|
|
2299
|
-
}
|
|
2300
|
-
get brandedConversationId() {
|
|
2301
|
-
return this.conversationId;
|
|
2302
|
-
}
|
|
2303
|
-
get() {
|
|
2304
|
-
return __async(this, null, function* () {
|
|
2305
|
-
const e2 = yield this._realtimeClient.call({ method: "GET", path: ["me", "conversations", this.brandedConversationId, "participants", this.brandedUserId], data: {} }), t2 = yield this._realtimeClient.call({ method: "GET", path: ["users", this.brandedUserId], data: { includePrivateFields: false } }), [s2, n2] = yield Promise.all([e2, t2]);
|
|
2306
|
-
if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return null;
|
|
2307
|
-
if (!n2.ok && "server" === n2.where && 404 === n2.value.status) return null;
|
|
2308
|
-
return le(d(`Get participant ${this.userId} in conversation ${this.conversationId}`, s2), ce(d(`Get user ${this.userId}`, n2)));
|
|
2309
|
-
});
|
|
2310
|
-
}
|
|
2311
|
-
set() {
|
|
2312
|
-
return __async(this, arguments, function* (e2 = {}) {
|
|
2313
|
-
const t2 = yield this._realtimeClient.call({ method: "PUT", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: e2 });
|
|
2314
|
-
d(`Set participant ${this.userId} in conversation ${this.conversationId}`, t2);
|
|
2315
|
-
});
|
|
2316
|
-
}
|
|
2317
|
-
edit() {
|
|
2318
|
-
return __async(this, arguments, function* (e2 = {}) {
|
|
2319
|
-
const t2 = yield this._realtimeClient.call({ method: "PATCH", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: e2 });
|
|
2320
|
-
d(`Edit participant ${this.userId} in conversation ${this.conversationId}`, t2);
|
|
2321
|
-
});
|
|
2322
|
-
}
|
|
2323
|
-
createIfNotExists() {
|
|
2324
|
-
return __async(this, arguments, function* (e2 = {}) {
|
|
2325
|
-
const t2 = yield this._realtimeClient.call({ method: "POST", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: e2 });
|
|
2326
|
-
(t2.ok || "server" !== t2.where || 409 !== t2.value.status) && d(`Add participant ${this.userId} to conversation ${this.conversationId}`, t2);
|
|
2327
|
-
});
|
|
2328
|
-
}
|
|
2329
|
-
delete() {
|
|
2330
|
-
return __async(this, null, function* () {
|
|
2331
|
-
const e2 = yield this._realtimeClient.call({ method: "DELETE", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: {} });
|
|
2332
|
-
(e2.ok || "server" !== e2.where || 404 !== e2.value.status) && d(`Remove participant ${this.userId} from conversation ${this.conversationId}`, e2);
|
|
2333
|
-
});
|
|
2334
|
-
}
|
|
2335
|
-
subscribe(e2) {
|
|
2336
|
-
return this._realtimeClient.subscribe(["me", "conversations", this.brandedConversationId, "participants", this.brandedUserId], e2);
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
function Ue(e2) {
|
|
2303
|
+
function $e(e2) {
|
|
2340
2304
|
const t2 = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
|
|
2341
2305
|
let s2 = 0;
|
|
2342
2306
|
const n2 = [], a2 = e2 === s2;
|
|
@@ -2354,7 +2318,7 @@ function Ue(e2) {
|
|
|
2354
2318
|
if (20 != i2.length) throw new Error("Length should be 20.");
|
|
2355
2319
|
return i2;
|
|
2356
2320
|
}
|
|
2357
|
-
const
|
|
2321
|
+
const Ue = (e2, t2, s2 = void 0) => (function(e3, t3) {
|
|
2358
2322
|
return e3.reduce((e4, s3, n2) => e4.concat(t3(s3, n2)), []);
|
|
2359
2323
|
})(e2, (e3) => {
|
|
2360
2324
|
if ("string" == typeof e3) return t2(e3, s2);
|
|
@@ -2367,14 +2331,14 @@ const We = (e2, t2, s2 = void 0) => (function(e3, t3) {
|
|
|
2367
2331
|
case "bulletList":
|
|
2368
2332
|
case "bulletpoint":
|
|
2369
2333
|
case "bulletPoint":
|
|
2370
|
-
return [{ type: e3.type, children:
|
|
2334
|
+
return [{ type: e3.type, children: Ue(e3.children, t2, e3.type) }];
|
|
2371
2335
|
case "link":
|
|
2372
|
-
return [{ type: e3.type, url: e3.url, children:
|
|
2336
|
+
return [{ type: e3.type, url: e3.url, children: Ue(e3.children, t2, e3.type) }];
|
|
2373
2337
|
case "actionlink":
|
|
2374
2338
|
case "actionLink":
|
|
2375
2339
|
case "actionbutton":
|
|
2376
2340
|
case "actionButton":
|
|
2377
|
-
return [{ type: e3.type, action: e3.action, params: e3.params, children:
|
|
2341
|
+
return [{ type: e3.type, action: e3.action, params: e3.params, children: Ue(e3.children, t2, e3.type) }];
|
|
2378
2342
|
case "mention":
|
|
2379
2343
|
case "autolink":
|
|
2380
2344
|
case "autoLink":
|
|
@@ -2389,7 +2353,7 @@ const We = (e2, t2, s2 = void 0) => (function(e3, t3) {
|
|
|
2389
2353
|
return [e3];
|
|
2390
2354
|
}
|
|
2391
2355
|
});
|
|
2392
|
-
function
|
|
2356
|
+
function We(e2, t2) {
|
|
2393
2357
|
return (s2) => {
|
|
2394
2358
|
const n2 = s2;
|
|
2395
2359
|
let a2 = 0;
|
|
@@ -2402,27 +2366,27 @@ function qe(e2, t2) {
|
|
|
2402
2366
|
return a2 < s2.length && r2.push(s2.substring(a2)), r2;
|
|
2403
2367
|
};
|
|
2404
2368
|
}
|
|
2405
|
-
const
|
|
2369
|
+
const qe = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
2406
2370
|
var Le = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(Le || {});
|
|
2407
|
-
const
|
|
2371
|
+
const Be = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
|
|
2408
2372
|
const t2 = [];
|
|
2409
2373
|
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");
|
|
2410
|
-
}),
|
|
2411
|
-
function
|
|
2412
|
-
return
|
|
2374
|
+
}), Ge = { _: 1, "*": 4, "~": 2 };
|
|
2375
|
+
function Fe(e2) {
|
|
2376
|
+
return He(e2, 0);
|
|
2413
2377
|
}
|
|
2414
|
-
function
|
|
2415
|
-
const s2 =
|
|
2416
|
-
const t3 = ze.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${
|
|
2378
|
+
function He(e2, t2 = 0) {
|
|
2379
|
+
const s2 = Be[t2], n2 = s2 ? (function(e3) {
|
|
2380
|
+
const t3 = ze.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${qe}])(?:${e3.source})(?=[\\s${qe}]|$)`, "g")), s3 = We(t3, (e4) => {
|
|
2417
2381
|
const t4 = e4[0][1], s4 = e4[1] || e4[2] || e4[3] || e4[4] || e4[5] || e4[6];
|
|
2418
|
-
return [" ", { type: Le[
|
|
2382
|
+
return [" ", { type: Le[Ge[t4]], children: [s4] }];
|
|
2419
2383
|
});
|
|
2420
2384
|
return (e4) => {
|
|
2421
2385
|
const [t4, ...n3] = s3(" " + e4);
|
|
2422
2386
|
return t4.length > 1 && n3.unshift(t4.substring(1)), n3;
|
|
2423
2387
|
};
|
|
2424
2388
|
})(s2) : () => [e2];
|
|
2425
|
-
return
|
|
2389
|
+
return Ue(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? He(e3, t2 | Le[s3]) : [e3]);
|
|
2426
2390
|
}
|
|
2427
2391
|
const ze = (function() {
|
|
2428
2392
|
const e2 = (function() {
|
|
@@ -2440,38 +2404,38 @@ const ze = (function() {
|
|
|
2440
2404
|
return e2.set(t2, n2), n2;
|
|
2441
2405
|
} };
|
|
2442
2406
|
})();
|
|
2443
|
-
var
|
|
2444
|
-
return
|
|
2407
|
+
var Je = function(e2, t2) {
|
|
2408
|
+
return Je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
|
|
2445
2409
|
e3.__proto__ = t3;
|
|
2446
2410
|
} || function(e3, t3) {
|
|
2447
2411
|
for (var s2 in t3) Object.prototype.hasOwnProperty.call(t3, s2) && (e3[s2] = t3[s2]);
|
|
2448
|
-
},
|
|
2412
|
+
}, Je(e2, t2);
|
|
2449
2413
|
};
|
|
2450
|
-
function
|
|
2414
|
+
function Ye(e2, t2) {
|
|
2451
2415
|
if ("function" != typeof t2 && null !== t2) throw new TypeError("Class extends value " + String(t2) + " is not a constructor or null");
|
|
2452
2416
|
function s2() {
|
|
2453
2417
|
this.constructor = e2;
|
|
2454
2418
|
}
|
|
2455
|
-
|
|
2419
|
+
Je(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
|
|
2456
2420
|
}
|
|
2457
|
-
var
|
|
2458
|
-
return
|
|
2421
|
+
var Qe = function() {
|
|
2422
|
+
return Qe = Object.assign || function(e2) {
|
|
2459
2423
|
for (var t2, s2 = 1, n2 = arguments.length; s2 < n2; s2++) for (var a2 in t2 = arguments[s2]) Object.prototype.hasOwnProperty.call(t2, a2) && (e2[a2] = t2[a2]);
|
|
2460
2424
|
return e2;
|
|
2461
|
-
},
|
|
2425
|
+
}, Qe.apply(this, arguments);
|
|
2462
2426
|
};
|
|
2463
2427
|
"function" == typeof SuppressedError && SuppressedError;
|
|
2464
|
-
var
|
|
2465
|
-
function
|
|
2428
|
+
var Ve = Object.prototype.hasOwnProperty;
|
|
2429
|
+
function Ke(e2) {
|
|
2466
2430
|
return "boolean" == typeof e2;
|
|
2467
2431
|
}
|
|
2468
|
-
function
|
|
2432
|
+
function Ze(e2, t2) {
|
|
2469
2433
|
for (var s2 = e2.length - 1; s2 >= 0; s2--) true === t2(e2[s2]) && e2.splice(s2, 1);
|
|
2470
2434
|
}
|
|
2471
|
-
function
|
|
2435
|
+
function Xe(e2) {
|
|
2472
2436
|
throw new Error("Unhandled case for value: '".concat(e2, "'"));
|
|
2473
2437
|
}
|
|
2474
|
-
var
|
|
2438
|
+
var et = /\s+/, tt = (function() {
|
|
2475
2439
|
function e2(e3) {
|
|
2476
2440
|
void 0 === e3 && (e3 = {}), this.tagName = "", this.attrs = {}, this.innerHTML = "", this.tagName = e3.tagName || "", this.attrs = e3.attrs || {}, this.innerHTML = e3.innerHtml || e3.innerHTML || "";
|
|
2477
2441
|
}
|
|
@@ -2490,10 +2454,10 @@ var tt = /\s+/, st = (function() {
|
|
|
2490
2454
|
}, e2.prototype.setClass = function(e3) {
|
|
2491
2455
|
return this.setAttr("class", e3);
|
|
2492
2456
|
}, e2.prototype.addClass = function(e3) {
|
|
2493
|
-
for (var t2, s2 = this.getClass(), n2 = s2 ? s2.split(
|
|
2457
|
+
for (var t2, s2 = this.getClass(), n2 = s2 ? s2.split(et) : [], a2 = e3.split(et); t2 = a2.shift(); ) -1 === n2.indexOf(t2) && n2.push(t2);
|
|
2494
2458
|
return this.getAttrs().class = n2.join(" "), this;
|
|
2495
2459
|
}, e2.prototype.removeClass = function(e3) {
|
|
2496
|
-
for (var t2, s2 = this.getClass(), n2 = s2 ? s2.split(
|
|
2460
|
+
for (var t2, s2 = this.getClass(), n2 = s2 ? s2.split(et) : [], a2 = e3.split(et); n2.length && (t2 = a2.shift()); ) {
|
|
2497
2461
|
var r2 = n2.indexOf(t2);
|
|
2498
2462
|
-1 !== r2 && n2.splice(r2, 1);
|
|
2499
2463
|
}
|
|
@@ -2515,24 +2479,24 @@ var tt = /\s+/, st = (function() {
|
|
|
2515
2479
|
return ["<", e3, t2 = t2 ? " " + t2 : "", ">", this.getInnerHtml(), "</", e3, ">"].join("");
|
|
2516
2480
|
}, e2.prototype.buildAttrsStr = function() {
|
|
2517
2481
|
var e3 = this.getAttrs(), t2 = [];
|
|
2518
|
-
for (var s2 in e3)
|
|
2482
|
+
for (var s2 in e3) Ve.call(e3, s2) && t2.push(s2 + '="' + e3[s2] + '"');
|
|
2519
2483
|
return t2.join(" ");
|
|
2520
2484
|
}, e2;
|
|
2521
2485
|
})();
|
|
2522
|
-
function
|
|
2486
|
+
function st(e2) {
|
|
2523
2487
|
var t2 = "";
|
|
2524
2488
|
return e2.scheme && e2.host && (t2 += e2.scheme + "://"), e2.host && (t2 += e2.host), e2.path && (t2 += "/" + e2.path), e2.query && (t2 += "?" + e2.query), e2.fragment && (t2 += "#" + e2.fragment), t2;
|
|
2525
2489
|
}
|
|
2526
|
-
function
|
|
2490
|
+
function nt(e2, t2, s2) {
|
|
2527
2491
|
var n2 = t2 / 2, a2 = Math.ceil(n2), r2 = -1 * Math.floor(n2), i2 = "";
|
|
2528
2492
|
return r2 < 0 && (i2 = e2.substr(r2)), e2.substr(0, a2) + s2 + i2;
|
|
2529
2493
|
}
|
|
2530
|
-
var
|
|
2494
|
+
var at = (function() {
|
|
2531
2495
|
function e2(e3) {
|
|
2532
2496
|
void 0 === e3 && (e3 = {}), this.newWindow = false, this.truncate = {}, this.className = "", this.newWindow = e3.newWindow || false, this.truncate = e3.truncate || {}, this.className = e3.className || "";
|
|
2533
2497
|
}
|
|
2534
2498
|
return e2.prototype.build = function(e3) {
|
|
2535
|
-
return new
|
|
2499
|
+
return new tt({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
|
|
2536
2500
|
}, e2.prototype.createAttrs = function(e3) {
|
|
2537
2501
|
var t2 = { href: e3.getAnchorHref() }, s2 = this.createCssClass(e3);
|
|
2538
2502
|
return s2 && (t2.class = s2), this.newWindow && (t2.target = "_blank", t2.rel = "noopener noreferrer"), this.truncate.length && this.truncate.length < e3.getAnchorText().length && (t2.title = e3.getAnchorHref()), t2;
|
|
@@ -2558,20 +2522,20 @@ var rt = (function() {
|
|
|
2558
2522
|
})(e4);
|
|
2559
2523
|
if (i2.query) {
|
|
2560
2524
|
var o2 = i2.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);
|
|
2561
|
-
o2 && (i2.query = i2.query.substr(0, o2[1].length), e4 =
|
|
2525
|
+
o2 && (i2.query = i2.query.substr(0, o2[1].length), e4 = st(i2));
|
|
2562
2526
|
}
|
|
2563
2527
|
if (e4.length <= t3) return e4;
|
|
2564
|
-
if (i2.host && (i2.host = i2.host.replace(/^www\./, ""), e4 =
|
|
2528
|
+
if (i2.host && (i2.host = i2.host.replace(/^www\./, ""), e4 = st(i2)), e4.length <= t3) return e4;
|
|
2565
2529
|
var c2 = "";
|
|
2566
|
-
if (i2.host && (c2 += i2.host), c2.length >= r2) return i2.host.length === t3 ? (i2.host.substr(0, t3 - a2) + s3).substr(0, r2 + n3) :
|
|
2530
|
+
if (i2.host && (c2 += i2.host), c2.length >= r2) return i2.host.length === t3 ? (i2.host.substr(0, t3 - a2) + s3).substr(0, r2 + n3) : nt(c2, r2, s3).substr(0, r2 + n3);
|
|
2567
2531
|
var l2 = "";
|
|
2568
2532
|
if (i2.path && (l2 += "/" + i2.path), i2.query && (l2 += "?" + i2.query), l2) {
|
|
2569
|
-
if ((c2 + l2).length >= r2) return (c2 + l2).length == t3 ? (c2 + l2).substr(0, t3) : (c2 +
|
|
2533
|
+
if ((c2 + l2).length >= r2) return (c2 + l2).length == t3 ? (c2 + l2).substr(0, t3) : (c2 + nt(l2, r2 - c2.length, s3)).substr(0, r2 + n3);
|
|
2570
2534
|
c2 += l2;
|
|
2571
2535
|
}
|
|
2572
2536
|
if (i2.fragment) {
|
|
2573
2537
|
var h2 = "#" + i2.fragment;
|
|
2574
|
-
if ((c2 + h2).length >= r2) return (c2 + h2).length == t3 ? (c2 + h2).substr(0, t3) : (c2 +
|
|
2538
|
+
if ((c2 + h2).length >= r2) return (c2 + h2).length == t3 ? (c2 + h2).substr(0, t3) : (c2 + nt(h2, r2 - c2.length, s3)).substr(0, r2 + n3);
|
|
2575
2539
|
c2 += h2;
|
|
2576
2540
|
}
|
|
2577
2541
|
if (i2.scheme && i2.host) {
|
|
@@ -2594,7 +2558,7 @@ var rt = (function() {
|
|
|
2594
2558
|
})(e4, t3, s3);
|
|
2595
2559
|
})(e3, s2);
|
|
2596
2560
|
}, e2;
|
|
2597
|
-
})(),
|
|
2561
|
+
})(), rt = (function() {
|
|
2598
2562
|
function e2(e3) {
|
|
2599
2563
|
this._ = null, this.matchedText = "", this.offset = 0, this.tagBuilder = e3.tagBuilder, this.matchedText = e3.matchedText, this.offset = e3.offset;
|
|
2600
2564
|
}
|
|
@@ -2610,55 +2574,55 @@ var rt = (function() {
|
|
|
2610
2574
|
return this.tagBuilder.build(this);
|
|
2611
2575
|
}, e2;
|
|
2612
2576
|
})();
|
|
2613
|
-
function
|
|
2577
|
+
function it(e2) {
|
|
2614
2578
|
return e2 >= 65 && e2 <= 90 || e2 >= 97 && e2 <= 122;
|
|
2615
2579
|
}
|
|
2616
|
-
function
|
|
2580
|
+
function ot(e2) {
|
|
2617
2581
|
return e2 >= 48 && e2 <= 57;
|
|
2618
2582
|
}
|
|
2619
|
-
function
|
|
2583
|
+
function ct(e2) {
|
|
2620
2584
|
return 34 == e2 || 39 == e2;
|
|
2621
2585
|
}
|
|
2622
|
-
function
|
|
2586
|
+
function lt(e2) {
|
|
2623
2587
|
return e2 < 8232 ? e2 < 160 ? e2 >= 9 && e2 <= 13 || 32 == e2 : e2 < 5760 ? 160 == e2 : 5760 == e2 || e2 >= 8192 && e2 <= 8202 : e2 < 8287 ? e2 >= 8232 && e2 <= 8233 || 8239 == e2 : e2 < 12288 ? 8287 == e2 : 12288 == e2 || 65279 == e2;
|
|
2624
2588
|
}
|
|
2625
|
-
function
|
|
2589
|
+
function ht(e2) {
|
|
2626
2590
|
return e2 < 4800 ? e2 < 2949 ? e2 < 2451 ? e2 < 1425 ? e2 < 768 ? e2 < 192 ? e2 < 169 ? e2 < 65 ? e2 >= 48 && e2 <= 57 : e2 >= 65 && e2 <= 90 || e2 >= 97 && e2 <= 122 : e2 < 181 ? e2 >= 169 && e2 <= 170 || 174 == e2 : 181 == e2 || 186 == e2 : e2 < 710 ? e2 < 216 ? e2 >= 192 && e2 <= 214 : e2 >= 216 && e2 <= 246 || e2 >= 248 && e2 <= 705 : e2 < 748 ? e2 >= 710 && e2 <= 721 || e2 >= 736 && e2 <= 740 : 748 == e2 || 750 == e2 : e2 < 910 ? e2 < 895 ? e2 < 886 ? e2 >= 768 && e2 <= 884 : e2 >= 886 && e2 <= 887 || e2 >= 890 && e2 <= 893 : e2 < 904 ? 895 == e2 || 902 == e2 : e2 >= 904 && e2 <= 906 || 908 == e2 : e2 < 1155 ? e2 < 931 ? e2 >= 910 && e2 <= 929 : e2 >= 931 && e2 <= 1013 || e2 >= 1015 && e2 <= 1153 : e2 < 1369 ? e2 >= 1155 && e2 <= 1327 || e2 >= 1329 && e2 <= 1366 : 1369 == e2 || e2 >= 1377 && e2 <= 1415 : e2 < 1808 ? e2 < 1552 ? e2 < 1476 ? e2 < 1471 ? e2 >= 1425 && e2 <= 1469 : 1471 == e2 || e2 >= 1473 && e2 <= 1474 : e2 < 1488 ? e2 >= 1476 && e2 <= 1477 || 1479 == e2 : e2 >= 1488 && e2 <= 1514 || e2 >= 1520 && e2 <= 1522 : e2 < 1749 ? e2 < 1568 ? e2 >= 1552 && e2 <= 1562 : e2 >= 1568 && e2 <= 1641 || e2 >= 1646 && e2 <= 1747 : e2 < 1770 ? e2 >= 1749 && e2 <= 1756 || e2 >= 1759 && e2 <= 1768 : e2 >= 1770 && e2 <= 1788 || 1791 == e2 : e2 < 2230 ? e2 < 2042 ? e2 < 1869 ? e2 >= 1808 && e2 <= 1866 : e2 >= 1869 && e2 <= 1969 || e2 >= 1984 && e2 <= 2037 : e2 < 2112 ? 2042 == e2 || e2 >= 2048 && e2 <= 2093 : e2 >= 2112 && e2 <= 2139 || e2 >= 2208 && e2 <= 2228 : e2 < 2406 ? e2 < 2260 ? e2 >= 2230 && e2 <= 2237 : e2 >= 2260 && e2 <= 2273 || e2 >= 2275 && e2 <= 2403 : e2 < 2437 ? e2 >= 2406 && e2 <= 2415 || e2 >= 2417 && e2 <= 2435 : e2 >= 2437 && e2 <= 2444 || e2 >= 2447 && e2 <= 2448 : e2 < 2693 ? e2 < 2579 ? e2 < 2519 ? e2 < 2486 ? e2 < 2474 ? e2 >= 2451 && e2 <= 2472 : e2 >= 2474 && e2 <= 2480 || 2482 == e2 : e2 < 2503 ? e2 >= 2486 && e2 <= 2489 || e2 >= 2492 && e2 <= 2500 : e2 >= 2503 && e2 <= 2504 || e2 >= 2507 && e2 <= 2510 : e2 < 2534 ? e2 < 2524 ? 2519 == e2 : e2 >= 2524 && e2 <= 2525 || e2 >= 2527 && e2 <= 2531 : e2 < 2565 ? e2 >= 2534 && e2 <= 2545 || e2 >= 2561 && e2 <= 2563 : e2 >= 2565 && e2 <= 2570 || e2 >= 2575 && e2 <= 2576 : e2 < 2631 ? e2 < 2613 ? e2 < 2602 ? e2 >= 2579 && e2 <= 2600 : e2 >= 2602 && e2 <= 2608 || e2 >= 2610 && e2 <= 2611 : e2 < 2620 ? e2 >= 2613 && e2 <= 2614 || e2 >= 2616 && e2 <= 2617 : 2620 == e2 || e2 >= 2622 && e2 <= 2626 : e2 < 2649 ? e2 < 2635 ? e2 >= 2631 && e2 <= 2632 : e2 >= 2635 && e2 <= 2637 || 2641 == e2 : e2 < 2662 ? e2 >= 2649 && e2 <= 2652 || 2654 == e2 : e2 >= 2662 && e2 <= 2677 || e2 >= 2689 && e2 <= 2691 : e2 < 2821 ? e2 < 2759 ? e2 < 2730 ? e2 < 2703 ? e2 >= 2693 && e2 <= 2701 : e2 >= 2703 && e2 <= 2705 || e2 >= 2707 && e2 <= 2728 : e2 < 2741 ? e2 >= 2730 && e2 <= 2736 || e2 >= 2738 && e2 <= 2739 : e2 >= 2741 && e2 <= 2745 || e2 >= 2748 && e2 <= 2757 : e2 < 2784 ? e2 < 2763 ? e2 >= 2759 && e2 <= 2761 : e2 >= 2763 && e2 <= 2765 || 2768 == e2 : e2 < 2809 ? e2 >= 2784 && e2 <= 2787 || e2 >= 2790 && e2 <= 2799 : 2809 == e2 || e2 >= 2817 && e2 <= 2819 : e2 < 2887 ? e2 < 2858 ? e2 < 2831 ? e2 >= 2821 && e2 <= 2828 : e2 >= 2831 && e2 <= 2832 || e2 >= 2835 && e2 <= 2856 : e2 < 2869 ? e2 >= 2858 && e2 <= 2864 || e2 >= 2866 && e2 <= 2867 : e2 >= 2869 && e2 <= 2873 || e2 >= 2876 && e2 <= 2884 : e2 < 2911 ? e2 < 2902 ? e2 >= 2887 && e2 <= 2888 || e2 >= 2891 && e2 <= 2893 : e2 >= 2902 && e2 <= 2903 || e2 >= 2908 && e2 <= 2909 : e2 < 2929 ? e2 >= 2911 && e2 <= 2915 || e2 >= 2918 && e2 <= 2927 : 2929 == e2 || e2 >= 2946 && e2 <= 2947 : e2 < 3517 ? e2 < 3205 ? e2 < 3046 ? e2 < 2984 ? e2 < 2969 ? e2 < 2958 ? e2 >= 2949 && e2 <= 2954 : e2 >= 2958 && e2 <= 2960 || e2 >= 2962 && e2 <= 2965 : e2 < 2974 ? e2 >= 2969 && e2 <= 2970 || 2972 == e2 : e2 >= 2974 && e2 <= 2975 || e2 >= 2979 && e2 <= 2980 : e2 < 3014 ? e2 < 2990 ? e2 >= 2984 && e2 <= 2986 : e2 >= 2990 && e2 <= 3001 || e2 >= 3006 && e2 <= 3010 : e2 < 3024 ? e2 >= 3014 && e2 <= 3016 || e2 >= 3018 && e2 <= 3021 : 3024 == e2 || 3031 == e2 : e2 < 3142 ? e2 < 3086 ? e2 < 3072 ? e2 >= 3046 && e2 <= 3055 : e2 >= 3072 && e2 <= 3075 || e2 >= 3077 && e2 <= 3084 : e2 < 3114 ? e2 >= 3086 && e2 <= 3088 || e2 >= 3090 && e2 <= 3112 : e2 >= 3114 && e2 <= 3129 || e2 >= 3133 && e2 <= 3140 : e2 < 3160 ? e2 < 3146 ? e2 >= 3142 && e2 <= 3144 : e2 >= 3146 && e2 <= 3149 || e2 >= 3157 && e2 <= 3158 : e2 < 3174 ? e2 >= 3160 && e2 <= 3162 || e2 >= 3168 && e2 <= 3171 : e2 >= 3174 && e2 <= 3183 || e2 >= 3200 && e2 <= 3203 : e2 < 3333 ? e2 < 3274 ? e2 < 3242 ? e2 < 3214 ? e2 >= 3205 && e2 <= 3212 : e2 >= 3214 && e2 <= 3216 || e2 >= 3218 && e2 <= 3240 : e2 < 3260 ? e2 >= 3242 && e2 <= 3251 || e2 >= 3253 && e2 <= 3257 : e2 >= 3260 && e2 <= 3268 || e2 >= 3270 && e2 <= 3272 : e2 < 3296 ? e2 < 3285 ? e2 >= 3274 && e2 <= 3277 : e2 >= 3285 && e2 <= 3286 || 3294 == e2 : e2 < 3313 ? e2 >= 3296 && e2 <= 3299 || e2 >= 3302 && e2 <= 3311 : e2 >= 3313 && e2 <= 3314 || e2 >= 3329 && e2 <= 3331 : e2 < 3423 ? e2 < 3389 ? e2 < 3342 ? e2 >= 3333 && e2 <= 3340 : e2 >= 3342 && e2 <= 3344 || e2 >= 3346 && e2 <= 3386 : e2 < 3402 ? e2 >= 3389 && e2 <= 3396 || e2 >= 3398 && e2 <= 3400 : e2 >= 3402 && e2 <= 3406 || e2 >= 3412 && e2 <= 3415 : e2 < 3458 ? e2 < 3430 ? e2 >= 3423 && e2 <= 3427 : e2 >= 3430 && e2 <= 3439 || e2 >= 3450 && e2 <= 3455 : e2 < 3482 ? e2 >= 3458 && e2 <= 3459 || e2 >= 3461 && e2 <= 3478 : e2 >= 3482 && e2 <= 3505 || e2 >= 3507 && e2 <= 3515 : e2 < 3804 ? e2 < 3722 ? e2 < 3570 ? e2 < 3535 ? e2 < 3520 ? 3517 == e2 : e2 >= 3520 && e2 <= 3526 || 3530 == e2 : e2 < 3544 ? e2 >= 3535 && e2 <= 3540 || 3542 == e2 : e2 >= 3544 && e2 <= 3551 || e2 >= 3558 && e2 <= 3567 : e2 < 3664 ? e2 < 3585 ? e2 >= 3570 && e2 <= 3571 : e2 >= 3585 && e2 <= 3642 || e2 >= 3648 && e2 <= 3662 : e2 < 3716 ? e2 >= 3664 && e2 <= 3673 || e2 >= 3713 && e2 <= 3714 : 3716 == e2 || e2 >= 3719 && e2 <= 3720 : e2 < 3754 ? e2 < 3737 ? e2 < 3725 ? 3722 == e2 : 3725 == e2 || e2 >= 3732 && e2 <= 3735 : e2 < 3749 ? e2 >= 3737 && e2 <= 3743 || e2 >= 3745 && e2 <= 3747 : 3749 == e2 || 3751 == e2 : e2 < 3776 ? e2 < 3757 ? e2 >= 3754 && e2 <= 3755 : e2 >= 3757 && e2 <= 3769 || e2 >= 3771 && e2 <= 3773 : e2 < 3784 ? e2 >= 3776 && e2 <= 3780 || 3782 == e2 : e2 >= 3784 && e2 <= 3789 || e2 >= 3792 && e2 <= 3801 : e2 < 4176 ? e2 < 3902 ? e2 < 3872 ? e2 < 3840 ? e2 >= 3804 && e2 <= 3807 : 3840 == e2 || e2 >= 3864 && e2 <= 3865 : e2 < 3895 ? e2 >= 3872 && e2 <= 3881 || 3893 == e2 : 3895 == e2 || 3897 == e2 : e2 < 3974 ? e2 < 3913 ? e2 >= 3902 && e2 <= 3911 : e2 >= 3913 && e2 <= 3948 || e2 >= 3953 && e2 <= 3972 : e2 < 4038 ? e2 >= 3974 && e2 <= 3991 || e2 >= 3993 && e2 <= 4028 : 4038 == e2 || e2 >= 4096 && e2 <= 4169 : e2 < 4688 ? e2 < 4301 ? e2 < 4256 ? e2 >= 4176 && e2 <= 4253 : e2 >= 4256 && e2 <= 4293 || 4295 == e2 : e2 < 4348 ? 4301 == e2 || e2 >= 4304 && e2 <= 4346 : e2 >= 4348 && e2 <= 4680 || e2 >= 4682 && e2 <= 4685 : e2 < 4746 ? e2 < 4698 ? e2 >= 4688 && e2 <= 4694 || 4696 == e2 : e2 >= 4698 && e2 <= 4701 || e2 >= 4704 && e2 <= 4744 : e2 < 4786 ? e2 >= 4746 && e2 <= 4749 || e2 >= 4752 && e2 <= 4784 : e2 >= 4786 && e2 <= 4789 || e2 >= 4792 && e2 <= 4798 : e2 < 11035 ? e2 < 7416 ? e2 < 6176 ? e2 < 5873 ? e2 < 4992 ? e2 < 4824 ? e2 < 4802 ? 4800 == e2 : e2 >= 4802 && e2 <= 4805 || e2 >= 4808 && e2 <= 4822 : e2 < 4888 ? e2 >= 4824 && e2 <= 4880 || e2 >= 4882 && e2 <= 4885 : e2 >= 4888 && e2 <= 4954 || e2 >= 4957 && e2 <= 4959 : e2 < 5121 ? e2 < 5024 ? e2 >= 4992 && e2 <= 5007 : e2 >= 5024 && e2 <= 5109 || e2 >= 5112 && e2 <= 5117 : e2 < 5761 ? e2 >= 5121 && e2 <= 5740 || e2 >= 5743 && e2 <= 5759 : e2 >= 5761 && e2 <= 5786 || e2 >= 5792 && e2 <= 5866 : e2 < 6002 ? e2 < 5920 ? e2 < 5888 ? e2 >= 5873 && e2 <= 5880 : e2 >= 5888 && e2 <= 5900 || e2 >= 5902 && e2 <= 5908 : e2 < 5984 ? e2 >= 5920 && e2 <= 5940 || e2 >= 5952 && e2 <= 5971 : e2 >= 5984 && e2 <= 5996 || e2 >= 5998 && e2 <= 6e3 : e2 < 6108 ? e2 < 6016 ? e2 >= 6002 && e2 <= 6003 : e2 >= 6016 && e2 <= 6099 || 6103 == e2 : e2 < 6155 ? e2 >= 6108 && e2 <= 6109 || e2 >= 6112 && e2 <= 6121 : e2 >= 6155 && e2 <= 6157 || e2 >= 6160 && e2 <= 6169 : e2 < 6783 ? e2 < 6512 ? e2 < 6400 ? e2 < 6272 ? e2 >= 6176 && e2 <= 6263 : e2 >= 6272 && e2 <= 6314 || e2 >= 6320 && e2 <= 6389 : e2 < 6448 ? e2 >= 6400 && e2 <= 6430 || e2 >= 6432 && e2 <= 6443 : e2 >= 6448 && e2 <= 6459 || e2 >= 6470 && e2 <= 6509 : e2 < 6608 ? e2 < 6528 ? e2 >= 6512 && e2 <= 6516 : e2 >= 6528 && e2 <= 6571 || e2 >= 6576 && e2 <= 6601 : e2 < 6688 ? e2 >= 6608 && e2 <= 6617 || e2 >= 6656 && e2 <= 6683 : e2 >= 6688 && e2 <= 6750 || e2 >= 6752 && e2 <= 6780 : e2 < 7040 ? e2 < 6832 ? e2 < 6800 ? e2 >= 6783 && e2 <= 6793 : e2 >= 6800 && e2 <= 6809 || 6823 == e2 : e2 < 6992 ? e2 >= 6832 && e2 <= 6846 || e2 >= 6912 && e2 <= 6987 : e2 >= 6992 && e2 <= 7001 || e2 >= 7019 && e2 <= 7027 : e2 < 7245 ? e2 < 7168 ? e2 >= 7040 && e2 <= 7155 : e2 >= 7168 && e2 <= 7223 || e2 >= 7232 && e2 <= 7241 : e2 < 7376 ? e2 >= 7245 && e2 <= 7293 || e2 >= 7296 && e2 <= 7304 : e2 >= 7376 && e2 <= 7378 || e2 >= 7380 && e2 <= 7414 : e2 < 8450 ? e2 < 8130 ? e2 < 8025 ? e2 < 7960 ? e2 < 7424 ? e2 >= 7416 && e2 <= 7417 : e2 >= 7424 && e2 <= 7669 || e2 >= 7675 && e2 <= 7957 : e2 < 8008 ? e2 >= 7960 && e2 <= 7965 || e2 >= 7968 && e2 <= 8005 : e2 >= 8008 && e2 <= 8013 || e2 >= 8016 && e2 <= 8023 : e2 < 8031 ? e2 < 8027 ? 8025 == e2 : 8027 == e2 || 8029 == e2 : e2 < 8118 ? e2 >= 8031 && e2 <= 8061 || e2 >= 8064 && e2 <= 8116 : e2 >= 8118 && e2 <= 8124 || 8126 == e2 : e2 < 8205 ? e2 < 8150 ? e2 < 8134 ? e2 >= 8130 && e2 <= 8132 : e2 >= 8134 && e2 <= 8140 || e2 >= 8144 && e2 <= 8147 : e2 < 8178 ? e2 >= 8150 && e2 <= 8155 || e2 >= 8160 && e2 <= 8172 : e2 >= 8178 && e2 <= 8180 || e2 >= 8182 && e2 <= 8188 : e2 < 8305 ? e2 < 8252 ? 8205 == e2 : 8252 == e2 || 8265 == e2 : e2 < 8336 ? 8305 == e2 || 8319 == e2 : e2 >= 8336 && e2 <= 8348 || e2 >= 8400 && e2 <= 8432 : e2 < 8579 ? e2 < 8486 ? e2 < 8469 ? e2 < 8455 ? 8450 == e2 : 8455 == e2 || e2 >= 8458 && e2 <= 8467 : e2 < 8482 ? 8469 == e2 || e2 >= 8473 && e2 <= 8477 : 8482 == e2 || 8484 == e2 : e2 < 8495 ? e2 < 8488 ? 8486 == e2 : 8488 == e2 || e2 >= 8490 && e2 <= 8493 : e2 < 8517 ? e2 >= 8495 && e2 <= 8505 || e2 >= 8508 && e2 <= 8511 : e2 >= 8517 && e2 <= 8521 || 8526 == e2 : e2 < 9410 ? e2 < 9e3 ? e2 < 8592 ? e2 >= 8579 && e2 <= 8580 : e2 >= 8592 && e2 <= 8703 || e2 >= 8986 && e2 <= 8987 : e2 < 9193 ? 9e3 == e2 || 9167 == e2 : e2 >= 9193 && e2 <= 9203 || e2 >= 9208 && e2 <= 9210 : e2 < 9723 ? e2 < 9654 ? 9410 == e2 || e2 >= 9642 && e2 <= 9643 : 9654 == e2 || 9664 == e2 : e2 < 10548 ? e2 >= 9723 && e2 <= 9726 || e2 >= 9728 && e2 <= 10175 : e2 >= 10548 && e2 <= 10549 || e2 >= 11013 && e2 <= 11015 : e2 < 43259 ? e2 < 12445 ? e2 < 11688 ? e2 < 11520 ? e2 < 11264 ? e2 < 11088 ? e2 >= 11035 && e2 <= 11036 : 11088 == e2 || 11093 == e2 : e2 < 11360 ? e2 >= 11264 && e2 <= 11310 || e2 >= 11312 && e2 <= 11358 : e2 >= 11360 && e2 <= 11492 || e2 >= 11499 && e2 <= 11507 : e2 < 11568 ? e2 < 11559 ? e2 >= 11520 && e2 <= 11557 : 11559 == e2 || 11565 == e2 : e2 < 11647 ? e2 >= 11568 && e2 <= 11623 || 11631 == e2 : e2 >= 11647 && e2 <= 11670 || e2 >= 11680 && e2 <= 11686 : e2 < 11744 ? e2 < 11712 ? e2 < 11696 ? e2 >= 11688 && e2 <= 11694 : e2 >= 11696 && e2 <= 11702 || e2 >= 11704 && e2 <= 11710 : e2 < 11728 ? e2 >= 11712 && e2 <= 11718 || e2 >= 11720 && e2 <= 11726 : e2 >= 11728 && e2 <= 11734 || e2 >= 11736 && e2 <= 11742 : e2 < 12330 ? e2 < 11823 ? e2 >= 11744 && e2 <= 11775 : 11823 == e2 || e2 >= 12293 && e2 <= 12294 : e2 < 12353 ? e2 >= 12330 && e2 <= 12341 || e2 >= 12347 && e2 <= 12349 : e2 >= 12353 && e2 <= 12438 || e2 >= 12441 && e2 <= 12442 : e2 < 42512 ? e2 < 12951 ? e2 < 12549 ? e2 < 12449 ? e2 >= 12445 && e2 <= 12447 : e2 >= 12449 && e2 <= 12538 || e2 >= 12540 && e2 <= 12543 : e2 < 12704 ? e2 >= 12549 && e2 <= 12589 || e2 >= 12593 && e2 <= 12686 : e2 >= 12704 && e2 <= 12730 || e2 >= 12784 && e2 <= 12799 : e2 < 19968 ? e2 < 12953 ? 12951 == e2 : 12953 == e2 || e2 >= 13312 && e2 <= 19893 : e2 < 42192 ? e2 >= 19968 && e2 <= 40917 || e2 >= 40960 && e2 <= 42124 : e2 >= 42192 && e2 <= 42237 || e2 >= 42240 && e2 <= 42508 : e2 < 42891 ? e2 < 42623 ? e2 < 42560 ? e2 >= 42512 && e2 <= 42539 : e2 >= 42560 && e2 <= 42610 || e2 >= 42612 && e2 <= 42621 : e2 < 42775 ? e2 >= 42623 && e2 <= 42725 || e2 >= 42736 && e2 <= 42737 : e2 >= 42775 && e2 <= 42783 || e2 >= 42786 && e2 <= 42888 : e2 < 43072 ? e2 < 42928 ? e2 >= 42891 && e2 <= 42926 : e2 >= 42928 && e2 <= 42935 || e2 >= 42999 && e2 <= 43047 : e2 < 43216 ? e2 >= 43072 && e2 <= 43123 || e2 >= 43136 && e2 <= 43205 : e2 >= 43216 && e2 <= 43225 || e2 >= 43232 && e2 <= 43255 : e2 < 55243 ? e2 < 43744 ? e2 < 43488 ? e2 < 43312 ? e2 < 43261 ? 43259 == e2 : 43261 == e2 || e2 >= 43264 && e2 <= 43309 : e2 < 43392 ? e2 >= 43312 && e2 <= 43347 || e2 >= 43360 && e2 <= 43388 : e2 >= 43392 && e2 <= 43456 || e2 >= 43471 && e2 <= 43481 : e2 < 43600 ? e2 < 43520 ? e2 >= 43488 && e2 <= 43518 : e2 >= 43520 && e2 <= 43574 || e2 >= 43584 && e2 <= 43597 : e2 < 43642 ? e2 >= 43600 && e2 <= 43609 || e2 >= 43616 && e2 <= 43638 : e2 >= 43642 && e2 <= 43714 || e2 >= 43739 && e2 <= 43741 : e2 < 43824 ? e2 < 43785 ? e2 < 43762 ? e2 >= 43744 && e2 <= 43759 : e2 >= 43762 && e2 <= 43766 || e2 >= 43777 && e2 <= 43782 : e2 < 43808 ? e2 >= 43785 && e2 <= 43790 || e2 >= 43793 && e2 <= 43798 : e2 >= 43808 && e2 <= 43814 || e2 >= 43816 && e2 <= 43822 : e2 < 44012 ? e2 < 43868 ? e2 >= 43824 && e2 <= 43866 : e2 >= 43868 && e2 <= 43877 || e2 >= 43888 && e2 <= 44010 : e2 < 44032 ? e2 >= 44012 && e2 <= 44013 || e2 >= 44016 && e2 <= 44025 : e2 >= 44032 && e2 <= 55203 || e2 >= 55216 && e2 <= 55238 : e2 < 64848 ? e2 < 64298 ? e2 < 64112 ? e2 < 55296 ? e2 >= 55243 && e2 <= 55291 : e2 >= 55296 && e2 <= 57343 || e2 >= 63744 && e2 <= 64109 : e2 < 64275 ? e2 >= 64112 && e2 <= 64217 || e2 >= 64256 && e2 <= 64262 : e2 >= 64275 && e2 <= 64279 || e2 >= 64285 && e2 <= 64296 : e2 < 64320 ? e2 < 64312 ? e2 >= 64298 && e2 <= 64310 : e2 >= 64312 && e2 <= 64316 || 64318 == e2 : e2 < 64326 ? e2 >= 64320 && e2 <= 64321 || e2 >= 64323 && e2 <= 64324 : e2 >= 64326 && e2 <= 64433 || e2 >= 64467 && e2 <= 64829 : e2 < 65296 ? e2 < 65024 ? e2 < 64914 ? e2 >= 64848 && e2 <= 64911 : e2 >= 64914 && e2 <= 64967 || e2 >= 65008 && e2 <= 65019 : e2 < 65136 ? e2 >= 65024 && e2 <= 65039 || e2 >= 65056 && e2 <= 65071 : e2 >= 65136 && e2 <= 65140 || e2 >= 65142 && e2 <= 65276 : e2 < 65474 ? e2 < 65345 ? e2 >= 65296 && e2 <= 65305 || e2 >= 65313 && e2 <= 65338 : e2 >= 65345 && e2 <= 65370 || e2 >= 65382 && e2 <= 65470 : e2 < 65490 ? e2 >= 65474 && e2 <= 65479 || e2 >= 65482 && e2 <= 65487 : e2 >= 65490 && e2 <= 65495 || e2 >= 65498 && e2 <= 65500;
|
|
2627
2591
|
}
|
|
2628
|
-
function
|
|
2592
|
+
function ut(e2) {
|
|
2629
2593
|
return e2 < 58 ? e2 < 44 ? 33 == e2 : 44 == e2 || 46 == e2 : e2 < 63 ? e2 >= 58 && e2 <= 59 : 63 == e2 || 94 == e2;
|
|
2630
2594
|
}
|
|
2631
|
-
function
|
|
2595
|
+
function dt(e2) {
|
|
2632
2596
|
return e2 < 91 ? 40 == e2 : 91 == e2 || 123 == e2;
|
|
2633
2597
|
}
|
|
2634
|
-
function
|
|
2598
|
+
function pt(e2) {
|
|
2635
2599
|
return e2 < 93 ? 41 == e2 : 93 == e2 || 125 == e2;
|
|
2636
2600
|
}
|
|
2637
|
-
var ft = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, gt = /https?:\/\//i, vt = new RegExp("^" + gt.source, "i"), bt = /^(javascript|vbscript):/i, yt = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, wt = /^(?:\/\/)?([^/#?:]+)/, kt = ot;
|
|
2638
|
-
function
|
|
2639
|
-
return
|
|
2601
|
+
var mt = /^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/, ft = /https?:\/\//i, gt = new RegExp("^" + ft.source, "i"), vt = /^(javascript|vbscript):/i, bt = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, wt = /^(?:\/\/)?([^/#?:]+)/, yt = it;
|
|
2602
|
+
function kt(e2) {
|
|
2603
|
+
return it(e2) || ot(e2) || 43 === e2 || 45 === e2 || 46 === e2;
|
|
2640
2604
|
}
|
|
2641
|
-
var
|
|
2642
|
-
function
|
|
2643
|
-
return 95 === e2 ||
|
|
2605
|
+
var St = ht;
|
|
2606
|
+
function Ct(e2) {
|
|
2607
|
+
return 95 === e2 || St(e2);
|
|
2644
2608
|
}
|
|
2645
|
-
function
|
|
2646
|
-
return
|
|
2609
|
+
function Tt(e2) {
|
|
2610
|
+
return ht(e2) || ((t2 = e2) < 91 ? t2 < 47 ? t2 >= 35 && t2 <= 43 || 45 == t2 : t2 < 61 ? 47 == t2 : 61 == t2 || 64 == t2 : t2 < 95 ? 91 == t2 || 93 == t2 : t2 < 123 ? 95 == t2 : t2 >= 123 && t2 <= 126 || 10003 == t2) || ut(e2);
|
|
2647
2611
|
var t2;
|
|
2648
2612
|
}
|
|
2649
|
-
function
|
|
2613
|
+
function It(e2) {
|
|
2650
2614
|
return 47 === e2 || 63 === e2 || 35 === e2;
|
|
2651
2615
|
}
|
|
2652
|
-
function
|
|
2653
|
-
return
|
|
2616
|
+
function xt(e2) {
|
|
2617
|
+
return mt.test(e2.toLowerCase());
|
|
2654
2618
|
}
|
|
2655
|
-
var
|
|
2656
|
-
var
|
|
2619
|
+
var Et = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, Mt = /[:/?#]/;
|
|
2620
|
+
var _t = /^(https?:\/\/)?(?:www\.)?/i, At = /^\/\//, Nt = (function(e2) {
|
|
2657
2621
|
function t2(t3) {
|
|
2658
2622
|
var s2 = e2.call(this, t3) || this;
|
|
2659
2623
|
return s2.type = "url", s2.url = "", s2.urlMatchType = "scheme", s2.protocolRelativeMatch = false, s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.protocolPrepended = false, s2.urlMatchType = t3.urlMatchType, s2.url = t3.url, s2.protocolRelativeMatch = t3.protocolRelativeMatch, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
|
|
2660
2624
|
}
|
|
2661
|
-
return
|
|
2625
|
+
return Ye(t2, e2), t2.prototype.getType = function() {
|
|
2662
2626
|
return "url";
|
|
2663
2627
|
}, t2.prototype.getUrlMatchType = function() {
|
|
2664
2628
|
return this.urlMatchType;
|
|
@@ -2669,8 +2633,8 @@ var Nt = /^(https?:\/\/)?(?:www\.)?/i, Rt = /^\/\//, Dt = (function(e2) {
|
|
|
2669
2633
|
return this.getUrl().replace(/&/g, "&");
|
|
2670
2634
|
}, t2.prototype.getAnchorText = function() {
|
|
2671
2635
|
var e3 = this.getMatchedText();
|
|
2672
|
-
return this.protocolRelativeMatch && (e3 = e3.replace(
|
|
2673
|
-
return e4.includes("www.") ? e4.replace(
|
|
2636
|
+
return this.protocolRelativeMatch && (e3 = e3.replace(At, "")), this.stripPrefix.scheme && (e3 = e3.replace(gt, "")), this.stripPrefix.www && (e3 = (function(e4) {
|
|
2637
|
+
return e4.includes("www.") ? e4.replace(_t, "$1") : e4;
|
|
2674
2638
|
})(e3)), this.stripTrailingSlash && (e3 = (function(e4) {
|
|
2675
2639
|
"/" === e4.charAt(e4.length - 1) && (e4 = e4.slice(0, -1));
|
|
2676
2640
|
return e4;
|
|
@@ -2685,18 +2649,18 @@ var Nt = /^(https?:\/\/)?(?:www\.)?/i, Rt = /^\/\//, Dt = (function(e2) {
|
|
|
2685
2649
|
return t3;
|
|
2686
2650
|
})(e3)), e3;
|
|
2687
2651
|
}, t2;
|
|
2688
|
-
})(
|
|
2689
|
-
var
|
|
2690
|
-
function
|
|
2691
|
-
return
|
|
2652
|
+
})(rt);
|
|
2653
|
+
var Dt = /^mailto:/i, Rt = ht;
|
|
2654
|
+
function Ot(e2) {
|
|
2655
|
+
return Rt(e2) || ((t2 = e2) < 47 ? t2 < 42 ? 33 == t2 || t2 >= 35 && t2 <= 39 : t2 >= 42 && t2 <= 43 || 45 == t2 : t2 < 63 ? 47 == t2 || 61 == t2 : t2 < 94 ? 63 == t2 : t2 >= 94 && t2 <= 96 || t2 >= 123 && t2 <= 126);
|
|
2692
2656
|
var t2;
|
|
2693
2657
|
}
|
|
2694
|
-
var
|
|
2658
|
+
var Pt = (function(e2) {
|
|
2695
2659
|
function t2(t3) {
|
|
2696
2660
|
var s2 = e2.call(this, t3) || this;
|
|
2697
2661
|
return s2.type = "email", s2.email = "", s2.email = t3.email, s2;
|
|
2698
2662
|
}
|
|
2699
|
-
return
|
|
2663
|
+
return Ye(t2, e2), t2.prototype.getType = function() {
|
|
2700
2664
|
return "email";
|
|
2701
2665
|
}, t2.prototype.getEmail = function() {
|
|
2702
2666
|
return this.email;
|
|
@@ -2705,16 +2669,16 @@ var jt = (function(e2) {
|
|
|
2705
2669
|
}, t2.prototype.getAnchorText = function() {
|
|
2706
2670
|
return this.email;
|
|
2707
2671
|
}, t2;
|
|
2708
|
-
})(
|
|
2709
|
-
function
|
|
2710
|
-
return 95 === e2 ||
|
|
2672
|
+
})(rt);
|
|
2673
|
+
function jt(e2) {
|
|
2674
|
+
return 95 === e2 || ht(e2);
|
|
2711
2675
|
}
|
|
2712
|
-
var
|
|
2676
|
+
var $t = ["twitter", "facebook", "instagram", "tiktok", "youtube"], Ut = (function(e2) {
|
|
2713
2677
|
function t2(t3) {
|
|
2714
2678
|
var s2 = e2.call(this, t3) || this;
|
|
2715
2679
|
return s2.type = "hashtag", s2.serviceName = "twitter", s2.hashtag = "", s2.serviceName = t3.serviceName, s2.hashtag = t3.hashtag, s2;
|
|
2716
2680
|
}
|
|
2717
|
-
return
|
|
2681
|
+
return Ye(t2, e2), t2.prototype.getType = function() {
|
|
2718
2682
|
return "hashtag";
|
|
2719
2683
|
}, t2.prototype.getServiceName = function() {
|
|
2720
2684
|
return this.serviceName;
|
|
@@ -2734,7 +2698,7 @@ var Ut = ["twitter", "facebook", "instagram", "tiktok", "youtube"], Wt = (functi
|
|
|
2734
2698
|
case "youtube":
|
|
2735
2699
|
return "https://youtube.com/hashtag/" + t3;
|
|
2736
2700
|
default:
|
|
2737
|
-
|
|
2701
|
+
Xe(e3);
|
|
2738
2702
|
}
|
|
2739
2703
|
}, t2.prototype.getAnchorText = function() {
|
|
2740
2704
|
return "#" + this.hashtag;
|
|
@@ -2742,16 +2706,16 @@ var Ut = ["twitter", "facebook", "instagram", "tiktok", "youtube"], Wt = (functi
|
|
|
2742
2706
|
var t3 = e2.prototype.getCssClassSuffixes.call(this), s2 = this.getServiceName();
|
|
2743
2707
|
return s2 && t3.push(s2), t3;
|
|
2744
2708
|
}, t2;
|
|
2745
|
-
})(
|
|
2746
|
-
function
|
|
2747
|
-
return 45 === e2 || 46 === e2 || 95 === e2 ||
|
|
2709
|
+
})(rt), Wt = { twitter: /^@\w{1,15}$/, instagram: /^@[_\w]{1,30}$/, soundcloud: /^@[-a-z0-9_]{3,25}$/, tiktok: /^@[.\w]{1,23}[\w]$/, youtube: /^@[-.·\w]{3,30}$/ };
|
|
2710
|
+
function qt(e2) {
|
|
2711
|
+
return 45 === e2 || 46 === e2 || 95 === e2 || it(e2) || ot(e2);
|
|
2748
2712
|
}
|
|
2749
|
-
var Lt = ["twitter", "instagram", "soundcloud", "tiktok", "youtube"],
|
|
2713
|
+
var Lt = ["twitter", "instagram", "soundcloud", "tiktok", "youtube"], Bt = (function(e2) {
|
|
2750
2714
|
function t2(t3) {
|
|
2751
2715
|
var s2 = e2.call(this, t3) || this;
|
|
2752
2716
|
return s2.type = "mention", s2.serviceName = "twitter", s2.mention = "", s2.mention = t3.mention, s2.serviceName = t3.serviceName, s2;
|
|
2753
2717
|
}
|
|
2754
|
-
return
|
|
2718
|
+
return Ye(t2, e2), t2.prototype.getType = function() {
|
|
2755
2719
|
return "mention";
|
|
2756
2720
|
}, t2.prototype.getMention = function() {
|
|
2757
2721
|
return this.mention;
|
|
@@ -2770,7 +2734,7 @@ var Lt = ["twitter", "instagram", "soundcloud", "tiktok", "youtube"], Gt = (func
|
|
|
2770
2734
|
case "youtube":
|
|
2771
2735
|
return "https://youtube.com/@" + this.mention;
|
|
2772
2736
|
default:
|
|
2773
|
-
|
|
2737
|
+
Xe(this.serviceName);
|
|
2774
2738
|
}
|
|
2775
2739
|
}, t2.prototype.getAnchorText = function() {
|
|
2776
2740
|
return "@" + this.mention;
|
|
@@ -2778,19 +2742,19 @@ var Lt = ["twitter", "instagram", "soundcloud", "tiktok", "youtube"], Gt = (func
|
|
|
2778
2742
|
var t3 = e2.prototype.getCssClassSuffixes.call(this), s2 = this.getServiceName();
|
|
2779
2743
|
return s2 && t3.push(s2), t3;
|
|
2780
2744
|
}, t2;
|
|
2781
|
-
})(
|
|
2782
|
-
function
|
|
2745
|
+
})(rt), Gt = /[-. ()]/, Ft = new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source, "|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source, "$"));
|
|
2746
|
+
function Ht(e2) {
|
|
2783
2747
|
return 45 === e2 || 46 === e2 || 32 === e2;
|
|
2784
2748
|
}
|
|
2785
2749
|
function zt(e2) {
|
|
2786
2750
|
return 44 === e2 || 59 === e2;
|
|
2787
2751
|
}
|
|
2788
|
-
var
|
|
2752
|
+
var Jt = (function(e2) {
|
|
2789
2753
|
function t2(t3) {
|
|
2790
2754
|
var s2 = e2.call(this, t3) || this;
|
|
2791
2755
|
return s2.type = "phone", s2.number = "", s2.plusSign = false, s2.number = t3.number, s2.plusSign = t3.plusSign, s2;
|
|
2792
2756
|
}
|
|
2793
|
-
return
|
|
2757
|
+
return Ye(t2, e2), t2.prototype.getType = function() {
|
|
2794
2758
|
return "phone";
|
|
2795
2759
|
}, t2.prototype.getPhoneNumber = function() {
|
|
2796
2760
|
return this.number;
|
|
@@ -2801,191 +2765,191 @@ var Yt = (function(e2) {
|
|
|
2801
2765
|
}, t2.prototype.getAnchorText = function() {
|
|
2802
2766
|
return this.matchedText;
|
|
2803
2767
|
}, t2;
|
|
2804
|
-
})(
|
|
2768
|
+
})(rt), Yt = (function() {
|
|
2805
2769
|
function e2(e3, t2) {
|
|
2806
2770
|
this.charIdx = 0, this.matches = [], this._stateMachines = [], this.schemeUrlMachinesCount = 0, this.text = e3, this.tagBuilder = t2.tagBuilder, this.stripPrefix = t2.stripPrefix, this.stripTrailingSlash = t2.stripTrailingSlash, this.decodePercentEncoding = t2.decodePercentEncoding, this.hashtagServiceName = t2.hashtagServiceName, this.mentionServiceName = t2.mentionServiceName;
|
|
2807
2771
|
}
|
|
2808
2772
|
return Object.defineProperty(e2.prototype, "stateMachines", { get: function() {
|
|
2809
2773
|
return this._stateMachines;
|
|
2810
2774
|
}, enumerable: false, configurable: true }), e2.prototype.addMachine = function(e3) {
|
|
2811
|
-
this._stateMachines.push(e3),
|
|
2775
|
+
this._stateMachines.push(e3), Fs(e3) && this.schemeUrlMachinesCount++;
|
|
2812
2776
|
}, e2.prototype.removeMachine = function(e3) {
|
|
2813
2777
|
this._stateMachines = this._stateMachines.filter(function(t2) {
|
|
2814
2778
|
return t2 !== e3;
|
|
2815
|
-
}),
|
|
2779
|
+
}), Fs(e3) && this.schemeUrlMachinesCount--;
|
|
2816
2780
|
}, e2.prototype.hasSchemeUrlMachine = function() {
|
|
2817
2781
|
return this.schemeUrlMachinesCount > 0;
|
|
2818
2782
|
}, e2;
|
|
2819
2783
|
})();
|
|
2820
|
-
function
|
|
2784
|
+
function Qt(e2, t2, s2) {
|
|
2821
2785
|
var n2 = e2.charIdx;
|
|
2822
2786
|
if (35 === s2) e2.addMachine({ type: 2, startIdx: n2, state: 28, acceptStateReached: false });
|
|
2823
2787
|
else if (64 === s2) e2.addMachine(/* @__PURE__ */ (function(e3, t3) {
|
|
2824
2788
|
return { type: 3, startIdx: e3, state: t3, acceptStateReached: false };
|
|
2825
2789
|
})(n2, 30));
|
|
2826
|
-
else if (47 === s2) e2.addMachine(
|
|
2827
|
-
else if (43 === s2) e2.addMachine(
|
|
2828
|
-
else if (40 === s2) e2.addMachine(
|
|
2790
|
+
else if (47 === s2) e2.addMachine(Bs(n2, 11));
|
|
2791
|
+
else if (43 === s2) e2.addMachine(Gs(n2, 37));
|
|
2792
|
+
else if (40 === s2) e2.addMachine(Gs(n2, 32));
|
|
2829
2793
|
else {
|
|
2830
|
-
if (
|
|
2794
|
+
if (ot(s2) && (e2.addMachine(Gs(n2, 38)), e2.addMachine(/* @__PURE__ */ (function(e3, t3) {
|
|
2831
2795
|
return { type: 0, startIdx: e3, state: t3, acceptStateReached: false, matchType: 2, octetsEncountered: 1 };
|
|
2832
|
-
})(n2, 13))),
|
|
2796
|
+
})(n2, 13))), Rt(s2)) {
|
|
2833
2797
|
var a2 = "m" === t2.toLowerCase() ? 15 : 22;
|
|
2834
2798
|
e2.addMachine(/* @__PURE__ */ (function(e3, t3) {
|
|
2835
2799
|
return { type: 1, startIdx: e3, state: t3, acceptStateReached: false };
|
|
2836
2800
|
})(n2, a2));
|
|
2837
2801
|
}
|
|
2838
|
-
|
|
2802
|
+
yt(s2) && e2.addMachine(Ls(n2, 0)), ht(s2) && e2.addMachine(Bs(n2, 5));
|
|
2839
2803
|
}
|
|
2840
2804
|
}
|
|
2805
|
+
function Vt(e2, t2, s2) {
|
|
2806
|
+
58 === s2 ? t2.state = 2 : 45 === s2 ? t2.state = 1 : kt(s2) || e2.removeMachine(t2);
|
|
2807
|
+
}
|
|
2841
2808
|
function Kt(e2, t2, s2) {
|
|
2842
|
-
|
|
2809
|
+
var n2 = e2.charIdx;
|
|
2810
|
+
45 === s2 || (47 === s2 ? (e2.removeMachine(t2), e2.addMachine(Bs(n2, 11))) : kt(s2) ? t2.state = 0 : e2.removeMachine(t2));
|
|
2843
2811
|
}
|
|
2844
2812
|
function Zt(e2, t2, s2) {
|
|
2845
2813
|
var n2 = e2.charIdx;
|
|
2846
|
-
|
|
2814
|
+
47 === s2 ? t2.state = 3 : 46 === s2 ? e2.removeMachine(t2) : St(s2) ? (t2.state = 5, yt(s2) && e2.addMachine(Ls(n2, 0))) : e2.removeMachine(t2);
|
|
2847
2815
|
}
|
|
2848
2816
|
function Xt(e2, t2, s2) {
|
|
2849
|
-
|
|
2850
|
-
47 === s2 ? t2.state = 3 : 46 === s2 ? e2.removeMachine(t2) : Tt(s2) ? (t2.state = 5, kt(s2) && e2.addMachine(Ls(n2, 0))) : e2.removeMachine(t2);
|
|
2817
|
+
47 === s2 ? t2.state = 4 : Tt(s2) ? (t2.state = 10, t2.acceptStateReached = true) : Us(e2, t2);
|
|
2851
2818
|
}
|
|
2852
|
-
function es(e2, t2, s2) {
|
|
2853
|
-
47 ===
|
|
2819
|
+
function es(e2, t2, s2, n2) {
|
|
2820
|
+
47 === n2 ? (t2.state = 10, t2.acceptStateReached = true) : St(n2) ? (t2.state = 5, t2.acceptStateReached = true) : e2.removeMachine(t2);
|
|
2854
2821
|
}
|
|
2855
|
-
function ts(e2, t2, s2
|
|
2856
|
-
47 ===
|
|
2822
|
+
function ts(e2, t2, s2) {
|
|
2823
|
+
47 === s2 ? t2.state = 12 : e2.removeMachine(t2);
|
|
2857
2824
|
}
|
|
2858
2825
|
function ss(e2, t2, s2) {
|
|
2859
|
-
|
|
2826
|
+
St(s2) ? t2.state = 5 : e2.removeMachine(t2);
|
|
2860
2827
|
}
|
|
2861
2828
|
function ns(e2, t2, s2) {
|
|
2862
|
-
|
|
2829
|
+
46 === s2 ? t2.state = 7 : 45 === s2 ? t2.state = 6 : 58 === s2 ? t2.state = 8 : It(s2) ? t2.state = 10 : Ct(s2) || Us(e2, t2);
|
|
2863
2830
|
}
|
|
2864
|
-
function as(e2, t2, s2) {
|
|
2865
|
-
|
|
2831
|
+
function as(e2, t2, s2, n2) {
|
|
2832
|
+
45 === n2 || (46 === n2 ? Us(e2, t2) : St(n2) ? t2.state = 5 : Us(e2, t2));
|
|
2866
2833
|
}
|
|
2867
2834
|
function rs(e2, t2, s2, n2) {
|
|
2868
|
-
|
|
2835
|
+
46 === n2 ? Us(e2, t2) : St(n2) ? (t2.state = 5, t2.acceptStateReached = true) : Us(e2, t2);
|
|
2869
2836
|
}
|
|
2870
|
-
function is(e2, t2, s2
|
|
2871
|
-
46 ===
|
|
2837
|
+
function is(e2, t2, s2) {
|
|
2838
|
+
46 === s2 ? t2.state = 14 : 58 === s2 ? t2.state = 8 : ot(s2) || (It(s2) ? t2.state = 10 : ht(s2) ? e2.removeMachine(t2) : Us(e2, t2));
|
|
2872
2839
|
}
|
|
2873
2840
|
function os(e2, t2, s2) {
|
|
2874
|
-
|
|
2841
|
+
ot(s2) ? (t2.octetsEncountered++, 4 === t2.octetsEncountered && (t2.acceptStateReached = true), t2.state = 13) : Us(e2, t2);
|
|
2875
2842
|
}
|
|
2876
2843
|
function cs(e2, t2, s2) {
|
|
2877
|
-
|
|
2844
|
+
ot(s2) ? t2.state = 9 : Us(e2, t2);
|
|
2878
2845
|
}
|
|
2879
2846
|
function ls(e2, t2, s2) {
|
|
2880
|
-
|
|
2847
|
+
ot(s2) || (It(s2) ? t2.state = 10 : Us(e2, t2));
|
|
2881
2848
|
}
|
|
2882
2849
|
function hs(e2, t2, s2) {
|
|
2883
|
-
|
|
2850
|
+
Tt(s2) || Us(e2, t2);
|
|
2884
2851
|
}
|
|
2885
|
-
function us(e2, t2, s2) {
|
|
2886
|
-
|
|
2852
|
+
function us(e2, t2, s2, n2) {
|
|
2853
|
+
"a" === s2.toLowerCase() ? t2.state = 16 : bs(e2, t2, n2);
|
|
2887
2854
|
}
|
|
2888
2855
|
function ds(e2, t2, s2, n2) {
|
|
2889
|
-
"
|
|
2856
|
+
"i" === s2.toLowerCase() ? t2.state = 17 : bs(e2, t2, n2);
|
|
2890
2857
|
}
|
|
2891
2858
|
function ps(e2, t2, s2, n2) {
|
|
2892
|
-
"
|
|
2859
|
+
"l" === s2.toLowerCase() ? t2.state = 18 : bs(e2, t2, n2);
|
|
2893
2860
|
}
|
|
2894
2861
|
function ms(e2, t2, s2, n2) {
|
|
2895
|
-
"
|
|
2862
|
+
"t" === s2.toLowerCase() ? t2.state = 19 : bs(e2, t2, n2);
|
|
2896
2863
|
}
|
|
2897
2864
|
function fs(e2, t2, s2, n2) {
|
|
2898
|
-
"
|
|
2865
|
+
"o" === s2.toLowerCase() ? t2.state = 20 : bs(e2, t2, n2);
|
|
2899
2866
|
}
|
|
2900
|
-
function gs(e2, t2, s2
|
|
2901
|
-
|
|
2867
|
+
function gs(e2, t2, s2) {
|
|
2868
|
+
58 === s2 ? t2.state = 21 : bs(e2, t2, s2);
|
|
2902
2869
|
}
|
|
2903
2870
|
function vs(e2, t2, s2) {
|
|
2904
|
-
|
|
2871
|
+
Ot(s2) ? t2.state = 22 : e2.removeMachine(t2);
|
|
2905
2872
|
}
|
|
2906
2873
|
function bs(e2, t2, s2) {
|
|
2907
|
-
|
|
2908
|
-
}
|
|
2909
|
-
function ys(e2, t2, s2) {
|
|
2910
|
-
46 === s2 ? t2.state = 23 : 64 === s2 ? t2.state = 24 : Pt(s2) ? t2.state = 22 : e2.removeMachine(t2);
|
|
2874
|
+
46 === s2 ? t2.state = 23 : 64 === s2 ? t2.state = 24 : Ot(s2) ? t2.state = 22 : e2.removeMachine(t2);
|
|
2911
2875
|
}
|
|
2912
2876
|
function ws(e2, t2, s2) {
|
|
2913
|
-
46 === s2 || 64 === s2 ? e2.removeMachine(t2) :
|
|
2877
|
+
46 === s2 || 64 === s2 ? e2.removeMachine(t2) : Ot(s2) ? t2.state = 22 : e2.removeMachine(t2);
|
|
2878
|
+
}
|
|
2879
|
+
function ys(e2, t2, s2) {
|
|
2880
|
+
St(s2) ? t2.state = 25 : e2.removeMachine(t2);
|
|
2914
2881
|
}
|
|
2915
2882
|
function ks(e2, t2, s2) {
|
|
2916
|
-
|
|
2883
|
+
46 === s2 ? t2.state = 27 : 45 === s2 ? t2.state = 26 : Ct(s2) || Us(e2, t2);
|
|
2884
|
+
}
|
|
2885
|
+
function Ss(e2, t2, s2) {
|
|
2886
|
+
45 === s2 || 46 === s2 ? Us(e2, t2) : Ct(s2) ? t2.state = 25 : Us(e2, t2);
|
|
2917
2887
|
}
|
|
2918
2888
|
function Cs(e2, t2, s2) {
|
|
2919
|
-
46 === s2
|
|
2889
|
+
46 === s2 || 45 === s2 ? Us(e2, t2) : St(s2) ? (t2.state = 25, t2.acceptStateReached = true) : Us(e2, t2);
|
|
2920
2890
|
}
|
|
2921
2891
|
function Ts(e2, t2, s2) {
|
|
2922
|
-
|
|
2892
|
+
jt(s2) ? (t2.state = 29, t2.acceptStateReached = true) : e2.removeMachine(t2);
|
|
2923
2893
|
}
|
|
2924
2894
|
function Is(e2, t2, s2) {
|
|
2925
|
-
|
|
2926
|
-
}
|
|
2927
|
-
function Ss(e2, t2, s2) {
|
|
2928
|
-
$t(s2) ? (t2.state = 29, t2.acceptStateReached = true) : e2.removeMachine(t2);
|
|
2895
|
+
jt(s2) || Us(e2, t2);
|
|
2929
2896
|
}
|
|
2930
2897
|
function xs(e2, t2, s2) {
|
|
2931
|
-
|
|
2898
|
+
qt(s2) ? (t2.state = 31, t2.acceptStateReached = true) : e2.removeMachine(t2);
|
|
2932
2899
|
}
|
|
2933
2900
|
function Es(e2, t2, s2) {
|
|
2934
|
-
|
|
2901
|
+
qt(s2) || (ht(s2) ? e2.removeMachine(t2) : Us(e2, t2));
|
|
2935
2902
|
}
|
|
2936
|
-
function Ms(e2, t2, s2) {
|
|
2937
|
-
|
|
2903
|
+
function Ms(e2, t2, s2, n2) {
|
|
2904
|
+
ot(n2) ? t2.state = 38 : (e2.removeMachine(t2), Qt(e2, s2, n2));
|
|
2938
2905
|
}
|
|
2939
|
-
function
|
|
2940
|
-
|
|
2906
|
+
function _s(e2, t2, s2, n2) {
|
|
2907
|
+
ot(n2) ? t2.state = 33 : e2.removeMachine(t2), Qt(e2, s2, n2);
|
|
2941
2908
|
}
|
|
2942
|
-
function
|
|
2943
|
-
|
|
2909
|
+
function As(e2, t2, s2) {
|
|
2910
|
+
ot(s2) ? t2.state = 34 : e2.removeMachine(t2);
|
|
2944
2911
|
}
|
|
2945
|
-
function
|
|
2946
|
-
|
|
2912
|
+
function Ns(e2, t2, s2) {
|
|
2913
|
+
ot(s2) ? t2.state = 35 : e2.removeMachine(t2);
|
|
2947
2914
|
}
|
|
2948
2915
|
function Ds(e2, t2, s2) {
|
|
2949
|
-
ct(s2) ? t2.state = 35 : e2.removeMachine(t2);
|
|
2950
|
-
}
|
|
2951
|
-
function _s(e2, t2, s2) {
|
|
2952
2916
|
41 === s2 ? t2.state = 36 : e2.removeMachine(t2);
|
|
2953
2917
|
}
|
|
2918
|
+
function Rs(e2, t2, s2, n2) {
|
|
2919
|
+
ot(n2) ? t2.state = 38 : Ht(n2) ? t2.state = 39 : e2.removeMachine(t2);
|
|
2920
|
+
}
|
|
2954
2921
|
function Os(e2, t2, s2, n2) {
|
|
2955
|
-
|
|
2922
|
+
var a2 = e2.charIdx;
|
|
2923
|
+
t2.acceptStateReached = true, zt(n2) ? t2.state = 40 : 35 === n2 ? t2.state = 41 : ot(n2) || (40 === n2 ? t2.state = 32 : Ht(n2) ? t2.state = 39 : (Us(e2, t2), yt(n2) && e2.addMachine(Ls(a2, 0))));
|
|
2956
2924
|
}
|
|
2957
2925
|
function Ps(e2, t2, s2, n2) {
|
|
2958
|
-
|
|
2959
|
-
t2.acceptStateReached = true, zt(n2) ? t2.state = 40 : 35 === n2 ? t2.state = 41 : ct(n2) || (40 === n2 ? t2.state = 32 : Jt(n2) ? t2.state = 39 : (Ws(e2, t2), kt(n2) && e2.addMachine(Ls(a2, 0))));
|
|
2926
|
+
ot(n2) ? t2.state = 38 : 40 === n2 ? t2.state = 32 : (Us(e2, t2), Qt(e2, s2, n2));
|
|
2960
2927
|
}
|
|
2961
|
-
function js(e2, t2, s2
|
|
2962
|
-
|
|
2928
|
+
function js(e2, t2, s2) {
|
|
2929
|
+
zt(s2) || (35 === s2 ? t2.state = 41 : ot(s2) ? t2.state = 38 : Us(e2, t2));
|
|
2963
2930
|
}
|
|
2964
2931
|
function $s(e2, t2, s2) {
|
|
2965
|
-
zt(s2)
|
|
2932
|
+
zt(s2) ? t2.state = 40 : ot(s2) ? e2.removeMachine(t2) : Us(e2, t2);
|
|
2966
2933
|
}
|
|
2967
|
-
function Us(e2, t2
|
|
2968
|
-
zt(s2) ? t2.state = 40 : ct(s2) ? e2.removeMachine(t2) : Ws(e2, t2);
|
|
2969
|
-
}
|
|
2970
|
-
function Ws(e2, t2) {
|
|
2934
|
+
function Us(e2, t2) {
|
|
2971
2935
|
var s2 = e2.matches, n2 = e2.text, a2 = e2.charIdx, r2 = e2.tagBuilder, i2 = e2.stripPrefix, o2 = e2.stripTrailingSlash, c2 = e2.decodePercentEncoding, l2 = e2.hashtagServiceName, h2 = e2.mentionServiceName;
|
|
2972
2936
|
if (e2.removeMachine(t2), t2.acceptStateReached) {
|
|
2973
2937
|
var u2, d2, p2 = t2.startIdx, m2 = n2.slice(t2.startIdx, a2);
|
|
2974
2938
|
switch (m2 = (function(e3) {
|
|
2975
2939
|
for (var t3 = { "(": 0, "{": 0, "[": 0 }, s3 = 0; s3 < e3.length; s3++) {
|
|
2976
2940
|
var n3 = e3.charAt(s3);
|
|
2977
|
-
|
|
2941
|
+
dt(r3 = e3.charCodeAt(s3)) ? t3[n3]++ : pt(r3) && t3[qs[n3]]--;
|
|
2978
2942
|
}
|
|
2979
2943
|
var a3 = e3.length - 1;
|
|
2980
2944
|
for (; a3 >= 0; ) {
|
|
2981
2945
|
var r3;
|
|
2982
2946
|
n3 = e3.charAt(a3);
|
|
2983
|
-
if (
|
|
2984
|
-
var i3 =
|
|
2947
|
+
if (pt(r3 = e3.charCodeAt(a3))) {
|
|
2948
|
+
var i3 = qs[n3];
|
|
2985
2949
|
if (!(t3[i3] < 0)) break;
|
|
2986
2950
|
t3[i3]++, a3--;
|
|
2987
2951
|
} else {
|
|
2988
|
-
if (!
|
|
2952
|
+
if (!ut(r3)) break;
|
|
2989
2953
|
a3--;
|
|
2990
2954
|
}
|
|
2991
2955
|
}
|
|
@@ -2995,10 +2959,10 @@ function Ws(e2, t2) {
|
|
|
2995
2959
|
if (64 === n2.charCodeAt(t2.startIdx - 1)) return;
|
|
2996
2960
|
switch (t2.matchType) {
|
|
2997
2961
|
case 0:
|
|
2998
|
-
var f2 =
|
|
2962
|
+
var f2 = ft.exec(m2);
|
|
2999
2963
|
if (f2 && (p2 += f2.index, m2 = m2.slice(f2.index)), !(function(e3) {
|
|
3000
|
-
if (
|
|
3001
|
-
var t3 = e3.match(
|
|
2964
|
+
if (vt.test(e3)) return false;
|
|
2965
|
+
var t3 = e3.match(bt);
|
|
3002
2966
|
if (!t3) return false;
|
|
3003
2967
|
var s3 = !!t3[1], n3 = t3[2];
|
|
3004
2968
|
return !!s3 || !(-1 === n3.indexOf(".") || !/[A-Za-z]/.test(n3));
|
|
@@ -3009,40 +2973,40 @@ function Ws(e2, t2) {
|
|
|
3009
2973
|
var t3 = e3.match(wt);
|
|
3010
2974
|
if (!t3) return false;
|
|
3011
2975
|
var s3 = t3[0].split(".");
|
|
3012
|
-
return !(s3.length < 2 || !
|
|
2976
|
+
return !(s3.length < 2 || !xt(s3[s3.length - 1]));
|
|
3013
2977
|
})(m2)) return;
|
|
3014
2978
|
break;
|
|
3015
2979
|
case 2:
|
|
3016
|
-
if (d2 = m2.split(
|
|
2980
|
+
if (d2 = m2.split(Mt, 1)[0], !Et.test(d2)) return;
|
|
3017
2981
|
break;
|
|
3018
2982
|
default:
|
|
3019
|
-
|
|
2983
|
+
Xe(t2);
|
|
3020
2984
|
}
|
|
3021
|
-
s2.push(new
|
|
2985
|
+
s2.push(new Nt({ tagBuilder: r2, matchedText: m2, offset: p2, urlMatchType: Ws(t2.matchType), url: m2, protocolRelativeMatch: "//" === m2.slice(0, 2), stripPrefix: i2, stripTrailingSlash: o2, decodePercentEncoding: c2 }));
|
|
3022
2986
|
break;
|
|
3023
2987
|
case 1:
|
|
3024
|
-
|
|
2988
|
+
xt(m2.split(".").pop()) && s2.push(new Pt({ tagBuilder: r2, matchedText: m2, offset: p2, email: m2.replace(Dt, "") }));
|
|
3025
2989
|
break;
|
|
3026
2990
|
case 2:
|
|
3027
|
-
m2.length <= 140 && s2.push(new
|
|
2991
|
+
m2.length <= 140 && s2.push(new Ut({ tagBuilder: r2, matchedText: m2, offset: p2, serviceName: l2, hashtag: m2.slice(1) }));
|
|
3028
2992
|
break;
|
|
3029
2993
|
case 3:
|
|
3030
2994
|
(function(e3, t3) {
|
|
3031
|
-
return
|
|
3032
|
-
})(m2, h2) && s2.push(new
|
|
2995
|
+
return Wt[t3].test(e3);
|
|
2996
|
+
})(m2, h2) && s2.push(new Bt({ tagBuilder: r2, matchedText: m2, offset: p2, serviceName: h2, mention: m2.slice(1) }));
|
|
3033
2997
|
break;
|
|
3034
2998
|
case 4:
|
|
3035
|
-
if (m2 = m2.replace(/ +$/g, ""), ("+" === (u2 = m2).charAt(0) ||
|
|
2999
|
+
if (m2 = m2.replace(/ +$/g, ""), ("+" === (u2 = m2).charAt(0) || Gt.test(u2)) && Ft.test(u2)) {
|
|
3036
3000
|
var g2 = m2.replace(/[^0-9,;#]/g, "");
|
|
3037
|
-
s2.push(new
|
|
3001
|
+
s2.push(new Jt({ tagBuilder: r2, matchedText: m2, offset: p2, number: g2, plusSign: "+" === m2.charAt(0) }));
|
|
3038
3002
|
}
|
|
3039
3003
|
break;
|
|
3040
3004
|
default:
|
|
3041
|
-
|
|
3005
|
+
Xe(t2);
|
|
3042
3006
|
}
|
|
3043
3007
|
}
|
|
3044
3008
|
}
|
|
3045
|
-
function
|
|
3009
|
+
function Ws(e2) {
|
|
3046
3010
|
switch (e2) {
|
|
3047
3011
|
case 0:
|
|
3048
3012
|
return "scheme";
|
|
@@ -3051,124 +3015,124 @@ function qs(e2) {
|
|
|
3051
3015
|
case 2:
|
|
3052
3016
|
return "ipV4";
|
|
3053
3017
|
default:
|
|
3054
|
-
|
|
3018
|
+
Xe(e2);
|
|
3055
3019
|
}
|
|
3056
3020
|
}
|
|
3057
|
-
var
|
|
3021
|
+
var qs = { ")": "(", "}": "{", "]": "[" };
|
|
3058
3022
|
function Ls(e2, t2) {
|
|
3059
3023
|
return { type: 0, startIdx: e2, state: t2, acceptStateReached: false, matchType: 0 };
|
|
3060
3024
|
}
|
|
3061
|
-
function
|
|
3025
|
+
function Bs(e2, t2) {
|
|
3062
3026
|
return { type: 0, startIdx: e2, state: t2, acceptStateReached: false, matchType: 1 };
|
|
3063
3027
|
}
|
|
3064
|
-
function
|
|
3028
|
+
function Gs(e2, t2) {
|
|
3065
3029
|
return { type: 4, startIdx: e2, state: t2, acceptStateReached: false };
|
|
3066
3030
|
}
|
|
3067
|
-
function
|
|
3031
|
+
function Fs(e2) {
|
|
3068
3032
|
return 0 === e2.type && 0 === e2.matchType;
|
|
3069
3033
|
}
|
|
3070
|
-
var
|
|
3034
|
+
var Hs = function(e2) {
|
|
3071
3035
|
void 0 === e2 && (e2 = {}), this.idx = void 0 !== e2.idx ? e2.idx : -1, this.type = e2.type || "tag", this.name = e2.name || "", this.isOpening = !!e2.isOpening, this.isClosing = !!e2.isClosing;
|
|
3072
|
-
}, zs = new
|
|
3036
|
+
}, zs = new Hs(), Js = function(e2, t2) {
|
|
3073
3037
|
this.charIdx = 0, this.state = 0, this.currentDataIdx = 0, this.currentTag = zs, this.html = e2, this.callbacks = t2;
|
|
3074
3038
|
};
|
|
3075
|
-
function
|
|
3076
|
-
"<" === t2 &&
|
|
3039
|
+
function Ys(e2, t2) {
|
|
3040
|
+
"<" === t2 && vn(e2);
|
|
3041
|
+
}
|
|
3042
|
+
function Qs(e2, t2, s2) {
|
|
3043
|
+
"!" === t2 ? e2.state = 13 : "/" === t2 ? (e2.state = 2, e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { isClosing: true }))) : "<" === t2 ? vn(e2) : it(s2) ? (e2.state = 3, e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { isOpening: true }))) : (e2.state = 0, e2.currentTag = zs);
|
|
3077
3044
|
}
|
|
3078
3045
|
function Vs(e2, t2, s2) {
|
|
3079
|
-
|
|
3046
|
+
lt(s2) ? (e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { name: wn(e2) })), e2.state = 4) : "<" === t2 ? vn(e2) : "/" === t2 ? (e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { name: wn(e2) })), e2.state = 12) : ">" === t2 ? (e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { name: wn(e2) })), bn(e2)) : it(s2) || ot(s2) || ":" === t2 || gn(e2);
|
|
3080
3047
|
}
|
|
3081
3048
|
function Ks(e2, t2, s2) {
|
|
3082
|
-
|
|
3049
|
+
">" === t2 ? gn(e2) : it(s2) ? e2.state = 3 : gn(e2);
|
|
3083
3050
|
}
|
|
3084
3051
|
function Zs(e2, t2, s2) {
|
|
3085
|
-
|
|
3052
|
+
var n2;
|
|
3053
|
+
lt(s2) || ("/" === t2 ? e2.state = 12 : ">" === t2 ? bn(e2) : "<" === t2 ? vn(e2) : "=" === t2 || ct(s2) || ((n2 = s2) >= 0 && n2 <= 31 || 127 == n2) ? gn(e2) : e2.state = 5);
|
|
3086
3054
|
}
|
|
3087
3055
|
function Xs(e2, t2, s2) {
|
|
3088
|
-
|
|
3089
|
-
ht(s2) || ("/" === t2 ? e2.state = 12 : ">" === t2 ? yn(e2) : "<" === t2 ? bn(e2) : "=" === t2 || lt(s2) || ((n2 = s2) >= 0 && n2 <= 31 || 127 == n2) ? vn(e2) : e2.state = 5);
|
|
3056
|
+
lt(s2) ? e2.state = 6 : "/" === t2 ? e2.state = 12 : "=" === t2 ? e2.state = 7 : ">" === t2 ? bn(e2) : "<" === t2 ? vn(e2) : ct(s2) && gn(e2);
|
|
3090
3057
|
}
|
|
3091
3058
|
function en(e2, t2, s2) {
|
|
3092
|
-
|
|
3059
|
+
lt(s2) || ("/" === t2 ? e2.state = 12 : "=" === t2 ? e2.state = 7 : ">" === t2 ? bn(e2) : "<" === t2 ? vn(e2) : ct(s2) ? gn(e2) : e2.state = 5);
|
|
3093
3060
|
}
|
|
3094
3061
|
function tn(e2, t2, s2) {
|
|
3095
|
-
|
|
3062
|
+
lt(s2) || ('"' === t2 ? e2.state = 8 : "'" === t2 ? e2.state = 9 : /[>=`]/.test(t2) ? gn(e2) : "<" === t2 ? vn(e2) : e2.state = 10);
|
|
3096
3063
|
}
|
|
3097
|
-
function sn(e2, t2
|
|
3098
|
-
ht(s2) || ('"' === t2 ? e2.state = 8 : "'" === t2 ? e2.state = 9 : /[>=`]/.test(t2) ? vn(e2) : "<" === t2 ? bn(e2) : e2.state = 10);
|
|
3099
|
-
}
|
|
3100
|
-
function nn(e2, t2) {
|
|
3064
|
+
function sn(e2, t2) {
|
|
3101
3065
|
'"' === t2 && (e2.state = 11);
|
|
3102
3066
|
}
|
|
3103
|
-
function
|
|
3067
|
+
function nn(e2, t2) {
|
|
3104
3068
|
"'" === t2 && (e2.state = 11);
|
|
3105
3069
|
}
|
|
3106
|
-
function
|
|
3107
|
-
|
|
3070
|
+
function an(e2, t2, s2) {
|
|
3071
|
+
lt(s2) ? e2.state = 4 : ">" === t2 ? bn(e2) : "<" === t2 && vn(e2);
|
|
3108
3072
|
}
|
|
3109
|
-
function
|
|
3110
|
-
|
|
3073
|
+
function rn(e2, t2, s2) {
|
|
3074
|
+
lt(s2) ? e2.state = 4 : "/" === t2 ? e2.state = 12 : ">" === t2 ? bn(e2) : "<" === t2 ? vn(e2) : (e2.state = 4, (function(e3) {
|
|
3111
3075
|
e3.charIdx--;
|
|
3112
3076
|
})(e2));
|
|
3113
3077
|
}
|
|
3114
|
-
function
|
|
3115
|
-
">" === t2 ? (e2.currentTag = new
|
|
3078
|
+
function on(e2, t2) {
|
|
3079
|
+
">" === t2 ? (e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { isClosing: true })), bn(e2)) : gn(e2);
|
|
3116
3080
|
}
|
|
3117
|
-
function
|
|
3081
|
+
function cn(e2) {
|
|
3118
3082
|
var t2 = e2.html, s2 = e2.charIdx;
|
|
3119
|
-
"--" === t2.slice(s2, s2 + 2) ? (e2.charIdx++, e2.currentTag = new
|
|
3083
|
+
"--" === t2.slice(s2, s2 + 2) ? (e2.charIdx++, e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { type: "comment" })), e2.state = 14) : "DOCTYPE" === t2.slice(s2, s2 + 7).toUpperCase() ? (e2.charIdx += 6, e2.currentTag = new Hs(Qe(Qe({}, e2.currentTag), { type: "doctype" })), e2.state = 20) : gn(e2);
|
|
3084
|
+
}
|
|
3085
|
+
function ln(e2, t2) {
|
|
3086
|
+
"-" === t2 ? e2.state = 15 : ">" === t2 ? gn(e2) : e2.state = 16;
|
|
3120
3087
|
}
|
|
3121
3088
|
function hn(e2, t2) {
|
|
3122
|
-
"-" === t2 ? e2.state =
|
|
3089
|
+
"-" === t2 ? e2.state = 18 : ">" === t2 ? gn(e2) : e2.state = 16;
|
|
3123
3090
|
}
|
|
3124
3091
|
function un(e2, t2) {
|
|
3125
|
-
"-" === t2
|
|
3092
|
+
"-" === t2 && (e2.state = 17);
|
|
3126
3093
|
}
|
|
3127
3094
|
function dn(e2, t2) {
|
|
3128
|
-
"-" === t2
|
|
3095
|
+
e2.state = "-" === t2 ? 18 : 16;
|
|
3129
3096
|
}
|
|
3130
3097
|
function pn(e2, t2) {
|
|
3131
|
-
e2.state = "-" === t2
|
|
3098
|
+
">" === t2 ? bn(e2) : "!" === t2 ? e2.state = 19 : "-" === t2 || (e2.state = 16);
|
|
3132
3099
|
}
|
|
3133
3100
|
function mn(e2, t2) {
|
|
3134
|
-
"
|
|
3101
|
+
"-" === t2 ? e2.state = 17 : ">" === t2 ? bn(e2) : e2.state = 16;
|
|
3135
3102
|
}
|
|
3136
3103
|
function fn(e2, t2) {
|
|
3137
|
-
"
|
|
3104
|
+
">" === t2 ? bn(e2) : "<" === t2 && vn(e2);
|
|
3138
3105
|
}
|
|
3139
|
-
function gn(e2
|
|
3140
|
-
|
|
3106
|
+
function gn(e2) {
|
|
3107
|
+
e2.state = 0, e2.currentTag = zs;
|
|
3141
3108
|
}
|
|
3142
3109
|
function vn(e2) {
|
|
3143
|
-
e2.state =
|
|
3110
|
+
e2.state = 1, e2.currentTag = new Hs({ idx: e2.charIdx });
|
|
3144
3111
|
}
|
|
3145
3112
|
function bn(e2) {
|
|
3146
|
-
e2.state = 1, e2.currentTag = new Js({ idx: e2.charIdx });
|
|
3147
|
-
}
|
|
3148
|
-
function yn(e2) {
|
|
3149
3113
|
var t2 = e2.html.slice(e2.currentDataIdx, e2.currentTag.idx);
|
|
3150
3114
|
t2 && e2.callbacks.onText(t2, e2.currentDataIdx);
|
|
3151
3115
|
var s2 = e2.currentTag;
|
|
3152
|
-
"comment" === s2.type ? e2.callbacks.onComment(s2.idx) : "doctype" === s2.type ? e2.callbacks.onDoctype(s2.idx) : (s2.isOpening && e2.callbacks.onOpenTag(s2.name, s2.idx), s2.isClosing && e2.callbacks.onCloseTag(s2.name, s2.idx)),
|
|
3116
|
+
"comment" === s2.type ? e2.callbacks.onComment(s2.idx) : "doctype" === s2.type ? e2.callbacks.onDoctype(s2.idx) : (s2.isOpening && e2.callbacks.onOpenTag(s2.name, s2.idx), s2.isClosing && e2.callbacks.onCloseTag(s2.name, s2.idx)), gn(e2), e2.currentDataIdx = e2.charIdx + 1;
|
|
3153
3117
|
}
|
|
3154
3118
|
function wn(e2) {
|
|
3155
3119
|
var t2 = e2.currentTag.idx + (e2.currentTag.isClosing ? 2 : 1);
|
|
3156
3120
|
return e2.html.slice(t2, e2.charIdx).toLowerCase();
|
|
3157
3121
|
}
|
|
3158
|
-
var
|
|
3122
|
+
var yn = (function() {
|
|
3159
3123
|
function e2(t2) {
|
|
3160
3124
|
void 0 === t2 && (t2 = {}), this.version = e2.version, this.urls = {}, this.email = true, this.phone = true, this.hashtag = false, this.mention = false, this.newWindow = true, this.stripPrefix = { scheme: true, www: true }, this.stripTrailingSlash = true, this.decodePercentEncoding = true, this.truncate = { length: 0, location: "end" }, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = false, this.tagBuilder = null, this.urls = (function(e3) {
|
|
3161
3125
|
null == e3 && (e3 = true);
|
|
3162
|
-
return
|
|
3163
|
-
})(t2.urls), this.email =
|
|
3126
|
+
return Ke(e3) ? { schemeMatches: e3, tldMatches: e3, ipV4Matches: e3 } : { schemeMatches: !Ke(e3.schemeMatches) || e3.schemeMatches, tldMatches: !Ke(e3.tldMatches) || e3.tldMatches, ipV4Matches: !Ke(e3.ipV4Matches) || e3.ipV4Matches };
|
|
3127
|
+
})(t2.urls), this.email = Ke(t2.email) ? t2.email : this.email, this.phone = Ke(t2.phone) ? t2.phone : this.phone, this.hashtag = t2.hashtag || this.hashtag, this.mention = t2.mention || this.mention, this.newWindow = Ke(t2.newWindow) ? t2.newWindow : this.newWindow, this.stripPrefix = (function(e3) {
|
|
3164
3128
|
null == e3 && (e3 = true);
|
|
3165
|
-
return
|
|
3166
|
-
})(t2.stripPrefix), this.stripTrailingSlash =
|
|
3129
|
+
return Ke(e3) ? { scheme: e3, www: e3 } : { scheme: !Ke(e3.scheme) || e3.scheme, www: !Ke(e3.www) || e3.www };
|
|
3130
|
+
})(t2.stripPrefix), this.stripTrailingSlash = Ke(t2.stripTrailingSlash) ? t2.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = Ke(t2.decodePercentEncoding) ? t2.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = t2.sanitizeHtml || false;
|
|
3167
3131
|
var s2 = this.mention;
|
|
3168
3132
|
if (false !== s2 && -1 === Lt.indexOf(s2)) throw new Error("invalid `mention` cfg '".concat(s2, "' - see docs"));
|
|
3169
3133
|
var n2, a2 = this.hashtag;
|
|
3170
|
-
if (false !== a2 && -1 ===
|
|
3171
|
-
this.truncate = "number" == typeof (n2 = t2.truncate) ? { length: n2, location: "end" } :
|
|
3134
|
+
if (false !== a2 && -1 === $t.indexOf(a2)) throw new Error("invalid `hashtag` cfg '".concat(a2, "' - see docs"));
|
|
3135
|
+
this.truncate = "number" == typeof (n2 = t2.truncate) ? { length: n2, location: "end" } : Qe({ length: Number.POSITIVE_INFINITY, location: "end" }, n2), this.className = t2.className || this.className, this.replaceFn = t2.replaceFn || this.replaceFn, this.context = t2.context || this;
|
|
3172
3136
|
}
|
|
3173
3137
|
return e2.link = function(t2, s2) {
|
|
3174
3138
|
return new e2(s2).link(t2);
|
|
@@ -3177,74 +3141,74 @@ var kn = (function() {
|
|
|
3177
3141
|
}, e2.prototype.parse = function(e3) {
|
|
3178
3142
|
var t2 = this, s2 = ["a", "style", "script"], n2 = 0, a2 = [];
|
|
3179
3143
|
return (function(e4, t3) {
|
|
3180
|
-
for (var s3 = new
|
|
3144
|
+
for (var s3 = new Js(e4, t3), n3 = e4.length; s3.charIdx < n3; ) {
|
|
3181
3145
|
var a3 = e4.charAt(s3.charIdx), r2 = e4.charCodeAt(s3.charIdx);
|
|
3182
3146
|
switch (s3.state) {
|
|
3183
3147
|
case 0:
|
|
3184
|
-
|
|
3148
|
+
Ys(s3, a3);
|
|
3185
3149
|
break;
|
|
3186
3150
|
case 1:
|
|
3187
|
-
|
|
3151
|
+
Qs(s3, a3, r2);
|
|
3188
3152
|
break;
|
|
3189
3153
|
case 2:
|
|
3190
|
-
|
|
3154
|
+
Ks(s3, a3, r2);
|
|
3191
3155
|
break;
|
|
3192
3156
|
case 3:
|
|
3193
|
-
|
|
3157
|
+
Vs(s3, a3, r2);
|
|
3194
3158
|
break;
|
|
3195
3159
|
case 4:
|
|
3196
|
-
|
|
3160
|
+
Zs(s3, a3, r2);
|
|
3197
3161
|
break;
|
|
3198
3162
|
case 5:
|
|
3199
|
-
|
|
3163
|
+
Xs(s3, a3, r2);
|
|
3200
3164
|
break;
|
|
3201
3165
|
case 6:
|
|
3202
|
-
|
|
3166
|
+
en(s3, a3, r2);
|
|
3203
3167
|
break;
|
|
3204
3168
|
case 7:
|
|
3205
|
-
|
|
3169
|
+
tn(s3, a3, r2);
|
|
3206
3170
|
break;
|
|
3207
3171
|
case 8:
|
|
3208
|
-
|
|
3172
|
+
sn(s3, a3);
|
|
3209
3173
|
break;
|
|
3210
3174
|
case 9:
|
|
3211
|
-
|
|
3175
|
+
nn(s3, a3);
|
|
3212
3176
|
break;
|
|
3213
3177
|
case 10:
|
|
3214
|
-
|
|
3178
|
+
an(s3, a3, r2);
|
|
3215
3179
|
break;
|
|
3216
3180
|
case 11:
|
|
3217
|
-
|
|
3181
|
+
rn(s3, a3, r2);
|
|
3218
3182
|
break;
|
|
3219
3183
|
case 12:
|
|
3220
|
-
|
|
3184
|
+
on(s3, a3);
|
|
3221
3185
|
break;
|
|
3222
3186
|
case 13:
|
|
3223
|
-
|
|
3187
|
+
cn(s3);
|
|
3224
3188
|
break;
|
|
3225
3189
|
case 14:
|
|
3226
|
-
|
|
3190
|
+
ln(s3, a3);
|
|
3227
3191
|
break;
|
|
3228
3192
|
case 15:
|
|
3229
|
-
|
|
3193
|
+
hn(s3, a3);
|
|
3230
3194
|
break;
|
|
3231
3195
|
case 16:
|
|
3232
|
-
|
|
3196
|
+
un(s3, a3);
|
|
3233
3197
|
break;
|
|
3234
3198
|
case 17:
|
|
3235
|
-
|
|
3199
|
+
dn(s3, a3);
|
|
3236
3200
|
break;
|
|
3237
3201
|
case 18:
|
|
3238
|
-
|
|
3202
|
+
pn(s3, a3);
|
|
3239
3203
|
break;
|
|
3240
3204
|
case 19:
|
|
3241
|
-
|
|
3205
|
+
mn(s3, a3);
|
|
3242
3206
|
break;
|
|
3243
3207
|
case 20:
|
|
3244
|
-
|
|
3208
|
+
fn(s3, a3);
|
|
3245
3209
|
break;
|
|
3246
3210
|
default:
|
|
3247
|
-
|
|
3211
|
+
Xe(s3.state);
|
|
3248
3212
|
}
|
|
3249
3213
|
s3.charIdx++;
|
|
3250
3214
|
}
|
|
@@ -3290,7 +3254,7 @@ var kn = (function() {
|
|
|
3290
3254
|
}, onDoctype: function() {
|
|
3291
3255
|
} }), a2 = this.compactMatches(a2), a2 = this.removeUnwantedMatches(a2);
|
|
3292
3256
|
}, e2.prototype.compactMatches = function(e3) {
|
|
3293
|
-
e3.sort(
|
|
3257
|
+
e3.sort(kn);
|
|
3294
3258
|
for (var t2 = 0; t2 < e3.length - 1; ) {
|
|
3295
3259
|
var s2 = e3[t2], n2 = s2.getOffset(), a2 = s2.getMatchedText().length;
|
|
3296
3260
|
if (t2 + 1 < e3.length && e3[t2 + 1].getOffset() === n2) {
|
|
@@ -3300,169 +3264,169 @@ var kn = (function() {
|
|
|
3300
3264
|
}
|
|
3301
3265
|
return e3;
|
|
3302
3266
|
}, e2.prototype.removeUnwantedMatches = function(e3) {
|
|
3303
|
-
return this.hashtag ||
|
|
3267
|
+
return this.hashtag || Ze(e3, function(e4) {
|
|
3304
3268
|
return "hashtag" === e4.getType();
|
|
3305
|
-
}), this.email ||
|
|
3269
|
+
}), this.email || Ze(e3, function(e4) {
|
|
3306
3270
|
return "email" === e4.getType();
|
|
3307
|
-
}), this.phone ||
|
|
3271
|
+
}), this.phone || Ze(e3, function(e4) {
|
|
3308
3272
|
return "phone" === e4.getType();
|
|
3309
|
-
}), this.mention ||
|
|
3273
|
+
}), this.mention || Ze(e3, function(e4) {
|
|
3310
3274
|
return "mention" === e4.getType();
|
|
3311
|
-
}), this.urls.schemeMatches ||
|
|
3275
|
+
}), this.urls.schemeMatches || Ze(e3, function(e4) {
|
|
3312
3276
|
return "url" === e4.getType() && "scheme" === e4.getUrlMatchType();
|
|
3313
|
-
}), this.urls.tldMatches ||
|
|
3277
|
+
}), this.urls.tldMatches || Ze(e3, function(e4) {
|
|
3314
3278
|
return "url" === e4.getType() && "tld" === e4.getUrlMatchType();
|
|
3315
|
-
}), this.urls.ipV4Matches ||
|
|
3279
|
+
}), this.urls.ipV4Matches || Ze(e3, function(e4) {
|
|
3316
3280
|
return "url" === e4.getType() && "ipV4" === e4.getUrlMatchType();
|
|
3317
3281
|
}), e3;
|
|
3318
3282
|
}, e2.prototype.parseText = function(e3, t2) {
|
|
3319
3283
|
t2 = t2 || 0;
|
|
3320
3284
|
for (var s2 = (function(e4, t3) {
|
|
3321
|
-
for (var s3 = new
|
|
3285
|
+
for (var s3 = new Yt(e4, t3); s3.charIdx < s3.text.length; s3.charIdx++) {
|
|
3322
3286
|
var n3 = e4.charAt(s3.charIdx), a3 = e4.charCodeAt(s3.charIdx);
|
|
3323
|
-
if (0 === s3.stateMachines.length)
|
|
3287
|
+
if (0 === s3.stateMachines.length) Qt(s3, n3, a3);
|
|
3324
3288
|
else {
|
|
3325
3289
|
for (var r2 = s3.stateMachines.length - 1; r2 >= 0; r2--) {
|
|
3326
3290
|
var i2 = s3.stateMachines[r2];
|
|
3327
3291
|
switch (i2.state) {
|
|
3328
3292
|
case 11:
|
|
3329
|
-
|
|
3293
|
+
ts(s3, i2, a3);
|
|
3330
3294
|
break;
|
|
3331
3295
|
case 12:
|
|
3332
|
-
|
|
3296
|
+
ss(s3, i2, a3);
|
|
3333
3297
|
break;
|
|
3334
3298
|
case 0:
|
|
3335
|
-
|
|
3299
|
+
Vt(s3, i2, a3);
|
|
3336
3300
|
break;
|
|
3337
3301
|
case 1:
|
|
3338
|
-
|
|
3302
|
+
Kt(s3, i2, a3);
|
|
3339
3303
|
break;
|
|
3340
3304
|
case 2:
|
|
3341
|
-
|
|
3305
|
+
Zt(s3, i2, a3);
|
|
3342
3306
|
break;
|
|
3343
3307
|
case 3:
|
|
3344
|
-
|
|
3308
|
+
Xt(s3, i2, a3);
|
|
3345
3309
|
break;
|
|
3346
3310
|
case 4:
|
|
3347
|
-
|
|
3311
|
+
es(s3, i2, 0, a3);
|
|
3348
3312
|
break;
|
|
3349
3313
|
case 5:
|
|
3350
|
-
|
|
3314
|
+
ns(s3, i2, a3);
|
|
3351
3315
|
break;
|
|
3352
3316
|
case 6:
|
|
3353
|
-
|
|
3317
|
+
as(s3, i2, 0, a3);
|
|
3354
3318
|
break;
|
|
3355
3319
|
case 7:
|
|
3356
|
-
|
|
3320
|
+
rs(s3, i2, 0, a3);
|
|
3357
3321
|
break;
|
|
3358
3322
|
case 13:
|
|
3359
|
-
|
|
3323
|
+
is(s3, i2, a3);
|
|
3360
3324
|
break;
|
|
3361
3325
|
case 14:
|
|
3362
|
-
|
|
3326
|
+
os(s3, i2, a3);
|
|
3363
3327
|
break;
|
|
3364
3328
|
case 8:
|
|
3365
|
-
|
|
3329
|
+
cs(s3, i2, a3);
|
|
3366
3330
|
break;
|
|
3367
3331
|
case 9:
|
|
3368
|
-
|
|
3332
|
+
ls(s3, i2, a3);
|
|
3369
3333
|
break;
|
|
3370
3334
|
case 10:
|
|
3371
|
-
|
|
3335
|
+
hs(s3, i2, a3);
|
|
3372
3336
|
break;
|
|
3373
3337
|
case 15:
|
|
3374
|
-
|
|
3338
|
+
us(s3, i2, n3, a3);
|
|
3375
3339
|
break;
|
|
3376
3340
|
case 16:
|
|
3377
|
-
|
|
3341
|
+
ds(s3, i2, n3, a3);
|
|
3378
3342
|
break;
|
|
3379
3343
|
case 17:
|
|
3380
|
-
|
|
3344
|
+
ps(s3, i2, n3, a3);
|
|
3381
3345
|
break;
|
|
3382
3346
|
case 18:
|
|
3383
|
-
|
|
3347
|
+
ms(s3, i2, n3, a3);
|
|
3384
3348
|
break;
|
|
3385
3349
|
case 19:
|
|
3386
|
-
|
|
3350
|
+
fs(s3, i2, n3, a3);
|
|
3387
3351
|
break;
|
|
3388
3352
|
case 20:
|
|
3389
|
-
|
|
3353
|
+
gs(s3, i2, a3);
|
|
3390
3354
|
break;
|
|
3391
3355
|
case 21:
|
|
3392
|
-
|
|
3356
|
+
vs(s3, i2, a3);
|
|
3393
3357
|
break;
|
|
3394
3358
|
case 22:
|
|
3395
|
-
|
|
3359
|
+
bs(s3, i2, a3);
|
|
3396
3360
|
break;
|
|
3397
3361
|
case 23:
|
|
3398
3362
|
ws(s3, i2, a3);
|
|
3399
3363
|
break;
|
|
3400
3364
|
case 24:
|
|
3401
|
-
|
|
3365
|
+
ys(s3, i2, a3);
|
|
3402
3366
|
break;
|
|
3403
3367
|
case 25:
|
|
3404
|
-
|
|
3368
|
+
ks(s3, i2, a3);
|
|
3405
3369
|
break;
|
|
3406
3370
|
case 26:
|
|
3407
|
-
|
|
3371
|
+
Ss(s3, i2, a3);
|
|
3408
3372
|
break;
|
|
3409
3373
|
case 27:
|
|
3410
|
-
|
|
3374
|
+
Cs(s3, i2, a3);
|
|
3411
3375
|
break;
|
|
3412
3376
|
case 28:
|
|
3413
|
-
|
|
3377
|
+
Ts(s3, i2, a3);
|
|
3414
3378
|
break;
|
|
3415
3379
|
case 29:
|
|
3416
|
-
|
|
3380
|
+
Is(s3, i2, a3);
|
|
3417
3381
|
break;
|
|
3418
3382
|
case 30:
|
|
3419
|
-
|
|
3383
|
+
xs(s3, i2, a3);
|
|
3420
3384
|
break;
|
|
3421
3385
|
case 31:
|
|
3422
|
-
|
|
3386
|
+
Es(s3, i2, a3);
|
|
3423
3387
|
break;
|
|
3424
3388
|
case 32:
|
|
3425
|
-
|
|
3389
|
+
_s(s3, i2, n3, a3);
|
|
3426
3390
|
break;
|
|
3427
3391
|
case 33:
|
|
3428
|
-
|
|
3392
|
+
As(s3, i2, a3);
|
|
3429
3393
|
break;
|
|
3430
3394
|
case 34:
|
|
3431
|
-
|
|
3395
|
+
Ns(s3, i2, a3);
|
|
3432
3396
|
break;
|
|
3433
3397
|
case 35:
|
|
3434
|
-
|
|
3398
|
+
Ds(s3, i2, a3);
|
|
3435
3399
|
break;
|
|
3436
3400
|
case 36:
|
|
3437
|
-
|
|
3401
|
+
Rs(s3, i2, 0, a3);
|
|
3438
3402
|
break;
|
|
3439
3403
|
case 37:
|
|
3440
|
-
|
|
3404
|
+
Ms(s3, i2, n3, a3);
|
|
3441
3405
|
break;
|
|
3442
3406
|
case 38:
|
|
3443
|
-
|
|
3407
|
+
Os(s3, i2, 0, a3);
|
|
3444
3408
|
break;
|
|
3445
3409
|
case 39:
|
|
3446
|
-
|
|
3410
|
+
Ps(s3, i2, n3, a3);
|
|
3447
3411
|
break;
|
|
3448
3412
|
case 40:
|
|
3449
|
-
|
|
3413
|
+
js(s3, i2, a3);
|
|
3450
3414
|
break;
|
|
3451
3415
|
case 41:
|
|
3452
|
-
|
|
3416
|
+
$s(s3, i2, a3);
|
|
3453
3417
|
break;
|
|
3454
3418
|
default:
|
|
3455
|
-
|
|
3419
|
+
Xe(i2.state);
|
|
3456
3420
|
}
|
|
3457
3421
|
}
|
|
3458
|
-
if (!s3.hasSchemeUrlMachine() && s3.charIdx > 0 &&
|
|
3422
|
+
if (!s3.hasSchemeUrlMachine() && s3.charIdx > 0 && yt(a3)) {
|
|
3459
3423
|
var o2 = s3.text.charCodeAt(s3.charIdx - 1);
|
|
3460
|
-
|
|
3424
|
+
yt(o2) || s3.addMachine(Ls(s3.charIdx, 0));
|
|
3461
3425
|
}
|
|
3462
3426
|
}
|
|
3463
3427
|
}
|
|
3464
3428
|
for (var c2 = s3.stateMachines.length - 1; c2 >= 0; c2--) s3.stateMachines.forEach(function(e5) {
|
|
3465
|
-
return
|
|
3429
|
+
return Us(s3, e5);
|
|
3466
3430
|
});
|
|
3467
3431
|
return s3.matches;
|
|
3468
3432
|
})(e3, { tagBuilder: this.getTagBuilder(), stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding, hashtagServiceName: this.hashtag, mentionServiceName: this.mention || "twitter" }), n2 = 0, a2 = s2.length; n2 < a2; n2++) s2[n2].setOffset(t2 + s2[n2].getOffset());
|
|
@@ -3477,89 +3441,89 @@ var kn = (function() {
|
|
|
3477
3441
|
return s2.push(e3.substring(n2)), s2.join("");
|
|
3478
3442
|
}, e2.prototype.createMatchReturnVal = function(e3) {
|
|
3479
3443
|
var t2;
|
|
3480
|
-
return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof
|
|
3444
|
+
return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof tt ? t2.toAnchorString() : e3.buildTag().toAnchorString();
|
|
3481
3445
|
}, e2.prototype.getTagBuilder = function() {
|
|
3482
3446
|
var e3 = this.tagBuilder;
|
|
3483
|
-
return e3 || (e3 = this.tagBuilder = new
|
|
3447
|
+
return e3 || (e3 = this.tagBuilder = new at({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
|
|
3484
3448
|
}, e2.version = "4.1.5", e2;
|
|
3485
3449
|
})();
|
|
3486
|
-
function
|
|
3450
|
+
function kn(e2, t2) {
|
|
3487
3451
|
return e2.getOffset() - t2.getOffset();
|
|
3488
3452
|
}
|
|
3489
|
-
function
|
|
3453
|
+
function Sn(e2, t2 = e2) {
|
|
3490
3454
|
return { type: "autolink", url: e2, text: t2 };
|
|
3491
3455
|
}
|
|
3492
|
-
const
|
|
3456
|
+
const Cn = We(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ (function(e3, t3) {
|
|
3493
3457
|
return { type: "mention", id: e3, text: t3 };
|
|
3494
|
-
})(decodeURIComponent(t2), s2)),
|
|
3458
|
+
})(decodeURIComponent(t2), s2)), Tn = We(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ (function(e3) {
|
|
3495
3459
|
return { type: "customemoji", text: e3 };
|
|
3496
|
-
})(t2)),
|
|
3460
|
+
})(t2)), In = We(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ (function(e3, t3 = []) {
|
|
3497
3461
|
return { type: "link", url: e3, children: t3 };
|
|
3498
|
-
})(t2, [s2])),
|
|
3499
|
-
const { action: n2, params: a2 } =
|
|
3462
|
+
})(t2, [s2])), xn = We(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
|
|
3463
|
+
const { action: n2, params: a2 } = Mn(t2);
|
|
3500
3464
|
return /* @__PURE__ */ (function(e3, t3, s3 = []) {
|
|
3501
3465
|
return { type: "actionlink", action: e3, params: t3, children: s3 };
|
|
3502
3466
|
})(n2, a2, [s2]);
|
|
3503
|
-
}),
|
|
3504
|
-
const { action: n2, params: a2 } =
|
|
3467
|
+
}), En = We(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
|
|
3468
|
+
const { action: n2, params: a2 } = Mn(t2);
|
|
3505
3469
|
return /* @__PURE__ */ (function(e3, t3, s3 = []) {
|
|
3506
3470
|
return { type: "actionbutton", action: e3, params: t3, children: s3 };
|
|
3507
3471
|
})(n2, a2, [s2]);
|
|
3508
3472
|
});
|
|
3509
|
-
function
|
|
3473
|
+
function Mn(e2) {
|
|
3510
3474
|
const t2 = e2.indexOf("?");
|
|
3511
3475
|
if (-1 === t2) return { action: e2, params: {} };
|
|
3512
3476
|
return { action: e2.slice(0, t2), params: Object.fromEntries(new URLSearchParams(e2.slice(t2))) };
|
|
3513
3477
|
}
|
|
3514
|
-
const
|
|
3478
|
+
const _n = We(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ (function(e3 = []) {
|
|
3515
3479
|
return { type: "bulletlist", children: e3 };
|
|
3516
|
-
})([e2.startsWith("\n") ? e2.slice(1) : e2])),
|
|
3480
|
+
})([e2.startsWith("\n") ? e2.slice(1) : e2])), An = We(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), Nn = (e2) => {
|
|
3517
3481
|
const t2 = /(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;
|
|
3518
3482
|
let s2 = 0;
|
|
3519
3483
|
const n2 = [];
|
|
3520
3484
|
for (const a2 of Z(e2, t2)) {
|
|
3521
3485
|
const t3 = a2[0], r2 = a2[1], i2 = t3.startsWith(r2) ? a2.index : a2.index + 1;
|
|
3522
3486
|
i2 - s2 > 0 && n2.push(e2.substring(s2, i2));
|
|
3523
|
-
const o2 =
|
|
3487
|
+
const o2 = Sn("tel:" + r2.replace(/[^0-9+]/g, ""), r2);
|
|
3524
3488
|
n2.push(o2), s2 = i2 + r2.length;
|
|
3525
3489
|
}
|
|
3526
3490
|
return s2 < e2.length && n2.push(e2.substring(s2)), n2;
|
|
3527
|
-
},
|
|
3528
|
-
const t2 =
|
|
3491
|
+
}, Dn = (e2) => In(e2).flatMap((e3) => "string" == typeof e3 ? Rn(e3) : ["<", ...Rn(e3.url), ...Rn("|" + e3.children[0] + ">")]), Rn = (e2) => {
|
|
3492
|
+
const t2 = yn.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
|
|
3529
3493
|
let n2 = 0;
|
|
3530
3494
|
for (const a2 of t2) {
|
|
3531
3495
|
const t3 = a2.getOffset(), r2 = a2.getMatchedText(), i2 = r2.length;
|
|
3532
3496
|
let o2 = r2;
|
|
3533
|
-
a2 instanceof
|
|
3497
|
+
a2 instanceof Pt ? o2 = "mailto:" + a2.getEmail() : a2 instanceof Nt && (o2 = a2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Sn(o2, r2)), n2 = t3 + i2;
|
|
3534
3498
|
}
|
|
3535
3499
|
return n2 < e2.length && s2.push(e2.substring(n2)), s2;
|
|
3536
|
-
},
|
|
3537
|
-
function
|
|
3500
|
+
}, On = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
|
|
3501
|
+
function Pn(e2 = { except: [] }) {
|
|
3538
3502
|
var _a2;
|
|
3539
|
-
const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 :
|
|
3540
|
-
return s2.includes("BulletPoint") || t2.multilineSteps.push(
|
|
3503
|
+
const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : On.filter((t3) => !e2.only.includes(t3));
|
|
3504
|
+
return s2.includes("BulletPoint") || t2.multilineSteps.push(_n, An), s2.includes("Mention") || t2.singlelineSteps.push(Cn), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Tn), s2.includes("Codespan") || t2.multilineSteps.push(We(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3.replace(/<!!mention:.*?\|([^>]*)>/gim, "@$1").replace(/<!!customemoji:(.*?)>/gim, "$1") }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(In), s2.includes("Actions") || (t2.singlelineSteps.push(xn), t2.singlelineSteps.push(En)), s2.includes("Wikitext") || t2.singlelineSteps.push(Fe), s2.includes("Autolink") || t2.singlelineSteps.push(Dn, Nn), t2;
|
|
3541
3505
|
}
|
|
3542
|
-
const
|
|
3506
|
+
const jn = (function(e2) {
|
|
3543
3507
|
const t2 = RegExp(`[^${e2}]+${e2}?|${e2}`, "g");
|
|
3544
3508
|
return (e3) => Array.from(e3.match(t2) || []);
|
|
3545
3509
|
})("\n");
|
|
3546
|
-
function
|
|
3510
|
+
function $n(e2, t2 = { except: [] }) {
|
|
3547
3511
|
let s2 = (function(e3, t3) {
|
|
3548
3512
|
let s3 = [e3];
|
|
3549
|
-
return s3 =
|
|
3550
|
-
})(e2,
|
|
3513
|
+
return s3 = Wn(s3, t3.multilineSteps), s3 = Wn(s3, [jn]), s3 = Wn(s3, t3.singlelineSteps), s3 = qn(s3), s3;
|
|
3514
|
+
})(e2, Pn(t2));
|
|
3551
3515
|
return s2 = Ln(s2, false), s2;
|
|
3552
3516
|
}
|
|
3553
|
-
function
|
|
3554
|
-
return
|
|
3517
|
+
function Un(e2) {
|
|
3518
|
+
return $n(e2, { except: ["FormattedLink", "Actions"] });
|
|
3555
3519
|
}
|
|
3556
|
-
function
|
|
3557
|
-
return t2.reduce((e3, t3) =>
|
|
3520
|
+
function Wn(e2, t2) {
|
|
3521
|
+
return t2.reduce((e3, t3) => Ue(e3, t3), e2);
|
|
3558
3522
|
}
|
|
3559
|
-
function
|
|
3523
|
+
function qn(e2) {
|
|
3560
3524
|
const t2 = [];
|
|
3561
3525
|
let s2 = -1;
|
|
3562
|
-
for (const n2 of e2) "string" == typeof n2 ? "string" == typeof t2[s2] ? t2[s2] += n2 : t2[++s2] = n2 : t2[++s2] = "children" in n2 ? __spreadProps(__spreadValues({}, n2), { children:
|
|
3526
|
+
for (const n2 of e2) "string" == typeof n2 ? "string" == typeof t2[s2] ? t2[s2] += n2 : t2[++s2] = n2 : t2[++s2] = "children" in n2 ? __spreadProps(__spreadValues({}, n2), { children: qn(n2.children) }) : n2;
|
|
3563
3527
|
return t2;
|
|
3564
3528
|
}
|
|
3565
3529
|
function Ln(e2, t2) {
|
|
@@ -3576,76 +3540,122 @@ function Ln(e2, t2) {
|
|
|
3576
3540
|
}
|
|
3577
3541
|
return n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2;
|
|
3578
3542
|
}
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
});
|
|
3594
|
-
}
|
|
3595
|
-
remove() {
|
|
3596
|
-
return __async(this, null, function* () {
|
|
3597
|
-
const e2 = yield this._realtimeClient.call({ method: "DELETE", path: ["conversations", this.brandedConversationId, "messages", this.brandedMessageId, "reactions", this.emoji, this._realtimeClient.userId], data: {} });
|
|
3598
|
-
(e2.ok || "server" !== e2.where || 404 !== e2.value.status) && d(`Remove ${this.emoji} reaction from message ${this.messageId} in conversation ${this.conversationId}`, e2);
|
|
3599
|
-
});
|
|
3543
|
+
function Bn(e2, t2, s2) {
|
|
3544
|
+
return e2.primary < t2.primary ? "ASC" === s2.primaryOrder ? "before" : "after" : e2.primary > t2.primary ? "ASC" === s2.primaryOrder ? "after" : "before" : e2.secondary < t2.secondary ? "ASC" === s2.secondaryOrder ? "before" : "after" : e2.secondary > t2.secondary ? "ASC" === s2.secondaryOrder ? "after" : "before" : "equal";
|
|
3545
|
+
}
|
|
3546
|
+
function Gn(e2, t2, s2, n2) {
|
|
3547
|
+
if (0 === e2.length) return 0;
|
|
3548
|
+
var a2, r2, i2;
|
|
3549
|
+
a2 = 0, r2 = t2, i2 = e2.length - 1;
|
|
3550
|
+
const o2 = (t3) => {
|
|
3551
|
+
const a3 = e2[t3];
|
|
3552
|
+
return "after" === Bn(s2.getSortPointer(a3), n2, s2);
|
|
3553
|
+
};
|
|
3554
|
+
if (o2(t2 = Math.max(a2, Math.min(r2, i2)))) {
|
|
3555
|
+
for (let e3 = t2 - 1; e3 >= 0; e3--) if (!o2(e3)) return e3 + 1;
|
|
3556
|
+
return 0;
|
|
3600
3557
|
}
|
|
3558
|
+
for (let s3 = t2 + 1; s3 < e2.length; s3++) if (o2(s3)) return s3;
|
|
3559
|
+
return e2.length;
|
|
3601
3560
|
}
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3561
|
+
function Fn(e2, t2) {
|
|
3562
|
+
return t2 >= e2.length ? e2 : x(e2.slice(0, t2));
|
|
3563
|
+
}
|
|
3564
|
+
class Hn {
|
|
3565
|
+
constructor(e2, t2, s2, n2, a2) {
|
|
3566
|
+
this._onSnapshot = t2, this._pageSize = s2, this._maxPageSize = n2, this._sort = a2, this._windowStatus = void 0, this._loadMoreDeferred = void 0, this._connectedDefer = r(), this._connectedDefer.promise.catch(() => {
|
|
3567
|
+
}), this._underlyingSubscription = e2(this.handleSnapshot.bind(this)), this._underlyingSubscription.connected.catch((e3) => this._connectedDefer.reject(e3));
|
|
3605
3568
|
}
|
|
3606
|
-
|
|
3607
|
-
|
|
3569
|
+
updateWindowStatusAndGetState(e2, t2) {
|
|
3570
|
+
var _a2, _b2;
|
|
3571
|
+
if (null === e2) {
|
|
3572
|
+
const s3 = { type: "active", latestSnapshot: e2, loadedAll: t2 };
|
|
3573
|
+
return this._windowStatus = void 0, s3;
|
|
3574
|
+
}
|
|
3575
|
+
if (0 === e2.length) {
|
|
3576
|
+
const s3 = { type: "active", latestSnapshot: e2, loadedAll: t2 };
|
|
3577
|
+
return this._windowStatus && (this._windowStatus.lastState = s3), s3;
|
|
3578
|
+
}
|
|
3579
|
+
if (void 0 === this._windowStatus) {
|
|
3580
|
+
const s3 = Fn(e2, this._pageSize), n3 = s3[s3.length - 1], a3 = this._sort.getSortPointer(n3), r3 = t2 ? 0 : this._pageSize - s3.length, i3 = { type: "active", latestSnapshot: s3, loadedAll: t2 && e2 === s3 };
|
|
3581
|
+
return this._windowStatus = { endPoint: a3, loadingMore: r3, lastState: i3 }, i3;
|
|
3582
|
+
}
|
|
3583
|
+
const s2 = Gn(e2, (_b2 = (_a2 = this._windowStatus.lastState.latestSnapshot) == null ? void 0 : _a2.length) != null ? _b2 : this._pageSize, this._sort, this._windowStatus.endPoint), n2 = Math.min(s2 + this._windowStatus.loadingMore, e2.length), a2 = (function(e3, t3, s3) {
|
|
3584
|
+
if (e3 === t3) return false;
|
|
3585
|
+
if (null === e3 || null === t3) return true;
|
|
3586
|
+
if (e3.length !== s3) return true;
|
|
3587
|
+
for (let n3 = 0; n3 < s3; n3++) if (e3[n3] !== t3[n3]) return true;
|
|
3588
|
+
return false;
|
|
3589
|
+
})(this._windowStatus.lastState.latestSnapshot, e2, n2), r2 = t2 && n2 === e2.length, i2 = this._windowStatus.lastState.loadedAll !== r2;
|
|
3590
|
+
if (!a2 && !i2) return this._windowStatus.lastState;
|
|
3591
|
+
const o2 = Fn(e2, n2), c2 = { type: "active", latestSnapshot: o2, loadedAll: r2 };
|
|
3592
|
+
if (0 === o2.length) return c2;
|
|
3593
|
+
const l2 = o2.length - s2, h2 = c2.loadedAll ? 0 : this._windowStatus.loadingMore - l2;
|
|
3594
|
+
if (h2 === this._windowStatus.loadingMore) return this._windowStatus = __spreadProps(__spreadValues({}, this._windowStatus), { lastState: c2 }), c2;
|
|
3595
|
+
const u2 = o2[o2.length - 1], d2 = this._sort.getSortPointer(u2), p2 = (m2 = d2, f2 = this._windowStatus.endPoint, g2 = this._sort, "after" === Bn(m2, f2, g2) ? m2 : f2);
|
|
3596
|
+
var m2, f2, g2;
|
|
3597
|
+
return this._windowStatus = { endPoint: p2, loadingMore: h2, lastState: c2 }, c2;
|
|
3598
|
+
}
|
|
3599
|
+
handleSnapshot(e2, t2) {
|
|
3600
|
+
var _a2, _b2;
|
|
3601
|
+
const s2 = (_a2 = this._windowStatus) == null ? void 0 : _a2.lastState, n2 = this.updateWindowStatusAndGetState(e2, t2);
|
|
3602
|
+
if (this._connectedDefer.resolve(n2), n2 !== s2 && ((_b2 = this._onSnapshot) == null ? void 0 : _b2.call(this, n2.latestSnapshot, n2.loadedAll)), this._loadMoreDeferred && void 0 === this._windowStatus && (this._loadMoreDeferred.resolve(), this._loadMoreDeferred = void 0), this._loadMoreDeferred && this._windowStatus && this._windowStatus.loadingMore <= 0 && (this._loadMoreDeferred.resolve(), this._loadMoreDeferred = void 0), this._windowStatus && this._windowStatus.loadingMore > 0) {
|
|
3603
|
+
const e3 = this._windowStatus.loadingMore;
|
|
3604
|
+
setTimeout(() => this._underlyingSubscription.loadMore(e3));
|
|
3605
|
+
}
|
|
3608
3606
|
}
|
|
3609
|
-
get
|
|
3610
|
-
|
|
3607
|
+
get state() {
|
|
3608
|
+
const e2 = this._underlyingSubscription.state;
|
|
3609
|
+
return "active" === e2.type && null !== e2 ? this._windowStatus ? this._windowStatus.lastState : this.updateWindowStatusAndGetState(e2.latestSnapshot, e2.loadedAll) : e2;
|
|
3611
3610
|
}
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
if ("" === e2) throw new Error(`Creating ReactionRef failed because emoji "${e2}" is an empty string`);
|
|
3615
|
-
return this._realtimeClient.refs.reaction(this.brandedConversationId, this.brandedId, e2);
|
|
3611
|
+
get connected() {
|
|
3612
|
+
return this._connectedDefer.promise;
|
|
3616
3613
|
}
|
|
3617
|
-
get() {
|
|
3618
|
-
return
|
|
3619
|
-
const e2 = yield this._realtimeClient.call({ method: "GET", path: ["me", "conversations", this.brandedConversationId, "messages", this.brandedId], data: {} });
|
|
3620
|
-
if (!e2.ok && "server" === e2.where && 404 === e2.value.status) return null;
|
|
3621
|
-
if (!e2.ok && "server" === e2.where && 403 === e2.value.status && "NOT_A_PARTICIPANT" === e2.value.errorCode) return null;
|
|
3622
|
-
const t2 = d("Get message " + this.id, e2), s2 = yield this._realtimeClient.hydrateMessageData(t2, this.brandedConversationId);
|
|
3623
|
-
return ta("Get message " + this.id, s2);
|
|
3624
|
-
});
|
|
3614
|
+
get terminated() {
|
|
3615
|
+
return this._underlyingSubscription.terminated;
|
|
3625
3616
|
}
|
|
3626
|
-
|
|
3627
|
-
return __async(this,
|
|
3628
|
-
|
|
3629
|
-
|
|
3617
|
+
loadMore() {
|
|
3618
|
+
return __async(this, arguments, function* (e2 = this._pageSize) {
|
|
3619
|
+
var _a2, _b2, _c;
|
|
3620
|
+
if (e2 <= 0 || !Number.isInteger(e2)) throw new Error("Invalid count: must be a positive integer.");
|
|
3621
|
+
if (e2 > this._maxPageSize) throw new Error(`Invalid count: cannot load more than ${this._maxPageSize} items at once.`);
|
|
3622
|
+
if (void 0 === this._windowStatus) return Promise.resolve();
|
|
3623
|
+
if ("active" !== this._underlyingSubscription.state.type) return Promise.resolve();
|
|
3624
|
+
const t2 = this._underlyingSubscription.state.latestSnapshot;
|
|
3625
|
+
if (null === t2) return Promise.resolve();
|
|
3626
|
+
const s2 = this._underlyingSubscription.state.loadedAll, n2 = this.updateWindowStatusAndGetState(t2, s2), a2 = t2.length - n2.latestSnapshot.length, i2 = s2 ? a2 : Number.POSITIVE_INFINITY, o2 = Math.min(e2, i2);
|
|
3627
|
+
if (this._windowStatus.loadingMore = Math.max(this._windowStatus.loadingMore, o2), a2 > 0) {
|
|
3628
|
+
const e3 = this._windowStatus.lastState, n3 = this.updateWindowStatusAndGetState(t2, s2);
|
|
3629
|
+
n3 !== e3 && ((_a2 = this._onSnapshot) == null ? void 0 : _a2.call(this, n3.latestSnapshot, n3.loadedAll));
|
|
3630
|
+
}
|
|
3631
|
+
if (this._windowStatus.loadingMore <= 0) return (_b2 = this._loadMoreDeferred) == null ? void 0 : _b2.resolve(), void (this._loadMoreDeferred = void 0);
|
|
3632
|
+
const c2 = (_c = this._loadMoreDeferred) != null ? _c : r();
|
|
3633
|
+
this._loadMoreDeferred = c2, yield this._underlyingSubscription.loadMore(this._windowStatus.loadingMore), yield c2.promise;
|
|
3630
3634
|
});
|
|
3631
3635
|
}
|
|
3632
|
-
|
|
3633
|
-
return
|
|
3634
|
-
const e2 = yield this._realtimeClient.call({ method: "DELETE", path: ["conversations", this.brandedConversationId, "messages", this.brandedId], data: {} });
|
|
3635
|
-
(e2.ok || "server" !== e2.where || 404 !== e2.value.status) && d(`Delete message ${this.id} in conversation ${this.conversationId}`, e2);
|
|
3636
|
-
});
|
|
3636
|
+
unsubscribe() {
|
|
3637
|
+
return this._underlyingSubscription.unsubscribe();
|
|
3637
3638
|
}
|
|
3638
3639
|
}
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3640
|
+
class zn extends Hn {
|
|
3641
|
+
constructor(e2, t2, s2) {
|
|
3642
|
+
super((s3) => e2.subscribe(["me", "conversations", t2, "messages"], s3), s2, 30, 100, { getSortPointer: (e3) => ({ primary: e3.createdAt, secondary: e3.id }), primaryOrder: "DESC", secondaryOrder: "ASC" });
|
|
3642
3643
|
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3644
|
+
}
|
|
3645
|
+
class Jn extends Hn {
|
|
3646
|
+
constructor(e2, t2, s2) {
|
|
3647
|
+
super((s3) => e2.subscribe(["me", "conversations", t2, "participants"], s3), s2, 10, 50, { getSortPointer: (e3) => ({ primary: e3.joinedAt, secondary: e3.user.id }), primaryOrder: "DESC", secondaryOrder: "ASC" });
|
|
3645
3648
|
}
|
|
3646
|
-
if ("content" in e2 && e2.content) return e2.content;
|
|
3647
3649
|
}
|
|
3648
|
-
class
|
|
3650
|
+
class Yn extends Hn {
|
|
3651
|
+
constructor(e2, t2) {
|
|
3652
|
+
super((t3) => e2.subscribe(["me", "conversations"], t3), t2, 20, 30, { getSortPointer: (e3) => {
|
|
3653
|
+
var _a2, _b2;
|
|
3654
|
+
return { primary: (_b2 = (_a2 = e3.lastMessage) == null ? void 0 : _a2.createdAt) != null ? _b2 : e3.createdAt, secondary: e3.id };
|
|
3655
|
+
}, primaryOrder: "DESC", secondaryOrder: "ASC" });
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
class Qn {
|
|
3649
3659
|
constructor(e2, t2) {
|
|
3650
3660
|
this.id = e2, this._realtimeClient = t2, this.uselessObjForTypeCheck = { subject: null, photoUrl: null, welcomeMessages: null, custom: null, access: null, notify: null };
|
|
3651
3661
|
}
|
|
@@ -3720,15 +3730,15 @@ class Jn {
|
|
|
3720
3730
|
}
|
|
3721
3731
|
send(e2) {
|
|
3722
3732
|
return __async(this, null, function* () {
|
|
3723
|
-
const t2 = { content:
|
|
3733
|
+
const t2 = { content: Vn(e2), referencedMessageId: Kn(e2), custom: "string" == typeof e2 ? void 0 : e2.custom, idempotencyKey: $e((/* @__PURE__ */ new Date()).getTime()) }, s2 = yield this._realtimeClient.call({ method: "POST", path: ["conversations", this.brandedId, "messages"], data: t2 }), n2 = d("Send message to conversation " + this.id, s2);
|
|
3724
3734
|
return this._realtimeClient.refs.message(this.brandedId, n2.id);
|
|
3725
3735
|
});
|
|
3726
3736
|
}
|
|
3727
3737
|
subscribeMessages(e2) {
|
|
3728
|
-
return this._realtimeClient
|
|
3738
|
+
return new zn(this._realtimeClient, this.brandedId, e2);
|
|
3729
3739
|
}
|
|
3730
3740
|
subscribeParticipants(e2) {
|
|
3731
|
-
return this._realtimeClient
|
|
3741
|
+
return new Jn(this._realtimeClient, this.brandedId, e2);
|
|
3732
3742
|
}
|
|
3733
3743
|
subscribe(e2) {
|
|
3734
3744
|
return this._realtimeClient.subscribe(["me", "conversations", this.brandedId], e2);
|
|
@@ -3743,28 +3753,143 @@ class Jn {
|
|
|
3743
3753
|
});
|
|
3744
3754
|
}
|
|
3745
3755
|
}
|
|
3746
|
-
function
|
|
3756
|
+
function Vn(e2) {
|
|
3747
3757
|
if ("string" == typeof e2) {
|
|
3748
|
-
return [{ type: "text", children:
|
|
3758
|
+
return [{ type: "text", children: Un(e2) }];
|
|
3749
3759
|
}
|
|
3750
3760
|
if ("text" in e2) {
|
|
3751
|
-
return [{ type: "text", children:
|
|
3761
|
+
return [{ type: "text", children: Un(e2.text) }];
|
|
3752
3762
|
}
|
|
3753
3763
|
return e2.content;
|
|
3754
3764
|
}
|
|
3755
|
-
function
|
|
3765
|
+
function Kn(e2) {
|
|
3756
3766
|
if ("string" == typeof e2) return;
|
|
3757
3767
|
const t2 = e2.referencedMessage;
|
|
3758
3768
|
return void 0 !== t2 ? "string" == typeof t2 ? t2 : t2.id : void 0;
|
|
3759
3769
|
}
|
|
3760
|
-
|
|
3770
|
+
class Zn {
|
|
3771
|
+
constructor(e2, t2, s2) {
|
|
3772
|
+
this.userId = e2, this.conversationId = t2, this._realtimeClient = s2;
|
|
3773
|
+
}
|
|
3774
|
+
get brandedUserId() {
|
|
3775
|
+
return this.userId;
|
|
3776
|
+
}
|
|
3777
|
+
get brandedConversationId() {
|
|
3778
|
+
return this.conversationId;
|
|
3779
|
+
}
|
|
3780
|
+
get() {
|
|
3781
|
+
return __async(this, null, function* () {
|
|
3782
|
+
const e2 = yield this._realtimeClient.call({ method: "GET", path: ["me", "conversations", this.brandedConversationId, "participants", this.brandedUserId], data: {} }), t2 = yield this._realtimeClient.call({ method: "GET", path: ["users", this.brandedUserId], data: { includePrivateFields: false } }), [s2, n2] = yield Promise.all([e2, t2]);
|
|
3783
|
+
if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return null;
|
|
3784
|
+
if (!n2.ok && "server" === n2.where && 404 === n2.value.status) return null;
|
|
3785
|
+
return le(d(`Get participant ${this.userId} in conversation ${this.conversationId}`, s2), ce(d(`Get user ${this.userId}`, n2)));
|
|
3786
|
+
});
|
|
3787
|
+
}
|
|
3788
|
+
set() {
|
|
3789
|
+
return __async(this, arguments, function* (e2 = {}) {
|
|
3790
|
+
const t2 = yield this._realtimeClient.call({ method: "PUT", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: e2 });
|
|
3791
|
+
d(`Set participant ${this.userId} in conversation ${this.conversationId}`, t2);
|
|
3792
|
+
});
|
|
3793
|
+
}
|
|
3794
|
+
edit() {
|
|
3795
|
+
return __async(this, arguments, function* (e2 = {}) {
|
|
3796
|
+
const t2 = yield this._realtimeClient.call({ method: "PATCH", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: e2 });
|
|
3797
|
+
d(`Edit participant ${this.userId} in conversation ${this.conversationId}`, t2);
|
|
3798
|
+
});
|
|
3799
|
+
}
|
|
3800
|
+
createIfNotExists() {
|
|
3801
|
+
return __async(this, arguments, function* (e2 = {}) {
|
|
3802
|
+
const t2 = yield this._realtimeClient.call({ method: "POST", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: e2 });
|
|
3803
|
+
(t2.ok || "server" !== t2.where || 409 !== t2.value.status) && d(`Add participant ${this.userId} to conversation ${this.conversationId}`, t2);
|
|
3804
|
+
});
|
|
3805
|
+
}
|
|
3806
|
+
delete() {
|
|
3807
|
+
return __async(this, null, function* () {
|
|
3808
|
+
const e2 = yield this._realtimeClient.call({ method: "DELETE", path: ["conversations", this.brandedConversationId, "participants", this.brandedUserId], data: {} });
|
|
3809
|
+
(e2.ok || "server" !== e2.where || 404 !== e2.value.status) && d(`Remove participant ${this.userId} from conversation ${this.conversationId}`, e2);
|
|
3810
|
+
});
|
|
3811
|
+
}
|
|
3812
|
+
subscribe(e2) {
|
|
3813
|
+
return this._realtimeClient.subscribe(["me", "conversations", this.brandedConversationId, "participants", this.brandedUserId], e2);
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
class Xn {
|
|
3817
|
+
constructor(e2, t2, s2, n2) {
|
|
3818
|
+
this.emoji = e2, this.messageId = t2, this.conversationId = s2, this._realtimeClient = n2;
|
|
3819
|
+
}
|
|
3820
|
+
get brandedMessageId() {
|
|
3821
|
+
return this.messageId;
|
|
3822
|
+
}
|
|
3823
|
+
get brandedConversationId() {
|
|
3824
|
+
return this.conversationId;
|
|
3825
|
+
}
|
|
3826
|
+
add() {
|
|
3827
|
+
return __async(this, null, function* () {
|
|
3828
|
+
const e2 = yield this._realtimeClient.call({ method: "PUT", path: ["conversations", this.brandedConversationId, "messages", this.brandedMessageId, "reactions", this.emoji, this._realtimeClient.userId], data: {} });
|
|
3829
|
+
d(`Add ${this.emoji} reaction on message ${this.messageId} in conversation ${this.conversationId}`, e2);
|
|
3830
|
+
});
|
|
3831
|
+
}
|
|
3832
|
+
remove() {
|
|
3833
|
+
return __async(this, null, function* () {
|
|
3834
|
+
const e2 = yield this._realtimeClient.call({ method: "DELETE", path: ["conversations", this.brandedConversationId, "messages", this.brandedMessageId, "reactions", this.emoji, this._realtimeClient.userId], data: {} });
|
|
3835
|
+
(e2.ok || "server" !== e2.where || 404 !== e2.value.status) && d(`Remove ${this.emoji} reaction from message ${this.messageId} in conversation ${this.conversationId}`, e2);
|
|
3836
|
+
});
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3839
|
+
class ea {
|
|
3840
|
+
constructor(e2, t2, s2) {
|
|
3841
|
+
this.id = e2, this.conversationId = t2, this._realtimeClient = s2;
|
|
3842
|
+
}
|
|
3843
|
+
get brandedId() {
|
|
3844
|
+
return this.id;
|
|
3845
|
+
}
|
|
3846
|
+
get brandedConversationId() {
|
|
3847
|
+
return this.conversationId;
|
|
3848
|
+
}
|
|
3849
|
+
reaction(e2) {
|
|
3850
|
+
if ("string" != typeof e2) throw new Error(`Creating ReactionRef failed because emoji "${e2}" is not a string`);
|
|
3851
|
+
if ("" === e2) throw new Error(`Creating ReactionRef failed because emoji "${e2}" is an empty string`);
|
|
3852
|
+
return this._realtimeClient.refs.reaction(this.brandedConversationId, this.brandedId, e2);
|
|
3853
|
+
}
|
|
3854
|
+
get() {
|
|
3855
|
+
return __async(this, null, function* () {
|
|
3856
|
+
const e2 = yield this._realtimeClient.call({ method: "GET", path: ["me", "conversations", this.brandedConversationId, "messages", this.brandedId], data: {} });
|
|
3857
|
+
if (!e2.ok && "server" === e2.where && 404 === e2.value.status) return null;
|
|
3858
|
+
if (!e2.ok && "server" === e2.where && 403 === e2.value.status && "NOT_A_PARTICIPANT" === e2.value.errorCode) return null;
|
|
3859
|
+
const t2 = d("Get message " + this.id, e2), s2 = yield this._realtimeClient.hydrateMessageData(t2, this.brandedConversationId);
|
|
3860
|
+
return ca("Get message " + this.id, s2);
|
|
3861
|
+
});
|
|
3862
|
+
}
|
|
3863
|
+
edit(e2) {
|
|
3864
|
+
return __async(this, null, function* () {
|
|
3865
|
+
const t2 = { content: ta(e2), custom: "string" == typeof e2 ? void 0 : e2.custom }, s2 = yield this._realtimeClient.call({ method: "PATCH", path: ["conversations", this.brandedConversationId, "messages", this.brandedId], data: t2 });
|
|
3866
|
+
d(`Edit message ${this.id} in conversation ${this.conversationId}`, s2);
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
delete() {
|
|
3870
|
+
return __async(this, null, function* () {
|
|
3871
|
+
const e2 = yield this._realtimeClient.call({ method: "DELETE", path: ["conversations", this.brandedConversationId, "messages", this.brandedId], data: {} });
|
|
3872
|
+
(e2.ok || "server" !== e2.where || 404 !== e2.value.status) && d(`Delete message ${this.id} in conversation ${this.conversationId}`, e2);
|
|
3873
|
+
});
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
function ta(e2) {
|
|
3877
|
+
if ("string" == typeof e2) {
|
|
3878
|
+
return [{ type: "text", children: $n(e2) }];
|
|
3879
|
+
}
|
|
3880
|
+
if ("text" in e2 && e2.text) {
|
|
3881
|
+
return [{ type: "text", children: $n(e2.text) }];
|
|
3882
|
+
}
|
|
3883
|
+
if ("content" in e2 && e2.content) return e2.content;
|
|
3884
|
+
}
|
|
3885
|
+
const sa = "undefined" != typeof WeakRef ? WeakRef : class {
|
|
3761
3886
|
constructor(e2) {
|
|
3762
3887
|
this.value = e2;
|
|
3763
3888
|
}
|
|
3764
3889
|
deref() {
|
|
3765
3890
|
return this.value;
|
|
3766
3891
|
}
|
|
3767
|
-
},
|
|
3892
|
+
}, na = globalThis.FinalizationRegistry, aa = void 0 !== na ? na : class {
|
|
3768
3893
|
constructor(e2) {
|
|
3769
3894
|
}
|
|
3770
3895
|
register(e2, t2, s2) {
|
|
@@ -3772,9 +3897,9 @@ const Qn = "undefined" != typeof WeakRef ? WeakRef : class {
|
|
|
3772
3897
|
unregister(e2) {
|
|
3773
3898
|
}
|
|
3774
3899
|
};
|
|
3775
|
-
class
|
|
3900
|
+
class ra {
|
|
3776
3901
|
constructor(e2) {
|
|
3777
|
-
this.client = e2, this.users = /* @__PURE__ */ new Map(), this.conversations = /* @__PURE__ */ new Map(), this.participants = /* @__PURE__ */ new Map(), this.messages = /* @__PURE__ */ new Map(), this.reactions = /* @__PURE__ */ new Map(), this.registry = new
|
|
3902
|
+
this.client = e2, this.users = /* @__PURE__ */ new Map(), this.conversations = /* @__PURE__ */ new Map(), this.participants = /* @__PURE__ */ new Map(), this.messages = /* @__PURE__ */ new Map(), this.reactions = /* @__PURE__ */ new Map(), this.registry = new aa(({ map: e3, key: t2 }) => {
|
|
3778
3903
|
e3.delete(t2);
|
|
3779
3904
|
});
|
|
3780
3905
|
}
|
|
@@ -3783,40 +3908,40 @@ class Zn {
|
|
|
3783
3908
|
const t2 = (_a2 = this.users.get(e2)) == null ? void 0 : _a2.deref();
|
|
3784
3909
|
if (t2) return t2;
|
|
3785
3910
|
const s2 = x(new je(e2, this.client));
|
|
3786
|
-
return this.users.set(e2, new
|
|
3911
|
+
return this.users.set(e2, new sa(s2)), this.registry.register(s2, { map: this.users, key: e2 }), s2;
|
|
3787
3912
|
}
|
|
3788
3913
|
conversation(e2) {
|
|
3789
3914
|
var _a2;
|
|
3790
3915
|
const t2 = (_a2 = this.conversations.get(e2)) == null ? void 0 : _a2.deref();
|
|
3791
3916
|
if (t2) return t2;
|
|
3792
|
-
const s2 = x(new
|
|
3793
|
-
return this.conversations.set(e2, new
|
|
3917
|
+
const s2 = x(new Qn(e2, this.client));
|
|
3918
|
+
return this.conversations.set(e2, new sa(s2)), this.registry.register(s2, { map: this.conversations, key: e2 }), s2;
|
|
3794
3919
|
}
|
|
3795
3920
|
participant(e2, t2) {
|
|
3796
3921
|
var _a2;
|
|
3797
3922
|
const s2 = `[${e2}][${t2}]`, n2 = (_a2 = this.participants.get(s2)) == null ? void 0 : _a2.deref();
|
|
3798
3923
|
if (n2) return n2;
|
|
3799
|
-
const a2 = x(new
|
|
3800
|
-
return this.participants.set(s2, new
|
|
3924
|
+
const a2 = x(new Zn(t2, e2, this.client));
|
|
3925
|
+
return this.participants.set(s2, new sa(a2)), this.registry.register(a2, { map: this.participants, key: s2 }), a2;
|
|
3801
3926
|
}
|
|
3802
3927
|
message(e2, t2) {
|
|
3803
3928
|
var _a2;
|
|
3804
3929
|
const s2 = `[${e2}][${t2}]`, n2 = (_a2 = this.messages.get(s2)) == null ? void 0 : _a2.deref();
|
|
3805
3930
|
if (n2) return n2;
|
|
3806
|
-
const a2 = x(new
|
|
3807
|
-
return this.messages.set(s2, new
|
|
3931
|
+
const a2 = x(new ea(t2, e2, this.client));
|
|
3932
|
+
return this.messages.set(s2, new sa(a2)), this.registry.register(a2, { map: this.messages, key: s2 }), a2;
|
|
3808
3933
|
}
|
|
3809
3934
|
reaction(e2, t2, s2) {
|
|
3810
3935
|
var _a2;
|
|
3811
3936
|
const n2 = `[${e2}][${t2}][${s2}]`, a2 = (_a2 = this.reactions.get(n2)) == null ? void 0 : _a2.deref();
|
|
3812
3937
|
if (a2) return a2;
|
|
3813
|
-
const r2 = x(new
|
|
3814
|
-
return this.reactions.set(n2, new
|
|
3938
|
+
const r2 = x(new Xn(s2, t2, e2, this.client));
|
|
3939
|
+
return this.reactions.set(n2, new sa(r2)), this.registry.register(r2, { map: this.reactions, key: n2 }), r2;
|
|
3815
3940
|
}
|
|
3816
3941
|
}
|
|
3817
|
-
class
|
|
3942
|
+
class ia {
|
|
3818
3943
|
constructor(e2, t2, s2) {
|
|
3819
|
-
this.userId = t2, this.refs = new
|
|
3944
|
+
this.userId = t2, this.refs = new ra(this), this.alive = true, this.connection = new Oe(e2, s2, this), s2.onTokenRefreshFailed(() => {
|
|
3820
3945
|
this.destroy();
|
|
3821
3946
|
});
|
|
3822
3947
|
}
|
|
@@ -3859,7 +3984,7 @@ class Xn {
|
|
|
3859
3984
|
return __async(this, null, function* () {
|
|
3860
3985
|
const s2 = this.listMessages(e2.id, { limit: 1 }, t2), n2 = yield this.call({ method: "GET", path: ["me", "conversations", e2.id], data: {}, headers: t2 });
|
|
3861
3986
|
if (!n2.ok && "server" === n2.where && 404 === n2.value.status) return o(null);
|
|
3862
|
-
const a2 = d("Get conversation " + e2.id, n2), r2 =
|
|
3987
|
+
const a2 = d("Get conversation " + e2.id, n2), r2 = ca("Get last message in conversation " + e2.id, yield s2), i2 = (function(e3, t3) {
|
|
3863
3988
|
return x({ id: e3.id, subject: e3.subject, photoUrl: e3.photoUrl, welcomeMessages: x(e3.welcomeMessages), custom: x(e3.custom), createdAt: e3.createdAt, joinedAt: e3.joinedAt, lastMessageAt: e3.lastMessageAt, unreadMessageCount: e3.unreadMessageCount, isUnread: e3.isUnread, access: e3.access, notify: e3.notify, lastMessage: t3, readUntil: e3.readUntil, everyoneReadUntil: e3.everyoneReadUntil });
|
|
3864
3989
|
})(a2, 0 === r2.length ? null : r2[0]);
|
|
3865
3990
|
return o(i2);
|
|
@@ -3868,7 +3993,7 @@ class Xn {
|
|
|
3868
3993
|
listMessages(e2, t2, s2) {
|
|
3869
3994
|
return __async(this, null, function* () {
|
|
3870
3995
|
const n2 = yield this.call({ method: "GET", path: ["me", "conversations", e2, "messages"], data: t2, headers: s2 });
|
|
3871
|
-
if (!n2.ok) return
|
|
3996
|
+
if (!n2.ok) return oa(n2, "Listing messages in " + e2);
|
|
3872
3997
|
const a2 = n2.value.data.data, r2 = yield Promise.all(a2.map((t3) => this.hydrateMessageData(t3, e2))), i2 = r2.find((e3) => !e3.ok);
|
|
3873
3998
|
if (void 0 !== i2 && !i2.ok) return i2;
|
|
3874
3999
|
return o(r2.map(({ value: e3 }) => e3));
|
|
@@ -3879,7 +4004,7 @@ class Xn {
|
|
|
3879
4004
|
const s2 = yield this.call({ method: "GET", path: ["me", "conversations", e2, "messages", t2], data: {} });
|
|
3880
4005
|
if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return o(null);
|
|
3881
4006
|
if (!s2.ok && "server" === s2.where && 403 === s2.value.status && "NOT_A_PARTICIPANT" === s2.value.errorCode) return o(null);
|
|
3882
|
-
if (!s2.ok) return
|
|
4007
|
+
if (!s2.ok) return oa(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
|
|
3883
4008
|
const n2 = s2.value.data, a2 = yield this.getUser(n2.senderId);
|
|
3884
4009
|
if (!a2.ok) return a2;
|
|
3885
4010
|
const r2 = (function(e3, t3) {
|
|
@@ -3892,20 +4017,20 @@ class Xn {
|
|
|
3892
4017
|
return __async(this, null, function* () {
|
|
3893
4018
|
const t2 = yield this.call({ method: "GET", path: ["users", e2], data: { includePrivateFields: false } });
|
|
3894
4019
|
if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return o(null);
|
|
3895
|
-
if (!t2.ok) return
|
|
4020
|
+
if (!t2.ok) return oa(t2, "Get user " + e2);
|
|
3896
4021
|
return o(ce(t2.value.data));
|
|
3897
4022
|
});
|
|
3898
4023
|
}
|
|
3899
4024
|
}
|
|
3900
|
-
function
|
|
4025
|
+
function oa(e2, t2) {
|
|
3901
4026
|
return "server" === e2.where ? l(__spreadProps(__spreadValues({}, e2.value), { operation: t2 })) : e2;
|
|
3902
4027
|
}
|
|
3903
|
-
function
|
|
4028
|
+
function ca(e2, t2) {
|
|
3904
4029
|
var _a2;
|
|
3905
4030
|
if (t2.ok) return t2.value;
|
|
3906
4031
|
throw "SESSION_DESTROYED" === t2.value ? new Error(`${e2} failed because the session was destroyed`) : new Error(p((_a2 = t2.value.operation) != null ? _a2 : e2, t2.value));
|
|
3907
4032
|
}
|
|
3908
|
-
class
|
|
4033
|
+
class la {
|
|
3909
4034
|
constructor(e2, t2, s2) {
|
|
3910
4035
|
this.realtimeWsApiUrl = e2, this.internalHttpApiUrl = t2, this.restApiHttpUrl = s2;
|
|
3911
4036
|
}
|
|
@@ -3918,7 +4043,7 @@ class sa {
|
|
|
3918
4043
|
}
|
|
3919
4044
|
static fromHost(e2) {
|
|
3920
4045
|
var _a2;
|
|
3921
|
-
const t2 = new
|
|
4046
|
+
const t2 = new la("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
|
|
3922
4047
|
if (!e2) return t2;
|
|
3923
4048
|
if ("@currentHost" === e2) {
|
|
3924
4049
|
if ("undefined" == typeof location) throw new Error("You can only use @currentHost in a browser.");
|
|
@@ -3928,17 +4053,17 @@ class sa {
|
|
|
3928
4053
|
const s2 = e2.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);
|
|
3929
4054
|
if (s2) {
|
|
3930
4055
|
const e3 = s2[1];
|
|
3931
|
-
return ["app", "cdn", "api", "realtime"].includes(e3) ? t2 : new
|
|
4056
|
+
return ["app", "cdn", "api", "realtime"].includes(e3) ? t2 : new la(`wss://realtime-${e3}.talkjs.com/v1`, `https://app-${e3}.talkjs.com/api/v0`, `https://api-${e3}.talkjs.com/v1`);
|
|
3932
4057
|
}
|
|
3933
4058
|
return t2;
|
|
3934
4059
|
}
|
|
3935
|
-
return e2.includes("localhost") || e2.includes("localtest.me") || /^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e2) ? new
|
|
4060
|
+
return e2.includes("localhost") || e2.includes("localtest.me") || /^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e2) ? new la(`ws://${e2}/public_api/v1`, `http://${e2}/api/v0`, `http://${e2}/public_api/v1`) : new la(`wss://${e2}/public_api/v1`, `https://${e2}/api/v0`, `https://${e2}/public_api/v1`);
|
|
3936
4061
|
}
|
|
3937
4062
|
}
|
|
3938
|
-
function
|
|
4063
|
+
function ha({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2, errorTracker: c2, abortSignal: l2 }) {
|
|
3939
4064
|
var _a2;
|
|
3940
4065
|
(!r2 || r2 <= 0) && (r2 = 1);
|
|
3941
|
-
const h2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2026-
|
|
4066
|
+
const h2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2026-02-17T14:50:53.383Z" };
|
|
3942
4067
|
s2 instanceof FormData || (h2["Content-Type"] = (_a2 = n2 == null ? void 0 : n2.contentType) != null ? _a2 : "application/json");
|
|
3943
4068
|
return a(r2, () => __async(null, null, function* () {
|
|
3944
4069
|
if (o2) {
|
|
@@ -3962,12 +4087,12 @@ function na({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRe
|
|
|
3962
4087
|
throw s3;
|
|
3963
4088
|
});
|
|
3964
4089
|
}
|
|
3965
|
-
class
|
|
4090
|
+
class ua {
|
|
3966
4091
|
constructor(e2) {
|
|
3967
4092
|
__privateAdd(this, _e2);
|
|
3968
4093
|
__privateAdd(this, _t2);
|
|
3969
4094
|
var _a2, _b2, _c, _d;
|
|
3970
|
-
this._timeCreated = Date.now(), __privateSet(this, _e2, (_b2 = (_a2 = globalThis.document) == null ? void 0 : _a2.referrer) != null ? _b2 : ""), __privateSet(this, _t2, ((_d = (_c = globalThis.location) == null ? void 0 : _c.href) != null ? _d : globalThis.HermesInternal) ? "React Native Hermes" : ""), this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2026-
|
|
4095
|
+
this._timeCreated = Date.now(), __privateSet(this, _e2, (_b2 = (_a2 = globalThis.document) == null ? void 0 : _a2.referrer) != null ? _b2 : ""), __privateSet(this, _t2, ((_d = (_c = globalThis.location) == null ? void 0 : _c.href) != null ? _d : globalThis.HermesInternal) ? "React Native Hermes" : ""), this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2026-02-17T14:50:53.383Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: __privateGet(this, _t2), referrer: __privateGet(this, _e2), userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: __privateGet(this, _t2), stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2026-02-17T14:50:53.383Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
|
|
3971
4096
|
}
|
|
3972
4097
|
setData({ appId: e2, meId: t2, sessionId: s2 }) {
|
|
3973
4098
|
this._trackJSData.customer.userId = e2, this._trackJSData.customer.sessionId = `${e2}/${t2}`, this._trackJSData.customer.correlationId = s2;
|
|
@@ -3977,7 +4102,7 @@ class aa {
|
|
|
3977
4102
|
try {
|
|
3978
4103
|
0;
|
|
3979
4104
|
const t2 = __spreadProps(__spreadValues({}, this._trackJSData), { message: e2 });
|
|
3980
|
-
yield
|
|
4105
|
+
yield ha({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
|
|
3981
4106
|
} catch (e3) {
|
|
3982
4107
|
console.error("[TalkJS] Failed when sending an error report. Error: ", e3);
|
|
3983
4108
|
}
|
|
@@ -3986,9 +4111,9 @@ class aa {
|
|
|
3986
4111
|
}
|
|
3987
4112
|
_e2 = new WeakMap();
|
|
3988
4113
|
_t2 = new WeakMap();
|
|
3989
|
-
const
|
|
4114
|
+
const da = { log: (e2) => Promise.resolve(), setData: (e2) => {
|
|
3990
4115
|
} };
|
|
3991
|
-
class
|
|
4116
|
+
class pa {
|
|
3992
4117
|
constructor(e2, t2 = {}) {
|
|
3993
4118
|
this._onSubscription = t2, this._handlers = {};
|
|
3994
4119
|
for (const t3 in e2) Object.hasOwnProperty.call(e2, t3) && (this._handlers[t3] = []);
|
|
@@ -4033,7 +4158,7 @@ class ia {
|
|
|
4033
4158
|
return this.on(e2, t2), { unsubscribe: () => this.off(e2, t2) };
|
|
4034
4159
|
}
|
|
4035
4160
|
}
|
|
4036
|
-
class
|
|
4161
|
+
class ma {
|
|
4037
4162
|
constructor(e2) {
|
|
4038
4163
|
this.handlers = e2, this.tokenResult = null, this.pendingToken = null;
|
|
4039
4164
|
}
|
|
@@ -4045,6 +4170,9 @@ class oa {
|
|
|
4045
4170
|
return this.pendingToken = e2, this.handlers.onNeedToken(), e2.promise;
|
|
4046
4171
|
});
|
|
4047
4172
|
}
|
|
4173
|
+
getCachedTokenResult() {
|
|
4174
|
+
return this.tokenResult ? this.tokenResult : void 0;
|
|
4175
|
+
}
|
|
4048
4176
|
setTokenResult(e2) {
|
|
4049
4177
|
this.pendingToken && (this.pendingToken.resolve(e2), this.pendingToken = null), this.tokenResult = e2, this.handlers.onChange(e2);
|
|
4050
4178
|
}
|
|
@@ -4055,9 +4183,9 @@ class oa {
|
|
|
4055
4183
|
this.tokenResult = null, this.refreshToken();
|
|
4056
4184
|
}
|
|
4057
4185
|
}
|
|
4058
|
-
class
|
|
4186
|
+
class fa {
|
|
4059
4187
|
constructor(e2, t2, s2, n2) {
|
|
4060
|
-
this.apiUrls = e2, this.appId = t2, this.userId = s2, this.signature = n2, this.inner = new
|
|
4188
|
+
this.apiUrls = e2, this.appId = t2, this.userId = s2, this.signature = n2, this.inner = new ma({ onChange: (e3) => {
|
|
4061
4189
|
e3.ok ? this.eventEmitter.emit("tokenChanged", e3.value) : this.emitTokenRefreshFailed(e3.value);
|
|
4062
4190
|
}, onNeedToken: () => __async(this, null, function* () {
|
|
4063
4191
|
if (this._usingBokens && !this.signature && !this._calledBokens && (yield new Promise((e3) => setTimeout(e3, 1))), this._usingBokens) yield this.sendBokenRequest().then((e3) => this.inner.setTokenResult(o(e3))).catch((e3) => this.inner.setTokenResult(l(e3)));
|
|
@@ -4066,23 +4194,25 @@ class ca {
|
|
|
4066
4194
|
const e3 = c("Cannot refresh token, no `onNeedToken` provided.");
|
|
4067
4195
|
this.inner.setTokenResult(e3);
|
|
4068
4196
|
}
|
|
4069
|
-
}) }), this._usingBokens = true, this._calledBokens = false, this.onNeedToken = void 0, this.eventEmitter = new
|
|
4197
|
+
}) }), this._usingBokens = true, this._calledBokens = false, this.onNeedToken = void 0, this.eventEmitter = new pa({ tokenChanged(e3) {
|
|
4070
4198
|
}, tokenRefreshFailed(e3) {
|
|
4071
4199
|
}, tokenAccepted(e3) {
|
|
4072
4200
|
} }), this.sessionExpiryWarningTimeoutId = void 0;
|
|
4073
4201
|
const a2 = "undefined" != typeof window && e2.restApiHttpUrl.includes("api.talkjs.com");
|
|
4074
|
-
this.errorTracker = a2 ? new
|
|
4202
|
+
this.errorTracker = a2 ? new ua("970cd0be0fb74630b75c8451051299dc") : da;
|
|
4075
4203
|
}
|
|
4076
4204
|
get usingBokens() {
|
|
4077
4205
|
return this._usingBokens;
|
|
4078
4206
|
}
|
|
4079
4207
|
getToken() {
|
|
4080
4208
|
return __async(this, null, function* () {
|
|
4081
|
-
|
|
4082
|
-
if (e2.ok) return e2.value;
|
|
4083
|
-
throw e2.value;
|
|
4209
|
+
return va(yield this.inner.getTokenResult());
|
|
4084
4210
|
});
|
|
4085
4211
|
}
|
|
4212
|
+
getCachedToken() {
|
|
4213
|
+
const e2 = this.inner.getCachedTokenResult();
|
|
4214
|
+
if (void 0 !== e2) return va(e2);
|
|
4215
|
+
}
|
|
4086
4216
|
checkCanSetAuth() {
|
|
4087
4217
|
if (this._calledBokens) throw new Error("[TalkJS] Cannot switch to JWT authentication once connected to TalkJS servers. To use JWTs, call `setToken` or set `onNeedToken` before triggering any requests or mounting any components. We recommend setting up authentication in your app's entry point (App.jsx, main.js, or similar) so it runs first.");
|
|
4088
4218
|
}
|
|
@@ -4146,7 +4276,7 @@ class ca {
|
|
|
4146
4276
|
const e3 = (function(e4) {
|
|
4147
4277
|
const t3 = e4.split(".");
|
|
4148
4278
|
if (3 !== t3.length) throw "Token does not contain exactly two `.`. Check that you generated your JWT correctly. It should be `<header>.<payload>.<signature>`.";
|
|
4149
|
-
return { header:
|
|
4279
|
+
return { header: ga(t3[0]), payload: ga(t3[1]) };
|
|
4150
4280
|
})(s2);
|
|
4151
4281
|
n2 = e3.header, a2 = e3.payload;
|
|
4152
4282
|
} catch (e3) {
|
|
@@ -4190,7 +4320,7 @@ class ca {
|
|
|
4190
4320
|
return __async(this, null, function* () {
|
|
4191
4321
|
this._calledBokens = true;
|
|
4192
4322
|
let e2 = 0;
|
|
4193
|
-
const t2 = this.apiUrls.getBokensUrl(this.appId, this.userId, this.signature), s2 = yield
|
|
4323
|
+
const t2 = this.apiUrls.getBokensUrl(this.appId, this.userId, this.signature), s2 = yield ha({ method: "GET", url: t2, attempts: 1e4, shouldRetry: (t3) => {
|
|
4194
4324
|
if (t3 instanceof Error) return true;
|
|
4195
4325
|
if (401 === t3.status) throw "Check that you provided a valid signature.";
|
|
4196
4326
|
if (404 === t3.status) throw "Check that you specified the correct App ID.";
|
|
@@ -4203,7 +4333,7 @@ class ca {
|
|
|
4203
4333
|
});
|
|
4204
4334
|
}
|
|
4205
4335
|
}
|
|
4206
|
-
function
|
|
4336
|
+
function ga(e2) {
|
|
4207
4337
|
try {
|
|
4208
4338
|
const t2 = e2.replace(/-/g, "+").replace(/_/g, "/"), s2 = decodeURIComponent(atob(t2).split("").map((e3) => "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2)).join(""));
|
|
4209
4339
|
return JSON.parse(s2);
|
|
@@ -4211,14 +4341,18 @@ function la(e2) {
|
|
|
4211
4341
|
throw `Could not base64-decode and JSON-parse token section: ${e2}. Check that you base-64 encoded the section correctly.`;
|
|
4212
4342
|
}
|
|
4213
4343
|
}
|
|
4214
|
-
|
|
4344
|
+
function va(e2) {
|
|
4345
|
+
if (e2.ok) return e2.value;
|
|
4346
|
+
throw e2.value;
|
|
4347
|
+
}
|
|
4348
|
+
const ba = new class {
|
|
4215
4349
|
constructor() {
|
|
4216
4350
|
this.registry = {};
|
|
4217
4351
|
}
|
|
4218
4352
|
getOrCreate(e2) {
|
|
4219
4353
|
const t2 = this.key(e2), s2 = this.registry[t2];
|
|
4220
4354
|
if (s2) return s2;
|
|
4221
|
-
const n2 = new
|
|
4355
|
+
const n2 = new ya(e2);
|
|
4222
4356
|
return this.registry[t2] = n2, n2;
|
|
4223
4357
|
}
|
|
4224
4358
|
deregister(e2, t2) {
|
|
@@ -4229,11 +4363,11 @@ const ha = new class {
|
|
|
4229
4363
|
return `${e2}:${t2}`;
|
|
4230
4364
|
}
|
|
4231
4365
|
}();
|
|
4232
|
-
function
|
|
4366
|
+
function wa(e2) {
|
|
4233
4367
|
if (!e2) throw new Error("[TalkJS] Must provide an options object to `getTalkSession`");
|
|
4234
|
-
return e2.forceCreateNew ? new
|
|
4368
|
+
return e2.forceCreateNew ? new ya(e2) : ba.getOrCreate(e2);
|
|
4235
4369
|
}
|
|
4236
|
-
class
|
|
4370
|
+
class ya {
|
|
4237
4371
|
constructor(e2) {
|
|
4238
4372
|
this._onNeedToken = void 0, (function(e3) {
|
|
4239
4373
|
function t3(e4, t4) {
|
|
@@ -4243,7 +4377,7 @@ class da {
|
|
|
4243
4377
|
void 0 !== e3.tokenFetcher && t3("function" == typeof e3.tokenFetcher, "The `tokenFetcher` property of the `getTalkSession` options must be a function.");
|
|
4244
4378
|
})(e2);
|
|
4245
4379
|
const { appId: t2, userId: s2, token: n2, tokenFetcher: a2, signature: i2 } = e2;
|
|
4246
|
-
this._appId = t2, this._apiUrls = e2.apiUrls ? new
|
|
4380
|
+
this._appId = t2, this._apiUrls = e2.apiUrls ? new la(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : la.fromHost(e2.host), this._authProvider = new fa(this._apiUrls, t2, s2, i2), n2 && this._authProvider.setToken(n2), a2 && this._authProvider.setOnNeedToken(() => __async(this, null, function* () {
|
|
4247
4381
|
try {
|
|
4248
4382
|
const e3 = yield a2();
|
|
4249
4383
|
this._authProvider.setToken(e3);
|
|
@@ -4252,11 +4386,11 @@ class da {
|
|
|
4252
4386
|
}
|
|
4253
4387
|
}));
|
|
4254
4388
|
const o2 = Math.random().toString().split(".")[1];
|
|
4255
|
-
this._realtimeClient = new
|
|
4389
|
+
this._realtimeClient = new ia(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.8.1", o2, e2.clientBuild), s2, this._authProvider), this.currentUser = this.user(s2), this._terminationReason = r(), this._terminationReason.promise.then((e3) => {
|
|
4256
4390
|
console.error(`[TalkJS] ${e3}`);
|
|
4257
4391
|
}), (function(e3, t3) {
|
|
4258
4392
|
return __async(this, null, function* () {
|
|
4259
|
-
return
|
|
4393
|
+
return ha({ method: "GET", url: `${t3}/${e3}` }).then((e4) => __async(null, null, function* () {
|
|
4260
4394
|
return 200 === e4.status || 404 !== e4.status && (console.warn(`[TalkJS] Received unexpected ${e4.status} status code when validating app ID. Assuming that the app ID is valid.`), true);
|
|
4261
4395
|
})).catch((e4) => {
|
|
4262
4396
|
if ("string" != typeof e4 && "status" in e4) {
|
|
@@ -4304,18 +4438,18 @@ class da {
|
|
|
4304
4438
|
return this._realtimeClient.refs.conversation(e2);
|
|
4305
4439
|
}
|
|
4306
4440
|
subscribeConversations(e2) {
|
|
4307
|
-
return this._realtimeClient
|
|
4441
|
+
return new Yn(this._realtimeClient, e2);
|
|
4308
4442
|
}
|
|
4309
4443
|
searchMessages(e2) {
|
|
4310
4444
|
let t2;
|
|
4311
|
-
return { setQuery: (s2) => t2 && t2.searchString === s2 ? t2.currentState : (t2 && t2.cancel(), s2 && "" !== s2 ? (t2 = new
|
|
4445
|
+
return { setQuery: (s2) => t2 && t2.searchString === s2 ? t2.currentState : (t2 && t2.cancel(), s2 && "" !== s2 ? (t2 = new Sa(e2, s2, `${this._apiUrls.restApiHttpUrl}/${this._appId}/me/messages/search`, (e3) => __async(this, null, function* () {
|
|
4312
4446
|
const [t3, s3] = yield Promise.all([this.conversation(e3.conversationId).get(), this._realtimeClient.hydrateMessageData(e3, e3.conversationId)]);
|
|
4313
4447
|
return null === t3 ? c("Message belongs to nonexistent conversation") : s3.ok ? o({ conversation: t3, message: s3.value }) : s3;
|
|
4314
4448
|
}), this._authProvider), t2.loadMore(3)) : (t2 = void 0, e2 == null ? void 0 : e2([], "loadedAll"), Promise.resolve({ results: [], loadedAll: true }))), loadMore: (e3) => t2 ? t2.loadMore(e3 != null ? e3 : 10) : Promise.resolve({ results: [], loadedAll: true }) };
|
|
4315
4449
|
}
|
|
4316
4450
|
searchConversations(e2) {
|
|
4317
4451
|
let t2;
|
|
4318
|
-
return { setQuery: (s2) => t2 && t2.searchString === s2 ? t2.currentState : (t2 && t2.cancel(), s2 && "" !== s2 ? (t2 = new
|
|
4452
|
+
return { setQuery: (s2) => t2 && t2.searchString === s2 ? t2.currentState : (t2 && t2.cancel(), s2 && "" !== s2 ? (t2 = new Sa(e2, s2, `${this._apiUrls.restApiHttpUrl}/${this._appId}/me/conversations/search`, (e3) => __async(this, null, function* () {
|
|
4319
4453
|
const t3 = yield this._realtimeClient.hydrateConvData(e3);
|
|
4320
4454
|
if (!t3.ok) return t3;
|
|
4321
4455
|
const s3 = t3.value;
|
|
@@ -4323,32 +4457,32 @@ class da {
|
|
|
4323
4457
|
}), this._authProvider), t2.loadMore(3)) : (t2 = void 0, e2 == null ? void 0 : e2([], "loadedAll"), Promise.resolve({ results: [], loadedAll: true }))), loadMore: (e3) => t2 ? t2.loadMore(e3 != null ? e3 : 10) : Promise.resolve({ results: [], loadedAll: true }) };
|
|
4324
4458
|
}
|
|
4325
4459
|
terminate(e2) {
|
|
4326
|
-
|
|
4460
|
+
ba.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
|
|
4327
4461
|
}
|
|
4328
4462
|
_isConnected() {
|
|
4329
4463
|
return this._realtimeClient.isConnected();
|
|
4330
4464
|
}
|
|
4331
4465
|
uploadFile(e2, t2) {
|
|
4332
|
-
return
|
|
4466
|
+
return ka(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, this._realtimeClient, e2, t2);
|
|
4333
4467
|
}
|
|
4334
4468
|
uploadImage(e2, t2) {
|
|
4335
|
-
return
|
|
4469
|
+
return ka(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, this._realtimeClient, e2, __spreadValues({ subtype: "image" }, t2));
|
|
4336
4470
|
}
|
|
4337
4471
|
uploadVideo(e2, t2) {
|
|
4338
|
-
return
|
|
4472
|
+
return ka(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, this._realtimeClient, e2, __spreadValues({ subtype: "video" }, t2));
|
|
4339
4473
|
}
|
|
4340
4474
|
uploadAudio(e2, t2) {
|
|
4341
|
-
return
|
|
4475
|
+
return ka(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, this._realtimeClient, e2, __spreadValues({ subtype: "audio" }, t2));
|
|
4342
4476
|
}
|
|
4343
4477
|
uploadVoice(e2, t2) {
|
|
4344
|
-
return
|
|
4478
|
+
return ka(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, this._realtimeClient, e2, __spreadValues({ subtype: "voice" }, t2));
|
|
4345
4479
|
}
|
|
4346
4480
|
}
|
|
4347
|
-
function
|
|
4481
|
+
function ka(_0, _1, _2, _3, _4) {
|
|
4348
4482
|
return __async(this, arguments, function* (e2, t2, s2, n2, { subtype: a2, filename: r2, width: i2, height: o2, duration: c2 }) {
|
|
4349
4483
|
d("Upload file", yield s2.call({ method: "POST", path: ["files", "validate"], data: { filename: r2, filesize: n2.size } }));
|
|
4350
4484
|
const l2 = new FormData();
|
|
4351
|
-
return l2.set("file", n2, r2), void 0 !== a2 && l2.set("subtype", a2), void 0 !== i2 && l2.set("width", i2.toString()), void 0 !== o2 && l2.set("height", o2.toString()), void 0 !== c2 && l2.set("duration", c2.toString()),
|
|
4485
|
+
return l2.set("file", n2, r2), void 0 !== a2 && l2.set("subtype", a2), void 0 !== i2 && l2.set("width", i2.toString()), void 0 !== o2 && l2.set("height", o2.toString()), void 0 !== c2 && l2.set("duration", c2.toString()), ha({ method: "POST", url: e2, data: l2, authProvider: t2, errorTracker: t2.errorTracker }).then((e3) => e3.json()).then((e3) => e3.fileToken).catch((e3) => __async(null, null, function* () {
|
|
4352
4486
|
if (e3 instanceof Response) {
|
|
4353
4487
|
const t3 = yield e3.json(), s3 = `Unexpected response when uploading file, status code ${e3.status} ${t3.errorCode}, ${t3.reasons}`;
|
|
4354
4488
|
throw new Error(s3);
|
|
@@ -4357,7 +4491,7 @@ function pa(_0, _1, _2, _3, _4) {
|
|
|
4357
4491
|
}));
|
|
4358
4492
|
});
|
|
4359
4493
|
}
|
|
4360
|
-
class
|
|
4494
|
+
class Sa {
|
|
4361
4495
|
constructor(e2, t2, s2, n2, a2) {
|
|
4362
4496
|
this.onResults = e2, this.searchString = t2, this.baseUrl = s2, this.hydrateData = n2, this.authProvider = a2, this.error = void 0, this.lastCompletedQueryState = { results: [], loadedAll: false }, this.currentCursor = void 0, this.cancelQuery = () => {
|
|
4363
4497
|
}, e2 == null ? void 0 : e2([], "searching");
|
|
@@ -4404,7 +4538,7 @@ class ma {
|
|
|
4404
4538
|
_performSearch(e2, t2, s2) {
|
|
4405
4539
|
return __async(this, null, function* () {
|
|
4406
4540
|
let n2;
|
|
4407
|
-
return
|
|
4541
|
+
return ha({ method: "GET", url: e2, authProvider: this.authProvider, errorTracker: this.authProvider.errorTracker, abortSignal: t2.signal }).then((e3) => __async(this, null, function* () {
|
|
4408
4542
|
if (!e3.body) return l("Search response was missing body");
|
|
4409
4543
|
const t3 = e3.body.getReader(), a2 = new TextDecoder();
|
|
4410
4544
|
let r2 = "", i2 = true;
|
|
@@ -4445,7 +4579,7 @@ class ma {
|
|
|
4445
4579
|
}
|
|
4446
4580
|
}
|
|
4447
4581
|
export {
|
|
4448
|
-
|
|
4582
|
+
wa as getTalkSession,
|
|
4449
4583
|
f as registerPolyfills
|
|
4450
4584
|
};
|
|
4451
4585
|
//# sourceMappingURL=talkSession.js.map
|