rrule-temporal 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/totext.js CHANGED
@@ -1,950 +1 @@
1
- import { r as allowedWeekdays, t as RRuleTemporal } from "./src-B2XO5sNr.js";
2
- //#region src/totext.ts
3
- const en = {
4
- weekdayNames: [
5
- "Monday",
6
- "Tuesday",
7
- "Wednesday",
8
- "Thursday",
9
- "Friday",
10
- "Saturday",
11
- "Sunday"
12
- ],
13
- monthNames: [
14
- "January",
15
- "February",
16
- "March",
17
- "April",
18
- "May",
19
- "June",
20
- "July",
21
- "August",
22
- "September",
23
- "October",
24
- "November",
25
- "December"
26
- ],
27
- units: {
28
- year: {
29
- singular: "year",
30
- plural: "years"
31
- },
32
- month: {
33
- singular: "month",
34
- plural: "months"
35
- },
36
- week: {
37
- singular: "week",
38
- plural: "weeks"
39
- },
40
- day: {
41
- singular: "day",
42
- plural: "days"
43
- },
44
- hour: {
45
- singular: "hour",
46
- plural: "hours"
47
- },
48
- minute: {
49
- singular: "minute",
50
- plural: "minutes"
51
- },
52
- second: {
53
- singular: "second",
54
- plural: "seconds"
55
- }
56
- },
57
- words: {
58
- every: "every",
59
- weekday: "weekday",
60
- on: "on",
61
- in: "in",
62
- on_the: "on the",
63
- day_of_month: "day of the month",
64
- day_of_year: "day of the year",
65
- in_week: "in week",
66
- at: "at",
67
- at_minute: "at minute",
68
- at_second: "at second",
69
- until: "until",
70
- for: "for",
71
- time: "time",
72
- times: "times",
73
- instance: "instance",
74
- week_starts_on: "week starts on",
75
- with: "with",
76
- additional_date: "additional date",
77
- additional_dates: "additional dates",
78
- excluding: "excluding",
79
- date: "date",
80
- dates: "dates",
81
- and: "and",
82
- last: "last",
83
- starting_from: "starting from"
84
- },
85
- ordinal: (n) => {
86
- const abs = Math.abs(n);
87
- const suffix = abs % 10 === 1 && abs % 100 !== 11 ? "st" : abs % 10 === 2 && abs % 100 !== 12 ? "nd" : abs % 10 === 3 && abs % 100 !== 13 ? "rd" : "th";
88
- return n < 0 ? `last` : `${abs}${suffix}`;
89
- }
90
- };
91
- const ALL_LOCALES = {
92
- en,
93
- de: {
94
- weekdayNames: [
95
- "Montag",
96
- "Dienstag",
97
- "Mittwoch",
98
- "Donnerstag",
99
- "Freitag",
100
- "Samstag",
101
- "Sonntag"
102
- ],
103
- monthNames: [
104
- "Januar",
105
- "Februar",
106
- "März",
107
- "April",
108
- "Mai",
109
- "Juni",
110
- "Juli",
111
- "August",
112
- "September",
113
- "Oktober",
114
- "November",
115
- "Dezember"
116
- ],
117
- units: {
118
- year: {
119
- singular: "Jahr",
120
- plural: "Jahre"
121
- },
122
- month: {
123
- singular: "Monat",
124
- plural: "Monate"
125
- },
126
- week: {
127
- singular: "Woche",
128
- plural: "Wochen"
129
- },
130
- day: {
131
- singular: "Tag",
132
- plural: "Tage"
133
- },
134
- hour: {
135
- singular: "Stunde",
136
- plural: "Stunden"
137
- },
138
- minute: {
139
- singular: "Minute",
140
- plural: "Minuten"
141
- },
142
- second: {
143
- singular: "Sekunde",
144
- plural: "Sekunden"
145
- }
146
- },
147
- words: {
148
- every: "jede/n/s",
149
- weekday: "Werktag",
150
- on: "am",
151
- in: "im",
152
- on_the: "am",
153
- day_of_month: "Tag des Monats",
154
- day_of_year: "Tag des Jahres",
155
- in_week: "in Kalenderwoche",
156
- at: "um",
157
- at_minute: "in Minute",
158
- at_second: "in Sekunde",
159
- until: "bis",
160
- for: "für",
161
- time: "Mal",
162
- times: "Mal",
163
- instance: "Vorkommen",
164
- week_starts_on: "Woche beginnt am",
165
- with: "mit",
166
- additional_date: "zusätzlichem Datum",
167
- additional_dates: "zusätzlichen Daten",
168
- excluding: "ohne",
169
- date: "Datum",
170
- dates: "Daten",
171
- and: "und",
172
- last: "letzter",
173
- starting_from: "beginnend am"
174
- },
175
- ordinal: (n) => {
176
- if (n < 0) return "letzten";
177
- return `${Math.abs(n)}.`;
178
- }
179
- },
180
- es: {
181
- weekdayNames: [
182
- "lunes",
183
- "martes",
184
- "miércoles",
185
- "jueves",
186
- "viernes",
187
- "sábado",
188
- "domingo"
189
- ],
190
- monthNames: [
191
- "enero",
192
- "febrero",
193
- "marzo",
194
- "abril",
195
- "mayo",
196
- "junio",
197
- "julio",
198
- "agosto",
199
- "septiembre",
200
- "octubre",
201
- "noviembre",
202
- "diciembre"
203
- ],
204
- units: {
205
- year: {
206
- singular: "año",
207
- plural: "años"
208
- },
209
- month: {
210
- singular: "mes",
211
- plural: "meses"
212
- },
213
- week: {
214
- singular: "semana",
215
- plural: "semanas"
216
- },
217
- day: {
218
- singular: "día",
219
- plural: "días"
220
- },
221
- hour: {
222
- singular: "hora",
223
- plural: "horas"
224
- },
225
- minute: {
226
- singular: "minuto",
227
- plural: "minutos"
228
- },
229
- second: {
230
- singular: "segundo",
231
- plural: "segundos"
232
- }
233
- },
234
- words: {
235
- every: "cada",
236
- weekday: "día de la semana",
237
- on: "en",
238
- in: "en",
239
- on_the: "el",
240
- day_of_month: "día del mes",
241
- day_of_year: "día del año",
242
- in_week: "en la semana",
243
- at: "a las",
244
- at_minute: "en el minuto",
245
- at_second: "en el segundo",
246
- until: "hasta",
247
- for: "durante",
248
- time: "vez",
249
- times: "veces",
250
- instance: "ocasión",
251
- week_starts_on: "la semana comienza el",
252
- with: "con",
253
- additional_date: "fecha adicional",
254
- additional_dates: "fechas adicionales",
255
- excluding: "excluyendo",
256
- date: "fecha",
257
- dates: "fechas",
258
- and: "y",
259
- last: "último",
260
- starting_from: "a partir de"
261
- },
262
- ordinal: (n) => n < 0 ? "último" : `${Math.abs(n)}º`
263
- },
264
- hi: {
265
- weekdayNames: [
266
- "सोमवार",
267
- "मंगलवार",
268
- "बुधवार",
269
- "गुरुवार",
270
- "शुक्रवार",
271
- "शनिवार",
272
- "रविवार"
273
- ],
274
- monthNames: [
275
- "जनवरी",
276
- "फरवरी",
277
- "मार्च",
278
- "अप्रैल",
279
- "मई",
280
- "जून",
281
- "जुलाई",
282
- "अगस्त",
283
- "सितंबर",
284
- "अक्टूबर",
285
- "नवंबर",
286
- "दिसंबर"
287
- ],
288
- units: {
289
- year: {
290
- singular: "साल",
291
- plural: "साल"
292
- },
293
- month: {
294
- singular: "महीना",
295
- plural: "महीने"
296
- },
297
- week: {
298
- singular: "सप्ताह",
299
- plural: "सप्ताह"
300
- },
301
- day: {
302
- singular: "दिन",
303
- plural: "दिन"
304
- },
305
- hour: {
306
- singular: "घंटा",
307
- plural: "घंटे"
308
- },
309
- minute: {
310
- singular: "मिनट",
311
- plural: "मिनट"
312
- },
313
- second: {
314
- singular: "सेकंड",
315
- plural: "सेकंड"
316
- }
317
- },
318
- words: {
319
- every: "हर",
320
- weekday: "सप्ताह का दिन",
321
- on: "को",
322
- in: "में",
323
- on_the: "को",
324
- day_of_month: "महीने का दिन",
325
- day_of_year: "साल का दिन",
326
- in_week: "सप्ताह",
327
- at: "पर",
328
- at_minute: "मिनट पर",
329
- at_second: "सेकंड पर",
330
- until: "तक",
331
- for: "के लिए",
332
- time: "बार",
333
- times: "बार",
334
- instance: "बार",
335
- week_starts_on: "सप्ताह शुरू होता है",
336
- with: "साथ",
337
- additional_date: "अतिरिक्त तारीख",
338
- additional_dates: "अतिरिक्त तारीखें",
339
- excluding: "को छोड़कर",
340
- date: "तारीख",
341
- dates: "तारीखें",
342
- and: "और",
343
- last: "आखिरी",
344
- starting_from: "से शुरू"
345
- },
346
- ordinal: (n) => n < 0 ? "आखिरी" : `${Math.abs(n)}वां`
347
- },
348
- yue: {
349
- weekdayNames: [
350
- "星期一",
351
- "星期二",
352
- "星期三",
353
- "星期四",
354
- "星期五",
355
- "星期六",
356
- "星期日"
357
- ],
358
- monthNames: [
359
- "一月",
360
- "二月",
361
- "三月",
362
- "四月",
363
- "五月",
364
- "六月",
365
- "七月",
366
- "八月",
367
- "九月",
368
- "十月",
369
- "十一月",
370
- "十二月"
371
- ],
372
- units: {
373
- year: {
374
- singular: "年",
375
- plural: "年"
376
- },
377
- month: {
378
- singular: "月",
379
- plural: "月"
380
- },
381
- week: {
382
- singular: "週",
383
- plural: "週"
384
- },
385
- day: {
386
- singular: "日",
387
- plural: "日"
388
- },
389
- hour: {
390
- singular: "小時",
391
- plural: "小時"
392
- },
393
- minute: {
394
- singular: "分鐘",
395
- plural: "分鐘"
396
- },
397
- second: {
398
- singular: "秒",
399
- plural: "秒"
400
- }
401
- },
402
- words: {
403
- every: "每",
404
- weekday: "平日",
405
- on: "在",
406
- in: "於",
407
- on_the: "在",
408
- day_of_month: "月的日子",
409
- day_of_year: "年的日子",
410
- in_week: "第",
411
- at: "在",
412
- at_minute: "在第",
413
- at_second: "在第",
414
- until: "直到",
415
- for: "共",
416
- time: "次",
417
- times: "次",
418
- instance: "次",
419
- week_starts_on: "星期開始於",
420
- with: "帶有",
421
- additional_date: "額外日期",
422
- additional_dates: "額外日期",
423
- excluding: "排除",
424
- date: "日期",
425
- dates: "日期",
426
- and: "和",
427
- last: "最後",
428
- starting_from: "由"
429
- },
430
- ordinal: (n) => n < 0 ? "最後" : `第${Math.abs(n)}`
431
- },
432
- ar: {
433
- weekdayNames: [
434
- "الاثنين",
435
- "الثلاثاء",
436
- "الأربعاء",
437
- "الخميس",
438
- "الجمعة",
439
- "السبت",
440
- "الأحد"
441
- ],
442
- monthNames: [
443
- "يناير",
444
- "فبراير",
445
- "مارس",
446
- "أبريل",
447
- "مايو",
448
- "يونيو",
449
- "يوليو",
450
- "أغسطس",
451
- "سبتمبر",
452
- "أكتوبر",
453
- "نوفمبر",
454
- "ديسمبر"
455
- ],
456
- units: {
457
- year: {
458
- singular: "سنة",
459
- plural: "سنوات"
460
- },
461
- month: {
462
- singular: "شهر",
463
- plural: "أشهر"
464
- },
465
- week: {
466
- singular: "أسبوع",
467
- plural: "أسابيع"
468
- },
469
- day: {
470
- singular: "يوم",
471
- plural: "أيام"
472
- },
473
- hour: {
474
- singular: "ساعة",
475
- plural: "ساعات"
476
- },
477
- minute: {
478
- singular: "دقيقة",
479
- plural: "دقائق"
480
- },
481
- second: {
482
- singular: "ثانية",
483
- plural: "ثواني"
484
- }
485
- },
486
- words: {
487
- every: "كل",
488
- weekday: "يوم من أيام الأسبوع",
489
- on: "في",
490
- in: "في",
491
- on_the: "في الـ",
492
- day_of_month: "يوم من الشهر",
493
- day_of_year: "يوم من السنة",
494
- in_week: "في الأسبوع",
495
- at: "عند",
496
- at_minute: "في الدقيقة",
497
- at_second: "في الثانية",
498
- until: "حتى",
499
- for: "لمدة",
500
- time: "مرة",
501
- times: "مرات",
502
- instance: "مرة",
503
- week_starts_on: "يبدأ الأسبوع يوم",
504
- with: "مع",
505
- additional_date: "تاريخ إضافي",
506
- additional_dates: "تواريخ إضافية",
507
- excluding: "باستثناء",
508
- date: "تاريخ",
509
- dates: "تواريخ",
510
- and: "و",
511
- last: "الأخير",
512
- starting_from: "ابتداءً من"
513
- },
514
- ordinal: (n) => {
515
- if (n < 0) return "الأخير";
516
- const abs = Math.abs(n);
517
- return {
518
- 1: "الأول",
519
- 2: "الثاني",
520
- 3: "الثالث",
521
- 4: "الرابع",
522
- 5: "الخامس",
523
- 6: "السادس",
524
- 7: "السابع",
525
- 8: "الثامن",
526
- 9: "التاسع",
527
- 10: "العاشر",
528
- 11: "الحادي عشر",
529
- 12: "الثاني عشر",
530
- 13: "الثالث عشر"
531
- }[abs] || abs.toString();
532
- }
533
- },
534
- he: {
535
- weekdayNames: [
536
- "יום שני",
537
- "יום שלישי",
538
- "יום רביעי",
539
- "יום חמישי",
540
- "יום שישי",
541
- "יום שבת",
542
- "יום ראשון"
543
- ],
544
- monthNames: [
545
- "ינואר",
546
- "פברואר",
547
- "מרץ",
548
- "אפריל",
549
- "מאי",
550
- "יוני",
551
- "יולי",
552
- "אוגוסט",
553
- "ספטמבר",
554
- "אוקטובר",
555
- "נובמבר",
556
- "דצמבר"
557
- ],
558
- units: {
559
- year: {
560
- singular: "שנה",
561
- plural: "שנים"
562
- },
563
- month: {
564
- singular: "חודש",
565
- plural: "חודשים"
566
- },
567
- week: {
568
- singular: "שבוע",
569
- plural: "שבועות"
570
- },
571
- day: {
572
- singular: "יום",
573
- plural: "ימים"
574
- },
575
- hour: {
576
- singular: "שעה",
577
- plural: "שעות"
578
- },
579
- minute: {
580
- singular: "דקה",
581
- plural: "דקות"
582
- },
583
- second: {
584
- singular: "שניה",
585
- plural: "שניות"
586
- }
587
- },
588
- words: {
589
- every: "כל",
590
- weekday: "יום חול",
591
- on: "ב",
592
- in: "ב",
593
- on_the: "ב",
594
- day_of_month: "יום בחודש",
595
- day_of_year: "יום בשנה",
596
- in_week: "בשבוע",
597
- at: "בשעה",
598
- at_minute: "בדקה",
599
- at_second: "בשניה",
600
- until: "עד",
601
- for: "במשך",
602
- time: "פעם",
603
- times: "פעמים",
604
- instance: "פעם",
605
- week_starts_on: "שבוע מתחיל ב",
606
- with: "עם",
607
- additional_date: "תאריך נוסף",
608
- additional_dates: "תאריכים נוספים",
609
- excluding: "למעט",
610
- date: "תאריך",
611
- dates: "תאריכים",
612
- and: "ו",
613
- last: "אחרון",
614
- starting_from: "החל מ"
615
- },
616
- ordinal: (n) => {
617
- if (n < 0) return "אחרון";
618
- const abs = Math.abs(n);
619
- return {
620
- 1: "ראשון",
621
- 2: "שני",
622
- 3: "שלישי",
623
- 4: "רביעי",
624
- 5: "חמישי",
625
- 6: "שישי",
626
- 7: "שביעי",
627
- 8: "שמיני",
628
- 9: "תשיעי",
629
- 10: "עשירי",
630
- 11: "אחד עשר",
631
- 12: "שנים עשר",
632
- 13: "שלושה עשר"
633
- }[abs] || abs.toString();
634
- }
635
- },
636
- zh: {
637
- weekdayNames: [
638
- "星期一",
639
- "星期二",
640
- "星期三",
641
- "星期四",
642
- "星期五",
643
- "星期六",
644
- "星期日"
645
- ],
646
- monthNames: [
647
- "一月",
648
- "二月",
649
- "三月",
650
- "四月",
651
- "五月",
652
- "六月",
653
- "七月",
654
- "八月",
655
- "九月",
656
- "十月",
657
- "十一月",
658
- "十二月"
659
- ],
660
- units: {
661
- year: {
662
- singular: "年",
663
- plural: "年"
664
- },
665
- month: {
666
- singular: "月",
667
- plural: "月"
668
- },
669
- week: {
670
- singular: "周",
671
- plural: "周"
672
- },
673
- day: {
674
- singular: "日",
675
- plural: "日"
676
- },
677
- hour: {
678
- singular: "小时",
679
- plural: "小时"
680
- },
681
- minute: {
682
- singular: "分钟",
683
- plural: "分钟"
684
- },
685
- second: {
686
- singular: "秒",
687
- plural: "秒"
688
- }
689
- },
690
- words: {
691
- every: "每",
692
- weekday: "工作日",
693
- on: "在",
694
- in: "在",
695
- on_the: "在",
696
- day_of_month: "月的日子",
697
- day_of_year: "年的日子",
698
- in_week: "第",
699
- at: "在",
700
- at_minute: "在第",
701
- at_second: "在第",
702
- until: "直到",
703
- for: "共",
704
- time: "次",
705
- times: "次",
706
- instance: "次",
707
- week_starts_on: "星期开始于",
708
- with: "带有",
709
- additional_date: "额外日期",
710
- additional_dates: "额外日期",
711
- excluding: "排除",
712
- date: "日期",
713
- dates: "日期",
714
- and: "和",
715
- last: "最后",
716
- starting_from: "从"
717
- },
718
- ordinal: (n) => n < 0 ? "最后" : `第${Math.abs(n)}`
719
- },
720
- fr: {
721
- weekdayNames: [
722
- "lundi",
723
- "mardi",
724
- "mercredi",
725
- "jeudi",
726
- "vendredi",
727
- "samedi",
728
- "dimanche"
729
- ],
730
- monthNames: [
731
- "janvier",
732
- "février",
733
- "mars",
734
- "avril",
735
- "mai",
736
- "juin",
737
- "juillet",
738
- "août",
739
- "septembre",
740
- "octobre",
741
- "novembre",
742
- "décembre"
743
- ],
744
- units: {
745
- year: {
746
- singular: "année",
747
- plural: "ans"
748
- },
749
- month: {
750
- singular: "mois",
751
- plural: "mois"
752
- },
753
- week: {
754
- singular: "semaine",
755
- plural: "semaines"
756
- },
757
- day: {
758
- singular: "jour",
759
- plural: "jours"
760
- },
761
- hour: {
762
- singular: "heure",
763
- plural: "heures"
764
- },
765
- minute: {
766
- singular: "minute",
767
- plural: "minutes"
768
- },
769
- second: {
770
- singular: "seconde",
771
- plural: "secondes"
772
- }
773
- },
774
- words: {
775
- every: "chaque",
776
- weekday: "jour de semaine",
777
- on: "le",
778
- in: "dans",
779
- on_the: "le",
780
- day_of_month: "jour du mois",
781
- day_of_year: "jour de l'année",
782
- in_week: "dans la semaine",
783
- at: "à",
784
- at_minute: "à la minute",
785
- at_second: "à la seconde",
786
- until: "jusqu'au",
787
- for: "pendant",
788
- time: "fois",
789
- times: "fois",
790
- instance: "occurrence",
791
- week_starts_on: "la semaine commence le",
792
- with: "avec",
793
- additional_date: "date supplémentaire",
794
- additional_dates: "dates supplémentaires",
795
- excluding: "en excluant",
796
- date: "date",
797
- dates: "dates",
798
- and: "et",
799
- last: "dernier",
800
- starting_from: "à partir du"
801
- },
802
- ordinal: (n) => {
803
- const abs = Math.abs(n);
804
- if (n < 0) return "dernier";
805
- if (abs === 1) return "1er";
806
- return `${abs}e`;
807
- }
808
- }
809
- };
810
- const env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
811
- const active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
812
- const LOCALES = {};
813
- for (const l of active) if (ALL_LOCALES[l]) LOCALES[l] = ALL_LOCALES[l];
814
- const workweekWeekdays = allowedWeekdays.slice(0, 5);
815
- const byDayTokenRegex = new RegExp(`^([+-]?\\d+)?(${allowedWeekdays.join("|")})$`);
816
- const weekdayIndexByToken = Object.fromEntries(allowedWeekdays.map((weekday, idx) => [weekday, idx]));
817
- function defaultOrdinal(n) {
818
- const abs = Math.abs(n);
819
- const suffix = abs % 10 === 1 && abs % 100 !== 11 ? "st" : abs % 10 === 2 && abs % 100 !== 12 ? "nd" : abs % 10 === 3 && abs % 100 !== 13 ? "rd" : "th";
820
- return n < 0 ? `last` : `${abs}${suffix}`;
821
- }
822
- function ordinal(n, locale) {
823
- return locale.ordinal ? locale.ordinal(n) : defaultOrdinal(n);
824
- }
825
- function list(arr, mapFn = (x) => `${x}`, final) {
826
- const mapped = arr.map(mapFn);
827
- if (mapped.length === 1) return mapped[0];
828
- return mapped.slice(0, -1).join(", ") + ` ${final} ` + mapped[mapped.length - 1];
829
- }
830
- function formatByDayToken(tok, locale) {
831
- if (typeof tok === "number") return tok.toString();
832
- const m = tok.toUpperCase().match(byDayTokenRegex);
833
- if (!m) return tok;
834
- const ord = m[1] ? parseInt(m[1], 10) : 0;
835
- const idx = weekdayIndexByToken[m[2]];
836
- const name = locale.weekdayNames[idx];
837
- if (ord === 0) return name;
838
- if (ord === -1) return `${locale.words.last} ${name}`;
839
- return `${ordinal(ord, locale)} ${name}`;
840
- }
841
- function formatTime(_zdt, locale, hour, minute, second) {
842
- const options = {
843
- hour: "numeric",
844
- timeZone: "UTC"
845
- };
846
- if (second) options.second = "2-digit";
847
- if (second || minute) options.minute = "2-digit";
848
- const sample = new Date(Date.UTC(2e3, 0, 1, hour, minute, second));
849
- try {
850
- return new Intl.DateTimeFormat(locale, options).format(sample);
851
- } catch {
852
- return new Intl.DateTimeFormat("en", options).format(sample);
853
- }
854
- }
855
- function weekdayTokenFromZdt(zdt) {
856
- return allowedWeekdays[zdt.dayOfWeek - 1];
857
- }
858
- function tzAbbreviation(zdt, locale) {
859
- const options = {
860
- timeZone: zdt.timeZoneId,
861
- timeZoneName: "short",
862
- hour: "numeric"
863
- };
864
- let formatter;
865
- try {
866
- formatter = new Intl.DateTimeFormat(locale, options);
867
- } catch {
868
- formatter = Intl.DateTimeFormat("en", options);
869
- }
870
- return formatter.formatToParts(new Date(zdt.epochMilliseconds)).find((p) => p.type === "timeZoneName")?.value || zdt.timeZoneId;
871
- }
872
- function formatLocalizedDate(zdt, locale) {
873
- const options = {
874
- dateStyle: "long",
875
- timeZone: zdt.timeZoneId
876
- };
877
- const sample = new Date(zdt.epochMilliseconds);
878
- try {
879
- return new Intl.DateTimeFormat(locale, options).format(sample);
880
- } catch {
881
- return new Intl.DateTimeFormat("en", options).format(sample);
882
- }
883
- }
884
- function toText(input, locale, options = {}) {
885
- const opts = (typeof input === "string" ? new RRuleTemporal({ rruleString: input }) : input).options();
886
- const resolvedLocale = locale ?? Intl.DateTimeFormat().resolvedOptions().locale;
887
- const lang = resolvedLocale.split("-")[0];
888
- const data = LOCALES[lang] || en;
889
- const dateLocale = LOCALES[lang] ? resolvedLocale : "en";
890
- const { freq, interval = 1, count, until, byDay, byHour, byMinute, bySecond, byMonth, byMonthDay, byYearDay, byWeekNo, bySetPos, wkst, rDate, exDate } = opts;
891
- const dayOrLarger = freq === "YEARLY" || freq === "MONTHLY" || freq === "WEEKLY" || freq === "DAILY";
892
- const hasExplicitTime = Boolean(byHour || byMinute || bySecond);
893
- const dtstartHasTime = opts.dtstart.hour !== 0 || opts.dtstart.minute !== 0 || opts.dtstart.second !== 0;
894
- const shouldDefaultTime = dayOrLarger && (hasExplicitTime || dtstartHasTime);
895
- const textByDay = byDay ?? (freq === "WEEKLY" ? [weekdayTokenFromZdt(opts.dtstart)] : void 0);
896
- const textByHour = byHour ?? (shouldDefaultTime ? [opts.dtstart.hour] : void 0);
897
- const textByMinute = textByHour ? byMinute ?? [opts.dtstart.minute] : byMinute;
898
- const textBySecond = textByHour ? bySecond ?? [opts.dtstart.second] : bySecond;
899
- const parts = [data.words.every];
900
- const baseKey = {
901
- YEARLY: "year",
902
- MONTHLY: "month",
903
- WEEKLY: "week",
904
- DAILY: "day",
905
- HOURLY: "hour",
906
- MINUTELY: "minute",
907
- SECONDLY: "second"
908
- }[freq];
909
- const base = data.units[baseKey];
910
- const daysNormalized = textByDay?.map((d) => d.toUpperCase());
911
- const isWeekdays = daysNormalized && daysNormalized.length === workweekWeekdays.length && workweekWeekdays.every((d) => daysNormalized.includes(d));
912
- const isEveryday = daysNormalized && daysNormalized.length === allowedWeekdays.length && allowedWeekdays.every((d) => daysNormalized.includes(d));
913
- if (freq === "WEEKLY" && interval === 1 && isWeekdays) parts.push(data.words.weekday);
914
- else if (freq === "WEEKLY" && interval === 1 && isEveryday) parts.push(data.units.day.singular);
915
- else if (interval !== 1) parts.push(interval.toString(), base.plural);
916
- else parts.push(base.singular);
917
- if (freq === "WEEKLY" && textByDay && !isWeekdays && !isEveryday) parts.push(data.words.on, list(textByDay, (t) => formatByDayToken(t, data), data.words.and));
918
- else if (textByDay && freq !== "WEEKLY") parts.push(data.words.on, list(textByDay, (t) => formatByDayToken(t, data), data.words.and));
919
- if (byMonth) parts.push(data.words.in, list(byMonth, (m) => data.monthNames[m - 1], data.words.and));
920
- if (byMonthDay) parts.push(data.words.on_the, list(byMonthDay, (d) => ordinal(d, data), data.words.and), data.words.day_of_month);
921
- if (byYearDay) parts.push(data.words.on_the, list(byYearDay, (d) => ordinal(d, data), data.words.and), data.words.day_of_year);
922
- if (byWeekNo) parts.push(data.words.in_week, list(byWeekNo, (n) => n.toString(), data.words.and));
923
- if (textByHour) {
924
- const minutes = textByMinute ?? [0];
925
- const seconds = textBySecond ?? [0];
926
- const times = textByHour.flatMap((h) => minutes.flatMap((m) => seconds.map((s) => formatTime(opts.dtstart, dateLocale, h, m, s))));
927
- parts.push(data.words.at, list(times, void 0, data.words.and));
928
- if (!options.excludeTzAbbreviation) parts.push(tzAbbreviation(opts.dtstart, dateLocale));
929
- }
930
- if (!textByHour && textByMinute) parts.push(data.words.at_minute, list(textByMinute, void 0, data.words.and));
931
- if (!textByHour && !textByMinute && textBySecond) parts.push(data.words.at_second, list(textBySecond, void 0, data.words.and));
932
- if (options.includeDtstart) parts.push(data.words.starting_from, formatLocalizedDate(opts.dtstart, dateLocale));
933
- if (until) parts.push(data.words.until, formatLocalizedDate(until, dateLocale));
934
- else if (count !== void 0) parts.push(data.words.for, count.toString(), count === 1 ? data.words.time : data.words.times);
935
- if (bySetPos) parts.push(data.words.on_the, list(bySetPos, (n) => ordinal(n, data), data.words.and), data.words.instance);
936
- if (wkst) {
937
- const wkName = formatByDayToken(wkst, data);
938
- parts.push(data.words.week_starts_on, wkName);
939
- }
940
- if (rDate && rDate.length) parts.push(data.words.with, `${rDate.length}`, rDate.length === 1 ? data.words.additional_date : data.words.additional_dates);
941
- if (exDate && exDate.length) parts.push(data.words.excluding, `${exDate.length}`, exDate.length === 1 ? data.words.date : data.words.dates);
942
- if (opts.rscale) {
943
- const rscale = opts.rscale;
944
- const skip = opts.skip;
945
- parts.push(`(RSCALE=${rscale}${skip ? `;SKIP=${skip}` : ""})`);
946
- }
947
- return parts.join(" ");
948
- }
949
- //#endregion
950
- export { toText };
1
+ import{r as e,t}from"./src-CNIROjgI.js";const n={weekdayNames:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],units:{year:{singular:`year`,plural:`years`},month:{singular:`month`,plural:`months`},week:{singular:`week`,plural:`weeks`},day:{singular:`day`,plural:`days`},hour:{singular:`hour`,plural:`hours`},minute:{singular:`minute`,plural:`minutes`},second:{singular:`second`,plural:`seconds`}},words:{every:`every`,weekday:`weekday`,on:`on`,in:`in`,on_the:`on the`,day_of_month:`day of the month`,day_of_year:`day of the year`,in_week:`in week`,at:`at`,at_minute:`at minute`,at_second:`at second`,until:`until`,for:`for`,time:`time`,times:`times`,instance:`instance`,week_starts_on:`week starts on`,with:`with`,additional_date:`additional date`,additional_dates:`additional dates`,excluding:`excluding`,date:`date`,dates:`dates`,and:`and`,last:`last`,starting_from:`starting from`},ordinal:e=>{let t=Math.abs(e),n=t%10==1&&t%100!=11?`st`:t%10==2&&t%100!=12?`nd`:t%10==3&&t%100!=13?`rd`:`th`;return e<0?`last`:`${t}${n}`}},r={en:n,de:{weekdayNames:[`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`,`Sonntag`],monthNames:[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`],units:{year:{singular:`Jahr`,plural:`Jahre`},month:{singular:`Monat`,plural:`Monate`},week:{singular:`Woche`,plural:`Wochen`},day:{singular:`Tag`,plural:`Tage`},hour:{singular:`Stunde`,plural:`Stunden`},minute:{singular:`Minute`,plural:`Minuten`},second:{singular:`Sekunde`,plural:`Sekunden`}},words:{every:`jede/n/s`,weekday:`Werktag`,on:`am`,in:`im`,on_the:`am`,day_of_month:`Tag des Monats`,day_of_year:`Tag des Jahres`,in_week:`in Kalenderwoche`,at:`um`,at_minute:`in Minute`,at_second:`in Sekunde`,until:`bis`,for:`für`,time:`Mal`,times:`Mal`,instance:`Vorkommen`,week_starts_on:`Woche beginnt am`,with:`mit`,additional_date:`zusätzlichem Datum`,additional_dates:`zusätzlichen Daten`,excluding:`ohne`,date:`Datum`,dates:`Daten`,and:`und`,last:`letzter`,starting_from:`beginnend am`},ordinal:e=>e<0?`letzten`:`${Math.abs(e)}.`},es:{weekdayNames:[`lunes`,`martes`,`miércoles`,`jueves`,`viernes`,`sábado`,`domingo`],monthNames:[`enero`,`febrero`,`marzo`,`abril`,`mayo`,`junio`,`julio`,`agosto`,`septiembre`,`octubre`,`noviembre`,`diciembre`],units:{year:{singular:`año`,plural:`años`},month:{singular:`mes`,plural:`meses`},week:{singular:`semana`,plural:`semanas`},day:{singular:`día`,plural:`días`},hour:{singular:`hora`,plural:`horas`},minute:{singular:`minuto`,plural:`minutos`},second:{singular:`segundo`,plural:`segundos`}},words:{every:`cada`,weekday:`día de la semana`,on:`en`,in:`en`,on_the:`el`,day_of_month:`día del mes`,day_of_year:`día del año`,in_week:`en la semana`,at:`a las`,at_minute:`en el minuto`,at_second:`en el segundo`,until:`hasta`,for:`durante`,time:`vez`,times:`veces`,instance:`ocasión`,week_starts_on:`la semana comienza el`,with:`con`,additional_date:`fecha adicional`,additional_dates:`fechas adicionales`,excluding:`excluyendo`,date:`fecha`,dates:`fechas`,and:`y`,last:`último`,starting_from:`a partir de`},ordinal:e=>e<0?`último`:`${Math.abs(e)}º`},hi:{weekdayNames:[`सोमवार`,`मंगलवार`,`बुधवार`,`गुरुवार`,`शुक्रवार`,`शनिवार`,`रविवार`],monthNames:[`जनवरी`,`फरवरी`,`मार्च`,`अप्रैल`,`मई`,`जून`,`जुलाई`,`अगस्त`,`सितंबर`,`अक्टूबर`,`नवंबर`,`दिसंबर`],units:{year:{singular:`साल`,plural:`साल`},month:{singular:`महीना`,plural:`महीने`},week:{singular:`सप्ताह`,plural:`सप्ताह`},day:{singular:`दिन`,plural:`दिन`},hour:{singular:`घंटा`,plural:`घंटे`},minute:{singular:`मिनट`,plural:`मिनट`},second:{singular:`सेकंड`,plural:`सेकंड`}},words:{every:`हर`,weekday:`सप्ताह का दिन`,on:`को`,in:`में`,on_the:`को`,day_of_month:`महीने का दिन`,day_of_year:`साल का दिन`,in_week:`सप्ताह`,at:`पर`,at_minute:`मिनट पर`,at_second:`सेकंड पर`,until:`तक`,for:`के लिए`,time:`बार`,times:`बार`,instance:`बार`,week_starts_on:`सप्ताह शुरू होता है`,with:`साथ`,additional_date:`अतिरिक्त तारीख`,additional_dates:`अतिरिक्त तारीखें`,excluding:`को छोड़कर`,date:`तारीख`,dates:`तारीखें`,and:`और`,last:`आखिरी`,starting_from:`से शुरू`},ordinal:e=>e<0?`आखिरी`:`${Math.abs(e)}वां`},yue:{weekdayNames:[`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`,`星期日`],monthNames:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],units:{year:{singular:`年`,plural:`年`},month:{singular:`月`,plural:`月`},week:{singular:`週`,plural:`週`},day:{singular:`日`,plural:`日`},hour:{singular:`小時`,plural:`小時`},minute:{singular:`分鐘`,plural:`分鐘`},second:{singular:`秒`,plural:`秒`}},words:{every:`每`,weekday:`平日`,on:`在`,in:`於`,on_the:`在`,day_of_month:`月的日子`,day_of_year:`年的日子`,in_week:`第`,at:`在`,at_minute:`在第`,at_second:`在第`,until:`直到`,for:`共`,time:`次`,times:`次`,instance:`次`,week_starts_on:`星期開始於`,with:`帶有`,additional_date:`額外日期`,additional_dates:`額外日期`,excluding:`排除`,date:`日期`,dates:`日期`,and:`和`,last:`最後`,starting_from:`由`},ordinal:e=>e<0?`最後`:`第${Math.abs(e)}`},ar:{weekdayNames:[`الاثنين`,`الثلاثاء`,`الأربعاء`,`الخميس`,`الجمعة`,`السبت`,`الأحد`],monthNames:[`يناير`,`فبراير`,`مارس`,`أبريل`,`مايو`,`يونيو`,`يوليو`,`أغسطس`,`سبتمبر`,`أكتوبر`,`نوفمبر`,`ديسمبر`],units:{year:{singular:`سنة`,plural:`سنوات`},month:{singular:`شهر`,plural:`أشهر`},week:{singular:`أسبوع`,plural:`أسابيع`},day:{singular:`يوم`,plural:`أيام`},hour:{singular:`ساعة`,plural:`ساعات`},minute:{singular:`دقيقة`,plural:`دقائق`},second:{singular:`ثانية`,plural:`ثواني`}},words:{every:`كل`,weekday:`يوم من أيام الأسبوع`,on:`في`,in:`في`,on_the:`في الـ`,day_of_month:`يوم من الشهر`,day_of_year:`يوم من السنة`,in_week:`في الأسبوع`,at:`عند`,at_minute:`في الدقيقة`,at_second:`في الثانية`,until:`حتى`,for:`لمدة`,time:`مرة`,times:`مرات`,instance:`مرة`,week_starts_on:`يبدأ الأسبوع يوم`,with:`مع`,additional_date:`تاريخ إضافي`,additional_dates:`تواريخ إضافية`,excluding:`باستثناء`,date:`تاريخ`,dates:`تواريخ`,and:`و`,last:`الأخير`,starting_from:`ابتداءً من`},ordinal:e=>{if(e<0)return`الأخير`;let t=Math.abs(e);return{1:`الأول`,2:`الثاني`,3:`الثالث`,4:`الرابع`,5:`الخامس`,6:`السادس`,7:`السابع`,8:`الثامن`,9:`التاسع`,10:`العاشر`,11:`الحادي عشر`,12:`الثاني عشر`,13:`الثالث عشر`}[t]||t.toString()}},he:{weekdayNames:[`יום שני`,`יום שלישי`,`יום רביעי`,`יום חמישי`,`יום שישי`,`יום שבת`,`יום ראשון`],monthNames:[`ינואר`,`פברואר`,`מרץ`,`אפריל`,`מאי`,`יוני`,`יולי`,`אוגוסט`,`ספטמבר`,`אוקטובר`,`נובמבר`,`דצמבר`],units:{year:{singular:`שנה`,plural:`שנים`},month:{singular:`חודש`,plural:`חודשים`},week:{singular:`שבוע`,plural:`שבועות`},day:{singular:`יום`,plural:`ימים`},hour:{singular:`שעה`,plural:`שעות`},minute:{singular:`דקה`,plural:`דקות`},second:{singular:`שניה`,plural:`שניות`}},words:{every:`כל`,weekday:`יום חול`,on:`ב`,in:`ב`,on_the:`ב`,day_of_month:`יום בחודש`,day_of_year:`יום בשנה`,in_week:`בשבוע`,at:`בשעה`,at_minute:`בדקה`,at_second:`בשניה`,until:`עד`,for:`במשך`,time:`פעם`,times:`פעמים`,instance:`פעם`,week_starts_on:`שבוע מתחיל ב`,with:`עם`,additional_date:`תאריך נוסף`,additional_dates:`תאריכים נוספים`,excluding:`למעט`,date:`תאריך`,dates:`תאריכים`,and:`ו`,last:`אחרון`,starting_from:`החל מ`},ordinal:e=>{if(e<0)return`אחרון`;let t=Math.abs(e);return{1:`ראשון`,2:`שני`,3:`שלישי`,4:`רביעי`,5:`חמישי`,6:`שישי`,7:`שביעי`,8:`שמיני`,9:`תשיעי`,10:`עשירי`,11:`אחד עשר`,12:`שנים עשר`,13:`שלושה עשר`}[t]||t.toString()}},zh:{weekdayNames:[`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`,`星期日`],monthNames:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],units:{year:{singular:`年`,plural:`年`},month:{singular:`月`,plural:`月`},week:{singular:`周`,plural:`周`},day:{singular:`日`,plural:`日`},hour:{singular:`小时`,plural:`小时`},minute:{singular:`分钟`,plural:`分钟`},second:{singular:`秒`,plural:`秒`}},words:{every:`每`,weekday:`工作日`,on:`在`,in:`在`,on_the:`在`,day_of_month:`月的日子`,day_of_year:`年的日子`,in_week:`第`,at:`在`,at_minute:`在第`,at_second:`在第`,until:`直到`,for:`共`,time:`次`,times:`次`,instance:`次`,week_starts_on:`星期开始于`,with:`带有`,additional_date:`额外日期`,additional_dates:`额外日期`,excluding:`排除`,date:`日期`,dates:`日期`,and:`和`,last:`最后`,starting_from:`从`},ordinal:e=>e<0?`最后`:`第${Math.abs(e)}`},fr:{weekdayNames:[`lundi`,`mardi`,`mercredi`,`jeudi`,`vendredi`,`samedi`,`dimanche`],monthNames:[`janvier`,`février`,`mars`,`avril`,`mai`,`juin`,`juillet`,`août`,`septembre`,`octobre`,`novembre`,`décembre`],units:{year:{singular:`année`,plural:`ans`},month:{singular:`mois`,plural:`mois`},week:{singular:`semaine`,plural:`semaines`},day:{singular:`jour`,plural:`jours`},hour:{singular:`heure`,plural:`heures`},minute:{singular:`minute`,plural:`minutes`},second:{singular:`seconde`,plural:`secondes`}},words:{every:`chaque`,weekday:`jour de semaine`,on:`le`,in:`dans`,on_the:`le`,day_of_month:`jour du mois`,day_of_year:`jour de l'année`,in_week:`dans la semaine`,at:`à`,at_minute:`à la minute`,at_second:`à la seconde`,until:`jusqu'au`,for:`pendant`,time:`fois`,times:`fois`,instance:`occurrence`,week_starts_on:`la semaine commence le`,with:`avec`,additional_date:`date supplémentaire`,additional_dates:`dates supplémentaires`,excluding:`en excluant`,date:`date`,dates:`dates`,and:`et`,last:`dernier`,starting_from:`à partir du`},ordinal:e=>{let t=Math.abs(e);return e<0?`dernier`:t===1?`1er`:`${t}e`}}},i=typeof process<`u`&&process.env?process.env.TOTEXT_LANGS:void 0,a=i?i.split(`,`).map(e=>e.trim()).filter(Boolean):Object.keys(r),o={};for(let e of a)r[e]&&(o[e]=r[e]);const s=e.slice(0,5),c=RegExp(`^([+-]?\\d+)?(${e.join(`|`)})$`),l=Object.fromEntries(e.map((e,t)=>[e,t]));function u(e){let t=Math.abs(e),n=t%10==1&&t%100!=11?`st`:t%10==2&&t%100!=12?`nd`:t%10==3&&t%100!=13?`rd`:`th`;return e<0?`last`:`${t}${n}`}function d(e,t){return t.ordinal?t.ordinal(e):u(e)}function f(e,t=e=>`${e}`,n){let r=e.map(t);return r.length===1?r[0]:r.slice(0,-1).join(`, `)+` ${n} `+r[r.length-1]}function p(e,t){if(typeof e==`number`)return e.toString();let n=e.toUpperCase().match(c);if(!n)return e;let r=n[1]?parseInt(n[1],10):0,i=l[n[2]],a=t.weekdayNames[i];return r===0?a:r===-1?`${t.words.last} ${a}`:`${d(r,t)} ${a}`}function m(e,t,n,r,i){let a={hour:`numeric`,timeZone:`UTC`};i&&(a.second=`2-digit`),(i||r)&&(a.minute=`2-digit`);let o=new Date(Date.UTC(2e3,0,1,n,r,i));try{return new Intl.DateTimeFormat(t,a).format(o)}catch{return new Intl.DateTimeFormat(`en`,a).format(o)}}function h(t){return e[t.dayOfWeek-1]}function g(e,t){let n={timeZone:e.timeZoneId,timeZoneName:`short`,hour:`numeric`},r;try{r=new Intl.DateTimeFormat(t,n)}catch{r=Intl.DateTimeFormat(`en`,n)}return r.formatToParts(new Date(e.epochMilliseconds)).find(e=>e.type===`timeZoneName`)?.value||e.timeZoneId}function _(e,t){let n={dateStyle:`long`,timeZone:e.timeZoneId},r=new Date(e.epochMilliseconds);try{return new Intl.DateTimeFormat(t,n).format(r)}catch{return new Intl.DateTimeFormat(`en`,n).format(r)}}function v(r,i,a={}){let c=(typeof r==`string`?new t({rruleString:r}):r).options(),l=i??Intl.DateTimeFormat().resolvedOptions().locale,u=l.split(`-`)[0],v=o[u]||n,y=o[u]?l:`en`,{freq:b,interval:x=1,count:S,until:C,byDay:w,byHour:T,byMinute:E,bySecond:D,byMonth:O,byMonthDay:k,byYearDay:A,byWeekNo:j,bySetPos:M,wkst:N,rDate:P,exDate:F}=c,I=b===`YEARLY`||b===`MONTHLY`||b===`WEEKLY`||b===`DAILY`,L=!!(T||E||D),R=c.dtstart.hour!==0||c.dtstart.minute!==0||c.dtstart.second!==0,z=I&&(L||R),B=w??(b===`WEEKLY`?[h(c.dtstart)]:void 0),V=T??(z?[c.dtstart.hour]:void 0),H=V?E??[c.dtstart.minute]:E,U=V?D??[c.dtstart.second]:D,W=[v.words.every],G={YEARLY:`year`,MONTHLY:`month`,WEEKLY:`week`,DAILY:`day`,HOURLY:`hour`,MINUTELY:`minute`,SECONDLY:`second`}[b],K=v.units[G],q=B?.map(e=>e.toUpperCase()),J=q&&q.length===s.length&&s.every(e=>q.includes(e)),Y=q&&q.length===e.length&&e.every(e=>q.includes(e));if(b===`WEEKLY`&&x===1&&J?W.push(v.words.weekday):b===`WEEKLY`&&x===1&&Y?W.push(v.units.day.singular):x===1?W.push(K.singular):W.push(x.toString(),K.plural),(b===`WEEKLY`&&B&&!J&&!Y||B&&b!==`WEEKLY`)&&W.push(v.words.on,f(B,e=>p(e,v),v.words.and)),O&&W.push(v.words.in,f(O,e=>v.monthNames[e-1],v.words.and)),k&&W.push(v.words.on_the,f(k,e=>d(e,v),v.words.and),v.words.day_of_month),A&&W.push(v.words.on_the,f(A,e=>d(e,v),v.words.and),v.words.day_of_year),j&&W.push(v.words.in_week,f(j,e=>e.toString(),v.words.and)),V){let e=H??[0],t=U??[0],n=V.flatMap(n=>e.flatMap(e=>t.map(t=>m(c.dtstart,y,n,e,t))));W.push(v.words.at,f(n,void 0,v.words.and)),a.excludeTzAbbreviation||W.push(g(c.dtstart,y))}if(!V&&H&&W.push(v.words.at_minute,f(H,void 0,v.words.and)),!V&&!H&&U&&W.push(v.words.at_second,f(U,void 0,v.words.and)),a.includeDtstart&&W.push(v.words.starting_from,_(c.dtstart,y)),C?W.push(v.words.until,_(C,y)):S!==void 0&&W.push(v.words.for,S.toString(),S===1?v.words.time:v.words.times),M&&W.push(v.words.on_the,f(M,e=>d(e,v),v.words.and),v.words.instance),N){let e=p(N,v);W.push(v.words.week_starts_on,e)}if(P&&P.length&&W.push(v.words.with,`${P.length}`,P.length===1?v.words.additional_date:v.words.additional_dates),F&&F.length&&W.push(v.words.excluding,`${F.length}`,F.length===1?v.words.date:v.words.dates),c.rscale){let e=c.rscale,t=c.skip;W.push(`(RSCALE=${e}${t?`;SKIP=${t}`:``})`)}return W.join(` `)}export{v as toText};