@makefully/notefully 0.2.11 → 0.2.13

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/notefully.js CHANGED
@@ -1,4 +1,4 @@
1
- const At = {
1
+ const jt = {
2
2
  "launcher.open": "Leave a note…",
3
3
  "tool.crop": "Crop",
4
4
  "tool.resetCrop": "Reset crop",
@@ -71,15 +71,15 @@ const At = {
71
71
  "diag.timezone": "Timezone",
72
72
  "diag.viewport": "Viewport",
73
73
  "diag.user": "User"
74
- }, zt = {
75
- "en-US": At
76
- }, Vt = {
74
+ }, Pt = {
75
+ "en-US": jt
76
+ }, _t = {
77
77
  en: "en-US",
78
78
  no: "nb",
79
79
  tl: "fil",
80
80
  "zh-Hans": "zh-CN",
81
81
  "zh-Hant": "zh-TW"
82
- }, Pa = {
82
+ }, Ha = {
83
83
  "es-MX": ["es-419", "es"],
84
84
  "es-AR": ["es-419", "es"],
85
85
  "es-CL": ["es-419", "es"],
@@ -99,34 +99,34 @@ const At = {
99
99
  "es-DO": ["es-419", "es"],
100
100
  "es-PR": ["es-419", "es"],
101
101
  "es-CU": ["es-419", "es"]
102
- }, xa = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
103
- let gt = "en-US", Oe = {};
104
- function y(t, e) {
105
- !t || !e || typeof e != "object" || (zt[String(t)] = e);
102
+ }, _a = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
103
+ let yt = "en-US", Xe = {};
104
+ function w(t, e) {
105
+ !t || !e || typeof e != "object" || (Pt[String(t)] = e);
106
106
  }
107
- function rt(t) {
107
+ function pt(t) {
108
108
  return String(t || "").trim().replace(/_/g, "-");
109
109
  }
110
- function La(t) {
111
- const e = rt(t);
110
+ function Ga(t) {
111
+ const e = pt(t);
112
112
  if (!e)
113
113
  return ["en-US"];
114
- const a = e, o = Vt[a] || Vt[a.toLowerCase()] || a, i = [], s = (l) => {
114
+ const a = e, o = _t[a] || _t[a.toLowerCase()] || a, i = [], n = (l) => {
115
115
  l && !i.includes(l) && i.push(l);
116
116
  };
117
- s(o);
118
- for (const [l, u] of Object.entries(Pa))
119
- l.toLowerCase() === o.toLowerCase() && u.forEach(s);
120
- const r = o.split("-");
121
- for (let l = r.length - 1; l >= 1; l -= 1)
122
- s(r.slice(0, l).join("-"));
123
- return s(Vt[r[0]] || r[0]), s("en-US"), i;
124
- }
125
- function Ua(t) {
126
- for (const e of La(t)) {
127
- if (zt[e])
117
+ n(o);
118
+ for (const [l, c] of Object.entries(Ha))
119
+ l.toLowerCase() === o.toLowerCase() && c.forEach(n);
120
+ const s = o.split("-");
121
+ for (let l = s.length - 1; l >= 1; l -= 1)
122
+ n(s.slice(0, l).join("-"));
123
+ return n(_t[s[0]] || s[0]), n("en-US"), i;
124
+ }
125
+ function qa(t) {
126
+ for (const e of Ga(t)) {
127
+ if (Pt[e])
128
128
  return e;
129
- const a = Object.keys(zt).find(
129
+ const a = Object.keys(Pt).find(
130
130
  (o) => o.toLowerCase() === e.toLowerCase()
131
131
  );
132
132
  if (a)
@@ -134,36 +134,36 @@ function Ua(t) {
134
134
  }
135
135
  return "en-US";
136
136
  }
137
- function Ta(t = {}) {
137
+ function Wa(t = {}) {
138
138
  var e;
139
139
  if (t.locale != null && String(t.locale).trim())
140
- return rt(t.locale);
140
+ return pt(t.locale);
141
141
  if (typeof document < "u") {
142
142
  const a = (e = document.documentElement) == null ? void 0 : e.lang;
143
143
  if (a && String(a).trim())
144
- return rt(a);
144
+ return pt(a);
145
145
  }
146
- return typeof navigator < "u" && navigator.language ? rt(navigator.language) : "en-US";
146
+ return typeof navigator < "u" && navigator.language ? pt(navigator.language) : "en-US";
147
147
  }
148
- function Fa(t, e) {
149
- return t != null && (gt = rt(t) || "en-US"), gt;
148
+ function Za(t, e) {
149
+ return t != null && (yt = pt(t) || "en-US"), yt;
150
150
  }
151
- function Ma(t) {
152
- Oe = t && typeof t == "object" ? { ...t } : {};
151
+ function Ya(t) {
152
+ Xe = t && typeof t == "object" ? { ...t } : {};
153
153
  }
154
- function Et() {
155
- return gt;
154
+ function Lt() {
155
+ return yt;
156
156
  }
157
- function Da(t = gt) {
158
- const e = rt(t).split("-")[0].toLowerCase();
159
- return xa.has(e) ? "rtl" : "ltr";
157
+ function Xa(t = yt) {
158
+ const e = pt(t).split("-")[0].toLowerCase();
159
+ return _a.has(e) ? "rtl" : "ltr";
160
160
  }
161
- function p(t, e) {
162
- const a = String(t || ""), o = Ua(gt), i = zt[o] || At;
163
- let s = Oe[a] ?? i[a] ?? At[a] ?? a;
164
- return e && typeof e == "object" && (s = String(s).replace(/\{(\w+)\}/g, (r, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(s);
161
+ function g(t, e) {
162
+ const a = String(t || ""), o = qa(yt), i = Pt[o] || jt;
163
+ let n = Xe[a] ?? i[a] ?? jt[a] ?? a;
164
+ return e && typeof e == "object" && (n = String(n).replace(/\{(\w+)\}/g, (s, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(n);
165
165
  }
166
- const Oa = {
166
+ const Ja = {
167
167
  "launcher.open": "Оставете бележка...",
168
168
  "tool.crop": "Реколта",
169
169
  "tool.resetCrop": "Нулиране на изрязването",
@@ -220,7 +220,7 @@ const Oa = {
220
220
  "diag.timezone": "Часова зона",
221
221
  "diag.viewport": "Изгледна плоча",
222
222
  "diag.user": "Потребител"
223
- }, Ia = {
223
+ }, Qa = {
224
224
  "launcher.open": "Deixa una nota...",
225
225
  "tool.crop": "Cultiu",
226
226
  "tool.resetCrop": "Restablir el cultiu",
@@ -277,7 +277,7 @@ const Oa = {
277
277
  "diag.timezone": "Zona horària",
278
278
  "diag.viewport": "Porta de vista",
279
279
  "diag.user": "Usuari"
280
- }, Va = {
280
+ }, to = {
281
281
  "launcher.open": "Zanechte poznámku...",
282
282
  "tool.crop": "Oříznout",
283
283
  "tool.resetCrop": "Obnovit oříznutí",
@@ -334,7 +334,7 @@ const Oa = {
334
334
  "diag.timezone": "Časové pásmo",
335
335
  "diag.viewport": "Výřez",
336
336
  "diag.user": "Uživatel"
337
- }, $a = {
337
+ }, eo = {
338
338
  "launcher.open": "Efterlad en note...",
339
339
  "tool.crop": "Afgrøde",
340
340
  "tool.resetCrop": "Nulstil afgrøde",
@@ -391,7 +391,7 @@ const Oa = {
391
391
  "diag.timezone": "Tidszone",
392
392
  "diag.viewport": "Viewport",
393
393
  "diag.user": "Bruger"
394
- }, Ba = {
394
+ }, ao = {
395
395
  "launcher.open": "Hinterlassen Sie eine Notiz...",
396
396
  "tool.crop": "Ernte",
397
397
  "tool.resetCrop": "Zuschnitt zurücksetzen",
@@ -448,7 +448,7 @@ const Oa = {
448
448
  "diag.timezone": "Zeitzone",
449
449
  "diag.viewport": "Sichtfenster",
450
450
  "diag.user": "Nutzer"
451
- }, Na = {
451
+ }, oo = {
452
452
  "launcher.open": "Αφήστε ένα σημείωμα...",
453
453
  "tool.crop": "Καλλιέργεια",
454
454
  "tool.resetCrop": "Επαναφορά της καλλιέργειας",
@@ -505,7 +505,7 @@ const Oa = {
505
505
  "diag.timezone": "Ζώνη ώρας",
506
506
  "diag.viewport": "Θύρα προβολής",
507
507
  "diag.user": "Χρήστης"
508
- }, Ka = {
508
+ }, io = {
509
509
  "launcher.open": "Leave a note…",
510
510
  "tool.crop": "Crop",
511
511
  "tool.resetCrop": "Reset crop",
@@ -578,7 +578,7 @@ const Oa = {
578
578
  "diag.timezone": "Timezone",
579
579
  "diag.viewport": "Viewport",
580
580
  "diag.user": "User"
581
- }, Ha = {
581
+ }, no = {
582
582
  "launcher.open": "Deja una nota...",
583
583
  "tool.crop": "Cultivo",
584
584
  "tool.resetCrop": "Restablecer cultivo",
@@ -635,7 +635,7 @@ const Oa = {
635
635
  "diag.timezone": "Zona horaria",
636
636
  "diag.viewport": "Ventana",
637
637
  "diag.user": "Usuario"
638
- }, Ga = {
638
+ }, ro = {
639
639
  "launcher.open": "Deja una nota...",
640
640
  "tool.crop": "Cultivo",
641
641
  "tool.resetCrop": "Restablecer recorte",
@@ -692,7 +692,7 @@ const Oa = {
692
692
  "diag.timezone": "Zona horaria",
693
693
  "diag.viewport": "ViEWPORT",
694
694
  "diag.user": "Usuario"
695
- }, _a = {
695
+ }, so = {
696
696
  "launcher.open": "Jäta märkus...",
697
697
  "tool.crop": "Põllukultuur",
698
698
  "tool.resetCrop": "Lähtesta põllukultuur",
@@ -749,7 +749,7 @@ const Oa = {
749
749
  "diag.timezone": "Ajavöönd",
750
750
  "diag.viewport": "Vaatenurk",
751
751
  "diag.user": "Kasutaja"
752
- }, qa = {
752
+ }, lo = {
753
753
  "launcher.open": "Jätä muistiinpano...",
754
754
  "tool.crop": "Viljely",
755
755
  "tool.resetCrop": "Nollaa rajaus",
@@ -806,7 +806,7 @@ const Oa = {
806
806
  "diag.timezone": "Aikavyöhyke",
807
807
  "diag.viewport": "Näyttöikkuna",
808
808
  "diag.user": "Käyttäjä"
809
- }, Wa = {
809
+ }, co = {
810
810
  "launcher.open": "Laissez un message...",
811
811
  "tool.crop": "Récolte",
812
812
  "tool.resetCrop": "Réinitialiser la récolte",
@@ -863,7 +863,7 @@ const Oa = {
863
863
  "diag.timezone": "Fuseau horaire",
864
864
  "diag.viewport": "Viewport",
865
865
  "diag.user": "Utilisateur"
866
- }, Za = {
866
+ }, uo = {
867
867
  "launcher.open": "एक नोट छोड़ें...",
868
868
  "tool.crop": "क्रॉप",
869
869
  "tool.resetCrop": "क्रॉप रीसेट करें",
@@ -920,7 +920,7 @@ const Oa = {
920
920
  "diag.timezone": "टाइमज़ोन",
921
921
  "diag.viewport": "व्यूपोर्ट",
922
922
  "diag.user": "यूज़र"
923
- }, Ya = {
923
+ }, po = {
924
924
  "launcher.open": "Ostavite poruku...",
925
925
  "tool.crop": "Usjev",
926
926
  "tool.resetCrop": "Resetirajte obrezivanje",
@@ -977,7 +977,7 @@ const Oa = {
977
977
  "diag.timezone": "Vremenska zona",
978
978
  "diag.viewport": "Prikaznica",
979
979
  "diag.user": "Korisnik"
980
- }, Xa = {
980
+ }, go = {
981
981
  "launcher.open": "Hagyjon egy jegyzetet...",
982
982
  "tool.crop": "Termés",
983
983
  "tool.resetCrop": "Vágás visszaállítása",
@@ -1034,7 +1034,7 @@ const Oa = {
1034
1034
  "diag.timezone": "Időzóna",
1035
1035
  "diag.viewport": "Nézetablak",
1036
1036
  "diag.user": "Felhasználó"
1037
- }, Ja = {
1037
+ }, mo = {
1038
1038
  "launcher.open": "Tinggalkan catatan...",
1039
1039
  "tool.crop": "Panas",
1040
1040
  "tool.resetCrop": "Setel ulang tanaman",
@@ -1091,7 +1091,7 @@ const Oa = {
1091
1091
  "diag.timezone": "Zona Waktu",
1092
1092
  "diag.viewport": "Pintu pandang",
1093
1093
  "diag.user": "Pengguna"
1094
- }, Qa = {
1094
+ }, ho = {
1095
1095
  "launcher.open": "Lascia una nota...",
1096
1096
  "tool.crop": "Ritaglia",
1097
1097
  "tool.resetCrop": "Reimposta il ritaglio",
@@ -1148,7 +1148,7 @@ const Oa = {
1148
1148
  "diag.timezone": "Fuso orario",
1149
1149
  "diag.viewport": "Viewport",
1150
1150
  "diag.user": "Utente"
1151
- }, to = {
1151
+ }, fo = {
1152
1152
  "launcher.open": "メモを残してください...",
1153
1153
  "tool.crop": "クロップ",
1154
1154
  "tool.resetCrop": "トリミングをリセット",
@@ -1205,7 +1205,7 @@ const Oa = {
1205
1205
  "diag.timezone": "タイムゾーン",
1206
1206
  "diag.viewport": "ビューポート",
1207
1207
  "diag.user": "ユーザ"
1208
- }, eo = {
1208
+ }, yo = {
1209
1209
  "launcher.open": "메모 남기기...",
1210
1210
  "tool.crop": "크롭",
1211
1211
  "tool.resetCrop": "크롭 재설정",
@@ -1262,7 +1262,7 @@ const Oa = {
1262
1262
  "diag.timezone": "타임존",
1263
1263
  "diag.viewport": "뷰포트",
1264
1264
  "diag.user": "사용자"
1265
- }, ao = {
1265
+ }, vo = {
1266
1266
  "launcher.open": "Palikite pastabą...",
1267
1267
  "tool.crop": "Apkarpyti",
1268
1268
  "tool.resetCrop": "Iš naujo nustatyti apkarpymą",
@@ -1319,7 +1319,7 @@ const Oa = {
1319
1319
  "diag.timezone": "Laiko juosta",
1320
1320
  "diag.viewport": "Peržiūros sritis",
1321
1321
  "diag.user": "Vartotojas"
1322
- }, oo = {
1322
+ }, ko = {
1323
1323
  "launcher.open": "Atstājiet piezīmi...",
1324
1324
  "tool.crop": "Kultūraugs",
1325
1325
  "tool.resetCrop": "Atiestatīt apgriešanu",
@@ -1376,7 +1376,7 @@ const Oa = {
1376
1376
  "diag.timezone": "Laika josla",
1377
1377
  "diag.viewport": "Skatu laukums",
1378
1378
  "diag.user": "Lietotājs"
1379
- }, io = {
1379
+ }, bo = {
1380
1380
  "launcher.open": "Legg igjen et notat...",
1381
1381
  "tool.crop": "Beskjæring",
1382
1382
  "tool.resetCrop": "Tilbakestill beskjæring",
@@ -1433,7 +1433,7 @@ const Oa = {
1433
1433
  "diag.timezone": "Tidssone",
1434
1434
  "diag.viewport": "Visningsport",
1435
1435
  "diag.user": "Bruker"
1436
- }, so = {
1436
+ }, wo = {
1437
1437
  "launcher.open": "Laat een briefje achter...",
1438
1438
  "tool.crop": "Gewas",
1439
1439
  "tool.resetCrop": "Bijsnijden opnieuw instellen",
@@ -1490,7 +1490,7 @@ const Oa = {
1490
1490
  "diag.timezone": "Tijdzone",
1491
1491
  "diag.viewport": "Viewport",
1492
1492
  "diag.user": "Gebruiker"
1493
- }, no = {
1493
+ }, So = {
1494
1494
  "launcher.open": "Zostaw notatkę...",
1495
1495
  "tool.crop": "Uprawa",
1496
1496
  "tool.resetCrop": "Resetuj kadrowanie",
@@ -1547,7 +1547,7 @@ const Oa = {
1547
1547
  "diag.timezone": "Strefa czasowa",
1548
1548
  "diag.viewport": "rzutnia",
1549
1549
  "diag.user": "Użytkownik"
1550
- }, ro = {
1550
+ }, Ao = {
1551
1551
  "launcher.open": "Deixe uma nota...",
1552
1552
  "tool.crop": "Colheita",
1553
1553
  "tool.resetCrop": "Redefinir o corte",
@@ -1604,7 +1604,7 @@ const Oa = {
1604
1604
  "diag.timezone": "Fuso horário",
1605
1605
  "diag.viewport": "Janela de visualização",
1606
1606
  "diag.user": "Usuário"
1607
- }, lo = {
1607
+ }, Co = {
1608
1608
  "launcher.open": "Deixe uma nota...",
1609
1609
  "tool.crop": "Colheita",
1610
1610
  "tool.resetCrop": "Redefinir o recorte",
@@ -1661,7 +1661,7 @@ const Oa = {
1661
1661
  "diag.timezone": "Fuso horário",
1662
1662
  "diag.viewport": "Viewport",
1663
1663
  "diag.user": "Utilizador"
1664
- }, uo = {
1664
+ }, Eo = {
1665
1665
  "launcher.open": "Lăsați o notă...",
1666
1666
  "tool.crop": "Cultură",
1667
1667
  "tool.resetCrop": "Resetați recolta",
@@ -1718,7 +1718,7 @@ const Oa = {
1718
1718
  "diag.timezone": "Fus orar",
1719
1719
  "diag.viewport": "Portul de vizualizare",
1720
1720
  "diag.user": "Utilizator"
1721
- }, co = {
1721
+ }, zo = {
1722
1722
  "launcher.open": "Оставьте заметку...",
1723
1723
  "tool.crop": "урожай",
1724
1724
  "tool.resetCrop": "Сбросить урожай",
@@ -1775,7 +1775,7 @@ const Oa = {
1775
1775
  "diag.timezone": "Часовой пояс",
1776
1776
  "diag.viewport": "окно просмотра",
1777
1777
  "diag.user": "Пользователь"
1778
- }, po = {
1778
+ }, Ro = {
1779
1779
  "launcher.open": "Zanechať poznámku...",
1780
1780
  "tool.crop": "Oplodina",
1781
1781
  "tool.resetCrop": "Obnoviť orezanie",
@@ -1832,7 +1832,7 @@ const Oa = {
1832
1832
  "diag.timezone": "Časové pásmo",
1833
1833
  "diag.viewport": "Zobrazenie",
1834
1834
  "diag.user": "Používateľ"
1835
- }, go = {
1835
+ }, jo = {
1836
1836
  "launcher.open": "Pustite opombo...",
1837
1837
  "tool.crop": "Pridelek",
1838
1838
  "tool.resetCrop": "Ponastavi obrezovanje",
@@ -1889,7 +1889,7 @@ const Oa = {
1889
1889
  "diag.timezone": "Časovni pas",
1890
1890
  "diag.viewport": "Razgledna plošča",
1891
1891
  "diag.user": "Uporabnik"
1892
- }, mo = {
1892
+ }, Po = {
1893
1893
  "launcher.open": "Ostavite belešku...",
1894
1894
  "tool.crop": "Usjev",
1895
1895
  "tool.resetCrop": "Resetujte usev",
@@ -1946,7 +1946,7 @@ const Oa = {
1946
1946
  "diag.timezone": "Vremenska zona",
1947
1947
  "diag.viewport": "Viedport",
1948
1948
  "diag.user": "Korisnik"
1949
- }, ho = {
1949
+ }, Lo = {
1950
1950
  "launcher.open": "Lämna en anteckning...",
1951
1951
  "tool.crop": "Skörda",
1952
1952
  "tool.resetCrop": "Återställ beskärning",
@@ -2003,7 +2003,7 @@ const Oa = {
2003
2003
  "diag.timezone": "Tidszon",
2004
2004
  "diag.viewport": "Viewport",
2005
2005
  "diag.user": "Användare"
2006
- }, fo = {
2006
+ }, xo = {
2007
2007
  "launcher.open": "Mag-iwan ng tala...",
2008
2008
  "tool.crop": "Pag-ani",
2009
2009
  "tool.resetCrop": "I-reset ang panani",
@@ -2060,7 +2060,7 @@ const Oa = {
2060
2060
  "diag.timezone": "Timesone",
2061
2061
  "diag.viewport": "Viewport",
2062
2062
  "diag.user": "Gumagamit"
2063
- }, yo = {
2063
+ }, Uo = {
2064
2064
  "launcher.open": "ทิ้งหมายเหตุ...",
2065
2065
  "tool.crop": "พืชผล",
2066
2066
  "tool.resetCrop": "รีเซ็ตการตัดพืช",
@@ -2117,7 +2117,7 @@ const Oa = {
2117
2117
  "diag.timezone": "เขตเวลา",
2118
2118
  "diag.viewport": "พอร์ตมุมมอง",
2119
2119
  "diag.user": "ผู้ใช้"
2120
- }, vo = {
2120
+ }, To = {
2121
2121
  "launcher.open": "Bir not bırakın...",
2122
2122
  "tool.crop": "Mahsul",
2123
2123
  "tool.resetCrop": "Kırpmayı sıfırla",
@@ -2174,7 +2174,7 @@ const Oa = {
2174
2174
  "diag.timezone": "Saat dilimi",
2175
2175
  "diag.viewport": "Görünüm noktası",
2176
2176
  "diag.user": "Kullanıcı"
2177
- }, ko = {
2177
+ }, Fo = {
2178
2178
  "launcher.open": "Залиште записку...",
2179
2179
  "tool.crop": "Урожай",
2180
2180
  "tool.resetCrop": "Скинути обрізку",
@@ -2231,7 +2231,7 @@ const Oa = {
2231
2231
  "diag.timezone": "Часовий пояс",
2232
2232
  "diag.viewport": "Вигляд",
2233
2233
  "diag.user": "Користувач"
2234
- }, bo = {
2234
+ }, Mo = {
2235
2235
  "launcher.open": "Để lại một ghi chú...",
2236
2236
  "tool.crop": "Cây trồng",
2237
2237
  "tool.resetCrop": "Đặt lại cây trồng",
@@ -2288,7 +2288,7 @@ const Oa = {
2288
2288
  "diag.timezone": "Múi giờ",
2289
2289
  "diag.viewport": "Cổng quan sát",
2290
2290
  "diag.user": "Người dùng"
2291
- }, wo = {
2291
+ }, Do = {
2292
2292
  "launcher.open": "留个笔记...",
2293
2293
  "tool.crop": "作物",
2294
2294
  "tool.resetCrop": "重置裁剪",
@@ -2345,7 +2345,7 @@ const Oa = {
2345
2345
  "diag.timezone": "时区",
2346
2346
  "diag.viewport": "视口",
2347
2347
  "diag.user": "用户"
2348
- }, So = {
2348
+ }, Io = {
2349
2349
  "launcher.open": "留下筆記...",
2350
2350
  "tool.crop": "作物",
2351
2351
  "tool.resetCrop": "重設裁切",
@@ -2403,47 +2403,47 @@ const Oa = {
2403
2403
  "diag.viewport": "視埠",
2404
2404
  "diag.user": "使用者"
2405
2405
  };
2406
- y("en-US", At);
2407
- y("bg", Oa);
2408
- y("ca", Ia);
2409
- y("cs", Va);
2410
- y("da", $a);
2411
- y("de", Ba);
2412
- y("el", Na);
2413
- y("en-GB", Ka);
2414
- y("es", Ha);
2415
- y("es-419", Ga);
2416
- y("et", _a);
2417
- y("fi", qa);
2418
- y("fr", Wa);
2419
- y("hi", Za);
2420
- y("hr", Ya);
2421
- y("hu", Xa);
2422
- y("id", Ja);
2423
- y("it", Qa);
2424
- y("ja", to);
2425
- y("ko", eo);
2426
- y("lt", ao);
2427
- y("lv", oo);
2428
- y("nb", io);
2429
- y("nl", so);
2430
- y("pl", no);
2431
- y("pt-BR", ro);
2432
- y("pt-PT", lo);
2433
- y("ro", uo);
2434
- y("ru", co);
2435
- y("sk", po);
2436
- y("sl", go);
2437
- y("sr", mo);
2438
- y("sv", ho);
2439
- y("fil", fo);
2440
- y("th", yo);
2441
- y("tr", vo);
2442
- y("uk", ko);
2443
- y("vi", bo);
2444
- y("zh-CN", wo);
2445
- y("zh-TW", So);
2446
- function Co(t, e) {
2406
+ w("en-US", jt);
2407
+ w("bg", Ja);
2408
+ w("ca", Qa);
2409
+ w("cs", to);
2410
+ w("da", eo);
2411
+ w("de", ao);
2412
+ w("el", oo);
2413
+ w("en-GB", io);
2414
+ w("es", no);
2415
+ w("es-419", ro);
2416
+ w("et", so);
2417
+ w("fi", lo);
2418
+ w("fr", co);
2419
+ w("hi", uo);
2420
+ w("hr", po);
2421
+ w("hu", go);
2422
+ w("id", mo);
2423
+ w("it", ho);
2424
+ w("ja", fo);
2425
+ w("ko", yo);
2426
+ w("lt", vo);
2427
+ w("lv", ko);
2428
+ w("nb", bo);
2429
+ w("nl", wo);
2430
+ w("pl", So);
2431
+ w("pt-BR", Ao);
2432
+ w("pt-PT", Co);
2433
+ w("ro", Eo);
2434
+ w("ru", zo);
2435
+ w("sk", Ro);
2436
+ w("sl", jo);
2437
+ w("sr", Po);
2438
+ w("sv", Lo);
2439
+ w("fil", xo);
2440
+ w("th", Uo);
2441
+ w("tr", To);
2442
+ w("uk", Fo);
2443
+ w("vi", Mo);
2444
+ w("zh-CN", Do);
2445
+ w("zh-TW", Io);
2446
+ function Oo(t, e) {
2447
2447
  if (t.match(/^[a-z]+:\/\//i))
2448
2448
  return t;
2449
2449
  if (t.match(/^\/\//))
@@ -2453,7 +2453,7 @@ function Co(t, e) {
2453
2453
  const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), i = a.createElement("a");
2454
2454
  return a.head.appendChild(o), a.body.appendChild(i), e && (o.href = e), i.href = t, i.href;
2455
2455
  }
2456
- const Ao = /* @__PURE__ */ (() => {
2456
+ const $o = /* @__PURE__ */ (() => {
2457
2457
  let t = 0;
2458
2458
  const e = () => (
2459
2459
  // eslint-disable-next-line no-bitwise
@@ -2461,33 +2461,33 @@ const Ao = /* @__PURE__ */ (() => {
2461
2461
  );
2462
2462
  return () => (t += 1, `u${e()}${t}`);
2463
2463
  })();
2464
- function J(t) {
2464
+ function et(t) {
2465
2465
  const e = [];
2466
2466
  for (let a = 0, o = t.length; a < o; a++)
2467
2467
  e.push(t[a]);
2468
2468
  return e;
2469
2469
  }
2470
- let it = null;
2471
- function Ie(t = {}) {
2472
- return it || (t.includeStyleProperties ? (it = t.includeStyleProperties, it) : (it = J(window.getComputedStyle(document.documentElement)), it));
2470
+ let st = null;
2471
+ function Je(t = {}) {
2472
+ return st || (t.includeStyleProperties ? (st = t.includeStyleProperties, st) : (st = et(window.getComputedStyle(document.documentElement)), st));
2473
2473
  }
2474
- function Rt(t, e) {
2474
+ function xt(t, e) {
2475
2475
  const o = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
2476
2476
  return o ? parseFloat(o.replace("px", "")) : 0;
2477
2477
  }
2478
- function zo(t) {
2479
- const e = Rt(t, "border-left-width"), a = Rt(t, "border-right-width");
2478
+ function Vo(t) {
2479
+ const e = xt(t, "border-left-width"), a = xt(t, "border-right-width");
2480
2480
  return t.clientWidth + e + a;
2481
2481
  }
2482
- function Eo(t) {
2483
- const e = Rt(t, "border-top-width"), a = Rt(t, "border-bottom-width");
2482
+ function Bo(t) {
2483
+ const e = xt(t, "border-top-width"), a = xt(t, "border-bottom-width");
2484
2484
  return t.clientHeight + e + a;
2485
2485
  }
2486
- function Ve(t, e = {}) {
2487
- const a = e.width || zo(t), o = e.height || Eo(t);
2486
+ function Qe(t, e = {}) {
2487
+ const a = e.width || Vo(t), o = e.height || Bo(t);
2488
2488
  return { width: a, height: o };
2489
2489
  }
2490
- function Ro() {
2490
+ function No() {
2491
2491
  let t, e;
2492
2492
  try {
2493
2493
  e = process;
@@ -2496,11 +2496,11 @@ function Ro() {
2496
2496
  const a = e && e.env ? e.env.devicePixelRatio : null;
2497
2497
  return a && (t = parseInt(a, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
2498
2498
  }
2499
- const U = 16384;
2500
- function jo(t) {
2501
- (t.width > U || t.height > U) && (t.width > U && t.height > U ? t.width > t.height ? (t.height *= U / t.width, t.width = U) : (t.width *= U / t.height, t.height = U) : t.width > U ? (t.height *= U / t.width, t.width = U) : (t.width *= U / t.height, t.height = U));
2499
+ const F = 16384;
2500
+ function Ko(t) {
2501
+ (t.width > F || t.height > F) && (t.width > F && t.height > F ? t.width > t.height ? (t.height *= F / t.width, t.width = F) : (t.width *= F / t.height, t.height = F) : t.width > F ? (t.height *= F / t.width, t.width = F) : (t.width *= F / t.height, t.height = F));
2502
2502
  }
2503
- function jt(t) {
2503
+ function Ut(t) {
2504
2504
  return new Promise((e, a) => {
2505
2505
  const o = new Image();
2506
2506
  o.onload = () => {
@@ -2510,223 +2510,223 @@ function jt(t) {
2510
2510
  }, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = t;
2511
2511
  });
2512
2512
  }
2513
- async function Po(t) {
2513
+ async function Ho(t) {
2514
2514
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
2515
2515
  }
2516
- async function xo(t, e, a) {
2517
- const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"), s = document.createElementNS(o, "foreignObject");
2518
- return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(t), Po(i);
2516
+ async function _o(t, e, a) {
2517
+ const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"), n = document.createElementNS(o, "foreignObject");
2518
+ return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), n.setAttribute("width", "100%"), n.setAttribute("height", "100%"), n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("externalResourcesRequired", "true"), i.appendChild(n), n.appendChild(t), Ho(i);
2519
2519
  }
2520
- const L = (t, e) => {
2520
+ const T = (t, e) => {
2521
2521
  if (t instanceof e)
2522
2522
  return !0;
2523
2523
  const a = Object.getPrototypeOf(t);
2524
- return a === null ? !1 : a.constructor.name === e.name || L(a, e);
2524
+ return a === null ? !1 : a.constructor.name === e.name || T(a, e);
2525
2525
  };
2526
- function Lo(t) {
2526
+ function Go(t) {
2527
2527
  const e = t.getPropertyValue("content");
2528
2528
  return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
2529
2529
  }
2530
- function Uo(t, e) {
2531
- return Ie(e).map((a) => {
2530
+ function qo(t, e) {
2531
+ return Je(e).map((a) => {
2532
2532
  const o = t.getPropertyValue(a), i = t.getPropertyPriority(a);
2533
2533
  return `${a}: ${o}${i ? " !important" : ""};`;
2534
2534
  }).join(" ");
2535
2535
  }
2536
- function To(t, e, a, o) {
2537
- const i = `.${t}:${e}`, s = a.cssText ? Lo(a) : Uo(a, o);
2538
- return document.createTextNode(`${i}{${s}}`);
2536
+ function Wo(t, e, a, o) {
2537
+ const i = `.${t}:${e}`, n = a.cssText ? Go(a) : qo(a, o);
2538
+ return document.createTextNode(`${i}{${n}}`);
2539
2539
  }
2540
- function de(t, e, a, o) {
2541
- const i = window.getComputedStyle(t, a), s = i.getPropertyValue("content");
2542
- if (s === "" || s === "none")
2540
+ function we(t, e, a, o) {
2541
+ const i = window.getComputedStyle(t, a), n = i.getPropertyValue("content");
2542
+ if (n === "" || n === "none")
2543
2543
  return;
2544
- const r = Ao();
2544
+ const s = $o();
2545
2545
  try {
2546
- e.className = `${e.className} ${r}`;
2546
+ e.className = `${e.className} ${s}`;
2547
2547
  } catch {
2548
2548
  return;
2549
2549
  }
2550
2550
  const l = document.createElement("style");
2551
- l.appendChild(To(r, a, i, o)), e.appendChild(l);
2551
+ l.appendChild(Wo(s, a, i, o)), e.appendChild(l);
2552
2552
  }
2553
- function Fo(t, e, a) {
2554
- de(t, e, ":before", a), de(t, e, ":after", a);
2553
+ function Zo(t, e, a) {
2554
+ we(t, e, ":before", a), we(t, e, ":after", a);
2555
2555
  }
2556
- const pe = "application/font-woff", ge = "image/jpeg", Mo = {
2557
- woff: pe,
2558
- woff2: pe,
2556
+ const Se = "application/font-woff", Ae = "image/jpeg", Yo = {
2557
+ woff: Se,
2558
+ woff2: Se,
2559
2559
  ttf: "application/font-truetype",
2560
2560
  eot: "application/vnd.ms-fontobject",
2561
2561
  png: "image/png",
2562
- jpg: ge,
2563
- jpeg: ge,
2562
+ jpg: Ae,
2563
+ jpeg: Ae,
2564
2564
  gif: "image/gif",
2565
2565
  tiff: "image/tiff",
2566
2566
  svg: "image/svg+xml",
2567
2567
  webp: "image/webp"
2568
2568
  };
2569
- function Do(t) {
2569
+ function Xo(t) {
2570
2570
  const e = /\.([^./]*?)$/g.exec(t);
2571
2571
  return e ? e[1] : "";
2572
2572
  }
2573
- function Jt(t) {
2574
- const e = Do(t).toLowerCase();
2575
- return Mo[e] || "";
2573
+ function re(t) {
2574
+ const e = Xo(t).toLowerCase();
2575
+ return Yo[e] || "";
2576
2576
  }
2577
- function Oo(t) {
2577
+ function Jo(t) {
2578
2578
  return t.split(/,/)[1];
2579
2579
  }
2580
- function Gt(t) {
2580
+ function Xt(t) {
2581
2581
  return t.search(/^(data:)/) !== -1;
2582
2582
  }
2583
- function Io(t, e) {
2583
+ function Qo(t, e) {
2584
2584
  return `data:${e};base64,${t}`;
2585
2585
  }
2586
- async function $e(t, e, a) {
2586
+ async function ta(t, e, a) {
2587
2587
  const o = await fetch(t, e);
2588
2588
  if (o.status === 404)
2589
2589
  throw new Error(`Resource "${o.url}" not found`);
2590
2590
  const i = await o.blob();
2591
- return new Promise((s, r) => {
2591
+ return new Promise((n, s) => {
2592
2592
  const l = new FileReader();
2593
- l.onerror = r, l.onloadend = () => {
2593
+ l.onerror = s, l.onloadend = () => {
2594
2594
  try {
2595
- s(a({ res: o, result: l.result }));
2596
- } catch (u) {
2597
- r(u);
2595
+ n(a({ res: o, result: l.result }));
2596
+ } catch (c) {
2597
+ s(c);
2598
2598
  }
2599
2599
  }, l.readAsDataURL(i);
2600
2600
  });
2601
2601
  }
2602
- const $t = {};
2603
- function Vo(t, e, a) {
2602
+ const Gt = {};
2603
+ function ti(t, e, a) {
2604
2604
  let o = t.replace(/\?.*/, "");
2605
2605
  return a && (o = t), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), e ? `[${e}]${o}` : o;
2606
2606
  }
2607
- async function Qt(t, e, a) {
2608
- const o = Vo(t, e, a.includeQueryParams);
2609
- if ($t[o] != null)
2610
- return $t[o];
2607
+ async function se(t, e, a) {
2608
+ const o = ti(t, e, a.includeQueryParams);
2609
+ if (Gt[o] != null)
2610
+ return Gt[o];
2611
2611
  a.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
2612
2612
  let i;
2613
2613
  try {
2614
- const s = await $e(t, a.fetchRequestInit, ({ res: r, result: l }) => (e || (e = r.headers.get("Content-Type") || ""), Oo(l)));
2615
- i = Io(s, e);
2616
- } catch (s) {
2614
+ const n = await ta(t, a.fetchRequestInit, ({ res: s, result: l }) => (e || (e = s.headers.get("Content-Type") || ""), Jo(l)));
2615
+ i = Qo(n, e);
2616
+ } catch (n) {
2617
2617
  i = a.imagePlaceholder || "";
2618
- let r = `Failed to fetch resource: ${t}`;
2619
- s && (r = typeof s == "string" ? s : s.message), r && console.warn(r);
2618
+ let s = `Failed to fetch resource: ${t}`;
2619
+ n && (s = typeof n == "string" ? n : n.message), s && console.warn(s);
2620
2620
  }
2621
- return $t[o] = i, i;
2621
+ return Gt[o] = i, i;
2622
2622
  }
2623
- async function $o(t) {
2623
+ async function ei(t) {
2624
2624
  const e = t.toDataURL();
2625
- return e === "data:," ? t.cloneNode(!1) : jt(e);
2625
+ return e === "data:," ? t.cloneNode(!1) : Ut(e);
2626
2626
  }
2627
- async function Bo(t, e) {
2627
+ async function ai(t, e) {
2628
2628
  if (t.currentSrc) {
2629
- const s = document.createElement("canvas"), r = s.getContext("2d");
2630
- s.width = t.clientWidth, s.height = t.clientHeight, r == null || r.drawImage(t, 0, 0, s.width, s.height);
2631
- const l = s.toDataURL();
2632
- return jt(l);
2629
+ const n = document.createElement("canvas"), s = n.getContext("2d");
2630
+ n.width = t.clientWidth, n.height = t.clientHeight, s == null || s.drawImage(t, 0, 0, n.width, n.height);
2631
+ const l = n.toDataURL();
2632
+ return Ut(l);
2633
2633
  }
2634
- const a = t.poster, o = Jt(a), i = await Qt(a, o, e);
2635
- return jt(i);
2634
+ const a = t.poster, o = re(a), i = await se(a, o, e);
2635
+ return Ut(i);
2636
2636
  }
2637
- async function No(t, e) {
2637
+ async function oi(t, e) {
2638
2638
  var a;
2639
2639
  try {
2640
2640
  if (!((a = t == null ? void 0 : t.contentDocument) === null || a === void 0) && a.body)
2641
- return await Mt(t.contentDocument.body, e, !0);
2641
+ return await Bt(t.contentDocument.body, e, !0);
2642
2642
  } catch {
2643
2643
  }
2644
2644
  return t.cloneNode(!1);
2645
2645
  }
2646
- async function Ko(t, e) {
2647
- return L(t, HTMLCanvasElement) ? $o(t) : L(t, HTMLVideoElement) ? Bo(t, e) : L(t, HTMLIFrameElement) ? No(t, e) : t.cloneNode(Be(t));
2646
+ async function ii(t, e) {
2647
+ return T(t, HTMLCanvasElement) ? ei(t) : T(t, HTMLVideoElement) ? ai(t, e) : T(t, HTMLIFrameElement) ? oi(t, e) : t.cloneNode(ea(t));
2648
2648
  }
2649
- const Ho = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", Be = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
2650
- async function Go(t, e, a) {
2649
+ const ni = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", ea = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
2650
+ async function ri(t, e, a) {
2651
2651
  var o, i;
2652
- if (Be(e))
2652
+ if (ea(e))
2653
2653
  return e;
2654
- let s = [];
2655
- return Ho(t) && t.assignedNodes ? s = J(t.assignedNodes()) : L(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? s = J(t.contentDocument.body.childNodes) : s = J(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), s.length === 0 || L(t, HTMLVideoElement) || await s.reduce((r, l) => r.then(() => Mt(l, a)).then((u) => {
2656
- u && e.appendChild(u);
2654
+ let n = [];
2655
+ return ni(t) && t.assignedNodes ? n = et(t.assignedNodes()) : T(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? n = et(t.contentDocument.body.childNodes) : n = et(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), n.length === 0 || T(t, HTMLVideoElement) || await n.reduce((s, l) => s.then(() => Bt(l, a)).then((c) => {
2656
+ c && e.appendChild(c);
2657
2657
  }), Promise.resolve()), e;
2658
2658
  }
2659
- function _o(t, e, a) {
2659
+ function si(t, e, a) {
2660
2660
  const o = e.style;
2661
2661
  if (!o)
2662
2662
  return;
2663
2663
  const i = window.getComputedStyle(t);
2664
- i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : Ie(a).forEach((s) => {
2665
- let r = i.getPropertyValue(s);
2666
- s === "font-size" && r.endsWith("px") && (r = `${Math.floor(parseFloat(r.substring(0, r.length - 2))) - 0.1}px`), L(t, HTMLIFrameElement) && s === "display" && r === "inline" && (r = "block"), s === "d" && e.getAttribute("d") && (r = `path(${e.getAttribute("d")})`), o.setProperty(s, r, i.getPropertyPriority(s));
2664
+ i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : Je(a).forEach((n) => {
2665
+ let s = i.getPropertyValue(n);
2666
+ n === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), T(t, HTMLIFrameElement) && n === "display" && s === "inline" && (s = "block"), n === "d" && e.getAttribute("d") && (s = `path(${e.getAttribute("d")})`), o.setProperty(n, s, i.getPropertyPriority(n));
2667
2667
  });
2668
2668
  }
2669
- function qo(t, e) {
2670
- L(t, HTMLTextAreaElement) && (e.innerHTML = t.value), L(t, HTMLInputElement) && e.setAttribute("value", t.value);
2669
+ function li(t, e) {
2670
+ T(t, HTMLTextAreaElement) && (e.innerHTML = t.value), T(t, HTMLInputElement) && e.setAttribute("value", t.value);
2671
2671
  }
2672
- function Wo(t, e) {
2673
- if (L(t, HTMLSelectElement)) {
2672
+ function ci(t, e) {
2673
+ if (T(t, HTMLSelectElement)) {
2674
2674
  const o = Array.from(e.children).find((i) => t.value === i.getAttribute("value"));
2675
2675
  o && o.setAttribute("selected", "");
2676
2676
  }
2677
2677
  }
2678
- function Zo(t, e, a) {
2679
- return L(e, Element) && (_o(t, e, a), Fo(t, e, a), qo(t, e), Wo(t, e)), e;
2678
+ function ui(t, e, a) {
2679
+ return T(e, Element) && (si(t, e, a), Zo(t, e, a), li(t, e), ci(t, e)), e;
2680
2680
  }
2681
- async function Yo(t, e) {
2681
+ async function di(t, e) {
2682
2682
  const a = t.querySelectorAll ? t.querySelectorAll("use") : [];
2683
2683
  if (a.length === 0)
2684
2684
  return t;
2685
2685
  const o = {};
2686
- for (let s = 0; s < a.length; s++) {
2687
- const l = a[s].getAttribute("xlink:href");
2686
+ for (let n = 0; n < a.length; n++) {
2687
+ const l = a[n].getAttribute("xlink:href");
2688
2688
  if (l) {
2689
- const u = t.querySelector(l), c = document.querySelector(l);
2690
- !u && c && !o[l] && (o[l] = await Mt(c, e, !0));
2689
+ const c = t.querySelector(l), d = document.querySelector(l);
2690
+ !c && d && !o[l] && (o[l] = await Bt(d, e, !0));
2691
2691
  }
2692
2692
  }
2693
2693
  const i = Object.values(o);
2694
2694
  if (i.length) {
2695
- const s = "http://www.w3.org/1999/xhtml", r = document.createElementNS(s, "svg");
2696
- r.setAttribute("xmlns", s), r.style.position = "absolute", r.style.width = "0", r.style.height = "0", r.style.overflow = "hidden", r.style.display = "none";
2697
- const l = document.createElementNS(s, "defs");
2698
- r.appendChild(l);
2699
- for (let u = 0; u < i.length; u++)
2700
- l.appendChild(i[u]);
2701
- t.appendChild(r);
2695
+ const n = "http://www.w3.org/1999/xhtml", s = document.createElementNS(n, "svg");
2696
+ s.setAttribute("xmlns", n), s.style.position = "absolute", s.style.width = "0", s.style.height = "0", s.style.overflow = "hidden", s.style.display = "none";
2697
+ const l = document.createElementNS(n, "defs");
2698
+ s.appendChild(l);
2699
+ for (let c = 0; c < i.length; c++)
2700
+ l.appendChild(i[c]);
2701
+ t.appendChild(s);
2702
2702
  }
2703
2703
  return t;
2704
2704
  }
2705
- async function Mt(t, e, a) {
2706
- return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => Ko(o, e)).then((o) => Go(t, o, e)).then((o) => Zo(t, o, e)).then((o) => Yo(o, e));
2705
+ async function Bt(t, e, a) {
2706
+ return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => ii(o, e)).then((o) => ri(t, o, e)).then((o) => ui(t, o, e)).then((o) => di(o, e));
2707
2707
  }
2708
- const Ne = /url\((['"]?)([^'"]+?)\1\)/g, Xo = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Jo = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2709
- function Qo(t) {
2708
+ const aa = /url\((['"]?)([^'"]+?)\1\)/g, pi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, gi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2709
+ function mi(t) {
2710
2710
  const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
2711
2711
  return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
2712
2712
  }
2713
- function ti(t) {
2713
+ function hi(t) {
2714
2714
  const e = [];
2715
- return t.replace(Ne, (a, o, i) => (e.push(i), a)), e.filter((a) => !Gt(a));
2715
+ return t.replace(aa, (a, o, i) => (e.push(i), a)), e.filter((a) => !Xt(a));
2716
2716
  }
2717
- async function ei(t, e, a, o, i) {
2717
+ async function fi(t, e, a, o, i) {
2718
2718
  try {
2719
- const s = a ? Co(e, a) : e, r = Jt(e);
2719
+ const n = a ? Oo(e, a) : e, s = re(e);
2720
2720
  let l;
2721
- return i || (l = await Qt(s, r, o)), t.replace(Qo(e), `$1${l}$3`);
2721
+ return i || (l = await se(n, s, o)), t.replace(mi(e), `$1${l}$3`);
2722
2722
  } catch {
2723
2723
  }
2724
2724
  return t;
2725
2725
  }
2726
- function ai(t, { preferredFontFormat: e }) {
2727
- return e ? t.replace(Jo, (a) => {
2726
+ function yi(t, { preferredFontFormat: e }) {
2727
+ return e ? t.replace(gi, (a) => {
2728
2728
  for (; ; ) {
2729
- const [o, , i] = Xo.exec(a) || [];
2729
+ const [o, , i] = pi.exec(a) || [];
2730
2730
  if (!i)
2731
2731
  return "";
2732
2732
  if (i === e)
@@ -2734,52 +2734,52 @@ function ai(t, { preferredFontFormat: e }) {
2734
2734
  }
2735
2735
  }) : t;
2736
2736
  }
2737
- function Ke(t) {
2738
- return t.search(Ne) !== -1;
2737
+ function oa(t) {
2738
+ return t.search(aa) !== -1;
2739
2739
  }
2740
- async function He(t, e, a) {
2741
- if (!Ke(t))
2740
+ async function ia(t, e, a) {
2741
+ if (!oa(t))
2742
2742
  return t;
2743
- const o = ai(t, a);
2744
- return ti(o).reduce((s, r) => s.then((l) => ei(l, r, e, a)), Promise.resolve(o));
2743
+ const o = yi(t, a);
2744
+ return hi(o).reduce((n, s) => n.then((l) => fi(l, s, e, a)), Promise.resolve(o));
2745
2745
  }
2746
- async function st(t, e, a) {
2746
+ async function lt(t, e, a) {
2747
2747
  var o;
2748
2748
  const i = (o = e.style) === null || o === void 0 ? void 0 : o.getPropertyValue(t);
2749
2749
  if (i) {
2750
- const s = await He(i, null, a);
2751
- return e.style.setProperty(t, s, e.style.getPropertyPriority(t)), !0;
2750
+ const n = await ia(i, null, a);
2751
+ return e.style.setProperty(t, n, e.style.getPropertyPriority(t)), !0;
2752
2752
  }
2753
2753
  return !1;
2754
2754
  }
2755
- async function oi(t, e) {
2756
- await st("background", t, e) || await st("background-image", t, e), await st("mask", t, e) || await st("-webkit-mask", t, e) || await st("mask-image", t, e) || await st("-webkit-mask-image", t, e);
2755
+ async function vi(t, e) {
2756
+ await lt("background", t, e) || await lt("background-image", t, e), await lt("mask", t, e) || await lt("-webkit-mask", t, e) || await lt("mask-image", t, e) || await lt("-webkit-mask-image", t, e);
2757
2757
  }
2758
- async function ii(t, e) {
2759
- const a = L(t, HTMLImageElement);
2760
- if (!(a && !Gt(t.src)) && !(L(t, SVGImageElement) && !Gt(t.href.baseVal)))
2758
+ async function ki(t, e) {
2759
+ const a = T(t, HTMLImageElement);
2760
+ if (!(a && !Xt(t.src)) && !(T(t, SVGImageElement) && !Xt(t.href.baseVal)))
2761
2761
  return;
2762
- const o = a ? t.src : t.href.baseVal, i = await Qt(o, Jt(o), e);
2763
- await new Promise((s, r) => {
2764
- t.onload = s, t.onerror = e.onImageErrorHandler ? (...u) => {
2762
+ const o = a ? t.src : t.href.baseVal, i = await se(o, re(o), e);
2763
+ await new Promise((n, s) => {
2764
+ t.onload = n, t.onerror = e.onImageErrorHandler ? (...c) => {
2765
2765
  try {
2766
- s(e.onImageErrorHandler(...u));
2767
- } catch (c) {
2768
- r(c);
2766
+ n(e.onImageErrorHandler(...c));
2767
+ } catch (d) {
2768
+ s(d);
2769
2769
  }
2770
- } : r;
2770
+ } : s;
2771
2771
  const l = t;
2772
- l.decode && (l.decode = s), l.loading === "lazy" && (l.loading = "eager"), a ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
2772
+ l.decode && (l.decode = n), l.loading === "lazy" && (l.loading = "eager"), a ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
2773
2773
  });
2774
2774
  }
2775
- async function si(t, e) {
2776
- const o = J(t.childNodes).map((i) => Ge(i, e));
2775
+ async function bi(t, e) {
2776
+ const o = et(t.childNodes).map((i) => na(i, e));
2777
2777
  await Promise.all(o).then(() => t);
2778
2778
  }
2779
- async function Ge(t, e) {
2780
- L(t, Element) && (await oi(t, e), await ii(t, e), await si(t, e));
2779
+ async function na(t, e) {
2780
+ T(t, Element) && (await vi(t, e), await ki(t, e), await bi(t, e));
2781
2781
  }
2782
- function ni(t, e) {
2782
+ function wi(t, e) {
2783
2783
  const { style: a } = t;
2784
2784
  e.backgroundColor && (a.backgroundColor = e.backgroundColor), e.width && (a.width = `${e.width}px`), e.height && (a.height = `${e.height}px`);
2785
2785
  const o = e.style;
@@ -2787,144 +2787,144 @@ function ni(t, e) {
2787
2787
  a[i] = o[i];
2788
2788
  }), t;
2789
2789
  }
2790
- const me = {};
2791
- async function he(t) {
2792
- let e = me[t];
2790
+ const Ce = {};
2791
+ async function Ee(t) {
2792
+ let e = Ce[t];
2793
2793
  if (e != null)
2794
2794
  return e;
2795
2795
  const o = await (await fetch(t)).text();
2796
- return e = { url: t, cssText: o }, me[t] = e, e;
2796
+ return e = { url: t, cssText: o }, Ce[t] = e, e;
2797
2797
  }
2798
- async function fe(t, e) {
2798
+ async function ze(t, e) {
2799
2799
  let a = t.cssText;
2800
- const o = /url\(["']?([^"')]+)["']?\)/g, s = (a.match(/url\([^)]+\)/g) || []).map(async (r) => {
2801
- let l = r.replace(o, "$1");
2802
- return l.startsWith("https://") || (l = new URL(l, t.url).href), $e(l, e.fetchRequestInit, ({ result: u }) => (a = a.replace(r, `url(${u})`), [r, u]));
2800
+ const o = /url\(["']?([^"')]+)["']?\)/g, n = (a.match(/url\([^)]+\)/g) || []).map(async (s) => {
2801
+ let l = s.replace(o, "$1");
2802
+ return l.startsWith("https://") || (l = new URL(l, t.url).href), ta(l, e.fetchRequestInit, ({ result: c }) => (a = a.replace(s, `url(${c})`), [s, c]));
2803
2803
  });
2804
- return Promise.all(s).then(() => a);
2804
+ return Promise.all(n).then(() => a);
2805
2805
  }
2806
- function ye(t) {
2806
+ function Re(t) {
2807
2807
  if (t == null)
2808
2808
  return [];
2809
2809
  const e = [], a = /(\/\*[\s\S]*?\*\/)/gi;
2810
2810
  let o = t.replace(a, "");
2811
2811
  const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
2812
2812
  for (; ; ) {
2813
- const u = i.exec(o);
2814
- if (u === null)
2813
+ const c = i.exec(o);
2814
+ if (c === null)
2815
2815
  break;
2816
- e.push(u[0]);
2816
+ e.push(c[0]);
2817
2817
  }
2818
2818
  o = o.replace(i, "");
2819
- const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, r = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(r, "gi");
2819
+ const n = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(s, "gi");
2820
2820
  for (; ; ) {
2821
- let u = s.exec(o);
2822
- if (u === null) {
2823
- if (u = l.exec(o), u === null)
2821
+ let c = n.exec(o);
2822
+ if (c === null) {
2823
+ if (c = l.exec(o), c === null)
2824
2824
  break;
2825
- s.lastIndex = l.lastIndex;
2825
+ n.lastIndex = l.lastIndex;
2826
2826
  } else
2827
- l.lastIndex = s.lastIndex;
2828
- e.push(u[0]);
2827
+ l.lastIndex = n.lastIndex;
2828
+ e.push(c[0]);
2829
2829
  }
2830
2830
  return e;
2831
2831
  }
2832
- async function ri(t, e) {
2832
+ async function Si(t, e) {
2833
2833
  const a = [], o = [];
2834
2834
  return t.forEach((i) => {
2835
2835
  if ("cssRules" in i)
2836
2836
  try {
2837
- J(i.cssRules || []).forEach((s, r) => {
2838
- if (s.type === CSSRule.IMPORT_RULE) {
2839
- let l = r + 1;
2840
- const u = s.href, c = he(u).then((g) => fe(g, e)).then((g) => ye(g).forEach((k) => {
2837
+ et(i.cssRules || []).forEach((n, s) => {
2838
+ if (n.type === CSSRule.IMPORT_RULE) {
2839
+ let l = s + 1;
2840
+ const c = n.href, d = Ee(c).then((m) => ze(m, e)).then((m) => Re(m).forEach((S) => {
2841
2841
  try {
2842
- i.insertRule(k, k.startsWith("@import") ? l += 1 : i.cssRules.length);
2842
+ i.insertRule(S, S.startsWith("@import") ? l += 1 : i.cssRules.length);
2843
2843
  } catch (v) {
2844
2844
  console.error("Error inserting rule from remote css", {
2845
- rule: k,
2845
+ rule: S,
2846
2846
  error: v
2847
2847
  });
2848
2848
  }
2849
- })).catch((g) => {
2850
- console.error("Error loading remote css", g.toString());
2849
+ })).catch((m) => {
2850
+ console.error("Error loading remote css", m.toString());
2851
2851
  });
2852
- o.push(c);
2852
+ o.push(d);
2853
2853
  }
2854
2854
  });
2855
- } catch (s) {
2856
- const r = t.find((l) => l.href == null) || document.styleSheets[0];
2857
- i.href != null && o.push(he(i.href).then((l) => fe(l, e)).then((l) => ye(l).forEach((u) => {
2858
- r.insertRule(u, r.cssRules.length);
2855
+ } catch (n) {
2856
+ const s = t.find((l) => l.href == null) || document.styleSheets[0];
2857
+ i.href != null && o.push(Ee(i.href).then((l) => ze(l, e)).then((l) => Re(l).forEach((c) => {
2858
+ s.insertRule(c, s.cssRules.length);
2859
2859
  })).catch((l) => {
2860
2860
  console.error("Error loading remote stylesheet", l);
2861
- })), console.error("Error inlining remote css file", s);
2861
+ })), console.error("Error inlining remote css file", n);
2862
2862
  }
2863
2863
  }), Promise.all(o).then(() => (t.forEach((i) => {
2864
2864
  if ("cssRules" in i)
2865
2865
  try {
2866
- J(i.cssRules || []).forEach((s) => {
2867
- a.push(s);
2866
+ et(i.cssRules || []).forEach((n) => {
2867
+ a.push(n);
2868
2868
  });
2869
- } catch (s) {
2870
- console.error(`Error while reading CSS rules from ${i.href}`, s);
2869
+ } catch (n) {
2870
+ console.error(`Error while reading CSS rules from ${i.href}`, n);
2871
2871
  }
2872
2872
  }), a));
2873
2873
  }
2874
- function li(t) {
2875
- return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Ke(e.style.getPropertyValue("src")));
2874
+ function Ai(t) {
2875
+ return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => oa(e.style.getPropertyValue("src")));
2876
2876
  }
2877
- async function ui(t, e) {
2877
+ async function Ci(t, e) {
2878
2878
  if (t.ownerDocument == null)
2879
2879
  throw new Error("Provided element is not within a Document");
2880
- const a = J(t.ownerDocument.styleSheets), o = await ri(a, e);
2881
- return li(o);
2880
+ const a = et(t.ownerDocument.styleSheets), o = await Si(a, e);
2881
+ return Ai(o);
2882
2882
  }
2883
- function _e(t) {
2883
+ function ra(t) {
2884
2884
  return t.trim().replace(/["']/g, "");
2885
2885
  }
2886
- function ci(t) {
2886
+ function Ei(t) {
2887
2887
  const e = /* @__PURE__ */ new Set();
2888
2888
  function a(o) {
2889
- (o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((s) => {
2890
- e.add(_e(s));
2891
- }), Array.from(o.children).forEach((s) => {
2892
- s instanceof HTMLElement && a(s);
2889
+ (o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((n) => {
2890
+ e.add(ra(n));
2891
+ }), Array.from(o.children).forEach((n) => {
2892
+ n instanceof HTMLElement && a(n);
2893
2893
  });
2894
2894
  }
2895
2895
  return a(t), e;
2896
2896
  }
2897
- async function di(t, e) {
2898
- const a = await ui(t, e), o = ci(t);
2899
- return (await Promise.all(a.filter((s) => o.has(_e(s.style.fontFamily))).map((s) => {
2900
- const r = s.parentStyleSheet ? s.parentStyleSheet.href : null;
2901
- return He(s.cssText, r, e);
2897
+ async function zi(t, e) {
2898
+ const a = await Ci(t, e), o = Ei(t);
2899
+ return (await Promise.all(a.filter((n) => o.has(ra(n.style.fontFamily))).map((n) => {
2900
+ const s = n.parentStyleSheet ? n.parentStyleSheet.href : null;
2901
+ return ia(n.cssText, s, e);
2902
2902
  }))).join(`
2903
2903
  `);
2904
2904
  }
2905
- async function pi(t, e) {
2906
- const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await di(t, e);
2905
+ async function Ri(t, e) {
2906
+ const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await zi(t, e);
2907
2907
  if (a) {
2908
2908
  const o = document.createElement("style"), i = document.createTextNode(a);
2909
2909
  o.appendChild(i), t.firstChild ? t.insertBefore(o, t.firstChild) : t.appendChild(o);
2910
2910
  }
2911
2911
  }
2912
- async function gi(t, e = {}) {
2913
- const { width: a, height: o } = Ve(t, e), i = await Mt(t, e, !0);
2914
- return await pi(i, e), await Ge(i, e), ni(i, e), await xo(i, a, o);
2912
+ async function ji(t, e = {}) {
2913
+ const { width: a, height: o } = Qe(t, e), i = await Bt(t, e, !0);
2914
+ return await Ri(i, e), await na(i, e), wi(i, e), await _o(i, a, o);
2915
2915
  }
2916
- async function mi(t, e = {}) {
2917
- const { width: a, height: o } = Ve(t, e), i = await gi(t, e), s = await jt(i), r = document.createElement("canvas"), l = r.getContext("2d"), u = e.pixelRatio || Ro(), c = e.canvasWidth || a, g = e.canvasHeight || o;
2918
- return r.width = c * u, r.height = g * u, e.skipAutoScale || jo(r), r.style.width = `${c}`, r.style.height = `${g}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, r.width, r.height)), l.drawImage(s, 0, 0, r.width, r.height), r;
2916
+ async function Pi(t, e = {}) {
2917
+ const { width: a, height: o } = Qe(t, e), i = await ji(t, e), n = await Ut(i), s = document.createElement("canvas"), l = s.getContext("2d"), c = e.pixelRatio || No(), d = e.canvasWidth || a, m = e.canvasHeight || o;
2918
+ return s.width = d * c, s.height = m * c, e.skipAutoScale || Ko(s), s.style.width = `${d}`, s.style.height = `${m}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, s.width, s.height)), l.drawImage(n, 0, 0, s.width, s.height), s;
2919
2919
  }
2920
- async function ve(t, e = {}) {
2921
- return (await mi(t, e)).toDataURL();
2920
+ async function je(t, e = {}) {
2921
+ return (await Pi(t, e)).toDataURL();
2922
2922
  }
2923
- const Pt = "data-nf-capture-chrome", hi = "data-nf-canvas-snap", fi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2924
- function qe(t) {
2925
- return t instanceof Element && (t.hasAttribute(Pt) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
2923
+ const Tt = "data-nf-capture-chrome", Li = "data-nf-canvas-snap", xi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2924
+ function sa(t) {
2925
+ return t instanceof Element && (t.hasAttribute(Tt) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
2926
2926
  }
2927
- function yi() {
2927
+ function Ui() {
2928
2928
  const t = [];
2929
2929
  return Array.from(document.styleSheets).forEach((e) => {
2930
2930
  try {
@@ -2948,7 +2948,7 @@ function yi() {
2948
2948
  });
2949
2949
  };
2950
2950
  }
2951
- function vi() {
2951
+ function Ti() {
2952
2952
  const t = [];
2953
2953
  return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
2954
2954
  const o = a.getBoundingClientRect(), i = document.createElement("div");
@@ -2964,28 +2964,28 @@ function vi() {
2964
2964
  ].join(";"), document.body.appendChild(i), t.push(i);
2965
2965
  }), () => t.forEach((a) => a.remove());
2966
2966
  }
2967
- function ki() {
2968
- const t = document.querySelector(`[${Pt}]`);
2967
+ function Fi() {
2968
+ const t = document.querySelector(`[${Tt}]`);
2969
2969
  if (t)
2970
2970
  return t;
2971
2971
  const e = document.createElement("div");
2972
- return e.setAttribute(Pt, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${p("status.capturing")}</span>`, document.body.appendChild(e), e;
2972
+ return e.setAttribute(Tt, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${g("status.capturing")}</span>`, document.body.appendChild(e), e;
2973
2973
  }
2974
- function bi() {
2975
- document.querySelectorAll(`[${Pt}]`).forEach((t) => t.remove());
2974
+ function Mi() {
2975
+ document.querySelectorAll(`[${Tt}]`).forEach((t) => t.remove());
2976
2976
  }
2977
- function _t() {
2977
+ function Jt() {
2978
2978
  return new Promise((t) => {
2979
2979
  requestAnimationFrame(() => requestAnimationFrame(t));
2980
2980
  });
2981
2981
  }
2982
- function Q(t) {
2982
+ function at(t) {
2983
2983
  if (typeof t != "string" || !t.startsWith("data:image/"))
2984
2984
  return !1;
2985
2985
  const e = t.indexOf(",");
2986
2986
  return e > 0 && e < t.length - 1;
2987
2987
  }
2988
- function wi() {
2988
+ function Di() {
2989
2989
  const t = document.documentElement, e = document.body, a = Math.max(
2990
2990
  window.innerWidth || 0,
2991
2991
  (t == null ? void 0 : t.clientWidth) || 0,
@@ -3001,10 +3001,10 @@ function wi() {
3001
3001
  );
3002
3002
  return { width: a, height: o };
3003
3003
  }
3004
- async function Si() {
3004
+ async function Ii() {
3005
3005
  const t = [], e = Array.from(document.querySelectorAll("canvas"));
3006
3006
  for (const a of e) {
3007
- if (a.closest("#notefully") || qe(a))
3007
+ if (a.closest("#notefully") || sa(a))
3008
3008
  continue;
3009
3009
  let o = "";
3010
3010
  try {
@@ -3014,8 +3014,8 @@ async function Si() {
3014
3014
  }
3015
3015
  if (!o || o === "data:,")
3016
3016
  continue;
3017
- const i = document.createElement("img"), s = getComputedStyle(a);
3018
- i.setAttribute(hi, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = s.width, i.style.height = s.height, i.style.maxWidth = s.maxWidth, i.style.maxHeight = s.maxHeight, i.style.objectFit = "fill", i.style.display = s.display === "inline" ? "inline-block" : s.display, a.replaceWith(i), t.push({ canvas: a, img: i });
3017
+ const i = document.createElement("img"), n = getComputedStyle(a);
3018
+ i.setAttribute(Li, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = n.width, i.style.height = n.height, i.style.maxWidth = n.maxWidth, i.style.maxHeight = n.maxHeight, i.style.objectFit = "fill", i.style.display = n.display === "inline" ? "inline-block" : n.display, a.replaceWith(i), t.push({ canvas: a, img: i });
3019
3019
  }
3020
3020
  return await Promise.all(t.map(({ img: a }) => {
3021
3021
  if (!a.complete)
@@ -3031,37 +3031,37 @@ async function Si() {
3031
3031
  });
3032
3032
  };
3033
3033
  }
3034
- async function Ci(t) {
3034
+ async function Oi(t) {
3035
3035
  if (!t)
3036
3036
  return null;
3037
3037
  if (typeof t == "string")
3038
- return Q(t) ? t : null;
3038
+ return at(t) ? t : null;
3039
3039
  if (typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement)
3040
3040
  try {
3041
3041
  const e = t.toDataURL("image/png");
3042
- return Q(e) ? e : null;
3042
+ return at(e) ? e : null;
3043
3043
  } catch {
3044
3044
  return null;
3045
3045
  }
3046
3046
  if (typeof Blob < "u" && t instanceof Blob) {
3047
- const e = await Ai(t);
3048
- return Q(e) ? e : null;
3047
+ const e = await $i(t);
3048
+ return at(e) ? e : null;
3049
3049
  }
3050
3050
  return null;
3051
3051
  }
3052
- async function Ai(t) {
3052
+ async function $i(t) {
3053
3053
  if (typeof FileReader == "function")
3054
3054
  return new Promise((o, i) => {
3055
- const s = new FileReader();
3056
- s.onload = () => o(String(s.result || "")), s.onerror = () => i(s.error || new Error("Could not read capture blob")), s.readAsDataURL(t);
3055
+ const n = new FileReader();
3056
+ n.onload = () => o(String(n.result || "")), n.onerror = () => i(n.error || new Error("Could not read capture blob")), n.readAsDataURL(t);
3057
3057
  });
3058
3058
  const e = Buffer.from(await t.arrayBuffer());
3059
3059
  return `data:${t.type || "application/octet-stream"};base64,${e.toString("base64")}`;
3060
3060
  }
3061
- async function zi() {
3061
+ async function Vi() {
3062
3062
  var e;
3063
3063
  if (!((e = navigator.mediaDevices) != null && e.getDisplayMedia))
3064
- throw new Error(p("status.screenUnsupported"));
3064
+ throw new Error(g("status.screenUnsupported"));
3065
3065
  const t = await navigator.mediaDevices.getDisplayMedia({
3066
3066
  video: { displaySurface: "browser" },
3067
3067
  audio: !1,
@@ -3072,74 +3072,74 @@ async function zi() {
3072
3072
  const a = document.createElement("video");
3073
3073
  a.muted = !0, a.playsInline = !0, a.srcObject = t, await a.play(), a.videoWidth || await new Promise((l) => {
3074
3074
  a.onloadedmetadata = () => l();
3075
- }), await _t();
3076
- const o = a.videoWidth || 1, i = a.videoHeight || 1, s = document.createElement("canvas");
3077
- s.width = o, s.height = i, s.getContext("2d").drawImage(a, 0, 0, o, i);
3078
- const r = s.toDataURL("image/png");
3079
- if (!Q(r))
3080
- throw new Error(p("status.screenEmpty"));
3081
- return r;
3075
+ }), await Jt();
3076
+ const o = a.videoWidth || 1, i = a.videoHeight || 1, n = document.createElement("canvas");
3077
+ n.width = o, n.height = i, n.getContext("2d").drawImage(a, 0, 0, o, i);
3078
+ const s = n.toDataURL("image/png");
3079
+ if (!at(s))
3080
+ throw new Error(g("status.screenEmpty"));
3081
+ return s;
3082
3082
  } finally {
3083
3083
  t.getTracks().forEach((a) => a.stop());
3084
3084
  }
3085
3085
  }
3086
- async function We(t = {}) {
3087
- const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = ki(), i = yi();
3088
- let s = () => {
3086
+ async function la(t = {}) {
3087
+ const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = Fi(), i = Ui();
3088
+ let n = () => {
3089
3089
  };
3090
3090
  e && (e.style.display = "none");
3091
- const r = vi();
3091
+ const s = Ti();
3092
3092
  try {
3093
- if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await _t(), typeof t.capture == "function") {
3094
- const k = await Ci(await t.capture());
3095
- if (k)
3096
- return k;
3093
+ if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await Jt(), typeof t.capture == "function") {
3094
+ const S = await Oi(await t.capture());
3095
+ if (S)
3096
+ return S;
3097
3097
  }
3098
- s = await Si(), await _t();
3099
- const { width: l, height: u } = wi(), c = {
3098
+ n = await Ii(), await Jt();
3099
+ const { width: l, height: c } = Di(), d = {
3100
3100
  cacheBust: !0,
3101
3101
  width: l,
3102
- height: u,
3102
+ height: c,
3103
3103
  pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
3104
- filter: (k) => !qe(k),
3104
+ filter: (S) => !sa(S),
3105
3105
  // 404 / CORS images must not abort the whole capture.
3106
- imagePlaceholder: fi,
3106
+ imagePlaceholder: xi,
3107
3107
  onImageErrorHandler: () => {
3108
3108
  }
3109
3109
  };
3110
- let g = "";
3110
+ let m = "";
3111
3111
  try {
3112
- g = await ve(document.body, c);
3112
+ m = await je(document.body, d);
3113
3113
  } catch {
3114
- g = await ve(document.body, { ...c, skipFonts: !0 });
3114
+ m = await je(document.body, { ...d, skipFonts: !0 });
3115
3115
  }
3116
- if (!Q(g))
3117
- throw new Error(p("status.captureEmpty"));
3118
- return g;
3116
+ if (!at(m))
3117
+ throw new Error(g("status.captureEmpty"));
3118
+ return m;
3119
3119
  } finally {
3120
3120
  try {
3121
- s();
3121
+ n();
3122
3122
  } catch {
3123
3123
  }
3124
- r(), i(), o.remove(), bi(), e && (e.style.display = a);
3124
+ s(), i(), o.remove(), Mi(), e && (e.style.display = a);
3125
3125
  }
3126
3126
  }
3127
- function Ei(t = "") {
3127
+ function Bi(t = "") {
3128
3128
  const e = String(t || "");
3129
3129
  return e ? /Windows NT/i.test(e) ? "Windows" : /iPhone|iPad|iPod/i.test(e) ? "iOS" : /Mac OS X|Macintosh/i.test(e) ? "macOS" : /Android/i.test(e) ? "Android" : /CrOS/i.test(e) ? "ChromeOS" : /Linux/i.test(e) ? "Linux" : "Other" : "";
3130
3130
  }
3131
- function Ri(t = "") {
3131
+ function Ni(t = "") {
3132
3132
  const e = String(t || "");
3133
3133
  return e ? /Edg\//i.test(e) ? "Edge" : /OPR\/|Opera/i.test(e) ? "Opera" : /Firefox\//i.test(e) ? "Firefox" : /Chrome\//i.test(e) || /CriOS\//i.test(e) ? "Chrome" : /Safari\//i.test(e) ? "Safari" : "Other" : "";
3134
3134
  }
3135
- function ji(t = {}) {
3135
+ function Ki(t = {}) {
3136
3136
  const e = navigator.userAgent;
3137
3137
  return {
3138
3138
  url: location.href,
3139
3139
  title: document.title,
3140
3140
  userAgent: e,
3141
- os: Ei(e),
3142
- browser: Ri(e),
3141
+ os: Bi(e),
3142
+ browser: Ni(e),
3143
3143
  language: navigator.language,
3144
3144
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
3145
3145
  viewport: {
@@ -3159,20 +3159,24 @@ function ji(t = {}) {
3159
3159
  }
3160
3160
  };
3161
3161
  }
3162
- const ke = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), be = {
3162
+ const Pe = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Le = {
3163
3163
  id: "userId",
3164
3164
  username: "displayName",
3165
3165
  name: "displayName"
3166
- }, we = /* @__PURE__ */ new Set([
3166
+ }, xe = /* @__PURE__ */ new Set([
3167
3167
  "endpoint",
3168
3168
  "projectKey",
3169
3169
  "version",
3170
3170
  "name",
3171
3171
  "targets",
3172
3172
  "hideLauncher",
3173
+ "launcherCorner",
3173
3174
  "theme",
3174
3175
  "video",
3175
3176
  "consoleLogLimit",
3177
+ "consoleMethods",
3178
+ "scrubLog",
3179
+ "logSources",
3176
3180
  "kinds",
3177
3181
  "capture",
3178
3182
  "onBeforeCapture",
@@ -3181,7 +3185,7 @@ const ke = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), be = {
3181
3185
  "displayLink",
3182
3186
  "locale",
3183
3187
  "translations"
3184
- ]), Se = {
3188
+ ]), Ue = {
3185
3189
  slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
3186
3190
  projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
3187
3191
  project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
@@ -3190,40 +3194,40 @@ const ke = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), be = {
3190
3194
  email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
3191
3195
  displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
3192
3196
  };
3193
- function Pi(t = {}, e = {}) {
3194
- const a = e.warn || Ze, o = t && typeof t == "object" ? t : {}, i = {}, s = [];
3195
- for (const r of ke)
3196
- Object.prototype.hasOwnProperty.call(o, r) && (i[r] = o[r]);
3197
- for (const [r, l] of Object.entries(be))
3198
- Object.prototype.hasOwnProperty.call(o, r) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[r]));
3199
- for (const r of Object.keys(o))
3200
- ke.has(r) || Object.prototype.hasOwnProperty.call(be, r) || s.push(r);
3201
- if (s.length) {
3202
- const r = s.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3197
+ function Hi(t = {}, e = {}) {
3198
+ const a = e.warn || ca, o = t && typeof t == "object" ? t : {}, i = {}, n = [];
3199
+ for (const s of Pe)
3200
+ Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s]);
3201
+ for (const [s, l] of Object.entries(Le))
3202
+ Object.prototype.hasOwnProperty.call(o, s) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[s]));
3203
+ for (const s of Object.keys(o))
3204
+ Pe.has(s) || Object.prototype.hasOwnProperty.call(Le, s) || n.push(s);
3205
+ if (n.length) {
3206
+ const s = n.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3203
3207
  a(
3204
- `Notefully.identify: ignoring unknown key(s): ${s.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + r
3208
+ `Notefully.identify: ignoring unknown key(s): ${n.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + s
3205
3209
  );
3206
3210
  }
3207
3211
  return i;
3208
3212
  }
3209
- function xi(t = {}, e = {}) {
3210
- const a = e.warn || Ze, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((s) => !we.has(s));
3213
+ function _i(t = {}, e = {}) {
3214
+ const a = e.warn || ca, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((n) => !xe.has(n));
3211
3215
  if (i.length)
3212
- for (const s of i) {
3213
- if (Se[s]) {
3214
- a(`Notefully.init: ignoring "${s}". ${Se[s]}`);
3216
+ for (const n of i) {
3217
+ if (Ue[n]) {
3218
+ a(`Notefully.init: ignoring "${n}". ${Ue[n]}`);
3215
3219
  continue;
3216
3220
  }
3217
3221
  a(
3218
- `Notefully.init: ignoring unknown key "${s}". Supported: ${[...we].join(", ")}.`
3222
+ `Notefully.init: ignoring unknown key "${n}". Supported: ${[...xe].join(", ")}.`
3219
3223
  );
3220
3224
  }
3221
3225
  }
3222
- function Ze(t) {
3226
+ function ca(t) {
3223
3227
  typeof console < "u" && typeof console.warn == "function" && console.warn(t);
3224
3228
  }
3225
- const Ce = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, Li = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3226
- function Ae(t) {
3229
+ const Te = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, Gi = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3230
+ function Fe(t) {
3227
3231
  if (t instanceof Error)
3228
3232
  return t.stack || t.message || String(t);
3229
3233
  if (typeof t == "string")
@@ -3234,168 +3238,381 @@ function Ae(t) {
3234
3238
  return String(t);
3235
3239
  }
3236
3240
  }
3237
- function te(t) {
3241
+ function le(t) {
3238
3242
  if (!t || typeof t != "string")
3239
3243
  return "";
3240
3244
  let e = t.replace(/[\u0000-\u001F\u007F]/g, "").trim();
3241
- return e ? (Ce.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !Ce.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
3245
+ return e ? (Te.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !Te.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
3242
3246
  }
3243
- function Ui(t = []) {
3247
+ function qi(t = []) {
3244
3248
  if (!t.length)
3245
3249
  return { text: "", segments: [{ text: "", style: null }] };
3246
3250
  const e = t[0];
3247
3251
  if (typeof e != "string" || !e.includes("%c")) {
3248
- const r = t.map(Ae).join(" ");
3249
- return { text: r, segments: [{ text: r, style: null }] };
3252
+ const s = t.map(Fe).join(" ");
3253
+ return { text: s, segments: [{ text: s, style: null }] };
3250
3254
  }
3251
3255
  const a = e.split("%c"), o = [];
3252
3256
  let i = 1;
3253
- for (let r = 0; r < a.length; r++) {
3254
- const l = a[r];
3255
- if (r === 0) {
3257
+ for (let s = 0; s < a.length; s++) {
3258
+ const l = a[s];
3259
+ if (s === 0) {
3256
3260
  l && o.push({ text: l, style: null });
3257
3261
  continue;
3258
3262
  }
3259
- const u = i < t.length ? String(t[i++] ?? "") : "", c = te(u) || null;
3260
- o.push({ text: l, style: c });
3263
+ const c = i < t.length ? String(t[i++] ?? "") : "", d = le(c) || null;
3264
+ o.push({ text: l, style: d });
3261
3265
  }
3262
3266
  if (i < t.length) {
3263
- const r = t.slice(i).map(Ae).join(" ");
3264
- r && o.push({
3265
- text: (o.length ? " " : "") + r,
3267
+ const s = t.slice(i).map(Fe).join(" ");
3268
+ s && o.push({
3269
+ text: (o.length ? " " : "") + s,
3266
3270
  style: null
3267
3271
  });
3268
3272
  }
3269
3273
  return {
3270
- text: o.map((r) => r.text).join(""),
3274
+ text: o.map((s) => s.text).join(""),
3271
3275
  segments: o.length ? o : [{ text: "", style: null }]
3272
3276
  };
3273
3277
  }
3274
- function Ti(t) {
3278
+ function Wi(t) {
3275
3279
  const e = String(t ?? "");
3276
3280
  if (!e.includes("%c"))
3277
3281
  return [{ text: e, style: null }];
3278
- const a = e.split("%c"), o = a[a.length - 1], i = o.match(Li);
3279
- let s = "";
3282
+ const a = e.split("%c"), o = a[a.length - 1], i = o.match(Gi);
3283
+ let n = "";
3280
3284
  if (i) {
3281
- const u = i.index, c = /\s/.test(o[u]) ? u + 1 : u;
3282
- /^[a-z-]+\s*:/i.test(o.slice(c)) && (a[a.length - 1] = o.slice(0, c).replace(/\s+$/, ""), s = o.slice(c).trim());
3285
+ const c = i.index, d = /\s/.test(o[c]) ? c + 1 : c;
3286
+ /^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""), n = o.slice(d).trim());
3283
3287
  }
3284
- const r = te(s) || null, l = [];
3285
- for (let u = 0; u < a.length; u++) {
3286
- const c = a[u];
3287
- if (u === 0) {
3288
- c && l.push({ text: c, style: null });
3288
+ const s = le(n) || null, l = [];
3289
+ for (let c = 0; c < a.length; c++) {
3290
+ const d = a[c];
3291
+ if (c === 0) {
3292
+ d && l.push({ text: d, style: null });
3289
3293
  continue;
3290
3294
  }
3291
3295
  l.push({
3292
- text: c,
3293
- style: u === 1 ? r : null
3296
+ text: d,
3297
+ style: c === 1 ? s : null
3294
3298
  });
3295
3299
  }
3296
3300
  return l.length ? l : [{ text: e, style: null }];
3297
3301
  }
3298
- function Ye(t = {}) {
3302
+ function ua(t = {}) {
3299
3303
  return Array.isArray(t.segments) && t.segments.length ? t.segments.map((e) => ({
3300
3304
  text: String((e == null ? void 0 : e.text) ?? ""),
3301
- style: te(e == null ? void 0 : e.style) || null
3302
- })) : Ti(t.text);
3305
+ style: le(e == null ? void 0 : e.style) || null
3306
+ })) : Wi(t.text);
3303
3307
  }
3304
- function Fi(t = {}) {
3305
- return Ye(t).map((a) => a.text).join("");
3308
+ function Zi(t = {}) {
3309
+ return ua(t).map((a) => a.text).join("");
3306
3310
  }
3307
- function ze(t) {
3311
+ function Me(t) {
3308
3312
  return String(t ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3309
3313
  }
3310
- function Mi(t = {}) {
3311
- return Ye(t).map((e) => {
3312
- const a = ze(e.text);
3313
- return e.style ? `<span class="nf-console-styled" style="${ze(e.style)}">${a}</span>` : a;
3314
+ function Yi(t = {}) {
3315
+ return ua(t).map((e) => {
3316
+ const a = Me(e.text);
3317
+ return e.style ? `<span class="nf-console-styled" style="${Me(e.style)}">${a}</span>` : a;
3314
3318
  }).join("");
3315
3319
  }
3316
- const Di = 80;
3317
- function Oi() {
3318
- const t = [], e = {};
3319
- let a = !1;
3320
- const o = (s, r) => {
3321
- let l = "", u = null;
3320
+ const Xi = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g, Ji = /\bBearer\s+[A-Za-z0-9\-._~+/]+=*/gi, Qi = /(Authorization:\s*)(\S+)/gi, tn = /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, en = /\b[a-f0-9]{32,}\b/gi, an = /\b[A-Za-z0-9+/]{40,}={0,2}\b/g, ct = "[redacted]";
3321
+ function De(t) {
3322
+ return !t || typeof t != "string" ? t == null ? "" : String(t) : t.replace(Ji, `Bearer ${ct}`).replace(Qi, `$1${ct}`).replace(tn, ct).replace(Xi, ct).replace(en, ct).replace(an, ct);
3323
+ }
3324
+ function Ft(t) {
3325
+ if (!t || typeof t != "object")
3326
+ return t;
3327
+ const e = { ...t, text: De(t.text || "") };
3328
+ return Array.isArray(t.segments) && t.segments.length && (e.segments = t.segments.map((a) => ({
3329
+ ...a,
3330
+ text: De(a.text || "")
3331
+ }))), e;
3332
+ }
3333
+ const on = 60, nn = 20, ut = 2e3, Mt = ["log", "info", "warn", "error"], rn = ["debug", "trace", "assert"], da = [...Mt, ...rn], sn = /* @__PURE__ */ new Set(["warn", "error", "assert"]), ln = /* @__PURE__ */ new Set(["SCRIPT", "LINK", "IMG", "VIDEO", "AUDIO"]);
3334
+ function Qt(t) {
3335
+ return sn.has(t);
3336
+ }
3337
+ function Ie() {
3338
+ return Date.now();
3339
+ }
3340
+ function Oe() {
3341
+ return typeof performance < "u" && typeof performance.now == "function" ? performance.now() : 0;
3342
+ }
3343
+ function cn(t, e = 2) {
3344
+ if (!t || typeof t != "string")
3345
+ return "";
3346
+ const a = t.split(`
3347
+ `), o = a[0] && /^\s*Error\b/.test(a[0]) ? 1 : 0;
3348
+ return a.slice(o + e).join(`
3349
+ `).trim();
3350
+ }
3351
+ function un(t) {
3352
+ return (t || []).some((e) => e instanceof Error);
3353
+ }
3354
+ function pa(t) {
3355
+ const e = t && t.target;
3356
+ if (!e || typeof e.tagName != "string" || e === (typeof window < "u" ? window : null))
3357
+ return null;
3358
+ const a = String(e.tagName || "").toUpperCase();
3359
+ if (!ln.has(a))
3360
+ return null;
3361
+ const o = String(e.src || e.href || "").trim();
3362
+ return o ? `Failed to load <${a.toLowerCase()}> ${o}` : null;
3363
+ }
3364
+ function dn(t) {
3365
+ const e = pa(t);
3366
+ if (e)
3367
+ return e;
3368
+ const a = String((t == null ? void 0 : t.message) || "").trim(), o = t == null ? void 0 : t.error, i = String((t == null ? void 0 : t.filename) || "").trim(), n = t == null ? void 0 : t.lineno, s = t == null ? void 0 : t.colno, l = !!i || Number.isFinite(n) && n > 0 || Number.isFinite(s) && s > 0;
3369
+ if ((!a || a === "Script error.") && !o) {
3370
+ const m = ["Script error. (cross-origin; enable CORS for stack details)"];
3371
+ return l && m.push($e(i, n, s)), m.join(" ");
3372
+ }
3373
+ const d = [];
3374
+ return a ? d.push(a) : o && o.message ? d.push(String(o.message)) : d.push("window.error"), l && d.push($e(i, n, s)), o instanceof Error && o.stack && d.push(o.stack), d.join(`
3375
+ `);
3376
+ }
3377
+ function $e(t, e, a) {
3378
+ const o = t || "(unknown)", i = Number.isFinite(e) ? e : "?", n = Number.isFinite(a) ? a : "?";
3379
+ return `at ${o}:${i}:${n}`;
3380
+ }
3381
+ function pn(t) {
3382
+ const e = t == null ? void 0 : t.reason;
3383
+ return e instanceof Error ? [e] : e == null ? ["unhandledrejection"] : typeof e == "string" ? [`Unhandled rejection: ${e}`] : ["Unhandled rejection:", e];
3384
+ }
3385
+ function gn(t) {
3386
+ const e = (t == null ? void 0 : t.effectiveDirective) || (t == null ? void 0 : t.violatedDirective) || "unknown", a = (t == null ? void 0 : t.blockedURI) || "", o = (t == null ? void 0 : t.disposition) || "", i = [`CSP violation: ${e}`];
3387
+ return a && i.push(`blocked ${a}`), o && i.push(`(${o})`), i.join(" ");
3388
+ }
3389
+ function te(t, e) {
3390
+ const a = [...t, ...e];
3391
+ return a.sort((o, i) => {
3392
+ const n = (o.at || 0) - (i.at || 0);
3393
+ return n !== 0 ? n : (o.t || 0) - (i.t || 0);
3394
+ }), a;
3395
+ }
3396
+ function mn(t, e, a) {
3397
+ const o = te(t, e);
3398
+ if (a == null || !Number.isFinite(a) || a < 0)
3399
+ return o;
3400
+ if (a === 0)
3401
+ return [];
3402
+ if (o.length <= a)
3403
+ return o;
3404
+ const i = o.slice(-a), n = new Set(i), s = e.filter((c) => !n.has(c));
3405
+ if (!s.length)
3406
+ return i;
3407
+ const l = i.slice();
3408
+ for (const c of s.slice().reverse()) {
3409
+ const d = l.findIndex((m) => !Qt(m.level));
3410
+ if (d === -1)
3411
+ break;
3412
+ l.splice(d, 1), l.push(c);
3413
+ }
3414
+ return te(l, []);
3415
+ }
3416
+ function ce(t) {
3417
+ const e = Array.isArray(t) && t.length ? t : Mt, a = new Set(da), o = [];
3418
+ for (const i of e) {
3419
+ const n = String(i || "").trim();
3420
+ !a.has(n) || o.includes(n) || o.push(n);
3421
+ }
3422
+ return o.length ? o : Mt.slice();
3423
+ }
3424
+ function hn() {
3425
+ const t = [], e = [], a = {};
3426
+ let o = !1, i = Mt.slice(), n = Ft, s = null, l = null, c = null;
3427
+ const d = (u) => Qt(u) ? e : t, m = (u) => Qt(u) ? nn : on, S = (u) => {
3428
+ let h = {
3429
+ level: u.level || "log",
3430
+ text: String(u.text || ""),
3431
+ at: Number.isFinite(u.at) ? u.at : Ie(),
3432
+ t: Number.isFinite(u.t) ? u.t : Oe()
3433
+ };
3434
+ if (u.truncated && (h.truncated = !0), Number.isFinite(u.count) && u.count > 1 && (h.count = u.count), Array.isArray(u.segments) && u.segments.length && (h.segments = u.segments), typeof n == "function")
3435
+ try {
3436
+ const C = n(h);
3437
+ if (C == null)
3438
+ return;
3439
+ h = C;
3440
+ } catch {
3441
+ }
3442
+ h.text = String(h.text || "").slice(0, ut), Array.isArray(h.segments) && (h.segments = h.segments.map((C) => ({
3443
+ text: String(C.text || "").slice(0, ut),
3444
+ style: C.style || null
3445
+ })));
3446
+ const R = d(h.level), k = R[R.length - 1];
3447
+ if (k && k.level === h.level && k.text === h.text) {
3448
+ k.count = (k.count || 1) + 1, k.at = h.at, k.t = h.t, h.truncated && (k.truncated = !0);
3449
+ return;
3450
+ }
3451
+ R.push(h);
3452
+ const f = m(h.level);
3453
+ for (; R.length > f; )
3454
+ R.shift();
3455
+ }, v = (u, h, R = {}) => {
3456
+ let k = "", f = null;
3322
3457
  try {
3323
- const g = Ui(r);
3324
- l = g.text, u = g.segments;
3458
+ const $ = qi(h);
3459
+ k = $.text, f = $.segments;
3325
3460
  } catch {
3326
- l = String(r[0]), u = [{ text: l, style: null }];
3461
+ k = String((h == null ? void 0 : h[0]) ?? ""), f = [{ text: k, style: null }];
3462
+ }
3463
+ if (R.captureStack !== !1 && (u === "warn" || u === "error") && !un(h)) {
3464
+ const $ = cn(new Error().stack || "", 2);
3465
+ $ && (k = k ? `${k}
3466
+ ${$}` : $);
3327
3467
  }
3328
- const c = {
3329
- level: s,
3330
- text: l.slice(0, 2e3),
3331
- at: Date.now()
3468
+ const Z = k.length > ut, Y = {
3469
+ level: u,
3470
+ text: k.slice(0, ut),
3471
+ at: Ie(),
3472
+ t: Oe()
3332
3473
  };
3333
- u && u.some((g) => g.style) && (c.segments = u.map((g) => ({
3334
- text: String(g.text || "").slice(0, 2e3),
3335
- style: g.style || null
3336
- }))), t.push(c), t.length > Di && t.shift();
3474
+ Z && (Y.truncated = !0), f && f.some(($) => $.style) && (Y.segments = f.map(($) => ({
3475
+ text: String($.text || "").slice(0, ut),
3476
+ style: $.style || null
3477
+ }))), S(Y);
3478
+ }, A = () => {
3479
+ for (const u of da)
3480
+ a[u] && (console[u] = a[u], delete a[u]);
3481
+ for (const u of i)
3482
+ if (typeof console[u] == "function") {
3483
+ if (a[u] = console[u].bind(console), u === "assert") {
3484
+ console.assert = (h, ...R) => {
3485
+ a.assert(h, ...R), h || v("assert", R.length ? R : ["Assertion failed"], { captureStack: !1 });
3486
+ };
3487
+ continue;
3488
+ }
3489
+ console[u] = (...h) => {
3490
+ v(u, h), a[u](...h);
3491
+ };
3492
+ }
3337
3493
  };
3338
3494
  return {
3339
3495
  hook: () => {
3340
- a || typeof window > "u" || (a = !0, ["log", "info", "warn", "error"].forEach((s) => {
3341
- e[s] = console[s].bind(console), console[s] = (...r) => {
3342
- o(s, r), e[s](...r);
3343
- };
3344
- }), window.addEventListener("error", (s) => {
3345
- o("error", [s.message || "window.error"]);
3346
- }), window.addEventListener("unhandledrejection", (s) => {
3347
- o("error", [s.reason || "unhandledrejection"]);
3348
- }));
3496
+ o || typeof window > "u" || (o = !0, A(), s = (u) => {
3497
+ const h = u == null ? void 0 : u.target;
3498
+ if (!!(h && typeof h.tagName == "string" && h !== window)) {
3499
+ const k = pa(u);
3500
+ if (!k)
3501
+ return;
3502
+ v("error", [k], { captureStack: !1 });
3503
+ return;
3504
+ }
3505
+ v("error", [dn(u)], { captureStack: !1 });
3506
+ }, l = (u) => {
3507
+ v("error", pn(u), { captureStack: !1 });
3508
+ }, c = (u) => {
3509
+ v("error", [gn(u)], { captureStack: !1 });
3510
+ }, window.addEventListener("error", s, !0), window.addEventListener("unhandledrejection", l), window.addEventListener("securitypolicyviolation", c));
3349
3511
  },
3512
+ unhook: () => {
3513
+ if (o) {
3514
+ o = !1;
3515
+ for (const u of Object.keys(a))
3516
+ console[u] = a[u], delete a[u];
3517
+ typeof window < "u" && (s && window.removeEventListener("error", s, !0), l && window.removeEventListener("unhandledrejection", l), c && window.removeEventListener("securitypolicyviolation", c)), s = null, l = null, c = null;
3518
+ }
3519
+ },
3520
+ push: v,
3521
+ /**
3522
+ * @param {object} entry
3523
+ */
3524
+ pushEntry(u) {
3525
+ if (!u || typeof u != "object")
3526
+ return;
3527
+ const h = String(u.text ?? "");
3528
+ S({
3529
+ level: u.level || "log",
3530
+ text: h,
3531
+ at: u.at,
3532
+ t: u.t,
3533
+ truncated: u.truncated || h.length > ut,
3534
+ count: u.count,
3535
+ segments: u.segments
3536
+ });
3537
+ },
3538
+ /**
3539
+ * @param {string[]} next
3540
+ */
3541
+ setConsoleMethods(u) {
3542
+ i = ce(u), o && A();
3543
+ },
3544
+ /**
3545
+ * @param {(entry: object) => object|null|undefined} [fn]
3546
+ */
3547
+ setScrubLog(u) {
3548
+ n = typeof u == "function" ? u : Ft;
3549
+ },
3550
+ /**
3551
+ * Full merged buffer (both rings).
3552
+ * @returns {object[]}
3553
+ */
3350
3554
  snapshot() {
3351
- return t.slice();
3555
+ return te(t, e);
3556
+ },
3557
+ /**
3558
+ * @param {number} limit
3559
+ * @returns {object[]}
3560
+ */
3561
+ snapshotForReport(u) {
3562
+ return mn(t, e, u);
3563
+ },
3564
+ /**
3565
+ * @returns {{general: object[], priority: object[]}}
3566
+ */
3567
+ _rings() {
3568
+ return { general: t, priority: e };
3352
3569
  }
3353
3570
  };
3354
3571
  }
3355
- function Ii(t, e = {}) {
3572
+ function fn(t, e = {}) {
3356
3573
  const a = window.SpeechRecognition || window.webkitSpeechRecognition, o = typeof e.onActiveChange == "function" ? e.onActiveChange : null;
3357
- let i = null, s = !1;
3358
- const r = (c) => {
3359
- const g = !!c;
3360
- s !== g && (s = g, o == null || o(s));
3574
+ let i = null, n = !1;
3575
+ const s = (d) => {
3576
+ const m = !!d;
3577
+ n !== m && (n = m, o == null || o(n));
3361
3578
  }, l = () => {
3362
- if (r(!1), i)
3579
+ if (s(!1), i)
3363
3580
  try {
3364
3581
  i.stop();
3365
3582
  } catch {
3366
3583
  }
3367
3584
  };
3368
3585
  return {
3369
- start: (c = {}) => {
3586
+ start: (d = {}) => {
3370
3587
  if (!a)
3371
- throw new Error(p("status.speechUnsupported"));
3372
- return s ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = c.lang || navigator.language || "en-US", i.onresult = (g) => {
3373
- let k = "";
3374
- for (let v = g.resultIndex; v < g.results.length; v += 1)
3375
- g.results[v].isFinal && (k += g.results[v][0].transcript);
3376
- k && t(k);
3588
+ throw new Error(g("status.speechUnsupported"));
3589
+ return n ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = d.lang || navigator.language || "en-US", i.onresult = (m) => {
3590
+ let S = "";
3591
+ for (let v = m.resultIndex; v < m.results.length; v += 1)
3592
+ m.results[v].isFinal && (S += m.results[v][0].transcript);
3593
+ S && t(S);
3377
3594
  }, i.onerror = () => {
3378
- r(!1);
3595
+ s(!1);
3379
3596
  }, i.onend = () => {
3380
- r(!1);
3381
- }, i.start(), r(!0), !0);
3597
+ s(!1);
3598
+ }, i.start(), s(!0), !0);
3382
3599
  },
3383
3600
  stop: l,
3384
3601
  isSupported: () => !!a,
3385
- isActive: () => s
3602
+ isActive: () => n
3386
3603
  };
3387
3604
  }
3388
- const Vi = 60 * 1e3;
3389
- function $i({ onStart: t, onStop: e, onError: a }) {
3390
- let o = null, i = null, s = [], r = null;
3605
+ const yn = 60 * 1e3;
3606
+ function vn({ onStart: t, onStop: e, onError: a }) {
3607
+ let o = null, i = null, n = [], s = null;
3391
3608
  const l = () => {
3392
- if (r && (clearTimeout(r), r = null), i && i.state !== "inactive")
3609
+ if (s && (clearTimeout(s), s = null), i && i.state !== "inactive")
3393
3610
  try {
3394
3611
  i.stop();
3395
3612
  } catch {
3396
3613
  }
3397
- o && (o.getTracks().forEach((g) => g.stop()), o = null);
3398
- }, u = () => {
3614
+ o && (o.getTracks().forEach((m) => m.stop()), o = null);
3615
+ }, c = () => {
3399
3616
  if (i && i.state === "recording") {
3400
3617
  i.stop();
3401
3618
  return;
@@ -3403,25 +3620,25 @@ function $i({ onStart: t, onStop: e, onError: a }) {
3403
3620
  l(), e(null);
3404
3621
  };
3405
3622
  return { start: async () => {
3406
- var g, k;
3407
- if (!((g = navigator.mediaDevices) != null && g.getDisplayMedia))
3623
+ var m, S;
3624
+ if (!((m = navigator.mediaDevices) != null && m.getDisplayMedia))
3408
3625
  throw new Error("Screen recording is not supported in this browser.");
3409
3626
  o = await navigator.mediaDevices.getDisplayMedia({
3410
3627
  video: { displaySurface: "browser" },
3411
3628
  audio: !1,
3412
3629
  preferCurrentTab: !0,
3413
3630
  selfBrowserSurface: "include"
3414
- }), s = [], i = new MediaRecorder(o, {
3631
+ }), n = [], i = new MediaRecorder(o, {
3415
3632
  mimeType: MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm"
3416
3633
  }), i.ondataavailable = (v) => {
3417
- v.data && v.data.size && s.push(v.data);
3634
+ v.data && v.data.size && n.push(v.data);
3418
3635
  }, i.onstop = () => {
3419
- const v = s.length ? new Blob(s, { type: i.mimeType || "video/webm" }) : null;
3636
+ const v = n.length ? new Blob(n, { type: i.mimeType || "video/webm" }) : null;
3420
3637
  l(), e(v);
3421
- }, (k = o.getVideoTracks()[0]) == null || k.addEventListener("ended", () => u()), i.start(), r = setTimeout(u, Vi), t();
3422
- }, stop: u };
3638
+ }, (S = o.getVideoTracks()[0]) == null || S.addEventListener("ended", () => c()), i.start(), s = setTimeout(c, yn), t();
3639
+ }, stop: c };
3423
3640
  }
3424
- function Bi() {
3641
+ function kn() {
3425
3642
  const t = /* @__PURE__ */ new Set();
3426
3643
  return {
3427
3644
  alloc() {
@@ -3439,77 +3656,77 @@ function Bi() {
3439
3656
  }
3440
3657
  };
3441
3658
  }
3442
- const Bt = { x: 0, y: 0, w: 1, h: 1 };
3443
- function ee() {
3444
- const t = Bi();
3445
- let e = [], a = { ...Bt }, o = 1;
3659
+ const qt = { x: 0, y: 0, w: 1, h: 1 };
3660
+ function ue() {
3661
+ const t = kn();
3662
+ let e = [], a = { ...qt }, o = 1;
3446
3663
  return {
3447
- list: () => e.filter((s) => Hi(s, a)),
3664
+ list: () => e.filter((n) => Sn(n, a)),
3448
3665
  all: () => e.slice(),
3449
3666
  crop: () => ({ ...a }),
3450
- setCrop(s) {
3451
- return a = Ki(s), a;
3667
+ setCrop(n) {
3668
+ return a = wn(n), a;
3452
3669
  },
3453
3670
  resetCrop() {
3454
- return a = { ...Bt }, a;
3671
+ return a = { ...qt }, a;
3455
3672
  },
3456
3673
  isCropped() {
3457
3674
  return a.x > 1e-6 || a.y > 1e-6 || a.w < 1 - 1e-6 || a.h < 1 - 1e-6;
3458
3675
  },
3459
- add(s, r) {
3676
+ add(n, s) {
3460
3677
  const l = {
3461
3678
  id: `s${o++}`,
3462
- type: s,
3679
+ type: n,
3463
3680
  number: t.alloc(),
3464
3681
  x: 0.2,
3465
3682
  y: 0.2,
3466
- w: s === "arrow" ? 0.2 : 0.22,
3467
- h: s === "arrow" ? 0.05 : 0.16,
3683
+ w: n === "arrow" ? 0.2 : 0.22,
3684
+ h: n === "arrow" ? 0.05 : 0.16,
3468
3685
  x2: 0.4,
3469
3686
  y2: 0.28,
3470
- ...r
3687
+ ...s
3471
3688
  };
3472
3689
  return e.push(l), l;
3473
3690
  },
3474
- update(s, r) {
3475
- const l = e.find((u) => u.id === s);
3476
- return l ? (Object.assign(l, r), l) : null;
3691
+ update(n, s) {
3692
+ const l = e.find((c) => c.id === n);
3693
+ return l ? (Object.assign(l, s), l) : null;
3477
3694
  },
3478
- remove(s) {
3479
- const r = e.findIndex((u) => u.id === s);
3480
- if (r < 0)
3695
+ remove(n) {
3696
+ const s = e.findIndex((c) => c.id === n);
3697
+ if (s < 0)
3481
3698
  return null;
3482
- const [l] = e.splice(r, 1);
3699
+ const [l] = e.splice(s, 1);
3483
3700
  return t.free(l.number), l;
3484
3701
  },
3485
3702
  reset() {
3486
- for (e = [], a = { ...Bt }, o = 1; t.peekUsed().length; )
3703
+ for (e = [], a = { ...qt }, o = 1; t.peekUsed().length; )
3487
3704
  t.free(t.peekUsed()[0]);
3488
3705
  }
3489
3706
  };
3490
3707
  }
3491
- function Ni(t, e) {
3492
- const a = Number(e == null ? void 0 : e.w) || 1, o = Number(e == null ? void 0 : e.h) || 1, i = Number(e == null ? void 0 : e.x) || 0, s = Number(e == null ? void 0 : e.y) || 0;
3493
- return (Array.isArray(t) ? t : []).map((r) => {
3708
+ function bn(t, e) {
3709
+ const a = Number(e == null ? void 0 : e.w) || 1, o = Number(e == null ? void 0 : e.h) || 1, i = Number(e == null ? void 0 : e.x) || 0, n = Number(e == null ? void 0 : e.y) || 0;
3710
+ return (Array.isArray(t) ? t : []).map((s) => {
3494
3711
  const l = {
3495
- ...r,
3496
- x: (r.x - i) / a,
3497
- y: (r.y - s) / o,
3498
- w: (r.w || 0) / a,
3499
- h: (r.h || 0) / o
3712
+ ...s,
3713
+ x: (s.x - i) / a,
3714
+ y: (s.y - n) / o,
3715
+ w: (s.w || 0) / a,
3716
+ h: (s.h || 0) / o
3500
3717
  };
3501
- return Number.isFinite(r.x2) && (l.x2 = (r.x2 - i) / a), Number.isFinite(r.y2) && (l.y2 = (r.y2 - s) / o), l;
3718
+ return Number.isFinite(s.x2) && (l.x2 = (s.x2 - i) / a), Number.isFinite(s.y2) && (l.y2 = (s.y2 - n) / o), l;
3502
3719
  });
3503
3720
  }
3504
- function Ki(t) {
3721
+ function wn(t) {
3505
3722
  const e = Math.min(Math.max(t.x, 0), 0.95), a = Math.min(Math.max(t.y, 0), 0.95), o = Math.min(Math.max(t.w, 0.05), 1 - e), i = Math.min(Math.max(t.h, 0.05), 1 - a);
3506
3723
  return { x: e, y: a, w: o, h: i };
3507
3724
  }
3508
- function Hi(t, e) {
3725
+ function Sn(t, e) {
3509
3726
  const a = t.type === "arrow" ? (t.x + (t.x2 ?? t.x)) / 2 : t.x + (t.w || 0) / 2, o = t.type === "arrow" ? (t.y + (t.y2 ?? t.y)) / 2 : t.y + (t.h || 0) / 2;
3510
3727
  return a >= e.x && o >= e.y && a <= e.x + e.w && o <= e.y + e.h;
3511
3728
  }
3512
- function Xe(t) {
3729
+ function ga(t) {
3513
3730
  const e = Math.max(1, Number(t) || 1);
3514
3731
  return {
3515
3732
  stroke: Math.max(2, e * 75e-4),
@@ -3519,55 +3736,55 @@ function Xe(t) {
3519
3736
  arrowHeadAngle: 0.4
3520
3737
  };
3521
3738
  }
3522
- function Gi(t, e, a, o, i) {
3523
- const s = Math.atan2(o - e, a - t), r = i.arrowHead, l = Math.min(i.stroke, r * 0.2), u = a, c = o, g = a - Math.cos(s) * r, k = o - Math.sin(s) * r, v = {
3524
- x: u - r * Math.cos(s - i.arrowHeadAngle),
3525
- y: c - r * Math.sin(s - i.arrowHeadAngle)
3526
- }, w = {
3527
- x: u - r * Math.cos(s + i.arrowHeadAngle),
3528
- y: c - r * Math.sin(s + i.arrowHeadAngle)
3529
- }, b = {
3530
- x: a - Math.cos(s) * l,
3531
- y: o - Math.sin(s) * l
3739
+ function An(t, e, a, o, i) {
3740
+ const n = Math.atan2(o - e, a - t), s = i.arrowHead, l = Math.min(i.stroke, s * 0.2), c = a, d = o, m = a - Math.cos(n) * s, S = o - Math.sin(n) * s, v = {
3741
+ x: c - s * Math.cos(n - i.arrowHeadAngle),
3742
+ y: d - s * Math.sin(n - i.arrowHeadAngle)
3743
+ }, A = {
3744
+ x: c - s * Math.cos(n + i.arrowHeadAngle),
3745
+ y: d - s * Math.sin(n + i.arrowHeadAngle)
3746
+ }, E = {
3747
+ x: a - Math.cos(n) * l,
3748
+ y: o - Math.sin(n) * l
3532
3749
  };
3533
- return { angle: s, tipX: u, tipY: c, baseX: g, baseY: k, left: v, right: w, shaftEnd: b };
3534
- }
3535
- async function Ee(t, e = {}) {
3536
- const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, s = await Zi(t), r = Math.round(a.x * s.width), l = Math.round(a.y * s.height), u = Math.max(1, Math.round(a.w * s.width)), c = Math.max(1, Math.round(a.h * s.height)), g = _i(u, c, o), k = g.width, v = g.height, w = document.createElement("canvas");
3537
- w.width = k, w.height = v, w.getContext("2d").drawImage(s, r, l, u, c, 0, 0, k, v);
3538
- const z = await Re(w, "image/webp", i);
3539
- if (z && z.size > 0 && z.type === "image/webp")
3540
- return { blob: z, width: k, height: v, mime: "image/webp", ext: "webp" };
3541
- const j = await Re(w, "image/png");
3542
- if (!j || !j.size)
3750
+ return { angle: n, tipX: c, tipY: d, baseX: m, baseY: S, left: v, right: A, shaftEnd: E };
3751
+ }
3752
+ async function Ve(t, e = {}) {
3753
+ const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, n = await Rn(t), s = Math.round(a.x * n.width), l = Math.round(a.y * n.height), c = Math.max(1, Math.round(a.w * n.width)), d = Math.max(1, Math.round(a.h * n.height)), m = Cn(c, d, o), S = m.width, v = m.height, A = document.createElement("canvas");
3754
+ A.width = S, A.height = v, A.getContext("2d").drawImage(n, s, l, c, d, 0, 0, S, v);
3755
+ const P = await Be(A, "image/webp", i);
3756
+ if (P && P.size > 0 && P.type === "image/webp")
3757
+ return { blob: P, width: S, height: v, mime: "image/webp", ext: "webp" };
3758
+ const u = await Be(A, "image/png");
3759
+ if (!u || !u.size)
3543
3760
  throw new Error("Could not encode screenshot");
3544
- return { blob: j, width: k, height: v, mime: "image/png", ext: "png" };
3761
+ return { blob: u, width: S, height: v, mime: "image/png", ext: "png" };
3545
3762
  }
3546
- function _i(t, e, a = 2048) {
3547
- const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), s = Math.max(1, Number(a) || 2048), r = Math.min(1, s / Math.max(o, i));
3763
+ function Cn(t, e, a = 2048) {
3764
+ const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), n = Math.max(1, Number(a) || 2048), s = Math.min(1, n / Math.max(o, i));
3548
3765
  return {
3549
- width: Math.max(1, Math.round(o * r)),
3550
- height: Math.max(1, Math.round(i * r)),
3551
- scale: r
3766
+ width: Math.max(1, Math.round(o * s)),
3767
+ height: Math.max(1, Math.round(i * s)),
3768
+ scale: s
3552
3769
  };
3553
3770
  }
3554
- function qi(t = 2048) {
3771
+ function En(t = 2048) {
3555
3772
  const e = Math.floor(Number(t) / 2);
3556
3773
  return Math.max(1, Math.min(1024, e || 1024));
3557
3774
  }
3558
- function Wi(t, e = null) {
3775
+ function zn(t, e = null) {
3559
3776
  if ((e == null ? void 0 : e.code) === "payload_too_large" || Number(e == null ? void 0 : e.status) === 413 || Number(t == null ? void 0 : t.status) === 413)
3560
3777
  return !0;
3561
3778
  const a = String((t == null ? void 0 : t.message) || t || (e == null ? void 0 : e.error) || "").toLowerCase();
3562
3779
  return a.includes("failed to fetch") || a.includes("networkerror") || a.includes("load failed") || a.includes("too large") || a.includes("payload") || a.includes("entity too large") ? !0 : Number(t == null ? void 0 : t.status) === 413;
3563
3780
  }
3564
- function Zi(t) {
3781
+ function Rn(t) {
3565
3782
  return new Promise((e, a) => {
3566
3783
  const o = new Image();
3567
3784
  o.onload = () => e(o), o.onerror = () => a(new Error("Could not load screenshot")), o.src = t;
3568
3785
  });
3569
3786
  }
3570
- function Re(t, e, a) {
3787
+ function Be(t, e, a) {
3571
3788
  return new Promise((o) => {
3572
3789
  try {
3573
3790
  t.toBlob((i) => o(i), e, a);
@@ -3576,7 +3793,7 @@ function Re(t, e, a) {
3576
3793
  }
3577
3794
  });
3578
3795
  }
3579
- const Yi = [
3796
+ const jn = [
3580
3797
  "url",
3581
3798
  "title",
3582
3799
  "userAgent",
@@ -3587,23 +3804,23 @@ const Yi = [
3587
3804
  "viewport",
3588
3805
  "user"
3589
3806
  ];
3590
- function Xi(t) {
3807
+ function Pn(t) {
3591
3808
  return !t || typeof t != "object" ? !1 : !!(t.userId || t.email || t.displayName);
3592
3809
  }
3593
- function Ji(t = {}) {
3810
+ function Ln(t = {}) {
3594
3811
  const e = [];
3595
- for (const a of Yi) {
3812
+ for (const a of jn) {
3596
3813
  const o = t[a];
3597
- o == null || o === "" || a === "user" && !Xi(o) || e.push({
3814
+ o == null || o === "" || a === "user" && !Pn(o) || e.push({
3598
3815
  key: a,
3599
- label: p(`diag.${a}`),
3816
+ label: g(`diag.${a}`),
3600
3817
  value: o,
3601
3818
  redacted: !1
3602
3819
  });
3603
3820
  }
3604
3821
  return e;
3605
3822
  }
3606
- function Qi(t = []) {
3823
+ function xn(t = []) {
3607
3824
  return t.map((e, a) => {
3608
3825
  const o = {
3609
3826
  id: `log-${a}-${e.at || 0}`,
@@ -3612,25 +3829,25 @@ function Qi(t = []) {
3612
3829
  at: e.at || 0,
3613
3830
  redacted: !1
3614
3831
  };
3615
- return Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
3832
+ return Number.isFinite(e.t) && (o.t = e.t), e.truncated && (o.truncated = !0), Number.isFinite(e.count) && e.count > 1 && (o.count = e.count), Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
3616
3833
  });
3617
3834
  }
3618
- function ts(t = []) {
3835
+ function Un(t = []) {
3619
3836
  if (!t.length)
3620
3837
  return { checked: !0, indeterminate: !1 };
3621
3838
  const e = t.filter((a) => !a.redacted).length;
3622
3839
  return e === t.length ? { checked: !0, indeterminate: !1 } : e === 0 ? { checked: !1, indeterminate: !1 } : { checked: !1, indeterminate: !0 };
3623
3840
  }
3624
- function xt(t, e) {
3841
+ function Dt(t, e) {
3625
3842
  t.forEach((a) => {
3626
3843
  a.redacted = !!e;
3627
3844
  });
3628
3845
  }
3629
- function es(t = {}) {
3630
- const e = t.diagnostics || [], a = t.logs || [], o = e.some((s) => !s.redacted), i = a.length > 0 && a.some((s) => !s.redacted);
3631
- return o && i ? p("privacy.disclosure.both") : o ? p("privacy.disclosure.diagnostics") : i ? p("privacy.disclosure.logs") : "";
3846
+ function Tn(t = {}) {
3847
+ const e = t.diagnostics || [], a = t.logs || [], o = e.some((n) => !n.redacted), i = a.length > 0 && a.some((n) => !n.redacted);
3848
+ return o && i ? g("privacy.disclosure.both") : o ? g("privacy.disclosure.diagnostics") : i ? g("privacy.disclosure.logs") : "";
3632
3849
  }
3633
- function as(t) {
3850
+ function Fn(t) {
3634
3851
  if (t == null)
3635
3852
  return "";
3636
3853
  if (typeof t == "string" || typeof t == "number" || typeof t == "boolean")
@@ -3641,7 +3858,7 @@ function as(t) {
3641
3858
  return String(t);
3642
3859
  }
3643
3860
  }
3644
- function os(t = {}) {
3861
+ function Mn(t = {}) {
3645
3862
  const e = {};
3646
3863
  t.author != null && t.author !== "" && (e.author = t.author);
3647
3864
  for (const o of t.diagnostics || [])
@@ -3652,77 +3869,82 @@ function os(t = {}) {
3652
3869
  text: o.text,
3653
3870
  at: o.at
3654
3871
  };
3655
- return Array.isArray(o.segments) && o.segments.length && (i.segments = o.segments), i;
3872
+ return Number.isFinite(o.t) && (i.t = o.t), o.truncated && (i.truncated = !0), Number.isFinite(o.count) && o.count > 1 && (i.count = o.count), Array.isArray(o.segments) && o.segments.length && (i.segments = o.segments), i;
3656
3873
  });
3657
3874
  return e.console = a, e;
3658
3875
  }
3659
- const Y = [
3876
+ const Q = [
3660
3877
  { id: "bug", label: "Bug" },
3661
3878
  { id: "idea", label: "Idea" },
3662
3879
  { id: "other", label: "Other" }
3663
3880
  ];
3664
- function je(t) {
3881
+ function Ne(t) {
3665
3882
  return String(t || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
3666
3883
  }
3667
- function Ct(t) {
3884
+ function Rt(t) {
3668
3885
  const e = String(t || "").trim();
3669
3886
  return e ? e.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
3670
3887
  }
3671
- function is(t) {
3888
+ function Dn(t) {
3672
3889
  if (!Array.isArray(t) || !t.length)
3673
- return Y.map((o) => ({ ...o }));
3890
+ return Q.map((o) => ({ ...o }));
3674
3891
  const e = /* @__PURE__ */ new Set(), a = [];
3675
3892
  for (const o of t) {
3676
- let i = "", s = "", r = "", l = "";
3677
- if (typeof o == "string" || typeof o == "number" ? (i = je(o), s = Ct(i)) : o && typeof o == "object" && (i = je(o.id ?? o.value ?? o.kind), s = String(o.label || o.name || Ct(i)).trim() || Ct(i), r = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
3893
+ let i = "", n = "", s = "", l = "";
3894
+ if (typeof o == "string" || typeof o == "number" ? (i = Ne(o), n = Rt(i)) : o && typeof o == "object" && (i = Ne(o.id ?? o.value ?? o.kind), n = String(o.label || o.name || Rt(i)).trim() || Rt(i), s = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
3678
3895
  continue;
3679
3896
  e.add(i);
3680
- const u = { id: i, label: s };
3681
- r && (u.title = r), l && (u.description = l), a.push(u);
3897
+ const c = { id: i, label: n };
3898
+ s && (c.title = s), l && (c.description = l), a.push(c);
3682
3899
  }
3683
- return a.length ? a : Y.map((o) => ({ ...o }));
3900
+ return a.length ? a : Q.map((o) => ({ ...o }));
3684
3901
  }
3685
- function Dt(t) {
3902
+ function Nt(t) {
3686
3903
  var a;
3687
- return ((a = (Array.isArray(t) && t.length ? t : Y)[0]) == null ? void 0 : a.id) || "other";
3904
+ return ((a = (Array.isArray(t) && t.length ? t : Q)[0]) == null ? void 0 : a.id) || "other";
3688
3905
  }
3689
- const ss = ["maker", "all-business", "brighter-day", "quiet-night"], Je = "maker", ns = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), qt = 0.02, Pe = 0.05, rs = `
3906
+ const In = ["maker", "all-business", "brighter-day", "quiet-night"], ma = "maker", On = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), ee = 0.02, Ke = 0.05, $n = `
3690
3907
  <svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
3691
3908
  <path fill="currentColor" d="M5.2 2.8h9.1A2.7 2.7 0 0 1 17 5.5v8.2c0 .4-.3.7-.7.7h-.1a.7.7 0 0 1-.7-.7V5.5c0-.7-.6-1.3-1.3-1.3H5.2c-.7 0-1.3.6-1.3 1.3v12.2c0 .7.6 1.3 1.3 1.3h6.4a.7.7 0 0 1 0 1.4H5.2A2.7 2.7 0 0 1 2.5 17.7V5.5A2.7 2.7 0 0 1 5.2 2.8zm1.6 4.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h3.6a.7.7 0 0 0 0-1.4H6.8z"/>
3692
3909
  <path fill="currentColor" d="M14.7 13.05 20.2 7.55a1.55 1.55 0 0 1 2.2 2.2l-5.5 5.5-.45 1.9a.6.6 0 0 1-.72.45l-1.9-.45.87-1.9z"/>
3693
3910
  </svg>
3694
3911
  `;
3695
- function F(t) {
3912
+ function M(t) {
3696
3913
  return `<svg class="nf-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${t}</svg>`;
3697
3914
  }
3698
- const x = {
3699
- crop: F('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
3700
- resetCrop: F('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
3701
- arrow: F('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
3702
- rect: F('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
3703
- circle: F('<circle cx="12" cy="12" r="8"/>'),
3704
- discard: F('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
3705
- recapture: F('<path d="M4 8h3l2-2h6l2 2h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>'),
3706
- privacy: F('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
3707
- audio: F('<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0"/><path d="M12 18v3"/>'),
3708
- video: F('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
3915
+ const U = {
3916
+ crop: M('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
3917
+ resetCrop: M('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
3918
+ arrow: M('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
3919
+ rect: M('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
3920
+ circle: M('<circle cx="12" cy="12" r="8"/>'),
3921
+ discard: M('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
3922
+ recapture: M('<path d="M4 8h3l2-2h6l2 2h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>'),
3923
+ privacy: M('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
3924
+ audio: M('<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0"/><path d="M12 18v3"/>'),
3925
+ video: M('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
3709
3926
  stop: '<svg class="nf-icon" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><rect x="7" y="7" width="10" height="10" rx="1.5"/></svg>',
3710
- openArrow: F('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
3711
- close: F('<path d="M6 6l12 12M18 6 6 18"/>')
3712
- }, Qe = Oi();
3713
- Qe.hook();
3714
- const ta = 10, ls = 80, ea = "notefully.author", aa = "notefully.kind", oa = "notefully.launcherCorner", ia = "notefully.redactSections", nt = 48, us = 6, kt = ["tl", "tr", "bl", "br"];
3715
- let d = {
3927
+ openArrow: M('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
3928
+ close: M('<path d="M6 6l12 12M18 6 6 18"/>')
3929
+ }, ot = hn();
3930
+ ot.hook();
3931
+ const ha = 10, Vn = 80, fa = "notefully.author", ya = "notefully.kind", va = "notefully.launcherCorner", ka = "notefully.redactSections", dt = 48, Bn = 6, At = ["tl", "tr", "bl", "br"];
3932
+ let p = {
3716
3933
  endpoint: "",
3717
3934
  projectKey: "",
3718
3935
  version: "0.0.0",
3719
3936
  name: "",
3720
3937
  targets: null,
3721
3938
  hideLauncher: !1,
3722
- theme: Je,
3939
+ /** Initial dock corner when localStorage has none: tl | tr | bl | br */
3940
+ launcherCorner: null,
3941
+ theme: ma,
3723
3942
  video: !1,
3724
- consoleLogLimit: ta,
3725
- kinds: Y.map((t) => ({ ...t })),
3943
+ consoleLogLimit: ha,
3944
+ consoleMethods: ce(),
3945
+ scrubLog: Ft,
3946
+ logSources: null,
3947
+ kinds: Q.map((t) => ({ ...t })),
3726
3948
  kindsCustom: !1,
3727
3949
  capture: null,
3728
3950
  onBeforeCapture: null,
@@ -3731,26 +3953,26 @@ let d = {
3731
3953
  displayLink: !1,
3732
3954
  locale: null,
3733
3955
  translations: null
3734
- }, mt = !1, Nt = !1, H = {}, f = null, n = {}, C = ee(), q = "", lt = "", G = null, _ = Dt(Y), X = null, I = null, R = null, E = null, St = null, W = null, $ = null, et = !1, M = null, Wt = !1, pt = { w: 0, h: 0 }, Kt = !1, ht = !1, ft = !1, N = [], B = [], Z = !1;
3735
- function h(t) {
3736
- return f.querySelector(t);
3956
+ }, vt = !1, Wt = !1, _ = {}, b = null, r = {}, j = ue(), W = "", gt = "", G = null, q = Nt(Q), tt = null, V = null, x = null, L = null, zt = null, X = null, N = null, it = !1, D = null, ae = !1, ft = { w: 0, h: 0 }, Zt = !1, kt = !1, bt = !1, H = [], K = [], J = !1;
3957
+ function y(t) {
3958
+ return b.querySelector(t);
3737
3959
  }
3738
- function sa(t) {
3960
+ function ba(t) {
3739
3961
  const e = String(t || "").trim().toLowerCase().replace(/\s+/g, "-");
3740
- return ss.includes(e) ? e : Je;
3962
+ return In.includes(e) ? e : ma;
3741
3963
  }
3742
- function S(t, e = !1) {
3743
- n.status && (n.status.textContent = t || "", St && (clearTimeout(St), St = null), t && !e && (St = setTimeout(() => {
3744
- n.status.textContent = "";
3964
+ function z(t, e = !1) {
3965
+ r.status && (r.status.textContent = t || "", zt && (clearTimeout(zt), zt = null), t && !e && (zt = setTimeout(() => {
3966
+ r.status.textContent = "";
3745
3967
  }, 4e3)));
3746
3968
  }
3747
- function ae() {
3748
- return f && document.body.contains(f) || (f = document.createElement("div"), f.id = "notefully", f.innerHTML = `
3749
- <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${rs}</button>
3969
+ function de() {
3970
+ return b && document.body.contains(b) || (b = document.createElement("div"), b.id = "notefully", b.innerHTML = `
3971
+ <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${$n}</button>
3750
3972
  <div class="nf-dialog" hidden>
3751
3973
  <div class="nf-panel">
3752
3974
  <div class="nf-pill nf-close-pill">
3753
- <button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${x.close}</button>
3975
+ <button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${U.close}</button>
3754
3976
  </div>
3755
3977
  <div class="nf-panel-body">
3756
3978
  <div class="nf-heading">
@@ -3764,15 +3986,15 @@ function ae() {
3764
3986
  <div class="nf-canvas"></div>
3765
3987
  <div class="nf-palette">
3766
3988
  <div class="nf-palette-tools">
3767
- <button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${x.crop}</button>
3768
- <button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${x.resetCrop}</button>
3769
- <button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${x.arrow}</button>
3770
- <button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${x.rect}</button>
3771
- <button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${x.circle}</button>
3989
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${U.crop}</button>
3990
+ <button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${U.resetCrop}</button>
3991
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${U.arrow}</button>
3992
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${U.rect}</button>
3993
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${U.circle}</button>
3772
3994
  </div>
3773
3995
  <div class="nf-palette-shot">
3774
- <button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${x.recapture}</button>
3775
- <button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${x.discard}</button>
3996
+ <button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${U.recapture}</button>
3997
+ <button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${U.discard}</button>
3776
3998
  </div>
3777
3999
  </div>
3778
4000
  </div>
@@ -3785,7 +4007,7 @@ function ae() {
3785
4007
  <div class="nf-privacy-summary">
3786
4008
  <span class="nf-privacy-text"></span>
3787
4009
  <div class="nf-pill nf-privacy-toggle-pill">
3788
- <button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${x.privacy}</button>
4010
+ <button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${U.privacy}</button>
3789
4011
  </div>
3790
4012
  </div>
3791
4013
  </div>
@@ -3796,10 +4018,10 @@ function ae() {
3796
4018
  </div>
3797
4019
  </div>
3798
4020
  <div class="nf-actions">
3799
- <button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${x.resetCrop}</button>
4021
+ <button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${U.resetCrop}</button>
3800
4022
  <div class="nf-actions-media">
3801
- <button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${x.audio}</button>
3802
- <button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${x.video}</button>
4023
+ <button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${U.audio}</button>
4024
+ <button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${U.video}</button>
3803
4025
  </div>
3804
4026
  <div class="nf-pill nf-submit-pill">
3805
4027
  <button class="nf-submit" type="button" data-i18n-text="form.submit"></button>
@@ -3811,188 +4033,192 @@ function ae() {
3811
4033
  <p class="nf-success-msg" hidden aria-live="polite" data-i18n-text="form.success"></p>
3812
4034
  <a class="nf-success-link" hidden target="_blank" rel="noopener noreferrer" data-i18n-aria="form.viewReport">
3813
4035
  <span class="nf-success-link-label" data-i18n-text="form.viewReport"></span>
3814
- ${x.openArrow}
4036
+ ${U.openArrow}
3815
4037
  </a>
3816
4038
  </div>
3817
4039
  </div>
3818
- <button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${x.stop}</button>
3819
- `, document.body.appendChild(f), n = {
3820
- launcher: h(".nf-launcher"),
3821
- dialog: h(".nf-dialog"),
3822
- panel: h(".nf-panel"),
3823
- close: h(".nf-close"),
3824
- panelBody: h(".nf-panel-body"),
3825
- heading: h(".nf-heading"),
3826
- title: h(".nf-title"),
3827
- intro: h(".nf-intro"),
3828
- successMsg: h(".nf-success-msg"),
3829
- successLink: h(".nf-success-link"),
3830
- stage: h(".nf-stage"),
3831
- shotBlock: h(".nf-shot-block"),
3832
- palette: h(".nf-palette"),
3833
- paletteTools: h(".nf-palette-tools"),
3834
- paletteShot: h(".nf-palette-shot"),
3835
- canvas: h(".nf-canvas"),
3836
- text: h(".nf-text"),
3837
- author: h(".nf-author"),
3838
- privacyStack: h(".nf-privacy-stack"),
3839
- kindRow: h(".nf-kind-row"),
3840
- kind: h(".nf-kind"),
3841
- privacy: h(".nf-privacy"),
3842
- privacySummary: h(".nf-privacy-summary"),
3843
- privacyText: h(".nf-privacy-text"),
3844
- privacyChange: h(".nf-privacy-change"),
3845
- privacyPanel: h(".nf-privacy-panel"),
3846
- privacyScroll: h(".nf-privacy-scroll"),
3847
- actions: h(".nf-actions"),
3848
- actionsMedia: h(".nf-actions-media"),
3849
- restore: h(".nf-restore"),
3850
- status: h(".nf-status"),
3851
- audio: h(".nf-audio"),
3852
- video: h(".nf-video"),
3853
- discard: h(".nf-discard-shot"),
3854
- recapture: h(".nf-recapture"),
3855
- stop: h(".nf-stop-video"),
3856
- resetCrop: h(".nf-reset-crop"),
3857
- submit: h(".nf-submit"),
4040
+ <button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${U.stop}</button>
4041
+ `, document.body.appendChild(b), r = {
4042
+ launcher: y(".nf-launcher"),
4043
+ dialog: y(".nf-dialog"),
4044
+ panel: y(".nf-panel"),
4045
+ close: y(".nf-close"),
4046
+ panelBody: y(".nf-panel-body"),
4047
+ heading: y(".nf-heading"),
4048
+ title: y(".nf-title"),
4049
+ intro: y(".nf-intro"),
4050
+ successMsg: y(".nf-success-msg"),
4051
+ successLink: y(".nf-success-link"),
4052
+ stage: y(".nf-stage"),
4053
+ shotBlock: y(".nf-shot-block"),
4054
+ palette: y(".nf-palette"),
4055
+ paletteTools: y(".nf-palette-tools"),
4056
+ paletteShot: y(".nf-palette-shot"),
4057
+ canvas: y(".nf-canvas"),
4058
+ text: y(".nf-text"),
4059
+ author: y(".nf-author"),
4060
+ privacyStack: y(".nf-privacy-stack"),
4061
+ kindRow: y(".nf-kind-row"),
4062
+ kind: y(".nf-kind"),
4063
+ privacy: y(".nf-privacy"),
4064
+ privacySummary: y(".nf-privacy-summary"),
4065
+ privacyText: y(".nf-privacy-text"),
4066
+ privacyChange: y(".nf-privacy-change"),
4067
+ privacyPanel: y(".nf-privacy-panel"),
4068
+ privacyScroll: y(".nf-privacy-scroll"),
4069
+ actions: y(".nf-actions"),
4070
+ actionsMedia: y(".nf-actions-media"),
4071
+ restore: y(".nf-restore"),
4072
+ status: y(".nf-status"),
4073
+ audio: y(".nf-audio"),
4074
+ video: y(".nf-video"),
4075
+ discard: y(".nf-discard-shot"),
4076
+ recapture: y(".nf-recapture"),
4077
+ stop: y(".nf-stop-video"),
4078
+ resetCrop: y(".nf-reset-crop"),
4079
+ submit: y(".nf-submit"),
3858
4080
  shot: null
3859
- }, vs(), ut()), f;
3860
- }
3861
- function ut() {
3862
- var t, e;
3863
- f && (na(), f.dataset.theme = sa(d.theme), f.lang = Et(), f.dir = Da(Et()), d.hideLauncher ? f.setAttribute("data-nf-hidden-launcher", "") : f.removeAttribute("data-nf-hidden-launcher"), n.video && (n.video.hidden = !d.video), cs(), N.length && N.forEach((a) => {
3864
- a.label = p(`diag.${a.key}`);
3865
- }), ca(), Z ? ce() : ue(), oe(
3866
- ((t = n.launcher) == null ? void 0 : t.dataset.corner) || la() || "bl"
3867
- ), (e = n.dialog) != null && e.hidden && Lt());
3868
- }
3869
- function na() {
3870
- const t = Ta({
3871
- locale: d.locale == null ? void 0 : d.locale
4081
+ }, Xn(), mt()), b;
4082
+ }
4083
+ function mt() {
4084
+ var t;
4085
+ b && (wa(), b.dataset.theme = ba(p.theme), b.lang = Lt(), b.dir = Xa(Lt()), p.hideLauncher ? b.setAttribute("data-nf-hidden-launcher", "") : b.removeAttribute("data-nf-hidden-launcher"), r.video && (r.video.hidden = !p.video), Nn(), H.length && H.forEach((e) => {
4086
+ e.label = g(`diag.${e.key}`);
4087
+ }), Ea(), J ? be() : ke(), ge(Aa()), (t = r.dialog) != null && t.hidden && It());
4088
+ }
4089
+ function wa() {
4090
+ const t = Wa({
4091
+ locale: p.locale == null ? void 0 : p.locale
3872
4092
  });
3873
- Ma(d.translations), Fa(t);
3874
- }
3875
- function cs() {
3876
- if (f) {
3877
- if (f.querySelectorAll("[data-i18n-title]").forEach((t) => {
3878
- t.title = p(t.getAttribute("data-i18n-title"));
3879
- }), f.querySelectorAll("[data-i18n-aria]").forEach((t) => {
3880
- t.setAttribute("aria-label", p(t.getAttribute("data-i18n-aria")));
3881
- }), f.querySelectorAll("[data-i18n-placeholder]").forEach((t) => {
3882
- t.setAttribute("placeholder", p(t.getAttribute("data-i18n-placeholder")));
3883
- }), f.querySelectorAll("[data-i18n-text]").forEach((t) => {
3884
- t.textContent = p(t.getAttribute("data-i18n-text"));
3885
- }), n.audio) {
3886
- const t = n.audio.dataset.active === "true";
3887
- vt(t);
4093
+ Ya(p.translations), Za(t);
4094
+ }
4095
+ function Nn() {
4096
+ if (b) {
4097
+ if (b.querySelectorAll("[data-i18n-title]").forEach((t) => {
4098
+ t.title = g(t.getAttribute("data-i18n-title"));
4099
+ }), b.querySelectorAll("[data-i18n-aria]").forEach((t) => {
4100
+ t.setAttribute("aria-label", g(t.getAttribute("data-i18n-aria")));
4101
+ }), b.querySelectorAll("[data-i18n-placeholder]").forEach((t) => {
4102
+ t.setAttribute("placeholder", g(t.getAttribute("data-i18n-placeholder")));
4103
+ }), b.querySelectorAll("[data-i18n-text]").forEach((t) => {
4104
+ t.textContent = g(t.getAttribute("data-i18n-text"));
4105
+ }), r.audio) {
4106
+ const t = r.audio.dataset.active === "true";
4107
+ St(t);
3888
4108
  }
3889
- se();
4109
+ he();
3890
4110
  }
3891
4111
  }
3892
- function ra(t) {
3893
- if (d.kindsCustom)
4112
+ function Sa(t) {
4113
+ if (p.kindsCustom)
3894
4114
  return t.label;
3895
- const e = `kind.${t.id}`, a = p(e);
4115
+ const e = `kind.${t.id}`, a = g(e);
3896
4116
  return a === e ? t.label : a;
3897
4117
  }
3898
- function Lt() {
3899
- n.launcher && (n.launcher.hidden = !!d.hideLauncher);
4118
+ function It() {
4119
+ r.launcher && (r.launcher.hidden = !!p.hideLauncher);
4120
+ }
4121
+ function pe(t) {
4122
+ const e = String(t || "").trim().toLowerCase();
4123
+ return At.includes(e) ? e : "";
3900
4124
  }
3901
- function la() {
4125
+ function Kn() {
3902
4126
  try {
3903
- const t = String(localStorage.getItem(oa) || "").trim().toLowerCase();
3904
- return kt.includes(t) ? t : "";
4127
+ return pe(localStorage.getItem(va));
3905
4128
  } catch {
3906
4129
  return "";
3907
4130
  }
3908
4131
  }
3909
- function ds(t) {
3910
- if (kt.includes(t))
4132
+ function Hn(t) {
4133
+ if (At.includes(t))
3911
4134
  try {
3912
- localStorage.setItem(oa, t);
4135
+ localStorage.setItem(va, t);
3913
4136
  } catch {
3914
4137
  }
3915
4138
  }
3916
- function oe(t) {
3917
- !n.launcher || !kt.includes(t) || (n.launcher.dataset.corner = t, ds(t));
4139
+ function Aa() {
4140
+ return Kn() || pe(p.launcherCorner) || "bl";
3918
4141
  }
3919
- function ps() {
3920
- if (!n.launcher)
4142
+ function ge(t, e = !1) {
4143
+ !r.launcher || !At.includes(t) || (r.launcher.dataset.corner = t, e && Hn(t));
4144
+ }
4145
+ function _n() {
4146
+ if (!r.launcher)
3921
4147
  return 16;
3922
- const t = getComputedStyle(n.launcher).getPropertyValue("--nf-launcher-inset").trim() || getComputedStyle(f).getPropertyValue("--nf-launcher-inset").trim() || "16px", e = Number.parseFloat(t);
4148
+ const t = getComputedStyle(r.launcher).getPropertyValue("--nf-launcher-inset").trim() || getComputedStyle(b).getPropertyValue("--nf-launcher-inset").trim() || "16px", e = Number.parseFloat(t);
3923
4149
  return Number.isFinite(e) ? e : 16;
3924
4150
  }
3925
- function gs(t) {
3926
- const e = ps(), a = window.innerWidth, o = window.innerHeight;
4151
+ function Gn(t) {
4152
+ const e = _n(), a = window.innerWidth, o = window.innerHeight;
3927
4153
  switch (t) {
3928
4154
  case "tl":
3929
4155
  return { x: e, y: e };
3930
4156
  case "tr":
3931
- return { x: a - e - nt, y: e };
4157
+ return { x: a - e - dt, y: e };
3932
4158
  case "br":
3933
- return { x: a - e - nt, y: o - e - nt };
4159
+ return { x: a - e - dt, y: o - e - dt };
3934
4160
  case "bl":
3935
4161
  default:
3936
- return { x: e, y: o - e - nt };
4162
+ return { x: e, y: o - e - dt };
3937
4163
  }
3938
4164
  }
3939
- function ms(t, e) {
4165
+ function qn(t, e) {
3940
4166
  var i;
3941
- let a = ((i = n.launcher) == null ? void 0 : i.dataset.corner) || "bl", o = -1 / 0;
3942
- for (const s of kt) {
3943
- const r = gs(s), l = Math.hypot(t.x - r.x, t.y - r.y), u = Math.hypot(e.x - r.x, e.y - r.y), c = l - u;
3944
- c > o && (o = c, a = s);
4167
+ let a = ((i = r.launcher) == null ? void 0 : i.dataset.corner) || "bl", o = -1 / 0;
4168
+ for (const n of At) {
4169
+ const s = Gn(n), l = Math.hypot(t.x - s.x, t.y - s.y), c = Math.hypot(e.x - s.x, e.y - s.y), d = l - c;
4170
+ d > o && (o = d, a = n);
3945
4171
  }
3946
4172
  return a;
3947
4173
  }
3948
- function ua() {
3949
- n.launcher && (n.launcher.style.left = "", n.launcher.style.top = "", n.launcher.style.right = "", n.launcher.style.bottom = "", n.launcher.style.transform = "", n.launcher.style.transition = "");
4174
+ function Ca() {
4175
+ r.launcher && (r.launcher.style.left = "", r.launcher.style.top = "", r.launcher.style.right = "", r.launcher.style.bottom = "", r.launcher.style.transform = "", r.launcher.style.transition = "");
3950
4176
  }
3951
- function hs(t, e) {
3952
- if (!n.launcher)
4177
+ function Wn(t, e) {
4178
+ if (!r.launcher)
3953
4179
  return;
3954
- const a = Math.max(0, window.innerWidth - nt), o = Math.max(0, window.innerHeight - nt), i = Math.min(a, Math.max(0, t)), s = Math.min(o, Math.max(0, e));
3955
- n.launcher.style.right = "auto", n.launcher.style.bottom = "auto", n.launcher.style.left = `${i}px`, n.launcher.style.top = `${s}px`;
4180
+ const a = Math.max(0, window.innerWidth - dt), o = Math.max(0, window.innerHeight - dt), i = Math.min(a, Math.max(0, t)), n = Math.min(o, Math.max(0, e));
4181
+ r.launcher.style.right = "auto", r.launcher.style.bottom = "auto", r.launcher.style.left = `${i}px`, r.launcher.style.top = `${n}px`;
3956
4182
  }
3957
- function fs(t) {
3958
- const e = n.launcher;
3959
- if (!e || !kt.includes(t))
4183
+ function Zn(t) {
4184
+ const e = r.launcher;
4185
+ if (!e || !At.includes(t))
3960
4186
  return;
3961
4187
  const a = e.getBoundingClientRect();
3962
- ua(), oe(t);
3963
- const o = e.getBoundingClientRect(), i = a.left - o.left, s = a.top - o.top;
3964
- Math.abs(i) < 0.5 && Math.abs(s) < 0.5 || (e.style.transition = "none", e.style.transform = `translate(${i}px, ${s}px)`, e.getBoundingClientRect(), requestAnimationFrame(() => {
4188
+ Ca(), ge(t, !0);
4189
+ const o = e.getBoundingClientRect(), i = a.left - o.left, n = a.top - o.top;
4190
+ Math.abs(i) < 0.5 && Math.abs(n) < 0.5 || (e.style.transition = "none", e.style.transform = `translate(${i}px, ${n}px)`, e.getBoundingClientRect(), requestAnimationFrame(() => {
3965
4191
  e.style.transition = "transform 0.42s cubic-bezier(0.22, 1, 0.36, 1)", e.style.transform = "";
3966
- const r = (l) => {
3967
- l && l.propertyName && l.propertyName !== "transform" || (e.removeEventListener("transitionend", r), e.style.transition = "", e.style.transform = "");
4192
+ const s = (l) => {
4193
+ l && l.propertyName && l.propertyName !== "transform" || (e.removeEventListener("transitionend", s), e.style.transition = "", e.style.transform = "");
3968
4194
  };
3969
- e.addEventListener("transitionend", r), window.setTimeout(r, 500);
4195
+ e.addEventListener("transitionend", s), window.setTimeout(s, 500);
3970
4196
  }));
3971
4197
  }
3972
- function xe(t) {
3973
- if (!M || !n.launcher)
4198
+ function He(t) {
4199
+ if (!D || !r.launcher)
3974
4200
  return;
3975
- const e = M;
3976
- M = null, n.launcher.dataset.dragging = "false";
4201
+ const e = D;
4202
+ D = null, r.launcher.dataset.dragging = "false";
3977
4203
  try {
3978
- n.launcher.releasePointerCapture(e.pointerId);
4204
+ r.launcher.releasePointerCapture(e.pointerId);
3979
4205
  } catch {
3980
4206
  }
3981
4207
  if (!e.moved) {
3982
- ua();
4208
+ Ca();
3983
4209
  return;
3984
4210
  }
3985
- Wt = !0;
3986
- const a = n.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, s = ms(i, o);
3987
- fs(s);
4211
+ ae = !0;
4212
+ const a = r.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, n = qn(i, o);
4213
+ Zn(n);
3988
4214
  }
3989
- function ys() {
3990
- const t = n.launcher;
4215
+ function Yn() {
4216
+ const t = r.launcher;
3991
4217
  !t || t.dataset.nfDragBound === "true" || (t.dataset.nfDragBound = "true", t.addEventListener("pointerdown", (e) => {
3992
- if (e.button != null && e.button !== 0 || d.hideLauncher || t.hidden)
4218
+ if (e.button != null && e.button !== 0 || p.hideLauncher || t.hidden)
3993
4219
  return;
3994
4220
  const a = t.getBoundingClientRect();
3995
- M = {
4221
+ D = {
3996
4222
  pointerId: e.pointerId,
3997
4223
  startX: e.clientX,
3998
4224
  startY: e.clientY,
@@ -4001,209 +4227,209 @@ function ys() {
4001
4227
  moved: !1
4002
4228
  }, t.setPointerCapture(e.pointerId);
4003
4229
  }), t.addEventListener("pointermove", (e) => {
4004
- if (!M || e.pointerId !== M.pointerId)
4230
+ if (!D || e.pointerId !== D.pointerId)
4005
4231
  return;
4006
- const a = e.clientX - M.startX, o = e.clientY - M.startY;
4007
- if (!M.moved) {
4008
- if (Math.hypot(a, o) < us)
4232
+ const a = e.clientX - D.startX, o = e.clientY - D.startY;
4233
+ if (!D.moved) {
4234
+ if (Math.hypot(a, o) < Bn)
4009
4235
  return;
4010
- M.moved = !0, t.dataset.dragging = "true";
4236
+ D.moved = !0, t.dataset.dragging = "true";
4011
4237
  }
4012
- hs(M.originX + a, M.originY + o);
4013
- }), t.addEventListener("pointerup", xe), t.addEventListener("pointercancel", xe));
4238
+ Wn(D.originX + a, D.originY + o);
4239
+ }), t.addEventListener("pointerup", He), t.addEventListener("pointercancel", He));
4014
4240
  }
4015
- function vs() {
4241
+ function Xn() {
4016
4242
  var e;
4017
- n.launcher.addEventListener("click", (a) => {
4018
- if (Wt) {
4019
- a.preventDefault(), a.stopPropagation(), Wt = !1;
4243
+ r.launcher.addEventListener("click", (a) => {
4244
+ if (ae) {
4245
+ a.preventDefault(), a.stopPropagation(), ae = !1;
4020
4246
  return;
4021
4247
  }
4022
- Ea();
4023
- }), ys(), oe(la() || "bl"), h(".nf-dialog").addEventListener("click", (a) => {
4024
- ht && !ft || a.target === n.dialog && at();
4025
- }), (e = n.close) == null || e.addEventListener("click", () => {
4026
- ht && !ft || at();
4027
- }), document.addEventListener("keydown", Sa), f.querySelectorAll(".nf-tool").forEach((a) => {
4028
- a.addEventListener("click", () => yt(a.dataset.tool));
4029
- }), n.resetCrop.addEventListener("click", xs), n.canvas.addEventListener("pointerdown", zs), n.canvas.addEventListener("dragstart", (a) => a.preventDefault());
4030
- const t = h(".nf-kind");
4248
+ Ba();
4249
+ }), Yn(), ge(Aa()), y(".nf-dialog").addEventListener("click", (a) => {
4250
+ kt && !bt || a.target === r.dialog && nt();
4251
+ }), (e = r.close) == null || e.addEventListener("click", () => {
4252
+ kt && !bt || nt();
4253
+ }), document.addEventListener("keydown", Ia), b.querySelectorAll(".nf-tool").forEach((a) => {
4254
+ a.addEventListener("click", () => wt(a.dataset.tool));
4255
+ }), r.resetCrop.addEventListener("click", cr), r.canvas.addEventListener("pointerdown", ir), r.canvas.addEventListener("dragstart", (a) => a.preventDefault());
4256
+ const t = y(".nf-kind");
4031
4257
  t && t.addEventListener("click", (a) => {
4032
4258
  const o = a.target.closest("[data-kind]");
4033
- o && ie(o.dataset.kind);
4034
- }), n.discard.addEventListener("click", Ls), n.recapture.addEventListener("click", () => {
4035
- Ts().catch((a) => S(a.message || p("status.recaptureFailed")));
4036
- }), n.restore.addEventListener("click", Us), n.audio.addEventListener("click", Fs), n.video.addEventListener("click", () => {
4037
- Ms().catch((a) => S((a == null ? void 0 : a.message) || p("status.screenUnsupported")));
4038
- }), n.stop.addEventListener("click", () => $ == null ? void 0 : $.stop()), n.privacyChange.addEventListener("click", () => le(!Z)), n.privacyScroll.addEventListener("change", Js), h(".nf-submit").addEventListener("click", () => {
4039
- ja().catch((a) => S(a.message || p("status.submitFailed")));
4040
- }), ca(), yt(null);
4041
- }
4042
- function D(t) {
4259
+ o && me(o.dataset.kind);
4260
+ }), r.discard.addEventListener("click", ur), r.recapture.addEventListener("click", () => {
4261
+ pr().catch((a) => z(a.message || g("status.recaptureFailed")));
4262
+ }), r.restore.addEventListener("click", dr), r.audio.addEventListener("click", gr), r.video.addEventListener("click", () => {
4263
+ mr().catch((a) => z((a == null ? void 0 : a.message) || g("status.screenUnsupported")));
4264
+ }), r.stop.addEventListener("click", () => N == null ? void 0 : N.stop()), r.privacyChange.addEventListener("click", () => ve(!J)), r.privacyScroll.addEventListener("change", Mr), y(".nf-submit").addEventListener("click", () => {
4265
+ Ka().catch((a) => z(a.message || g("status.submitFailed")));
4266
+ }), Ea(), wt(null);
4267
+ }
4268
+ function I(t) {
4043
4269
  return String(t || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
4044
4270
  }
4045
- function ca() {
4046
- const t = f == null ? void 0 : f.querySelector(".nf-kind");
4271
+ function Ea() {
4272
+ const t = b == null ? void 0 : b.querySelector(".nf-kind");
4047
4273
  if (!t)
4048
4274
  return;
4049
- const e = Array.isArray(d.kinds) && d.kinds.length ? d.kinds : Y;
4050
- t.innerHTML = e.map((i) => `<button type="button" data-kind="${D(i.id)}">${D(ra(i))}</button>`).join("");
4051
- const o = e.map((i) => i.id).includes(_) ? _ : Dt(e);
4052
- ie(o);
4053
- }
4054
- function ie(t) {
4055
- _ = (d.kinds || Y).map((a) => a.id).includes(t) ? t : Dt(d.kinds), f == null || f.querySelectorAll("[data-kind]").forEach((a) => {
4056
- a.dataset.active = String(a.dataset.kind === _);
4057
- }), Ss(_), se();
4058
- }
4059
- function ks() {
4060
- return (Array.isArray(d.kinds) && d.kinds.length ? d.kinds : Y).find((e) => e.id === _) || null;
4061
- }
4062
- function bs() {
4063
- const t = ks(), e = (t == null ? void 0 : t.id) || _ || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || p(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || p(a ? `form.intro.${e}` : "form.intro.other"), s = a ? p(`form.placeholder.${e}`) : p("form.placeholder.custom", {
4064
- kind: t ? ra(t) : Ct(e)
4275
+ const e = Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q;
4276
+ t.innerHTML = e.map((i) => `<button type="button" data-kind="${I(i.id)}">${I(Sa(i))}</button>`).join("");
4277
+ const o = e.map((i) => i.id).includes(q) ? q : Nt(e);
4278
+ me(o);
4279
+ }
4280
+ function me(t) {
4281
+ q = (p.kinds || Q).map((a) => a.id).includes(t) ? t : Nt(p.kinds), b == null || b.querySelectorAll("[data-kind]").forEach((a) => {
4282
+ a.dataset.active = String(a.dataset.kind === q);
4283
+ }), er(q), he();
4284
+ }
4285
+ function Jn() {
4286
+ return (Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q).find((e) => e.id === q) || null;
4287
+ }
4288
+ function Qn() {
4289
+ const t = Jn(), e = (t == null ? void 0 : t.id) || q || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || g(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || g(a ? `form.intro.${e}` : "form.intro.other"), n = a ? g(`form.placeholder.${e}`) : g("form.placeholder.custom", {
4290
+ kind: t ? Sa(t) : Rt(e)
4065
4291
  });
4066
- return { title: o, intro: i, placeholder: s };
4292
+ return { title: o, intro: i, placeholder: n };
4067
4293
  }
4068
- function se() {
4069
- if (!n.title && !n.intro && !n.text)
4294
+ function he() {
4295
+ if (!r.title && !r.intro && !r.text)
4070
4296
  return;
4071
- const t = bs(), e = V() ? ` ${p("form.screenshotNote")}` : "";
4072
- n.title && (n.title.textContent = t.title), n.intro && (n.intro.textContent = `${t.intro}${e}`), n.text && n.text.setAttribute("placeholder", t.placeholder);
4297
+ const t = Qn(), e = B() ? ` ${g("form.screenshotNote")}` : "";
4298
+ r.title && (r.title.textContent = t.title), r.intro && (r.intro.textContent = `${t.intro}${e}`), r.text && r.text.setAttribute("placeholder", t.placeholder);
4073
4299
  }
4074
- function ws() {
4300
+ function tr() {
4075
4301
  try {
4076
- return String(localStorage.getItem(aa) || "").trim().toLowerCase();
4302
+ return String(localStorage.getItem(ya) || "").trim().toLowerCase();
4077
4303
  } catch {
4078
4304
  return "";
4079
4305
  }
4080
4306
  }
4081
- function Ss(t) {
4307
+ function er(t) {
4082
4308
  const e = String(t || "").trim().toLowerCase();
4083
4309
  if (e)
4084
4310
  try {
4085
- localStorage.setItem(aa, e);
4311
+ localStorage.setItem(ya, e);
4086
4312
  } catch {
4087
4313
  }
4088
4314
  }
4089
- function Cs() {
4090
- const t = (d.kinds || Y).map((a) => a.id), e = ws();
4091
- return e && t.includes(e) ? e : Dt(d.kinds);
4315
+ function ar() {
4316
+ const t = (p.kinds || Q).map((a) => a.id), e = tr();
4317
+ return e && t.includes(e) ? e : Nt(p.kinds);
4092
4318
  }
4093
- function yt(t) {
4094
- X = ns.has(t) ? t : null, I = null, f.querySelectorAll(".nf-tool").forEach((e) => {
4095
- e.dataset.active = String(e.dataset.tool === X);
4096
- }), n.canvas && (n.canvas.dataset.draw = X ? "true" : "false"), V() && O();
4319
+ function wt(t) {
4320
+ tt = On.has(t) ? t : null, V = null, b.querySelectorAll(".nf-tool").forEach((e) => {
4321
+ e.dataset.active = String(e.dataset.tool === tt);
4322
+ }), r.canvas && (r.canvas.dataset.draw = tt ? "true" : "false"), B() && O();
4097
4323
  }
4098
- function Le(t) {
4324
+ function _e(t) {
4099
4325
  return Math.min(1, Math.max(0, t));
4100
4326
  }
4101
- function bt() {
4102
- return n.shot || n.canvas;
4327
+ function Ct() {
4328
+ return r.shot || r.canvas;
4103
4329
  }
4104
- function Ut(t) {
4105
- const e = bt().getBoundingClientRect();
4330
+ function Ot(t) {
4331
+ const e = Ct().getBoundingClientRect();
4106
4332
  return {
4107
- x: Le((t.clientX - e.left) / Math.max(e.width, 1)),
4108
- y: Le((t.clientY - e.top) / Math.max(e.height, 1))
4333
+ x: _e((t.clientX - e.left) / Math.max(e.width, 1)),
4334
+ y: _e((t.clientY - e.top) / Math.max(e.height, 1))
4109
4335
  };
4110
4336
  }
4111
- function As(t) {
4112
- const e = bt().getBoundingClientRect();
4337
+ function or(t) {
4338
+ const e = Ct().getBoundingClientRect();
4113
4339
  return t.clientX >= e.left && t.clientX <= e.right && t.clientY >= e.top && t.clientY <= e.bottom;
4114
4340
  }
4115
- function da(t) {
4116
- const e = Ut(t), a = C.crop();
4341
+ function za(t) {
4342
+ const e = Ot(t), a = j.crop();
4117
4343
  return {
4118
4344
  x: a.x + e.x * a.w,
4119
4345
  y: a.y + e.y * a.h
4120
4346
  };
4121
4347
  }
4122
- function Ot(t, e) {
4348
+ function Kt(t, e) {
4123
4349
  const a = Math.min(t.x, e.x), o = Math.min(t.y, e.y);
4124
4350
  return {
4125
4351
  x: a,
4126
4352
  y: o,
4127
- w: Math.max(qt, Math.abs(e.x - t.x)),
4128
- h: Math.max(qt, Math.abs(e.y - t.y))
4353
+ w: Math.max(ee, Math.abs(e.x - t.x)),
4354
+ h: Math.max(ee, Math.abs(e.y - t.y))
4129
4355
  };
4130
4356
  }
4131
- function ne(t) {
4132
- f && (t ? f.dataset.grabbing = "true" : delete f.dataset.grabbing);
4357
+ function fe(t) {
4358
+ b && (t ? b.dataset.grabbing = "true" : delete b.dataset.grabbing);
4133
4359
  }
4134
- function Ht(t) {
4360
+ function Yt(t) {
4135
4361
  try {
4136
- n.canvas.setPointerCapture(t.pointerId);
4362
+ r.canvas.setPointerCapture(t.pointerId);
4137
4363
  } catch {
4138
4364
  }
4139
4365
  }
4140
- function Zt() {
4141
- window.addEventListener("pointermove", ga), window.addEventListener("pointerup", Tt), window.addEventListener("pointercancel", Tt);
4366
+ function oe() {
4367
+ window.addEventListener("pointermove", ja), window.addEventListener("pointerup", $t), window.addEventListener("pointercancel", $t);
4142
4368
  }
4143
- function pa() {
4144
- window.removeEventListener("pointermove", ga), window.removeEventListener("pointerup", Tt), window.removeEventListener("pointercancel", Tt);
4369
+ function Ra() {
4370
+ window.removeEventListener("pointermove", ja), window.removeEventListener("pointerup", $t), window.removeEventListener("pointercancel", $t);
4145
4371
  }
4146
- function zs(t) {
4147
- if (t.button !== 0 || !V())
4372
+ function ir(t) {
4373
+ if (t.button !== 0 || !B())
4148
4374
  return;
4149
- if (!t.target.closest(".nf-sticker") && !As(t)) {
4150
- I = null, O();
4375
+ if (!t.target.closest(".nf-sticker") && !or(t)) {
4376
+ V = null, O();
4151
4377
  return;
4152
4378
  }
4153
4379
  const e = t.target.closest(".nf-handle"), a = t.target.closest(".nf-sticker");
4154
4380
  if (a && a.dataset.preview !== "true") {
4155
- t.preventDefault(), t.stopPropagation(), I = a.dataset.id, Ht(t), Es({
4381
+ t.preventDefault(), t.stopPropagation(), V = a.dataset.id, Yt(t), nr({
4156
4382
  kind: "sticker",
4157
- id: I,
4383
+ id: V,
4158
4384
  dir: (e == null ? void 0 : e.dataset.dir) || "move"
4159
4385
  }, t), O();
4160
4386
  return;
4161
4387
  }
4162
- if (I = null, X === "crop") {
4163
- t.preventDefault(), Ht(t), R = { kind: "crop", start: Ut(t), current: Ut(t) }, Zt(), O();
4388
+ if (V = null, tt === "crop") {
4389
+ t.preventDefault(), Yt(t), x = { kind: "crop", start: Ot(t), current: Ot(t) }, oe(), O();
4164
4390
  return;
4165
4391
  }
4166
- if (X === "arrow" || X === "rect" || X === "circle") {
4167
- t.preventDefault(), Ht(t);
4168
- const o = da(t);
4169
- R = { kind: "sticker", type: X, start: o, current: o }, Zt(), O();
4392
+ if (tt === "arrow" || tt === "rect" || tt === "circle") {
4393
+ t.preventDefault(), Yt(t);
4394
+ const o = za(t);
4395
+ x = { kind: "sticker", type: tt, start: o, current: o }, oe(), O();
4170
4396
  return;
4171
4397
  }
4172
4398
  O();
4173
4399
  }
4174
- function Es(t, e) {
4400
+ function nr(t, e) {
4175
4401
  e.preventDefault(), e.stopPropagation();
4176
- const a = bt().getBoundingClientRect(), o = C.list().find((i) => i.id === t.id);
4177
- E = {
4402
+ const a = Ct().getBoundingClientRect(), o = j.list().find((i) => i.id === t.id);
4403
+ L = {
4178
4404
  ...t,
4179
4405
  startX: e.clientX,
4180
4406
  startY: e.clientY,
4181
- crop: C.crop(),
4407
+ crop: j.crop(),
4182
4408
  sticker: o ? { ...o } : null,
4183
4409
  rect: a
4184
- }, ne(t.dir === "move" || t.dir === "start" || t.dir === "end"), Zt();
4410
+ }, fe(t.dir === "move" || t.dir === "start" || t.dir === "end"), oe();
4185
4411
  }
4186
- function ga(t) {
4187
- if (R) {
4188
- R.current = R.kind === "crop" ? Ut(t) : da(t), O();
4412
+ function ja(t) {
4413
+ if (x) {
4414
+ x.current = x.kind === "crop" ? Ot(t) : za(t), O();
4189
4415
  return;
4190
4416
  }
4191
- if (!E)
4417
+ if (!L)
4192
4418
  return;
4193
- const e = (t.clientX - E.startX) / E.rect.width * E.crop.w, a = (t.clientY - E.startY) / E.rect.height * E.crop.h, o = E.sticker;
4419
+ const e = (t.clientX - L.startX) / L.rect.width * L.crop.w, a = (t.clientY - L.startY) / L.rect.height * L.crop.h, o = L.sticker;
4194
4420
  if (o) {
4195
- if (E.dir === "end")
4196
- C.update(o.id, {
4421
+ if (L.dir === "end")
4422
+ j.update(o.id, {
4197
4423
  x2: o.x2 + e,
4198
4424
  y2: o.y2 + a
4199
4425
  });
4200
- else if (E.dir === "start")
4201
- C.update(o.id, {
4426
+ else if (L.dir === "start")
4427
+ j.update(o.id, {
4202
4428
  x: o.x + e,
4203
4429
  y: o.y + a
4204
4430
  });
4205
- else if (E.dir === "move")
4206
- C.update(o.id, {
4431
+ else if (L.dir === "move")
4432
+ j.update(o.id, {
4207
4433
  x: o.x + e,
4208
4434
  y: o.y + a,
4209
4435
  x2: (o.x2 || o.x) + e,
@@ -4211,12 +4437,12 @@ function ga(t) {
4211
4437
  });
4212
4438
  else {
4213
4439
  const i = { x: o.x, y: o.y, w: o.w, h: o.h };
4214
- Rs(i, E.dir, e, a), C.update(o.id, i);
4440
+ rr(i, L.dir, e, a), j.update(o.id, i);
4215
4441
  }
4216
4442
  O();
4217
4443
  }
4218
4444
  }
4219
- function Rs(t, e, a, o) {
4445
+ function rr(t, e, a, o) {
4220
4446
  if (e.includes("e") && (t.w = Math.max(0.04, t.w + a)), e.includes("s") && (t.h = Math.max(0.04, t.h + o)), e.includes("w")) {
4221
4447
  const i = Math.max(0.04, t.w - a);
4222
4448
  t.x += t.w - i, t.w = i;
@@ -4226,52 +4452,52 @@ function Rs(t, e, a, o) {
4226
4452
  t.y += t.h - i, t.h = i;
4227
4453
  }
4228
4454
  }
4229
- function Tt(t) {
4230
- if (pa(), ne(!1), R) {
4231
- js();
4455
+ function $t(t) {
4456
+ if (Ra(), fe(!1), x) {
4457
+ sr();
4232
4458
  return;
4233
4459
  }
4234
- if (E) {
4235
- if (E.kind === "sticker") {
4236
- const e = n.canvas.getBoundingClientRect();
4237
- (t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (C.remove(E.id), I = null);
4460
+ if (L) {
4461
+ if (L.kind === "sticker") {
4462
+ const e = r.canvas.getBoundingClientRect();
4463
+ (t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (j.remove(L.id), V = null);
4238
4464
  }
4239
- E = null, O();
4465
+ L = null, O();
4240
4466
  }
4241
4467
  }
4242
- function js() {
4243
- const t = R;
4244
- if (R = null, !t)
4468
+ function sr() {
4469
+ const t = x;
4470
+ if (x = null, !t)
4245
4471
  return;
4246
4472
  if (t.kind === "crop") {
4247
- const a = Ot(t.start, t.current);
4248
- if (Math.abs(t.current.x - t.start.x) < Pe || Math.abs(t.current.y - t.start.y) < Pe) {
4473
+ const a = Kt(t.start, t.current);
4474
+ if (Math.abs(t.current.x - t.start.x) < Ke || Math.abs(t.current.y - t.start.y) < Ke) {
4249
4475
  O();
4250
4476
  return;
4251
4477
  }
4252
- const i = C.crop();
4253
- C.setCrop({
4478
+ const i = j.crop();
4479
+ j.setCrop({
4254
4480
  x: i.x + a.x * i.w,
4255
4481
  y: i.y + a.y * i.h,
4256
4482
  w: a.w * i.w,
4257
4483
  h: a.h * i.h
4258
- }), ot();
4484
+ }), rt();
4259
4485
  return;
4260
4486
  }
4261
- const e = Ps(t);
4262
- e && (I = e.id), O();
4487
+ const e = lr(t);
4488
+ e && (V = e.id), O();
4263
4489
  }
4264
- function Ps(t) {
4490
+ function lr(t) {
4265
4491
  if (t.type === "arrow") {
4266
4492
  const e = t.current.x - t.start.x, a = t.current.y - t.start.y;
4267
- return Math.hypot(e, a) < qt ? C.add("arrow", {
4493
+ return Math.hypot(e, a) < ee ? j.add("arrow", {
4268
4494
  x: t.start.x,
4269
4495
  y: t.start.y,
4270
4496
  x2: t.start.x + 0.12,
4271
4497
  y2: t.start.y,
4272
4498
  w: 0.12,
4273
4499
  h: 0.02
4274
- }) : C.add("arrow", {
4500
+ }) : j.add("arrow", {
4275
4501
  x: t.start.x,
4276
4502
  y: t.start.y,
4277
4503
  x2: t.current.x,
@@ -4280,174 +4506,174 @@ function Ps(t) {
4280
4506
  h: Math.abs(a)
4281
4507
  });
4282
4508
  }
4283
- return C.add(t.type, Ot(t.start, t.current));
4509
+ return j.add(t.type, Kt(t.start, t.current));
4284
4510
  }
4285
- function xs() {
4286
- C.resetCrop(), I = null, ot();
4511
+ function cr() {
4512
+ j.resetCrop(), V = null, rt();
4287
4513
  }
4288
- function Ft() {
4289
- n.resetCrop && (n.resetCrop.hidden = !C.isCropped());
4514
+ function Vt() {
4515
+ r.resetCrop && (r.resetCrop.hidden = !j.isCropped());
4290
4516
  }
4291
- function vt(t) {
4292
- if (!n.audio)
4517
+ function St(t) {
4518
+ if (!r.audio)
4293
4519
  return;
4294
- const e = !!t, a = p(e ? "tool.audioStop" : "tool.audio");
4295
- n.audio.title = a, n.audio.setAttribute("aria-label", a), n.audio.dataset.active = String(e), n.audio.innerHTML = e ? x.stop : x.audio;
4520
+ const e = !!t, a = g(e ? "tool.audioStop" : "tool.audio");
4521
+ r.audio.title = a, r.audio.setAttribute("aria-label", a), r.audio.dataset.active = String(e), r.audio.innerHTML = e ? U.stop : U.audio;
4296
4522
  }
4297
- function dt(t) {
4298
- if (et = !!t, n.video) {
4299
- const e = p(et ? "tool.stopVideo" : "tool.video");
4300
- n.video.title = e, n.video.setAttribute("aria-label", e), n.video.dataset.active = String(et), n.video.innerHTML = et ? x.stop : x.video;
4523
+ function ht(t) {
4524
+ if (it = !!t, r.video) {
4525
+ const e = g(it ? "tool.stopVideo" : "tool.video");
4526
+ r.video.title = e, r.video.setAttribute("aria-label", e), r.video.dataset.active = String(it), r.video.innerHTML = it ? U.stop : U.video;
4301
4527
  }
4302
- if (n.stop) {
4303
- const e = p("tool.stopVideo");
4304
- n.stop.title = e, n.stop.setAttribute("aria-label", e), n.stop.innerHTML = x.stop, n.stop.dataset.active = "true";
4528
+ if (r.stop) {
4529
+ const e = g("tool.stopVideo");
4530
+ r.stop.title = e, r.stop.setAttribute("aria-label", e), r.stop.innerHTML = U.stop, r.stop.dataset.active = "true";
4305
4531
  }
4306
4532
  }
4307
- function V() {
4308
- return Q(q);
4533
+ function B() {
4534
+ return at(W);
4309
4535
  }
4310
- function wt() {
4311
- if (!n.stage || !n.palette || !n.actions || !n.recapture)
4536
+ function Et() {
4537
+ if (!r.stage || !r.palette || !r.actions || !r.recapture)
4312
4538
  return;
4313
- const t = V();
4314
- n.stage.hidden = !t && !G, n.palette.hidden = !t, n.discard && (n.discard.hidden = !t), n.restore && (n.restore.hidden = t || !lt), t && n.paletteShot ? (n.paletteShot.appendChild(n.recapture), n.paletteShot.appendChild(n.discard)) : n.actionsMedia ? n.actionsMedia.after(n.recapture) : n.audio ? n.audio.after(n.recapture) : n.actions.insertBefore(n.recapture, n.submit || null), n.recapture.hidden = !1, se();
4539
+ const t = B();
4540
+ r.stage.hidden = !t && !G, r.palette.hidden = !t, r.discard && (r.discard.hidden = !t), r.restore && (r.restore.hidden = t || !gt), t && r.paletteShot ? (r.paletteShot.appendChild(r.recapture), r.paletteShot.appendChild(r.discard)) : r.actionsMedia ? r.actionsMedia.after(r.recapture) : r.audio ? r.audio.after(r.recapture) : r.actions.insertBefore(r.recapture, r.submit || null), r.recapture.hidden = !1, he();
4315
4541
  }
4316
- function Ls() {
4317
- V() && (lt = q), q = "", yt(null), wt(), ot();
4542
+ function ur() {
4543
+ B() && (gt = W), W = "", wt(null), Et(), rt();
4318
4544
  }
4319
- function Us() {
4320
- Q(lt) && (q = lt, wt(), ot());
4545
+ function dr() {
4546
+ at(gt) && (W = gt, Et(), rt());
4321
4547
  }
4322
- function ma() {
4548
+ function Pa() {
4323
4549
  return {
4324
- capture: typeof d.capture == "function" ? d.capture : void 0,
4325
- onBeforeCapture: typeof d.onBeforeCapture == "function" ? d.onBeforeCapture : void 0
4550
+ capture: typeof p.capture == "function" ? p.capture : void 0,
4551
+ onBeforeCapture: typeof p.onBeforeCapture == "function" ? p.onBeforeCapture : void 0
4326
4552
  };
4327
4553
  }
4328
- function ha(t) {
4329
- if (!Q(t))
4330
- throw new Error(p("status.screenshotFailed"));
4331
- q = t, lt = t, C = ee(), pt = { w: 0, h: 0 }, I = null, R = null, E = null, yt(null);
4554
+ function La(t) {
4555
+ if (!at(t))
4556
+ throw new Error(g("status.screenshotFailed"));
4557
+ W = t, gt = t, j = ue(), ft = { w: 0, h: 0 }, V = null, x = null, L = null, wt(null);
4332
4558
  }
4333
- async function Ts() {
4334
- if (!(Nt || !n.dialog || n.dialog.hidden)) {
4335
- Nt = !0, n.recapture.disabled = !0, S(p("status.capturing"), !0), n.dialog.hidden = !0;
4559
+ async function pr() {
4560
+ if (!(Wt || !r.dialog || r.dialog.hidden)) {
4561
+ Wt = !0, r.recapture.disabled = !0, z(g("status.capturing"), !0), r.dialog.hidden = !0;
4336
4562
  try {
4337
4563
  let t = "";
4338
4564
  try {
4339
- t = await zi();
4565
+ t = await Vi();
4340
4566
  } catch {
4341
- t = await We(ma());
4567
+ t = await la(Pa());
4342
4568
  }
4343
- ha(t), S("");
4569
+ La(t), z("");
4344
4570
  } catch (t) {
4345
- S((t == null ? void 0 : t.message) || p("status.screenshotFailed"));
4571
+ z((t == null ? void 0 : t.message) || g("status.screenshotFailed"));
4346
4572
  } finally {
4347
- n.dialog.hidden = !1, n.recapture.disabled = !1, Nt = !1, wt(), ot();
4573
+ r.dialog.hidden = !1, r.recapture.disabled = !1, Wt = !1, Et(), rt();
4348
4574
  }
4349
4575
  }
4350
4576
  }
4351
- function Fs() {
4577
+ function gr() {
4352
4578
  try {
4353
- if (W || (W = Ii((e) => {
4354
- const a = n.text.value.trim();
4355
- n.text.value = a ? `${a} ${e}` : e;
4579
+ if (X || (X = fn((e) => {
4580
+ const a = r.text.value.trim();
4581
+ r.text.value = a ? `${a} ${e}` : e;
4356
4582
  }, {
4357
4583
  onActiveChange(e) {
4358
- vt(e), e || S("");
4584
+ St(e), e || z("");
4359
4585
  }
4360
- })), !W.isSupported()) {
4361
- S(p("status.audioUnsupported"));
4586
+ })), !X.isSupported()) {
4587
+ z(g("status.audioUnsupported"));
4362
4588
  return;
4363
4589
  }
4364
- if (W.isActive()) {
4365
- W.stop();
4590
+ if (X.isActive()) {
4591
+ X.stop();
4366
4592
  return;
4367
4593
  }
4368
- const t = W.start({ lang: Et() });
4369
- vt(t), S(t ? p("status.listening") : "");
4594
+ const t = X.start({ lang: Lt() });
4595
+ St(t), z(t ? g("status.listening") : "");
4370
4596
  } catch (t) {
4371
- S(t.message);
4597
+ z(t.message);
4372
4598
  }
4373
4599
  }
4374
- async function Ms() {
4375
- if (et) {
4376
- $ == null || $.stop();
4600
+ async function mr() {
4601
+ if (it) {
4602
+ N == null || N.stop();
4377
4603
  return;
4378
4604
  }
4379
- await Ds();
4605
+ await hr();
4380
4606
  }
4381
- async function Ds() {
4382
- if (!d.video) {
4383
- S(p("status.videoDisabled"));
4607
+ async function hr() {
4608
+ if (!p.video) {
4609
+ z(g("status.videoDisabled"));
4384
4610
  return;
4385
4611
  }
4386
- if (!et) {
4387
- n.dialog.hidden = !0, n.stop.hidden = !1, ut(), n.launcher.hidden = !0, $ = $i({
4612
+ if (!it) {
4613
+ r.dialog.hidden = !0, r.stop.hidden = !1, mt(), r.launcher.hidden = !0, N = vn({
4388
4614
  onStart() {
4389
- dt(!0);
4615
+ ht(!0);
4390
4616
  },
4391
4617
  onStop(t) {
4392
- G = t, dt(!1), n.stop.hidden = !0, Lt(), n.dialog.hidden = !1, wt(), ot(), S(p(t ? "status.videoAttached" : "status.recordingCancelled"));
4618
+ G = t, ht(!1), r.stop.hidden = !0, It(), r.dialog.hidden = !1, Et(), rt(), z(g(t ? "status.videoAttached" : "status.recordingCancelled"));
4393
4619
  },
4394
4620
  onError(t) {
4395
- dt(!1), S(t.message);
4621
+ ht(!1), z(t.message);
4396
4622
  }
4397
4623
  });
4398
4624
  try {
4399
- await $.start();
4625
+ await N.start();
4400
4626
  } catch (t) {
4401
- dt(!1), n.stop.hidden = !0, Lt(), n.dialog.hidden = !1, S(t.message);
4627
+ ht(!1), r.stop.hidden = !0, It(), r.dialog.hidden = !1, z(t.message);
4402
4628
  }
4403
4629
  }
4404
4630
  }
4405
- function Os() {
4631
+ function fr() {
4406
4632
  var e;
4407
- const t = n.shotBlock || n.canvas;
4408
- t == null || t.style.removeProperty("--nf-shot-aspect"), (e = n.canvas) == null || e.style.removeProperty("aspect-ratio");
4633
+ const t = r.shotBlock || r.canvas;
4634
+ t == null || t.style.removeProperty("--nf-shot-aspect"), (e = r.canvas) == null || e.style.removeProperty("aspect-ratio");
4409
4635
  }
4410
- function Is(t, e) {
4636
+ function yr(t, e) {
4411
4637
  if (!(t > 0) || !(e > 0))
4412
4638
  return;
4413
- const a = n.shotBlock || n.canvas, o = t / e;
4414
- a == null || a.style.setProperty("--nf-shot-aspect", String(o)), n.canvas && (n.canvas.style.aspectRatio = `${t} / ${e}`);
4639
+ const a = r.shotBlock || r.canvas, o = t / e;
4640
+ a == null || a.style.setProperty("--nf-shot-aspect", String(o)), r.canvas && (r.canvas.style.aspectRatio = `${t} / ${e}`);
4415
4641
  }
4416
- function Vs(t) {
4417
- if (!n.shot || !n.canvas || !(t > 0))
4642
+ function vr(t) {
4643
+ if (!r.shot || !r.canvas || !(t > 0))
4418
4644
  return;
4419
- const e = n.canvas.clientWidth, a = n.canvas.clientHeight;
4645
+ const e = r.canvas.clientWidth, a = r.canvas.clientHeight;
4420
4646
  if (!(e > 0) || !(a > 0)) {
4421
- n.shot.style.left = "0", n.shot.style.top = "0", n.shot.style.width = "100%", n.shot.style.height = "100%";
4647
+ r.shot.style.left = "0", r.shot.style.top = "0", r.shot.style.width = "100%", r.shot.style.height = "100%";
4422
4648
  return;
4423
4649
  }
4424
- const o = e / a, i = Math.min(1, t / o), s = Math.min(1, o / t);
4425
- n.shot.style.left = `${(1 - i) / 2 * 100}%`, n.shot.style.top = `${(1 - s) / 2 * 100}%`, n.shot.style.width = `${i * 100}%`, n.shot.style.height = `${s * 100}%`;
4650
+ const o = e / a, i = Math.min(1, t / o), n = Math.min(1, o / t);
4651
+ r.shot.style.left = `${(1 - i) / 2 * 100}%`, r.shot.style.top = `${(1 - n) / 2 * 100}%`, r.shot.style.width = `${i * 100}%`, r.shot.style.height = `${n * 100}%`;
4426
4652
  }
4427
- function ot() {
4428
- if (n.shot = null, !V()) {
4429
- Os(), n.canvas.innerHTML = G ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(G)}"></video>` : "", Ft();
4653
+ function rt() {
4654
+ if (r.shot = null, !B()) {
4655
+ fr(), r.canvas.innerHTML = G ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(G)}"></video>` : "", Vt();
4430
4656
  return;
4431
4657
  }
4432
- n.canvas.innerHTML = `<div class="nf-shot"><img alt="${D(p("shot.alt"))}" src="${q}" draggable="false"></div>`, n.shot = n.canvas.querySelector(".nf-shot");
4433
- const t = n.shot.querySelector("img");
4658
+ r.canvas.innerHTML = `<div class="nf-shot"><img alt="${I(g("shot.alt"))}" src="${W}" draggable="false"></div>`, r.shot = r.canvas.querySelector(".nf-shot");
4659
+ const t = r.shot.querySelector("img");
4434
4660
  t.draggable = !1, t.addEventListener("dragstart", (a) => a.preventDefault());
4435
4661
  const e = () => {
4436
- $s(t), O();
4662
+ kr(t), O();
4437
4663
  };
4438
- t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Ft();
4664
+ t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Vt();
4439
4665
  }
4440
- function $s(t) {
4441
- const e = t.naturalWidth || pt.w, a = t.naturalHeight || pt.h;
4442
- if (!n.shot || !(e > 0) || !(a > 0))
4666
+ function kr(t) {
4667
+ const e = t.naturalWidth || ft.w, a = t.naturalHeight || ft.h;
4668
+ if (!r.shot || !(e > 0) || !(a > 0))
4443
4669
  return;
4444
- pt = { w: e, h: a };
4445
- const o = C.crop(), i = o.w * e, s = o.h * a, r = i / s;
4446
- Is(i, s), t.style.width = `${100 / o.w}%`, t.style.height = `${100 / o.h}%`, t.style.left = `${-o.x / o.w * 100}%`, t.style.top = `${-o.y / o.h * 100}%`;
4447
- const l = () => Vs(r);
4670
+ ft = { w: e, h: a };
4671
+ const o = j.crop(), i = o.w * e, n = o.h * a, s = i / n;
4672
+ yr(i, n), t.style.width = `${100 / o.w}%`, t.style.height = `${100 / o.h}%`, t.style.left = `${-o.x / o.w * 100}%`, t.style.top = `${-o.y / o.h * 100}%`;
4673
+ const l = () => vr(s);
4448
4674
  l(), requestAnimationFrame(l);
4449
4675
  }
4450
- function Bs(t) {
4676
+ function br(t) {
4451
4677
  return t.type === "arrow" ? {
4452
4678
  id: "preview",
4453
4679
  type: "arrow",
@@ -4462,66 +4688,66 @@ function Bs(t) {
4462
4688
  id: "preview",
4463
4689
  type: t.type,
4464
4690
  number: "",
4465
- ...Ot(t.start, t.current)
4691
+ ...Kt(t.start, t.current)
4466
4692
  };
4467
4693
  }
4468
4694
  function O() {
4469
- if ((n.shot || n.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((s) => s.remove()), !V() || !n.shot) {
4470
- Ft();
4695
+ if ((r.shot || r.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((n) => n.remove()), !B() || !r.shot) {
4696
+ Vt();
4471
4697
  return;
4472
4698
  }
4473
- const e = C.crop(), a = bt(), o = Xe(a.clientWidth || 400);
4474
- if (n.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), n.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), n.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), n.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (R == null ? void 0 : R.kind) === "crop") {
4475
- const s = document.createElement("div");
4476
- s.className = "nf-crop", Ue(s, Ot(R.start, R.current), { x: 0, y: 0, w: 1, h: 1 }), n.shot.appendChild(s);
4699
+ const e = j.crop(), a = Ct(), o = ga(a.clientWidth || 400);
4700
+ if (r.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), r.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), r.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), r.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (x == null ? void 0 : x.kind) === "crop") {
4701
+ const n = document.createElement("div");
4702
+ n.className = "nf-crop", Ge(n, Kt(x.start, x.current), { x: 0, y: 0, w: 1, h: 1 }), r.shot.appendChild(n);
4477
4703
  }
4478
- const i = C.list().slice();
4479
- if ((R == null ? void 0 : R.kind) === "sticker" && i.push(Bs(R)), i.forEach((s) => {
4480
- const r = s.id === "preview", l = !r && s.id === I, u = document.createElement("div");
4481
- if (u.className = `nf-sticker nf-${s.type}`, u.dataset.id = s.id, l && (u.dataset.selected = "true"), r && (u.dataset.preview = "true"), s.type === "arrow" ? Ns(u, s, e, l, o) : (Ue(u, s, e), l && ["nw", "ne", "sw", "se"].forEach((c) => Yt(u, c))), !r && s.number) {
4482
- const c = document.createElement("span");
4483
- c.className = "nf-badge", c.textContent = String(s.number), u.appendChild(c);
4704
+ const i = j.list().slice();
4705
+ if ((x == null ? void 0 : x.kind) === "sticker" && i.push(br(x)), i.forEach((n) => {
4706
+ const s = n.id === "preview", l = !s && n.id === V, c = document.createElement("div");
4707
+ if (c.className = `nf-sticker nf-${n.type}`, c.dataset.id = n.id, l && (c.dataset.selected = "true"), s && (c.dataset.preview = "true"), n.type === "arrow" ? wr(c, n, e, l, o) : (Ge(c, n, e), l && ["nw", "ne", "sw", "se"].forEach((d) => ie(c, d))), !s && n.number) {
4708
+ const d = document.createElement("span");
4709
+ d.className = "nf-badge", d.textContent = String(n.number), c.appendChild(d);
4484
4710
  }
4485
- n.shot.appendChild(u);
4486
- }), n.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((s) => s.remove()), G) {
4487
- const s = document.createElement("video");
4488
- s.className = "nf-recording-preview", s.controls = !0, s.src = URL.createObjectURL(G), s.style.position = "absolute", s.style.right = "8px", s.style.bottom = "8px", s.style.width = "160px", n.canvas.appendChild(s);
4711
+ r.shot.appendChild(c);
4712
+ }), r.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((n) => n.remove()), G) {
4713
+ const n = document.createElement("video");
4714
+ n.className = "nf-recording-preview", n.controls = !0, n.src = URL.createObjectURL(G), n.style.position = "absolute", n.style.right = "8px", n.style.bottom = "8px", n.style.width = "160px", r.canvas.appendChild(n);
4489
4715
  }
4490
- Ft();
4716
+ Vt();
4491
4717
  }
4492
- function Ns(t, e, a, o, i = Xe(400)) {
4493
- const s = bt(), r = s.clientWidth, l = s.clientHeight, u = (e.x - a.x) / a.w * r, c = (e.y - a.y) / a.h * l, g = ((e.x2 ?? e.x + e.w) - a.x) / a.w * r, k = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), w = Math.min(u, g) - v, b = Math.min(c, k) - v, z = Math.max(2, Math.abs(g - u)) + v * 2, j = Math.max(2, Math.abs(k - c)) + v * 2, T = u - w, K = c - b, P = g - w, m = k - b, A = Gi(T, K, P, m, i), tt = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4494
- t.style.left = `${w}px`, t.style.top = `${b}px`, t.style.width = `${z}px`, t.style.height = `${j}px`, tt.setAttribute("class", "nf-arrow-svg"), tt.setAttribute("viewBox", `0 0 ${z} ${j}`), tt.setAttribute("width", String(z)), tt.setAttribute("height", String(j)), tt.innerHTML = `
4495
- <line class="nf-arrow-hit" x1="${T}" y1="${K}" x2="${P}" y2="${m}" />
4496
- <line class="nf-arrow-shaft" x1="${T}" y1="${K}" x2="${A.shaftEnd.x}" y2="${A.shaftEnd.y}" />
4497
- <polygon class="nf-arrow-head" points="${A.tipX},${A.tipY} ${A.left.x},${A.left.y} ${A.right.x},${A.right.y}" />
4498
- `, t.appendChild(tt), o && (Yt(t, "start", { left: T - 5, top: K - 5 }), Yt(t, "end", { left: P - 5, top: m - 5 }));
4718
+ function wr(t, e, a, o, i = ga(400)) {
4719
+ const n = Ct(), s = n.clientWidth, l = n.clientHeight, c = (e.x - a.x) / a.w * s, d = (e.y - a.y) / a.h * l, m = ((e.x2 ?? e.x + e.w) - a.x) / a.w * s, S = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), A = Math.min(c, m) - v, E = Math.min(d, S) - v, P = Math.max(2, Math.abs(m - c)) + v * 2, u = Math.max(2, Math.abs(S - d)) + v * 2, h = c - A, R = d - E, k = m - A, f = S - E, C = An(h, R, k, f, i), Z = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4720
+ t.style.left = `${A}px`, t.style.top = `${E}px`, t.style.width = `${P}px`, t.style.height = `${u}px`, Z.setAttribute("class", "nf-arrow-svg"), Z.setAttribute("viewBox", `0 0 ${P} ${u}`), Z.setAttribute("width", String(P)), Z.setAttribute("height", String(u)), Z.innerHTML = `
4721
+ <line class="nf-arrow-hit" x1="${h}" y1="${R}" x2="${k}" y2="${f}" />
4722
+ <line class="nf-arrow-shaft" x1="${h}" y1="${R}" x2="${C.shaftEnd.x}" y2="${C.shaftEnd.y}" />
4723
+ <polygon class="nf-arrow-head" points="${C.tipX},${C.tipY} ${C.left.x},${C.left.y} ${C.right.x},${C.right.y}" />
4724
+ `, t.appendChild(Z), o && (ie(t, "start", { left: h - 5, top: R - 5 }), ie(t, "end", { left: k - 5, top: f - 5 }));
4499
4725
  }
4500
- function Yt(t, e, a) {
4726
+ function ie(t, e, a) {
4501
4727
  const o = document.createElement("span");
4502
4728
  o.className = "nf-handle", o.dataset.dir = e, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), t.appendChild(o);
4503
4729
  }
4504
- function Ue(t, e, a) {
4730
+ function Ge(t, e, a) {
4505
4731
  t.style.left = `${(e.x - a.x) / a.w * 100}%`, t.style.top = `${(e.y - a.y) / a.h * 100}%`, t.style.width = `${e.w / a.w * 100}%`, t.style.height = `${e.h / a.h * 100}%`;
4506
4732
  }
4507
- function fa() {
4733
+ function xa() {
4508
4734
  try {
4509
- return String(localStorage.getItem(ea) || "").trim();
4735
+ return String(localStorage.getItem(fa) || "").trim();
4510
4736
  } catch {
4511
4737
  return "";
4512
4738
  }
4513
4739
  }
4514
- function Ks(t) {
4740
+ function Sr(t) {
4515
4741
  const e = String(t || "").trim();
4516
- if (!(!e || e === Xt()))
4742
+ if (!(!e || e === ne()))
4517
4743
  try {
4518
- localStorage.setItem(ea, e);
4744
+ localStorage.setItem(fa, e);
4519
4745
  } catch {
4520
4746
  }
4521
4747
  }
4522
- function ya() {
4748
+ function Ua() {
4523
4749
  try {
4524
- const t = localStorage.getItem(ia);
4750
+ const t = localStorage.getItem(ka);
4525
4751
  if (!t)
4526
4752
  return { diagnostics: !1, logs: !1 };
4527
4753
  const e = JSON.parse(t);
@@ -4533,81 +4759,131 @@ function ya() {
4533
4759
  return { diagnostics: !1, logs: !1 };
4534
4760
  }
4535
4761
  }
4536
- function Te(t = {}) {
4762
+ function qe(t = {}) {
4537
4763
  const e = {
4538
- ...ya(),
4764
+ ...Ua(),
4539
4765
  ...t
4540
4766
  };
4541
4767
  try {
4542
- localStorage.setItem(ia, JSON.stringify({
4768
+ localStorage.setItem(ka, JSON.stringify({
4543
4769
  diagnostics: !!e.diagnostics,
4544
4770
  logs: !!e.logs
4545
4771
  }));
4546
4772
  } catch {
4547
4773
  }
4548
4774
  }
4549
- function va() {
4550
- return !!(String(H.userId || "").trim() || String(H.email || "").trim() || String(H.displayName || "").trim());
4775
+ function Ta() {
4776
+ return !!(String(_.userId || "").trim() || String(_.email || "").trim() || String(_.displayName || "").trim());
4551
4777
  }
4552
- function ka() {
4778
+ function Fa() {
4553
4779
  return String(
4554
- H.displayName || H.email || H.userId || ""
4780
+ _.displayName || _.email || _.userId || ""
4555
4781
  ).trim();
4556
4782
  }
4557
- function Xt() {
4558
- return p("form.authorPlaceholder");
4783
+ function ne() {
4784
+ return g("form.authorPlaceholder");
4559
4785
  }
4560
- function Hs() {
4786
+ function Ar() {
4561
4787
  var e;
4562
- if (va())
4563
- return ka() || Xt();
4564
- const t = String(((e = n.author) == null ? void 0 : e.value) || "").trim();
4565
- return t ? (Ks(t), t) : Xt();
4788
+ if (Ta())
4789
+ return Fa() || ne();
4790
+ const t = String(((e = r.author) == null ? void 0 : e.value) || "").trim();
4791
+ return t ? (Sr(t), t) : ne();
4566
4792
  }
4567
- function ba() {
4568
- if (!n.author)
4793
+ function Ma() {
4794
+ if (!r.author)
4569
4795
  return;
4570
- const t = va();
4571
- if (n.author.hidden = t, t) {
4572
- n.author.value = "";
4796
+ const t = Ta();
4797
+ if (r.author.hidden = t, t) {
4798
+ r.author.value = "";
4573
4799
  return;
4574
4800
  }
4575
- n.author.value = fa();
4801
+ r.author.value = xa();
4576
4802
  }
4577
- function wa(t, e = ta) {
4803
+ function Da(t, e = ha) {
4578
4804
  const a = Number(t);
4579
- return Number.isFinite(a) ? Math.min(ls, Math.max(0, Math.floor(a))) : e;
4805
+ return Number.isFinite(a) ? Math.min(Vn, Math.max(0, Math.floor(a))) : e;
4580
4806
  }
4581
- function Sa(t) {
4582
- t.key !== "Escape" || !n.dialog || n.dialog.hidden || ht && !ft || at();
4807
+ function Cr(t, e = null) {
4808
+ return t === void 0 ? e : t == null ? null : Array.isArray(t) ? t.filter((a) => typeof a == "function") : e;
4583
4809
  }
4584
- function Ca(t = {}) {
4585
- xi(t);
4586
- const e = Object.prototype.hasOwnProperty.call(t, "kinds");
4587
- d = {
4588
- ...d,
4589
- endpoint: String(t.endpoint || d.endpoint || "").replace(/\/$/, ""),
4590
- projectKey: t.projectKey == null ? d.projectKey : String(t.projectKey),
4591
- version: t.version == null ? d.version : String(t.version),
4592
- name: t.name == null ? d.name : String(t.name || ""),
4593
- targets: t.targets === void 0 ? d.targets : t.targets,
4594
- hideLauncher: t.hideLauncher == null ? d.hideLauncher : !!t.hideLauncher,
4595
- theme: sa(t.theme ?? d.theme),
4596
- video: t.video == null ? d.video : !!t.video,
4597
- consoleLogLimit: t.consoleLogLimit == null ? d.consoleLogLimit : wa(t.consoleLogLimit, d.consoleLogLimit),
4598
- kinds: e ? is(t.kinds) : d.kinds,
4599
- kindsCustom: e ? !0 : d.kindsCustom,
4600
- capture: t.capture === void 0 ? d.capture : t.capture,
4601
- onBeforeCapture: t.onBeforeCapture === void 0 ? d.onBeforeCapture : t.onBeforeCapture,
4602
- onOpen: t.onOpen === void 0 ? d.onOpen : t.onOpen,
4603
- onClose: t.onClose === void 0 ? d.onClose : t.onClose,
4604
- displayLink: t.displayLink == null ? d.displayLink : !!t.displayLink,
4605
- locale: t.locale === void 0 ? d.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
4606
- translations: t.translations === void 0 ? d.translations : t.translations && typeof t.translations == "object" ? t.translations : null
4607
- };
4810
+ function Er() {
4811
+ ot.setConsoleMethods(p.consoleMethods), ot.setScrubLog(p.scrubLog);
4608
4812
  }
4609
- function Aa(t) {
4610
- const e = d[t];
4813
+ function zr() {
4814
+ const t = Da(p.consoleLogLimit), e = ot.snapshotForReport(t), a = p.logSources;
4815
+ if (!a || !a.length)
4816
+ return e;
4817
+ const o = [];
4818
+ for (const n of a)
4819
+ try {
4820
+ const s = n();
4821
+ if (!Array.isArray(s))
4822
+ continue;
4823
+ for (const l of s)
4824
+ !l || typeof l != "object" || o.push({
4825
+ level: l.level || "log",
4826
+ text: String(l.text || ""),
4827
+ at: Number.isFinite(l.at) ? l.at : Date.now(),
4828
+ t: Number.isFinite(l.t) ? l.t : void 0,
4829
+ truncated: !!l.truncated,
4830
+ count: l.count,
4831
+ segments: l.segments
4832
+ });
4833
+ } catch {
4834
+ }
4835
+ if (!o.length)
4836
+ return e;
4837
+ const i = [...e, ...o].sort((n, s) => {
4838
+ const l = (n.at || 0) - (s.at || 0);
4839
+ return l !== 0 ? l : (n.t || 0) - (s.t || 0);
4840
+ });
4841
+ return t === 0 ? [] : i.slice(-t);
4842
+ }
4843
+ function Rr(t, ...e) {
4844
+ if (t && typeof t == "object" && !Array.isArray(t)) {
4845
+ ot.pushEntry(t);
4846
+ return;
4847
+ }
4848
+ const a = String(t || "log");
4849
+ ot.push(a, e, {
4850
+ captureStack: a === "warn" || a === "error"
4851
+ });
4852
+ }
4853
+ function Ia(t) {
4854
+ t.key !== "Escape" || !r.dialog || r.dialog.hidden || kt && !bt || nt();
4855
+ }
4856
+ function Oa(t = {}) {
4857
+ _i(t);
4858
+ const e = Object.prototype.hasOwnProperty.call(t, "kinds");
4859
+ p = {
4860
+ ...p,
4861
+ endpoint: String(t.endpoint || p.endpoint || "").replace(/\/$/, ""),
4862
+ projectKey: t.projectKey == null ? p.projectKey : String(t.projectKey),
4863
+ version: t.version == null ? p.version : String(t.version),
4864
+ name: t.name == null ? p.name : String(t.name || ""),
4865
+ targets: t.targets === void 0 ? p.targets : t.targets,
4866
+ hideLauncher: t.hideLauncher == null ? p.hideLauncher : !!t.hideLauncher,
4867
+ launcherCorner: t.launcherCorner === void 0 ? p.launcherCorner : pe(t.launcherCorner) || null,
4868
+ theme: ba(t.theme ?? p.theme),
4869
+ video: t.video == null ? p.video : !!t.video,
4870
+ consoleLogLimit: t.consoleLogLimit == null ? p.consoleLogLimit : Da(t.consoleLogLimit, p.consoleLogLimit),
4871
+ consoleMethods: t.consoleMethods === void 0 ? p.consoleMethods : ce(t.consoleMethods),
4872
+ scrubLog: t.scrubLog === void 0 ? p.scrubLog : typeof t.scrubLog == "function" ? t.scrubLog : Ft,
4873
+ logSources: t.logSources === void 0 ? p.logSources : Cr(t.logSources, p.logSources),
4874
+ kinds: e ? Dn(t.kinds) : p.kinds,
4875
+ kindsCustom: e ? !0 : p.kindsCustom,
4876
+ capture: t.capture === void 0 ? p.capture : t.capture,
4877
+ onBeforeCapture: t.onBeforeCapture === void 0 ? p.onBeforeCapture : t.onBeforeCapture,
4878
+ onOpen: t.onOpen === void 0 ? p.onOpen : t.onOpen,
4879
+ onClose: t.onClose === void 0 ? p.onClose : t.onClose,
4880
+ displayLink: t.displayLink == null ? p.displayLink : !!t.displayLink,
4881
+ locale: t.locale === void 0 ? p.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
4882
+ translations: t.translations === void 0 ? p.translations : t.translations && typeof t.translations == "object" ? t.translations : null
4883
+ }, Er();
4884
+ }
4885
+ function $a(t) {
4886
+ const e = p[t];
4611
4887
  if (typeof e == "function")
4612
4888
  try {
4613
4889
  e();
@@ -4615,319 +4891,319 @@ function Aa(t) {
4615
4891
  console.warn(`Notefully.${t} failed:`, a);
4616
4892
  }
4617
4893
  }
4618
- function Gs() {
4619
- return mt;
4894
+ function jr() {
4895
+ return vt;
4620
4896
  }
4621
- function _s() {
4622
- return Et();
4897
+ function Pr() {
4898
+ return Lt();
4623
4899
  }
4624
- function qs(t, e) {
4625
- return d.locale = t == null || t === "" ? null : String(t), e !== void 0 && (d.translations = e && typeof e == "object" ? e : null), f ? ut() : na(), It;
4900
+ function Lr(t, e) {
4901
+ return p.locale = t == null || t === "" ? null : String(t), e !== void 0 && (p.translations = e && typeof e == "object" ? e : null), b ? mt() : wa(), Ht;
4626
4902
  }
4627
- function re(t = {}) {
4628
- return Ca(t), f && ut(), It;
4903
+ function ye(t = {}) {
4904
+ return Oa(t), b && mt(), Ht;
4629
4905
  }
4630
- function Ws(t = {}) {
4631
- return Ca(t), ae(), ut(), It;
4906
+ function xr(t = {}) {
4907
+ return ot.hook(), Oa(t), de(), mt(), Ht;
4632
4908
  }
4633
- function Zs(t) {
4634
- return re({ theme: t });
4909
+ function Ur(t) {
4910
+ return ye({ theme: t });
4635
4911
  }
4636
- function Ys(t) {
4912
+ function Tr(t) {
4637
4913
  const e = !!t;
4638
- return !e && f && n.dialog && !n.dialog.hidden && at(), re({ hideLauncher: !e });
4914
+ return !e && b && r.dialog && !r.dialog.hidden && nt(), ye({ hideLauncher: !e });
4639
4915
  }
4640
- function Xs() {
4641
- const t = ka() || fa() || void 0, e = ji({
4642
- ...H,
4643
- displayName: H.displayName || t
4916
+ function Fr() {
4917
+ const t = Fa() || xa() || void 0, e = Ki({
4918
+ ..._,
4919
+ displayName: _.displayName || t
4644
4920
  });
4645
- N = Ji(e), B = Qi(
4646
- Qe.snapshot().slice(-wa(d.consoleLogLimit))
4647
- );
4648
- const a = ya();
4649
- a.diagnostics && xt(N, !0), a.logs && B.length && xt(B, !0), Z = !1;
4921
+ H = Ln(e), K = xn(zr());
4922
+ const a = Ua();
4923
+ a.diagnostics && Dt(H, !0), a.logs && K.length && Dt(K, !0), J = !1;
4650
4924
  }
4651
- function le(t) {
4652
- Z = !!t, n.privacyPanel && (n.privacyPanel.hidden = !Z), n.privacyStack && (n.privacyStack.dataset.open = String(Z)), n.privacyChange && (n.privacyChange.setAttribute("aria-expanded", Z ? "true" : "false"), n.privacyChange.dataset.active = String(Z)), Z && ce();
4925
+ function ve(t) {
4926
+ J = !!t, r.privacyPanel && (r.privacyPanel.hidden = !J), r.privacyStack && (r.privacyStack.dataset.open = String(J)), r.privacyChange && (r.privacyChange.setAttribute("aria-expanded", J ? "true" : "false"), r.privacyChange.dataset.active = String(J)), J && be();
4653
4927
  }
4654
- function ue() {
4655
- if (!n.privacy || !n.privacyText || !n.privacyChange)
4928
+ function ke() {
4929
+ if (!r.privacy || !r.privacyText || !r.privacyChange)
4656
4930
  return;
4657
- const t = es({
4658
- diagnostics: N,
4659
- logs: B
4931
+ const t = Tn({
4932
+ diagnostics: H,
4933
+ logs: K
4660
4934
  });
4661
- n.privacyText.textContent = t, n.privacyText.hidden = !t;
4662
- const e = N.length === 0 && B.length === 0;
4663
- n.privacySummary && (n.privacySummary.hidden = e), n.privacy.hidden = e, n.privacyChange.hidden = !1;
4935
+ r.privacyText.textContent = t, r.privacyText.hidden = !t;
4936
+ const e = H.length === 0 && K.length === 0;
4937
+ r.privacySummary && (r.privacySummary.hidden = e), r.privacy.hidden = e, r.privacyChange.hidden = !1;
4664
4938
  }
4665
- function za(t, e, a) {
4666
- const i = `${p(t ? "privacy.included" : "privacy.redacted")} ${a}`;
4939
+ function Va(t, e, a) {
4940
+ const i = `${g(t ? "privacy.included" : "privacy.redacted")} ${a}`;
4667
4941
  return `<label class="pill-switch nf-privacy-toggle" data-included="${t ? "true" : "false"}">
4668
- <input type="checkbox" class="pill-switch-input" role="switch" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${D(i)}" aria-checked="${t ? "true" : "false"}">
4942
+ <input type="checkbox" class="pill-switch-input" role="switch" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${I(i)}" aria-checked="${t ? "true" : "false"}">
4669
4943
  <span class="pill-switch-track" aria-hidden="true">
4670
4944
  <span class="pill-switch-mark"></span>
4671
4945
  <span class="pill-switch-thumb"></span>
4672
4946
  </span>
4673
4947
  </label>`;
4674
4948
  }
4675
- function Fe(t, e, a, o, i, s = null) {
4676
- const r = za(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), u = i ? D(l) : s ?? D(l), c = l ? `${a}: ${l}` : a;
4677
- return `<div class="nf-privacy-row" data-kind="${D(t)}" data-id="${D(e)}"${i ? ' data-redacted="true"' : ""}>
4678
- ${r}
4679
- <div class="nf-privacy-row-text"${i ? ` title="${D(c)}"` : ""}>
4680
- <span class="nf-privacy-row-title">${D(a)}</span>
4681
- <span class="nf-privacy-row-detail">${u}</span>
4949
+ function We(t, e, a, o, i, n = null) {
4950
+ const s = Va(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), c = i ? I(l) : n ?? I(l), d = l ? `${a}: ${l}` : a;
4951
+ return `<div class="nf-privacy-row" data-kind="${I(t)}" data-id="${I(e)}"${i ? ' data-redacted="true"' : ""}>
4952
+ ${s}
4953
+ <div class="nf-privacy-row-text"${i ? ` title="${I(d)}"` : ""}>
4954
+ <span class="nf-privacy-row-title">${I(a)}</span>
4955
+ <span class="nf-privacy-row-detail">${c}</span>
4682
4956
  </div>
4683
4957
  </div>`;
4684
4958
  }
4685
- function Me(t, e, a, o) {
4959
+ function Ze(t, e, a, o) {
4686
4960
  if (!a.length)
4687
4961
  return "";
4688
- const i = ts(a), s = !i.checked && !i.indeterminate;
4689
- return `<section class="nf-privacy-section" data-section="${D(t)}"${s ? ' data-redacted="true"' : ""}>
4962
+ const i = Un(a), n = !i.checked && !i.indeterminate;
4963
+ return `<section class="nf-privacy-section" data-section="${I(t)}"${n ? ' data-redacted="true"' : ""}>
4690
4964
  <div class="nf-privacy-section-head">
4691
- ${za(i.checked, i.indeterminate, e)}
4692
- <h3 class="nf-privacy-section-title">${D(e)}</h3>
4965
+ ${Va(i.checked, i.indeterminate, e)}
4966
+ <h3 class="nf-privacy-section-title">${I(e)}</h3>
4693
4967
  </div>
4694
- <div class="nf-privacy-rows"${s ? " hidden" : ""}>${o}</div>
4968
+ <div class="nf-privacy-rows"${n ? " hidden" : ""}>${o}</div>
4695
4969
  </section>`;
4696
4970
  }
4697
- function ce() {
4698
- if (!n.privacyScroll)
4971
+ function be() {
4972
+ if (!r.privacyScroll)
4699
4973
  return;
4700
- const t = N.map((a) => Fe(
4974
+ const t = H.map((a) => We(
4701
4975
  "diagnostic",
4702
4976
  a.key,
4703
4977
  a.label,
4704
- as(a.value),
4978
+ Fn(a.value),
4705
4979
  a.redacted
4706
- )).join(""), e = B.map((a) => {
4707
- const o = Fi(a);
4708
- return Fe(
4980
+ )).join(""), e = K.map((a) => {
4981
+ const o = Zi(a), i = Number.isFinite(a.count) && a.count > 1 ? ` ×${a.count}` : "", n = `${a.level}${i}`, s = a.redacted ? null : `${Yi(a)}${a.truncated ? '<span class="nf-console-truncated">…</span>' : ""}`;
4982
+ return We(
4709
4983
  "log",
4710
4984
  a.id,
4711
- a.level,
4985
+ n,
4712
4986
  o,
4713
4987
  a.redacted,
4714
- a.redacted ? null : Mi(a)
4988
+ s
4715
4989
  );
4716
4990
  }).join("");
4717
- n.privacyScroll.innerHTML = [
4718
- Me("diagnostics", p("privacy.section.diagnostics"), N, t),
4719
- B.length ? Me("logs", p("privacy.section.logs"), B, e) : ""
4720
- ].join(""), n.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
4991
+ r.privacyScroll.innerHTML = [
4992
+ Ze("diagnostics", g("privacy.section.diagnostics"), H, t),
4993
+ K.length ? Ze("logs", g("privacy.section.logs"), K, e) : ""
4994
+ ].join(""), r.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
4721
4995
  a.indeterminate = !0, a.removeAttribute("data-indeterminate");
4722
- }), ue();
4996
+ }), ke();
4723
4997
  }
4724
- function Js(t) {
4998
+ function Mr(t) {
4725
4999
  const e = t.target;
4726
5000
  if (!(e instanceof HTMLInputElement) || e.type !== "checkbox")
4727
5001
  return;
4728
5002
  const a = e.closest("[data-section]"), o = e.closest(".nf-privacy-row"), i = !e.checked;
4729
5003
  if (o) {
4730
- const s = o.dataset.kind, r = o.dataset.id;
4731
- if (s === "diagnostic") {
4732
- const l = N.find((u) => u.key === r);
5004
+ const n = o.dataset.kind, s = o.dataset.id;
5005
+ if (n === "diagnostic") {
5006
+ const l = H.find((c) => c.key === s);
4733
5007
  l && (l.redacted = i);
4734
- } else if (s === "log") {
4735
- const l = B.find((u) => u.id === r);
5008
+ } else if (n === "log") {
5009
+ const l = K.find((c) => c.id === s);
4736
5010
  l && (l.redacted = i);
4737
5011
  }
4738
5012
  } else if (a) {
4739
- const s = a.dataset.section;
4740
- s === "diagnostics" ? (xt(N, i), Te({ diagnostics: i })) : s === "logs" && (xt(B, i), Te({ logs: i }));
5013
+ const n = a.dataset.section;
5014
+ n === "diagnostics" ? (Dt(H, i), qe({ diagnostics: i })) : n === "logs" && (Dt(K, i), qe({ logs: i }));
4741
5015
  } else
4742
5016
  return;
4743
- ce();
5017
+ be();
4744
5018
  }
4745
- async function Ea() {
4746
- ae(), mt || (mt = !0, Aa("onOpen")), Ra(), ut(), n.launcher.hidden = !0, C = ee(), pt = { w: 0, h: 0 }, G = null, q = "", lt = "", I = null, R = null, E = null, _ = Cs(), ie(_), yt(null), vt(!1), n.text.value = "", ba(), S(""), Xs();
5019
+ async function Ba() {
5020
+ de(), vt || (vt = !0, $a("onOpen")), Na(), mt(), r.launcher.hidden = !0, j = ue(), ft = { w: 0, h: 0 }, G = null, W = "", gt = "", V = null, x = null, L = null, q = ar(), me(q), wt(null), St(!1), r.text.value = "", Ma(), z(""), Fr();
4747
5021
  try {
4748
- ha(await We(ma())), S("");
5022
+ La(await la(Pa())), z("");
4749
5023
  } catch (e) {
4750
- q = "", S((e == null ? void 0 : e.message) || p("status.screenshotFailed"));
5024
+ W = "", z((e == null ? void 0 : e.message) || g("status.screenshotFailed"));
4751
5025
  }
4752
- wt(), le(!1), ue(), n.dialog.hidden = !1, ot(), n.text.focus();
5026
+ Et(), ve(!1), ke(), r.dialog.hidden = !1, rt(), r.text.focus();
4753
5027
  }
4754
- function at() {
4755
- if (!f)
5028
+ function nt() {
5029
+ if (!b)
4756
5030
  return;
4757
- const t = mt;
4758
- W == null || W.stop(), vt(!1), et && ($ == null || $.stop()), dt(!1), pa(), R = null, E = null, ne(!1), Ra(), le(!1), n.dialog.hidden = !0, n.stop.hidden = !0, Lt(), t && (mt = !1, Aa("onClose"));
5031
+ const t = vt;
5032
+ X == null || X.stop(), St(!1), it && (N == null || N.stop()), ht(!1), Ra(), x = null, L = null, fe(!1), Na(), ve(!1), r.dialog.hidden = !0, r.stop.hidden = !0, It(), t && (vt = !1, $a("onClose"));
4759
5033
  }
4760
- function Qs(t = "") {
4761
- const e = n.dialog, a = n.panel, o = n.panelBody, i = n.successMsg, s = n.successLink, r = String(t || "").trim(), l = !!(d.displayLink && r);
5034
+ function Dr(t = "") {
5035
+ const e = r.dialog, a = r.panel, o = r.panelBody, i = r.successMsg, n = r.successLink, s = String(t || "").trim(), l = !!(p.displayLink && s);
4762
5036
  if (!e || !a || !o || !i)
4763
5037
  return Promise.resolve(!1);
4764
- ht = !0, ft = l, S("");
4765
- const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, c = a.getBoundingClientRect();
4766
- if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", s && (l ? (s.hidden = !1, s.href = r) : (s.hidden = !0, s.removeAttribute("href"))), l) {
4767
- if (u)
5038
+ kt = !0, bt = l, z("");
5039
+ const c = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, d = a.getBoundingClientRect();
5040
+ if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", n && (l ? (n.hidden = !1, n.href = s) : (n.hidden = !0, n.removeAttribute("href"))), l) {
5041
+ if (c)
4768
5042
  return Promise.resolve(!0);
4769
- const w = a.getBoundingClientRect(), b = w.width > 0 ? c.width / w.width : 1, z = w.height > 0 ? c.height / w.height : 1;
4770
- return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${b}, ${z})`, a.getBoundingClientRect(), new Promise((j) => {
4771
- let T = !1;
4772
- const K = () => {
4773
- T || (T = !0, a.removeEventListener("transitionend", P), j(!0));
4774
- }, P = (m) => {
4775
- m.target !== a || m.propertyName !== "transform" || K();
5043
+ const A = a.getBoundingClientRect(), E = A.width > 0 ? d.width / A.width : 1, P = A.height > 0 ? d.height / A.height : 1;
5044
+ return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${E}, ${P})`, a.getBoundingClientRect(), new Promise((u) => {
5045
+ let h = !1;
5046
+ const R = () => {
5047
+ h || (h = !0, a.removeEventListener("transitionend", k), u(!0));
5048
+ }, k = (f) => {
5049
+ f.target !== a || f.propertyName !== "transform" || R();
4776
5050
  };
4777
- a.addEventListener("transitionend", P), requestAnimationFrame(() => {
5051
+ a.addEventListener("transitionend", k), requestAnimationFrame(() => {
4778
5052
  a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
4779
- }), window.setTimeout(K, 700);
5053
+ }), window.setTimeout(R, 700);
4780
5054
  });
4781
5055
  }
4782
- if (u)
4783
- return new Promise((w) => {
4784
- window.setTimeout(() => w(!1), 1e3);
5056
+ if (c)
5057
+ return new Promise((A) => {
5058
+ window.setTimeout(() => A(!1), 1e3);
4785
5059
  });
4786
- const g = a.getBoundingClientRect(), k = g.width > 0 ? c.width / g.width : 1, v = g.height > 0 ? c.height / g.height : 1;
4787
- return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${k}, ${v})`, a.getBoundingClientRect(), new Promise((w) => {
4788
- let b = !1;
4789
- const z = () => {
4790
- b || (b = !0, a.removeEventListener("transitionend", j), window.setTimeout(() => {
4791
- e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() => w(!1), 280);
5060
+ const m = a.getBoundingClientRect(), S = m.width > 0 ? d.width / m.width : 1, v = m.height > 0 ? d.height / m.height : 1;
5061
+ return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${S}, ${v})`, a.getBoundingClientRect(), new Promise((A) => {
5062
+ let E = !1;
5063
+ const P = () => {
5064
+ E || (E = !0, a.removeEventListener("transitionend", u), window.setTimeout(() => {
5065
+ e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() => A(!1), 280);
4792
5066
  }, 1e3));
4793
- }, j = (T) => {
4794
- T.target !== a || T.propertyName !== "transform" || z();
5067
+ }, u = (h) => {
5068
+ h.target !== a || h.propertyName !== "transform" || P();
4795
5069
  };
4796
- a.addEventListener("transitionend", j), requestAnimationFrame(() => {
5070
+ a.addEventListener("transitionend", u), requestAnimationFrame(() => {
4797
5071
  a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
4798
- }), window.setTimeout(z, 700);
5072
+ }), window.setTimeout(P, 700);
4799
5073
  });
4800
5074
  }
4801
- function Ra() {
4802
- ht = !1, ft = !1, n.dialog && (n.dialog.classList.remove("nf-success", "nf-success-sticky"), n.dialog.style.opacity = "", n.dialog.style.transition = "", n.panel && (n.panel.style.transform = "", n.panel.style.transition = "", n.panel.style.transformOrigin = ""), n.panelBody && (n.panelBody.hidden = !1), n.successMsg && (n.successMsg.hidden = !0), n.successLink && (n.successLink.hidden = !0, n.successLink.removeAttribute("href")));
5075
+ function Na() {
5076
+ kt = !1, bt = !1, r.dialog && (r.dialog.classList.remove("nf-success", "nf-success-sticky"), r.dialog.style.opacity = "", r.dialog.style.transition = "", r.panel && (r.panel.style.transform = "", r.panel.style.transition = "", r.panel.style.transformOrigin = ""), r.panelBody && (r.panelBody.hidden = !1), r.successMsg && (r.successMsg.hidden = !0), r.successLink && (r.successLink.hidden = !0, r.successLink.removeAttribute("href")));
4803
5077
  }
4804
- function tn(t = {}) {
4805
- H = { ...H, ...Pi(t) }, ba();
5078
+ function Ir(t = {}) {
5079
+ _ = { ..._, ...Hi(t) }, Ma();
4806
5080
  }
4807
- async function ja() {
5081
+ async function Ka() {
4808
5082
  var e, a;
4809
- if (ae(), Kt)
5083
+ if (de(), Zt)
4810
5084
  return null;
4811
- const t = n.text.value.trim();
4812
- if (!t && !V() && !G)
4813
- return S(p("status.emptyReport")), null;
4814
- if (!d.endpoint || !d.projectKey)
4815
- return S(p("status.missingConfig")), null;
4816
- Kt = !0, De(!0), S(p("status.submitting"), !0);
5085
+ const t = r.text.value.trim();
5086
+ if (!t && !B() && !G)
5087
+ return z(g("status.emptyReport")), null;
5088
+ if (!p.endpoint || !p.projectKey)
5089
+ return z(g("status.missingConfig")), null;
5090
+ Zt = !0, Ye(!0), z(g("status.submitting"), !0);
4817
5091
  try {
4818
- const o = Hs(), i = C.crop(), s = C.list(), r = C.isCropped(), l = r ? Ni(s, i) : s, u = r ? { x: 0, y: 0, w: 1, h: 1 } : i, c = os({
5092
+ const o = Ar(), i = j.crop(), n = j.list(), s = j.isCropped(), l = s ? bn(n, i) : n, c = s ? { x: 0, y: 0, w: 1, h: 1 } : i, d = Mn({
4819
5093
  author: o,
4820
- diagnostics: N,
4821
- logs: B
4822
- }), g = {
5094
+ diagnostics: H,
5095
+ logs: K
5096
+ }), m = {
4823
5097
  width: typeof screen < "u" ? screen.width : null,
4824
5098
  height: typeof screen < "u" ? screen.height : null,
4825
5099
  dpr: window.devicePixelRatio || 1
4826
- }, k = [];
4827
- let v = 2048, w = null, b = null;
4828
- V() && (b = await Ee(q, {
4829
- crop: r ? i : { x: 0, y: 0, w: 1, h: 1 },
5100
+ }, S = [];
5101
+ let v = 2048, A = null, E = null;
5102
+ B() && (E = await Ve(W, {
5103
+ crop: s ? i : { x: 0, y: 0, w: 1, h: 1 },
4830
5104
  maxEdge: v
4831
5105
  }));
4832
- for (let z = 1; z <= 3; z += 1) {
4833
- const j = z === 3 || !b, T = j ? {
4834
- ...b ? { width: b.width, height: b.height, mime: b.mime } : {},
4835
- attempt: z,
5106
+ for (let P = 1; P <= 3; P += 1) {
5107
+ const u = P === 3 || !E, h = u ? {
5108
+ ...E ? { width: E.width, height: E.height, mime: E.mime } : {},
5109
+ attempt: P,
4836
5110
  omitted: !0
4837
5111
  } : {
4838
- width: b.width,
4839
- height: b.height,
4840
- mime: b.mime,
4841
- attempt: z
4842
- }, K = {
4843
- ...c,
4844
- screen: g,
4845
- screenshotMeta: T
5112
+ width: E.width,
5113
+ height: E.height,
5114
+ mime: E.mime,
5115
+ attempt: P
5116
+ }, R = {
5117
+ ...d,
5118
+ screen: m,
5119
+ screenshotMeta: h
4846
5120
  };
4847
- j && V() && (K.screenshotError = {
4848
- message: (w == null ? void 0 : w.message) || "Screenshot omitted after failed uploads",
4849
- attempts: [...k]
5121
+ u && B() && (R.screenshotError = {
5122
+ message: (A == null ? void 0 : A.message) || "Screenshot omitted after failed uploads",
5123
+ attempts: [...S]
4850
5124
  });
4851
- const P = new FormData();
4852
- P.append("message", t), P.append("kind", _), P.append("version", d.version || "0.0.0"), P.append("author", o), d.name && P.append("name", d.name), P.append("context", JSON.stringify(K)), P.append("annotations", JSON.stringify(l)), P.append("crop", JSON.stringify(u)), Array.isArray(d.targets) && P.append("targets", JSON.stringify(d.targets)), !j && b && P.append("screenshot", b.blob, `screenshot.${b.ext}`), G && P.append("recording", G, "recording.webm");
5125
+ const k = new FormData();
5126
+ k.append("message", t), k.append("kind", q), k.append("version", p.version || "0.0.0"), k.append("author", o), p.name && k.append("name", p.name), k.append("context", JSON.stringify(R)), k.append("annotations", JSON.stringify(l)), k.append("crop", JSON.stringify(c)), Array.isArray(p.targets) && k.append("targets", JSON.stringify(p.targets)), !u && E && k.append("screenshot", E.blob, `screenshot.${E.ext}`), G && k.append("recording", G, "recording.webm");
4853
5127
  try {
4854
- const m = await fetch(`${d.endpoint}/v1/reports`, {
5128
+ const f = await fetch(`${p.endpoint}/v1/reports`, {
4855
5129
  method: "POST",
4856
5130
  headers: {
4857
- "X-Notefully-Key": d.projectKey
5131
+ "X-Notefully-Key": p.projectKey
4858
5132
  },
4859
- body: P
5133
+ body: k
4860
5134
  });
4861
- let A = null;
5135
+ let C = null;
4862
5136
  try {
4863
- A = await m.json();
5137
+ C = await f.json();
4864
5138
  } catch {
4865
- A = null;
5139
+ C = null;
4866
5140
  }
4867
- if (!m.ok) {
4868
- const ct = new Error((A == null ? void 0 : A.error) || `${p("status.submitFailed")} (${m.status})`);
4869
- throw ct.status = m.status, ct.code = A == null ? void 0 : A.code, ct.json = A, ct;
5141
+ if (!f.ok) {
5142
+ const Y = new Error((C == null ? void 0 : C.error) || `${g("status.submitFailed")} (${f.status})`);
5143
+ throw Y.status = f.status, Y.code = C == null ? void 0 : C.code, Y.json = C, Y;
4870
5144
  }
4871
- return j && V() && S(p("status.submitWithoutImage"), !0), await Qs((A == null ? void 0 : A.trackerUrl) || "") || at(), A;
4872
- } catch (m) {
4873
- if (w = m, k.push({
4874
- attempt: z,
4875
- maxEdge: j ? null : v,
4876
- status: (m == null ? void 0 : m.status) || null,
4877
- code: (m == null ? void 0 : m.code) || null,
4878
- message: String((m == null ? void 0 : m.message) || m)
4879
- }), j || !b)
4880
- throw S(((e = m == null ? void 0 : m.json) == null ? void 0 : e.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
4881
- if (!Wi(m, (m == null ? void 0 : m.json) || null))
4882
- throw S(((a = m == null ? void 0 : m.json) == null ? void 0 : a.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
4883
- if (z === 1) {
4884
- S(p("status.submitTooLarge"), !0), v = qi(v), b = await Ee(q, {
4885
- crop: r ? i : { x: 0, y: 0, w: 1, h: 1 },
5145
+ return u && B() && z(g("status.submitWithoutImage"), !0), await Dr((C == null ? void 0 : C.trackerUrl) || "") || nt(), C;
5146
+ } catch (f) {
5147
+ if (A = f, S.push({
5148
+ attempt: P,
5149
+ maxEdge: u ? null : v,
5150
+ status: (f == null ? void 0 : f.status) || null,
5151
+ code: (f == null ? void 0 : f.code) || null,
5152
+ message: String((f == null ? void 0 : f.message) || f)
5153
+ }), u || !E)
5154
+ throw z(((e = f == null ? void 0 : f.json) == null ? void 0 : e.error) || (f == null ? void 0 : f.message) || g("status.submitFailed")), f;
5155
+ if (!zn(f, (f == null ? void 0 : f.json) || null))
5156
+ throw z(((a = f == null ? void 0 : f.json) == null ? void 0 : a.error) || (f == null ? void 0 : f.message) || g("status.submitFailed")), f;
5157
+ if (P === 1) {
5158
+ z(g("status.submitTooLarge"), !0), v = En(v), E = await Ve(W, {
5159
+ crop: s ? i : { x: 0, y: 0, w: 1, h: 1 },
4886
5160
  maxEdge: v
4887
5161
  });
4888
5162
  continue;
4889
5163
  }
4890
- S(p("status.submitTooLarge"), !0), b = null;
5164
+ z(g("status.submitTooLarge"), !0), E = null;
4891
5165
  }
4892
5166
  }
4893
- throw w || new Error(p("status.submitFailed"));
5167
+ throw A || new Error(g("status.submitFailed"));
4894
5168
  } finally {
4895
- Kt = !1, De(!1);
5169
+ Zt = !1, Ye(!1);
4896
5170
  }
4897
5171
  }
4898
- function De(t) {
4899
- n.submit && (n.submit.disabled = !!t, n.submit.setAttribute("aria-busy", t ? "true" : "false"));
4900
- }
4901
- function en() {
4902
- at(), document.removeEventListener("keydown", Sa), f == null || f.remove(), f = null, n = {};
4903
- }
4904
- const It = {
4905
- init: Ws,
4906
- configure: re,
4907
- setTheme: Zs,
4908
- setVisible: Ys,
4909
- open: Ea,
4910
- close: at,
4911
- isOpen: Gs,
4912
- getLocale: _s,
4913
- setLocale: qs,
4914
- identify: tn,
4915
- submit: ja,
4916
- destroy: en
5172
+ function Ye(t) {
5173
+ r.submit && (r.submit.disabled = !!t, r.submit.setAttribute("aria-busy", t ? "true" : "false"));
5174
+ }
5175
+ function Or() {
5176
+ nt(), document.removeEventListener("keydown", Ia), b == null || b.remove(), b = null, r = {}, ot.unhook();
5177
+ }
5178
+ const Ht = {
5179
+ init: xr,
5180
+ configure: ye,
5181
+ setTheme: Ur,
5182
+ setVisible: Tr,
5183
+ open: Ba,
5184
+ close: nt,
5185
+ isOpen: jr,
5186
+ getLocale: Pr,
5187
+ setLocale: Lr,
5188
+ identify: Ir,
5189
+ log: Rr,
5190
+ submit: Ka,
5191
+ destroy: Or
4917
5192
  };
4918
- typeof window < "u" && (window.Notefully = It);
5193
+ typeof window < "u" && (window.Notefully = Ht);
4919
5194
  export {
4920
- at as close,
4921
- re as configure,
4922
- It as default,
4923
- en as destroy,
4924
- _s as getLocaleTag,
4925
- tn as identify,
4926
- Ws as init,
4927
- Gs as isOpen,
4928
- Ea as open,
4929
- qs as setLocale,
4930
- Zs as setTheme,
4931
- Ys as setVisible,
4932
- ja as submit
5195
+ nt as close,
5196
+ ye as configure,
5197
+ Ht as default,
5198
+ Or as destroy,
5199
+ Pr as getLocaleTag,
5200
+ Ir as identify,
5201
+ xr as init,
5202
+ jr as isOpen,
5203
+ Rr as log,
5204
+ Ba as open,
5205
+ Lr as setLocale,
5206
+ Ur as setTheme,
5207
+ Tr as setVisible,
5208
+ Ka as submit
4933
5209
  };