@codingfactory/messenger-client 0.2.31 → 0.2.32

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.
Files changed (2) hide show
  1. package/dist/index.js +775 -775
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,101 +1,101 @@
1
- import { ref as ye, getCurrentInstance as zt, computed as re, watch as ot, onUnmounted as qe, toValue as is, onMounted as jt } from "vue";
2
- import { defineStore as Di, storeToRefs as Ni } from "pinia";
3
- import $t, { isAxiosError as qi, AxiosHeaders as An } from "axios";
1
+ import { ref as ye, getCurrentInstance as Nt, computed as re, watch as ot, onUnmounted as qe, toValue as ss, onMounted as qt } from "vue";
2
+ import { defineStore as Oi, storeToRefs as Fi } from "pinia";
3
+ import zt, { isAxiosError as Di, AxiosHeaders as Tn } from "axios";
4
4
  import { isAxiosError as vc } from "axios";
5
- import { useRoute as zi } from "vue-router";
6
- const os = () => () => {
7
- }, as = () => () => {
8
- }, cs = async () => {
5
+ import { useRoute as Ni } from "vue-router";
6
+ const rs = () => () => {
7
+ }, is = () => () => {
8
+ }, os = async () => {
9
+ }, as = () => {
10
+ }, cs = () => {
9
11
  }, us = () => {
10
12
  }, ls = () => {
11
13
  }, ds = () => {
12
- }, hs = () => {
13
- }, fs = () => {
14
14
  throw new Error("messenger-client subscribeToConversation is not configured");
15
- }, ps = () => {
15
+ }, hs = () => {
16
16
  throw new Error("messenger-client subscribeToTyping is not configured");
17
- }, gs = async () => null, $ = {
17
+ }, fs = async () => null, $ = {
18
18
  ECHO_INITIALIZED_EVENT: "messenger-client:echo-initialized",
19
19
  getEcho: () => null,
20
- waitForEcho: gs,
20
+ waitForEcho: fs,
21
21
  getConnectionStatus: () => "disconnected",
22
22
  getAccessState: () => "available",
23
- onConnectionStatusChange: os,
24
- onAccessStateChange: as,
25
- reconnect: cs,
26
- subscribeToPresenceStatus: us,
27
- unsubscribeFromPresenceStatus: ls,
28
- subscribeToConversation: fs,
29
- unsubscribeFromConversation: ds,
30
- subscribeToTyping: ps,
31
- unsubscribeFromTyping: hs
32
- }, Je = () => $.ECHO_INITIALIZED_EVENT, Ae = () => $.getEcho(), ms = async () => $.waitForEcho(), vs = () => $.getConnectionStatus(), Rn = () => vs(), Ot = () => $.getAccessState(), ht = (e) => $.onConnectionStatusChange(e), ji = (e) => $.onAccessStateChange(e), $i = async () => {
23
+ onConnectionStatusChange: rs,
24
+ onAccessStateChange: is,
25
+ reconnect: os,
26
+ subscribeToPresenceStatus: as,
27
+ unsubscribeFromPresenceStatus: cs,
28
+ subscribeToConversation: ds,
29
+ unsubscribeFromConversation: us,
30
+ subscribeToTyping: hs,
31
+ unsubscribeFromTyping: ls
32
+ }, Je = () => $.ECHO_INITIALIZED_EVENT, Ae = () => $.getEcho(), ps = async () => $.waitForEcho(), gs = () => $.getConnectionStatus(), En = () => gs(), It = () => $.getAccessState(), lt = (e) => $.onConnectionStatusChange(e), qi = (e) => $.onAccessStateChange(e), zi = async () => {
33
33
  await $.reconnect();
34
- }, Hi = (e) => $.subscribeToPresenceStatus(e), Bi = () => $.unsubscribeFromPresenceStatus(), Vi = (e, n) => $.subscribeToConversation(e, n), Xi = (e) => $.unsubscribeFromConversation(e), Wi = (e, n) => $.subscribeToTyping(e, n), Gi = (e) => $.unsubscribeFromTyping(e);
35
- function Ji(e) {
34
+ }, ji = (e) => $.subscribeToPresenceStatus(e), $i = () => $.unsubscribeFromPresenceStatus(), Hi = (e, n) => $.subscribeToConversation(e, n), Bi = (e) => $.unsubscribeFromConversation(e), Vi = (e, n) => $.subscribeToTyping(e, n), Xi = (e) => $.unsubscribeFromTyping(e);
35
+ function Wi(e) {
36
36
  e.initializedEvent && ($.ECHO_INITIALIZED_EVENT = e.initializedEvent), e.getEcho && ($.getEcho = e.getEcho), e.waitForEcho && ($.waitForEcho = e.waitForEcho), e.getConnectionStatus && ($.getConnectionStatus = e.getConnectionStatus), e.getAccessState && ($.getAccessState = e.getAccessState), e.onConnectionStatusChange && ($.onConnectionStatusChange = e.onConnectionStatusChange), e.onAccessStateChange && ($.onAccessStateChange = e.onAccessStateChange), e.reconnect && ($.reconnect = e.reconnect), e.subscribeToPresenceStatus && ($.subscribeToPresenceStatus = e.subscribeToPresenceStatus), e.unsubscribeFromPresenceStatus && ($.unsubscribeFromPresenceStatus = e.unsubscribeFromPresenceStatus), e.subscribeToConversation && ($.subscribeToConversation = e.subscribeToConversation), e.unsubscribeFromConversation && ($.unsubscribeFromConversation = e.unsubscribeFromConversation), e.subscribeToTyping && ($.subscribeToTyping = e.subscribeToTyping), e.unsubscribeFromTyping && ($.unsubscribeFromTyping = e.unsubscribeFromTyping);
37
37
  }
38
- function Ki() {
39
- $.ECHO_INITIALIZED_EVENT = "messenger-client:echo-initialized", $.getEcho = () => null, $.waitForEcho = gs, $.getConnectionStatus = () => "disconnected", $.getAccessState = () => "available", $.onConnectionStatusChange = os, $.onAccessStateChange = as, $.reconnect = cs, $.subscribeToPresenceStatus = us, $.unsubscribeFromPresenceStatus = ls, $.subscribeToConversation = fs, $.unsubscribeFromConversation = ds, $.subscribeToTyping = ps, $.unsubscribeFromTyping = hs;
38
+ function Gi() {
39
+ $.ECHO_INITIALIZED_EVENT = "messenger-client:echo-initialized", $.getEcho = () => null, $.waitForEcho = fs, $.getConnectionStatus = () => "disconnected", $.getAccessState = () => "available", $.onConnectionStatusChange = rs, $.onAccessStateChange = is, $.reconnect = os, $.subscribeToPresenceStatus = as, $.unsubscribeFromPresenceStatus = cs, $.subscribeToConversation = ds, $.unsubscribeFromConversation = us, $.subscribeToTyping = hs, $.unsubscribeFromTyping = ls;
40
40
  }
41
41
  function xe(e) {
42
42
  return typeof e == "object" && e !== null;
43
43
  }
44
- function Qi(e) {
44
+ function Ji(e) {
45
45
  return xe(e) && typeof e.conversation_id == "string" && xe(e.message) && typeof e.message.id == "string" && typeof e.message.conversation_id == "string" && typeof e.message.author_id == "string";
46
46
  }
47
- function Yi(e) {
47
+ function Ki(e) {
48
48
  return xe(e) && typeof e.conversation_id == "string" && typeof e.user_id == "string" && typeof e.message_id == "string";
49
49
  }
50
- function Zi(e) {
50
+ function Qi(e) {
51
51
  return xe(e) && typeof e.conversation_id == "string" && xe(e.message) && typeof e.message.id == "string";
52
52
  }
53
- function eo(e) {
53
+ function Yi(e) {
54
54
  return xe(e) && typeof e.conversation_id == "string" && typeof e.message_id == "string";
55
55
  }
56
- function to(e) {
56
+ function Zi(e) {
57
57
  return xe(e) && typeof e.conversation_id == "string" && typeof e.message_id == "string" && Array.isArray(e.reactions);
58
58
  }
59
- function no(e) {
59
+ function eo(e) {
60
60
  return xe(e) && typeof e.conversation_id == "string";
61
61
  }
62
- const bs = $t;
63
- let Ht = bs;
62
+ const ms = zt;
63
+ let jt = ms;
64
64
  function W() {
65
- return Ht;
65
+ return jt;
66
66
  }
67
- function so(e) {
68
- Ht = e;
67
+ function to(e) {
68
+ jt = e;
69
69
  }
70
- function ro() {
71
- Ht = bs;
70
+ function no() {
71
+ jt = ms;
72
72
  }
73
- const ys = $t;
74
- let Bt = ys;
75
- function Vt() {
76
- return Bt;
73
+ const vs = zt;
74
+ let $t = vs;
75
+ function Ht() {
76
+ return $t;
77
77
  }
78
- function io(e) {
79
- Bt = e;
78
+ function so(e) {
79
+ $t = e;
80
80
  }
81
- function oo() {
82
- Bt = ys;
81
+ function ro() {
82
+ $t = vs;
83
83
  }
84
- const _s = {
84
+ const bs = {
85
85
  currentUser: null
86
86
  };
87
- let Xt = () => _s;
87
+ let Bt = () => bs;
88
88
  function ke() {
89
- return Xt;
89
+ return Bt;
90
90
  }
91
- function ao(e) {
92
- Xt = e;
91
+ function io(e) {
92
+ Bt = e;
93
93
  }
94
- function co() {
95
- Xt = () => _s;
94
+ function oo() {
95
+ Bt = () => bs;
96
96
  }
97
97
  function Z(e) {
98
- if (qi(e)) {
98
+ if (Di(e)) {
99
99
  const n = e.response?.data?.message || e.message || "An error occurred";
100
100
  return n.includes("SQLSTATE") || n.includes("Connection:") || n.includes("\\Illuminate\\") ? "Something went wrong. Please try again later." : n;
101
101
  }
@@ -107,29 +107,29 @@ function rc(e) {
107
107
  function ic(e) {
108
108
  return typeof e == "object" && e !== null && "response" in e && typeof e.response == "object";
109
109
  }
110
- const Ss = {
110
+ const ys = {
111
111
  async uploadImage() {
112
112
  throw new Error("messenger-client mediaApi.uploadImage is not configured");
113
113
  }
114
114
  };
115
- let Wt = Ss;
116
- function uo() {
117
- return Wt;
115
+ let Vt = ys;
116
+ function ao() {
117
+ return Vt;
118
118
  }
119
- function lo(e) {
120
- Wt = e;
119
+ function co(e) {
120
+ Vt = e;
121
121
  }
122
- function ho() {
123
- Wt = Ss;
122
+ function uo() {
123
+ Vt = ys;
124
124
  }
125
- function fo(e) {
125
+ function lo(e) {
126
126
  return e !== null && typeof e == "object" && "id" in e && "type" in e && "participants" in e;
127
127
  }
128
- function Cs(e) {
128
+ function _s(e) {
129
129
  return typeof e == "object" && e !== null;
130
130
  }
131
131
  function $e(e) {
132
- return !Cs(e) || !("data" in e) ? e : e.data;
132
+ return !_s(e) || !("data" in e) ? e : e.data;
133
133
  }
134
134
  function nt(e, n) {
135
135
  const r = e[n];
@@ -137,7 +137,7 @@ function nt(e, n) {
137
137
  throw new Error(`Invalid messaging folder payload: missing string ${n}`);
138
138
  return r;
139
139
  }
140
- function Pn(e, n) {
140
+ function An(e, n) {
141
141
  const r = e[n];
142
142
  if (r == null)
143
143
  return null;
@@ -145,7 +145,7 @@ function Pn(e, n) {
145
145
  throw new Error(`Invalid messaging folder payload: ${n} must be a string or null`);
146
146
  return r;
147
147
  }
148
- function Rt(e, n) {
148
+ function Et(e, n) {
149
149
  const r = e[n];
150
150
  if (typeof r == "number" && Number.isFinite(r))
151
151
  return r;
@@ -156,43 +156,43 @@ function Rt(e, n) {
156
156
  }
157
157
  throw new Error(`Invalid messaging folder payload: missing numeric ${n}`);
158
158
  }
159
- function Ft(e) {
160
- if (!Cs(e))
159
+ function Ut(e) {
160
+ if (!_s(e))
161
161
  throw new Error("Invalid messaging folder payload: expected object");
162
162
  return {
163
163
  id: nt(e, "id"),
164
164
  name: nt(e, "name"),
165
- color: Pn(e, "color"),
166
- icon: Pn(e, "icon"),
167
- sort_order: Rt(e, "sort_order"),
168
- conversation_count: Rt(e, "conversation_count"),
169
- unread_count: Rt(e, "unread_count"),
165
+ color: An(e, "color"),
166
+ icon: An(e, "icon"),
167
+ sort_order: Et(e, "sort_order"),
168
+ conversation_count: Et(e, "conversation_count"),
169
+ unread_count: Et(e, "unread_count"),
170
170
  created_at: nt(e, "created_at"),
171
171
  updated_at: nt(e, "updated_at")
172
172
  };
173
173
  }
174
- function po(e) {
174
+ function ho(e) {
175
175
  if (!Array.isArray(e))
176
176
  throw new Error("Invalid messaging folder payload: expected array");
177
- return e.map((n) => Ft(n));
177
+ return e.map((n) => Ut(n));
178
178
  }
179
- function Mn(e) {
180
- if (!fo(e))
179
+ function Rn(e) {
180
+ if (!lo(e))
181
181
  throw new Error("Invalid conversation payload from folder assignment endpoint");
182
182
  return e;
183
183
  }
184
184
  const Pe = {
185
185
  async fetchFolders() {
186
186
  const e = await W().get("/v1/messaging/folders");
187
- return po($e(e.data));
187
+ return ho($e(e.data));
188
188
  },
189
189
  async createFolder(e) {
190
190
  const n = await W().post("/v1/messaging/folders", e);
191
- return Ft($e(n.data));
191
+ return Ut($e(n.data));
192
192
  },
193
193
  async updateFolder(e, n) {
194
194
  const r = await W().patch(`/v1/messaging/folders/${e}`, n);
195
- return Ft($e(r.data));
195
+ return Ut($e(r.data));
196
196
  },
197
197
  async deleteFolder(e) {
198
198
  await W().delete(`/v1/messaging/folders/${e}`);
@@ -204,57 +204,57 @@ const Pe = {
204
204
  const r = await W().patch(`/v1/messaging/conversations/${e}/folder`, {
205
205
  folder_id: n
206
206
  });
207
- return Mn($e(r.data));
207
+ return Rn($e(r.data));
208
208
  },
209
209
  async acceptRequest(e) {
210
210
  const n = await W().post(`/v1/messaging/conversations/${e}/accept`);
211
- return Mn($e(n.data));
211
+ return Rn($e(n.data));
212
212
  },
213
213
  async declineRequest(e) {
214
214
  await W().post(`/v1/messaging/conversations/${e}/decline`);
215
215
  }
216
- }, go = 6e4;
217
- function mo(e) {
216
+ }, fo = 6e4;
217
+ function po(e) {
218
218
  return e === "online" || e === "idle" || e === "dnd" || e === "offline";
219
219
  }
220
- function vo(e) {
220
+ function go(e) {
221
221
  if (typeof e != "string")
222
222
  return null;
223
223
  const n = e.trim().toLowerCase();
224
- return mo(n) ? n : null;
224
+ return po(n) ? n : null;
225
225
  }
226
- function ws(e) {
226
+ function Ss(e) {
227
227
  if (typeof e != "string")
228
228
  return null;
229
229
  const n = e.trim();
230
230
  return n.length > 0 ? n : null;
231
231
  }
232
- function Dt(e) {
233
- const n = ws(e);
232
+ function Ot(e) {
233
+ const n = Ss(e);
234
234
  if (n === null)
235
235
  return null;
236
236
  const r = n.includes("T") ? n : n.replace(" ", "T"), o = /(?:Z|[+-]\d{2}:\d{2})$/i.test(r) ? r : `${r}Z`, c = new Date(o);
237
237
  return Number.isNaN(c.getTime()) ? null : c;
238
238
  }
239
- function bo(e, n, r = {}) {
239
+ function mo(e, n, r = {}) {
240
240
  if (e === null)
241
241
  return null;
242
242
  if (e === "offline")
243
243
  return "offline";
244
- const o = Dt(n);
244
+ const o = Ot(n);
245
245
  if (o === null)
246
246
  return e;
247
- const c = r.now ?? Date.now(), u = r.staleAfterMs ?? go;
247
+ const c = r.now ?? Date.now(), u = r.staleAfterMs ?? fo;
248
248
  return c - o.getTime() > u ? "offline" : e;
249
249
  }
250
- function Nt(e, n = {}) {
251
- const r = ws(e?.last_seen_at), o = vo(e?.status);
250
+ function Ft(e, n = {}) {
251
+ const r = Ss(e?.last_seen_at), o = go(e?.status);
252
252
  return {
253
- status: bo(o, r, n),
253
+ status: mo(o, r, n),
254
254
  lastSeenAt: r
255
255
  };
256
256
  }
257
- const kn = 1e3, Gt = 4e3, yo = 12e4, _o = 300, So = 1, Co = 1600, Jt = (e) => {
257
+ const Pn = 1e3, Xt = 4e3, vo = 12e4, bo = 300, yo = 1, _o = 1600, Wt = (e) => {
258
258
  if (typeof e == "number" && Number.isFinite(e))
259
259
  return e;
260
260
  if (typeof e == "string") {
@@ -262,32 +262,32 @@ const kn = 1e3, Gt = 4e3, yo = 12e4, _o = 300, So = 1, Co = 1600, Jt = (e) => {
262
262
  if (Number.isFinite(n))
263
263
  return n;
264
264
  }
265
- }, Ts = (e) => typeof e == "number" && e >= 500 && e < 600, xn = (e) => {
266
- const r = Jt(e.response?.status);
267
- return r === void 0 ? !0 : r === 429 || Ts(r);
268
- }, Es = (e) => {
265
+ }, Cs = (e) => typeof e == "number" && e >= 500 && e < 600, Mn = (e) => {
266
+ const r = Wt(e.response?.status);
267
+ return r === void 0 ? !0 : r === 429 || Cs(r);
268
+ }, ws = (e) => {
269
269
  if (typeof e == "number" && Number.isFinite(e) && e > 0)
270
- return Math.max(kn, e * 1e3);
270
+ return Math.max(Pn, e * 1e3);
271
271
  if (typeof e == "string") {
272
272
  const n = Number.parseInt(e, 10);
273
273
  if (Number.isFinite(n) && n > 0)
274
- return Math.max(kn, n * 1e3);
274
+ return Math.max(Pn, n * 1e3);
275
275
  }
276
- return Gt;
277
- }, wo = (e) => {
278
- const n = Math.max(0, e), r = 2 ** Math.min(n, 6), o = Gt * r;
279
- return Math.min(yo, o);
280
- }, To = (e) => {
276
+ return Xt;
277
+ }, So = (e) => {
278
+ const n = Math.max(0, e), r = 2 ** Math.min(n, 6), o = Xt * r;
279
+ return Math.min(vo, o);
280
+ }, Co = (e) => {
281
281
  const n = e;
282
- return Jt(n.response?.status) === 429 ? Es(n.response?.headers?.["retry-after"]) : _o;
283
- }, Ln = async (e) => {
282
+ return Wt(n.response?.status) === 429 ? ws(n.response?.headers?.["retry-after"]) : bo;
283
+ }, kn = async (e) => {
284
284
  await new Promise((n) => {
285
285
  setTimeout(n, e);
286
286
  });
287
- }, In = () => ({
287
+ }, xn = () => ({
288
288
  data: [],
289
289
  has_more: !1
290
- }), Un = () => Ot() === "account_suspended", Eo = (e) => {
290
+ }), Ln = () => It() === "account_suspended", wo = (e) => {
291
291
  if (!he(e))
292
292
  return !1;
293
293
  const r = (he(e.data) ? e.data : e).throttled;
@@ -301,7 +301,7 @@ const kn = 1e3, Gt = 4e3, yo = 12e4, _o = 300, So = 1, Co = 1600, Jt = (e) => {
301
301
  }
302
302
  return !1;
303
303
  };
304
- function Ao(e, n, r) {
304
+ function To(e, n, r) {
305
305
  const o = typeof e == "string" && e.trim().length > 0 ? e.trim().toLowerCase() : void 0;
306
306
  if (o)
307
307
  return o;
@@ -311,17 +311,17 @@ function Ao(e, n, r) {
311
311
  const u = typeof r == "string" && r.trim().length > 0 ? r.trim().toLowerCase() : void 0;
312
312
  return u ? u === "image" ? "image/*" : u === "video" ? "video/*" : u === "audio" ? "audio/*" : u : "application/octet-stream";
313
313
  }
314
- function Ro(e) {
314
+ function Eo(e) {
315
315
  const n = e.url || "", r = e.thumbnail_url ?? e.thumbnail, o = {
316
316
  id: e.media_id ?? e.id ?? "",
317
- name: e.name ?? Po(n),
317
+ name: e.name ?? Ao(n),
318
318
  url: n,
319
- type: Ao(e.mime, e.mime_type, e.type),
319
+ type: To(e.mime, e.mime_type, e.type),
320
320
  size: e.size ?? 0
321
321
  };
322
322
  return r !== void 0 && (o.thumbnail = r), o;
323
323
  }
324
- function Po(e) {
324
+ function Ao(e) {
325
325
  if (!e) return "attachment";
326
326
  try {
327
327
  const r = new URL(e).pathname.split("/");
@@ -330,8 +330,8 @@ function Po(e) {
330
330
  return "attachment";
331
331
  }
332
332
  }
333
- function Mo(e) {
334
- return !Array.isArray(e) || e.length === 0 ? [] : e.map(Ro);
333
+ function Ro(e) {
334
+ return !Array.isArray(e) || e.length === 0 ? [] : e.map(Eo);
335
335
  }
336
336
  function Ne(e) {
337
337
  if (typeof e != "string")
@@ -340,7 +340,7 @@ function Ne(e) {
340
340
  if (n.length !== 0)
341
341
  return n;
342
342
  }
343
- function ko(e) {
343
+ function Po(e) {
344
344
  if (!e)
345
345
  return;
346
346
  const n = Ne(e.avatar) ?? Ne(e.avatar_url), r = typeof e.handle == "string" && e.handle.length > 0 ? e.handle : void 0;
@@ -367,12 +367,12 @@ function at(e) {
367
367
  } : null;
368
368
  return {
369
369
  ...e,
370
- ...r ? { author: ko(r) } : {},
370
+ ...r ? { author: Po(r) } : {},
371
371
  shared_post: o,
372
- attachments: Mo(e.attachments)
372
+ attachments: Ro(e.attachments)
373
373
  };
374
374
  }
375
- function xo(e) {
375
+ function Mo(e) {
376
376
  if (!e || !he(e))
377
377
  return;
378
378
  const n = typeof e.id == "string" ? e.id.trim() : "", r = typeof e.title == "string" ? e.title.trim() : "", o = typeof e.url == "string" ? e.url.trim() : "";
@@ -395,20 +395,20 @@ function xo(e) {
395
395
  } : {}
396
396
  };
397
397
  }
398
- function Pt(e) {
398
+ function At(e) {
399
399
  return typeof e != "string" || e.length === 0 ? null : e;
400
400
  }
401
- function On(e) {
401
+ function In(e) {
402
402
  if (!(typeof e != "string" || e.length === 0))
403
403
  return e;
404
404
  }
405
- function qt(e) {
405
+ function Dt(e) {
406
406
  return typeof e == "string" && e.length > 0 && !e.startsWith("temp-");
407
407
  }
408
- function Lo(e, n = []) {
408
+ function ko(e, n = []) {
409
409
  const r = /* @__PURE__ */ new Map();
410
410
  for (const o of n) {
411
- const c = On(o.last_read_message_id);
411
+ const c = In(o.last_read_message_id);
412
412
  c && r.set(o.user_id, c);
413
413
  }
414
414
  return e.map((o) => {
@@ -417,7 +417,7 @@ function Lo(e, n = []) {
417
417
  name: o.user.name,
418
418
  ...u ? { avatar: u } : {},
419
419
  ...o.user.handle ? { handle: o.user.handle } : {}
420
- } : void 0, f = On(o.last_read_message_id);
420
+ } : void 0, f = In(o.last_read_message_id);
421
421
  if (f)
422
422
  return {
423
423
  ...o,
@@ -442,14 +442,14 @@ function Lo(e, n = []) {
442
442
  };
443
443
  });
444
444
  }
445
- function Io(e, n) {
446
- return Object.prototype.hasOwnProperty.call(e, "muted_until") ? Pt(e.muted_until) : e.me?.muted_until === null ? null : typeof e.me?.muted_until == "string" ? Pt(e.me.muted_until) : Pt(n?.muted_until);
445
+ function xo(e, n) {
446
+ return Object.prototype.hasOwnProperty.call(e, "muted_until") ? At(e.muted_until) : e.me?.muted_until === null ? null : typeof e.me?.muted_until == "string" ? At(e.me.muted_until) : At(n?.muted_until);
447
447
  }
448
- function Uo(e, n) {
448
+ function Lo(e, n) {
449
449
  return Object.prototype.hasOwnProperty.call(e, "folder_id") ? e.folder_id ?? null : e.me?.folder_id === null ? null : typeof e.me?.folder_id == "string" ? e.me.folder_id : n?.folder_id;
450
450
  }
451
451
  function He(e, n) {
452
- const r = Io(e, n), o = typeof e.is_muted == "boolean" ? e.is_muted : r !== null || n?.is_muted === !0, c = e.last_message ? at(e.last_message) : n?.last_message, u = e.last_message_at ?? n?.last_message_at, d = typeof e.unread_count == "number" ? e.unread_count : n?.unread_count ?? 0, f = typeof e.is_pinned == "boolean" ? e.is_pinned : e.me?.is_pinned ?? n?.is_pinned ?? !1, h = typeof e.is_archived == "boolean" ? e.is_archived : e.me?.is_archived ?? n?.is_archived ?? !1, R = Uo(e, n), C = typeof e.created_at == "string" ? e.created_at : n?.created_at ?? "", v = (() => {
452
+ const r = xo(e, n), o = typeof e.is_muted == "boolean" ? e.is_muted : r !== null || n?.is_muted === !0, c = e.last_message ? at(e.last_message) : n?.last_message, u = e.last_message_at ?? n?.last_message_at, d = typeof e.unread_count == "number" ? e.unread_count : n?.unread_count ?? 0, f = typeof e.is_pinned == "boolean" ? e.is_pinned : e.me?.is_pinned ?? n?.is_pinned ?? !1, h = typeof e.is_archived == "boolean" ? e.is_archived : e.me?.is_archived ?? n?.is_archived ?? !1, R = Lo(e, n), C = typeof e.created_at == "string" ? e.created_at : n?.created_at ?? "", v = (() => {
453
453
  if (!n || n.unread_count !== 0 || d <= 0)
454
454
  return !1;
455
455
  const E = n.last_message?.id, b = e.last_message?.id;
@@ -458,7 +458,7 @@ function He(e, n) {
458
458
  return {
459
459
  ...e,
460
460
  unread_count: o || v ? 0 : d,
461
- participants: Lo(e.participants, n?.participants),
461
+ participants: ko(e.participants, n?.participants),
462
462
  is_muted: o,
463
463
  muted_until: r,
464
464
  is_pinned: f,
@@ -469,29 +469,29 @@ function He(e, n) {
469
469
  ...u ? { last_message_at: u } : {}
470
470
  };
471
471
  }
472
- function Oo(e) {
472
+ function Io(e) {
473
473
  return e.is_muted ? !0 : typeof e.muted_until == "string" && e.muted_until.length > 0;
474
474
  }
475
- function Mt(e) {
476
- return Oo(e) ? 0 : e.unread_count || 0;
475
+ function Rt(e) {
476
+ return Io(e) ? 0 : e.unread_count || 0;
477
477
  }
478
- function Fn(e, n) {
478
+ function Un(e, n) {
479
479
  const r = n[e.id];
480
480
  if (Array.isArray(r))
481
481
  for (let o = r.length - 1; o >= 0; o -= 1) {
482
482
  const c = r[o]?.id;
483
- if (qt(c))
483
+ if (Dt(c))
484
484
  return c;
485
485
  }
486
- return qt(e.last_message?.id) ? e.last_message.id : null;
486
+ return Dt(e.last_message?.id) ? e.last_message.id : null;
487
487
  }
488
488
  function he(e) {
489
489
  return typeof e == "object" && e !== null;
490
490
  }
491
- function Fo(e) {
491
+ function Uo(e) {
492
492
  return he(e) ? (he(e.response) ? e.response : null)?.status === 401 : !1;
493
493
  }
494
- function Dn(e) {
494
+ function On(e) {
495
495
  if (!Array.isArray(e))
496
496
  return [];
497
497
  const n = [];
@@ -512,7 +512,7 @@ function Dn(e) {
512
512
  }
513
513
  return n;
514
514
  }
515
- function Do(e, n) {
515
+ function Oo(e, n) {
516
516
  const r = he(n) ? n : null, o = r?.next ?? r?.next_cursor ?? e.next_cursor;
517
517
  if (!(typeof o != "string" || o.length === 0))
518
518
  return o;
@@ -522,16 +522,16 @@ function st(e, n) {
522
522
  let c = [];
523
523
  return Array.isArray(o) ? c = o : he(o) && (Array.isArray(o.items) ? c = o.items : Array.isArray(o[n]) ? c = o[n] : Array.isArray(o.data) && (c = o.data)), {
524
524
  items: c,
525
- nextCursor: Do(r, o)
525
+ nextCursor: Oo(r, o)
526
526
  };
527
527
  }
528
- function Nn(e) {
528
+ function Fn(e) {
529
529
  return he(e) && typeof e.id == "string" && e.id.length > 0;
530
530
  }
531
- function qn(e) {
531
+ function Dn(e) {
532
532
  return he(e) ? typeof e.id == "string" && (e.type === "dm" || e.type === "group") && Array.isArray(e.participants) : !1;
533
533
  }
534
- function Kt(e, n) {
534
+ function Gt(e, n) {
535
535
  if (e.type !== "dm")
536
536
  return !1;
537
537
  const r = e.participants.find((c) => c.user_id === n);
@@ -540,7 +540,7 @@ function Kt(e, n) {
540
540
  const o = r.user.name.trim();
541
541
  return r.user.id === n && o.length > 0 && o.toLowerCase() !== "pending user";
542
542
  }
543
- function zn(e) {
543
+ function Nn(e) {
544
544
  if (!he(e) || typeof e.id != "string" || typeof e.name != "string")
545
545
  return null;
546
546
  const n = {
@@ -551,11 +551,11 @@ function zn(e) {
551
551
  const r = typeof e.avatar == "string" ? e.avatar : null, o = typeof e.avatar_url == "string" ? e.avatar_url : null, c = Ne(r) ?? Ne(o);
552
552
  return c && (n.avatar = c, n.avatar_url = c), n;
553
553
  }
554
- function No(e) {
554
+ function Fo(e) {
555
555
  const r = (he(e) ? e : {}).data ?? e;
556
- return Array.isArray(r) ? r.map((o) => zn(o)).filter((o) => o !== null) : he(r) ? Object.values(r).map((o) => zn(o)).filter((o) => o !== null) : [];
556
+ return Array.isArray(r) ? r.map((o) => Nn(o)).filter((o) => o !== null) : he(r) ? Object.values(r).map((o) => Nn(o)).filter((o) => o !== null) : [];
557
557
  }
558
- function As(e) {
558
+ function Ts(e) {
559
559
  if (e.type !== "dm")
560
560
  return null;
561
561
  const n = ke()().currentUser?.id;
@@ -566,19 +566,19 @@ function As(e) {
566
566
  }
567
567
  return e.participants.find((o) => o.user ? o.user.name.trim().toLowerCase() === "pending user" : !0)?.user_id ?? null;
568
568
  }
569
- async function qo(e) {
570
- return (await Rs([e])).get(e) ?? null;
569
+ async function Do(e) {
570
+ return (await Es([e])).get(e) ?? null;
571
571
  }
572
- async function Rs(e) {
572
+ async function Es(e) {
573
573
  const n = Array.from(new Set(e.filter((r) => r.length > 0)));
574
574
  if (n.length === 0)
575
575
  return /* @__PURE__ */ new Map();
576
576
  try {
577
- const r = await Vt().get("/v1/identity/users/by-ids", {
577
+ const r = await Ht().get("/v1/identity/users/by-ids", {
578
578
  params: {
579
579
  ids: n.join(",")
580
580
  }
581
- }), o = No(r.data), c = /* @__PURE__ */ new Map();
581
+ }), o = Fo(r.data), c = /* @__PURE__ */ new Map();
582
582
  for (const u of o)
583
583
  n.includes(u.id) && c.set(u.id, {
584
584
  id: u.id,
@@ -591,10 +591,10 @@ async function Rs(e) {
591
591
  return /* @__PURE__ */ new Map();
592
592
  }
593
593
  }
594
- async function jn(e, n) {
595
- if (e.type !== "dm" || Kt(e, n))
594
+ async function qn(e, n) {
595
+ if (e.type !== "dm" || Gt(e, n))
596
596
  return e;
597
- const r = await qo(n);
597
+ const r = await Do(n);
598
598
  if (!r)
599
599
  return e;
600
600
  const o = e.participants.map((c) => c.user_id !== n ? c : {
@@ -606,15 +606,15 @@ async function jn(e, n) {
606
606
  participants: o
607
607
  };
608
608
  }
609
- async function $n(e) {
609
+ async function zn(e) {
610
610
  const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
611
611
  for (const c of e) {
612
- const u = As(c);
613
- !u || Kt(c, u) || (n.set(c.id, u), r.add(u));
612
+ const u = Ts(c);
613
+ !u || Gt(c, u) || (n.set(c.id, u), r.add(u));
614
614
  }
615
615
  if (r.size === 0)
616
616
  return e;
617
- const o = await Rs(Array.from(r));
617
+ const o = await Es(Array.from(r));
618
618
  return o.size === 0 ? e : e.map((c) => {
619
619
  const u = n.get(c.id);
620
620
  if (!u)
@@ -641,19 +641,19 @@ function rt(e, n) {
641
641
  function Be(e) {
642
642
  return [...e].sort((n, r) => n.sort_order !== r.sort_order ? n.sort_order - r.sort_order : n.name.localeCompare(r.name));
643
643
  }
644
- function zo(e, n) {
644
+ function No(e, n) {
645
645
  return typeof e != "string" || e.length === 0 ? null : n.has(e) ? e : null;
646
646
  }
647
- function Hn(e, n) {
647
+ function jn(e, n) {
648
648
  return e.map((r) => {
649
- const o = zo(r.folder_id, n);
649
+ const o = No(r.folder_id, n);
650
650
  return (r.folder_id ?? null) === o ? r : {
651
651
  ...r,
652
652
  folder_id: o
653
653
  };
654
654
  });
655
655
  }
656
- function Bn(e, n, r) {
656
+ function $n(e, n, r) {
657
657
  let o = !1;
658
658
  const c = e.map((u) => u.id !== n || (u.folder_id ?? null) === r ? u : (o = !0, {
659
659
  ...u,
@@ -661,7 +661,7 @@ function Bn(e, n, r) {
661
661
  }));
662
662
  return o ? c : e;
663
663
  }
664
- function jo(e, n, r) {
664
+ function qo(e, n, r) {
665
665
  if (n === r)
666
666
  return e;
667
667
  let o = !1;
@@ -674,7 +674,7 @@ function jo(e, n, r) {
674
674
  });
675
675
  return o ? c : e;
676
676
  }
677
- function kt(e) {
677
+ function Pt(e) {
678
678
  const n = /* @__PURE__ */ new Map();
679
679
  for (const r of e.requests)
680
680
  r.is_request === !0 && n.set(r.id, r);
@@ -682,7 +682,7 @@ function kt(e) {
682
682
  r.is_request === !0 && n.set(r.id, r);
683
683
  return Array.from(n.values()).sort(Xe);
684
684
  }
685
- const Qt = Di("messaging", {
685
+ const Jt = Oi("messaging", {
686
686
  state: () => ({
687
687
  conversations: [],
688
688
  requests: [],
@@ -713,25 +713,25 @@ const Qt = Di("messaging", {
713
713
  },
714
714
  getMessagesByConversationId: (e) => (n) => e.messages[n] || [],
715
715
  getTypingUsers: (e) => (n) => e.typingUsers[n] || [],
716
- unreadConversationsCount: (e) => e.conversations.filter((n) => Mt(n) > 0).length,
717
- unreadCount: (e) => e.conversations.reduce((n, r) => n + Mt(r), 0),
718
- totalUnreadCount: (e) => e.conversations.reduce((n, r) => n + Mt(r), 0),
716
+ unreadConversationsCount: (e) => e.conversations.filter((n) => Rt(n) > 0).length,
717
+ unreadCount: (e) => e.conversations.reduce((n, r) => n + Rt(r), 0),
718
+ totalUnreadCount: (e) => e.conversations.reduce((n, r) => n + Rt(r), 0),
719
719
  sortedFolders: (e) => Be(e.folders),
720
720
  folderById: (e) => (n) => e.folders.find((r) => r.id === n),
721
721
  conversationsInFolder: (e) => (n) => e.conversations.filter((r) => r.folder_id === n),
722
722
  hasMoreMessages: (e) => (n) => e.conversationHasMore[n] ?? !1,
723
723
  isLoadingMessages: (e) => (n) => e.loadingMessages[n] ?? !1,
724
724
  // Message request getters
725
- requestConversations: (e) => kt(e),
726
- requestCount: (e) => kt(e).length,
727
- unreadRequestCount: (e) => kt(e).filter((n) => n.unread_count > 0).length
725
+ requestConversations: (e) => Pt(e),
726
+ requestCount: (e) => Pt(e).length,
727
+ unreadRequestCount: (e) => Pt(e).filter((n) => n.unread_count > 0).length
728
728
  },
729
729
  actions: {
730
730
  normalizeFolderAssignmentsState() {
731
731
  if (!this.foldersLoaded)
732
732
  return;
733
733
  const e = new Set(this.folders.map((n) => n.id));
734
- this.conversations = Hn(this.conversations, e), this.requests = Hn(this.requests, e), this.activeFolderId !== null && !e.has(this.activeFolderId) && (this.activeFolderId = null);
734
+ this.conversations = jn(this.conversations, e), this.requests = jn(this.requests, e), this.activeFolderId !== null && !e.has(this.activeFolderId) && (this.activeFolderId = null);
735
735
  },
736
736
  async fetchFolders() {
737
737
  try {
@@ -798,15 +798,15 @@ const Qt = Di("messaging", {
798
798
  if (!o)
799
799
  return;
800
800
  const c = o.folder_id ?? null, u = typeof r.folder_id == "string" || r.folder_id === null ? r.folder_id : n;
801
- this.conversations = Bn(
801
+ this.conversations = $n(
802
802
  this.conversations,
803
803
  e,
804
804
  u
805
- ), this.requests = Bn(
805
+ ), this.requests = $n(
806
806
  this.requests,
807
807
  e,
808
808
  u
809
- ), this.folders = jo(
809
+ ), this.folders = qo(
810
810
  this.folders,
811
811
  c,
812
812
  u
@@ -818,8 +818,8 @@ const Qt = Di("messaging", {
818
818
  async fetchConversations(e, n, r, o) {
819
819
  this.loading = !0, this.error = null;
820
820
  try {
821
- if (Un())
822
- return e || (this.conversations = [], this.normalizeFolderAssignmentsState()), In();
821
+ if (Ln())
822
+ return e || (this.conversations = [], this.normalizeFolderAssignmentsState()), xn();
823
823
  const c = o?.includePresence ?? !0, u = {};
824
824
  c && (u.include_presence = 1), e && (u.cursor = e), n && (u.filter = n), typeof r == "string" && r.length > 0 && (u.folder_id = r);
825
825
  const d = await W().get("/v1/messaging/conversations", { params: u }), { items: f, nextCursor: h } = st(
@@ -830,7 +830,7 @@ const Qt = Di("messaging", {
830
830
  (A) => A.id === E.id
831
831
  );
832
832
  return He(E, b);
833
- }), C = await $n(R);
833
+ }), C = await zn(R);
834
834
  e ? this.conversations.push(...C) : this.conversations = C, this.normalizeFolderAssignmentsState(), this.lastFetch = Date.now();
835
835
  const v = {
836
836
  data: C,
@@ -838,7 +838,7 @@ const Qt = Di("messaging", {
838
838
  };
839
839
  return h !== void 0 && (v.next_cursor = h), v;
840
840
  } catch (c) {
841
- throw o?.background && xn(c) || (this.error = Z(c)), c;
841
+ throw o?.background && Mn(c) || (this.error = Z(c)), c;
842
842
  } finally {
843
843
  this.loading = !1;
844
844
  }
@@ -852,8 +852,8 @@ const Qt = Di("messaging", {
852
852
  includePresence: !1
853
853
  }), this.backgroundPollRetryAfterUntil = 0, this.backgroundPollTransientFailureCount = 0, !0;
854
854
  } catch (e) {
855
- const n = e, r = Jt(n.response?.status);
856
- return r === 429 ? (this.backgroundPollRetryAfterUntil = Date.now() + Es(n.response?.headers?.["retry-after"]), !1) : (this.backgroundPollTransientFailureCount += 1, r === void 0 || Ts(r) ? (this.backgroundPollRetryAfterUntil = Date.now() + wo(this.backgroundPollTransientFailureCount), !1) : (this.backgroundPollRetryAfterUntil = Date.now() + Gt, !1));
855
+ const n = e, r = Wt(n.response?.status);
856
+ return r === 429 ? (this.backgroundPollRetryAfterUntil = Date.now() + ws(n.response?.headers?.["retry-after"]), !1) : (this.backgroundPollTransientFailureCount += 1, r === void 0 || Cs(r) ? (this.backgroundPollRetryAfterUntil = Date.now() + So(this.backgroundPollTransientFailureCount), !1) : (this.backgroundPollRetryAfterUntil = Date.now() + Xt, !1));
857
857
  }
858
858
  },
859
859
  async fetchConversation(e) {
@@ -863,8 +863,8 @@ const Qt = Di("messaging", {
863
863
  params: { include_presence: 1 }
864
864
  }), r = this.conversations.find((f) => f.id === e);
865
865
  let o = He(n.data.data || n.data, r);
866
- const c = As(o);
867
- c && (o = await jn(o, c));
866
+ const c = Ts(o);
867
+ c && (o = await qn(o, c));
868
868
  const u = this.conversations.findIndex((f) => f.id === e);
869
869
  u >= 0 ? this.conversations[u] = o : this.conversations.push(o);
870
870
  const d = this.requests.findIndex((f) => f.id === e);
@@ -878,8 +878,8 @@ const Qt = Di("messaging", {
878
878
  async fetchRequests(e) {
879
879
  this.loading = !0, this.error = null;
880
880
  try {
881
- if (Un())
882
- return e || (this.requests = [], this.normalizeFolderAssignmentsState()), In();
881
+ if (Ln())
882
+ return e || (this.requests = [], this.normalizeFolderAssignmentsState()), xn();
883
883
  const n = {
884
884
  include_presence: 1,
885
885
  filter: "requests"
@@ -891,7 +891,7 @@ const Qt = Di("messaging", {
891
891
  ), u = o.map((h) => {
892
892
  const R = this.requests.find((C) => C.id === h.id);
893
893
  return He(h, R);
894
- }), d = await $n(u);
894
+ }), d = await zn(u);
895
895
  e ? this.requests.push(...d) : this.requests = d, this.normalizeFolderAssignmentsState();
896
896
  const f = {
897
897
  data: d,
@@ -914,9 +914,9 @@ const Qt = Di("messaging", {
914
914
  c = await W().get(`/v1/messaging/conversations/${e}/messages`, { params: r });
915
915
  break;
916
916
  } catch (v) {
917
- if (!(o < So && xn(v)))
917
+ if (!(o < yo && Mn(v)))
918
918
  throw v;
919
- o += 1, await Ln(To(v));
919
+ o += 1, await kn(Co(v));
920
920
  }
921
921
  const { items: u, nextCursor: d } = st(
922
922
  c.data,
@@ -942,7 +942,7 @@ const Qt = Di("messaging", {
942
942
  }
943
943
  },
944
944
  async sendMessage(e, n, r, o, c, u, d) {
945
- const f = ke()(), h = `temp-${Date.now()}-${Math.random()}`, R = typeof u == "string" && u.trim().length > 0 ? u.trim() : null, C = xo(d), v = f.currentUser, E = {
945
+ const f = ke()(), h = `temp-${Date.now()}-${Math.random()}`, R = typeof u == "string" && u.trim().length > 0 ? u.trim() : null, C = Mo(d), v = f.currentUser, E = {
946
946
  id: h,
947
947
  conversation_id: e,
948
948
  author_id: v?.id || "",
@@ -971,7 +971,7 @@ const Qt = Di("messaging", {
971
971
  if (r && r.length > 0) {
972
972
  const G = await Promise.all(
973
973
  r.map(async (te) => {
974
- const k = await uo().uploadImage(te);
974
+ const k = await ao().uploadImage(te);
975
975
  return {
976
976
  media_id: k.id,
977
977
  mime: k.mime_type,
@@ -1045,11 +1045,11 @@ const Qt = Di("messaging", {
1045
1045
  return null;
1046
1046
  for (let u = c.length - 1; u >= 0; u -= 1) {
1047
1047
  const d = c[u]?.id;
1048
- if (qt(d))
1048
+ if (Dt(d))
1049
1049
  return d;
1050
1050
  }
1051
1051
  return null;
1052
- })(), o = n ? Fn(n, this.messages) : r;
1052
+ })(), o = n ? Un(n, this.messages) : r;
1053
1053
  if (!o)
1054
1054
  return;
1055
1055
  await W().post(`/v1/messaging/conversations/${e}/read`, {
@@ -1068,7 +1068,7 @@ const Qt = Di("messaging", {
1068
1068
  if (e.length === 0)
1069
1069
  return;
1070
1070
  const n = e.map((c) => {
1071
- const u = Fn(c, this.messages);
1071
+ const u = Un(c, this.messages);
1072
1072
  return u ? {
1073
1073
  conversationId: c.id,
1074
1074
  messageId: u
@@ -1100,9 +1100,9 @@ const Qt = Di("messaging", {
1100
1100
  async sendTyping(e, n = "start") {
1101
1101
  try {
1102
1102
  const r = await W().post(`/v1/messaging/conversations/${e}/typing`, { state: n });
1103
- if (n !== "start" || !Eo(r.data))
1103
+ if (n !== "start" || !wo(r.data))
1104
1104
  return;
1105
- await Ln(Co), await W().post(`/v1/messaging/conversations/${e}/typing`, { state: n });
1105
+ await kn(_o), await W().post(`/v1/messaging/conversations/${e}/typing`, { state: n });
1106
1106
  } catch (r) {
1107
1107
  console.warn("Failed to send typing indicator:", r);
1108
1108
  }
@@ -1170,10 +1170,10 @@ const Qt = Di("messaging", {
1170
1170
  };
1171
1171
  n && (r.message = n);
1172
1172
  const o = await W().post("/v1/messaging/conversations/dm", r), c = o.data.data || o.data;
1173
- if (!Nn(c))
1173
+ if (!Fn(c))
1174
1174
  throw new Error("Invalid conversation payload from DM create endpoint.");
1175
- let u = qn(c) && Kt(c, e) ? He(c) : await this.fetchConversation(c.id);
1176
- return u = await jn(u, e), u.is_request === !0 ? (this.requests = rt(this.requests, u), this.conversations = this.conversations.filter((d) => d.id !== u.id), u) : (this.conversations = rt(this.conversations, u), this.requests = this.requests.filter((d) => d.id !== u.id), u);
1175
+ let u = Dn(c) && Gt(c, e) ? He(c) : await this.fetchConversation(c.id);
1176
+ return u = await qn(u, e), u.is_request === !0 ? (this.requests = rt(this.requests, u), this.conversations = this.conversations.filter((d) => d.id !== u.id), u) : (this.conversations = rt(this.conversations, u), this.requests = this.requests.filter((d) => d.id !== u.id), u);
1177
1177
  } catch (r) {
1178
1178
  throw this.error = Z(r), r;
1179
1179
  }
@@ -1184,9 +1184,9 @@ const Qt = Di("messaging", {
1184
1184
  title: e,
1185
1185
  participant_ids: n
1186
1186
  }), o = r.data.data || r.data;
1187
- if (!Nn(o))
1187
+ if (!Fn(o))
1188
1188
  throw new Error("Invalid conversation payload from group create endpoint.");
1189
- const c = qn(o) ? o : await this.fetchConversation(o.id);
1189
+ const c = Dn(o) ? o : await this.fetchConversation(o.id);
1190
1190
  return this.conversations = rt(this.conversations, c), c;
1191
1191
  } catch (r) {
1192
1192
  throw this.error = Z(r), r;
@@ -1307,16 +1307,16 @@ const Qt = Di("messaging", {
1307
1307
  try {
1308
1308
  f = await W().post(o, c);
1309
1309
  } catch (v) {
1310
- if (!Fo(v))
1310
+ if (!Uo(v))
1311
1311
  throw v;
1312
1312
  f = await W().post(o, c);
1313
1313
  }
1314
- const h = he(f.data) && "data" in f.data ? f.data.data : f.data, R = Dn(
1314
+ const h = he(f.data) && "data" in f.data ? f.data.data : f.data, R = On(
1315
1315
  he(h) ? h.reactions : void 0
1316
1316
  );
1317
1317
  (R.length > 0 || d.length === 0) && this.updateMessageReactions(e, n, R);
1318
1318
  try {
1319
- const v = await W().get(o), E = he(v.data) && "data" in v.data ? v.data.data : v.data, b = Dn(
1319
+ const v = await W().get(o), E = he(v.data) && "data" in v.data ? v.data.data : v.data, b = On(
1320
1320
  he(E) ? E.reactions : void 0
1321
1321
  );
1322
1322
  this.updateMessageReactions(e, n, b);
@@ -1386,7 +1386,7 @@ const Qt = Di("messaging", {
1386
1386
  params: { ids: n }
1387
1387
  }), o = r.data?.data?.items ?? r.data?.items ?? [];
1388
1388
  for (const c of o) {
1389
- const u = Nt(c);
1389
+ const u = Ft(c);
1390
1390
  u.status !== null && this.updatePresenceForUser(c.id, u.status, u.lastSeenAt);
1391
1391
  }
1392
1392
  },
@@ -1479,21 +1479,21 @@ const Qt = Di("messaging", {
1479
1479
  }
1480
1480
  });
1481
1481
  function oc(e) {
1482
- const n = Qt(), r = ke()(), o = ye(!1), c = ye(null), u = ye(null), d = zt(), f = d !== null, h = 20, R = 250;
1482
+ const n = Jt(), r = ke()(), o = ye(!1), c = ye(null), u = ye(null), d = Nt(), f = d !== null, h = 20, R = 250;
1483
1483
  let C = 0, v = null, E = null;
1484
- const b = re(() => r.currentUser?.id), A = () => is(e)?.trim() ?? "";
1484
+ const b = re(() => r.currentUser?.id), A = () => ss(e)?.trim() ?? "";
1485
1485
  function w() {
1486
1486
  v && (clearTimeout(v), v = null), C = 0;
1487
1487
  }
1488
1488
  function p() {
1489
1489
  !f || o.value || v || C >= h || (v = setTimeout(() => {
1490
- v = null, C += 1, L();
1490
+ v = null, C += 1, I();
1491
1491
  }, R));
1492
1492
  }
1493
1493
  function m(_) {
1494
1494
  if (n.addMessage(_.message), _.message.author_id !== b.value) {
1495
- const I = n.getConversationById(_.conversation_id);
1496
- I && (I.unread_count = 0), n.markAsRead(_.conversation_id).catch(() => {
1495
+ const x = n.getConversationById(_.conversation_id);
1496
+ x && (x.unread_count = 0), n.markAsRead(_.conversation_id).catch(() => {
1497
1497
  });
1498
1498
  }
1499
1499
  }
@@ -1520,8 +1520,8 @@ function oc(e) {
1520
1520
  );
1521
1521
  }
1522
1522
  function G(_) {
1523
- const I = n.getConversationById(_.conversation_id);
1524
- I && (I.is_request = !1), n.requests = n.requests.filter(
1523
+ const x = n.getConversationById(_.conversation_id);
1524
+ x && (x.is_request = !1), n.requests = n.requests.filter(
1525
1525
  (fe) => fe.id !== _.conversation_id
1526
1526
  );
1527
1527
  }
@@ -1530,10 +1530,10 @@ function oc(e) {
1530
1530
  }));
1531
1531
  }
1532
1532
  function k(_) {
1533
- const I = u.value;
1534
- E && (E(), E = null), I && (_ && !n.hasGlobalConversationSubscription(I) && Xi(I), n.unregisterDetailSubscription(I), u.value = null), o.value = !1;
1533
+ const x = u.value;
1534
+ E && (E(), E = null), x && (_ && !n.hasGlobalConversationSubscription(x) && Bi(x), n.unregisterDetailSubscription(x), u.value = null), o.value = !1;
1535
1535
  }
1536
- function L() {
1536
+ function I() {
1537
1537
  const _ = A();
1538
1538
  if (!(o.value || !_)) {
1539
1539
  if (!Ae()) {
@@ -1542,7 +1542,7 @@ function oc(e) {
1542
1542
  }
1543
1543
  c.value = null;
1544
1544
  try {
1545
- E = Vi(_, {
1545
+ E = Hi(_, {
1546
1546
  onMessageSent: m,
1547
1547
  onMessageRead: y,
1548
1548
  onMessageEdited: F,
@@ -1551,18 +1551,18 @@ function oc(e) {
1551
1551
  onRequestAccepted: G,
1552
1552
  onParticipantRemoved: te
1553
1553
  }), o.value = !0, u.value = _, n.registerDetailSubscription(_), w();
1554
- } catch (I) {
1555
- c.value = I instanceof Error ? I.message : "Failed to subscribe to conversation", console.error("ConversationChannel: Subscribe error", I);
1554
+ } catch (x) {
1555
+ c.value = x instanceof Error ? x.message : "Failed to subscribe to conversation", console.error("ConversationChannel: Subscribe error", x);
1556
1556
  }
1557
1557
  }
1558
1558
  }
1559
1559
  function V() {
1560
- o.value || L();
1560
+ o.value || I();
1561
1561
  }
1562
1562
  typeof window < "u" && window.addEventListener(Je(), V);
1563
- const H = ht((_) => {
1563
+ const H = lt((_) => {
1564
1564
  if (_ === "connected") {
1565
- o.value || L();
1565
+ o.value || I();
1566
1566
  return;
1567
1567
  }
1568
1568
  (_ === "disconnected" || _ === "error") && (w(), k(!1));
@@ -1577,13 +1577,13 @@ function oc(e) {
1577
1577
  }
1578
1578
  return ot(
1579
1579
  () => A(),
1580
- (_, I) => {
1581
- if (_ !== I) {
1580
+ (_, x) => {
1581
+ if (_ !== x) {
1582
1582
  if (w(), o.value && k(!0), !_) {
1583
1583
  c.value = null;
1584
1584
  return;
1585
1585
  }
1586
- L();
1586
+ I();
1587
1587
  }
1588
1588
  }
1589
1589
  ), d !== null && qe(() => {
@@ -1591,23 +1591,23 @@ function oc(e) {
1591
1591
  }), {
1592
1592
  isSubscribed: re(() => o.value),
1593
1593
  error: re(() => c.value),
1594
- subscribe: L,
1594
+ subscribe: I,
1595
1595
  unsubscribe: X
1596
1596
  };
1597
1597
  }
1598
- const Ps = () => () => {
1599
- }, Ms = async () => {
1598
+ const As = () => () => {
1599
+ }, Rs = async () => {
1600
1600
  }, _e = {
1601
1601
  initializedEvent: "messenger-client:main-echo-initialized",
1602
1602
  getEcho: () => null,
1603
1603
  getConnectionStatus: () => "disconnected",
1604
- onConnectionStatusChange: Ps,
1605
- reconnect: Ms
1604
+ onConnectionStatusChange: As,
1605
+ reconnect: Rs
1606
1606
  };
1607
- function ct() {
1607
+ function zo() {
1608
1608
  return _e.initializedEvent;
1609
1609
  }
1610
- function ut() {
1610
+ function jo() {
1611
1611
  return _e.getEcho();
1612
1612
  }
1613
1613
  function $o() {
@@ -1623,7 +1623,7 @@ function Vo(e) {
1623
1623
  e.initializedEvent && (_e.initializedEvent = e.initializedEvent), e.getEcho && (_e.getEcho = e.getEcho), e.getConnectionStatus && (_e.getConnectionStatus = e.getConnectionStatus), e.onConnectionStatusChange && (_e.onConnectionStatusChange = e.onConnectionStatusChange), e.reconnect && (_e.reconnect = e.reconnect);
1624
1624
  }
1625
1625
  function Xo() {
1626
- _e.initializedEvent = "messenger-client:main-echo-initialized", _e.getEcho = () => null, _e.getConnectionStatus = () => "disconnected", _e.onConnectionStatusChange = Ps, _e.reconnect = Ms;
1626
+ _e.initializedEvent = "messenger-client:main-echo-initialized", _e.getEcho = () => null, _e.getConnectionStatus = () => "disconnected", _e.onConnectionStatusChange = As, _e.reconnect = Rs;
1627
1627
  }
1628
1628
  const Wo = {
1629
1629
  debug: () => {
@@ -1634,16 +1634,16 @@ const Wo = {
1634
1634
  },
1635
1635
  error: () => {
1636
1636
  }
1637
- }, ks = () => Wo;
1638
- let Yt = ks;
1639
- function Zt() {
1640
- return Yt;
1637
+ }, Ps = () => Wo;
1638
+ let Kt = Ps;
1639
+ function Qt() {
1640
+ return Kt;
1641
1641
  }
1642
1642
  function Go(e) {
1643
- Yt = e;
1643
+ Kt = e;
1644
1644
  }
1645
1645
  function Jo() {
1646
- Yt = ks;
1646
+ Kt = Ps;
1647
1647
  }
1648
1648
  const Ko = {
1649
1649
  connected: "",
@@ -1651,26 +1651,26 @@ const Ko = {
1651
1651
  disconnected: "",
1652
1652
  error: "",
1653
1653
  unknown: ""
1654
- }, Vn = Zt()("ConnectionStatus");
1655
- function Xn(e) {
1654
+ }, Hn = Qt()("ConnectionStatus");
1655
+ function Bn(e) {
1656
1656
  return e?.connector?.pusher?.connection ?? null;
1657
1657
  }
1658
1658
  function Qo(e) {
1659
1659
  return e === "messenger" ? {
1660
1660
  initializedEvent: Je(),
1661
- getConnectionStatus: vs,
1662
- onConnectionStatusChange: ht,
1663
- reconnect: $i,
1664
- getEchoConnection: () => Xn(Ae())
1661
+ getConnectionStatus: gs,
1662
+ onConnectionStatusChange: lt,
1663
+ reconnect: zi,
1664
+ getEchoConnection: () => Bn(Ae())
1665
1665
  } : {
1666
- initializedEvent: ct(),
1666
+ initializedEvent: zo(),
1667
1667
  getConnectionStatus: $o,
1668
1668
  onConnectionStatusChange: Ho,
1669
1669
  reconnect: Bo,
1670
- getEchoConnection: () => Xn(ut())
1670
+ getEchoConnection: () => Bn(jo())
1671
1671
  };
1672
1672
  }
1673
- function Wn(e) {
1673
+ function Vn(e) {
1674
1674
  return e.getEchoConnection()?.state ?? null;
1675
1675
  }
1676
1676
  function ac(e = {}) {
@@ -1692,7 +1692,7 @@ function ac(e = {}) {
1692
1692
  default:
1693
1693
  return "Unknown connection state";
1694
1694
  }
1695
- }), L = re(() => {
1695
+ }), I = re(() => {
1696
1696
  switch (u.value) {
1697
1697
  case "connected":
1698
1698
  return "success";
@@ -1718,7 +1718,7 @@ function ac(e = {}) {
1718
1718
  return c.unknown;
1719
1719
  }
1720
1720
  }), H = async () => {
1721
- Vn.debug("Manual reconnect triggered"), f.value += 1, await o.reconnect();
1721
+ Hn.debug("Manual reconnect triggered"), f.value += 1, await o.reconnect();
1722
1722
  }, X = (B, K = u.value) => {
1723
1723
  if (B !== "connecting" && b && (clearTimeout(b), b = null), B === "disconnected" || B === "error") {
1724
1724
  const N = !v.value && K === B, Y = !R.value && (N || K === "connected" || K === "connecting");
@@ -1744,11 +1744,11 @@ function ac(e = {}) {
1744
1744
  return;
1745
1745
  b = setTimeout(() => {
1746
1746
  if (b = null, u.value === "connecting") {
1747
- if (Wn(o) === "connected") {
1747
+ if (Vn(o) === "connected") {
1748
1748
  _("connected");
1749
1749
  return;
1750
1750
  }
1751
- R.value = !0, Vn.warn("Still connecting after 10s, treating as disconnected"), _("disconnected"), f.value += 1, o.reconnect();
1751
+ R.value = !0, Hn.warn("Still connecting after 10s, treating as disconnected"), _("disconnected"), f.value += 1, o.reconnect();
1752
1752
  }
1753
1753
  }, 1e4);
1754
1754
  }
@@ -1759,8 +1759,8 @@ function ac(e = {}) {
1759
1759
  return;
1760
1760
  }
1761
1761
  u.value = B, B === "connecting" && (K === "disconnected" || K === "error") && f.value === 0 && (f.value = 1), B === "connected" && (d.value = /* @__PURE__ */ new Date(), f.value = 0), X(B, K);
1762
- }, I = () => {
1763
- const B = Wn(o), K = u.value;
1762
+ }, x = () => {
1763
+ const B = Vn(o), K = u.value;
1764
1764
  if (B === "connected" && K !== "connected") {
1765
1765
  _("connected");
1766
1766
  return;
@@ -1813,11 +1813,11 @@ function ac(e = {}) {
1813
1813
  const B = Date.now() - d.value.getTime(), K = Math.floor(B / 6e4), N = Math.floor(B % 6e4 / 1e3);
1814
1814
  return K > 0 ? `${K}m ${N}s` : `${N}s`;
1815
1815
  });
1816
- return jt(() => {
1816
+ return qt(() => {
1817
1817
  u.value = o.getConnectionStatus(), E = o.onConnectionStatusChange(_), F.value && (d.value = /* @__PURE__ */ new Date()), X(u.value, u.value), v.value = !0, fe(), m = () => {
1818
- fe(), I();
1819
- }, window.addEventListener(o.initializedEvent, m), I(), w = setInterval(() => {
1820
- I();
1818
+ fe(), x();
1819
+ }, window.addEventListener(o.initializedEvent, m), x(), w = setInterval(() => {
1820
+ x();
1821
1821
  }, 3e3);
1822
1822
  }), qe(() => {
1823
1823
  E?.(), b && (clearTimeout(b), b = null), A && (clearTimeout(A), A = null), w && (clearInterval(w), w = null), m && (window.removeEventListener(o.initializedEvent, m), m = null), p?.unbind && y && (p.unbind("connected", y.connected), p.unbind("connecting", y.connecting), p.unbind("disconnected", y.disconnected), p.unbind("unavailable", y.unavailable), p.unbind("error", y.error), p.unbind("state_change", y.stateChange)), p = null, y = null;
@@ -1829,7 +1829,7 @@ function ac(e = {}) {
1829
1829
  isError: G,
1830
1830
  hasConnectionIssues: te,
1831
1831
  statusMessage: k,
1832
- statusColor: L,
1832
+ statusColor: I,
1833
1833
  statusIcon: V,
1834
1834
  showConnectionBanner: re(() => h.value),
1835
1835
  lastConnectionTime: re(() => d.value),
@@ -1838,39 +1838,39 @@ function ac(e = {}) {
1838
1838
  reconnect: H
1839
1839
  };
1840
1840
  }
1841
- const xs = () => {
1841
+ const Ms = () => {
1842
1842
  };
1843
- let en = xs;
1843
+ let Yt = Ms;
1844
1844
  function Yo() {
1845
- return en;
1845
+ return Yt;
1846
1846
  }
1847
1847
  function Zo(e) {
1848
- en = e;
1848
+ Yt = e;
1849
1849
  }
1850
1850
  function ea() {
1851
- en = xs;
1851
+ Yt = Ms;
1852
1852
  }
1853
- const Me = Zt()("GlobalMessaging"), ta = 3, na = (e) => e.replace(/\/+$/, ""), sa = (e) => na(window.location.pathname) === `/messages/${e}`, ra = (e) => e.is_muted ? !0 : typeof e.muted_until == "string" && e.muted_until.length > 0;
1853
+ const Me = Qt()("GlobalMessaging"), ta = 3, na = (e) => e.replace(/\/+$/, ""), sa = (e) => na(window.location.pathname) === `/messages/${e}`, ra = (e) => e.is_muted ? !0 : typeof e.muted_until == "string" && e.muted_until.length > 0;
1854
1854
  function cc() {
1855
- const e = Qt(), n = ke()(), r = Yo(), o = Vt(), c = zi(), u = zt(), { conversations: d, requestConversations: f } = Ni(e), h = /* @__PURE__ */ new Set(), R = /* @__PURE__ */ new Map();
1855
+ const e = Jt(), n = ke()(), r = Yo(), o = Ht(), c = Ni(), u = Nt(), { conversations: d, requestConversations: f } = Fi(e), h = /* @__PURE__ */ new Set(), R = /* @__PURE__ */ new Map();
1856
1856
  let C = !1;
1857
1857
  function v(k) {
1858
- const L = R.get(k);
1859
- if (L) {
1860
- if (R.delete(k), L.directBound) {
1861
- const V = L.channel.subscription;
1858
+ const I = R.get(k);
1859
+ if (I) {
1860
+ if (R.delete(k), I.directBound) {
1861
+ const V = I.channel.subscription;
1862
1862
  if (V)
1863
- for (const H of L.bindings)
1863
+ for (const H of I.bindings)
1864
1864
  try {
1865
1865
  V.unbind(H.event, H.handler);
1866
1866
  } catch {
1867
1867
  }
1868
1868
  return;
1869
1869
  }
1870
- if (typeof L.channel.stopListening == "function")
1871
- for (const V of L.bindings)
1870
+ if (typeof I.channel.stopListening == "function")
1871
+ for (const V of I.bindings)
1872
1872
  try {
1873
- L.channel.stopListening(V.event, V.handler);
1873
+ I.channel.stopListening(V.event, V.handler);
1874
1874
  } catch {
1875
1875
  }
1876
1876
  }
@@ -1881,12 +1881,12 @@ function cc() {
1881
1881
  h.clear();
1882
1882
  }
1883
1883
  function b(k) {
1884
- const L = Ae();
1885
- if (!L || h.has(k)) return;
1884
+ const I = Ae();
1885
+ if (!I || h.has(k)) return;
1886
1886
  const V = `conversation.${k}`;
1887
1887
  v(k);
1888
- const H = L.private(V), X = (N) => {
1889
- if (!Qi(N)) {
1888
+ const H = I.private(V), X = (N) => {
1889
+ if (!Ji(N)) {
1890
1890
  Me.warn("Dropping malformed ConversationMessageSent event", N);
1891
1891
  return;
1892
1892
  }
@@ -1906,20 +1906,20 @@ function cc() {
1906
1906
  oe || ue.unread_count++, r(oe);
1907
1907
  }
1908
1908
  }, _ = (N) => {
1909
- if (!Yi(N)) {
1909
+ if (!Ki(N)) {
1910
1910
  Me.warn("Dropping malformed ConversationMessageRead event", N);
1911
1911
  return;
1912
1912
  }
1913
1913
  e.applyParticipantReadState(N);
1914
- }, I = (N) => {
1915
- if (!to(N)) {
1914
+ }, x = (N) => {
1915
+ if (!Zi(N)) {
1916
1916
  Me.warn("Dropping malformed MessageReactionToggled event", N);
1917
1917
  return;
1918
1918
  }
1919
1919
  const Y = N;
1920
1920
  e.updateMessageReactions(Y.conversation_id, Y.message_id, Y.reactions);
1921
1921
  }, fe = (N) => {
1922
- if (!Zi(N)) {
1922
+ if (!Qi(N)) {
1923
1923
  Me.warn("Dropping malformed ConversationMessageEdited event", N);
1924
1924
  return;
1925
1925
  }
@@ -1932,14 +1932,14 @@ function cc() {
1932
1932
  Y.message.meta
1933
1933
  );
1934
1934
  }, Se = (N) => {
1935
- if (!eo(N)) {
1935
+ if (!Yi(N)) {
1936
1936
  Me.warn("Dropping malformed ConversationMessageDeleted event", N);
1937
1937
  return;
1938
1938
  }
1939
1939
  const Y = N;
1940
1940
  e.removeMessage(Y.conversation_id, Y.message_id);
1941
1941
  }, B = (N) => {
1942
- if (!no(N)) {
1942
+ if (!eo(N)) {
1943
1943
  Me.warn("Dropping malformed ConversationRequestAccepted event", N);
1944
1944
  return;
1945
1945
  }
@@ -1948,7 +1948,7 @@ function cc() {
1948
1948
  (U) => U.id !== Y.conversation_id
1949
1949
  );
1950
1950
  }, K = H.subscription;
1951
- K ? (K.bind("ConversationMessageSent", X), K.bind("ConversationMessageRead", _), K.bind("ConversationMessageEdited", fe), K.bind("ConversationMessageDeleted", Se), K.bind("MessageReactionToggled", I), K.bind("ConversationRequestAccepted", B), R.set(k, {
1951
+ K ? (K.bind("ConversationMessageSent", X), K.bind("ConversationMessageRead", _), K.bind("ConversationMessageEdited", fe), K.bind("ConversationMessageDeleted", Se), K.bind("MessageReactionToggled", x), K.bind("ConversationRequestAccepted", B), R.set(k, {
1952
1952
  channel: H,
1953
1953
  directBound: !0,
1954
1954
  bindings: [
@@ -1956,10 +1956,10 @@ function cc() {
1956
1956
  { event: "ConversationMessageRead", handler: _ },
1957
1957
  { event: "ConversationMessageEdited", handler: fe },
1958
1958
  { event: "ConversationMessageDeleted", handler: Se },
1959
- { event: "MessageReactionToggled", handler: I },
1959
+ { event: "MessageReactionToggled", handler: x },
1960
1960
  { event: "ConversationRequestAccepted", handler: B }
1961
1961
  ]
1962
- })) : (H.listen(".ConversationMessageSent", X), H.listen(".ConversationMessageRead", _), H.listen(".ConversationMessageEdited", fe), H.listen(".ConversationMessageDeleted", Se), H.listen(".MessageReactionToggled", I), H.listen(".ConversationRequestAccepted", B), R.set(k, {
1962
+ })) : (H.listen(".ConversationMessageSent", X), H.listen(".ConversationMessageRead", _), H.listen(".ConversationMessageEdited", fe), H.listen(".ConversationMessageDeleted", Se), H.listen(".MessageReactionToggled", x), H.listen(".ConversationRequestAccepted", B), R.set(k, {
1963
1963
  channel: H,
1964
1964
  directBound: !1,
1965
1965
  bindings: [
@@ -1967,7 +1967,7 @@ function cc() {
1967
1967
  { event: ".ConversationMessageRead", handler: _ },
1968
1968
  { event: ".ConversationMessageEdited", handler: fe },
1969
1969
  { event: ".ConversationMessageDeleted", handler: Se },
1970
- { event: ".MessageReactionToggled", handler: I },
1970
+ { event: ".MessageReactionToggled", handler: x },
1971
1971
  { event: ".ConversationRequestAccepted", handler: B }
1972
1972
  ]
1973
1973
  })), h.add(k), e.registerGlobalConversationSubscription(k);
@@ -1978,26 +1978,26 @@ function cc() {
1978
1978
  E();
1979
1979
  return;
1980
1980
  }
1981
- for (const L of h) {
1982
- v(L);
1981
+ for (const I of h) {
1982
+ v(I);
1983
1983
  try {
1984
- k.leave(`conversation.${L}`);
1984
+ k.leave(`conversation.${I}`);
1985
1985
  } catch {
1986
1986
  }
1987
- e.unregisterGlobalConversationSubscription(L);
1987
+ e.unregisterGlobalConversationSubscription(I);
1988
1988
  }
1989
1989
  h.clear();
1990
1990
  }
1991
1991
  function w() {
1992
1992
  const k = Ae();
1993
1993
  if (!k) return;
1994
- const L = (() => {
1994
+ const I = (() => {
1995
1995
  const H = [...e.conversations, ...e.requestConversations], X = /* @__PURE__ */ new Set(), _ = [];
1996
- for (const I of H)
1997
- if (!X.has(I.id) && (X.add(I.id), _.push(I), _.length >= ta))
1996
+ for (const x of H)
1997
+ if (!X.has(x.id) && (X.add(x.id), _.push(x), _.length >= ta))
1998
1998
  break;
1999
1999
  return _;
2000
- })(), V = new Set(L.map((H) => H.id));
2000
+ })(), V = new Set(I.map((H) => H.id));
2001
2001
  for (const H of h)
2002
2002
  if (!V.has(H) && !e.hasDetailSubscription(H)) {
2003
2003
  try {
@@ -2006,42 +2006,42 @@ function cc() {
2006
2006
  }
2007
2007
  h.delete(H), e.unregisterGlobalConversationSubscription(H);
2008
2008
  }
2009
- for (const H of L)
2009
+ for (const H of I)
2010
2010
  b(H.id);
2011
2011
  }
2012
2012
  function p(k) {
2013
- const L = Nt({
2013
+ const I = Ft({
2014
2014
  status: k.status,
2015
2015
  last_seen_at: k.last_seen_at ?? null
2016
2016
  });
2017
- L.status !== null && e.updatePresenceForUser(
2017
+ I.status !== null && e.updatePresenceForUser(
2018
2018
  k.user_id,
2019
- L.status,
2020
- L.lastSeenAt
2019
+ I.status,
2020
+ I.lastSeenAt
2021
2021
  );
2022
2022
  }
2023
2023
  async function m() {
2024
2024
  const k = [...new Set(
2025
- e.conversations.filter((L) => L.type === "dm" && typeof L.other_user_id == "string" && L.other_user_id.length > 0).map((L) => L.other_user_id)
2025
+ e.conversations.filter((I) => I.type === "dm" && typeof I.other_user_id == "string" && I.other_user_id.length > 0).map((I) => I.other_user_id)
2026
2026
  )];
2027
2027
  if (k.length !== 0)
2028
2028
  try {
2029
- const L = await o.get("/v1/presence/users", {
2029
+ const I = await o.get("/v1/presence/users", {
2030
2030
  params: { ids: k }
2031
- }), V = L.data?.data?.items ?? L.data?.items ?? [];
2031
+ }), V = I.data?.data?.items ?? I.data?.items ?? [];
2032
2032
  for (const H of V) {
2033
- const X = Nt(H);
2033
+ const X = Ft(H);
2034
2034
  X.status !== null && e.updatePresenceForUser(H.id, X.status, X.lastSeenAt);
2035
2035
  }
2036
- } catch (L) {
2037
- Me.warn("Failed to refresh messaging presence snapshot", L);
2036
+ } catch (I) {
2037
+ Me.warn("Failed to refresh messaging presence snapshot", I);
2038
2038
  }
2039
2039
  }
2040
2040
  function y() {
2041
- !Ae() || C || (Hi(p), C = !0);
2041
+ !Ae() || C || (ji(p), C = !0);
2042
2042
  }
2043
2043
  function F() {
2044
- C && (Bi(), C = !1);
2044
+ C && ($i(), C = !1);
2045
2045
  }
2046
2046
  const q = ot(
2047
2047
  d,
@@ -2060,10 +2060,10 @@ function cc() {
2060
2060
  () => {
2061
2061
  w();
2062
2062
  }
2063
- ), te = ht((k) => {
2063
+ ), te = lt((k) => {
2064
2064
  k === "connected" ? (E(), w(), F(), y(), m()) : (k === "disconnected" || k === "error") && (E(), F());
2065
2065
  });
2066
- w(), y(), m(), Ae() || ms().then((k) => {
2066
+ w(), y(), m(), Ae() || ps().then((k) => {
2067
2067
  k && (E(), w(), F(), y(), m());
2068
2068
  }).catch((k) => {
2069
2069
  Me.warn("Failed to eagerly initialize messenger echo", k);
@@ -2072,10 +2072,10 @@ function cc() {
2072
2072
  });
2073
2073
  }
2074
2074
  function uc() {
2075
- const e = ye(Ot());
2075
+ const e = ye(It());
2076
2076
  let n = null;
2077
- return jt(() => {
2078
- e.value = Ot(), n = ji((r) => {
2077
+ return qt(() => {
2078
+ e.value = It(), n = qi((r) => {
2079
2079
  e.value = r;
2080
2080
  });
2081
2081
  }), qe(() => {
@@ -2086,7 +2086,7 @@ function uc() {
2086
2086
  isSuspended: re(() => e.value === "account_suspended")
2087
2087
  };
2088
2088
  }
2089
- const Ls = () => null, Is = {
2089
+ const ks = () => null, xs = {
2090
2090
  sessionOpenUrl: "/v1/presence/session/open",
2091
2091
  sessionHeartbeatUrl: "/v1/presence/heartbeat",
2092
2092
  sessionCloseUrl: "/v1/presence/session/close",
@@ -2097,29 +2097,29 @@ const Ls = () => null, Is = {
2097
2097
  activityDebounceMs: 5e3,
2098
2098
  heartbeatIntervalMs: 3e4,
2099
2099
  userAgentResolver: () => navigator.userAgent.slice(0, 256),
2100
- authTokenResolver: Ls
2100
+ authTokenResolver: ks
2101
2101
  };
2102
- let lt = { ...Is };
2102
+ let ct = { ...xs };
2103
2103
  function ia() {
2104
- return lt;
2104
+ return ct;
2105
2105
  }
2106
2106
  function oa(e) {
2107
- lt = {
2108
- ...lt,
2107
+ ct = {
2108
+ ...ct,
2109
2109
  ...e
2110
2110
  };
2111
2111
  }
2112
2112
  function aa() {
2113
- lt = { ...Is };
2113
+ ct = { ...xs };
2114
2114
  }
2115
2115
  function ca(e) {
2116
- return e.authTokenResolver !== Ls;
2116
+ return e.authTokenResolver !== ks;
2117
2117
  }
2118
2118
  const ua = 429, la = 403, da = 423, ha = "ACCOUNT_LIMITED", fa = "ACCOUNT_SUSPENDED", pa = "ACCOUNT_WRITE_TIMEOUT", ga = 2, ma = 5 * 6e4;
2119
2119
  function We(e) {
2120
2120
  return typeof e == "object" && e !== null;
2121
2121
  }
2122
- function Us(e) {
2122
+ function Ls(e) {
2123
2123
  if (!We(e))
2124
2124
  return null;
2125
2125
  const n = e.response;
@@ -2134,7 +2134,7 @@ function Us(e) {
2134
2134
  }
2135
2135
  return null;
2136
2136
  }
2137
- function Os(e) {
2137
+ function Is(e) {
2138
2138
  if (!We(e))
2139
2139
  return null;
2140
2140
  const n = e.response;
@@ -2143,12 +2143,12 @@ function Os(e) {
2143
2143
  const r = n.data;
2144
2144
  return We(r) && typeof r.code == "string" ? r.code : null;
2145
2145
  }
2146
- function xt(e) {
2147
- const n = Us(e), r = Os(e);
2146
+ function Mt(e) {
2147
+ const n = Ls(e), r = Is(e);
2148
2148
  return n === ua && r === ha || n === da && r === pa;
2149
2149
  }
2150
- function Lt(e) {
2151
- const n = Us(e), r = Os(e);
2150
+ function kt(e) {
2151
+ const n = Ls(e), r = Is(e);
2152
2152
  return n === la && r === fa ? !0 : e instanceof Error ? e.message.toLowerCase().includes("suspended") : !1;
2153
2153
  }
2154
2154
  function Ke() {
@@ -2168,7 +2168,7 @@ function ba(e) {
2168
2168
  const o = Number.parseInt(r, 10);
2169
2169
  return Number.isFinite(o) ? o : (n?.removeItem(e), null);
2170
2170
  }
2171
- function It(e, n = Date.now()) {
2171
+ function xt(e, n = Date.now()) {
2172
2172
  const r = Ke(), o = ba(e);
2173
2173
  return o === null ? !1 : o <= n ? (r?.removeItem(e), !1) : !0;
2174
2174
  }
@@ -2224,28 +2224,28 @@ function Ta(e, n, r) {
2224
2224
  }
2225
2225
  }
2226
2226
  function lc() {
2227
- const e = ke()(), n = ia(), r = Vt(), o = va(n.clientIdStorageKey);
2228
- let c = null, u = null, d = !1, f = It(n.accountLimitedUntilStorageKey), h = !1, R = !1, C = null, v = 0;
2227
+ const e = ke()(), n = ia(), r = Ht(), o = va(n.clientIdStorageKey);
2228
+ let c = null, u = null, d = !1, f = xt(n.accountLimitedUntilStorageKey), h = !1, R = !1, C = null, v = 0;
2229
2229
  const E = () => ca(n) ? n.authTokenResolver() !== null : !0, b = () => {
2230
2230
  c && (clearInterval(c), c = null);
2231
2231
  }, A = () => {
2232
2232
  u && (clearTimeout(u), u = null);
2233
2233
  }, w = () => {
2234
2234
  b(), c = setInterval(() => {
2235
- L();
2235
+ I();
2236
2236
  }, n.heartbeatIntervalMs);
2237
- }, p = (I) => {
2238
- f || console.warn(I), ya(n.accountLimitedUntilStorageKey), f = !0, d = !1, C = null, b(), A();
2239
- }, m = async (I) => {
2240
- if (!(!d || R || f || h) && E() && C !== I)
2237
+ }, p = (x) => {
2238
+ f || console.warn(x), ya(n.accountLimitedUntilStorageKey), f = !0, d = !1, C = null, b(), A();
2239
+ }, m = async (x) => {
2240
+ if (!(!d || R || f || h) && E() && C !== x)
2241
2241
  try {
2242
- await r.patch(n.statusUrl, { status: I }), C = I;
2242
+ await r.patch(n.statusUrl, { status: x }), C = x;
2243
2243
  } catch (fe) {
2244
- if (xt(fe)) {
2244
+ if (Mt(fe)) {
2245
2245
  p("[Presence] Presence updates paused: account is temporarily limited");
2246
2246
  return;
2247
2247
  }
2248
- Lt(fe) && (h = !0, d = !1, C = null, b(), A());
2248
+ kt(fe) && (h = !0, d = !1, C = null, b(), A());
2249
2249
  }
2250
2250
  }, y = () => {
2251
2251
  A(), !(!d || R || f || h || document.visibilityState !== "visible") && (u = setTimeout(() => {
@@ -2254,8 +2254,8 @@ function lc() {
2254
2254
  }, F = () => {
2255
2255
  if (R || !d || f || h || document.visibilityState !== "visible")
2256
2256
  return;
2257
- const I = Date.now();
2258
- I - v < n.activityDebounceMs || (v = I, m("online"), y());
2257
+ const x = Date.now();
2258
+ x - v < n.activityDebounceMs || (v = x, m("online"), y());
2259
2259
  }, q = () => {
2260
2260
  F();
2261
2261
  }, J = () => {
@@ -2263,43 +2263,43 @@ function lc() {
2263
2263
  }, G = () => {
2264
2264
  typeof document > "u" || typeof window > "u" || (document.removeEventListener("pointerdown", q), document.removeEventListener("keydown", q), document.removeEventListener("touchstart", q), window.removeEventListener("focus", q));
2265
2265
  }, te = async () => {
2266
- if (It(n.accountLimitedUntilStorageKey))
2266
+ if (xt(n.accountLimitedUntilStorageKey))
2267
2267
  return f = !0, "account_limited";
2268
2268
  try {
2269
2269
  return await r.post(n.sessionOpenUrl, {
2270
2270
  client_id: o,
2271
2271
  user_agent: n.userAgentResolver()
2272
2272
  }), _a(n.accountLimitedUntilStorageKey), f = !1, h = !1, d = !0, C = null, "opened";
2273
- } catch (I) {
2274
- return xt(I) ? (p("[Presence] Session open skipped: account is temporarily limited"), "account_limited") : Lt(I) ? (h = !0, d = !1, C = null, b(), A(), "account_suspended") : "failed";
2273
+ } catch (x) {
2274
+ return Mt(x) ? (p("[Presence] Session open skipped: account is temporarily limited"), "account_limited") : kt(x) ? (h = !0, d = !1, C = null, b(), A(), "account_suspended") : "failed";
2275
2275
  }
2276
2276
  }, k = async () => {
2277
- for (let I = 0; I < ga; I += 1)
2277
+ for (let x = 0; x < ga; x += 1)
2278
2278
  if (await te() !== "failed")
2279
2279
  return;
2280
2280
  console.warn("[Presence] Failed to open session");
2281
- }, L = async () => {
2281
+ }, I = async () => {
2282
2282
  if (d && E())
2283
2283
  try {
2284
2284
  await r.post(n.sessionHeartbeatUrl, { client_id: o });
2285
- } catch (I) {
2286
- if (xt(I)) {
2285
+ } catch (x) {
2286
+ if (Mt(x)) {
2287
2287
  p("[Presence] Heartbeat paused: account is temporarily limited");
2288
2288
  return;
2289
2289
  }
2290
- Lt(I) && (h = !0, d = !1, C = null, b(), A());
2290
+ kt(x) && (h = !0, d = !1, C = null, b(), A());
2291
2291
  }
2292
2292
  }, V = () => {
2293
2293
  if (!d)
2294
2294
  return;
2295
2295
  d = !1, C = null, A();
2296
- const I = Ta(
2296
+ const x = Ta(
2297
2297
  n.sessionCloseUrl,
2298
2298
  o,
2299
2299
  n.authTokenResolver()
2300
2300
  );
2301
- if (I) {
2302
- I.catch(() => {
2301
+ if (x) {
2302
+ x.catch(() => {
2303
2303
  });
2304
2304
  return;
2305
2305
  }
@@ -2320,7 +2320,7 @@ function lc() {
2320
2320
  return;
2321
2321
  }
2322
2322
  if (document.visibilityState === "visible" && !d) {
2323
- f = It(n.accountLimitedUntilStorageKey), !f && !h && H();
2323
+ f = xt(n.accountLimitedUntilStorageKey), !f && !h && H();
2324
2324
  return;
2325
2325
  }
2326
2326
  document.visibilityState === "visible" && d && !f && !h && F();
@@ -2328,7 +2328,7 @@ function lc() {
2328
2328
  }, _ = () => {
2329
2329
  R || (V(), b(), A());
2330
2330
  };
2331
- jt(async () => {
2331
+ qt(async () => {
2332
2332
  if (e.isAuthenticated ?? e.currentUser !== null) {
2333
2333
  if (await k(), R) {
2334
2334
  V();
@@ -2342,9 +2342,9 @@ function lc() {
2342
2342
  }
2343
2343
  const Ea = 12e3;
2344
2344
  function dc(e) {
2345
- const n = Qt(), r = ke()(), o = ye(!1), c = ye(null), u = ye(null), d = ye([]), f = /* @__PURE__ */ new Map(), h = zt(), R = h !== null, C = 20, v = 250;
2345
+ const n = Jt(), r = ke()(), o = ye(!1), c = ye(null), u = ye(null), d = ye([]), f = /* @__PURE__ */ new Map(), h = Nt(), R = h !== null, C = 20, v = 250;
2346
2346
  let E = !1, b = null, A = 0, w = null;
2347
- const p = re(() => r.currentUser?.id), m = () => is(e)?.trim() ?? "", y = () => {
2347
+ const p = re(() => r.currentUser?.id), m = () => ss(e)?.trim() ?? "", y = () => {
2348
2348
  const M = u.value?.trim() ?? "";
2349
2349
  if (M.length > 0)
2350
2350
  return M;
@@ -2368,7 +2368,7 @@ function dc(e) {
2368
2368
  !R || o.value || w || A >= C || (w = setTimeout(() => {
2369
2369
  w = null, A += 1, X();
2370
2370
  }, v));
2371
- }, L = (M, U) => {
2371
+ }, I = (M, U) => {
2372
2372
  J(M);
2373
2373
  const ne = setTimeout(() => {
2374
2374
  f.delete(M), n.removeTypingUser(U, M), d.value = d.value.filter((ue) => ue.id !== M);
@@ -2378,8 +2378,8 @@ function dc(e) {
2378
2378
  E = !0, te();
2379
2379
  }, H = (M) => {
2380
2380
  try {
2381
- b && (b(), b = null), b = Wi(M, {
2382
- onTypingStart: I,
2381
+ b && (b(), b = null), b = Vi(M, {
2382
+ onTypingStart: x,
2383
2383
  onTypingStop: fe
2384
2384
  }), te(), o.value = !0, u.value = M;
2385
2385
  } catch (U) {
@@ -2388,15 +2388,15 @@ function dc(e) {
2388
2388
  }, X = () => {
2389
2389
  const M = m();
2390
2390
  if (!(o.value || !M)) {
2391
- if (c.value = null, Ae() && Rn() === "connected") {
2391
+ if (c.value = null, Ae() && En() === "connected") {
2392
2392
  H(M);
2393
2393
  return;
2394
2394
  }
2395
- E = !1, ms().then((U) => {
2395
+ E = !1, ps().then((U) => {
2396
2396
  if (E || o.value || !U)
2397
2397
  return;
2398
2398
  const ne = m();
2399
- if (ne && ne === M && Ae() && Rn() === "connected") {
2399
+ if (ne && ne === M && Ae() && En() === "connected") {
2400
2400
  H(ne);
2401
2401
  return;
2402
2402
  }
@@ -2407,12 +2407,12 @@ function dc(e) {
2407
2407
  const M = u.value;
2408
2408
  if (V(), !(!o.value || !M))
2409
2409
  try {
2410
- b && (b(), b = null), Gi(M), G(), q(M), o.value = !1, u.value = null, c.value = null;
2410
+ b && (b(), b = null), Xi(M), G(), q(M), o.value = !1, u.value = null, c.value = null;
2411
2411
  } catch (U) {
2412
2412
  c.value = U instanceof Error ? U.message : "Failed to unsubscribe from typing channel";
2413
2413
  }
2414
2414
  };
2415
- function I(M) {
2415
+ function x(M) {
2416
2416
  if (M.user_id === p.value)
2417
2417
  return;
2418
2418
  const U = y();
@@ -2423,7 +2423,7 @@ function dc(e) {
2423
2423
  name: M.user.name,
2424
2424
  ...M.user.avatar !== void 0 ? { avatar: M.user.avatar } : {}
2425
2425
  };
2426
- d.value.some((ue) => ue.id === ne.id) || (d.value = [...d.value, ne]), n.addTypingUser(U, ne), L(M.user_id, U);
2426
+ d.value.some((ue) => ue.id === ne.id) || (d.value = [...d.value, ne]), n.addTypingUser(U, ne), I(M.user_id, U);
2427
2427
  }
2428
2428
  function fe(M) {
2429
2429
  if (M.user_id === p.value)
@@ -2467,7 +2467,7 @@ function dc(e) {
2467
2467
  m() && (b && (b(), b = null), o.value = !1, u.value = null, X());
2468
2468
  };
2469
2469
  typeof window < "u" && window.addEventListener(Je(), N);
2470
- const Y = ht((M) => {
2470
+ const Y = lt((M) => {
2471
2471
  if (M === "connected") {
2472
2472
  o.value || X();
2473
2473
  return;
@@ -2491,12 +2491,12 @@ function dc(e) {
2491
2491
  };
2492
2492
  }
2493
2493
  function hc(e) {
2494
- e.apiClient && so(e.apiClient), e.mainApiClient && io(e.mainApiClient), e.authStore && ao(e.authStore), e.mediaApi && lo(e.mediaApi), e.createLogger && Go(e.createLogger), e.playMessageNotification && Zo(e.playMessageNotification), e.echo && Ji(e.echo), e.mainEcho && Vo(e.mainEcho), e.presence && oa(e.presence);
2494
+ e.apiClient && to(e.apiClient), e.mainApiClient && so(e.mainApiClient), e.authStore && io(e.authStore), e.mediaApi && co(e.mediaApi), e.createLogger && Go(e.createLogger), e.playMessageNotification && Zo(e.playMessageNotification), e.echo && Wi(e.echo), e.mainEcho && Vo(e.mainEcho), e.presence && oa(e.presence);
2495
2495
  }
2496
2496
  function fc() {
2497
- ro(), oo(), co(), ho(), Jo(), ea(), Ki(), Xo(), aa();
2497
+ no(), ro(), oo(), uo(), Jo(), ea(), Gi(), Xo(), aa();
2498
2498
  }
2499
- class tn {
2499
+ class Zt {
2500
2500
  constructor() {
2501
2501
  this.notificationCreatedEvent = ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated";
2502
2502
  }
@@ -2525,7 +2525,7 @@ class tn {
2525
2525
  return this.stopListening(".client-" + n, r);
2526
2526
  }
2527
2527
  }
2528
- class Fs {
2528
+ class Us {
2529
2529
  /**
2530
2530
  * Create a new class instance.
2531
2531
  */
@@ -2554,12 +2554,12 @@ function Aa(e) {
2554
2554
  }
2555
2555
  return !0;
2556
2556
  }
2557
- class nn extends tn {
2557
+ class en extends Zt {
2558
2558
  /**
2559
2559
  * Create a new class instance.
2560
2560
  */
2561
2561
  constructor(n, r, o) {
2562
- super(), this.name = r, this.pusher = n, this.options = o, this.eventFormatter = new Fs(this.options.namespace), this.subscribe();
2562
+ super(), this.name = r, this.pusher = n, this.options = o, this.eventFormatter = new Us(this.options.namespace), this.subscribe();
2563
2563
  }
2564
2564
  /**
2565
2565
  * Subscribe to a Pusher channel.
@@ -2631,7 +2631,7 @@ class nn extends tn {
2631
2631
  return this.subscription.bind(n, r), this;
2632
2632
  }
2633
2633
  }
2634
- class Ds extends nn {
2634
+ class Os extends en {
2635
2635
  /**
2636
2636
  * Send a whisper event to other clients in the channel.
2637
2637
  */
@@ -2642,7 +2642,7 @@ class Ds extends nn {
2642
2642
  ), this;
2643
2643
  }
2644
2644
  }
2645
- class Ra extends nn {
2645
+ class Ra extends en {
2646
2646
  /**
2647
2647
  * Send a whisper event to other clients in the channel.
2648
2648
  */
@@ -2653,7 +2653,7 @@ class Ra extends nn {
2653
2653
  ), this;
2654
2654
  }
2655
2655
  }
2656
- class Pa extends Ds {
2656
+ class Pa extends Os {
2657
2657
  /**
2658
2658
  * Register a callback to be called anytime the member list changes.
2659
2659
  */
@@ -2688,12 +2688,12 @@ class Pa extends Ds {
2688
2688
  }), this;
2689
2689
  }
2690
2690
  }
2691
- class Ns extends tn {
2691
+ class Fs extends Zt {
2692
2692
  /**
2693
2693
  * Create a new class instance.
2694
2694
  */
2695
2695
  constructor(n, r, o) {
2696
- super(), this.events = {}, this.listeners = {}, this.name = r, this.socket = n, this.options = o, this.eventFormatter = new Fs(this.options.namespace), this.subscribe();
2696
+ super(), this.events = {}, this.listeners = {}, this.name = r, this.socket = n, this.options = o, this.eventFormatter = new Us(this.options.namespace), this.subscribe();
2697
2697
  }
2698
2698
  /**
2699
2699
  * Subscribe to a Socket.io channel.
@@ -2764,7 +2764,7 @@ class Ns extends tn {
2764
2764
  )), (!r || this.listeners[n].length === 0) && (this.events[n] && (this.socket.removeListener(n, this.events[n]), delete this.events[n]), delete this.listeners[n]);
2765
2765
  }
2766
2766
  }
2767
- class qs extends Ns {
2767
+ class Ds extends Fs {
2768
2768
  /**
2769
2769
  * Send a whisper event to other clients in the channel.
2770
2770
  */
@@ -2776,7 +2776,7 @@ class qs extends Ns {
2776
2776
  }), this;
2777
2777
  }
2778
2778
  }
2779
- class Ma extends qs {
2779
+ class Ma extends Ds {
2780
2780
  /**
2781
2781
  * Register a callback to be called anytime the member list changes.
2782
2782
  */
@@ -2814,7 +2814,7 @@ class Ma extends qs {
2814
2814
  ), this;
2815
2815
  }
2816
2816
  }
2817
- class dt extends tn {
2817
+ class ut extends Zt {
2818
2818
  /**
2819
2819
  * Subscribe to a channel.
2820
2820
  */
@@ -2862,7 +2862,7 @@ class dt extends tn {
2862
2862
  return this;
2863
2863
  }
2864
2864
  }
2865
- class zs extends dt {
2865
+ class Ns extends ut {
2866
2866
  /**
2867
2867
  * Send a whisper event to other clients in the channel.
2868
2868
  */
@@ -2870,7 +2870,7 @@ class zs extends dt {
2870
2870
  return this;
2871
2871
  }
2872
2872
  }
2873
- class ka extends dt {
2873
+ class ka extends ut {
2874
2874
  /**
2875
2875
  * Send a whisper event to other clients in the channel.
2876
2876
  */
@@ -2878,7 +2878,7 @@ class ka extends dt {
2878
2878
  return this;
2879
2879
  }
2880
2880
  }
2881
- class xa extends zs {
2881
+ class xa extends Ns {
2882
2882
  /**
2883
2883
  * Register a callback to be called anytime the member list changes.
2884
2884
  */
@@ -2904,7 +2904,7 @@ class xa extends zs {
2904
2904
  return this;
2905
2905
  }
2906
2906
  }
2907
- const js = class $s {
2907
+ const qs = class zs {
2908
2908
  /**
2909
2909
  * Create a new class instance.
2910
2910
  */
@@ -2916,7 +2916,7 @@ const js = class $s {
2916
2916
  */
2917
2917
  setOptions(n) {
2918
2918
  this.options = {
2919
- ...$s._defaultOptions,
2919
+ ...zs._defaultOptions,
2920
2920
  ...n,
2921
2921
  broadcaster: n.broadcaster
2922
2922
  };
@@ -2931,7 +2931,7 @@ const js = class $s {
2931
2931
  return typeof window < "u" && (n = window.Laravel) != null && n.csrfToken ? window.Laravel.csrfToken : this.options.csrfToken ? this.options.csrfToken : typeof document < "u" && typeof document.querySelector == "function" ? ((r = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : r.getAttribute("content")) ?? null : null;
2932
2932
  }
2933
2933
  };
2934
- js._defaultOptions = {
2934
+ qs._defaultOptions = {
2935
2935
  auth: {
2936
2936
  headers: {}
2937
2937
  },
@@ -2946,8 +2946,8 @@ js._defaultOptions = {
2946
2946
  key: null,
2947
2947
  namespace: "App.Events"
2948
2948
  };
2949
- let sn = js;
2950
- class it extends sn {
2949
+ let tn = qs;
2950
+ class it extends tn {
2951
2951
  constructor() {
2952
2952
  super(...arguments), this.channels = {};
2953
2953
  }
@@ -2985,7 +2985,7 @@ class it extends sn {
2985
2985
  * Get a channel instance by name.
2986
2986
  */
2987
2987
  channel(n) {
2988
- return this.channels[n] || (this.channels[n] = new nn(
2988
+ return this.channels[n] || (this.channels[n] = new en(
2989
2989
  this.pusher,
2990
2990
  n,
2991
2991
  this.options
@@ -2995,7 +2995,7 @@ class it extends sn {
2995
2995
  * Get a private channel instance by name.
2996
2996
  */
2997
2997
  privateChannel(n) {
2998
- return this.channels["private-" + n] || (this.channels["private-" + n] = new Ds(
2998
+ return this.channels["private-" + n] || (this.channels["private-" + n] = new Os(
2999
2999
  this.pusher,
3000
3000
  "private-" + n,
3001
3001
  this.options
@@ -3084,7 +3084,7 @@ class it extends sn {
3084
3084
  this.pusher.disconnect();
3085
3085
  }
3086
3086
  }
3087
- class La extends sn {
3087
+ class La extends tn {
3088
3088
  constructor() {
3089
3089
  super(...arguments), this.channels = {};
3090
3090
  }
@@ -3124,7 +3124,7 @@ class La extends sn {
3124
3124
  * Get a channel instance by name.
3125
3125
  */
3126
3126
  channel(n) {
3127
- return this.channels[n] || (this.channels[n] = new Ns(
3127
+ return this.channels[n] || (this.channels[n] = new Fs(
3128
3128
  this.socket,
3129
3129
  n,
3130
3130
  this.options
@@ -3134,7 +3134,7 @@ class La extends sn {
3134
3134
  * Get a private channel instance by name.
3135
3135
  */
3136
3136
  privateChannel(n) {
3137
- return this.channels["private-" + n] || (this.channels["private-" + n] = new qs(
3137
+ return this.channels["private-" + n] || (this.channels["private-" + n] = new Ds(
3138
3138
  this.socket,
3139
3139
  "private-" + n,
3140
3140
  this.options
@@ -3206,7 +3206,7 @@ class La extends sn {
3206
3206
  this.socket.disconnect();
3207
3207
  }
3208
3208
  }
3209
- class Gn extends sn {
3209
+ class Xn extends tn {
3210
3210
  constructor() {
3211
3211
  super(...arguments), this.channels = {};
3212
3212
  }
@@ -3219,19 +3219,19 @@ class Gn extends sn {
3219
3219
  * Listen for an event on a channel instance.
3220
3220
  */
3221
3221
  listen(n, r, o) {
3222
- return new dt();
3222
+ return new ut();
3223
3223
  }
3224
3224
  /**
3225
3225
  * Get a channel instance by name.
3226
3226
  */
3227
3227
  channel(n) {
3228
- return new dt();
3228
+ return new ut();
3229
3229
  }
3230
3230
  /**
3231
3231
  * Get a private channel instance by name.
3232
3232
  */
3233
3233
  privateChannel(n) {
3234
- return new zs();
3234
+ return new Ns();
3235
3235
  }
3236
3236
  /**
3237
3237
  * Get a private encrypted channel instance by name.
@@ -3313,7 +3313,7 @@ class Ia {
3313
3313
  else if (this.options.broadcaster === "socket.io")
3314
3314
  this.connector = new La(this.options);
3315
3315
  else if (this.options.broadcaster === "null")
3316
- this.connector = new Gn(this.options);
3316
+ this.connector = new Xn(this.options);
3317
3317
  else if (typeof this.options.broadcaster == "function" && Aa(this.options.broadcaster))
3318
3318
  this.connector = new this.options.broadcaster(this.options);
3319
3319
  else
@@ -3377,7 +3377,7 @@ class Ia {
3377
3377
  );
3378
3378
  }
3379
3379
  connectorSupportsEncryptedPrivateChannels(n) {
3380
- return n instanceof it || n instanceof Gn;
3380
+ return n instanceof it || n instanceof Xn;
3381
3381
  }
3382
3382
  /**
3383
3383
  * Get the Socket ID for the connection.
@@ -3441,10 +3441,10 @@ class Ia {
3441
3441
  function Ua(e) {
3442
3442
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3443
3443
  }
3444
- var Ut = { exports: {} };
3445
- var Jn;
3444
+ var Lt = { exports: {} };
3445
+ var Wn;
3446
3446
  function Oa() {
3447
- return Jn || (Jn = 1, (function(e, n) {
3447
+ return Wn || (Wn = 1, (function(e, n) {
3448
3448
  (function(o, c) {
3449
3449
  e.exports = c();
3450
3450
  })(window, function() {
@@ -3540,9 +3540,9 @@ function Oa() {
3540
3540
  }, w.prototype.decode = function(p) {
3541
3541
  if (p.length === 0)
3542
3542
  return new Uint8Array(0);
3543
- for (var m = this._getPaddingLength(p), y = p.length - m, F = new Uint8Array(this.maxDecodedLength(y)), q = 0, J = 0, G = 0, te = 0, k = 0, L = 0, V = 0; J < y - 4; J += 4)
3544
- te = this._decodeChar(p.charCodeAt(J + 0)), k = this._decodeChar(p.charCodeAt(J + 1)), L = this._decodeChar(p.charCodeAt(J + 2)), V = this._decodeChar(p.charCodeAt(J + 3)), F[q++] = te << 2 | k >>> 4, F[q++] = k << 4 | L >>> 2, F[q++] = L << 6 | V, G |= te & d, G |= k & d, G |= L & d, G |= V & d;
3545
- if (J < y - 1 && (te = this._decodeChar(p.charCodeAt(J)), k = this._decodeChar(p.charCodeAt(J + 1)), F[q++] = te << 2 | k >>> 4, G |= te & d, G |= k & d), J < y - 2 && (L = this._decodeChar(p.charCodeAt(J + 2)), F[q++] = k << 4 | L >>> 2, G |= L & d), J < y - 3 && (V = this._decodeChar(p.charCodeAt(J + 3)), F[q++] = L << 6 | V, G |= V & d), G !== 0)
3543
+ for (var m = this._getPaddingLength(p), y = p.length - m, F = new Uint8Array(this.maxDecodedLength(y)), q = 0, J = 0, G = 0, te = 0, k = 0, I = 0, V = 0; J < y - 4; J += 4)
3544
+ te = this._decodeChar(p.charCodeAt(J + 0)), k = this._decodeChar(p.charCodeAt(J + 1)), I = this._decodeChar(p.charCodeAt(J + 2)), V = this._decodeChar(p.charCodeAt(J + 3)), F[q++] = te << 2 | k >>> 4, F[q++] = k << 4 | I >>> 2, F[q++] = I << 6 | V, G |= te & d, G |= k & d, G |= I & d, G |= V & d;
3545
+ if (J < y - 1 && (te = this._decodeChar(p.charCodeAt(J)), k = this._decodeChar(p.charCodeAt(J + 1)), F[q++] = te << 2 | k >>> 4, G |= te & d, G |= k & d), J < y - 2 && (I = this._decodeChar(p.charCodeAt(J + 2)), F[q++] = k << 4 | I >>> 2, G |= I & d), J < y - 3 && (V = this._decodeChar(p.charCodeAt(J + 3)), F[q++] = I << 6 | V, G |= V & d), G !== 0)
3546
3546
  throw new Error("Base64Coder: incorrect characters for decoding");
3547
3547
  return F;
3548
3548
  }, w.prototype._encodeByte = function(p) {
@@ -3742,14 +3742,14 @@ function Oa() {
3742
3742
  l.loading[t].push(a);
3743
3743
  else {
3744
3744
  l.loading[t] = [a];
3745
- var g = j.createScriptRequest(l.getPath(t, s)), S = l.receivers.create(function(x) {
3745
+ var g = j.createScriptRequest(l.getPath(t, s)), S = l.receivers.create(function(L) {
3746
3746
  if (l.receivers.remove(S), l.loading[t]) {
3747
3747
  var z = l.loading[t];
3748
3748
  delete l.loading[t];
3749
3749
  for (var Q = function(de) {
3750
3750
  de || g.cleanup();
3751
3751
  }, ee = 0; ee < z.length; ee++)
3752
- z[ee](x, Q);
3752
+ z[ee](L, Q);
3753
3753
  }
3754
3754
  });
3755
3755
  g.send(S);
@@ -3851,42 +3851,42 @@ function Oa() {
3851
3851
  for (var S in s.headers)
3852
3852
  g.setRequestHeader(S, s.headers[S]);
3853
3853
  if (s.headersProvider != null) {
3854
- let x = s.headersProvider();
3855
- for (var S in x)
3856
- g.setRequestHeader(S, x[S]);
3854
+ let L = s.headersProvider();
3855
+ for (var S in L)
3856
+ g.setRequestHeader(S, L[S]);
3857
3857
  }
3858
3858
  return g.onreadystatechange = function() {
3859
3859
  if (g.readyState === 4)
3860
3860
  if (g.status === 200) {
3861
- let x, z = !1;
3861
+ let L, z = !1;
3862
3862
  try {
3863
- x = JSON.parse(g.responseText), z = !0;
3863
+ L = JSON.parse(g.responseText), z = !0;
3864
3864
  } catch {
3865
3865
  l(new k(200, `JSON returned from ${a.toString()} endpoint was invalid, yet status code was 200. Data was: ${g.responseText}`), null);
3866
3866
  }
3867
- z && l(null, x);
3867
+ z && l(null, L);
3868
3868
  } else {
3869
- let x = "";
3869
+ let L = "";
3870
3870
  switch (a) {
3871
3871
  case w.UserAuthentication:
3872
- x = A.buildLogSuffix("authenticationEndpoint");
3872
+ L = A.buildLogSuffix("authenticationEndpoint");
3873
3873
  break;
3874
3874
  case w.ChannelAuthorization:
3875
- x = `Clients must be authorized to join private or presence channels. ${A.buildLogSuffix("authorizationEndpoint")}`;
3875
+ L = `Clients must be authorized to join private or presence channels. ${A.buildLogSuffix("authorizationEndpoint")}`;
3876
3876
  break;
3877
3877
  }
3878
- l(new k(g.status, `Unable to retrieve auth string from ${a.toString()} endpoint - received status: ${g.status} from ${s.endpoint}. ${x}`), null);
3878
+ l(new k(g.status, `Unable to retrieve auth string from ${a.toString()} endpoint - received status: ${g.status} from ${s.endpoint}. ${L}`), null);
3879
3879
  }
3880
3880
  }, g.send(t), g;
3881
3881
  };
3882
3882
  function H(i) {
3883
3883
  return B(fe(i));
3884
3884
  }
3885
- var X = String.fromCharCode, _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", I = function(i) {
3885
+ var X = String.fromCharCode, _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", x = function(i) {
3886
3886
  var t = i.charCodeAt(0);
3887
3887
  return t < 128 ? i : t < 2048 ? X(192 | t >>> 6) + X(128 | t & 63) : X(224 | t >>> 12 & 15) + X(128 | t >>> 6 & 63) + X(128 | t & 63);
3888
3888
  }, fe = function(i) {
3889
- return i.replace(/[^\x00-\x7F]/g, I);
3889
+ return i.replace(/[^\x00-\x7F]/g, x);
3890
3890
  }, Se = function(i) {
3891
3891
  var t = [0, 2, 1][i.length % 3], s = i.charCodeAt(0) << 16 | (i.length > 1 ? i.charCodeAt(1) : 0) << 8 | (i.length > 2 ? i.charCodeAt(2) : 0), a = [
3892
3892
  _.charAt(s >>> 18),
@@ -3954,12 +3954,12 @@ function Oa() {
3954
3954
  }
3955
3955
  return i;
3956
3956
  }
3957
- function rn() {
3957
+ function nn() {
3958
3958
  for (var i = ["Pusher"], t = 0; t < arguments.length; t++)
3959
3959
  typeof arguments[t] == "string" ? i.push(arguments[t]) : i.push(Qe(arguments[t]));
3960
3960
  return i.join(" : ");
3961
3961
  }
3962
- function ft(i, t) {
3962
+ function dt(i, t) {
3963
3963
  var s = Array.prototype.indexOf;
3964
3964
  if (i === null)
3965
3965
  return -1;
@@ -4038,16 +4038,16 @@ function Oa() {
4038
4038
  return typeof t == "object" && (t = Qe(t)), encodeURIComponent(H(t.toString()));
4039
4039
  });
4040
4040
  }
4041
- function Hs(i) {
4041
+ function js(i) {
4042
4042
  var t = Re(i, function(a) {
4043
4043
  return a !== void 0;
4044
4044
  }), s = se(Le(be(t)), oe.method("join", "=")).join("&");
4045
4045
  return s;
4046
4046
  }
4047
- function Bs(i) {
4047
+ function $s(i) {
4048
4048
  var t = [], s = [];
4049
4049
  return (function a(l, g) {
4050
- var S, x, z;
4050
+ var S, L, z;
4051
4051
  switch (typeof l) {
4052
4052
  case "object":
4053
4053
  if (!l)
@@ -4060,8 +4060,8 @@ function Oa() {
4060
4060
  z[S] = a(l[S], g + "[" + S + "]");
4061
4061
  else {
4062
4062
  z = {};
4063
- for (x in l)
4064
- Object.prototype.hasOwnProperty.call(l, x) && (z[x] = a(l[x], g + "[" + JSON.stringify(x) + "]"));
4063
+ for (L in l)
4064
+ Object.prototype.hasOwnProperty.call(l, L) && (z[L] = a(l[L], g + "[" + JSON.stringify(L) + "]"));
4065
4065
  }
4066
4066
  return z;
4067
4067
  case "number":
@@ -4075,10 +4075,10 @@ function Oa() {
4075
4075
  try {
4076
4076
  return JSON.stringify(i);
4077
4077
  } catch {
4078
- return JSON.stringify(Bs(i));
4078
+ return JSON.stringify($s(i));
4079
4079
  }
4080
4080
  }
4081
- class Vs {
4081
+ class Hs {
4082
4082
  constructor() {
4083
4083
  this.globalLog = (t) => {
4084
4084
  window.console && window.console.log && window.console.log(t);
@@ -4100,24 +4100,24 @@ function Oa() {
4100
4100
  window.console && window.console.error ? window.console.error(t) : this.globalLogWarn(t);
4101
4101
  }
4102
4102
  log(t, ...s) {
4103
- var a = rn.apply(this, arguments);
4104
- Tt.log ? Tt.log(a) : Tt.logToConsole && t.bind(this)(a);
4103
+ var a = nn.apply(this, arguments);
4104
+ Ct.log ? Ct.log(a) : Ct.logToConsole && t.bind(this)(a);
4105
4105
  }
4106
4106
  }
4107
- var ce = new Vs(), Xs = function(i, t, s, a, l) {
4107
+ var ce = new Hs(), Bs = function(i, t, s, a, l) {
4108
4108
  (s.headers !== void 0 || s.headersProvider != null) && ce.warn(`To send headers with the ${a.toString()} request, you must use AJAX, rather than JSONP.`);
4109
4109
  var g = i.nextAuthCallbackID.toString();
4110
4110
  i.nextAuthCallbackID++;
4111
- var S = i.getDocument(), x = S.createElement("script");
4111
+ var S = i.getDocument(), L = S.createElement("script");
4112
4112
  i.auth_callbacks[g] = function(ee) {
4113
4113
  l(null, ee);
4114
4114
  };
4115
4115
  var z = "Pusher.auth_callbacks['" + g + "']";
4116
- x.src = s.endpoint + "?callback=" + encodeURIComponent(z) + "&" + t;
4116
+ L.src = s.endpoint + "?callback=" + encodeURIComponent(z) + "&" + t;
4117
4117
  var Q = S.getElementsByTagName("head")[0] || S.documentElement;
4118
- Q.insertBefore(x, Q.firstChild);
4119
- }, Ws = Xs;
4120
- class Gs {
4118
+ Q.insertBefore(L, Q.firstChild);
4119
+ }, Vs = Bs;
4120
+ class Xs {
4121
4121
  constructor(t) {
4122
4122
  this.src = t;
4123
4123
  }
@@ -4137,13 +4137,13 @@ function Oa() {
4137
4137
  this.script && (this.script.onload = this.script.onerror = null, this.script.onreadystatechange = null), this.script && this.script.parentNode && this.script.parentNode.removeChild(this.script), this.errorScript && this.errorScript.parentNode && this.errorScript.parentNode.removeChild(this.errorScript), this.script = null, this.errorScript = null;
4138
4138
  }
4139
4139
  }
4140
- class Js {
4140
+ class Ws {
4141
4141
  constructor(t, s) {
4142
4142
  this.url = t, this.data = s;
4143
4143
  }
4144
4144
  send(t) {
4145
4145
  if (!this.request) {
4146
- var s = Hs(this.data), a = this.url + "/" + t.number + "?" + s;
4146
+ var s = js(this.data), a = this.url + "/" + t.number + "?" + s;
4147
4147
  this.request = j.createScriptRequest(a), this.request.send(t);
4148
4148
  }
4149
4149
  }
@@ -4151,52 +4151,52 @@ function Oa() {
4151
4151
  this.request && this.request.cleanup();
4152
4152
  }
4153
4153
  }
4154
- var Ks = function(i, t) {
4154
+ var Gs = function(i, t) {
4155
4155
  return function(s, a) {
4156
- var l = "http" + (t ? "s" : "") + "://", g = l + (i.host || i.options.host) + i.options.path, S = j.createJSONPRequest(g, s), x = j.ScriptReceivers.create(function(z, Q) {
4157
- d.remove(x), S.cleanup(), Q && Q.host && (i.host = Q.host), a && a(z, Q);
4156
+ var l = "http" + (t ? "s" : "") + "://", g = l + (i.host || i.options.host) + i.options.path, S = j.createJSONPRequest(g, s), L = j.ScriptReceivers.create(function(z, Q) {
4157
+ d.remove(L), S.cleanup(), Q && Q.host && (i.host = Q.host), a && a(z, Q);
4158
4158
  });
4159
- S.send(x);
4159
+ S.send(L);
4160
4160
  };
4161
- }, Qs = {
4161
+ }, Js = {
4162
4162
  name: "jsonp",
4163
- getAgent: Ks
4164
- }, Ys = Qs;
4165
- function pt(i, t, s) {
4163
+ getAgent: Gs
4164
+ }, Ks = Js;
4165
+ function ht(i, t, s) {
4166
4166
  var a = i + (t.useTLS ? "s" : ""), l = t.useTLS ? t.hostTLS : t.hostNonTLS;
4167
4167
  return a + "://" + l + s;
4168
4168
  }
4169
- function gt(i, t) {
4169
+ function ft(i, t) {
4170
4170
  var s = "/app/" + i, a = "?protocol=" + h.PROTOCOL + "&client=js&version=" + h.VERSION + (t ? "&" + t : "");
4171
4171
  return s + a;
4172
4172
  }
4173
- var Zs = {
4173
+ var Qs = {
4174
4174
  getInitial: function(i, t) {
4175
- var s = (t.httpPath || "") + gt(i, "flash=false");
4176
- return pt("ws", t, s);
4175
+ var s = (t.httpPath || "") + ft(i, "flash=false");
4176
+ return ht("ws", t, s);
4177
4177
  }
4178
- }, er = {
4178
+ }, Ys = {
4179
4179
  getInitial: function(i, t) {
4180
- var s = (t.httpPath || "/pusher") + gt(i);
4181
- return pt("http", t, s);
4180
+ var s = (t.httpPath || "/pusher") + ft(i);
4181
+ return ht("http", t, s);
4182
4182
  }
4183
- }, tr = {
4183
+ }, Zs = {
4184
4184
  getInitial: function(i, t) {
4185
- return pt("http", t, t.httpPath || "/pusher");
4185
+ return ht("http", t, t.httpPath || "/pusher");
4186
4186
  },
4187
4187
  getPath: function(i, t) {
4188
- return gt(i);
4188
+ return ft(i);
4189
4189
  }
4190
4190
  };
4191
- class nr {
4191
+ class er {
4192
4192
  constructor() {
4193
4193
  this._callbacks = {};
4194
4194
  }
4195
4195
  get(t) {
4196
- return this._callbacks[mt(t)];
4196
+ return this._callbacks[pt(t)];
4197
4197
  }
4198
4198
  add(t, s, a) {
4199
- var l = mt(t);
4199
+ var l = pt(t);
4200
4200
  this._callbacks[l] = this._callbacks[l] || [], this._callbacks[l].push({
4201
4201
  fn: s,
4202
4202
  context: a
@@ -4207,7 +4207,7 @@ function Oa() {
4207
4207
  this._callbacks = {};
4208
4208
  return;
4209
4209
  }
4210
- var l = t ? [mt(t)] : P(this._callbacks);
4210
+ var l = t ? [pt(t)] : P(this._callbacks);
4211
4211
  s || a ? this.removeCallback(l, s, a) : this.removeAllCallbacks(l);
4212
4212
  }
4213
4213
  removeCallback(t, s, a) {
@@ -4223,12 +4223,12 @@ function Oa() {
4223
4223
  }, this);
4224
4224
  }
4225
4225
  }
4226
- function mt(i) {
4226
+ function pt(i) {
4227
4227
  return "_" + i;
4228
4228
  }
4229
4229
  class Te {
4230
4230
  constructor(t) {
4231
- this.callbacks = new nr(), this.global_callbacks = [], this.failThrough = t;
4231
+ this.callbacks = new er(), this.global_callbacks = [], this.failThrough = t;
4232
4232
  }
4233
4233
  bind(t, s, a) {
4234
4234
  return this.callbacks.add(t, s, a), this;
@@ -4256,7 +4256,7 @@ function Oa() {
4256
4256
  return this;
4257
4257
  }
4258
4258
  }
4259
- class sr extends Te {
4259
+ class tr extends Te {
4260
4260
  constructor(t, s, a, l, g) {
4261
4261
  super(), this.initialize = j.transportConnectionInitializer, this.hooks = t, this.name = s, this.priority = a, this.key = l, this.options = g, this.state = "new", this.timeline = g.timeline, this.activityTimeout = g.activityTimeout, this.id = this.timeline.generateUniqueID();
4262
4262
  }
@@ -4343,11 +4343,11 @@ function Oa() {
4343
4343
  return this.hooks.isSupported(t);
4344
4344
  }
4345
4345
  createConnection(t, s, a, l) {
4346
- return new sr(this.hooks, t, s, a, l);
4346
+ return new tr(this.hooks, t, s, a, l);
4347
4347
  }
4348
4348
  }
4349
- var rr = new De({
4350
- urls: Zs,
4349
+ var nr = new De({
4350
+ urls: Qs,
4351
4351
  handlesActivityChecks: !1,
4352
4352
  supportsPing: !1,
4353
4353
  isInitialized: function() {
@@ -4359,32 +4359,32 @@ function Oa() {
4359
4359
  getSocket: function(i) {
4360
4360
  return j.createWebSocket(i);
4361
4361
  }
4362
- }), on = {
4363
- urls: er,
4362
+ }), sn = {
4363
+ urls: Ys,
4364
4364
  handlesActivityChecks: !1,
4365
4365
  supportsPing: !0,
4366
4366
  isInitialized: function() {
4367
4367
  return !0;
4368
4368
  }
4369
- }, an = ve({
4369
+ }, rn = ve({
4370
4370
  getSocket: function(i) {
4371
4371
  return j.HTTPFactory.createStreamingSocket(i);
4372
4372
  }
4373
- }, on), cn = ve({
4373
+ }, sn), on = ve({
4374
4374
  getSocket: function(i) {
4375
4375
  return j.HTTPFactory.createPollingSocket(i);
4376
4376
  }
4377
- }, on), un = {
4377
+ }, sn), an = {
4378
4378
  isSupported: function() {
4379
4379
  return j.isXHRSupported();
4380
4380
  }
4381
- }, ir = new De(ve({}, an, un)), or = new De(ve({}, cn, un)), ar = {
4382
- ws: rr,
4383
- xhr_streaming: ir,
4384
- xhr_polling: or
4385
- }, Ye = ar, cr = new De({
4381
+ }, sr = new De(ve({}, rn, an)), rr = new De(ve({}, on, an)), ir = {
4382
+ ws: nr,
4383
+ xhr_streaming: sr,
4384
+ xhr_polling: rr
4385
+ }, Ye = ir, or = new De({
4386
4386
  file: "sockjs",
4387
- urls: tr,
4387
+ urls: Zs,
4388
4388
  handlesActivityChecks: !0,
4389
4389
  supportsPing: !1,
4390
4390
  isSupported: function() {
@@ -4406,15 +4406,15 @@ function Oa() {
4406
4406
  path: t
4407
4407
  }));
4408
4408
  }
4409
- }), ln = {
4409
+ }), cn = {
4410
4410
  isSupported: function(i) {
4411
4411
  var t = j.isXDRSupported(i.useTLS);
4412
4412
  return t;
4413
4413
  }
4414
- }, ur = new De(ve({}, an, ln)), lr = new De(ve({}, cn, ln));
4415
- Ye.xdr_streaming = ur, Ye.xdr_polling = lr, Ye.sockjs = cr;
4416
- var dr = Ye;
4417
- class hr extends Te {
4414
+ }, ar = new De(ve({}, rn, cn)), cr = new De(ve({}, on, cn));
4415
+ Ye.xdr_streaming = ar, Ye.xdr_polling = cr, Ye.sockjs = or;
4416
+ var ur = Ye;
4417
+ class lr extends Te {
4418
4418
  constructor() {
4419
4419
  super();
4420
4420
  var t = this;
@@ -4428,8 +4428,8 @@ function Oa() {
4428
4428
  return window.navigator.onLine === void 0 ? !0 : window.navigator.onLine;
4429
4429
  }
4430
4430
  }
4431
- var fr = new hr();
4432
- class pr {
4431
+ var dr = new lr();
4432
+ class hr {
4433
4433
  constructor(t, s, a) {
4434
4434
  this.manager = t, this.transport = s, this.minPingDelay = a.minPingDelay, this.maxPingDelay = a.maxPingDelay, this.pingDelay = void 0;
4435
4435
  }
@@ -4437,8 +4437,8 @@ function Oa() {
4437
4437
  l = ve({}, l, {
4438
4438
  activityTimeout: this.pingDelay
4439
4439
  });
4440
- var g = this.transport.createConnection(t, s, a, l), S = null, x = function() {
4441
- g.unbind("open", x), g.bind("closed", z), S = oe.now();
4440
+ var g = this.transport.createConnection(t, s, a, l), S = null, L = function() {
4441
+ g.unbind("open", L), g.bind("closed", z), S = oe.now();
4442
4442
  }, z = (Q) => {
4443
4443
  if (g.unbind("closed", z), Q.code === 1002 || Q.code === 1003)
4444
4444
  this.manager.reportDeath();
@@ -4447,13 +4447,13 @@ function Oa() {
4447
4447
  ee < 2 * this.maxPingDelay && (this.manager.reportDeath(), this.pingDelay = Math.max(ee / 2, this.minPingDelay));
4448
4448
  }
4449
4449
  };
4450
- return g.bind("open", x), g;
4450
+ return g.bind("open", L), g;
4451
4451
  }
4452
4452
  isSupported(t) {
4453
4453
  return this.manager.isAlive() && this.transport.isSupported(t);
4454
4454
  }
4455
4455
  }
4456
- const dn = {
4456
+ const un = {
4457
4457
  decodeMessage: function(i) {
4458
4458
  try {
4459
4459
  var t = JSON.parse(i.data), s = t.data;
@@ -4476,7 +4476,7 @@ function Oa() {
4476
4476
  return JSON.stringify(i);
4477
4477
  },
4478
4478
  processHandshake: function(i) {
4479
- var t = dn.decodeMessage(i);
4479
+ var t = un.decodeMessage(i);
4480
4480
  if (t.event === "pusher:connection_established") {
4481
4481
  if (!t.data.activity_timeout)
4482
4482
  throw "No activity timeout specified in handshake";
@@ -4507,8 +4507,8 @@ function Oa() {
4507
4507
  } : null;
4508
4508
  }
4509
4509
  };
4510
- var Ie = dn;
4511
- class gr extends Te {
4510
+ var Ie = un;
4511
+ class fr extends Te {
4512
4512
  constructor(t, s) {
4513
4513
  super(), this.id = t, this.transport = s, this.activityTimeout = s.activityTimeout, this.bindListeners();
4514
4514
  }
@@ -4582,7 +4582,7 @@ function Oa() {
4582
4582
  a && this.emit("error", a), s && this.emit(s, { action: s, error: a });
4583
4583
  }
4584
4584
  }
4585
- class mr {
4585
+ class pr {
4586
4586
  constructor(t, s) {
4587
4587
  this.transport = t, this.callback = s, this.bindListeners();
4588
4588
  }
@@ -4600,7 +4600,7 @@ function Oa() {
4600
4600
  return;
4601
4601
  }
4602
4602
  s.action === "connected" ? this.finish("connected", {
4603
- connection: new gr(s.id, this.transport),
4603
+ connection: new fr(s.id, this.transport),
4604
4604
  activityTimeout: s.activityTimeout
4605
4605
  }) : (this.finish(s.action, { error: s.error }), this.transport.close());
4606
4606
  }, this.onClosed = (t) => {
@@ -4616,7 +4616,7 @@ function Oa() {
4616
4616
  this.callback(ve({ transport: this.transport, action: t }, s));
4617
4617
  }
4618
4618
  }
4619
- class vr {
4619
+ class gr {
4620
4620
  constructor(t, s) {
4621
4621
  this.timeline = t, this.options = s || {};
4622
4622
  }
@@ -4624,7 +4624,7 @@ function Oa() {
4624
4624
  this.timeline.isEmpty() || this.timeline.send(j.TimelineTransport.getAgent(this, t), s);
4625
4625
  }
4626
4626
  }
4627
- class vt extends Te {
4627
+ class gt extends Te {
4628
4628
  constructor(t, s) {
4629
4629
  super(function(a, l) {
4630
4630
  ce.debug("No callbacks on " + t + " for " + a);
@@ -4686,7 +4686,7 @@ function Oa() {
4686
4686
  this.subscriptionCancelled = !1;
4687
4687
  }
4688
4688
  }
4689
- class bt extends vt {
4689
+ class mt extends gt {
4690
4690
  authorize(t, s) {
4691
4691
  return this.pusher.config.channelAuthorizer({
4692
4692
  channelName: this.name,
@@ -4694,7 +4694,7 @@ function Oa() {
4694
4694
  }, s);
4695
4695
  }
4696
4696
  }
4697
- class br {
4697
+ class mr {
4698
4698
  constructor() {
4699
4699
  this.reset();
4700
4700
  }
@@ -4726,14 +4726,14 @@ function Oa() {
4726
4726
  this.members = {}, this.count = 0, this.myID = null, this.me = null;
4727
4727
  }
4728
4728
  }
4729
- var yr = function(i, t, s, a) {
4729
+ var vr = function(i, t, s, a) {
4730
4730
  function l(g) {
4731
4731
  return g instanceof s ? g : new s(function(S) {
4732
4732
  S(g);
4733
4733
  });
4734
4734
  }
4735
4735
  return new (s || (s = Promise))(function(g, S) {
4736
- function x(ee) {
4736
+ function L(ee) {
4737
4737
  try {
4738
4738
  Q(a.next(ee));
4739
4739
  } catch (de) {
@@ -4748,17 +4748,17 @@ function Oa() {
4748
4748
  }
4749
4749
  }
4750
4750
  function Q(ee) {
4751
- ee.done ? g(ee.value) : l(ee.value).then(x, z);
4751
+ ee.done ? g(ee.value) : l(ee.value).then(L, z);
4752
4752
  }
4753
4753
  Q((a = a.apply(i, t || [])).next());
4754
4754
  });
4755
4755
  };
4756
- class _r extends bt {
4756
+ class br extends mt {
4757
4757
  constructor(t, s) {
4758
- super(t, s), this.members = new br();
4758
+ super(t, s), this.members = new mr();
4759
4759
  }
4760
4760
  authorize(t, s) {
4761
- super.authorize(t, (a, l) => yr(this, void 0, void 0, function* () {
4761
+ super.authorize(t, (a, l) => vr(this, void 0, void 0, function* () {
4762
4762
  if (!a)
4763
4763
  if (l = l, l.channel_data != null) {
4764
4764
  var g = JSON.parse(l.channel_data);
@@ -4808,8 +4808,8 @@ function Oa() {
4808
4808
  this.members.reset(), super.disconnect();
4809
4809
  }
4810
4810
  }
4811
- var Sr = c(1), yt = c(0);
4812
- class Cr extends bt {
4811
+ var yr = c(1), vt = c(0);
4812
+ class _r extends mt {
4813
4813
  constructor(t, s, a) {
4814
4814
  super(t, s), this.key = null, this.nacl = a;
4815
4815
  }
@@ -4824,7 +4824,7 @@ function Oa() {
4824
4824
  s(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
4825
4825
  return;
4826
4826
  }
4827
- this.key = Object(yt.decode)(g), delete l.shared_secret, s(null, l);
4827
+ this.key = Object(vt.decode)(g), delete l.shared_secret, s(null, l);
4828
4828
  });
4829
4829
  }
4830
4830
  trigger(t, s) {
@@ -4847,21 +4847,21 @@ function Oa() {
4847
4847
  ce.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + s);
4848
4848
  return;
4849
4849
  }
4850
- let a = Object(yt.decode)(s.ciphertext);
4850
+ let a = Object(vt.decode)(s.ciphertext);
4851
4851
  if (a.length < this.nacl.secretbox.overheadLength) {
4852
4852
  ce.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${a.length}`);
4853
4853
  return;
4854
4854
  }
4855
- let l = Object(yt.decode)(s.nonce);
4855
+ let l = Object(vt.decode)(s.nonce);
4856
4856
  if (l.length < this.nacl.secretbox.nonceLength) {
4857
4857
  ce.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${l.length}`);
4858
4858
  return;
4859
4859
  }
4860
4860
  let g = this.nacl.secretbox.open(a, l, this.key);
4861
4861
  if (g === null) {
4862
- ce.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (S, x) => {
4862
+ ce.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (S, L) => {
4863
4863
  if (S) {
4864
- ce.error(`Failed to make a request to the authEndpoint: ${x}. Unable to fetch new key, so dropping encrypted event`);
4864
+ ce.error(`Failed to make a request to the authEndpoint: ${L}. Unable to fetch new key, so dropping encrypted event`);
4865
4865
  return;
4866
4866
  }
4867
4867
  if (g = this.nacl.secretbox.open(a, l, this.key), g === null) {
@@ -4875,7 +4875,7 @@ function Oa() {
4875
4875
  this.emit(t, this.getDataToEmit(g));
4876
4876
  }
4877
4877
  getDataToEmit(t) {
4878
- let s = Object(Sr.decode)(t);
4878
+ let s = Object(yr.decode)(t);
4879
4879
  try {
4880
4880
  return JSON.parse(s);
4881
4881
  } catch {
@@ -4883,7 +4883,7 @@ function Oa() {
4883
4883
  }
4884
4884
  }
4885
4885
  }
4886
- class wr extends Te {
4886
+ class Sr extends Te {
4887
4887
  constructor(t, s) {
4888
4888
  super(), this.state = "initialized", this.connection = null, this.key = t, this.options = s, this.timeline = this.options.timeline, this.usingTLS = this.options.useTLS, this.errorCallbacks = this.buildErrorCallbacks(), this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks), this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);
4889
4889
  var a = j.getNetwork();
@@ -5039,12 +5039,12 @@ function Oa() {
5039
5039
  return this.state === "connecting" || this.state === "connected";
5040
5040
  }
5041
5041
  }
5042
- class Tr {
5042
+ class Cr {
5043
5043
  constructor() {
5044
5044
  this.channels = {};
5045
5045
  }
5046
5046
  add(t, s) {
5047
- return this.channels[t] || (this.channels[t] = Er(t, s)), this.channels[t];
5047
+ return this.channels[t] || (this.channels[t] = wr(t, s)), this.channels[t];
5048
5048
  }
5049
5049
  all() {
5050
5050
  return D(this.channels);
@@ -5062,7 +5062,7 @@ function Oa() {
5062
5062
  });
5063
5063
  }
5064
5064
  }
5065
- function Er(i, t) {
5065
+ function wr(i, t) {
5066
5066
  if (i.indexOf("private-encrypted-") === 0) {
5067
5067
  if (t.config.nacl)
5068
5068
  return Ee.createEncryptedChannel(i, t, t.config.nacl);
@@ -5078,36 +5078,36 @@ function Oa() {
5078
5078
  return Ee.createChannel(i, t);
5079
5079
  }
5080
5080
  }
5081
- var Ar = {
5081
+ var Tr = {
5082
5082
  createChannels() {
5083
- return new Tr();
5083
+ return new Cr();
5084
5084
  },
5085
5085
  createConnectionManager(i, t) {
5086
- return new wr(i, t);
5086
+ return new Sr(i, t);
5087
5087
  },
5088
5088
  createChannel(i, t) {
5089
- return new vt(i, t);
5089
+ return new gt(i, t);
5090
5090
  },
5091
5091
  createPrivateChannel(i, t) {
5092
- return new bt(i, t);
5092
+ return new mt(i, t);
5093
5093
  },
5094
5094
  createPresenceChannel(i, t) {
5095
- return new _r(i, t);
5095
+ return new br(i, t);
5096
5096
  },
5097
5097
  createEncryptedChannel(i, t, s) {
5098
- return new Cr(i, t, s);
5098
+ return new _r(i, t, s);
5099
5099
  },
5100
5100
  createTimelineSender(i, t) {
5101
- return new vr(i, t);
5101
+ return new gr(i, t);
5102
5102
  },
5103
5103
  createHandshake(i, t) {
5104
- return new mr(i, t);
5104
+ return new pr(i, t);
5105
5105
  },
5106
5106
  createAssistantToTheTransportManager(i, t, s) {
5107
- return new pr(i, t, s);
5107
+ return new hr(i, t, s);
5108
5108
  }
5109
- }, Ee = Ar;
5110
- class hn {
5109
+ }, Ee = Tr;
5110
+ class ln {
5111
5111
  constructor(t) {
5112
5112
  this.options = t || {}, this.livesLeft = this.options.lives || 1 / 0;
5113
5113
  }
@@ -5132,10 +5132,10 @@ function Oa() {
5132
5132
  return we(this.strategies, oe.method("isSupported"));
5133
5133
  }
5134
5134
  connect(t, s) {
5135
- var a = this.strategies, l = 0, g = this.timeout, S = null, x = (z, Q) => {
5136
- Q ? s(null, Q) : (l = l + 1, this.loop && (l = l % a.length), l < a.length ? (g && (g = g * 2, this.timeoutLimit && (g = Math.min(g, this.timeoutLimit))), S = this.tryStrategy(a[l], t, { timeout: g, failFast: this.failFast }, x)) : s(!0));
5135
+ var a = this.strategies, l = 0, g = this.timeout, S = null, L = (z, Q) => {
5136
+ Q ? s(null, Q) : (l = l + 1, this.loop && (l = l % a.length), l < a.length ? (g && (g = g * 2, this.timeoutLimit && (g = Math.min(g, this.timeoutLimit))), S = this.tryStrategy(a[l], t, { timeout: g, failFast: this.failFast }, L)) : s(!0));
5137
5137
  };
5138
- return S = this.tryStrategy(a[l], t, { timeout: g, failFast: this.failFast }, x), {
5138
+ return S = this.tryStrategy(a[l], t, { timeout: g, failFast: this.failFast }, L), {
5139
5139
  abort: function() {
5140
5140
  S.abort();
5141
5141
  },
@@ -5148,19 +5148,19 @@ function Oa() {
5148
5148
  var g = null, S = null;
5149
5149
  return a.timeout > 0 && (g = new U(a.timeout, function() {
5150
5150
  S.abort(), l(!0);
5151
- })), S = t.connect(s, function(x, z) {
5152
- x && g && g.isRunning() && !a.failFast || (g && g.ensureAborted(), l(x, z));
5151
+ })), S = t.connect(s, function(L, z) {
5152
+ L && g && g.isRunning() && !a.failFast || (g && g.ensureAborted(), l(L, z));
5153
5153
  }), {
5154
5154
  abort: function() {
5155
5155
  g && g.ensureAborted(), S.abort();
5156
5156
  },
5157
- forceMinPriority: function(x) {
5158
- S.forceMinPriority(x);
5157
+ forceMinPriority: function(L) {
5158
+ S.forceMinPriority(L);
5159
5159
  }
5160
5160
  };
5161
5161
  }
5162
5162
  }
5163
- class _t {
5163
+ class bt {
5164
5164
  constructor(t) {
5165
5165
  this.strategies = t;
5166
5166
  }
@@ -5168,26 +5168,26 @@ function Oa() {
5168
5168
  return we(this.strategies, oe.method("isSupported"));
5169
5169
  }
5170
5170
  connect(t, s) {
5171
- return Rr(this.strategies, t, function(a, l) {
5171
+ return Er(this.strategies, t, function(a, l) {
5172
5172
  return function(g, S) {
5173
5173
  if (l[a].error = g, g) {
5174
- Pr(l) && s(!0);
5174
+ Ar(l) && s(!0);
5175
5175
  return;
5176
5176
  }
5177
- O(l, function(x) {
5178
- x.forceMinPriority(S.transport.priority);
5177
+ O(l, function(L) {
5178
+ L.forceMinPriority(S.transport.priority);
5179
5179
  }), s(null, S);
5180
5180
  };
5181
5181
  });
5182
5182
  }
5183
5183
  }
5184
- function Rr(i, t, s) {
5185
- var a = se(i, function(l, g, S, x) {
5186
- return l.connect(t, s(g, x));
5184
+ function Er(i, t, s) {
5185
+ var a = se(i, function(l, g, S, L) {
5186
+ return l.connect(t, s(g, L));
5187
5187
  });
5188
5188
  return {
5189
5189
  abort: function() {
5190
- O(a, Mr);
5190
+ O(a, Rr);
5191
5191
  },
5192
5192
  forceMinPriority: function(l) {
5193
5193
  O(a, function(g) {
@@ -5196,15 +5196,15 @@ function Oa() {
5196
5196
  }
5197
5197
  };
5198
5198
  }
5199
- function Pr(i) {
5199
+ function Ar(i) {
5200
5200
  return ge(i, function(t) {
5201
5201
  return !!t.error;
5202
5202
  });
5203
5203
  }
5204
- function Mr(i) {
5204
+ function Rr(i) {
5205
5205
  !i.error && !i.aborted && (i.abort(), i.aborted = !0);
5206
5206
  }
5207
- class kr {
5207
+ class Pr {
5208
5208
  constructor(t, s, a) {
5209
5209
  this.strategy = t, this.transports = s, this.ttl = a.ttl || 1800 * 1e3, this.usingTLS = a.useTLS, this.timeline = a.timeline;
5210
5210
  }
@@ -5212,20 +5212,20 @@ function Oa() {
5212
5212
  return this.strategy.isSupported();
5213
5213
  }
5214
5214
  connect(t, s) {
5215
- var a = this.usingTLS, l = xr(a), g = l && l.cacheSkipCount ? l.cacheSkipCount : 0, S = [this.strategy];
5215
+ var a = this.usingTLS, l = Mr(a), g = l && l.cacheSkipCount ? l.cacheSkipCount : 0, S = [this.strategy];
5216
5216
  if (l && l.timestamp + this.ttl >= oe.now()) {
5217
- var x = this.transports[l.transport];
5218
- x && (["ws", "wss"].includes(l.transport) || g > 3 ? (this.timeline.info({
5217
+ var L = this.transports[l.transport];
5218
+ L && (["ws", "wss"].includes(l.transport) || g > 3 ? (this.timeline.info({
5219
5219
  cached: !0,
5220
5220
  transport: l.transport,
5221
5221
  latency: l.latency
5222
- }), S.push(new Ue([x], {
5222
+ }), S.push(new Ue([L], {
5223
5223
  timeout: l.latency * 2 + 1e3,
5224
5224
  failFast: !0
5225
5225
  }))) : g++);
5226
5226
  }
5227
5227
  var z = oe.now(), Q = S.pop().connect(t, function ee(de, tt) {
5228
- de ? (fn(a), S.length > 0 ? (z = oe.now(), Q = S.pop().connect(t, ee)) : s(de)) : (Lr(a, tt.transport.name, oe.now() - z, g), s(null, tt));
5228
+ de ? (dn(a), S.length > 0 ? (z = oe.now(), Q = S.pop().connect(t, ee)) : s(de)) : (kr(a, tt.transport.name, oe.now() - z, g), s(null, tt));
5229
5229
  });
5230
5230
  return {
5231
5231
  abort: function() {
@@ -5237,26 +5237,26 @@ function Oa() {
5237
5237
  };
5238
5238
  }
5239
5239
  }
5240
- function St(i) {
5240
+ function yt(i) {
5241
5241
  return "pusherTransport" + (i ? "TLS" : "NonTLS");
5242
5242
  }
5243
- function xr(i) {
5243
+ function Mr(i) {
5244
5244
  var t = j.getLocalStorage();
5245
5245
  if (t)
5246
5246
  try {
5247
- var s = t[St(i)];
5247
+ var s = t[yt(i)];
5248
5248
  if (s)
5249
5249
  return JSON.parse(s);
5250
5250
  } catch {
5251
- fn(i);
5251
+ dn(i);
5252
5252
  }
5253
5253
  return null;
5254
5254
  }
5255
- function Lr(i, t, s, a) {
5255
+ function kr(i, t, s, a) {
5256
5256
  var l = j.getLocalStorage();
5257
5257
  if (l)
5258
5258
  try {
5259
- l[St(i)] = Qe({
5259
+ l[yt(i)] = Qe({
5260
5260
  timestamp: oe.now(),
5261
5261
  transport: t,
5262
5262
  latency: s,
@@ -5265,11 +5265,11 @@ function Oa() {
5265
5265
  } catch {
5266
5266
  }
5267
5267
  }
5268
- function fn(i) {
5268
+ function dn(i) {
5269
5269
  var t = j.getLocalStorage();
5270
5270
  if (t)
5271
5271
  try {
5272
- delete t[St(i)];
5272
+ delete t[yt(i)];
5273
5273
  } catch {
5274
5274
  }
5275
5275
  }
@@ -5307,7 +5307,7 @@ function Oa() {
5307
5307
  return a.connect(t, s);
5308
5308
  }
5309
5309
  }
5310
- class Ir {
5310
+ class xr {
5311
5311
  constructor(t) {
5312
5312
  this.strategy = t;
5313
5313
  }
@@ -5326,11 +5326,11 @@ function Oa() {
5326
5326
  return i.isSupported();
5327
5327
  };
5328
5328
  }
5329
- var Ur = function(i, t, s) {
5329
+ var Lr = function(i, t, s) {
5330
5330
  var a = {};
5331
- function l(Tn, Ii, Ui, Oi, Fi) {
5332
- var En = s(i, Tn, Ii, Ui, Oi, Fi);
5333
- return a[Tn] = En, En;
5331
+ function l(Cn, xi, Li, Ii, Ui) {
5332
+ var wn = s(i, Cn, xi, Li, Ii, Ui);
5333
+ return a[Cn] = wn, wn;
5334
5334
  }
5335
5335
  var g = Object.assign({}, t, {
5336
5336
  hostNonTLS: i.wsHost + ":" + i.wsPort,
@@ -5338,7 +5338,7 @@ function Oa() {
5338
5338
  httpPath: i.wsPath
5339
5339
  }), S = Object.assign({}, g, {
5340
5340
  useTLS: !0
5341
- }), x = Object.assign({}, t, {
5341
+ }), L = Object.assign({}, t, {
5342
5342
  hostNonTLS: i.httpHost + ":" + i.httpPort,
5343
5343
  hostTLS: i.httpHost + ":" + i.httpsPort,
5344
5344
  httpPath: i.httpPath
@@ -5346,43 +5346,43 @@ function Oa() {
5346
5346
  loop: !0,
5347
5347
  timeout: 15e3,
5348
5348
  timeoutLimit: 6e4
5349
- }, Q = new hn({
5349
+ }, Q = new ln({
5350
5350
  minPingDelay: 1e4,
5351
5351
  maxPingDelay: i.activityTimeout
5352
- }), ee = new hn({
5352
+ }), ee = new ln({
5353
5353
  lives: 2,
5354
5354
  minPingDelay: 1e4,
5355
5355
  maxPingDelay: i.activityTimeout
5356
- }), de = l("ws", "ws", 3, g, Q), tt = l("wss", "ws", 3, S, Q), Pi = l("sockjs", "sockjs", 1, x), bn = l("xhr_streaming", "xhr_streaming", 1, x, ee), Mi = l("xdr_streaming", "xdr_streaming", 1, x, ee), yn = l("xhr_polling", "xhr_polling", 1, x), ki = l("xdr_polling", "xdr_polling", 1, x), _n = new Ue([de], z), xi = new Ue([tt], z), Li = new Ue([Pi], z), Sn = new Ue([
5357
- new ze(je(bn), bn, Mi)
5358
- ], z), Cn = new Ue([
5359
- new ze(je(yn), yn, ki)
5360
- ], z), wn = new Ue([
5361
- new ze(je(Sn), new _t([
5362
- Sn,
5363
- new Ze(Cn, { delay: 4e3 })
5364
- ]), Cn)
5365
- ], z), Et = new ze(je(wn), wn, Li), At;
5366
- return t.useTLS ? At = new _t([
5367
- _n,
5368
- new Ze(Et, { delay: 2e3 })
5369
- ]) : At = new _t([
5370
- _n,
5371
- new Ze(xi, { delay: 2e3 }),
5372
- new Ze(Et, { delay: 5e3 })
5373
- ]), new kr(new Ir(new ze(je(de), At, Et)), a, {
5356
+ }), de = l("ws", "ws", 3, g, Q), tt = l("wss", "ws", 3, S, Q), Ai = l("sockjs", "sockjs", 1, L), mn = l("xhr_streaming", "xhr_streaming", 1, L, ee), Ri = l("xdr_streaming", "xdr_streaming", 1, L, ee), vn = l("xhr_polling", "xhr_polling", 1, L), Pi = l("xdr_polling", "xdr_polling", 1, L), bn = new Ue([de], z), Mi = new Ue([tt], z), ki = new Ue([Ai], z), yn = new Ue([
5357
+ new ze(je(mn), mn, Ri)
5358
+ ], z), _n = new Ue([
5359
+ new ze(je(vn), vn, Pi)
5360
+ ], z), Sn = new Ue([
5361
+ new ze(je(yn), new bt([
5362
+ yn,
5363
+ new Ze(_n, { delay: 4e3 })
5364
+ ]), _n)
5365
+ ], z), wt = new ze(je(Sn), Sn, ki), Tt;
5366
+ return t.useTLS ? Tt = new bt([
5367
+ bn,
5368
+ new Ze(wt, { delay: 2e3 })
5369
+ ]) : Tt = new bt([
5370
+ bn,
5371
+ new Ze(Mi, { delay: 2e3 }),
5372
+ new Ze(wt, { delay: 5e3 })
5373
+ ]), new Pr(new xr(new ze(je(de), Tt, wt)), a, {
5374
5374
  ttl: 18e5,
5375
5375
  timeline: t.timeline,
5376
5376
  useTLS: t.useTLS
5377
5377
  });
5378
- }, Or = Ur, Fr = (function() {
5378
+ }, Ir = Lr, Ur = (function() {
5379
5379
  var i = this;
5380
5380
  i.timeline.info(i.buildTimelineMessage({
5381
5381
  transport: i.name + (i.options.useTLS ? "s" : "")
5382
5382
  })), i.hooks.isInitialized() ? i.changeState("initialized") : i.hooks.file ? (i.changeState("initializing"), v.load(i.hooks.file, { useTLS: i.options.useTLS }, function(t, s) {
5383
5383
  i.hooks.isInitialized() ? (i.changeState("initialized"), s(!0)) : (t && i.onError(t), i.onClose(), s(!1));
5384
5384
  })) : i.onClose();
5385
- }), Dr = {
5385
+ }), Or = {
5386
5386
  getRequest: function(i) {
5387
5387
  var t = new window.XDomainRequest();
5388
5388
  return t.ontimeout = function() {
@@ -5398,9 +5398,9 @@ function Oa() {
5398
5398
  abortRequest: function(i) {
5399
5399
  i.ontimeout = i.onerror = i.onprogress = i.onload = null, i.abort();
5400
5400
  }
5401
- }, Nr = Dr;
5402
- const qr = 256 * 1024;
5403
- class zr extends Te {
5401
+ }, Fr = Or;
5402
+ const Dr = 256 * 1024;
5403
+ class Nr extends Te {
5404
5404
  constructor(t, s, a) {
5405
5405
  super(), this.hooks = t, this.method = s, this.url = a;
5406
5406
  }
@@ -5428,17 +5428,17 @@ function Oa() {
5428
5428
  return a !== -1 ? (this.position += a + 1, s.slice(0, a)) : null;
5429
5429
  }
5430
5430
  isBufferTooLong(t) {
5431
- return this.position === t.length && t.length > qr;
5431
+ return this.position === t.length && t.length > Dr;
5432
5432
  }
5433
5433
  }
5434
- var Ct;
5434
+ var _t;
5435
5435
  (function(i) {
5436
5436
  i[i.CONNECTING = 0] = "CONNECTING", i[i.OPEN = 1] = "OPEN", i[i.CLOSED = 3] = "CLOSED";
5437
- })(Ct || (Ct = {}));
5438
- var Oe = Ct, jr = 1;
5439
- class $r {
5437
+ })(_t || (_t = {}));
5438
+ var Oe = _t, qr = 1;
5439
+ class zr {
5440
5440
  constructor(t, s) {
5441
- this.hooks = t, this.session = gn(1e3) + "/" + Xr(8), this.location = Hr(s), this.readyState = Oe.CONNECTING, this.openStream();
5441
+ this.hooks = t, this.session = fn(1e3) + "/" + Br(8), this.location = jr(s), this.readyState = Oe.CONNECTING, this.openStream();
5442
5442
  }
5443
5443
  send(t) {
5444
5444
  return this.sendRaw(JSON.stringify([t]));
@@ -5452,7 +5452,7 @@ function Oa() {
5452
5452
  sendRaw(t) {
5453
5453
  if (this.readyState === Oe.OPEN)
5454
5454
  try {
5455
- return j.createSocketRequest("POST", pn(Br(this.location, this.session))).start(t), !0;
5455
+ return j.createSocketRequest("POST", hn($r(this.location, this.session))).start(t), !0;
5456
5456
  } catch {
5457
5457
  return !1;
5458
5458
  }
@@ -5495,7 +5495,7 @@ function Oa() {
5495
5495
  }
5496
5496
  }
5497
5497
  onOpen(t) {
5498
- this.readyState === Oe.CONNECTING ? (t && t.hostname && (this.location.base = Vr(this.location.base, t.hostname)), this.readyState = Oe.OPEN, this.onopen && this.onopen()) : this.onClose(1006, "Server lost session", !0);
5498
+ this.readyState === Oe.CONNECTING ? (t && t.hostname && (this.location.base = Hr(this.location.base, t.hostname)), this.readyState = Oe.OPEN, this.onopen && this.onopen()) : this.onClose(1006, "Server lost session", !0);
5499
5499
  }
5500
5500
  onEvent(t) {
5501
5501
  this.readyState === Oe.OPEN && this.onmessage && this.onmessage({ data: t });
@@ -5507,7 +5507,7 @@ function Oa() {
5507
5507
  this.onerror && this.onerror(t);
5508
5508
  }
5509
5509
  openStream() {
5510
- this.stream = j.createSocketRequest("POST", pn(this.hooks.getReceiveURL(this.location, this.session))), this.stream.bind("chunk", (t) => {
5510
+ this.stream = j.createSocketRequest("POST", hn(this.hooks.getReceiveURL(this.location, this.session))), this.stream.bind("chunk", (t) => {
5511
5511
  this.onChunk(t);
5512
5512
  }), this.stream.bind("finished", (t) => {
5513
5513
  this.hooks.onFinished(this, t);
@@ -5526,33 +5526,33 @@ function Oa() {
5526
5526
  this.stream && (this.stream.unbind_all(), this.stream.close(), this.stream = null);
5527
5527
  }
5528
5528
  }
5529
- function Hr(i) {
5529
+ function jr(i) {
5530
5530
  var t = /([^\?]*)\/*(\??.*)/.exec(i);
5531
5531
  return {
5532
5532
  base: t[1],
5533
5533
  queryString: t[2]
5534
5534
  };
5535
5535
  }
5536
- function Br(i, t) {
5536
+ function $r(i, t) {
5537
5537
  return i.base + "/" + t + "/xhr_send";
5538
5538
  }
5539
- function pn(i) {
5539
+ function hn(i) {
5540
5540
  var t = i.indexOf("?") === -1 ? "?" : "&";
5541
- return i + t + "t=" + +/* @__PURE__ */ new Date() + "&n=" + jr++;
5541
+ return i + t + "t=" + +/* @__PURE__ */ new Date() + "&n=" + qr++;
5542
5542
  }
5543
- function Vr(i, t) {
5543
+ function Hr(i, t) {
5544
5544
  var s = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(i);
5545
5545
  return s[1] + t + s[3];
5546
5546
  }
5547
- function gn(i) {
5547
+ function fn(i) {
5548
5548
  return j.randomInt(i);
5549
5549
  }
5550
- function Xr(i) {
5550
+ function Br(i) {
5551
5551
  for (var t = [], s = 0; s < i; s++)
5552
- t.push(gn(32).toString(32));
5552
+ t.push(fn(32).toString(32));
5553
5553
  return t.join("");
5554
5554
  }
5555
- var Wr = $r, Gr = {
5555
+ var Vr = zr, Xr = {
5556
5556
  getReceiveURL: function(i, t) {
5557
5557
  return i.base + "/" + t + "/xhr_streaming" + i.queryString;
5558
5558
  },
@@ -5565,7 +5565,7 @@ function Oa() {
5565
5565
  onFinished: function(i, t) {
5566
5566
  i.onClose(1006, "Connection interrupted (" + t + ")", !1);
5567
5567
  }
5568
- }, Jr = Gr, Kr = {
5568
+ }, Wr = Xr, Gr = {
5569
5569
  getReceiveURL: function(i, t) {
5570
5570
  return i.base + "/" + t + "/xhr" + i.queryString;
5571
5571
  },
@@ -5577,7 +5577,7 @@ function Oa() {
5577
5577
  onFinished: function(i, t) {
5578
5578
  t === 200 ? i.reconnect() : i.onClose(1006, "Connection interrupted (" + t + ")", !1);
5579
5579
  }
5580
- }, Qr = Kr, Yr = {
5580
+ }, Jr = Gr, Kr = {
5581
5581
  getRequest: function(i) {
5582
5582
  var t = j.getXHRAPI(), s = new t();
5583
5583
  return s.onreadystatechange = s.onprogress = function() {
@@ -5594,36 +5594,36 @@ function Oa() {
5594
5594
  abortRequest: function(i) {
5595
5595
  i.onreadystatechange = null, i.abort();
5596
5596
  }
5597
- }, Zr = Yr, ei = {
5597
+ }, Qr = Kr, Yr = {
5598
5598
  createStreamingSocket(i) {
5599
- return this.createSocket(Jr, i);
5599
+ return this.createSocket(Wr, i);
5600
5600
  },
5601
5601
  createPollingSocket(i) {
5602
- return this.createSocket(Qr, i);
5602
+ return this.createSocket(Jr, i);
5603
5603
  },
5604
5604
  createSocket(i, t) {
5605
- return new Wr(i, t);
5605
+ return new Vr(i, t);
5606
5606
  },
5607
5607
  createXHR(i, t) {
5608
- return this.createRequest(Zr, i, t);
5608
+ return this.createRequest(Qr, i, t);
5609
5609
  },
5610
5610
  createRequest(i, t, s) {
5611
- return new zr(i, t, s);
5611
+ return new Nr(i, t, s);
5612
5612
  }
5613
- }, mn = ei;
5614
- mn.createXDR = function(i, t) {
5615
- return this.createRequest(Nr, i, t);
5613
+ }, pn = Yr;
5614
+ pn.createXDR = function(i, t) {
5615
+ return this.createRequest(Fr, i, t);
5616
5616
  };
5617
- var ti = mn, ni = {
5617
+ var Zr = pn, ei = {
5618
5618
  nextAuthCallbackID: 1,
5619
5619
  auth_callbacks: {},
5620
5620
  ScriptReceivers: d,
5621
5621
  DependenciesReceivers: C,
5622
- getDefaultStrategy: Or,
5623
- Transports: dr,
5624
- transportConnectionInitializer: Fr,
5625
- HTTPFactory: ti,
5626
- TimelineTransport: Ys,
5622
+ getDefaultStrategy: Ir,
5623
+ Transports: ur,
5624
+ transportConnectionInitializer: Ur,
5625
+ HTTPFactory: Zr,
5626
+ TimelineTransport: Ks,
5627
5627
  getXHRAPI() {
5628
5628
  return window.XMLHttpRequest;
5629
5629
  },
@@ -5644,7 +5644,7 @@ function Oa() {
5644
5644
  return this.getDocument().location.protocol;
5645
5645
  },
5646
5646
  getAuthorizers() {
5647
- return { ajax: V, jsonp: Ws };
5647
+ return { ajax: V, jsonp: Vs };
5648
5648
  },
5649
5649
  onDocumentBody(i) {
5650
5650
  document.body ? i() : setTimeout(() => {
@@ -5652,10 +5652,10 @@ function Oa() {
5652
5652
  }, 0);
5653
5653
  },
5654
5654
  createJSONPRequest(i, t) {
5655
- return new Js(i, t);
5655
+ return new Ws(i, t);
5656
5656
  },
5657
5657
  createScriptRequest(i) {
5658
- return new Gs(i);
5658
+ return new Xs(i);
5659
5659
  },
5660
5660
  getLocalStorage() {
5661
5661
  try {
@@ -5675,7 +5675,7 @@ function Oa() {
5675
5675
  return new ActiveXObject("Microsoft.XMLHTTP");
5676
5676
  },
5677
5677
  getNetwork() {
5678
- return fr;
5678
+ return dr;
5679
5679
  },
5680
5680
  createWebSocket(i) {
5681
5681
  var t = this.getWebSocketAPI();
@@ -5707,12 +5707,12 @@ function Oa() {
5707
5707
  return (window.crypto || window.msCrypto).getRandomValues(new Uint32Array(1))[0] / Math.pow(2, 32);
5708
5708
  }() * i);
5709
5709
  }
5710
- }, j = ni, wt;
5710
+ }, j = ei, St;
5711
5711
  (function(i) {
5712
5712
  i[i.ERROR = 3] = "ERROR", i[i.INFO = 6] = "INFO", i[i.DEBUG = 7] = "DEBUG";
5713
- })(wt || (wt = {}));
5714
- var et = wt;
5715
- class si {
5713
+ })(St || (St = {}));
5714
+ var et = St;
5715
+ class ti {
5716
5716
  constructor(t, s, a) {
5717
5717
  this.key = t, this.session = s, this.events = [], this.options = a || {}, this.sent = 0, this.uniqueID = 0;
5718
5718
  }
@@ -5750,7 +5750,7 @@ function Oa() {
5750
5750
  return this.uniqueID++, this.uniqueID;
5751
5751
  }
5752
5752
  }
5753
- class ri {
5753
+ class ni {
5754
5754
  constructor(t, s, a, l) {
5755
5755
  this.name = t, this.priority = s, this.transport = a, this.options = l || {};
5756
5756
  }
@@ -5762,11 +5762,11 @@ function Oa() {
5762
5762
  connect(t, s) {
5763
5763
  if (this.isSupported()) {
5764
5764
  if (this.priority < t)
5765
- return vn(new F(), s);
5766
- } else return vn(new te(), s);
5765
+ return gn(new F(), s);
5766
+ } else return gn(new te(), s);
5767
5767
  var a = !1, l = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), g = null, S = function() {
5768
5768
  l.unbind("initialized", S), l.connect();
5769
- }, x = function() {
5769
+ }, L = function() {
5770
5770
  g = Ee.createHandshake(l, function(de) {
5771
5771
  a = !0, ee(), s(null, de);
5772
5772
  });
@@ -5777,9 +5777,9 @@ function Oa() {
5777
5777
  var de;
5778
5778
  de = Qe(l), s(new q(de));
5779
5779
  }, ee = function() {
5780
- l.unbind("initialized", S), l.unbind("open", x), l.unbind("error", z), l.unbind("closed", Q);
5780
+ l.unbind("initialized", S), l.unbind("open", L), l.unbind("error", z), l.unbind("closed", Q);
5781
5781
  };
5782
- return l.bind("initialized", S), l.bind("open", x), l.bind("error", z), l.bind("closed", Q), l.initialize(), {
5782
+ return l.bind("initialized", S), l.bind("open", L), l.bind("error", z), l.bind("closed", Q), l.initialize(), {
5783
5783
  abort: () => {
5784
5784
  a || (ee(), g ? g.close() : l.close());
5785
5785
  },
@@ -5789,7 +5789,7 @@ function Oa() {
5789
5789
  };
5790
5790
  }
5791
5791
  }
5792
- function vn(i, t) {
5792
+ function gn(i, t) {
5793
5793
  return oe.defer(function() {
5794
5794
  t(i);
5795
5795
  }), {
@@ -5799,14 +5799,14 @@ function Oa() {
5799
5799
  }
5800
5800
  };
5801
5801
  }
5802
- const { Transports: ii } = j;
5803
- var oi = function(i, t, s, a, l, g) {
5804
- var S = ii[s];
5802
+ const { Transports: si } = j;
5803
+ var ri = function(i, t, s, a, l, g) {
5804
+ var S = si[s];
5805
5805
  if (!S)
5806
5806
  throw new G(s);
5807
- var x = (!i.enabledTransports || ft(i.enabledTransports, t) !== -1) && (!i.disabledTransports || ft(i.disabledTransports, t) === -1), z;
5808
- return x ? (l = Object.assign({ ignoreNullOrigin: i.ignoreNullOrigin }, l), z = new ri(t, a, g ? g.getAssistant(S) : S, l)) : z = ai, z;
5809
- }, ai = {
5807
+ var L = (!i.enabledTransports || dt(i.enabledTransports, t) !== -1) && (!i.disabledTransports || dt(i.disabledTransports, t) === -1), z;
5808
+ return L ? (l = Object.assign({ ignoreNullOrigin: i.ignoreNullOrigin }, l), z = new ni(t, a, g ? g.getAssistant(S) : S, l)) : z = ii, z;
5809
+ }, ii = {
5810
5810
  isSupported: function() {
5811
5811
  return !1;
5812
5812
  },
@@ -5823,14 +5823,14 @@ function Oa() {
5823
5823
  };
5824
5824
  }
5825
5825
  };
5826
- function ci(i) {
5826
+ function oi(i) {
5827
5827
  if (i == null)
5828
5828
  throw "You must pass an options object";
5829
5829
  if (i.cluster == null)
5830
5830
  throw "Options object must provide a cluster";
5831
5831
  "disableStats" in i && ce.warn("The disableStats option is deprecated in favor of enableStats");
5832
5832
  }
5833
- const ui = (i, t) => {
5833
+ const ai = (i, t) => {
5834
5834
  var s = "socket_id=" + encodeURIComponent(i.socketId);
5835
5835
  for (var a in t.params)
5836
5836
  s += "&" + encodeURIComponent(a) + "=" + encodeURIComponent(t.params[a]);
@@ -5841,15 +5841,15 @@ function Oa() {
5841
5841
  }
5842
5842
  return s;
5843
5843
  };
5844
- var li = (i) => {
5844
+ var ci = (i) => {
5845
5845
  if (typeof j.getAuthorizers()[i.transport] > "u")
5846
5846
  throw `'${i.transport}' is not a recognized auth transport`;
5847
5847
  return (t, s) => {
5848
- const a = ui(t, i);
5848
+ const a = ai(t, i);
5849
5849
  j.getAuthorizers()[i.transport](j, a, i, w.UserAuthentication, s);
5850
5850
  };
5851
5851
  };
5852
- const di = (i, t) => {
5852
+ const ui = (i, t) => {
5853
5853
  var s = "socket_id=" + encodeURIComponent(i.socketId);
5854
5854
  s += "&channel_name=" + encodeURIComponent(i.channelName);
5855
5855
  for (var a in t.params)
@@ -5861,15 +5861,15 @@ function Oa() {
5861
5861
  }
5862
5862
  return s;
5863
5863
  };
5864
- var hi = (i) => {
5864
+ var li = (i) => {
5865
5865
  if (typeof j.getAuthorizers()[i.transport] > "u")
5866
5866
  throw `'${i.transport}' is not a recognized auth transport`;
5867
5867
  return (t, s) => {
5868
- const a = di(t, i);
5868
+ const a = ui(t, i);
5869
5869
  j.getAuthorizers()[i.transport](j, a, i, w.ChannelAuthorization, s);
5870
5870
  };
5871
5871
  };
5872
- const fi = (i, t, s) => {
5872
+ const di = (i, t, s) => {
5873
5873
  const a = {
5874
5874
  authTransport: t.transport,
5875
5875
  authEndpoint: t.endpoint,
@@ -5883,7 +5883,7 @@ function Oa() {
5883
5883
  s(S, a).authorize(l.socketId, g);
5884
5884
  };
5885
5885
  };
5886
- function pi(i, t) {
5886
+ function hi(i, t) {
5887
5887
  let s = {
5888
5888
  activityTimeout: i.activityTimeout || h.activityTimeout,
5889
5889
  cluster: i.cluster,
@@ -5896,46 +5896,46 @@ function Oa() {
5896
5896
  wsPath: i.wsPath || h.wsPath,
5897
5897
  wsPort: i.wsPort || h.wsPort,
5898
5898
  wssPort: i.wssPort || h.wssPort,
5899
- enableStats: yi(i),
5900
- httpHost: gi(i),
5901
- useTLS: bi(i),
5902
- wsHost: mi(i),
5903
- userAuthenticator: _i(i),
5904
- channelAuthorizer: Ci(i, t)
5899
+ enableStats: vi(i),
5900
+ httpHost: fi(i),
5901
+ useTLS: mi(i),
5902
+ wsHost: pi(i),
5903
+ userAuthenticator: bi(i),
5904
+ channelAuthorizer: _i(i, t)
5905
5905
  };
5906
5906
  return "disabledTransports" in i && (s.disabledTransports = i.disabledTransports), "enabledTransports" in i && (s.enabledTransports = i.enabledTransports), "ignoreNullOrigin" in i && (s.ignoreNullOrigin = i.ignoreNullOrigin), "timelineParams" in i && (s.timelineParams = i.timelineParams), "nacl" in i && (s.nacl = i.nacl), s;
5907
5907
  }
5908
- function gi(i) {
5908
+ function fi(i) {
5909
5909
  return i.httpHost ? i.httpHost : i.cluster ? `sockjs-${i.cluster}.pusher.com` : h.httpHost;
5910
5910
  }
5911
- function mi(i) {
5912
- return i.wsHost ? i.wsHost : vi(i.cluster);
5911
+ function pi(i) {
5912
+ return i.wsHost ? i.wsHost : gi(i.cluster);
5913
5913
  }
5914
- function vi(i) {
5914
+ function gi(i) {
5915
5915
  return `ws-${i}.pusher.com`;
5916
5916
  }
5917
- function bi(i) {
5917
+ function mi(i) {
5918
5918
  return j.getProtocol() === "https:" ? !0 : i.forceTLS !== !1;
5919
5919
  }
5920
- function yi(i) {
5920
+ function vi(i) {
5921
5921
  return "enableStats" in i ? i.enableStats : "disableStats" in i ? !i.disableStats : !1;
5922
5922
  }
5923
- function _i(i) {
5923
+ function bi(i) {
5924
5924
  const t = Object.assign(Object.assign({}, h.userAuthentication), i.userAuthentication);
5925
- return "customHandler" in t && t.customHandler != null ? t.customHandler : li(t);
5925
+ return "customHandler" in t && t.customHandler != null ? t.customHandler : ci(t);
5926
5926
  }
5927
- function Si(i, t) {
5927
+ function yi(i, t) {
5928
5928
  let s;
5929
5929
  return "channelAuthorization" in i ? s = Object.assign(Object.assign({}, h.channelAuthorization), i.channelAuthorization) : (s = {
5930
5930
  transport: i.authTransport || h.authTransport,
5931
5931
  endpoint: i.authEndpoint || h.authEndpoint
5932
- }, "auth" in i && ("params" in i.auth && (s.params = i.auth.params), "headers" in i.auth && (s.headers = i.auth.headers)), "authorizer" in i && (s.customHandler = fi(t, s, i.authorizer))), s;
5932
+ }, "auth" in i && ("params" in i.auth && (s.params = i.auth.params), "headers" in i.auth && (s.headers = i.auth.headers)), "authorizer" in i && (s.customHandler = di(t, s, i.authorizer))), s;
5933
5933
  }
5934
- function Ci(i, t) {
5935
- const s = Si(i, t);
5936
- return "customHandler" in s && s.customHandler != null ? s.customHandler : hi(s);
5934
+ function _i(i, t) {
5935
+ const s = yi(i, t);
5936
+ return "customHandler" in s && s.customHandler != null ? s.customHandler : li(s);
5937
5937
  }
5938
- class wi extends Te {
5938
+ class Si extends Te {
5939
5939
  constructor(t) {
5940
5940
  super(function(s, a) {
5941
5941
  ce.debug(`No callbacks on watchlist events for ${s}`);
@@ -5953,14 +5953,14 @@ function Oa() {
5953
5953
  });
5954
5954
  }
5955
5955
  }
5956
- function Ti() {
5956
+ function Ci() {
5957
5957
  let i, t;
5958
5958
  return { promise: new Promise((a, l) => {
5959
5959
  i = a, t = l;
5960
5960
  }), resolve: i, reject: t };
5961
5961
  }
5962
- var Ei = Ti;
5963
- class Ai extends Te {
5962
+ var wi = Ci;
5963
+ class Ti extends Te {
5964
5964
  constructor(t) {
5965
5965
  super(function(s, a) {
5966
5966
  ce.debug("No callbacks on user for " + s);
@@ -5975,7 +5975,7 @@ function Oa() {
5975
5975
  });
5976
5976
  }, this.pusher = t, this.pusher.connection.bind("state_change", ({ previous: s, current: a }) => {
5977
5977
  s !== "connected" && a === "connected" && this._signin(), s === "connected" && a !== "connected" && (this._cleanup(), this._newSigninPromiseIfNeeded());
5978
- }), this.watchlist = new wi(t), this.pusher.connection.bind("message", (s) => {
5978
+ }), this.watchlist = new Si(t), this.pusher.connection.bind("message", (s) => {
5979
5979
  var a = s.event;
5980
5980
  a === "pusher:signin_success" && this._onSigninSuccess(s.data), this.serverToUserChannel && this.serverToUserChannel.name === s.channel && this.serverToUserChannel.handleEvent(s);
5981
5981
  });
@@ -6005,7 +6005,7 @@ function Oa() {
6005
6005
  const t = (s) => {
6006
6006
  s.subscriptionPending && s.subscriptionCancelled ? s.reinstateSubscription() : !s.subscriptionPending && this.pusher.connection.state === "connected" && s.subscribe();
6007
6007
  };
6008
- this.serverToUserChannel = new vt(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((s, a) => {
6008
+ this.serverToUserChannel = new gt(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((s, a) => {
6009
6009
  s.indexOf("pusher_internal:") === 0 || s.indexOf("pusher:") === 0 || this.emit(s, a);
6010
6010
  }), t(this.serverToUserChannel);
6011
6011
  }
@@ -6015,7 +6015,7 @@ function Oa() {
6015
6015
  _newSigninPromiseIfNeeded() {
6016
6016
  if (!this.signin_requested || this.signinDonePromise && !this.signinDonePromise.done)
6017
6017
  return;
6018
- const { promise: t, resolve: s } = Ei();
6018
+ const { promise: t, resolve: s } = wi();
6019
6019
  t.done = !1;
6020
6020
  const a = () => {
6021
6021
  t.done = !0;
@@ -6035,7 +6035,7 @@ function Oa() {
6035
6035
  }));
6036
6036
  }
6037
6037
  constructor(t, s) {
6038
- Ri(t), ci(s), this.key = t, this.config = pi(s, this), this.channels = Ee.createChannels(), this.global_emitter = new Te(), this.sessionID = j.randomInt(1e9), this.timeline = new si(this.key, this.sessionID, {
6038
+ Ei(t), oi(s), this.key = t, this.config = hi(s, this), this.channels = Ee.createChannels(), this.global_emitter = new Te(), this.sessionID = j.randomInt(1e9), this.timeline = new ti(this.key, this.sessionID, {
6039
6039
  cluster: this.config.cluster,
6040
6040
  features: me.getClientFeatures(),
6041
6041
  params: this.config.timelineParams || {},
@@ -6046,7 +6046,7 @@ function Oa() {
6046
6046
  host: this.config.statsHost,
6047
6047
  path: "/timeline/v2/" + j.TimelineTransport.name
6048
6048
  }));
6049
- var a = (l) => j.getDefaultStrategy(this.config, l, oi);
6049
+ var a = (l) => j.getDefaultStrategy(this.config, l, ri);
6050
6050
  this.connection = Ee.createConnectionManager(this.key, {
6051
6051
  getStrategy: a,
6052
6052
  timeline: this.timeline,
@@ -6059,8 +6059,8 @@ function Oa() {
6059
6059
  }), this.connection.bind("message", (l) => {
6060
6060
  var g = l.event, S = g.indexOf("pusher_internal:") === 0;
6061
6061
  if (l.channel) {
6062
- var x = this.channel(l.channel);
6063
- x && x.handleEvent(l);
6062
+ var L = this.channel(l.channel);
6063
+ L && L.handleEvent(l);
6064
6064
  }
6065
6065
  S || this.global_emitter.emit(l.event, l.data);
6066
6066
  }), this.connection.bind("connecting", () => {
@@ -6069,7 +6069,7 @@ function Oa() {
6069
6069
  this.channels.disconnect();
6070
6070
  }), this.connection.bind("error", (l) => {
6071
6071
  ce.warn(l);
6072
- }), me.instances.push(this), this.timeline.info({ instances: me.instances.length }), this.user = new Ai(this), me.isReady && this.connect();
6072
+ }), me.instances.push(this), this.timeline.info({ instances: me.instances.length }), this.user = new Ti(this), me.isReady && this.connect();
6073
6073
  }
6074
6074
  channel(t) {
6075
6075
  return this.channels.find(t);
@@ -6127,8 +6127,8 @@ function Oa() {
6127
6127
  }
6128
6128
  }
6129
6129
  me.instances = [], me.isReady = !1, me.logToConsole = !1, me.Runtime = j, me.ScriptReceivers = j.ScriptReceivers, me.DependenciesReceivers = j.DependenciesReceivers, me.auth_callbacks = j.auth_callbacks;
6130
- var Tt = o.default = me;
6131
- function Ri(i) {
6130
+ var Ct = o.default = me;
6131
+ function Ei(i) {
6132
6132
  if (i == null)
6133
6133
  throw "You must pass your app key when you instantiate Pusher.";
6134
6134
  }
@@ -6138,7 +6138,7 @@ function Oa() {
6138
6138
  ])
6139
6139
  );
6140
6140
  });
6141
- })(Ut)), Ut.exports;
6141
+ })(Lt)), Lt.exports;
6142
6142
  }
6143
6143
  var Fa = Oa();
6144
6144
  const Da = /* @__PURE__ */ Ua(Fa), Na = "/v1/messenger/bootstrap", qa = 3e4, za = 3e4, ja = 5 * 6e4;
@@ -6232,13 +6232,13 @@ function Wa(e) {
6232
6232
  const r = n.data;
6233
6233
  return r?.code === "ACCOUNT_SUSPENDED" || r?.errors?.reason === "account_suspended" ? !0 : typeof r?.message == "string" && r.message.toLowerCase().includes("suspended");
6234
6234
  }
6235
- function Kn(e, n) {
6236
- if (e.headers instanceof An) {
6235
+ function Gn(e, n) {
6236
+ if (e.headers instanceof Tn) {
6237
6237
  e.headers.set("Authorization", `Bearer ${n}`), e.headers.set("Accept", "application/json"), e.headers.set("X-Requested-With", "XMLHttpRequest"), typeof FormData < "u" && e.data instanceof FormData && (e.headers.delete("Content-Type"), e.headers.delete("content-type"));
6238
6238
  return;
6239
6239
  }
6240
6240
  const r = ie(e.headers) ? e.headers : {};
6241
- e.headers = new An({
6241
+ e.headers = new Tn({
6242
6242
  ...r,
6243
6243
  Authorization: `Bearer ${n}`,
6244
6244
  Accept: "application/json",
@@ -6274,7 +6274,7 @@ function Ja(e, n) {
6274
6274
  const d = e.last_seen_at ?? e.lastSeenAt;
6275
6275
  return typeof d == "string" ? c.last_seen_at = d : d === null && (c.last_seen_at = null), c;
6276
6276
  }
6277
- function Qn(e) {
6277
+ function Jn(e) {
6278
6278
  if (!ie(e))
6279
6279
  return null;
6280
6280
  const n = Ge(e, "user_id", "userId"), r = Ge(e, "conversation_id", "conversationId");
@@ -6301,25 +6301,25 @@ function Ka(e) {
6301
6301
  function Qa(e) {
6302
6302
  return !ie(e) || !pe(e, "reaction") || typeof e.count != "number" ? !1 : Array.isArray(e.users) && e.users.every((n) => Ka(n));
6303
6303
  }
6304
- function Yn(e) {
6304
+ function Kn(e) {
6305
6305
  return ie(e) && ie(e.message) && pe(e.message, "id") && pe(e.message, "conversation_id") && pe(e.message, "author_id");
6306
6306
  }
6307
- function Zn(e) {
6307
+ function Qn(e) {
6308
6308
  return ie(e) && pe(e, "conversation_id") && pe(e, "user_id") && pe(e, "message_id");
6309
6309
  }
6310
- function es(e) {
6310
+ function Yn(e) {
6311
6311
  return ie(e) && pe(e, "conversation_id") && ie(e.message) && pe(e.message, "id");
6312
6312
  }
6313
- function ts(e) {
6313
+ function Zn(e) {
6314
6314
  return ie(e) && pe(e, "conversation_id") && pe(e, "message_id");
6315
6315
  }
6316
- function ns(e) {
6316
+ function es(e) {
6317
6317
  return ie(e) && pe(e, "conversation_id") && pe(e, "message_id") && Array.isArray(e.reactions) && e.reactions.every((n) => Qa(n));
6318
6318
  }
6319
- function ss(e) {
6319
+ function ts(e) {
6320
6320
  return ie(e) && pe(e, "conversation_id");
6321
6321
  }
6322
- function rs(e) {
6322
+ function ns(e) {
6323
6323
  return ie(e) && pe(e, "conversation_id") && pe(e, "removed_user_id");
6324
6324
  }
6325
6325
  function Fe(e, n, r, o) {
@@ -6329,7 +6329,7 @@ function Fe(e, n, r, o) {
6329
6329
  return e.listen(n, c), c;
6330
6330
  }
6331
6331
  function pc(e) {
6332
- const n = e.initializedEvent ?? "messenger-client:echo-initialized", r = e.bootstrapEndpoint ?? Na, o = e.bootstrapRefreshSkewMs ?? qa, c = e.presenceFreshnessTtlMs ?? ja, u = (e.createLogger ?? Zt())("MessengerEcho");
6332
+ const n = e.initializedEvent ?? "messenger-client:echo-initialized", r = e.bootstrapEndpoint ?? Na, o = e.bootstrapRefreshSkewMs ?? qa, c = e.presenceFreshnessTtlMs ?? ja, u = (e.createLogger ?? Qt())("MessengerEcho");
6333
6333
  typeof window < "u" && (window.Pusher = Da);
6334
6334
  let d = null, f = null, h = null, R = null, C = "disconnected", v = "available", E = null, b = null;
6335
6335
  const A = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Map(), m = (T) => {
@@ -6368,7 +6368,7 @@ function pc(e) {
6368
6368
  b = setTimeout(() => {
6369
6369
  V();
6370
6370
  }, D);
6371
- }, L = async (T = !1) => e.getSourceToken && G() === null || !T && v === "account_suspended" ? null : !T && te(d) ? d : !T && f !== null ? await f : (f = (async () => {
6371
+ }, I = async (T = !1) => e.getSourceToken && G() === null || !T && v === "account_suspended" ? null : !T && te(d) ? d : !T && f !== null ? await f : (f = (async () => {
6372
6372
  try {
6373
6373
  const D = await e.bootstrapClient.get(
6374
6374
  r,
@@ -6385,7 +6385,7 @@ function pc(e) {
6385
6385
  }), await f), V = async () => {
6386
6386
  const T = h !== null;
6387
6387
  try {
6388
- if (await L(!0), !T)
6388
+ if (await I(!0), !T)
6389
6389
  return;
6390
6390
  q(!1), await X(!0);
6391
6391
  } catch (P) {
@@ -6420,7 +6420,7 @@ function pc(e) {
6420
6420
  (O === "unavailable" || O === "failed" || O === "disconnected") && m("disconnected");
6421
6421
  }), P.state === "connected" && m("connected");
6422
6422
  }, X = async (T = !1) => !T && h !== null && te(d) ? h : !T && R !== null ? await R : (R = (async () => {
6423
- const D = await L(T);
6423
+ const D = await I(T);
6424
6424
  if (D === null)
6425
6425
  return null;
6426
6426
  h !== null && q(!1);
@@ -6445,7 +6445,7 @@ function pc(e) {
6445
6445
  return D.service.reverb.path && (se.wsPath = D.service.reverb.path), h = new Ia(se), H(h), m("connecting"), typeof window < "u" && window.dispatchEvent(new CustomEvent(n)), h;
6446
6446
  })().finally(() => {
6447
6447
  R = null;
6448
- }), await R), _ = $t.create({
6448
+ }), await R), _ = zt.create({
6449
6449
  timeout: e.requestTimeoutMs ?? za,
6450
6450
  withCredentials: !1,
6451
6451
  headers: {
@@ -6454,29 +6454,29 @@ function pc(e) {
6454
6454
  }
6455
6455
  });
6456
6456
  _.interceptors.request.use(async (T) => {
6457
- const P = await L();
6457
+ const P = await I();
6458
6458
  if (P === null)
6459
6459
  throw new Error("Messenger bootstrap is unavailable.");
6460
- return T.baseURL = P.service.apiBaseUrl, Kn(T, P.auth.token), T;
6460
+ return T.baseURL = P.service.apiBaseUrl, Gn(T, P.auth.token), T;
6461
6461
  }), _.interceptors.response.use(
6462
6462
  (T) => T,
6463
6463
  async (T) => {
6464
6464
  const P = T.config;
6465
6465
  if (T.response?.status === 401 && P && P._messengerRetry !== !0) {
6466
6466
  P._messengerRetry = !0;
6467
- const D = await L(!0);
6467
+ const D = await I(!0);
6468
6468
  if (D !== null)
6469
- return P.baseURL = D.service.apiBaseUrl, Kn(P, D.auth.token), await _(P);
6469
+ return P.baseURL = D.service.apiBaseUrl, Gn(P, D.auth.token), await _(P);
6470
6470
  }
6471
6471
  return Promise.reject(T);
6472
6472
  }
6473
6473
  );
6474
- const I = () => v === "account_suspended" ? null : h, fe = (T) => (A.add(T), T(C), () => {
6474
+ const x = () => v === "account_suspended" ? null : h, fe = (T) => (A.add(T), T(C), () => {
6475
6475
  A.delete(T);
6476
6476
  }), Se = (T) => (w.add(T), T(v), () => {
6477
6477
  w.delete(T);
6478
6478
  }), B = () => d?.auth.tenantId ?? "global", K = (T) => {
6479
- const P = Dt(T.ts)?.getTime() ?? Dt(T.last_seen_at)?.getTime() ?? null;
6479
+ const P = Ot(T.ts)?.getTime() ?? Ot(T.last_seen_at)?.getTime() ?? null;
6480
6480
  if (P === null)
6481
6481
  return !0;
6482
6482
  const D = `${T.tenant_scope ?? "global"}:${T.user_id}`, O = p.get(D);
@@ -6491,7 +6491,7 @@ function pc(e) {
6491
6491
  se - le.seenAt > c && p.delete(ae);
6492
6492
  return !0;
6493
6493
  }, N = (T) => {
6494
- const P = I();
6494
+ const P = x();
6495
6495
  if (!P || typeof P.join != "function")
6496
6496
  return;
6497
6497
  const D = P.join(`online-users.${B()}`), O = [
@@ -6522,13 +6522,13 @@ function pc(e) {
6522
6522
  };
6523
6523
  T.bind(se, Re), D.push({ event: se, handler: Re });
6524
6524
  }
6525
- return O("ConversationMessageSent", Yn, P.onMessageSent), O("ConversationMessageRead", Zn, P.onMessageRead), O("ConversationMessageEdited", es, P.onMessageEdited), O("ConversationMessageDeleted", ts, P.onMessageDeleted), O("MessageReactionToggled", ns, P.onReactionToggled), O("ConversationRequestAccepted", ss, P.onRequestAccepted), O("ConversationParticipantRemoved", rs, P.onParticipantRemoved), () => {
6525
+ return O("ConversationMessageSent", Kn, P.onMessageSent), O("ConversationMessageRead", Qn, P.onMessageRead), O("ConversationMessageEdited", Yn, P.onMessageEdited), O("ConversationMessageDeleted", Zn, P.onMessageDeleted), O("MessageReactionToggled", es, P.onReactionToggled), O("ConversationRequestAccepted", ts, P.onRequestAccepted), O("ConversationParticipantRemoved", ns, P.onParticipantRemoved), () => {
6526
6526
  for (const se of D)
6527
6527
  T.unbind(se.event, se.handler);
6528
6528
  };
6529
6529
  }
6530
6530
  const U = (T, P) => {
6531
- const D = I();
6531
+ const D = x();
6532
6532
  if (!D)
6533
6533
  return () => {
6534
6534
  };
@@ -6538,25 +6538,25 @@ function pc(e) {
6538
6538
  const ae = [];
6539
6539
  return P.onMessageSent && ae.push({
6540
6540
  event: ".ConversationMessageSent",
6541
- handler: Fe(O, ".ConversationMessageSent", Yn, P.onMessageSent)
6541
+ handler: Fe(O, ".ConversationMessageSent", Kn, P.onMessageSent)
6542
6542
  }), P.onMessageRead && ae.push({
6543
6543
  event: ".ConversationMessageRead",
6544
- handler: Fe(O, ".ConversationMessageRead", Zn, P.onMessageRead)
6544
+ handler: Fe(O, ".ConversationMessageRead", Qn, P.onMessageRead)
6545
6545
  }), P.onMessageEdited && ae.push({
6546
6546
  event: ".ConversationMessageEdited",
6547
- handler: Fe(O, ".ConversationMessageEdited", es, P.onMessageEdited)
6547
+ handler: Fe(O, ".ConversationMessageEdited", Yn, P.onMessageEdited)
6548
6548
  }), P.onMessageDeleted && ae.push({
6549
6549
  event: ".ConversationMessageDeleted",
6550
- handler: Fe(O, ".ConversationMessageDeleted", ts, P.onMessageDeleted)
6550
+ handler: Fe(O, ".ConversationMessageDeleted", Zn, P.onMessageDeleted)
6551
6551
  }), P.onReactionToggled && ae.push({
6552
6552
  event: ".MessageReactionToggled",
6553
- handler: Fe(O, ".MessageReactionToggled", ns, P.onReactionToggled)
6553
+ handler: Fe(O, ".MessageReactionToggled", es, P.onReactionToggled)
6554
6554
  }), P.onRequestAccepted && ae.push({
6555
6555
  event: ".ConversationRequestAccepted",
6556
- handler: Fe(O, ".ConversationRequestAccepted", ss, P.onRequestAccepted)
6556
+ handler: Fe(O, ".ConversationRequestAccepted", ts, P.onRequestAccepted)
6557
6557
  }), P.onParticipantRemoved && ae.push({
6558
6558
  event: ".ConversationParticipantRemoved",
6559
- handler: Fe(O, ".ConversationParticipantRemoved", rs, P.onParticipantRemoved)
6559
+ handler: Fe(O, ".ConversationParticipantRemoved", ns, P.onParticipantRemoved)
6560
6560
  }), () => {
6561
6561
  if (typeof O.stopListening == "function")
6562
6562
  for (const le of ae)
@@ -6568,7 +6568,7 @@ function pc(e) {
6568
6568
  const O = T.private(`typing-conversation.${P}`), se = /* @__PURE__ */ new Set(["start", "typing"]), ae = /* @__PURE__ */ new Set(["stop", "idle", "viewing"]), le = O.subscription;
6569
6569
  if (le) {
6570
6570
  const we = (ge) => {
6571
- const be = Qn(ge);
6571
+ const be = Jn(ge);
6572
6572
  if (be) {
6573
6573
  if (se.has(be.state)) {
6574
6574
  D.onTypingStart?.({
@@ -6594,7 +6594,7 @@ function pc(e) {
6594
6594
  };
6595
6595
  }
6596
6596
  const Re = [], Le = (we) => {
6597
- const ge = Qn(we);
6597
+ const ge = Jn(we);
6598
6598
  if (ge) {
6599
6599
  if (se.has(ge.state)) {
6600
6600
  D.onTypingStart?.({
@@ -6624,7 +6624,7 @@ function pc(e) {
6624
6624
  return {
6625
6625
  apiClient: _,
6626
6626
  initializedEvent: n,
6627
- getEcho: I,
6627
+ getEcho: x,
6628
6628
  waitForEcho: async () => v === "account_suspended" ? null : await X(),
6629
6629
  getConnectionStatus: () => C,
6630
6630
  getAccessState: () => v,
@@ -6638,95 +6638,95 @@ function pc(e) {
6638
6638
  subscribeToConversation: U,
6639
6639
  unsubscribeFromConversation: ne,
6640
6640
  subscribeToTyping: (T, P) => {
6641
- const D = ut();
6641
+ const D = x();
6642
6642
  if (D)
6643
6643
  return ue(D, T, P);
6644
6644
  let O = !1, se = null;
6645
6645
  const ae = () => {
6646
6646
  if (O)
6647
6647
  return;
6648
- const le = ut();
6649
- le && (se = ue(le, T, P), typeof window < "u" && window.removeEventListener(ct(), ae));
6648
+ const le = x();
6649
+ le && (se = ue(le, T, P), typeof window < "u" && window.removeEventListener(n, ae));
6650
6650
  };
6651
- return typeof window < "u" && window.addEventListener(ct(), ae), () => {
6652
- O = !0, typeof window < "u" && window.removeEventListener(ct(), ae), se?.();
6651
+ return typeof window < "u" && window.addEventListener(n, ae), () => {
6652
+ O = !0, typeof window < "u" && window.removeEventListener(n, ae), se?.();
6653
6653
  };
6654
6654
  },
6655
6655
  unsubscribeFromTyping: (T) => {
6656
- ut()?.leave(`typing-conversation.${T}`);
6656
+ h?.leave(`typing-conversation.${T}`);
6657
6657
  },
6658
6658
  clearRuntime: J
6659
6659
  };
6660
6660
  }
6661
6661
  export {
6662
- go as DEFAULT_PRESENCE_STALE_AFTER_MS,
6662
+ fo as DEFAULT_PRESENCE_STALE_AFTER_MS,
6663
6663
  hc as configureMessengerClient,
6664
6664
  pc as createMessengerEcho,
6665
6665
  W as getApi,
6666
6666
  ke as getAuthStore,
6667
- Rn as getConnectionStatus,
6667
+ En as getConnectionStatus,
6668
6668
  Ae as getEcho,
6669
- vs as getEchoConnectionStatus,
6669
+ gs as getEchoConnectionStatus,
6670
6670
  Je as getEchoInitializedEvent,
6671
6671
  Z as getErrorMessage,
6672
- Zt as getLoggerFactory,
6673
- Vt as getMainApi,
6674
- ut as getMainEcho,
6672
+ Qt as getLoggerFactory,
6673
+ Ht as getMainApi,
6674
+ jo as getMainEcho,
6675
6675
  $o as getMainEchoConnectionStatus,
6676
- ct as getMainEchoInitializedEvent,
6677
- uo as getMediaApi,
6678
- Ot as getMessagingAccessState,
6676
+ zo as getMainEchoInitializedEvent,
6677
+ ao as getMediaApi,
6678
+ It as getMessagingAccessState,
6679
6679
  ia as getPresenceRuntimeConfig,
6680
6680
  ca as hasConfiguredPresenceAuthTokenResolver,
6681
6681
  ic as hasResponse,
6682
6682
  vc as isAxiosError,
6683
6683
  rc as isError,
6684
- eo as isValidMessageDeletedEvent,
6685
- Zi as isValidMessageEditedEvent,
6686
- Yi as isValidMessageReadEvent,
6687
- Qi as isValidMessageSentEvent,
6688
- to as isValidReactionToggledEvent,
6689
- no as isValidRequestAcceptedEvent,
6684
+ Yi as isValidMessageDeletedEvent,
6685
+ Qi as isValidMessageEditedEvent,
6686
+ Ki as isValidMessageReadEvent,
6687
+ Ji as isValidMessageSentEvent,
6688
+ Zi as isValidReactionToggledEvent,
6689
+ eo as isValidRequestAcceptedEvent,
6690
6690
  Pe as messagingApi,
6691
- vo as normalizePresenceStatus,
6692
- ws as normalizePresenceTimestamp,
6693
- ht as onConnectionStatusChange,
6691
+ go as normalizePresenceStatus,
6692
+ Ss as normalizePresenceTimestamp,
6693
+ lt as onConnectionStatusChange,
6694
6694
  Ho as onMainEchoConnectionStatusChange,
6695
- ji as onMessagingAccessStateChange,
6696
- Dt as parsePresenceTimestamp,
6697
- $i as reconnectEcho,
6695
+ qi as onMessagingAccessStateChange,
6696
+ Ot as parsePresenceTimestamp,
6697
+ zi as reconnectEcho,
6698
6698
  Bo as reconnectMainEcho,
6699
- Ki as resetEchoRuntimeConfig,
6699
+ Gi as resetEchoRuntimeConfig,
6700
6700
  Jo as resetLoggerFactory,
6701
- oo as resetMainApiClient,
6701
+ ro as resetMainApiClient,
6702
6702
  Xo as resetMainEchoRuntimeConfig,
6703
- ro as resetMessagingApiClient,
6704
- co as resetMessagingAuthStoreResolver,
6705
- ho as resetMessagingMediaApi,
6703
+ no as resetMessagingApiClient,
6704
+ oo as resetMessagingAuthStoreResolver,
6705
+ uo as resetMessagingMediaApi,
6706
6706
  fc as resetMessengerClientConfig,
6707
6707
  aa as resetPresenceRuntimeConfig,
6708
- bo as resolveFreshPresenceStatus,
6709
- Nt as resolvePresenceSnapshot,
6710
- Ji as setEchoRuntimeConfig,
6708
+ mo as resolveFreshPresenceStatus,
6709
+ Ft as resolvePresenceSnapshot,
6710
+ Wi as setEchoRuntimeConfig,
6711
6711
  Go as setLoggerFactory,
6712
- io as setMainApiClient,
6712
+ so as setMainApiClient,
6713
6713
  Vo as setMainEchoRuntimeConfig,
6714
- so as setMessagingApiClient,
6715
- ao as setMessagingAuthStoreResolver,
6716
- lo as setMessagingMediaApi,
6714
+ to as setMessagingApiClient,
6715
+ io as setMessagingAuthStoreResolver,
6716
+ co as setMessagingMediaApi,
6717
6717
  oa as setPresenceRuntimeConfig,
6718
- Vi as subscribeToConversation,
6719
- Hi as subscribeToPresenceStatus,
6720
- Wi as subscribeToTyping,
6721
- Xi as unsubscribeFromConversation,
6722
- Bi as unsubscribeFromPresenceStatus,
6723
- Gi as unsubscribeFromTyping,
6718
+ Hi as subscribeToConversation,
6719
+ ji as subscribeToPresenceStatus,
6720
+ Vi as subscribeToTyping,
6721
+ Bi as unsubscribeFromConversation,
6722
+ $i as unsubscribeFromPresenceStatus,
6723
+ Xi as unsubscribeFromTyping,
6724
6724
  ac as useConnectionStatus,
6725
6725
  oc as useConversationChannel,
6726
6726
  cc as useGlobalMessaging,
6727
6727
  uc as useMessagingAccessState,
6728
- Qt as useMessagingStore,
6728
+ Jt as useMessagingStore,
6729
6729
  lc as usePresence,
6730
6730
  dc as useTypingChannel,
6731
- ms as waitForEcho
6731
+ ps as waitForEcho
6732
6732
  };