@articles-media/articles-dev-box 1.0.6 → 1.0.8

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.
@@ -0,0 +1,3793 @@
1
+ import { j as i } from "./jsx-runtime-tc70JA_2.js";
2
+ import * as ue from "react";
3
+ import { useRef as Q, useEffect as z, useMemo as Fe, useState as T, useCallback as X, useLayoutEffect as Tn, cloneElement as Wn } from "react";
4
+ import { t as L, c as he, a as An, b as sn, L as Ve } from "./toDate-DiBqlcLH.js";
5
+ import { u as Rn, a as $n, c as lt, b as ut, o as on, l as We, i as Fn, d as Ln, e as Ct, r as Bn, f as je, g as cn, h as Tt, j as ln, k as Yn, F as Wt, s as dt, m as Un, P as Hn, M as Ie } from "./Modal-CZ77qLgM.js";
6
+ import { g as In, c as ge, A as F } from "./Button-B5nVYPMZ.js";
7
+ import qn from "react-dom";
8
+ import { w as Vn, u as un, a as dn } from "./index-DLYx67wi.js";
9
+ let Xn = {};
10
+ function Je() {
11
+ return Xn;
12
+ }
13
+ function Le(e, t) {
14
+ const n = Je(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, a = L(e, t?.in), s = a.getDay(), o = (s < r ? 7 : 0) + s - r;
15
+ return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
16
+ }
17
+ function Qe(e, t) {
18
+ return Le(e, { ...t, weekStartsOn: 1 });
19
+ }
20
+ function fn(e, t) {
21
+ const n = L(e, t?.in), r = n.getFullYear(), a = he(n, 0);
22
+ a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0);
23
+ const s = Qe(a), o = he(n, 0);
24
+ o.setFullYear(r, 0, 4), o.setHours(0, 0, 0, 0);
25
+ const c = Qe(o);
26
+ return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= c.getTime() ? r : r - 1;
27
+ }
28
+ function At(e) {
29
+ const t = L(e), n = new Date(
30
+ Date.UTC(
31
+ t.getFullYear(),
32
+ t.getMonth(),
33
+ t.getDate(),
34
+ t.getHours(),
35
+ t.getMinutes(),
36
+ t.getSeconds(),
37
+ t.getMilliseconds()
38
+ )
39
+ );
40
+ return n.setUTCFullYear(t.getFullYear()), +e - +n;
41
+ }
42
+ function ht(e, ...t) {
43
+ const n = he.bind(
44
+ null,
45
+ t.find((r) => typeof r == "object")
46
+ );
47
+ return t.map(n);
48
+ }
49
+ function Rt(e, t) {
50
+ const n = L(e, t?.in);
51
+ return n.setHours(0, 0, 0, 0), n;
52
+ }
53
+ function zn(e, t, n) {
54
+ const [r, a] = ht(
55
+ n?.in,
56
+ e,
57
+ t
58
+ ), s = Rt(r), o = Rt(a), c = +s - At(s), l = +o - At(o);
59
+ return Math.round((c - l) / An);
60
+ }
61
+ function Qn(e, t) {
62
+ const n = fn(e, t), r = he(e, 0);
63
+ return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Qe(r);
64
+ }
65
+ function it(e, t) {
66
+ const n = +L(e) - +L(t);
67
+ return n < 0 ? -1 : n > 0 ? 1 : n;
68
+ }
69
+ function Gn(e) {
70
+ return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
71
+ }
72
+ function Jn(e) {
73
+ return !(!Gn(e) && typeof e != "number" || isNaN(+L(e)));
74
+ }
75
+ function Kn(e, t, n) {
76
+ const [r, a] = ht(
77
+ n?.in,
78
+ e,
79
+ t
80
+ ), s = r.getFullYear() - a.getFullYear(), o = r.getMonth() - a.getMonth();
81
+ return s * 12 + o;
82
+ }
83
+ function Zn(e, t) {
84
+ const n = L(e, t?.in);
85
+ return n.setHours(23, 59, 59, 999), n;
86
+ }
87
+ function er(e, t) {
88
+ const n = L(e, t?.in), r = n.getMonth();
89
+ return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
90
+ }
91
+ function tr(e, t) {
92
+ const n = L(e, t?.in);
93
+ return +Zn(n, t) == +er(n, t);
94
+ }
95
+ function nr(e, t, n) {
96
+ const [r, a, s] = ht(
97
+ n?.in,
98
+ e,
99
+ e,
100
+ t
101
+ ), o = it(a, s), c = Math.abs(
102
+ Kn(a, s)
103
+ );
104
+ if (c < 1) return 0;
105
+ a.getMonth() === 1 && a.getDate() > 27 && a.setDate(30), a.setMonth(a.getMonth() - o * c);
106
+ let l = it(a, s) === -o;
107
+ tr(r) && c === 1 && it(r, s) === 1 && (l = !1);
108
+ const f = o * (c - +l);
109
+ return f === 0 ? 0 : f;
110
+ }
111
+ function rr(e, t) {
112
+ const n = L(e, t?.in);
113
+ return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
114
+ }
115
+ const ar = {
116
+ lessThanXSeconds: {
117
+ one: "less than a second",
118
+ other: "less than {{count}} seconds"
119
+ },
120
+ xSeconds: {
121
+ one: "1 second",
122
+ other: "{{count}} seconds"
123
+ },
124
+ halfAMinute: "half a minute",
125
+ lessThanXMinutes: {
126
+ one: "less than a minute",
127
+ other: "less than {{count}} minutes"
128
+ },
129
+ xMinutes: {
130
+ one: "1 minute",
131
+ other: "{{count}} minutes"
132
+ },
133
+ aboutXHours: {
134
+ one: "about 1 hour",
135
+ other: "about {{count}} hours"
136
+ },
137
+ xHours: {
138
+ one: "1 hour",
139
+ other: "{{count}} hours"
140
+ },
141
+ xDays: {
142
+ one: "1 day",
143
+ other: "{{count}} days"
144
+ },
145
+ aboutXWeeks: {
146
+ one: "about 1 week",
147
+ other: "about {{count}} weeks"
148
+ },
149
+ xWeeks: {
150
+ one: "1 week",
151
+ other: "{{count}} weeks"
152
+ },
153
+ aboutXMonths: {
154
+ one: "about 1 month",
155
+ other: "about {{count}} months"
156
+ },
157
+ xMonths: {
158
+ one: "1 month",
159
+ other: "{{count}} months"
160
+ },
161
+ aboutXYears: {
162
+ one: "about 1 year",
163
+ other: "about {{count}} years"
164
+ },
165
+ xYears: {
166
+ one: "1 year",
167
+ other: "{{count}} years"
168
+ },
169
+ overXYears: {
170
+ one: "over 1 year",
171
+ other: "over {{count}} years"
172
+ },
173
+ almostXYears: {
174
+ one: "almost 1 year",
175
+ other: "almost {{count}} years"
176
+ }
177
+ }, ir = (e, t, n) => {
178
+ let r;
179
+ const a = ar[e];
180
+ return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
181
+ };
182
+ function st(e) {
183
+ return (t = {}) => {
184
+ const n = t.width ? String(t.width) : e.defaultWidth;
185
+ return e.formats[n] || e.formats[e.defaultWidth];
186
+ };
187
+ }
188
+ const sr = {
189
+ full: "EEEE, MMMM do, y",
190
+ long: "MMMM do, y",
191
+ medium: "MMM d, y",
192
+ short: "MM/dd/yyyy"
193
+ }, or = {
194
+ full: "h:mm:ss a zzzz",
195
+ long: "h:mm:ss a z",
196
+ medium: "h:mm:ss a",
197
+ short: "h:mm a"
198
+ }, cr = {
199
+ full: "{{date}} 'at' {{time}}",
200
+ long: "{{date}} 'at' {{time}}",
201
+ medium: "{{date}}, {{time}}",
202
+ short: "{{date}}, {{time}}"
203
+ }, lr = {
204
+ date: st({
205
+ formats: sr,
206
+ defaultWidth: "full"
207
+ }),
208
+ time: st({
209
+ formats: or,
210
+ defaultWidth: "full"
211
+ }),
212
+ dateTime: st({
213
+ formats: cr,
214
+ defaultWidth: "full"
215
+ })
216
+ }, ur = {
217
+ lastWeek: "'last' eeee 'at' p",
218
+ yesterday: "'yesterday at' p",
219
+ today: "'today at' p",
220
+ tomorrow: "'tomorrow at' p",
221
+ nextWeek: "eeee 'at' p",
222
+ other: "P"
223
+ }, dr = (e, t, n, r) => ur[e];
224
+ function Se(e) {
225
+ return (t, n) => {
226
+ const r = n?.context ? String(n.context) : "standalone";
227
+ let a;
228
+ if (r === "formatting" && e.formattingValues) {
229
+ const o = e.defaultFormattingWidth || e.defaultWidth, c = n?.width ? String(n.width) : o;
230
+ a = e.formattingValues[c] || e.formattingValues[o];
231
+ } else {
232
+ const o = e.defaultWidth, c = n?.width ? String(n.width) : e.defaultWidth;
233
+ a = e.values[c] || e.values[o];
234
+ }
235
+ const s = e.argumentCallback ? e.argumentCallback(t) : t;
236
+ return a[s];
237
+ };
238
+ }
239
+ const fr = {
240
+ narrow: ["B", "A"],
241
+ abbreviated: ["BC", "AD"],
242
+ wide: ["Before Christ", "Anno Domini"]
243
+ }, mr = {
244
+ narrow: ["1", "2", "3", "4"],
245
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
246
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
247
+ }, pr = {
248
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
249
+ abbreviated: [
250
+ "Jan",
251
+ "Feb",
252
+ "Mar",
253
+ "Apr",
254
+ "May",
255
+ "Jun",
256
+ "Jul",
257
+ "Aug",
258
+ "Sep",
259
+ "Oct",
260
+ "Nov",
261
+ "Dec"
262
+ ],
263
+ wide: [
264
+ "January",
265
+ "February",
266
+ "March",
267
+ "April",
268
+ "May",
269
+ "June",
270
+ "July",
271
+ "August",
272
+ "September",
273
+ "October",
274
+ "November",
275
+ "December"
276
+ ]
277
+ }, hr = {
278
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
279
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
280
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
281
+ wide: [
282
+ "Sunday",
283
+ "Monday",
284
+ "Tuesday",
285
+ "Wednesday",
286
+ "Thursday",
287
+ "Friday",
288
+ "Saturday"
289
+ ]
290
+ }, vr = {
291
+ narrow: {
292
+ am: "a",
293
+ pm: "p",
294
+ midnight: "mi",
295
+ noon: "n",
296
+ morning: "morning",
297
+ afternoon: "afternoon",
298
+ evening: "evening",
299
+ night: "night"
300
+ },
301
+ abbreviated: {
302
+ am: "AM",
303
+ pm: "PM",
304
+ midnight: "midnight",
305
+ noon: "noon",
306
+ morning: "morning",
307
+ afternoon: "afternoon",
308
+ evening: "evening",
309
+ night: "night"
310
+ },
311
+ wide: {
312
+ am: "a.m.",
313
+ pm: "p.m.",
314
+ midnight: "midnight",
315
+ noon: "noon",
316
+ morning: "morning",
317
+ afternoon: "afternoon",
318
+ evening: "evening",
319
+ night: "night"
320
+ }
321
+ }, gr = {
322
+ narrow: {
323
+ am: "a",
324
+ pm: "p",
325
+ midnight: "mi",
326
+ noon: "n",
327
+ morning: "in the morning",
328
+ afternoon: "in the afternoon",
329
+ evening: "in the evening",
330
+ night: "at night"
331
+ },
332
+ abbreviated: {
333
+ am: "AM",
334
+ pm: "PM",
335
+ midnight: "midnight",
336
+ noon: "noon",
337
+ morning: "in the morning",
338
+ afternoon: "in the afternoon",
339
+ evening: "in the evening",
340
+ night: "at night"
341
+ },
342
+ wide: {
343
+ am: "a.m.",
344
+ pm: "p.m.",
345
+ midnight: "midnight",
346
+ noon: "noon",
347
+ morning: "in the morning",
348
+ afternoon: "in the afternoon",
349
+ evening: "in the evening",
350
+ night: "at night"
351
+ }
352
+ }, br = (e, t) => {
353
+ const n = Number(e), r = n % 100;
354
+ if (r > 20 || r < 10)
355
+ switch (r % 10) {
356
+ case 1:
357
+ return n + "st";
358
+ case 2:
359
+ return n + "nd";
360
+ case 3:
361
+ return n + "rd";
362
+ }
363
+ return n + "th";
364
+ }, yr = {
365
+ ordinalNumber: br,
366
+ era: Se({
367
+ values: fr,
368
+ defaultWidth: "wide"
369
+ }),
370
+ quarter: Se({
371
+ values: mr,
372
+ defaultWidth: "wide",
373
+ argumentCallback: (e) => e - 1
374
+ }),
375
+ month: Se({
376
+ values: pr,
377
+ defaultWidth: "wide"
378
+ }),
379
+ day: Se({
380
+ values: hr,
381
+ defaultWidth: "wide"
382
+ }),
383
+ dayPeriod: Se({
384
+ values: vr,
385
+ defaultWidth: "wide",
386
+ formattingValues: gr,
387
+ defaultFormattingWidth: "wide"
388
+ })
389
+ };
390
+ function Ce(e) {
391
+ return (t, n = {}) => {
392
+ const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], s = t.match(a);
393
+ if (!s)
394
+ return null;
395
+ const o = s[0], c = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(c) ? xr(c, (m) => m.test(o)) : (
396
+ // [TODO] -- I challenge you to fix the type
397
+ wr(c, (m) => m.test(o))
398
+ );
399
+ let f;
400
+ f = e.valueCallback ? e.valueCallback(l) : l, f = n.valueCallback ? (
401
+ // [TODO] -- I challenge you to fix the type
402
+ n.valueCallback(f)
403
+ ) : f;
404
+ const u = t.slice(o.length);
405
+ return { value: f, rest: u };
406
+ };
407
+ }
408
+ function wr(e, t) {
409
+ for (const n in e)
410
+ if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
411
+ return n;
412
+ }
413
+ function xr(e, t) {
414
+ for (let n = 0; n < e.length; n++)
415
+ if (t(e[n]))
416
+ return n;
417
+ }
418
+ function Or(e) {
419
+ return (t, n = {}) => {
420
+ const r = t.match(e.matchPattern);
421
+ if (!r) return null;
422
+ const a = r[0], s = t.match(e.parsePattern);
423
+ if (!s) return null;
424
+ let o = e.valueCallback ? e.valueCallback(s[0]) : s[0];
425
+ o = n.valueCallback ? n.valueCallback(o) : o;
426
+ const c = t.slice(a.length);
427
+ return { value: o, rest: c };
428
+ };
429
+ }
430
+ const jr = /^(\d+)(th|st|nd|rd)?/i, Nr = /\d+/i, Mr = {
431
+ narrow: /^(b|a)/i,
432
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
433
+ wide: /^(before christ|before common era|anno domini|common era)/i
434
+ }, Pr = {
435
+ any: [/^b/i, /^(a|c)/i]
436
+ }, Dr = {
437
+ narrow: /^[1234]/i,
438
+ abbreviated: /^q[1234]/i,
439
+ wide: /^[1234](th|st|nd|rd)? quarter/i
440
+ }, _r = {
441
+ any: [/1/i, /2/i, /3/i, /4/i]
442
+ }, kr = {
443
+ narrow: /^[jfmasond]/i,
444
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
445
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
446
+ }, Er = {
447
+ narrow: [
448
+ /^j/i,
449
+ /^f/i,
450
+ /^m/i,
451
+ /^a/i,
452
+ /^m/i,
453
+ /^j/i,
454
+ /^j/i,
455
+ /^a/i,
456
+ /^s/i,
457
+ /^o/i,
458
+ /^n/i,
459
+ /^d/i
460
+ ],
461
+ any: [
462
+ /^ja/i,
463
+ /^f/i,
464
+ /^mar/i,
465
+ /^ap/i,
466
+ /^may/i,
467
+ /^jun/i,
468
+ /^jul/i,
469
+ /^au/i,
470
+ /^s/i,
471
+ /^o/i,
472
+ /^n/i,
473
+ /^d/i
474
+ ]
475
+ }, Sr = {
476
+ narrow: /^[smtwf]/i,
477
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
478
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
479
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
480
+ }, Cr = {
481
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
482
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
483
+ }, Tr = {
484
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
485
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
486
+ }, Wr = {
487
+ any: {
488
+ am: /^a/i,
489
+ pm: /^p/i,
490
+ midnight: /^mi/i,
491
+ noon: /^no/i,
492
+ morning: /morning/i,
493
+ afternoon: /afternoon/i,
494
+ evening: /evening/i,
495
+ night: /night/i
496
+ }
497
+ }, Ar = {
498
+ ordinalNumber: Or({
499
+ matchPattern: jr,
500
+ parsePattern: Nr,
501
+ valueCallback: (e) => parseInt(e, 10)
502
+ }),
503
+ era: Ce({
504
+ matchPatterns: Mr,
505
+ defaultMatchWidth: "wide",
506
+ parsePatterns: Pr,
507
+ defaultParseWidth: "any"
508
+ }),
509
+ quarter: Ce({
510
+ matchPatterns: Dr,
511
+ defaultMatchWidth: "wide",
512
+ parsePatterns: _r,
513
+ defaultParseWidth: "any",
514
+ valueCallback: (e) => e + 1
515
+ }),
516
+ month: Ce({
517
+ matchPatterns: kr,
518
+ defaultMatchWidth: "wide",
519
+ parsePatterns: Er,
520
+ defaultParseWidth: "any"
521
+ }),
522
+ day: Ce({
523
+ matchPatterns: Sr,
524
+ defaultMatchWidth: "wide",
525
+ parsePatterns: Cr,
526
+ defaultParseWidth: "any"
527
+ }),
528
+ dayPeriod: Ce({
529
+ matchPatterns: Tr,
530
+ defaultMatchWidth: "any",
531
+ parsePatterns: Wr,
532
+ defaultParseWidth: "any"
533
+ })
534
+ }, Rr = {
535
+ code: "en-US",
536
+ formatDistance: ir,
537
+ formatLong: lr,
538
+ formatRelative: dr,
539
+ localize: yr,
540
+ match: Ar,
541
+ options: {
542
+ weekStartsOn: 0,
543
+ firstWeekContainsDate: 1
544
+ }
545
+ };
546
+ function $r(e, t) {
547
+ const n = L(e, t?.in);
548
+ return zn(n, rr(n)) + 1;
549
+ }
550
+ function Fr(e, t) {
551
+ const n = L(e, t?.in), r = +Qe(n) - +Qn(n);
552
+ return Math.round(r / sn) + 1;
553
+ }
554
+ function mn(e, t) {
555
+ const n = L(e, t?.in), r = n.getFullYear(), a = Je(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, o = he(t?.in || e, 0);
556
+ o.setFullYear(r + 1, 0, s), o.setHours(0, 0, 0, 0);
557
+ const c = Le(o, t), l = he(t?.in || e, 0);
558
+ l.setFullYear(r, 0, s), l.setHours(0, 0, 0, 0);
559
+ const f = Le(l, t);
560
+ return +n >= +c ? r + 1 : +n >= +f ? r : r - 1;
561
+ }
562
+ function Lr(e, t) {
563
+ const n = Je(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, a = mn(e, t), s = he(t?.in || e, 0);
564
+ return s.setFullYear(a, 0, r), s.setHours(0, 0, 0, 0), Le(s, t);
565
+ }
566
+ function Br(e, t) {
567
+ const n = L(e, t?.in), r = +Le(n, t) - +Lr(n, t);
568
+ return Math.round(r / sn) + 1;
569
+ }
570
+ function P(e, t) {
571
+ const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
572
+ return n + r;
573
+ }
574
+ const le = {
575
+ // Year
576
+ y(e, t) {
577
+ const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
578
+ return P(t === "yy" ? r % 100 : r, t.length);
579
+ },
580
+ // Month
581
+ M(e, t) {
582
+ const n = e.getMonth();
583
+ return t === "M" ? String(n + 1) : P(n + 1, 2);
584
+ },
585
+ // Day of the month
586
+ d(e, t) {
587
+ return P(e.getDate(), t.length);
588
+ },
589
+ // AM or PM
590
+ a(e, t) {
591
+ const n = e.getHours() / 12 >= 1 ? "pm" : "am";
592
+ switch (t) {
593
+ case "a":
594
+ case "aa":
595
+ return n.toUpperCase();
596
+ case "aaa":
597
+ return n;
598
+ case "aaaaa":
599
+ return n[0];
600
+ default:
601
+ return n === "am" ? "a.m." : "p.m.";
602
+ }
603
+ },
604
+ // Hour [1-12]
605
+ h(e, t) {
606
+ return P(e.getHours() % 12 || 12, t.length);
607
+ },
608
+ // Hour [0-23]
609
+ H(e, t) {
610
+ return P(e.getHours(), t.length);
611
+ },
612
+ // Minute
613
+ m(e, t) {
614
+ return P(e.getMinutes(), t.length);
615
+ },
616
+ // Second
617
+ s(e, t) {
618
+ return P(e.getSeconds(), t.length);
619
+ },
620
+ // Fraction of second
621
+ S(e, t) {
622
+ const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
623
+ r * Math.pow(10, n - 3)
624
+ );
625
+ return P(a, t.length);
626
+ }
627
+ }, Oe = {
628
+ midnight: "midnight",
629
+ noon: "noon",
630
+ morning: "morning",
631
+ afternoon: "afternoon",
632
+ evening: "evening",
633
+ night: "night"
634
+ }, $t = {
635
+ // Era
636
+ G: function(e, t, n) {
637
+ const r = e.getFullYear() > 0 ? 1 : 0;
638
+ switch (t) {
639
+ // AD, BC
640
+ case "G":
641
+ case "GG":
642
+ case "GGG":
643
+ return n.era(r, { width: "abbreviated" });
644
+ // A, B
645
+ case "GGGGG":
646
+ return n.era(r, { width: "narrow" });
647
+ default:
648
+ return n.era(r, { width: "wide" });
649
+ }
650
+ },
651
+ // Year
652
+ y: function(e, t, n) {
653
+ if (t === "yo") {
654
+ const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
655
+ return n.ordinalNumber(a, { unit: "year" });
656
+ }
657
+ return le.y(e, t);
658
+ },
659
+ // Local week-numbering year
660
+ Y: function(e, t, n, r) {
661
+ const a = mn(e, r), s = a > 0 ? a : 1 - a;
662
+ if (t === "YY") {
663
+ const o = s % 100;
664
+ return P(o, 2);
665
+ }
666
+ return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : P(s, t.length);
667
+ },
668
+ // ISO week-numbering year
669
+ R: function(e, t) {
670
+ const n = fn(e);
671
+ return P(n, t.length);
672
+ },
673
+ // Extended year. This is a single number designating the year of this calendar system.
674
+ // The main difference between `y` and `u` localizers are B.C. years:
675
+ // | Year | `y` | `u` |
676
+ // |------|-----|-----|
677
+ // | AC 1 | 1 | 1 |
678
+ // | BC 1 | 1 | 0 |
679
+ // | BC 2 | 2 | -1 |
680
+ // Also `yy` always returns the last two digits of a year,
681
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
682
+ u: function(e, t) {
683
+ const n = e.getFullYear();
684
+ return P(n, t.length);
685
+ },
686
+ // Quarter
687
+ Q: function(e, t, n) {
688
+ const r = Math.ceil((e.getMonth() + 1) / 3);
689
+ switch (t) {
690
+ // 1, 2, 3, 4
691
+ case "Q":
692
+ return String(r);
693
+ // 01, 02, 03, 04
694
+ case "QQ":
695
+ return P(r, 2);
696
+ // 1st, 2nd, 3rd, 4th
697
+ case "Qo":
698
+ return n.ordinalNumber(r, { unit: "quarter" });
699
+ // Q1, Q2, Q3, Q4
700
+ case "QQQ":
701
+ return n.quarter(r, {
702
+ width: "abbreviated",
703
+ context: "formatting"
704
+ });
705
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
706
+ case "QQQQQ":
707
+ return n.quarter(r, {
708
+ width: "narrow",
709
+ context: "formatting"
710
+ });
711
+ default:
712
+ return n.quarter(r, {
713
+ width: "wide",
714
+ context: "formatting"
715
+ });
716
+ }
717
+ },
718
+ // Stand-alone quarter
719
+ q: function(e, t, n) {
720
+ const r = Math.ceil((e.getMonth() + 1) / 3);
721
+ switch (t) {
722
+ // 1, 2, 3, 4
723
+ case "q":
724
+ return String(r);
725
+ // 01, 02, 03, 04
726
+ case "qq":
727
+ return P(r, 2);
728
+ // 1st, 2nd, 3rd, 4th
729
+ case "qo":
730
+ return n.ordinalNumber(r, { unit: "quarter" });
731
+ // Q1, Q2, Q3, Q4
732
+ case "qqq":
733
+ return n.quarter(r, {
734
+ width: "abbreviated",
735
+ context: "standalone"
736
+ });
737
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
738
+ case "qqqqq":
739
+ return n.quarter(r, {
740
+ width: "narrow",
741
+ context: "standalone"
742
+ });
743
+ default:
744
+ return n.quarter(r, {
745
+ width: "wide",
746
+ context: "standalone"
747
+ });
748
+ }
749
+ },
750
+ // Month
751
+ M: function(e, t, n) {
752
+ const r = e.getMonth();
753
+ switch (t) {
754
+ case "M":
755
+ case "MM":
756
+ return le.M(e, t);
757
+ // 1st, 2nd, ..., 12th
758
+ case "Mo":
759
+ return n.ordinalNumber(r + 1, { unit: "month" });
760
+ // Jan, Feb, ..., Dec
761
+ case "MMM":
762
+ return n.month(r, {
763
+ width: "abbreviated",
764
+ context: "formatting"
765
+ });
766
+ // J, F, ..., D
767
+ case "MMMMM":
768
+ return n.month(r, {
769
+ width: "narrow",
770
+ context: "formatting"
771
+ });
772
+ default:
773
+ return n.month(r, { width: "wide", context: "formatting" });
774
+ }
775
+ },
776
+ // Stand-alone month
777
+ L: function(e, t, n) {
778
+ const r = e.getMonth();
779
+ switch (t) {
780
+ // 1, 2, ..., 12
781
+ case "L":
782
+ return String(r + 1);
783
+ // 01, 02, ..., 12
784
+ case "LL":
785
+ return P(r + 1, 2);
786
+ // 1st, 2nd, ..., 12th
787
+ case "Lo":
788
+ return n.ordinalNumber(r + 1, { unit: "month" });
789
+ // Jan, Feb, ..., Dec
790
+ case "LLL":
791
+ return n.month(r, {
792
+ width: "abbreviated",
793
+ context: "standalone"
794
+ });
795
+ // J, F, ..., D
796
+ case "LLLLL":
797
+ return n.month(r, {
798
+ width: "narrow",
799
+ context: "standalone"
800
+ });
801
+ default:
802
+ return n.month(r, { width: "wide", context: "standalone" });
803
+ }
804
+ },
805
+ // Local week of year
806
+ w: function(e, t, n, r) {
807
+ const a = Br(e, r);
808
+ return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : P(a, t.length);
809
+ },
810
+ // ISO week of year
811
+ I: function(e, t, n) {
812
+ const r = Fr(e);
813
+ return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : P(r, t.length);
814
+ },
815
+ // Day of the month
816
+ d: function(e, t, n) {
817
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : le.d(e, t);
818
+ },
819
+ // Day of year
820
+ D: function(e, t, n) {
821
+ const r = $r(e);
822
+ return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : P(r, t.length);
823
+ },
824
+ // Day of week
825
+ E: function(e, t, n) {
826
+ const r = e.getDay();
827
+ switch (t) {
828
+ // Tue
829
+ case "E":
830
+ case "EE":
831
+ case "EEE":
832
+ return n.day(r, {
833
+ width: "abbreviated",
834
+ context: "formatting"
835
+ });
836
+ // T
837
+ case "EEEEE":
838
+ return n.day(r, {
839
+ width: "narrow",
840
+ context: "formatting"
841
+ });
842
+ // Tu
843
+ case "EEEEEE":
844
+ return n.day(r, {
845
+ width: "short",
846
+ context: "formatting"
847
+ });
848
+ default:
849
+ return n.day(r, {
850
+ width: "wide",
851
+ context: "formatting"
852
+ });
853
+ }
854
+ },
855
+ // Local day of week
856
+ e: function(e, t, n, r) {
857
+ const a = e.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
858
+ switch (t) {
859
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
860
+ case "e":
861
+ return String(s);
862
+ // Padded numerical value
863
+ case "ee":
864
+ return P(s, 2);
865
+ // 1st, 2nd, ..., 7th
866
+ case "eo":
867
+ return n.ordinalNumber(s, { unit: "day" });
868
+ case "eee":
869
+ return n.day(a, {
870
+ width: "abbreviated",
871
+ context: "formatting"
872
+ });
873
+ // T
874
+ case "eeeee":
875
+ return n.day(a, {
876
+ width: "narrow",
877
+ context: "formatting"
878
+ });
879
+ // Tu
880
+ case "eeeeee":
881
+ return n.day(a, {
882
+ width: "short",
883
+ context: "formatting"
884
+ });
885
+ default:
886
+ return n.day(a, {
887
+ width: "wide",
888
+ context: "formatting"
889
+ });
890
+ }
891
+ },
892
+ // Stand-alone local day of week
893
+ c: function(e, t, n, r) {
894
+ const a = e.getDay(), s = (a - r.weekStartsOn + 8) % 7 || 7;
895
+ switch (t) {
896
+ // Numerical value (same as in `e`)
897
+ case "c":
898
+ return String(s);
899
+ // Padded numerical value
900
+ case "cc":
901
+ return P(s, t.length);
902
+ // 1st, 2nd, ..., 7th
903
+ case "co":
904
+ return n.ordinalNumber(s, { unit: "day" });
905
+ case "ccc":
906
+ return n.day(a, {
907
+ width: "abbreviated",
908
+ context: "standalone"
909
+ });
910
+ // T
911
+ case "ccccc":
912
+ return n.day(a, {
913
+ width: "narrow",
914
+ context: "standalone"
915
+ });
916
+ // Tu
917
+ case "cccccc":
918
+ return n.day(a, {
919
+ width: "short",
920
+ context: "standalone"
921
+ });
922
+ default:
923
+ return n.day(a, {
924
+ width: "wide",
925
+ context: "standalone"
926
+ });
927
+ }
928
+ },
929
+ // ISO day of week
930
+ i: function(e, t, n) {
931
+ const r = e.getDay(), a = r === 0 ? 7 : r;
932
+ switch (t) {
933
+ // 2
934
+ case "i":
935
+ return String(a);
936
+ // 02
937
+ case "ii":
938
+ return P(a, t.length);
939
+ // 2nd
940
+ case "io":
941
+ return n.ordinalNumber(a, { unit: "day" });
942
+ // Tue
943
+ case "iii":
944
+ return n.day(r, {
945
+ width: "abbreviated",
946
+ context: "formatting"
947
+ });
948
+ // T
949
+ case "iiiii":
950
+ return n.day(r, {
951
+ width: "narrow",
952
+ context: "formatting"
953
+ });
954
+ // Tu
955
+ case "iiiiii":
956
+ return n.day(r, {
957
+ width: "short",
958
+ context: "formatting"
959
+ });
960
+ default:
961
+ return n.day(r, {
962
+ width: "wide",
963
+ context: "formatting"
964
+ });
965
+ }
966
+ },
967
+ // AM or PM
968
+ a: function(e, t, n) {
969
+ const a = e.getHours() / 12 >= 1 ? "pm" : "am";
970
+ switch (t) {
971
+ case "a":
972
+ case "aa":
973
+ return n.dayPeriod(a, {
974
+ width: "abbreviated",
975
+ context: "formatting"
976
+ });
977
+ case "aaa":
978
+ return n.dayPeriod(a, {
979
+ width: "abbreviated",
980
+ context: "formatting"
981
+ }).toLowerCase();
982
+ case "aaaaa":
983
+ return n.dayPeriod(a, {
984
+ width: "narrow",
985
+ context: "formatting"
986
+ });
987
+ default:
988
+ return n.dayPeriod(a, {
989
+ width: "wide",
990
+ context: "formatting"
991
+ });
992
+ }
993
+ },
994
+ // AM, PM, midnight, noon
995
+ b: function(e, t, n) {
996
+ const r = e.getHours();
997
+ let a;
998
+ switch (r === 12 ? a = Oe.noon : r === 0 ? a = Oe.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
999
+ case "b":
1000
+ case "bb":
1001
+ return n.dayPeriod(a, {
1002
+ width: "abbreviated",
1003
+ context: "formatting"
1004
+ });
1005
+ case "bbb":
1006
+ return n.dayPeriod(a, {
1007
+ width: "abbreviated",
1008
+ context: "formatting"
1009
+ }).toLowerCase();
1010
+ case "bbbbb":
1011
+ return n.dayPeriod(a, {
1012
+ width: "narrow",
1013
+ context: "formatting"
1014
+ });
1015
+ default:
1016
+ return n.dayPeriod(a, {
1017
+ width: "wide",
1018
+ context: "formatting"
1019
+ });
1020
+ }
1021
+ },
1022
+ // in the morning, in the afternoon, in the evening, at night
1023
+ B: function(e, t, n) {
1024
+ const r = e.getHours();
1025
+ let a;
1026
+ switch (r >= 17 ? a = Oe.evening : r >= 12 ? a = Oe.afternoon : r >= 4 ? a = Oe.morning : a = Oe.night, t) {
1027
+ case "B":
1028
+ case "BB":
1029
+ case "BBB":
1030
+ return n.dayPeriod(a, {
1031
+ width: "abbreviated",
1032
+ context: "formatting"
1033
+ });
1034
+ case "BBBBB":
1035
+ return n.dayPeriod(a, {
1036
+ width: "narrow",
1037
+ context: "formatting"
1038
+ });
1039
+ default:
1040
+ return n.dayPeriod(a, {
1041
+ width: "wide",
1042
+ context: "formatting"
1043
+ });
1044
+ }
1045
+ },
1046
+ // Hour [1-12]
1047
+ h: function(e, t, n) {
1048
+ if (t === "ho") {
1049
+ let r = e.getHours() % 12;
1050
+ return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
1051
+ }
1052
+ return le.h(e, t);
1053
+ },
1054
+ // Hour [0-23]
1055
+ H: function(e, t, n) {
1056
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : le.H(e, t);
1057
+ },
1058
+ // Hour [0-11]
1059
+ K: function(e, t, n) {
1060
+ const r = e.getHours() % 12;
1061
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : P(r, t.length);
1062
+ },
1063
+ // Hour [1-24]
1064
+ k: function(e, t, n) {
1065
+ let r = e.getHours();
1066
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : P(r, t.length);
1067
+ },
1068
+ // Minute
1069
+ m: function(e, t, n) {
1070
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : le.m(e, t);
1071
+ },
1072
+ // Second
1073
+ s: function(e, t, n) {
1074
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : le.s(e, t);
1075
+ },
1076
+ // Fraction of second
1077
+ S: function(e, t) {
1078
+ return le.S(e, t);
1079
+ },
1080
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
1081
+ X: function(e, t, n) {
1082
+ const r = e.getTimezoneOffset();
1083
+ if (r === 0)
1084
+ return "Z";
1085
+ switch (t) {
1086
+ // Hours and optional minutes
1087
+ case "X":
1088
+ return Lt(r);
1089
+ // Hours, minutes and optional seconds without `:` delimiter
1090
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1091
+ // so this token always has the same output as `XX`
1092
+ case "XXXX":
1093
+ case "XX":
1094
+ return me(r);
1095
+ // Hours and minutes with `:` delimiter
1096
+ default:
1097
+ return me(r, ":");
1098
+ }
1099
+ },
1100
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
1101
+ x: function(e, t, n) {
1102
+ const r = e.getTimezoneOffset();
1103
+ switch (t) {
1104
+ // Hours and optional minutes
1105
+ case "x":
1106
+ return Lt(r);
1107
+ // Hours, minutes and optional seconds without `:` delimiter
1108
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
1109
+ // so this token always has the same output as `xx`
1110
+ case "xxxx":
1111
+ case "xx":
1112
+ return me(r);
1113
+ // Hours and minutes with `:` delimiter
1114
+ default:
1115
+ return me(r, ":");
1116
+ }
1117
+ },
1118
+ // Timezone (GMT)
1119
+ O: function(e, t, n) {
1120
+ const r = e.getTimezoneOffset();
1121
+ switch (t) {
1122
+ // Short
1123
+ case "O":
1124
+ case "OO":
1125
+ case "OOO":
1126
+ return "GMT" + Ft(r, ":");
1127
+ default:
1128
+ return "GMT" + me(r, ":");
1129
+ }
1130
+ },
1131
+ // Timezone (specific non-location)
1132
+ z: function(e, t, n) {
1133
+ const r = e.getTimezoneOffset();
1134
+ switch (t) {
1135
+ // Short
1136
+ case "z":
1137
+ case "zz":
1138
+ case "zzz":
1139
+ return "GMT" + Ft(r, ":");
1140
+ default:
1141
+ return "GMT" + me(r, ":");
1142
+ }
1143
+ },
1144
+ // Seconds timestamp
1145
+ t: function(e, t, n) {
1146
+ const r = Math.trunc(+e / 1e3);
1147
+ return P(r, t.length);
1148
+ },
1149
+ // Milliseconds timestamp
1150
+ T: function(e, t, n) {
1151
+ return P(+e, t.length);
1152
+ }
1153
+ };
1154
+ function Ft(e, t = "") {
1155
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), s = r % 60;
1156
+ return s === 0 ? n + String(a) : n + String(a) + t + P(s, 2);
1157
+ }
1158
+ function Lt(e, t) {
1159
+ return e % 60 === 0 ? (e > 0 ? "-" : "+") + P(Math.abs(e) / 60, 2) : me(e, t);
1160
+ }
1161
+ function me(e, t = "") {
1162
+ const n = e > 0 ? "-" : "+", r = Math.abs(e), a = P(Math.trunc(r / 60), 2), s = P(r % 60, 2);
1163
+ return n + a + t + s;
1164
+ }
1165
+ const Bt = (e, t) => {
1166
+ switch (e) {
1167
+ case "P":
1168
+ return t.date({ width: "short" });
1169
+ case "PP":
1170
+ return t.date({ width: "medium" });
1171
+ case "PPP":
1172
+ return t.date({ width: "long" });
1173
+ default:
1174
+ return t.date({ width: "full" });
1175
+ }
1176
+ }, pn = (e, t) => {
1177
+ switch (e) {
1178
+ case "p":
1179
+ return t.time({ width: "short" });
1180
+ case "pp":
1181
+ return t.time({ width: "medium" });
1182
+ case "ppp":
1183
+ return t.time({ width: "long" });
1184
+ default:
1185
+ return t.time({ width: "full" });
1186
+ }
1187
+ }, Yr = (e, t) => {
1188
+ const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
1189
+ if (!a)
1190
+ return Bt(e, t);
1191
+ let s;
1192
+ switch (r) {
1193
+ case "P":
1194
+ s = t.dateTime({ width: "short" });
1195
+ break;
1196
+ case "PP":
1197
+ s = t.dateTime({ width: "medium" });
1198
+ break;
1199
+ case "PPP":
1200
+ s = t.dateTime({ width: "long" });
1201
+ break;
1202
+ default:
1203
+ s = t.dateTime({ width: "full" });
1204
+ break;
1205
+ }
1206
+ return s.replace("{{date}}", Bt(r, t)).replace("{{time}}", pn(a, t));
1207
+ }, Ur = {
1208
+ p: pn,
1209
+ P: Yr
1210
+ }, Hr = /^D+$/, Ir = /^Y+$/, qr = ["D", "DD", "YY", "YYYY"];
1211
+ function Vr(e) {
1212
+ return Hr.test(e);
1213
+ }
1214
+ function Xr(e) {
1215
+ return Ir.test(e);
1216
+ }
1217
+ function zr(e, t, n) {
1218
+ const r = Qr(e, t, n);
1219
+ if (console.warn(r), qr.includes(e)) throw new RangeError(r);
1220
+ }
1221
+ function Qr(e, t, n) {
1222
+ const r = e[0] === "Y" ? "years" : "days of the month";
1223
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
1224
+ }
1225
+ const Gr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Jr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Kr = /^'([^]*?)'?$/, Zr = /''/g, ea = /[a-zA-Z]/;
1226
+ function vt(e, t, n) {
1227
+ const r = Je(), a = r.locale ?? Rr, s = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, c = L(e, n?.in);
1228
+ if (!Jn(c))
1229
+ throw new RangeError("Invalid time value");
1230
+ let l = t.match(Jr).map((u) => {
1231
+ const m = u[0];
1232
+ if (m === "p" || m === "P") {
1233
+ const h = Ur[m];
1234
+ return h(u, a.formatLong);
1235
+ }
1236
+ return u;
1237
+ }).join("").match(Gr).map((u) => {
1238
+ if (u === "''")
1239
+ return { isToken: !1, value: "'" };
1240
+ const m = u[0];
1241
+ if (m === "'")
1242
+ return { isToken: !1, value: ta(u) };
1243
+ if ($t[m])
1244
+ return { isToken: !0, value: u };
1245
+ if (m.match(ea))
1246
+ throw new RangeError(
1247
+ "Format string contains an unescaped latin alphabet character `" + m + "`"
1248
+ );
1249
+ return { isToken: !1, value: u };
1250
+ });
1251
+ a.localize.preprocessor && (l = a.localize.preprocessor(c, l));
1252
+ const f = {
1253
+ firstWeekContainsDate: s,
1254
+ weekStartsOn: o,
1255
+ locale: a
1256
+ };
1257
+ return l.map((u) => {
1258
+ if (!u.isToken) return u.value;
1259
+ const m = u.value;
1260
+ (Xr(m) || Vr(m)) && zr(m, t, String(e));
1261
+ const h = $t[m[0]];
1262
+ return h(c, m, a.localize, f);
1263
+ }).join("");
1264
+ }
1265
+ function ta(e) {
1266
+ const t = e.match(Kr);
1267
+ return t ? t[1].replace(Zr, "'") : e;
1268
+ }
1269
+ function na() {
1270
+ const e = Q(!0), t = Q(() => e.current);
1271
+ return z(() => (e.current = !0, () => {
1272
+ e.current = !1;
1273
+ }), []), t.current;
1274
+ }
1275
+ const ft = 2 ** 31 - 1;
1276
+ function hn(e, t, n) {
1277
+ const r = n - Date.now();
1278
+ e.current = r <= ft ? setTimeout(t, r) : setTimeout(() => hn(e, t, n), ft);
1279
+ }
1280
+ function ra() {
1281
+ const e = na(), t = Q();
1282
+ return Rn(() => clearTimeout(t.current)), Fe(() => {
1283
+ const n = () => clearTimeout(t.current);
1284
+ function r(a, s = 0) {
1285
+ e() && (n(), s <= ft ? t.current = setTimeout(a, s) : hn(t, a, Date.now() + s));
1286
+ }
1287
+ return {
1288
+ set: r,
1289
+ clear: n,
1290
+ handleRef: t
1291
+ };
1292
+ }, []);
1293
+ }
1294
+ var ot, Yt;
1295
+ function aa() {
1296
+ if (Yt) return ot;
1297
+ Yt = 1;
1298
+ var e = process.env.NODE_ENV !== "production", t = function() {
1299
+ };
1300
+ if (e) {
1301
+ var n = function(a, s) {
1302
+ var o = arguments.length;
1303
+ s = new Array(o > 1 ? o - 1 : 0);
1304
+ for (var c = 1; c < o; c++)
1305
+ s[c - 1] = arguments[c];
1306
+ var l = 0, f = "Warning: " + a.replace(/%s/g, function() {
1307
+ return s[l++];
1308
+ });
1309
+ typeof console < "u" && console.error(f);
1310
+ try {
1311
+ throw new Error(f);
1312
+ } catch {
1313
+ }
1314
+ };
1315
+ t = function(r, a, s) {
1316
+ var o = arguments.length;
1317
+ s = new Array(o > 2 ? o - 2 : 0);
1318
+ for (var c = 2; c < o; c++)
1319
+ s[c - 2] = arguments[c];
1320
+ if (a === void 0)
1321
+ throw new Error(
1322
+ "`warning(condition, format, ...args)` requires a warning message argument"
1323
+ );
1324
+ r || n.apply(null, [a].concat(s));
1325
+ };
1326
+ }
1327
+ return ot = t, ot;
1328
+ }
1329
+ var ia = aa();
1330
+ const vn = /* @__PURE__ */ In(ia);
1331
+ function sa(e, t, n) {
1332
+ var r = Q(e !== void 0), a = T(t), s = a[0], o = a[1], c = e !== void 0, l = r.current;
1333
+ return r.current = c, !c && l && s !== t && o(t), [c ? e : s, X(function(f) {
1334
+ for (var u = arguments.length, m = new Array(u > 1 ? u - 1 : 0), h = 1; h < u; h++)
1335
+ m[h - 1] = arguments[h];
1336
+ n && n.apply(void 0, [f].concat(m)), o(f);
1337
+ }, [n])];
1338
+ }
1339
+ function Ut() {
1340
+ return T(null);
1341
+ }
1342
+ var Ht = Object.prototype.hasOwnProperty;
1343
+ function It(e, t, n) {
1344
+ for (n of e.keys())
1345
+ if (Ae(n, t)) return n;
1346
+ }
1347
+ function Ae(e, t) {
1348
+ var n, r, a;
1349
+ if (e === t) return !0;
1350
+ if (e && t && (n = e.constructor) === t.constructor) {
1351
+ if (n === Date) return e.getTime() === t.getTime();
1352
+ if (n === RegExp) return e.toString() === t.toString();
1353
+ if (n === Array) {
1354
+ if ((r = e.length) === t.length)
1355
+ for (; r-- && Ae(e[r], t[r]); ) ;
1356
+ return r === -1;
1357
+ }
1358
+ if (n === Set) {
1359
+ if (e.size !== t.size)
1360
+ return !1;
1361
+ for (r of e)
1362
+ if (a = r, a && typeof a == "object" && (a = It(t, a), !a) || !t.has(a)) return !1;
1363
+ return !0;
1364
+ }
1365
+ if (n === Map) {
1366
+ if (e.size !== t.size)
1367
+ return !1;
1368
+ for (r of e)
1369
+ if (a = r[0], a && typeof a == "object" && (a = It(t, a), !a) || !Ae(r[1], t.get(a)))
1370
+ return !1;
1371
+ return !0;
1372
+ }
1373
+ if (n === ArrayBuffer)
1374
+ e = new Uint8Array(e), t = new Uint8Array(t);
1375
+ else if (n === DataView) {
1376
+ if ((r = e.byteLength) === t.byteLength)
1377
+ for (; r-- && e.getInt8(r) === t.getInt8(r); ) ;
1378
+ return r === -1;
1379
+ }
1380
+ if (ArrayBuffer.isView(e)) {
1381
+ if ((r = e.byteLength) === t.byteLength)
1382
+ for (; r-- && e[r] === t[r]; ) ;
1383
+ return r === -1;
1384
+ }
1385
+ if (!n || typeof e == "object") {
1386
+ r = 0;
1387
+ for (n in e)
1388
+ if (Ht.call(e, n) && ++r && !Ht.call(t, n) || !(n in t) || !Ae(e[n], t[n])) return !1;
1389
+ return Object.keys(t).length === r;
1390
+ }
1391
+ }
1392
+ return e !== e && t !== t;
1393
+ }
1394
+ function oa(e) {
1395
+ const t = $n();
1396
+ return [e[0], X((n) => {
1397
+ if (t())
1398
+ return e[1](n);
1399
+ }, [t, e[1]])];
1400
+ }
1401
+ var Y = "top", G = "bottom", J = "right", U = "left", gt = "auto", Ue = [Y, G, J, U], Ne = "start", Be = "end", ca = "clippingParents", gn = "viewport", Te = "popper", la = "reference", qt = /* @__PURE__ */ Ue.reduce(function(e, t) {
1402
+ return e.concat([t + "-" + Ne, t + "-" + Be]);
1403
+ }, []), bn = /* @__PURE__ */ [].concat(Ue, [gt]).reduce(function(e, t) {
1404
+ return e.concat([t, t + "-" + Ne, t + "-" + Be]);
1405
+ }, []), ua = "beforeRead", da = "read", fa = "afterRead", ma = "beforeMain", pa = "main", ha = "afterMain", va = "beforeWrite", ga = "write", ba = "afterWrite", ya = [ua, da, fa, ma, pa, ha, va, ga, ba];
1406
+ function ne(e) {
1407
+ return e.split("-")[0];
1408
+ }
1409
+ function I(e) {
1410
+ if (e == null)
1411
+ return window;
1412
+ if (e.toString() !== "[object Window]") {
1413
+ var t = e.ownerDocument;
1414
+ return t && t.defaultView || window;
1415
+ }
1416
+ return e;
1417
+ }
1418
+ function ve(e) {
1419
+ var t = I(e).Element;
1420
+ return e instanceof t || e instanceof Element;
1421
+ }
1422
+ function re(e) {
1423
+ var t = I(e).HTMLElement;
1424
+ return e instanceof t || e instanceof HTMLElement;
1425
+ }
1426
+ function bt(e) {
1427
+ if (typeof ShadowRoot > "u")
1428
+ return !1;
1429
+ var t = I(e).ShadowRoot;
1430
+ return e instanceof t || e instanceof ShadowRoot;
1431
+ }
1432
+ var pe = Math.max, Ge = Math.min, Me = Math.round;
1433
+ function mt() {
1434
+ var e = navigator.userAgentData;
1435
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
1436
+ return t.brand + "/" + t.version;
1437
+ }).join(" ") : navigator.userAgent;
1438
+ }
1439
+ function yn() {
1440
+ return !/^((?!chrome|android).)*safari/i.test(mt());
1441
+ }
1442
+ function Pe(e, t, n) {
1443
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1444
+ var r = e.getBoundingClientRect(), a = 1, s = 1;
1445
+ t && re(e) && (a = e.offsetWidth > 0 && Me(r.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && Me(r.height) / e.offsetHeight || 1);
1446
+ var o = ve(e) ? I(e) : window, c = o.visualViewport, l = !yn() && n, f = (r.left + (l && c ? c.offsetLeft : 0)) / a, u = (r.top + (l && c ? c.offsetTop : 0)) / s, m = r.width / a, h = r.height / s;
1447
+ return {
1448
+ width: m,
1449
+ height: h,
1450
+ top: u,
1451
+ right: f + m,
1452
+ bottom: u + h,
1453
+ left: f,
1454
+ x: f,
1455
+ y: u
1456
+ };
1457
+ }
1458
+ function yt(e) {
1459
+ var t = Pe(e), n = e.offsetWidth, r = e.offsetHeight;
1460
+ return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
1461
+ x: e.offsetLeft,
1462
+ y: e.offsetTop,
1463
+ width: n,
1464
+ height: r
1465
+ };
1466
+ }
1467
+ function wn(e, t) {
1468
+ var n = t.getRootNode && t.getRootNode();
1469
+ if (e.contains(t))
1470
+ return !0;
1471
+ if (n && bt(n)) {
1472
+ var r = t;
1473
+ do {
1474
+ if (r && e.isSameNode(r))
1475
+ return !0;
1476
+ r = r.parentNode || r.host;
1477
+ } while (r);
1478
+ }
1479
+ return !1;
1480
+ }
1481
+ function de(e) {
1482
+ return e ? (e.nodeName || "").toLowerCase() : null;
1483
+ }
1484
+ function oe(e) {
1485
+ return I(e).getComputedStyle(e);
1486
+ }
1487
+ function wa(e) {
1488
+ return ["table", "td", "th"].indexOf(de(e)) >= 0;
1489
+ }
1490
+ function fe(e) {
1491
+ return ((ve(e) ? e.ownerDocument : (
1492
+ // $FlowFixMe[prop-missing]
1493
+ e.document
1494
+ )) || window.document).documentElement;
1495
+ }
1496
+ function Ke(e) {
1497
+ return de(e) === "html" ? e : (
1498
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
1499
+ // $FlowFixMe[incompatible-return]
1500
+ // $FlowFixMe[prop-missing]
1501
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
1502
+ e.parentNode || // DOM Element detected
1503
+ (bt(e) ? e.host : null) || // ShadowRoot detected
1504
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
1505
+ fe(e)
1506
+ );
1507
+ }
1508
+ function Vt(e) {
1509
+ return !re(e) || // https://github.com/popperjs/popper-core/issues/837
1510
+ oe(e).position === "fixed" ? null : e.offsetParent;
1511
+ }
1512
+ function xa(e) {
1513
+ var t = /firefox/i.test(mt()), n = /Trident/i.test(mt());
1514
+ if (n && re(e)) {
1515
+ var r = oe(e);
1516
+ if (r.position === "fixed")
1517
+ return null;
1518
+ }
1519
+ var a = Ke(e);
1520
+ for (bt(a) && (a = a.host); re(a) && ["html", "body"].indexOf(de(a)) < 0; ) {
1521
+ var s = oe(a);
1522
+ if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
1523
+ return a;
1524
+ a = a.parentNode;
1525
+ }
1526
+ return null;
1527
+ }
1528
+ function He(e) {
1529
+ for (var t = I(e), n = Vt(e); n && wa(n) && oe(n).position === "static"; )
1530
+ n = Vt(n);
1531
+ return n && (de(n) === "html" || de(n) === "body" && oe(n).position === "static") ? t : n || xa(e) || t;
1532
+ }
1533
+ function wt(e) {
1534
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
1535
+ }
1536
+ function Re(e, t, n) {
1537
+ return pe(e, Ge(t, n));
1538
+ }
1539
+ function Oa(e, t, n) {
1540
+ var r = Re(e, t, n);
1541
+ return r > n ? n : r;
1542
+ }
1543
+ function xn() {
1544
+ return {
1545
+ top: 0,
1546
+ right: 0,
1547
+ bottom: 0,
1548
+ left: 0
1549
+ };
1550
+ }
1551
+ function On(e) {
1552
+ return Object.assign({}, xn(), e);
1553
+ }
1554
+ function jn(e, t) {
1555
+ return t.reduce(function(n, r) {
1556
+ return n[r] = e, n;
1557
+ }, {});
1558
+ }
1559
+ var ja = function(t, n) {
1560
+ return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
1561
+ placement: n.placement
1562
+ })) : t, On(typeof t != "number" ? t : jn(t, Ue));
1563
+ };
1564
+ function Na(e) {
1565
+ var t, n = e.state, r = e.name, a = e.options, s = n.elements.arrow, o = n.modifiersData.popperOffsets, c = ne(n.placement), l = wt(c), f = [U, J].indexOf(c) >= 0, u = f ? "height" : "width";
1566
+ if (!(!s || !o)) {
1567
+ var m = ja(a.padding, n), h = yt(s), d = l === "y" ? Y : U, v = l === "y" ? G : J, b = n.rects.reference[u] + n.rects.reference[l] - o[l] - n.rects.popper[u], p = o[l] - n.rects.reference[l], w = He(s), g = w ? l === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, N = b / 2 - p / 2, y = m[d], j = g - h[u] - m[v], O = g / 2 - h[u] / 2 + N, M = Re(y, O, j), E = l;
1568
+ n.modifiersData[r] = (t = {}, t[E] = M, t.centerOffset = M - O, t);
1569
+ }
1570
+ }
1571
+ function Ma(e) {
1572
+ var t = e.state, n = e.options, r = n.element, a = r === void 0 ? "[data-popper-arrow]" : r;
1573
+ a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || wn(t.elements.popper, a) && (t.elements.arrow = a));
1574
+ }
1575
+ const Pa = {
1576
+ name: "arrow",
1577
+ enabled: !0,
1578
+ phase: "main",
1579
+ fn: Na,
1580
+ effect: Ma,
1581
+ requires: ["popperOffsets"],
1582
+ requiresIfExists: ["preventOverflow"]
1583
+ };
1584
+ function De(e) {
1585
+ return e.split("-")[1];
1586
+ }
1587
+ var Da = {
1588
+ top: "auto",
1589
+ right: "auto",
1590
+ bottom: "auto",
1591
+ left: "auto"
1592
+ };
1593
+ function _a(e, t) {
1594
+ var n = e.x, r = e.y, a = t.devicePixelRatio || 1;
1595
+ return {
1596
+ x: Me(n * a) / a || 0,
1597
+ y: Me(r * a) / a || 0
1598
+ };
1599
+ }
1600
+ function Xt(e) {
1601
+ var t, n = e.popper, r = e.popperRect, a = e.placement, s = e.variation, o = e.offsets, c = e.position, l = e.gpuAcceleration, f = e.adaptive, u = e.roundOffsets, m = e.isFixed, h = o.x, d = h === void 0 ? 0 : h, v = o.y, b = v === void 0 ? 0 : v, p = typeof u == "function" ? u({
1602
+ x: d,
1603
+ y: b
1604
+ }) : {
1605
+ x: d,
1606
+ y: b
1607
+ };
1608
+ d = p.x, b = p.y;
1609
+ var w = o.hasOwnProperty("x"), g = o.hasOwnProperty("y"), N = U, y = Y, j = window;
1610
+ if (f) {
1611
+ var O = He(n), M = "clientHeight", E = "clientWidth";
1612
+ if (O === I(n) && (O = fe(n), oe(O).position !== "static" && c === "absolute" && (M = "scrollHeight", E = "scrollWidth")), O = O, a === Y || (a === U || a === J) && s === Be) {
1613
+ y = G;
1614
+ var S = m && O === j && j.visualViewport ? j.visualViewport.height : (
1615
+ // $FlowFixMe[prop-missing]
1616
+ O[M]
1617
+ );
1618
+ b -= S - r.height, b *= l ? 1 : -1;
1619
+ }
1620
+ if (a === U || (a === Y || a === G) && s === Be) {
1621
+ N = J;
1622
+ var D = m && O === j && j.visualViewport ? j.visualViewport.width : (
1623
+ // $FlowFixMe[prop-missing]
1624
+ O[E]
1625
+ );
1626
+ d -= D - r.width, d *= l ? 1 : -1;
1627
+ }
1628
+ }
1629
+ var k = Object.assign({
1630
+ position: c
1631
+ }, f && Da), W = u === !0 ? _a({
1632
+ x: d,
1633
+ y: b
1634
+ }, I(n)) : {
1635
+ x: d,
1636
+ y: b
1637
+ };
1638
+ if (d = W.x, b = W.y, l) {
1639
+ var _;
1640
+ return Object.assign({}, k, (_ = {}, _[y] = g ? "0" : "", _[N] = w ? "0" : "", _.transform = (j.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + b + "px)" : "translate3d(" + d + "px, " + b + "px, 0)", _));
1641
+ }
1642
+ return Object.assign({}, k, (t = {}, t[y] = g ? b + "px" : "", t[N] = w ? d + "px" : "", t.transform = "", t));
1643
+ }
1644
+ function ka(e) {
1645
+ var t = e.state, n = e.options, r = n.gpuAcceleration, a = r === void 0 ? !0 : r, s = n.adaptive, o = s === void 0 ? !0 : s, c = n.roundOffsets, l = c === void 0 ? !0 : c, f = {
1646
+ placement: ne(t.placement),
1647
+ variation: De(t.placement),
1648
+ popper: t.elements.popper,
1649
+ popperRect: t.rects.popper,
1650
+ gpuAcceleration: a,
1651
+ isFixed: t.options.strategy === "fixed"
1652
+ };
1653
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Xt(Object.assign({}, f, {
1654
+ offsets: t.modifiersData.popperOffsets,
1655
+ position: t.options.strategy,
1656
+ adaptive: o,
1657
+ roundOffsets: l
1658
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Xt(Object.assign({}, f, {
1659
+ offsets: t.modifiersData.arrow,
1660
+ position: "absolute",
1661
+ adaptive: !1,
1662
+ roundOffsets: l
1663
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
1664
+ "data-popper-placement": t.placement
1665
+ });
1666
+ }
1667
+ const Ea = {
1668
+ name: "computeStyles",
1669
+ enabled: !0,
1670
+ phase: "beforeWrite",
1671
+ fn: ka,
1672
+ data: {}
1673
+ };
1674
+ var qe = {
1675
+ passive: !0
1676
+ };
1677
+ function Sa(e) {
1678
+ var t = e.state, n = e.instance, r = e.options, a = r.scroll, s = a === void 0 ? !0 : a, o = r.resize, c = o === void 0 ? !0 : o, l = I(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1679
+ return s && f.forEach(function(u) {
1680
+ u.addEventListener("scroll", n.update, qe);
1681
+ }), c && l.addEventListener("resize", n.update, qe), function() {
1682
+ s && f.forEach(function(u) {
1683
+ u.removeEventListener("scroll", n.update, qe);
1684
+ }), c && l.removeEventListener("resize", n.update, qe);
1685
+ };
1686
+ }
1687
+ const Ca = {
1688
+ name: "eventListeners",
1689
+ enabled: !0,
1690
+ phase: "write",
1691
+ fn: function() {
1692
+ },
1693
+ effect: Sa,
1694
+ data: {}
1695
+ };
1696
+ var Ta = {
1697
+ left: "right",
1698
+ right: "left",
1699
+ bottom: "top",
1700
+ top: "bottom"
1701
+ };
1702
+ function Xe(e) {
1703
+ return e.replace(/left|right|bottom|top/g, function(t) {
1704
+ return Ta[t];
1705
+ });
1706
+ }
1707
+ var Wa = {
1708
+ start: "end",
1709
+ end: "start"
1710
+ };
1711
+ function zt(e) {
1712
+ return e.replace(/start|end/g, function(t) {
1713
+ return Wa[t];
1714
+ });
1715
+ }
1716
+ function xt(e) {
1717
+ var t = I(e), n = t.pageXOffset, r = t.pageYOffset;
1718
+ return {
1719
+ scrollLeft: n,
1720
+ scrollTop: r
1721
+ };
1722
+ }
1723
+ function Ot(e) {
1724
+ return Pe(fe(e)).left + xt(e).scrollLeft;
1725
+ }
1726
+ function Aa(e, t) {
1727
+ var n = I(e), r = fe(e), a = n.visualViewport, s = r.clientWidth, o = r.clientHeight, c = 0, l = 0;
1728
+ if (a) {
1729
+ s = a.width, o = a.height;
1730
+ var f = yn();
1731
+ (f || !f && t === "fixed") && (c = a.offsetLeft, l = a.offsetTop);
1732
+ }
1733
+ return {
1734
+ width: s,
1735
+ height: o,
1736
+ x: c + Ot(e),
1737
+ y: l
1738
+ };
1739
+ }
1740
+ function Ra(e) {
1741
+ var t, n = fe(e), r = xt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, s = pe(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), o = pe(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), c = -r.scrollLeft + Ot(e), l = -r.scrollTop;
1742
+ return oe(a || n).direction === "rtl" && (c += pe(n.clientWidth, a ? a.clientWidth : 0) - s), {
1743
+ width: s,
1744
+ height: o,
1745
+ x: c,
1746
+ y: l
1747
+ };
1748
+ }
1749
+ function jt(e) {
1750
+ var t = oe(e), n = t.overflow, r = t.overflowX, a = t.overflowY;
1751
+ return /auto|scroll|overlay|hidden/.test(n + a + r);
1752
+ }
1753
+ function Nn(e) {
1754
+ return ["html", "body", "#document"].indexOf(de(e)) >= 0 ? e.ownerDocument.body : re(e) && jt(e) ? e : Nn(Ke(e));
1755
+ }
1756
+ function $e(e, t) {
1757
+ var n;
1758
+ t === void 0 && (t = []);
1759
+ var r = Nn(e), a = r === ((n = e.ownerDocument) == null ? void 0 : n.body), s = I(r), o = a ? [s].concat(s.visualViewport || [], jt(r) ? r : []) : r, c = t.concat(o);
1760
+ return a ? c : (
1761
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1762
+ c.concat($e(Ke(o)))
1763
+ );
1764
+ }
1765
+ function pt(e) {
1766
+ return Object.assign({}, e, {
1767
+ left: e.x,
1768
+ top: e.y,
1769
+ right: e.x + e.width,
1770
+ bottom: e.y + e.height
1771
+ });
1772
+ }
1773
+ function $a(e, t) {
1774
+ var n = Pe(e, !1, t === "fixed");
1775
+ return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
1776
+ }
1777
+ function Qt(e, t, n) {
1778
+ return t === gn ? pt(Aa(e, n)) : ve(t) ? $a(t, n) : pt(Ra(fe(e)));
1779
+ }
1780
+ function Fa(e) {
1781
+ var t = $e(Ke(e)), n = ["absolute", "fixed"].indexOf(oe(e).position) >= 0, r = n && re(e) ? He(e) : e;
1782
+ return ve(r) ? t.filter(function(a) {
1783
+ return ve(a) && wn(a, r) && de(a) !== "body";
1784
+ }) : [];
1785
+ }
1786
+ function La(e, t, n, r) {
1787
+ var a = t === "clippingParents" ? Fa(e) : [].concat(t), s = [].concat(a, [n]), o = s[0], c = s.reduce(function(l, f) {
1788
+ var u = Qt(e, f, r);
1789
+ return l.top = pe(u.top, l.top), l.right = Ge(u.right, l.right), l.bottom = Ge(u.bottom, l.bottom), l.left = pe(u.left, l.left), l;
1790
+ }, Qt(e, o, r));
1791
+ return c.width = c.right - c.left, c.height = c.bottom - c.top, c.x = c.left, c.y = c.top, c;
1792
+ }
1793
+ function Mn(e) {
1794
+ var t = e.reference, n = e.element, r = e.placement, a = r ? ne(r) : null, s = r ? De(r) : null, o = t.x + t.width / 2 - n.width / 2, c = t.y + t.height / 2 - n.height / 2, l;
1795
+ switch (a) {
1796
+ case Y:
1797
+ l = {
1798
+ x: o,
1799
+ y: t.y - n.height
1800
+ };
1801
+ break;
1802
+ case G:
1803
+ l = {
1804
+ x: o,
1805
+ y: t.y + t.height
1806
+ };
1807
+ break;
1808
+ case J:
1809
+ l = {
1810
+ x: t.x + t.width,
1811
+ y: c
1812
+ };
1813
+ break;
1814
+ case U:
1815
+ l = {
1816
+ x: t.x - n.width,
1817
+ y: c
1818
+ };
1819
+ break;
1820
+ default:
1821
+ l = {
1822
+ x: t.x,
1823
+ y: t.y
1824
+ };
1825
+ }
1826
+ var f = a ? wt(a) : null;
1827
+ if (f != null) {
1828
+ var u = f === "y" ? "height" : "width";
1829
+ switch (s) {
1830
+ case Ne:
1831
+ l[f] = l[f] - (t[u] / 2 - n[u] / 2);
1832
+ break;
1833
+ case Be:
1834
+ l[f] = l[f] + (t[u] / 2 - n[u] / 2);
1835
+ break;
1836
+ }
1837
+ }
1838
+ return l;
1839
+ }
1840
+ function Ye(e, t) {
1841
+ t === void 0 && (t = {});
1842
+ var n = t, r = n.placement, a = r === void 0 ? e.placement : r, s = n.strategy, o = s === void 0 ? e.strategy : s, c = n.boundary, l = c === void 0 ? ca : c, f = n.rootBoundary, u = f === void 0 ? gn : f, m = n.elementContext, h = m === void 0 ? Te : m, d = n.altBoundary, v = d === void 0 ? !1 : d, b = n.padding, p = b === void 0 ? 0 : b, w = On(typeof p != "number" ? p : jn(p, Ue)), g = h === Te ? la : Te, N = e.rects.popper, y = e.elements[v ? g : h], j = La(ve(y) ? y : y.contextElement || fe(e.elements.popper), l, u, o), O = Pe(e.elements.reference), M = Mn({
1843
+ reference: O,
1844
+ element: N,
1845
+ placement: a
1846
+ }), E = pt(Object.assign({}, N, M)), S = h === Te ? E : O, D = {
1847
+ top: j.top - S.top + w.top,
1848
+ bottom: S.bottom - j.bottom + w.bottom,
1849
+ left: j.left - S.left + w.left,
1850
+ right: S.right - j.right + w.right
1851
+ }, k = e.modifiersData.offset;
1852
+ if (h === Te && k) {
1853
+ var W = k[a];
1854
+ Object.keys(D).forEach(function(_) {
1855
+ var A = [J, G].indexOf(_) >= 0 ? 1 : -1, C = [Y, G].indexOf(_) >= 0 ? "y" : "x";
1856
+ D[_] += W[C] * A;
1857
+ });
1858
+ }
1859
+ return D;
1860
+ }
1861
+ function Ba(e, t) {
1862
+ t === void 0 && (t = {});
1863
+ var n = t, r = n.placement, a = n.boundary, s = n.rootBoundary, o = n.padding, c = n.flipVariations, l = n.allowedAutoPlacements, f = l === void 0 ? bn : l, u = De(r), m = u ? c ? qt : qt.filter(function(v) {
1864
+ return De(v) === u;
1865
+ }) : Ue, h = m.filter(function(v) {
1866
+ return f.indexOf(v) >= 0;
1867
+ });
1868
+ h.length === 0 && (h = m);
1869
+ var d = h.reduce(function(v, b) {
1870
+ return v[b] = Ye(e, {
1871
+ placement: b,
1872
+ boundary: a,
1873
+ rootBoundary: s,
1874
+ padding: o
1875
+ })[ne(b)], v;
1876
+ }, {});
1877
+ return Object.keys(d).sort(function(v, b) {
1878
+ return d[v] - d[b];
1879
+ });
1880
+ }
1881
+ function Ya(e) {
1882
+ if (ne(e) === gt)
1883
+ return [];
1884
+ var t = Xe(e);
1885
+ return [zt(e), t, zt(t)];
1886
+ }
1887
+ function Ua(e) {
1888
+ var t = e.state, n = e.options, r = e.name;
1889
+ if (!t.modifiersData[r]._skip) {
1890
+ for (var a = n.mainAxis, s = a === void 0 ? !0 : a, o = n.altAxis, c = o === void 0 ? !0 : o, l = n.fallbackPlacements, f = n.padding, u = n.boundary, m = n.rootBoundary, h = n.altBoundary, d = n.flipVariations, v = d === void 0 ? !0 : d, b = n.allowedAutoPlacements, p = t.options.placement, w = ne(p), g = w === p, N = l || (g || !v ? [Xe(p)] : Ya(p)), y = [p].concat(N).reduce(function(V, ee) {
1891
+ return V.concat(ne(ee) === gt ? Ba(t, {
1892
+ placement: ee,
1893
+ boundary: u,
1894
+ rootBoundary: m,
1895
+ padding: f,
1896
+ flipVariations: v,
1897
+ allowedAutoPlacements: b
1898
+ }) : ee);
1899
+ }, []), j = t.rects.reference, O = t.rects.popper, M = /* @__PURE__ */ new Map(), E = !0, S = y[0], D = 0; D < y.length; D++) {
1900
+ var k = y[D], W = ne(k), _ = De(k) === Ne, A = [Y, G].indexOf(W) >= 0, C = A ? "width" : "height", B = Ye(t, {
1901
+ placement: k,
1902
+ boundary: u,
1903
+ rootBoundary: m,
1904
+ altBoundary: h,
1905
+ padding: f
1906
+ }), q = A ? _ ? J : U : _ ? G : Y;
1907
+ j[C] > O[C] && (q = Xe(q));
1908
+ var be = Xe(q), ae = [];
1909
+ if (s && ae.push(B[W] <= 0), c && ae.push(B[q] <= 0, B[be] <= 0), ae.every(function(V) {
1910
+ return V;
1911
+ })) {
1912
+ S = k, E = !1;
1913
+ break;
1914
+ }
1915
+ M.set(k, ae);
1916
+ }
1917
+ if (E)
1918
+ for (var ce = v ? 3 : 1, _e = function(ee) {
1919
+ var ie = y.find(function(we) {
1920
+ var K = M.get(we);
1921
+ if (K)
1922
+ return K.slice(0, ee).every(function(ke) {
1923
+ return ke;
1924
+ });
1925
+ });
1926
+ if (ie)
1927
+ return S = ie, "break";
1928
+ }, R = ce; R > 0; R--) {
1929
+ var ye = _e(R);
1930
+ if (ye === "break") break;
1931
+ }
1932
+ t.placement !== S && (t.modifiersData[r]._skip = !0, t.placement = S, t.reset = !0);
1933
+ }
1934
+ }
1935
+ const Ha = {
1936
+ name: "flip",
1937
+ enabled: !0,
1938
+ phase: "main",
1939
+ fn: Ua,
1940
+ requiresIfExists: ["offset"],
1941
+ data: {
1942
+ _skip: !1
1943
+ }
1944
+ };
1945
+ function Gt(e, t, n) {
1946
+ return n === void 0 && (n = {
1947
+ x: 0,
1948
+ y: 0
1949
+ }), {
1950
+ top: e.top - t.height - n.y,
1951
+ right: e.right - t.width + n.x,
1952
+ bottom: e.bottom - t.height + n.y,
1953
+ left: e.left - t.width - n.x
1954
+ };
1955
+ }
1956
+ function Jt(e) {
1957
+ return [Y, J, G, U].some(function(t) {
1958
+ return e[t] >= 0;
1959
+ });
1960
+ }
1961
+ function Ia(e) {
1962
+ var t = e.state, n = e.name, r = t.rects.reference, a = t.rects.popper, s = t.modifiersData.preventOverflow, o = Ye(t, {
1963
+ elementContext: "reference"
1964
+ }), c = Ye(t, {
1965
+ altBoundary: !0
1966
+ }), l = Gt(o, r), f = Gt(c, a, s), u = Jt(l), m = Jt(f);
1967
+ t.modifiersData[n] = {
1968
+ referenceClippingOffsets: l,
1969
+ popperEscapeOffsets: f,
1970
+ isReferenceHidden: u,
1971
+ hasPopperEscaped: m
1972
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
1973
+ "data-popper-reference-hidden": u,
1974
+ "data-popper-escaped": m
1975
+ });
1976
+ }
1977
+ const qa = {
1978
+ name: "hide",
1979
+ enabled: !0,
1980
+ phase: "main",
1981
+ requiresIfExists: ["preventOverflow"],
1982
+ fn: Ia
1983
+ };
1984
+ function Va(e, t, n) {
1985
+ var r = ne(e), a = [U, Y].indexOf(r) >= 0 ? -1 : 1, s = typeof n == "function" ? n(Object.assign({}, t, {
1986
+ placement: e
1987
+ })) : n, o = s[0], c = s[1];
1988
+ return o = o || 0, c = (c || 0) * a, [U, J].indexOf(r) >= 0 ? {
1989
+ x: c,
1990
+ y: o
1991
+ } : {
1992
+ x: o,
1993
+ y: c
1994
+ };
1995
+ }
1996
+ function Xa(e) {
1997
+ var t = e.state, n = e.options, r = e.name, a = n.offset, s = a === void 0 ? [0, 0] : a, o = bn.reduce(function(u, m) {
1998
+ return u[m] = Va(m, t.rects, s), u;
1999
+ }, {}), c = o[t.placement], l = c.x, f = c.y;
2000
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += f), t.modifiersData[r] = o;
2001
+ }
2002
+ const za = {
2003
+ name: "offset",
2004
+ enabled: !0,
2005
+ phase: "main",
2006
+ requires: ["popperOffsets"],
2007
+ fn: Xa
2008
+ };
2009
+ function Qa(e) {
2010
+ var t = e.state, n = e.name;
2011
+ t.modifiersData[n] = Mn({
2012
+ reference: t.rects.reference,
2013
+ element: t.rects.popper,
2014
+ placement: t.placement
2015
+ });
2016
+ }
2017
+ const Ga = {
2018
+ name: "popperOffsets",
2019
+ enabled: !0,
2020
+ phase: "read",
2021
+ fn: Qa,
2022
+ data: {}
2023
+ };
2024
+ function Ja(e) {
2025
+ return e === "x" ? "y" : "x";
2026
+ }
2027
+ function Ka(e) {
2028
+ var t = e.state, n = e.options, r = e.name, a = n.mainAxis, s = a === void 0 ? !0 : a, o = n.altAxis, c = o === void 0 ? !1 : o, l = n.boundary, f = n.rootBoundary, u = n.altBoundary, m = n.padding, h = n.tether, d = h === void 0 ? !0 : h, v = n.tetherOffset, b = v === void 0 ? 0 : v, p = Ye(t, {
2029
+ boundary: l,
2030
+ rootBoundary: f,
2031
+ padding: m,
2032
+ altBoundary: u
2033
+ }), w = ne(t.placement), g = De(t.placement), N = !g, y = wt(w), j = Ja(y), O = t.modifiersData.popperOffsets, M = t.rects.reference, E = t.rects.popper, S = typeof b == "function" ? b(Object.assign({}, t.rects, {
2034
+ placement: t.placement
2035
+ })) : b, D = typeof S == "number" ? {
2036
+ mainAxis: S,
2037
+ altAxis: S
2038
+ } : Object.assign({
2039
+ mainAxis: 0,
2040
+ altAxis: 0
2041
+ }, S), k = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, W = {
2042
+ x: 0,
2043
+ y: 0
2044
+ };
2045
+ if (O) {
2046
+ if (s) {
2047
+ var _, A = y === "y" ? Y : U, C = y === "y" ? G : J, B = y === "y" ? "height" : "width", q = O[y], be = q + p[A], ae = q - p[C], ce = d ? -E[B] / 2 : 0, _e = g === Ne ? M[B] : E[B], R = g === Ne ? -E[B] : -M[B], ye = t.elements.arrow, V = d && ye ? yt(ye) : {
2048
+ width: 0,
2049
+ height: 0
2050
+ }, ee = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : xn(), ie = ee[A], we = ee[C], K = Re(0, M[B], V[B]), ke = N ? M[B] / 2 - ce - K - ie - D.mainAxis : _e - K - ie - D.mainAxis, Ze = N ? -M[B] / 2 + ce + K + we + D.mainAxis : R + K + we + D.mainAxis, $ = t.elements.arrow && He(t.elements.arrow), xe = $ ? y === "y" ? $.clientTop || 0 : $.clientLeft || 0 : 0, Ee = (_ = k?.[y]) != null ? _ : 0, Mt = q + ke - Ee - xe, Pt = q + Ze - Ee, et = Re(d ? Ge(be, Mt) : be, q, d ? pe(ae, Pt) : ae);
2051
+ O[y] = et, W[y] = et - q;
2052
+ }
2053
+ if (c) {
2054
+ var tt, nt = y === "x" ? Y : U, rt = y === "x" ? G : J, te = O[j], x = j === "y" ? "height" : "width", H = te + p[nt], Dt = te - p[rt], at = [Y, U].indexOf(w) !== -1, _t = (tt = k?.[j]) != null ? tt : 0, kt = at ? H : te - M[x] - E[x] - _t + D.altAxis, Et = at ? te + M[x] + E[x] - _t - D.altAxis : Dt, St = d && at ? Oa(kt, te, Et) : Re(d ? kt : H, te, d ? Et : Dt);
2055
+ O[j] = St, W[j] = St - te;
2056
+ }
2057
+ t.modifiersData[r] = W;
2058
+ }
2059
+ }
2060
+ const Za = {
2061
+ name: "preventOverflow",
2062
+ enabled: !0,
2063
+ phase: "main",
2064
+ fn: Ka,
2065
+ requiresIfExists: ["offset"]
2066
+ };
2067
+ function ei(e) {
2068
+ return {
2069
+ scrollLeft: e.scrollLeft,
2070
+ scrollTop: e.scrollTop
2071
+ };
2072
+ }
2073
+ function ti(e) {
2074
+ return e === I(e) || !re(e) ? xt(e) : ei(e);
2075
+ }
2076
+ function ni(e) {
2077
+ var t = e.getBoundingClientRect(), n = Me(t.width) / e.offsetWidth || 1, r = Me(t.height) / e.offsetHeight || 1;
2078
+ return n !== 1 || r !== 1;
2079
+ }
2080
+ function ri(e, t, n) {
2081
+ n === void 0 && (n = !1);
2082
+ var r = re(t), a = re(t) && ni(t), s = fe(t), o = Pe(e, a, n), c = {
2083
+ scrollLeft: 0,
2084
+ scrollTop: 0
2085
+ }, l = {
2086
+ x: 0,
2087
+ y: 0
2088
+ };
2089
+ return (r || !r && !n) && ((de(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2090
+ jt(s)) && (c = ti(t)), re(t) ? (l = Pe(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = Ot(s))), {
2091
+ x: o.left + c.scrollLeft - l.x,
2092
+ y: o.top + c.scrollTop - l.y,
2093
+ width: o.width,
2094
+ height: o.height
2095
+ };
2096
+ }
2097
+ function ai(e) {
2098
+ var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
2099
+ e.forEach(function(s) {
2100
+ t.set(s.name, s);
2101
+ });
2102
+ function a(s) {
2103
+ n.add(s.name);
2104
+ var o = [].concat(s.requires || [], s.requiresIfExists || []);
2105
+ o.forEach(function(c) {
2106
+ if (!n.has(c)) {
2107
+ var l = t.get(c);
2108
+ l && a(l);
2109
+ }
2110
+ }), r.push(s);
2111
+ }
2112
+ return e.forEach(function(s) {
2113
+ n.has(s.name) || a(s);
2114
+ }), r;
2115
+ }
2116
+ function ii(e) {
2117
+ var t = ai(e);
2118
+ return ya.reduce(function(n, r) {
2119
+ return n.concat(t.filter(function(a) {
2120
+ return a.phase === r;
2121
+ }));
2122
+ }, []);
2123
+ }
2124
+ function si(e) {
2125
+ var t;
2126
+ return function() {
2127
+ return t || (t = new Promise(function(n) {
2128
+ Promise.resolve().then(function() {
2129
+ t = void 0, n(e());
2130
+ });
2131
+ })), t;
2132
+ };
2133
+ }
2134
+ function oi(e) {
2135
+ var t = e.reduce(function(n, r) {
2136
+ var a = n[r.name];
2137
+ return n[r.name] = a ? Object.assign({}, a, r, {
2138
+ options: Object.assign({}, a.options, r.options),
2139
+ data: Object.assign({}, a.data, r.data)
2140
+ }) : r, n;
2141
+ }, {});
2142
+ return Object.keys(t).map(function(n) {
2143
+ return t[n];
2144
+ });
2145
+ }
2146
+ var Kt = {
2147
+ placement: "bottom",
2148
+ modifiers: [],
2149
+ strategy: "absolute"
2150
+ };
2151
+ function Zt() {
2152
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
2153
+ t[n] = arguments[n];
2154
+ return !t.some(function(r) {
2155
+ return !(r && typeof r.getBoundingClientRect == "function");
2156
+ });
2157
+ }
2158
+ function ci(e) {
2159
+ e === void 0 && (e = {});
2160
+ var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, a = t.defaultOptions, s = a === void 0 ? Kt : a;
2161
+ return function(c, l, f) {
2162
+ f === void 0 && (f = s);
2163
+ var u = {
2164
+ placement: "bottom",
2165
+ orderedModifiers: [],
2166
+ options: Object.assign({}, Kt, s),
2167
+ modifiersData: {},
2168
+ elements: {
2169
+ reference: c,
2170
+ popper: l
2171
+ },
2172
+ attributes: {},
2173
+ styles: {}
2174
+ }, m = [], h = !1, d = {
2175
+ state: u,
2176
+ setOptions: function(w) {
2177
+ var g = typeof w == "function" ? w(u.options) : w;
2178
+ b(), u.options = Object.assign({}, s, u.options, g), u.scrollParents = {
2179
+ reference: ve(c) ? $e(c) : c.contextElement ? $e(c.contextElement) : [],
2180
+ popper: $e(l)
2181
+ };
2182
+ var N = ii(oi([].concat(r, u.options.modifiers)));
2183
+ return u.orderedModifiers = N.filter(function(y) {
2184
+ return y.enabled;
2185
+ }), v(), d.update();
2186
+ },
2187
+ // Sync update – it will always be executed, even if not necessary. This
2188
+ // is useful for low frequency updates where sync behavior simplifies the
2189
+ // logic.
2190
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
2191
+ // prefer the async Popper#update method
2192
+ forceUpdate: function() {
2193
+ if (!h) {
2194
+ var w = u.elements, g = w.reference, N = w.popper;
2195
+ if (Zt(g, N)) {
2196
+ u.rects = {
2197
+ reference: ri(g, He(N), u.options.strategy === "fixed"),
2198
+ popper: yt(N)
2199
+ }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(D) {
2200
+ return u.modifiersData[D.name] = Object.assign({}, D.data);
2201
+ });
2202
+ for (var y = 0; y < u.orderedModifiers.length; y++) {
2203
+ if (u.reset === !0) {
2204
+ u.reset = !1, y = -1;
2205
+ continue;
2206
+ }
2207
+ var j = u.orderedModifiers[y], O = j.fn, M = j.options, E = M === void 0 ? {} : M, S = j.name;
2208
+ typeof O == "function" && (u = O({
2209
+ state: u,
2210
+ options: E,
2211
+ name: S,
2212
+ instance: d
2213
+ }) || u);
2214
+ }
2215
+ }
2216
+ }
2217
+ },
2218
+ // Async and optimistically optimized update – it will not be executed if
2219
+ // not necessary (debounced to run at most once-per-tick)
2220
+ update: si(function() {
2221
+ return new Promise(function(p) {
2222
+ d.forceUpdate(), p(u);
2223
+ });
2224
+ }),
2225
+ destroy: function() {
2226
+ b(), h = !0;
2227
+ }
2228
+ };
2229
+ if (!Zt(c, l))
2230
+ return d;
2231
+ d.setOptions(f).then(function(p) {
2232
+ !h && f.onFirstUpdate && f.onFirstUpdate(p);
2233
+ });
2234
+ function v() {
2235
+ u.orderedModifiers.forEach(function(p) {
2236
+ var w = p.name, g = p.options, N = g === void 0 ? {} : g, y = p.effect;
2237
+ if (typeof y == "function") {
2238
+ var j = y({
2239
+ state: u,
2240
+ name: w,
2241
+ instance: d,
2242
+ options: N
2243
+ }), O = function() {
2244
+ };
2245
+ m.push(j || O);
2246
+ }
2247
+ });
2248
+ }
2249
+ function b() {
2250
+ m.forEach(function(p) {
2251
+ return p();
2252
+ }), m = [];
2253
+ }
2254
+ return d;
2255
+ };
2256
+ }
2257
+ const li = ci({
2258
+ defaultModifiers: [qa, Ga, Ea, Ca, za, Ha, Za, Pa]
2259
+ }), ui = ["enabled", "placement", "strategy", "modifiers"];
2260
+ function di(e, t) {
2261
+ if (e == null) return {};
2262
+ var n = {};
2263
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
2264
+ if (t.indexOf(r) >= 0) continue;
2265
+ n[r] = e[r];
2266
+ }
2267
+ return n;
2268
+ }
2269
+ const fi = {
2270
+ name: "applyStyles",
2271
+ enabled: !1,
2272
+ phase: "afterWrite",
2273
+ fn: () => {
2274
+ }
2275
+ }, mi = {
2276
+ name: "ariaDescribedBy",
2277
+ enabled: !0,
2278
+ phase: "afterWrite",
2279
+ effect: ({
2280
+ state: e
2281
+ }) => () => {
2282
+ const {
2283
+ reference: t,
2284
+ popper: n
2285
+ } = e.elements;
2286
+ if ("removeAttribute" in t) {
2287
+ const r = (t.getAttribute("aria-describedby") || "").split(",").filter((a) => a.trim() !== n.id);
2288
+ r.length ? t.setAttribute("aria-describedby", r.join(",")) : t.removeAttribute("aria-describedby");
2289
+ }
2290
+ },
2291
+ fn: ({
2292
+ state: e
2293
+ }) => {
2294
+ var t;
2295
+ const {
2296
+ popper: n,
2297
+ reference: r
2298
+ } = e.elements, a = (t = n.getAttribute("role")) == null ? void 0 : t.toLowerCase();
2299
+ if (n.id && a === "tooltip" && "setAttribute" in r) {
2300
+ const s = r.getAttribute("aria-describedby");
2301
+ if (s && s.split(",").indexOf(n.id) !== -1)
2302
+ return;
2303
+ r.setAttribute("aria-describedby", s ? `${s},${n.id}` : n.id);
2304
+ }
2305
+ }
2306
+ }, pi = [];
2307
+ function hi(e, t, n = {}) {
2308
+ let {
2309
+ enabled: r = !0,
2310
+ placement: a = "bottom",
2311
+ strategy: s = "absolute",
2312
+ modifiers: o = pi
2313
+ } = n, c = di(n, ui);
2314
+ const l = Q(o), f = Q(), u = X(() => {
2315
+ var p;
2316
+ (p = f.current) == null || p.update();
2317
+ }, []), m = X(() => {
2318
+ var p;
2319
+ (p = f.current) == null || p.forceUpdate();
2320
+ }, []), [h, d] = oa(T({
2321
+ placement: a,
2322
+ update: u,
2323
+ forceUpdate: m,
2324
+ attributes: {},
2325
+ styles: {
2326
+ popper: {},
2327
+ arrow: {}
2328
+ }
2329
+ })), v = Fe(() => ({
2330
+ name: "updateStateModifier",
2331
+ enabled: !0,
2332
+ phase: "write",
2333
+ requires: ["computeStyles"],
2334
+ fn: ({
2335
+ state: p
2336
+ }) => {
2337
+ const w = {}, g = {};
2338
+ Object.keys(p.elements).forEach((N) => {
2339
+ w[N] = p.styles[N], g[N] = p.attributes[N];
2340
+ }), d({
2341
+ state: p,
2342
+ styles: w,
2343
+ attributes: g,
2344
+ update: u,
2345
+ forceUpdate: m,
2346
+ placement: p.placement
2347
+ });
2348
+ }
2349
+ }), [u, m, d]), b = Fe(() => (Ae(l.current, o) || (l.current = o), l.current), [o]);
2350
+ return z(() => {
2351
+ !f.current || !r || f.current.setOptions({
2352
+ placement: a,
2353
+ strategy: s,
2354
+ modifiers: [...b, v, fi]
2355
+ });
2356
+ }, [s, a, v, r, b]), z(() => {
2357
+ if (!(!r || e == null || t == null))
2358
+ return f.current = li(e, t, Object.assign({}, c, {
2359
+ placement: a,
2360
+ strategy: s,
2361
+ modifiers: [...b, mi, v]
2362
+ })), () => {
2363
+ f.current != null && (f.current.destroy(), f.current = void 0, d((p) => Object.assign({}, p, {
2364
+ attributes: {},
2365
+ styles: {
2366
+ popper: {}
2367
+ }
2368
+ })));
2369
+ };
2370
+ }, [r, e, t]), h;
2371
+ }
2372
+ const en = () => {
2373
+ };
2374
+ function vi(e) {
2375
+ return e.button === 0;
2376
+ }
2377
+ function gi(e) {
2378
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2379
+ }
2380
+ const ze = (e) => e && ("current" in e ? e.current : e), tn = {
2381
+ click: "mousedown",
2382
+ mouseup: "mousedown",
2383
+ pointerup: "pointerdown"
2384
+ };
2385
+ function bi(e, t = en, {
2386
+ disabled: n,
2387
+ clickTrigger: r = "click"
2388
+ } = {}) {
2389
+ const a = Q(!1), s = Q(!1), o = X((f) => {
2390
+ const u = ze(e);
2391
+ vn(!!u, "ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"), a.current = !u || gi(f) || !vi(f) || !!lt(u, f.target) || s.current, s.current = !1;
2392
+ }, [e]), c = ut((f) => {
2393
+ const u = ze(e);
2394
+ u && lt(u, f.target) ? s.current = !0 : s.current = !1;
2395
+ }), l = ut((f) => {
2396
+ a.current || t(f);
2397
+ });
2398
+ z(() => {
2399
+ var f, u;
2400
+ if (n || e == null) return;
2401
+ const m = on(ze(e)), h = m.defaultView || window;
2402
+ let d = (f = h.event) != null ? f : (u = h.parent) == null ? void 0 : u.event, v = null;
2403
+ tn[r] && (v = We(m, tn[r], c, !0));
2404
+ const b = We(m, r, o, !0), p = We(m, r, (g) => {
2405
+ if (g === d) {
2406
+ d = void 0;
2407
+ return;
2408
+ }
2409
+ l(g);
2410
+ });
2411
+ let w = [];
2412
+ return "ontouchstart" in m.documentElement && (w = [].slice.call(m.body.children).map((g) => We(g, "mousemove", en))), () => {
2413
+ v?.(), b(), p(), w.forEach((g) => g());
2414
+ };
2415
+ }, [e, n, r, o, c, l]);
2416
+ }
2417
+ const yi = () => {
2418
+ };
2419
+ function wi(e, t, {
2420
+ disabled: n,
2421
+ clickTrigger: r
2422
+ } = {}) {
2423
+ const a = t || yi;
2424
+ bi(e, a, {
2425
+ disabled: n,
2426
+ clickTrigger: r
2427
+ });
2428
+ const s = ut((o) => {
2429
+ Fn(o) && a(o);
2430
+ });
2431
+ z(() => {
2432
+ if (n || e == null) return;
2433
+ const o = on(ze(e));
2434
+ let c = (o.defaultView || window).event;
2435
+ const l = We(o, "keyup", (f) => {
2436
+ if (f === c) {
2437
+ c = void 0;
2438
+ return;
2439
+ }
2440
+ s(f);
2441
+ });
2442
+ return () => {
2443
+ l();
2444
+ };
2445
+ }, [e, n, s]);
2446
+ }
2447
+ function xi(e) {
2448
+ const t = {};
2449
+ return Array.isArray(e) ? (e?.forEach((n) => {
2450
+ t[n.name] = n;
2451
+ }), t) : e || t;
2452
+ }
2453
+ function Oi(e = {}) {
2454
+ return Array.isArray(e) ? e : Object.keys(e).map((t) => (e[t].name = t, e[t]));
2455
+ }
2456
+ function ji({
2457
+ enabled: e,
2458
+ enableEvents: t,
2459
+ placement: n,
2460
+ flip: r,
2461
+ offset: a,
2462
+ fixed: s,
2463
+ containerPadding: o,
2464
+ arrowElement: c,
2465
+ popperConfig: l = {}
2466
+ }) {
2467
+ var f, u, m, h;
2468
+ const d = xi(l.modifiers);
2469
+ return Object.assign({}, l, {
2470
+ placement: n,
2471
+ enabled: e,
2472
+ strategy: s ? "fixed" : l.strategy,
2473
+ modifiers: Oi(Object.assign({}, d, {
2474
+ eventListeners: {
2475
+ enabled: t,
2476
+ options: (f = d.eventListeners) == null ? void 0 : f.options
2477
+ },
2478
+ preventOverflow: Object.assign({}, d.preventOverflow, {
2479
+ options: Object.assign({
2480
+ padding: o
2481
+ }, (u = d.preventOverflow) == null ? void 0 : u.options)
2482
+ }),
2483
+ offset: {
2484
+ options: Object.assign({
2485
+ offset: a
2486
+ }, (m = d.offset) == null ? void 0 : m.options)
2487
+ },
2488
+ arrow: Object.assign({}, d.arrow, {
2489
+ enabled: !!c,
2490
+ options: Object.assign({}, (h = d.arrow) == null ? void 0 : h.options, {
2491
+ element: c
2492
+ })
2493
+ }),
2494
+ flip: Object.assign({
2495
+ enabled: !!r
2496
+ }, d.flip)
2497
+ }))
2498
+ });
2499
+ }
2500
+ const Pn = /* @__PURE__ */ ue.forwardRef((e, t) => {
2501
+ const {
2502
+ flip: n,
2503
+ offset: r,
2504
+ placement: a,
2505
+ containerPadding: s,
2506
+ popperConfig: o = {},
2507
+ transition: c,
2508
+ runTransition: l
2509
+ } = e, [f, u] = Ut(), [m, h] = Ut(), d = Ln(u, t), v = Ct(e.container), b = Ct(e.target), [p, w] = T(!e.show), g = hi(b, f, ji({
2510
+ placement: a,
2511
+ enableEvents: !!e.show,
2512
+ containerPadding: s || 5,
2513
+ flip: n,
2514
+ offset: r,
2515
+ arrowElement: m,
2516
+ popperConfig: o
2517
+ }));
2518
+ e.show && p && w(!1);
2519
+ const N = (...k) => {
2520
+ w(!0), e.onExited && e.onExited(...k);
2521
+ }, y = e.show || !p;
2522
+ if (wi(f, e.onHide, {
2523
+ disabled: !e.rootClose || e.rootCloseDisabled,
2524
+ clickTrigger: e.rootCloseEvent
2525
+ }), !y)
2526
+ return null;
2527
+ const {
2528
+ onExit: j,
2529
+ onExiting: O,
2530
+ onEnter: M,
2531
+ onEntering: E,
2532
+ onEntered: S
2533
+ } = e;
2534
+ let D = e.children(Object.assign({}, g.attributes.popper, {
2535
+ style: g.styles.popper,
2536
+ ref: d
2537
+ }), {
2538
+ popper: g,
2539
+ placement: a,
2540
+ show: !!e.show,
2541
+ arrowProps: Object.assign({}, g.attributes.arrow, {
2542
+ style: g.styles.arrow,
2543
+ ref: h
2544
+ })
2545
+ });
2546
+ return D = Bn(c, l, {
2547
+ in: !!e.show,
2548
+ appear: !0,
2549
+ mountOnEnter: !0,
2550
+ unmountOnExit: !0,
2551
+ children: D,
2552
+ onExit: j,
2553
+ onExiting: O,
2554
+ onExited: N,
2555
+ onEnter: M,
2556
+ onEntering: E,
2557
+ onEntered: S
2558
+ }), v ? /* @__PURE__ */ qn.createPortal(D, v) : null;
2559
+ });
2560
+ Pn.displayName = "Overlay";
2561
+ const Ni = typeof global < "u" && // @ts-ignore
2562
+ global.navigator && // @ts-ignore
2563
+ global.navigator.product === "ReactNative", Mi = typeof document < "u", Pi = Mi || Ni ? Tn : z, Dn = /* @__PURE__ */ ue.forwardRef(({
2564
+ className: e,
2565
+ bsPrefix: t,
2566
+ as: n = "div",
2567
+ ...r
2568
+ }, a) => (t = je(t, "popover-header"), /* @__PURE__ */ i.jsx(n, {
2569
+ ref: a,
2570
+ className: ge(e, t),
2571
+ ...r
2572
+ })));
2573
+ Dn.displayName = "PopoverHeader";
2574
+ const Nt = /* @__PURE__ */ ue.forwardRef(({
2575
+ className: e,
2576
+ bsPrefix: t,
2577
+ as: n = "div",
2578
+ ...r
2579
+ }, a) => (t = je(t, "popover-body"), /* @__PURE__ */ i.jsx(n, {
2580
+ ref: a,
2581
+ className: ge(e, t),
2582
+ ...r
2583
+ })));
2584
+ Nt.displayName = "PopoverBody";
2585
+ function _n(e, t) {
2586
+ let n = e;
2587
+ return e === "left" ? n = t ? "end" : "start" : e === "right" && (n = t ? "start" : "end"), n;
2588
+ }
2589
+ function kn(e = "absolute") {
2590
+ return {
2591
+ position: e,
2592
+ top: "0",
2593
+ left: "0",
2594
+ opacity: "0",
2595
+ pointerEvents: "none"
2596
+ };
2597
+ }
2598
+ const En = /* @__PURE__ */ ue.forwardRef(({
2599
+ bsPrefix: e,
2600
+ placement: t = "right",
2601
+ className: n,
2602
+ style: r,
2603
+ children: a,
2604
+ body: s,
2605
+ arrowProps: o,
2606
+ hasDoneInitialMeasure: c,
2607
+ popper: l,
2608
+ show: f,
2609
+ ...u
2610
+ }, m) => {
2611
+ const h = je(e, "popover"), d = cn(), [v] = t?.split("-") || [], b = _n(v, d);
2612
+ let p = r;
2613
+ return f && !c && (p = {
2614
+ ...r,
2615
+ ...kn(l?.strategy)
2616
+ }), /* @__PURE__ */ i.jsxs("div", {
2617
+ ref: m,
2618
+ role: "tooltip",
2619
+ style: p,
2620
+ "x-placement": v,
2621
+ className: ge(n, h, v && `bs-popover-${b}`),
2622
+ ...u,
2623
+ children: [/* @__PURE__ */ i.jsx("div", {
2624
+ className: "popover-arrow",
2625
+ ...o
2626
+ }), s ? /* @__PURE__ */ i.jsx(Nt, {
2627
+ children: a
2628
+ }) : a]
2629
+ });
2630
+ });
2631
+ En.displayName = "Popover";
2632
+ const Di = Object.assign(En, {
2633
+ Header: Dn,
2634
+ Body: Nt,
2635
+ // Default popover offset.
2636
+ // https://github.com/twbs/bootstrap/blob/5c32767e0e0dbac2d934bcdee03719a65d3f1187/js/src/popover.js#L28
2637
+ POPPER_OFFSET: [0, 8]
2638
+ }), Sn = /* @__PURE__ */ ue.forwardRef(({
2639
+ bsPrefix: e,
2640
+ placement: t = "right",
2641
+ className: n,
2642
+ style: r,
2643
+ children: a,
2644
+ arrowProps: s,
2645
+ hasDoneInitialMeasure: o,
2646
+ popper: c,
2647
+ show: l,
2648
+ ...f
2649
+ }, u) => {
2650
+ e = je(e, "tooltip");
2651
+ const m = cn(), [h] = t?.split("-") || [], d = _n(h, m);
2652
+ let v = r;
2653
+ return l && !o && (v = {
2654
+ ...r,
2655
+ ...kn(c?.strategy)
2656
+ }), /* @__PURE__ */ i.jsxs("div", {
2657
+ ref: u,
2658
+ style: v,
2659
+ role: "tooltip",
2660
+ "x-placement": h,
2661
+ className: ge(n, e, `bs-tooltip-${d}`),
2662
+ ...f,
2663
+ children: [/* @__PURE__ */ i.jsx("div", {
2664
+ className: "tooltip-arrow",
2665
+ ...s
2666
+ }), /* @__PURE__ */ i.jsx("div", {
2667
+ className: `${e}-inner`,
2668
+ children: a
2669
+ })]
2670
+ });
2671
+ });
2672
+ Sn.displayName = "Tooltip";
2673
+ const Z = Object.assign(Sn, {
2674
+ // Default tooltip offset.
2675
+ // https://github.com/twbs/bootstrap/blob/beca2a6c7f6bc88b6449339fc76edcda832c59e5/js/src/tooltip.js#L65
2676
+ TOOLTIP_OFFSET: [0, 6]
2677
+ });
2678
+ function _i(e) {
2679
+ const t = Q(null), n = je(void 0, "popover"), r = je(void 0, "tooltip"), a = Fe(() => ({
2680
+ name: "offset",
2681
+ options: {
2682
+ offset: () => {
2683
+ if (e)
2684
+ return e;
2685
+ if (t.current) {
2686
+ if (Tt(t.current, n))
2687
+ return Di.POPPER_OFFSET;
2688
+ if (Tt(t.current, r))
2689
+ return Z.TOOLTIP_OFFSET;
2690
+ }
2691
+ return [0, 0];
2692
+ }
2693
+ }
2694
+ }), [e, n, r]);
2695
+ return [t, [a]];
2696
+ }
2697
+ function ki(e, t) {
2698
+ const {
2699
+ ref: n
2700
+ } = e, {
2701
+ ref: r
2702
+ } = t;
2703
+ e.ref = n.__wrapped || (n.__wrapped = (a) => n(dt(a))), t.ref = r.__wrapped || (r.__wrapped = (a) => r(dt(a)));
2704
+ }
2705
+ const Cn = /* @__PURE__ */ ue.forwardRef(({
2706
+ children: e,
2707
+ transition: t = Wt,
2708
+ popperConfig: n = {},
2709
+ rootClose: r = !1,
2710
+ placement: a = "top",
2711
+ show: s = !1,
2712
+ ...o
2713
+ }, c) => {
2714
+ const l = Q({}), [f, u] = T(null), [m, h] = _i(o.offset), d = ln(c, m), v = t === !0 ? Wt : t || void 0, b = Yn((p) => {
2715
+ u(p), n == null || n.onFirstUpdate == null || n.onFirstUpdate(p);
2716
+ });
2717
+ return Pi(() => {
2718
+ f && o.target && (l.current.scheduleUpdate == null || l.current.scheduleUpdate());
2719
+ }, [f, o.target]), z(() => {
2720
+ s || u(null);
2721
+ }, [s]), /* @__PURE__ */ i.jsx(Pn, {
2722
+ ...o,
2723
+ ref: d,
2724
+ popperConfig: {
2725
+ ...n,
2726
+ modifiers: h.concat(n.modifiers || []),
2727
+ onFirstUpdate: b
2728
+ },
2729
+ transition: v,
2730
+ rootClose: r,
2731
+ placement: a,
2732
+ show: s,
2733
+ children: (p, {
2734
+ arrowProps: w,
2735
+ popper: g,
2736
+ show: N
2737
+ }) => {
2738
+ var y;
2739
+ ki(p, w);
2740
+ const j = g?.placement, O = Object.assign(l.current, {
2741
+ state: g?.state,
2742
+ scheduleUpdate: g?.update,
2743
+ placement: j,
2744
+ outOfBoundaries: (g == null || (y = g.state) == null || (y = y.modifiersData.hide) == null ? void 0 : y.isReferenceHidden) || !1,
2745
+ strategy: n.strategy
2746
+ }), M = !!f;
2747
+ return typeof e == "function" ? e({
2748
+ ...p,
2749
+ placement: j,
2750
+ show: N,
2751
+ ...!t && N && {
2752
+ className: "show"
2753
+ },
2754
+ popper: O,
2755
+ arrowProps: w,
2756
+ hasDoneInitialMeasure: M
2757
+ }) : /* @__PURE__ */ ue.cloneElement(e, {
2758
+ ...p,
2759
+ placement: j,
2760
+ arrowProps: w,
2761
+ popper: O,
2762
+ hasDoneInitialMeasure: M,
2763
+ className: ge(e.props.className, !t && N && "show"),
2764
+ style: {
2765
+ ...e.props.style,
2766
+ ...p.style
2767
+ }
2768
+ });
2769
+ }
2770
+ });
2771
+ });
2772
+ Cn.displayName = "Overlay";
2773
+ function Ei(e) {
2774
+ return e && typeof e == "object" ? e : {
2775
+ show: e,
2776
+ hide: e
2777
+ };
2778
+ }
2779
+ function nn(e, t, n) {
2780
+ const [r] = t, a = r.currentTarget, s = r.relatedTarget || r.nativeEvent[n];
2781
+ (!s || s !== a) && !lt(a, s) && e(...t);
2782
+ }
2783
+ Hn.oneOf(["click", "hover", "focus"]);
2784
+ const se = ({
2785
+ trigger: e = ["hover", "focus"],
2786
+ overlay: t,
2787
+ children: n,
2788
+ popperConfig: r = {},
2789
+ show: a,
2790
+ defaultShow: s = !1,
2791
+ onToggle: o,
2792
+ delay: c,
2793
+ placement: l,
2794
+ flip: f = l && l.indexOf("auto") !== -1,
2795
+ ...u
2796
+ }) => {
2797
+ const m = Q(null), h = ln(m, Un(n)), d = ra(), v = Q(""), [b, p] = sa(a, s, o), w = Ei(c), {
2798
+ onFocus: g,
2799
+ onBlur: N,
2800
+ onClick: y
2801
+ } = typeof n != "function" ? ue.Children.only(n).props : {}, j = (C) => {
2802
+ h(dt(C));
2803
+ }, O = X(() => {
2804
+ if (d.clear(), v.current = "show", !w.show) {
2805
+ p(!0);
2806
+ return;
2807
+ }
2808
+ d.set(() => {
2809
+ v.current === "show" && p(!0);
2810
+ }, w.show);
2811
+ }, [w.show, p, d]), M = X(() => {
2812
+ if (d.clear(), v.current = "hide", !w.hide) {
2813
+ p(!1);
2814
+ return;
2815
+ }
2816
+ d.set(() => {
2817
+ v.current === "hide" && p(!1);
2818
+ }, w.hide);
2819
+ }, [w.hide, p, d]), E = X((...C) => {
2820
+ O(), g?.(...C);
2821
+ }, [O, g]), S = X((...C) => {
2822
+ M(), N?.(...C);
2823
+ }, [M, N]), D = X((...C) => {
2824
+ p(!b), y?.(...C);
2825
+ }, [y, p, b]), k = X((...C) => {
2826
+ nn(O, C, "fromElement");
2827
+ }, [O]), W = X((...C) => {
2828
+ nn(M, C, "toElement");
2829
+ }, [M]), _ = e == null ? [] : [].concat(e), A = {
2830
+ ref: j
2831
+ };
2832
+ return _.indexOf("click") !== -1 && (A.onClick = D), _.indexOf("focus") !== -1 && (A.onFocus = E, A.onBlur = S), _.indexOf("hover") !== -1 && (process.env.NODE_ENV !== "production" && vn(_.length > 1, '[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'), A.onMouseOver = k, A.onMouseOut = W), /* @__PURE__ */ i.jsxs(i.Fragment, {
2833
+ children: [typeof n == "function" ? n(A) : /* @__PURE__ */ Wn(n, A), /* @__PURE__ */ i.jsx(Cn, {
2834
+ ...u,
2835
+ show: b,
2836
+ onHide: M,
2837
+ flip: f,
2838
+ placement: l,
2839
+ popperConfig: r,
2840
+ target: m.current,
2841
+ children: t
2842
+ })]
2843
+ });
2844
+ };
2845
+ function Si(e) {
2846
+ let t = e?.date, n = e?.format;
2847
+ return t ? /* @__PURE__ */ i.jsx("span", { "date-renderer": "ArticlesDate", children: vt(new Date(t), n || "MM/dd/yy - h:mmaa") }) : "Need date prop";
2848
+ }
2849
+ function Ci(e) {
2850
+ const { profile_photo: t, width: n, alt: r, hideDefault: a, activityStatus: s, user_id: o } = e;
2851
+ return t?.key ? /* @__PURE__ */ i.jsxs(
2852
+ "div",
2853
+ {
2854
+ "data-using-react-profile-photo": "true",
2855
+ className: `profile-photo-wrap ${n ? "" : "w-100 h-100"}`,
2856
+ style: {
2857
+ ...n && {
2858
+ width: n,
2859
+ height: n
2860
+ }
2861
+ },
2862
+ children: [
2863
+ /* @__PURE__ */ i.jsx(
2864
+ rn,
2865
+ {
2866
+ activityStatus: s,
2867
+ user_id: o
2868
+ }
2869
+ ),
2870
+ /* @__PURE__ */ i.jsx(
2871
+ "img",
2872
+ {
2873
+ className: "w-100 h-100",
2874
+ src: `${process.env.NEXT_PUBLIC_CDN}${t.key}`,
2875
+ style: { objectFit: "contain" },
2876
+ alt: r || "Profile photo of a user"
2877
+ }
2878
+ )
2879
+ ]
2880
+ }
2881
+ ) : /* @__PURE__ */ i.jsxs(
2882
+ "div",
2883
+ {
2884
+ "data-using-react-profile-photo": "true",
2885
+ className: ge(
2886
+ "profile-photo-wrap",
2887
+ {
2888
+ "w-100 h-100": !n,
2889
+ "d-none": a
2890
+ }
2891
+ ),
2892
+ style: {
2893
+ ...n && {
2894
+ width: n,
2895
+ height: n
2896
+ }
2897
+ },
2898
+ children: [
2899
+ /* @__PURE__ */ i.jsx(
2900
+ rn,
2901
+ {
2902
+ activityStatus: s,
2903
+ user_id: o
2904
+ }
2905
+ ),
2906
+ /* @__PURE__ */ i.jsx(
2907
+ "img",
2908
+ {
2909
+ className: "w-100 h-100",
2910
+ src: `${process.env.NEXT_PUBLIC_CDN}profile_photos/starter/articles.jpg`,
2911
+ style: { objectFit: "contain" },
2912
+ alt: r || "Profile photo of a user"
2913
+ }
2914
+ )
2915
+ ]
2916
+ }
2917
+ );
2918
+ }
2919
+ function rn({
2920
+ activityStatus: e,
2921
+ user_id: t
2922
+ }) {
2923
+ if (!(!e || !t))
2924
+ return /* @__PURE__ */ i.jsx(
2925
+ "div",
2926
+ {
2927
+ "data-user_id": t,
2928
+ className: ge(
2929
+ "online-status",
2930
+ {
2931
+ "status-online": e?.status == "Online" || t == "630f0b337c52851e754b03f7",
2932
+ "status-offline": e?.status == "Offline",
2933
+ "status-away": e?.status == "Away",
2934
+ // Maybe one day show that friends are in a game or on a page if they want to share, we already collect this data anyway!
2935
+ "activity-active": !1
2936
+ }
2937
+ )
2938
+ }
2939
+ );
2940
+ }
2941
+ const Ti = (e) => (t, n, r) => (r.revalidateOnFocus = !1, r.revalidateIfStale = !1, r.revalidateOnReconnect = !1, e(t, n, r)), Wi = Vn(un, Ti), Ai = (e) => dn.get(e.url, {
2942
+ params: {
2943
+ user_id: e.user_id
2944
+ }
2945
+ }).then((t) => t.data), Ri = {
2946
+ dedupingInterval: 1e3 * 60 * 1,
2947
+ focusThrottleInterval: 1e3 * 60 * 1
2948
+ // fallbackData: []
2949
+ }, an = (e) => {
2950
+ const { data: t, error: n, isLoading: r, isValidating: a, mutate: s } = Wi(
2951
+ e?.user_id ? {
2952
+ url: process.env.NODE_ENV === "development" ? "http://localhost:3001/api/user-public/getUserDetails" : "https://articles.media/api/user-public/getUserDetails",
2953
+ // "/api/user-public/getUserDetails",
2954
+ user_id: e.user_id
2955
+ } : null,
2956
+ Ai,
2957
+ Ri
2958
+ );
2959
+ return {
2960
+ data: t,
2961
+ error: n,
2962
+ isLoading: r,
2963
+ isValidating: a,
2964
+ mutate: s
2965
+ };
2966
+ };
2967
+ function ct({ className: e, noOutline: t, children: n, inline: r }) {
2968
+ const [s, o] = T();
2969
+ if (z(() => {
2970
+ o(!0);
2971
+ }, []), n && (!1)?.roles?.isDev && s)
2972
+ return /* @__PURE__ */ i.jsx("div", { className: `is-dev-content ${t && "no-outline"} ${e} ${r && "d-inline-block"}`, children: n });
2973
+ }
2974
+ function $i({
2975
+ activeLayoutProposalSentiments: e
2976
+ }) {
2977
+ return /* @__PURE__ */ i.jsx("div", { children: e.user_sentiments?.map((t) => /* @__PURE__ */ i.jsxs("div", { className: "card card-articles card-sm border mb-2", children: [
2978
+ /* @__PURE__ */ i.jsxs("div", { className: "card-header small", children: [
2979
+ "Gave their sentiment on ",
2980
+ /* @__PURE__ */ i.jsx("b", { children: t.populated_proposal.title })
2981
+ ] }),
2982
+ /* @__PURE__ */ i.jsxs("div", { className: "card-body small p-2", children: [
2983
+ /* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center border-bottom pb-1", children: [
2984
+ t.sentiment_status == "Agree" && /* @__PURE__ */ i.jsx("div", { className: "badge shadow-articles bg-success", children: "Agree" }),
2985
+ t.sentiment_status == "Needs Work" && /* @__PURE__ */ i.jsx("div", { className: "badge shadow-articles bg-warning text-dark", children: "Needs Work" }),
2986
+ t.sentiment_status == "Disagree" && /* @__PURE__ */ i.jsx("div", { className: "badge shadow-articles bg-danger", children: "Disagree" }),
2987
+ /* @__PURE__ */ i.jsx("span", { className: "small ms-2", children: vt(new Date(t.date), "M/dd/yy") })
2988
+ ] }),
2989
+ /* @__PURE__ */ i.jsx("div", { className: "mt-1", children: t.comment })
2990
+ ] }),
2991
+ /* @__PURE__ */ i.jsx("div", { className: "card-footer", children: /* @__PURE__ */ i.jsx(
2992
+ Ve,
2993
+ {
2994
+ prefetch: !1,
2995
+ href: `https://articles.media/politics/proposals/${t.populated_proposal.url}?interaction_id=${t._id}`,
2996
+ children: /* @__PURE__ */ i.jsx(
2997
+ F,
2998
+ {
2999
+ small: !0,
3000
+ children: "View"
3001
+ }
3002
+ )
3003
+ }
3004
+ ) })
3005
+ ] }, t._id)) });
3006
+ }
3007
+ function Fi(e) {
3008
+ return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
3009
+ }
3010
+ const Li = (e) => dn.get(e).then((t) => t.data), Bi = (e) => {
3011
+ const { data: t, error: n, isLoading: r, mutate: a } = un(
3012
+ process.env.NODE_ENV === "development" ? "http://localhost:3001/api/news/resources/political-parties" : "https://articles.media/api/news/resources/political-parties",
3013
+ Li,
3014
+ {
3015
+ dedupingInterval: 6e5
3016
+ // fallbackData: []
3017
+ }
3018
+ );
3019
+ return {
3020
+ data: t,
3021
+ error: n,
3022
+ isLoading: r,
3023
+ mutate: a
3024
+ };
3025
+ };
3026
+ function zi(e) {
3027
+ const {
3028
+ populated_user: t,
3029
+ hidePhoto: n,
3030
+ visibleItems: r,
3031
+ size: a,
3032
+ className: s,
3033
+ dangerousPopulate: o,
3034
+ user_id: c,
3035
+ buttonType: l,
3036
+ children: f,
3037
+ fakeMembership: u
3038
+ // name
3039
+ } = e, [m, h] = T(!1), [d, v] = T({}), [b, p] = T([]), [w, g] = T([]), [N, y] = T(null), [j, O] = T([]), [M, E] = T([]), [S, D] = T(!1), k = !1, { data: W } = Bi(), [_, A] = T("Proposals Stance"), C = () => {
3040
+ h(!1);
3041
+ };
3042
+ z(() => {
3043
+ t && v({
3044
+ ...t
3045
+ });
3046
+ }, []);
3047
+ const [B, q] = T(!1), [be, ae] = T([]), [ce, _e] = T([]), { data: R, mutate: ye } = an(
3048
+ (c || t?._id) && (m || o) ? {
3049
+ user_id: c || t?._id
3050
+ } : null
3051
+ ), { data: V, mutate: ee } = an(
3052
+ k?._id && (m || o) ? {
3053
+ user_id: k?._id
3054
+ } : null
3055
+ );
3056
+ z(() => {
3057
+ R && (console.log("publicUserData", R), v(R), p(R?.populated_public_layouts), g(R?.populated_public_donations), y(R?.populated_public_donations.total), E(R?.populated_public_proposals), ae(R?.populated_public_proposals_stance), O(R?.populated_public_news_submissions || []));
3058
+ }, [R]), z(() => {
3059
+ V && (console.log("personalUserData", V), _e(V?.populated_public_proposals_stance));
3060
+ }, [V]);
3061
+ let ie = (t || d)?.articles_membership?.plan.replace(" ", "-").toLowerCase(), we = u?.replace(" ", "-").toLowerCase();
3062
+ const K = "https://articles.media/images/store/memberships/", ke = () => {
3063
+ let x = (t || d)?.articles_membership?.status == "Active";
3064
+ return /* @__PURE__ */ i.jsxs(
3065
+ "div",
3066
+ {
3067
+ style: { position: "relative" } && (a == "lg" ? { fontSize: "1.5rem" } : {}),
3068
+ className: `view-user-modal-badge-wrap ${a == "lg" && "large"} ${s && s}`,
3069
+ children: [
3070
+ /* @__PURE__ */ i.jsxs(
3071
+ "span",
3072
+ {
3073
+ onClick: () => {
3074
+ h(!0);
3075
+ },
3076
+ className: "position-relative view-user-modal-badge d-flex justify-content-between align-items-center badge bg-articles-secondary shadow-articles badge-hover ",
3077
+ children: [
3078
+ (x || u) && /* @__PURE__ */ i.jsx(
3079
+ "i",
3080
+ {
3081
+ className: `fad membership-badge ${we || ie} fa-badge-check`,
3082
+ style: {
3083
+ position: "absolute",
3084
+ // top: '50%',
3085
+ top: "-2px",
3086
+ left: "-2px",
3087
+ // transform: 'translateY(-50%)',
3088
+ fontSize: "0.9rem",
3089
+ zIndex: 1
3090
+ // marginRight: '-0.5rem'
3091
+ // color: `${obj.badge_color}!important`
3092
+ }
3093
+ }
3094
+ ),
3095
+ /* @__PURE__ */ i.jsxs("div", { className: `d-flex align-items-center ${x && ""}`, children: [
3096
+ !n && /* @__PURE__ */ i.jsx("div", { className: a == "lg" ? "me-0" : "me-1" }),
3097
+ d.display_name || t?.display_name
3098
+ ] }),
3099
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-plus-square me-0 ms-2" })
3100
+ ]
3101
+ }
3102
+ ),
3103
+ r?.includes("Not Verified") && t?.verified?.status !== "Verified" && /* @__PURE__ */ i.jsx(
3104
+ se,
3105
+ {
3106
+ placement: "bottom",
3107
+ overlay: /* @__PURE__ */ i.jsx(Z, { style: { pointerEvents: "none" }, id: "button-tooltip", children: /* @__PURE__ */ i.jsx("div", { className: "", children: "User is not verified" }) }),
3108
+ children: /* @__PURE__ */ i.jsxs(
3109
+ "span",
3110
+ {
3111
+ className: "verification-user-badge badge bg-danger d-flex align-items-center",
3112
+ children: [
3113
+ /* @__PURE__ */ i.jsx("i", { style: { paddingBottom: "2px" }, className: "fas fa-robot me-1" }),
3114
+ /* @__PURE__ */ i.jsx("span", { className: "", children: "Unverified" })
3115
+ ]
3116
+ }
3117
+ )
3118
+ }
3119
+ ),
3120
+ // true
3121
+ // ||
3122
+ // visibleItems?.includes("Membership")
3123
+ !1,
3124
+ r?.includes("Verification Status") && /* @__PURE__ */ i.jsx(
3125
+ se,
3126
+ {
3127
+ placement: "bottom",
3128
+ overlay: /* @__PURE__ */ i.jsx(
3129
+ Z,
3130
+ {
3131
+ id: "button-tooltip",
3132
+ style: { pointerEvents: "none", transformX: "-20px" },
3133
+ children: t?.verified?.status == "Verified" ? "Verified" : " Not Verified"
3134
+ }
3135
+ ),
3136
+ children: t?.verified?.status == "Verified" ? /* @__PURE__ */ i.jsx("span", { className: "verification-user-badge badge bg-success cursor-pointer", children: /* @__PURE__ */ i.jsx("i", { className: "fas fa-check me-0" }) }) : /* @__PURE__ */ i.jsxs("span", { className: "verification-user-badge badge bg-danger cursor-pointer", children: [
3137
+ /* @__PURE__ */ i.jsx("i", { className: "fas fa-robot me-1" }),
3138
+ /* @__PURE__ */ i.jsx("span", { children: "?" })
3139
+ ] })
3140
+ }
3141
+ ),
3142
+ r?.includes("Political Party") && /* @__PURE__ */ i.jsx("div", { className: "d-flex", children: (t || d)?.political?.party_id && /* @__PURE__ */ i.jsx(
3143
+ se,
3144
+ {
3145
+ placement: "bottom",
3146
+ overlay: /* @__PURE__ */ i.jsxs(
3147
+ Z,
3148
+ {
3149
+ id: "tooltip-bottom",
3150
+ style: { position: "fixed" },
3151
+ children: [
3152
+ /* @__PURE__ */ i.jsx(
3153
+ "img",
3154
+ {
3155
+ width: "40px",
3156
+ height: "40px",
3157
+ style: {
3158
+ objectFit: "contain",
3159
+ padding: "0px",
3160
+ zIndex: "10",
3161
+ position: "relative"
3162
+ },
3163
+ loading: "lazy",
3164
+ src: `${process.env.NEXT_PUBLIC_CDN}` + W?.find((H) => H._id == (t || d)?.political?.party_id)?.logo,
3165
+ alt: ""
3166
+ }
3167
+ ),
3168
+ /* @__PURE__ */ i.jsx(
3169
+ "span",
3170
+ {
3171
+ className: "ms-2",
3172
+ children: W?.find((H) => H._id == (t || d)?.political?.party_id)?.name
3173
+ }
3174
+ )
3175
+ ]
3176
+ }
3177
+ ),
3178
+ children: /* @__PURE__ */ i.jsx(
3179
+ "div",
3180
+ {
3181
+ className: "badge bg-light text-capitalize ms-0 shadow-articles h-100 d-flex justify-content-center align-items-center",
3182
+ style: {
3183
+ padding: "0 0.15rem",
3184
+ cursor: "pointer"
3185
+ },
3186
+ children: (t || d)?.political?.party_id && ((t || d)?.political?.party_id == "62a830440593acbd4061c48c" ? /* @__PURE__ */ i.jsx("i", { className: "fad fa-unlink unaffiliated-icon fa-lg me-0" }) : /* @__PURE__ */ i.jsx(
3187
+ "img",
3188
+ {
3189
+ width: "15px",
3190
+ height: "15px",
3191
+ style: {
3192
+ objectFit: "contain",
3193
+ padding: "0px"
3194
+ },
3195
+ loading: "lazy",
3196
+ src: `${process.env.NEXT_PUBLIC_CDN}` + W?.find((H) => H._id == (t || d)?.political?.party_id)?.logo,
3197
+ alt: ""
3198
+ }
3199
+ ))
3200
+ }
3201
+ )
3202
+ }
3203
+ ) })
3204
+ ]
3205
+ }
3206
+ );
3207
+ };
3208
+ function Ze(x) {
3209
+ return x === "Link" ? /* @__PURE__ */ i.jsx(
3210
+ "span",
3211
+ {
3212
+ type: "button",
3213
+ onClick: () => {
3214
+ h(!0);
3215
+ },
3216
+ children: f
3217
+ }
3218
+ ) : /* @__PURE__ */ i.jsx(ke, {});
3219
+ }
3220
+ const [$, xe] = T(!1), [Ee, Mt] = T({}), [Pt, et] = T({});
3221
+ z(() => {
3222
+ $ && Object.keys(Ee).length == 0 && console.log("adminUserData", V);
3223
+ }, [$]);
3224
+ const [tt, nt] = T(null);
3225
+ function rt() {
3226
+ alert("TODO");
3227
+ }
3228
+ const te = Fe(() => b?.filter((x) => x.user_layout)?.[0]?.url, [b]);
3229
+ return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3230
+ Ze(l),
3231
+ /* @__PURE__ */ i.jsxs(
3232
+ Ie,
3233
+ {
3234
+ show: m,
3235
+ size: "lg",
3236
+ id: "view-users-modal",
3237
+ className: "view-users-modal articles-modal",
3238
+ scrollable: !0,
3239
+ onHide: C,
3240
+ children: [
3241
+ /* @__PURE__ */ i.jsx(Ie.Header, { closeButton: !0, children: /* @__PURE__ */ i.jsx("div", { className: "w-100 d-flex justify-content-between align-items-center", children: /* @__PURE__ */ i.jsx("h3", { className: "mb-0", children: "User Info" }) }) }),
3242
+ /* @__PURE__ */ i.jsx(Ie.Body, { children: /* @__PURE__ */ i.jsxs("div", { className: "main-panel", children: [
3243
+ /* @__PURE__ */ i.jsxs("div", { className: "d-flex", children: [
3244
+ /* @__PURE__ */ i.jsxs(
3245
+ "div",
3246
+ {
3247
+ className: "d-flex flex-column align-items-center",
3248
+ style: {
3249
+ width: "100px"
3250
+ },
3251
+ children: [
3252
+ /* @__PURE__ */ i.jsx(
3253
+ "div",
3254
+ {
3255
+ type: "button",
3256
+ onClick: () => {
3257
+ nt(`${process.env.NEXT_PUBLIC_CDN}${d?.profile_photo?.key}`);
3258
+ },
3259
+ children: /* @__PURE__ */ i.jsx(
3260
+ Ci,
3261
+ {
3262
+ width: "100px",
3263
+ profile_photo: d?.profile_photo
3264
+ }
3265
+ )
3266
+ }
3267
+ ),
3268
+ /* @__PURE__ */ i.jsx(
3269
+ se,
3270
+ {
3271
+ placement: "bottom",
3272
+ overlay: /* @__PURE__ */ i.jsx(
3273
+ Z,
3274
+ {
3275
+ id: "tooltip-bottom",
3276
+ children: "Joined Articles Media"
3277
+ }
3278
+ ),
3279
+ children: /* @__PURE__ */ i.jsxs("div", { className: "badge bg-black border border-white shadow-sm rounded-0", children: [
3280
+ "Joined ",
3281
+ d?.sign_up_date && vt(new Date(d?.sign_up_date), "M/dd/yy")
3282
+ ] })
3283
+ }
3284
+ ),
3285
+ te && /* @__PURE__ */ i.jsx(
3286
+ Ve,
3287
+ {
3288
+ href: (
3289
+ // `${ROUTES.LAYOUTS}/${userLayoutLink}`
3290
+ `https://articles.media/layouts/${te}`
3291
+ ),
3292
+ className: "mt-2 w-100",
3293
+ children: /* @__PURE__ */ i.jsxs(
3294
+ F,
3295
+ {
3296
+ className: "w-100",
3297
+ style: {
3298
+ // fontSize: '0.75rem'
3299
+ },
3300
+ children: [
3301
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-home" }),
3302
+ /* @__PURE__ */ i.jsx("span", { children: "Layout" })
3303
+ ]
3304
+ }
3305
+ )
3306
+ }
3307
+ ),
3308
+ /* @__PURE__ */ i.jsx(ct, { className: "w-100", children: /* @__PURE__ */ i.jsx(
3309
+ Ve,
3310
+ {
3311
+ href: {
3312
+ // pathname: ROUTES.MESSAGES,
3313
+ pathname: "https://articles.media/messages",
3314
+ query: {
3315
+ startMsg: d?._id
3316
+ }
3317
+ },
3318
+ className: "mt-2 w-100",
3319
+ children: /* @__PURE__ */ i.jsxs(
3320
+ F,
3321
+ {
3322
+ className: "w-100",
3323
+ style: {
3324
+ fontSize: "0.88rem"
3325
+ },
3326
+ children: [
3327
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-envelope" }),
3328
+ /* @__PURE__ */ i.jsx("span", { children: "Message" })
3329
+ ]
3330
+ }
3331
+ )
3332
+ }
3333
+ ) }),
3334
+ $ && /* @__PURE__ */ i.jsxs(
3335
+ "div",
3336
+ {
3337
+ className: "d-flex flex-column w-100 mt-2",
3338
+ style: {
3339
+ maxWidth: "100px"
3340
+ },
3341
+ children: [
3342
+ /* @__PURE__ */ i.jsx(F, { variant: "warning", small: !0, className: "", children: /* @__PURE__ */ i.jsx(Textfit, { max: 14, mode: "single", children: "Remove Photo" }) }),
3343
+ Ee?.user?.profile_photo?.banned_uploads ? /* @__PURE__ */ i.jsx(
3344
+ F,
3345
+ {
3346
+ variant: "warning",
3347
+ small: !0,
3348
+ className: "",
3349
+ onClick: () => {
3350
+ toggleBanCustomPhotoUpload();
3351
+ },
3352
+ children: /* @__PURE__ */ i.jsx(Textfit, { max: 14, mode: "single", children: "Unban Uploads" })
3353
+ }
3354
+ ) : /* @__PURE__ */ i.jsx(
3355
+ F,
3356
+ {
3357
+ variant: "danger",
3358
+ small: !0,
3359
+ className: "",
3360
+ onClick: () => {
3361
+ toggleBanCustomPhotoUpload();
3362
+ },
3363
+ children: /* @__PURE__ */ i.jsx(Textfit, { max: 14, mode: "single", children: "Ban Uploads" })
3364
+ }
3365
+ )
3366
+ ]
3367
+ }
3368
+ )
3369
+ ]
3370
+ }
3371
+ ),
3372
+ /* @__PURE__ */ i.jsxs("div", { className: "mx-2", children: [
3373
+ /* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-center mb-1", children: [
3374
+ /* @__PURE__ */ i.jsx("h5", { className: "mb-0", children: t?.display_name || d.display_name }),
3375
+ /* @__PURE__ */ i.jsxs("span", { className: "ms-2", children: [
3376
+ " @",
3377
+ d?.username
3378
+ ] })
3379
+ ] }),
3380
+ d?.articles_membership?.status == "Active" && /* @__PURE__ */ i.jsx(
3381
+ se,
3382
+ {
3383
+ placement: "bottom",
3384
+ overlay: /* @__PURE__ */ i.jsx(
3385
+ Z,
3386
+ {
3387
+ id: "tooltip-bottom",
3388
+ children: /* @__PURE__ */ i.jsxs("div", { className: "d-flex flex-column py-1", children: [
3389
+ /* @__PURE__ */ i.jsxs("div", { className: "position-relative", children: [
3390
+ d?.articles_membership?.plan == "Supporter" && /* @__PURE__ */ i.jsx("img", { src: `${K}supporter.jpg`, width: 50, height: 50, alt: "Membership plan level" }),
3391
+ d?.articles_membership?.plan == "Premium Supporter" && /* @__PURE__ */ i.jsx("img", { src: `${K}premiumSupporter.jpg`, width: 50, height: 50, alt: "Membership plan level" }),
3392
+ d?.articles_membership?.plan == "Advocate" && /* @__PURE__ */ i.jsx("img", { src: `${K}advocate.jpg`, width: 50, height: 50, alt: "Membership plan level" }),
3393
+ /* @__PURE__ */ i.jsx(
3394
+ "i",
3395
+ {
3396
+ className: `fad membership-badge ${ie} fa-badge-check me-1`,
3397
+ style: {
3398
+ position: "absolute",
3399
+ top: "50%",
3400
+ // top: '-2px',
3401
+ left: "50%",
3402
+ transform: "translateX(-50%) translateY(-50%)",
3403
+ fontSize: "1.5rem"
3404
+ // marginRight: '-0.5rem'
3405
+ // color: `${obj.badge_color}!important`
3406
+ }
3407
+ }
3408
+ )
3409
+ ] }),
3410
+ /* @__PURE__ */ i.jsxs("span", { className: "lh-sm", children: [
3411
+ /* @__PURE__ */ i.jsx("div", { children: d?.articles_membership?.plan }),
3412
+ /* @__PURE__ */ i.jsxs("div", { className: "small", children: [
3413
+ "Since ",
3414
+ /* @__PURE__ */ i.jsx(Si, { format: "MM/dd/yy", date: d?.articles_membership?.membership_started })
3415
+ ] })
3416
+ ] })
3417
+ ] })
3418
+ }
3419
+ ),
3420
+ children: /* @__PURE__ */ i.jsxs(
3421
+ "div",
3422
+ {
3423
+ className: "badge bg-articles border me-1 mb-1",
3424
+ style: {
3425
+ // padding: '0 0.25rem',
3426
+ cursor: "pointer"
3427
+ },
3428
+ children: [
3429
+ /* @__PURE__ */ i.jsx(
3430
+ "i",
3431
+ {
3432
+ className: `fad membership-badge ${ie} fa-badge-check me-1`,
3433
+ style: {
3434
+ // position: 'absolute',
3435
+ // top: '50%',
3436
+ // top: '-2px',
3437
+ // left: '-2px',
3438
+ // transform: 'translateY(-50%)',
3439
+ // fontSize: '0.9rem'
3440
+ // marginRight: '-0.5rem'
3441
+ // color: `${obj.badge_color}!important`
3442
+ }
3443
+ }
3444
+ ),
3445
+ /* @__PURE__ */ i.jsx("span", { children: d?.articles_membership?.plan }),
3446
+ /* @__PURE__ */ i.jsx("span", { className: "px-1", children: "|" }),
3447
+ /* @__PURE__ */ i.jsx("span", { className: "months fw-bold", children: nr(
3448
+ /* @__PURE__ */ new Date(),
3449
+ new Date(d?.articles_membership?.membership_started)
3450
+ ) || 0 })
3451
+ ]
3452
+ }
3453
+ )
3454
+ }
3455
+ ),
3456
+ d?.address?.state && /* @__PURE__ */ i.jsx(
3457
+ se,
3458
+ {
3459
+ placement: "bottom",
3460
+ overlay: d.address?.state?.length == 2 ? /* @__PURE__ */ i.jsxs(Z, { id: "tooltip-bottom", children: [
3461
+ "From the state of ",
3462
+ convertRegion(d.address?.state, "name") ? convertRegion(d.address?.state, "name")[0] : ""
3463
+ ] }) : /* @__PURE__ */ i.jsxs(Z, { id: "tooltip-bottom", children: [
3464
+ "From the state of ",
3465
+ d.address?.state
3466
+ ] }),
3467
+ children: /* @__PURE__ */ i.jsxs("div", { className: "badge bg-articles-secondary border me-1 mb-1", children: [
3468
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-map-pin me-1" }),
3469
+ d.address?.state
3470
+ ] })
3471
+ }
3472
+ ),
3473
+ d.verified?.status !== "Verified" && /* @__PURE__ */ i.jsx(
3474
+ se,
3475
+ {
3476
+ placement: "bottom",
3477
+ overlay: /* @__PURE__ */ i.jsx(Z, { id: "tooltip-bottom", children: "User is not verified" }),
3478
+ children: /* @__PURE__ */ i.jsxs("div", { className: "badge bg-danger shadow-articles me-1 mb-1", children: [
3479
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-robot me-1" }),
3480
+ "Unverified"
3481
+ ] })
3482
+ }
3483
+ ),
3484
+ d.verified?.status == "Verified" && /* @__PURE__ */ i.jsx(
3485
+ se,
3486
+ {
3487
+ placement: "bottom",
3488
+ overlay: /* @__PURE__ */ i.jsxs(
3489
+ Z,
3490
+ {
3491
+ id: "tooltip-bottom",
3492
+ className: "",
3493
+ children: [
3494
+ /* @__PURE__ */ i.jsxs("div", { children: [
3495
+ "Verified by ",
3496
+ d.verified?.verified_methods?.length,
3497
+ " method",
3498
+ d.verified?.verified_methods?.length > 1 && "s"
3499
+ ] }),
3500
+ /* @__PURE__ */ i.jsx("hr", {}),
3501
+ /* @__PURE__ */ i.jsx("div", { className: "pb-2", children: d.verified?.verified_methods?.map((x, H) => Object.keys(x)?.length > 0 ? /* @__PURE__ */ i.jsx(
3502
+ "div",
3503
+ {
3504
+ className: "object",
3505
+ children: x?.method_name
3506
+ },
3507
+ H
3508
+ ) : /* @__PURE__ */ i.jsx(
3509
+ "div",
3510
+ {
3511
+ className: "single",
3512
+ children: x
3513
+ },
3514
+ H
3515
+ )) })
3516
+ ]
3517
+ }
3518
+ ),
3519
+ children: /* @__PURE__ */ i.jsxs("div", { className: "badge bg-articles-secondary border me-1 mb-1", children: [
3520
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-star me-1" }),
3521
+ d.verified?.status
3522
+ ] })
3523
+ }
3524
+ ),
3525
+ d.political?.party_id && /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(
3526
+ se,
3527
+ {
3528
+ placement: "bottom",
3529
+ overlay: /* @__PURE__ */ i.jsx(Z, { id: "tooltip-bottom", children: /* @__PURE__ */ i.jsx("div", { children: "Users political party" }) }),
3530
+ children: /* @__PURE__ */ i.jsx(
3531
+ Ve,
3532
+ {
3533
+ href: (
3534
+ // `${ROUTES.RESOURCES_POLITICAL_PARTIES}/${(populated_user || userData)?.political?.party_id}`
3535
+ `https://articles.media/politics/parties/${(t || d)?.political?.party_id}`
3536
+ ),
3537
+ children: /* @__PURE__ */ i.jsx("div", { className: "badge bg-articles-secondary border shadow-articles text-capitalize me-1", children: /* @__PURE__ */ i.jsxs("div", { className: "", children: [
3538
+ (t || d)?.political?.party_id == "62a830440593acbd4061c48c" ? /* @__PURE__ */ i.jsx("i", { className: "fad fa-unlink unaffiliated-icon fa-lg me-0" }) : /* @__PURE__ */ i.jsx(
3539
+ "img",
3540
+ {
3541
+ width: "14px",
3542
+ height: "14px",
3543
+ style: {
3544
+ objectFit: "contain",
3545
+ padding: "0px"
3546
+ },
3547
+ loading: "lazy",
3548
+ src: `${process.env.NEXT_PUBLIC_CDN}` + W?.find((x) => x._id == d?.political?.party_id)?.logo,
3549
+ alt: ""
3550
+ }
3551
+ ),
3552
+ /* @__PURE__ */ i.jsx("span", { className: "ms-1", children: W?.find((x) => x._id == d.political?.party_id)?.name })
3553
+ ] }) })
3554
+ }
3555
+ )
3556
+ }
3557
+ ) }),
3558
+ /* @__PURE__ */ i.jsx("hr", {}),
3559
+ /* @__PURE__ */ i.jsx("div", { className: "small", children: d?._id == "5e90cc96579a17440c5d7d52" && /* @__PURE__ */ i.jsx("span", { children: "Founder of Articles Media, thank you for using the site, feel free to message me with any questions, concerns or anything else." }) })
3560
+ ] })
3561
+ ] }),
3562
+ /* @__PURE__ */ i.jsx("hr", {}),
3563
+ $ && /* @__PURE__ */ i.jsxs("div", { children: [
3564
+ /* @__PURE__ */ i.jsx("div", { className: "d-flex align-items-center justify-content-between", children: /* @__PURE__ */ i.jsx("div", { className: "small", children: "Admin Mode Toolbar" }) }),
3565
+ /* @__PURE__ */ i.jsxs("div", { children: [
3566
+ /* @__PURE__ */ i.jsxs("div", { className: "d-flex mb-2", children: [
3567
+ /* @__PURE__ */ i.jsx(
3568
+ F,
3569
+ {
3570
+ small: !0,
3571
+ variant: "warning",
3572
+ className: "",
3573
+ onClick: () => {
3574
+ loadAdminUserData();
3575
+ },
3576
+ children: /* @__PURE__ */ i.jsx("i", { className: "fad fa-redo me-0" })
3577
+ }
3578
+ ),
3579
+ /* @__PURE__ */ i.jsx(
3580
+ F,
3581
+ {
3582
+ active: $?.edit,
3583
+ small: !0,
3584
+ className: "",
3585
+ onClick: () => {
3586
+ xe({
3587
+ ...$,
3588
+ edit: !$?.edit
3589
+ });
3590
+ },
3591
+ children: "Edit Mode"
3592
+ }
3593
+ ),
3594
+ $?.edit && /* @__PURE__ */ i.jsx(
3595
+ F,
3596
+ {
3597
+ small: !0,
3598
+ variant: "success",
3599
+ className: "me-0",
3600
+ onClick: () => {
3601
+ rt();
3602
+ },
3603
+ children: /* @__PURE__ */ i.jsx("i", { className: "fad fa-save me-0" })
3604
+ }
3605
+ )
3606
+ ] }),
3607
+ [
3608
+ "User Details",
3609
+ "Verification",
3610
+ "Moderation",
3611
+ "Bans",
3612
+ "Stripe",
3613
+ "Layouts",
3614
+ "Reset Password",
3615
+ "Sessions"
3616
+ ].map(
3617
+ (x) => /* @__PURE__ */ i.jsx(
3618
+ F,
3619
+ {
3620
+ active: x == $?.tab,
3621
+ small: !0,
3622
+ onClick: () => {
3623
+ xe({
3624
+ ...$,
3625
+ tab: x
3626
+ });
3627
+ },
3628
+ children: x
3629
+ },
3630
+ x
3631
+ )
3632
+ )
3633
+ ] }),
3634
+ /* @__PURE__ */ i.jsx("hr", {})
3635
+ ] }),
3636
+ /* @__PURE__ */ i.jsxs("div", { className: "pe-3 pb-3", children: [
3637
+ /* @__PURE__ */ i.jsx("div", { className: "mb-2 me-2", children: [
3638
+ {
3639
+ name: "Proposals Stance",
3640
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: /* @__PURE__ */ i.jsxs("div", { className: "small", children: [
3641
+ /* @__PURE__ */ i.jsx("span", { children: ce?.fundamental?.filter((x) => ce?.user_sentiments?.find((H) => H.proposal_id == x._id) ? x : null).length }),
3642
+ /* @__PURE__ */ i.jsx("span", { className: "px-1", children: "/" }),
3643
+ /* @__PURE__ */ i.jsx("span", { children: ce?.fundamental?.length })
3644
+ ] }) })
3645
+ },
3646
+ {
3647
+ name: "Proposal Sentiments",
3648
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: d?.populated_public_proposals_stance?.user_sentiments_count || 0 })
3649
+ },
3650
+ {
3651
+ name: "Proposal Comments",
3652
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: d?.populated_public_proposals_stance?.user_comments_count || 0 })
3653
+ },
3654
+ {
3655
+ name: "Proposal Submissions",
3656
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: M?.length || 0 })
3657
+ // TODO - Make conditional
3658
+ },
3659
+ {
3660
+ name: "News Comments",
3661
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: d?.populated_news_comments_count || 0 })
3662
+ },
3663
+ {
3664
+ name: "News Submissions",
3665
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: j?.length || 0 })
3666
+ // TODO - Make conditional
3667
+ },
3668
+ {
3669
+ name: "Verifications",
3670
+ // dev: true,
3671
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: d.verified?.verified_methods?.length || 0 })
3672
+ // TODO - Make conditional
3673
+ },
3674
+ {
3675
+ name: "Layouts",
3676
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: b?.length || 0 })
3677
+ },
3678
+ {
3679
+ name: "Donations",
3680
+ badge: /* @__PURE__ */ i.jsxs("span", { children: [
3681
+ /* @__PURE__ */ i.jsx("span", { className: "badge bg-primary ms-1", children: R?.populated_public_donations?.count || 0 }),
3682
+ /* @__PURE__ */ i.jsxs("span", { className: "badge bg-black", children: [
3683
+ "$",
3684
+ Fi((R?.populated_public_donations.total / 100).toFixed(2))
3685
+ ] })
3686
+ ] })
3687
+ },
3688
+ {
3689
+ name: "Orders",
3690
+ badge: /* @__PURE__ */ i.jsxs("span", { children: [
3691
+ /* @__PURE__ */ i.jsx("span", { className: "badge bg-primary ms-1", children: "0" }),
3692
+ /* @__PURE__ */ i.jsx("span", { className: "badge bg-black", children: "0" })
3693
+ ] })
3694
+ },
3695
+ {
3696
+ name: "Achievements",
3697
+ dev: !0,
3698
+ badge: /* @__PURE__ */ i.jsx("span", { className: "badge bg-black ms-1", children: "0" })
3699
+ // TODO - Make conditional
3700
+ }
3701
+ ].map((x) => (F, x.name == _, x.name, x.badge, x.name, x.dev ? /* @__PURE__ */ i.jsx(
3702
+ ct,
3703
+ {
3704
+ inline: !0,
3705
+ children: /* @__PURE__ */ i.jsxs(
3706
+ F,
3707
+ {
3708
+ onClick: () => A(x.name),
3709
+ active: x.name == _,
3710
+ small: !0,
3711
+ children: [
3712
+ x.name,
3713
+ x.badge
3714
+ ]
3715
+ },
3716
+ x.name
3717
+ )
3718
+ },
3719
+ x.name
3720
+ ) : /* @__PURE__ */ i.jsxs(
3721
+ F,
3722
+ {
3723
+ onClick: () => A(x.name),
3724
+ active: x.name == _,
3725
+ small: !0,
3726
+ children: [
3727
+ x.name,
3728
+ x.badge
3729
+ ]
3730
+ },
3731
+ x.name
3732
+ ))) }),
3733
+ _ == "Proposal Sentiments" && /* @__PURE__ */ i.jsx(
3734
+ $i,
3735
+ {
3736
+ activeLayoutProposalSentiments: be
3737
+ }
3738
+ )
3739
+ ] })
3740
+ ] }) }),
3741
+ /* @__PURE__ */ i.jsxs(Ie.Footer, { className: "justify-content-between", children: [
3742
+ k?._id == "5e90cc96579a17440c5d7d52" ? /* @__PURE__ */ i.jsxs("span", { children: [
3743
+ /* @__PURE__ */ i.jsxs(
3744
+ ct,
3745
+ {
3746
+ inline: !0,
3747
+ className: "me-2",
3748
+ children: [
3749
+ /* @__PURE__ */ i.jsxs(
3750
+ F,
3751
+ {
3752
+ onClick: () => {
3753
+ xe($ ? !1 : {
3754
+ tab: ""
3755
+ });
3756
+ },
3757
+ small: !0,
3758
+ active: $,
3759
+ variant: "",
3760
+ className: "me-1",
3761
+ children: [
3762
+ /* @__PURE__ */ i.jsx("i", { className: "fad fa-pen" }),
3763
+ /* @__PURE__ */ i.jsx("span", { children: "Admin Mode" })
3764
+ ]
3765
+ }
3766
+ ),
3767
+ /* @__PURE__ */ i.jsx(
3768
+ F,
3769
+ {
3770
+ onClick: () => {
3771
+ ye(), ee();
3772
+ },
3773
+ small: !0,
3774
+ variant: "warning",
3775
+ className: "",
3776
+ children: /* @__PURE__ */ i.jsx("i", { className: "fad fa-redo me-0" })
3777
+ }
3778
+ )
3779
+ ]
3780
+ }
3781
+ ),
3782
+ /* @__PURE__ */ i.jsx("span", { style: { fontSize: "0.8rem" }, children: d?._id })
3783
+ ] }) : /* @__PURE__ */ i.jsx("span", {}),
3784
+ /* @__PURE__ */ i.jsx("div", { className: "justify-content-", children: /* @__PURE__ */ i.jsx(F, { variant: "articles", onClick: C, children: "Close" }) })
3785
+ ] })
3786
+ ]
3787
+ }
3788
+ )
3789
+ ] });
3790
+ }
3791
+ export {
3792
+ zi as default
3793
+ };