@makefully/notefully 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/notefully.js CHANGED
@@ -63,7 +63,7 @@ const me = {
63
63
  tl: "fil",
64
64
  "zh-Hans": "zh-CN",
65
65
  "zh-Hant": "zh-TW"
66
- }, ga = {
66
+ }, va = {
67
67
  "es-MX": ["es-419", "es"],
68
68
  "es-AR": ["es-419", "es"],
69
69
  "es-CL": ["es-419", "es"],
@@ -83,31 +83,31 @@ const me = {
83
83
  "es-DO": ["es-419", "es"],
84
84
  "es-PR": ["es-419", "es"],
85
85
  "es-CU": ["es-419", "es"]
86
- }, ma = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
87
- let le = "en-US", Ct = {};
86
+ }, ka = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
87
+ let le = "en-US", Pt = {};
88
88
  function h(e, t) {
89
89
  !e || !t || typeof t != "object" || (he[String(e)] = t);
90
90
  }
91
91
  function oe(e) {
92
92
  return String(e || "").trim().replace(/_/g, "-");
93
93
  }
94
- function ha(e) {
94
+ function ba(e) {
95
95
  const t = oe(e);
96
96
  if (!t)
97
97
  return ["en-US"];
98
- const a = t, o = Te[a] || Te[a.toLowerCase()] || a, r = [], i = (l) => {
99
- l && !r.includes(l) && r.push(l);
98
+ const a = t, o = Te[a] || Te[a.toLowerCase()] || a, s = [], i = (n) => {
99
+ n && !s.includes(n) && s.push(n);
100
100
  };
101
101
  i(o);
102
- for (const [l, u] of Object.entries(ga))
103
- l.toLowerCase() === o.toLowerCase() && u.forEach(i);
104
- const s = o.split("-");
105
- for (let l = s.length - 1; l >= 1; l -= 1)
106
- i(s.slice(0, l).join("-"));
107
- return i(Te[s[0]] || s[0]), i("en-US"), r;
108
- }
109
- function fa(e) {
110
- for (const t of ha(e)) {
102
+ for (const [n, u] of Object.entries(va))
103
+ n.toLowerCase() === o.toLowerCase() && u.forEach(i);
104
+ const r = o.split("-");
105
+ for (let n = r.length - 1; n >= 1; n -= 1)
106
+ i(r.slice(0, n).join("-"));
107
+ return i(Te[r[0]] || r[0]), i("en-US"), s;
108
+ }
109
+ function wa(e) {
110
+ for (const t of ba(e)) {
111
111
  if (he[t])
112
112
  return t;
113
113
  const a = Object.keys(he).find(
@@ -118,7 +118,7 @@ function fa(e) {
118
118
  }
119
119
  return "en-US";
120
120
  }
121
- function ya(e = {}) {
121
+ function Sa(e = {}) {
122
122
  var t;
123
123
  if (e.locale != null && String(e.locale).trim())
124
124
  return oe(e.locale);
@@ -129,25 +129,25 @@ function ya(e = {}) {
129
129
  }
130
130
  return typeof navigator < "u" && navigator.language ? oe(navigator.language) : "en-US";
131
131
  }
132
- function va(e, t) {
132
+ function Aa(e, t) {
133
133
  return e != null && (le = oe(e) || "en-US"), le;
134
134
  }
135
- function ka(e) {
136
- Ct = e && typeof e == "object" ? { ...e } : {};
135
+ function Ca(e) {
136
+ Pt = e && typeof e == "object" ? { ...e } : {};
137
137
  }
138
138
  function fe() {
139
139
  return le;
140
140
  }
141
- function ba(e = le) {
141
+ function za(e = le) {
142
142
  const t = oe(e).split("-")[0].toLowerCase();
143
- return ma.has(t) ? "rtl" : "ltr";
143
+ return ka.has(t) ? "rtl" : "ltr";
144
144
  }
145
145
  function m(e, t) {
146
- const a = String(e || ""), o = fa(le), r = he[o] || me;
147
- let i = Ct[a] ?? r[a] ?? me[a] ?? a;
146
+ const a = String(e || ""), o = wa(le), s = he[o] || me;
147
+ let i = Pt[a] ?? s[a] ?? me[a] ?? a;
148
148
  return String(i);
149
149
  }
150
- const wa = {
150
+ const ja = {
151
151
  "launcher.open": "Оставете бележка...",
152
152
  "tool.crop": "Реколта",
153
153
  "tool.resetCrop": "Нулиране на изрязването",
@@ -204,7 +204,7 @@ const wa = {
204
204
  "diag.timezone": "Часова зона",
205
205
  "diag.viewport": "Изгледна плоча",
206
206
  "diag.user": "Потребител"
207
- }, Sa = {
207
+ }, Ea = {
208
208
  "launcher.open": "Deixa una nota...",
209
209
  "tool.crop": "Cultiu",
210
210
  "tool.resetCrop": "Restablir el cultiu",
@@ -261,7 +261,7 @@ const wa = {
261
261
  "diag.timezone": "Zona horària",
262
262
  "diag.viewport": "Porta de vista",
263
263
  "diag.user": "Usuari"
264
- }, Aa = {
264
+ }, Ra = {
265
265
  "launcher.open": "Zanechte poznámku...",
266
266
  "tool.crop": "Oříznout",
267
267
  "tool.resetCrop": "Obnovit oříznutí",
@@ -318,7 +318,7 @@ const wa = {
318
318
  "diag.timezone": "Časové pásmo",
319
319
  "diag.viewport": "Výřez",
320
320
  "diag.user": "Uživatel"
321
- }, za = {
321
+ }, Pa = {
322
322
  "launcher.open": "Efterlad en note...",
323
323
  "tool.crop": "Afgrøde",
324
324
  "tool.resetCrop": "Nulstil afgrøde",
@@ -375,7 +375,7 @@ const wa = {
375
375
  "diag.timezone": "Tidszone",
376
376
  "diag.viewport": "Viewport",
377
377
  "diag.user": "Bruger"
378
- }, Ca = {
378
+ }, La = {
379
379
  "launcher.open": "Hinterlassen Sie eine Notiz...",
380
380
  "tool.crop": "Ernte",
381
381
  "tool.resetCrop": "Zuschnitt zurücksetzen",
@@ -432,7 +432,7 @@ const wa = {
432
432
  "diag.timezone": "Zeitzone",
433
433
  "diag.viewport": "Sichtfenster",
434
434
  "diag.user": "Nutzer"
435
- }, ja = {
435
+ }, xa = {
436
436
  "launcher.open": "Αφήστε ένα σημείωμα...",
437
437
  "tool.crop": "Καλλιέργεια",
438
438
  "tool.resetCrop": "Επαναφορά της καλλιέργειας",
@@ -489,7 +489,7 @@ const wa = {
489
489
  "diag.timezone": "Ζώνη ώρας",
490
490
  "diag.viewport": "Θύρα προβολής",
491
491
  "diag.user": "Χρήστης"
492
- }, Ea = {
492
+ }, Ua = {
493
493
  "launcher.open": "Leave a note…",
494
494
  "tool.crop": "Crop",
495
495
  "tool.resetCrop": "Reset crop",
@@ -546,7 +546,7 @@ const wa = {
546
546
  "diag.timezone": "Timezone",
547
547
  "diag.viewport": "Viewport",
548
548
  "diag.user": "User"
549
- }, Ra = {
549
+ }, Ta = {
550
550
  "launcher.open": "Deja una nota...",
551
551
  "tool.crop": "Cultivo",
552
552
  "tool.resetCrop": "Restablecer cultivo",
@@ -603,7 +603,7 @@ const wa = {
603
603
  "diag.timezone": "Zona horaria",
604
604
  "diag.viewport": "Ventana",
605
605
  "diag.user": "Usuario"
606
- }, Pa = {
606
+ }, Fa = {
607
607
  "launcher.open": "Deja una nota...",
608
608
  "tool.crop": "Cultivo",
609
609
  "tool.resetCrop": "Restablecer recorte",
@@ -660,7 +660,7 @@ const wa = {
660
660
  "diag.timezone": "Zona horaria",
661
661
  "diag.viewport": "ViEWPORT",
662
662
  "diag.user": "Usuario"
663
- }, La = {
663
+ }, Oa = {
664
664
  "launcher.open": "Jäta märkus...",
665
665
  "tool.crop": "Põllukultuur",
666
666
  "tool.resetCrop": "Lähtesta põllukultuur",
@@ -717,7 +717,7 @@ const wa = {
717
717
  "diag.timezone": "Ajavöönd",
718
718
  "diag.viewport": "Vaatenurk",
719
719
  "diag.user": "Kasutaja"
720
- }, xa = {
720
+ }, Da = {
721
721
  "launcher.open": "Jätä muistiinpano...",
722
722
  "tool.crop": "Viljely",
723
723
  "tool.resetCrop": "Nollaa rajaus",
@@ -774,7 +774,7 @@ const wa = {
774
774
  "diag.timezone": "Aikavyöhyke",
775
775
  "diag.viewport": "Näyttöikkuna",
776
776
  "diag.user": "Käyttäjä"
777
- }, Ua = {
777
+ }, Ma = {
778
778
  "launcher.open": "Laissez un message...",
779
779
  "tool.crop": "Récolte",
780
780
  "tool.resetCrop": "Réinitialiser la récolte",
@@ -831,7 +831,7 @@ const wa = {
831
831
  "diag.timezone": "Fuseau horaire",
832
832
  "diag.viewport": "Viewport",
833
833
  "diag.user": "Utilisateur"
834
- }, Ta = {
834
+ }, Ia = {
835
835
  "launcher.open": "एक नोट छोड़ें...",
836
836
  "tool.crop": "क्रॉप",
837
837
  "tool.resetCrop": "क्रॉप रीसेट करें",
@@ -888,7 +888,7 @@ const wa = {
888
888
  "diag.timezone": "टाइमज़ोन",
889
889
  "diag.viewport": "व्यूपोर्ट",
890
890
  "diag.user": "यूज़र"
891
- }, Fa = {
891
+ }, Va = {
892
892
  "launcher.open": "Ostavite poruku...",
893
893
  "tool.crop": "Usjev",
894
894
  "tool.resetCrop": "Resetirajte obrezivanje",
@@ -945,7 +945,7 @@ const wa = {
945
945
  "diag.timezone": "Vremenska zona",
946
946
  "diag.viewport": "Prikaznica",
947
947
  "diag.user": "Korisnik"
948
- }, Oa = {
948
+ }, $a = {
949
949
  "launcher.open": "Hagyjon egy jegyzetet...",
950
950
  "tool.crop": "Termés",
951
951
  "tool.resetCrop": "Vágás visszaállítása",
@@ -1002,7 +1002,7 @@ const wa = {
1002
1002
  "diag.timezone": "Időzóna",
1003
1003
  "diag.viewport": "Nézetablak",
1004
1004
  "diag.user": "Felhasználó"
1005
- }, Da = {
1005
+ }, Ba = {
1006
1006
  "launcher.open": "Tinggalkan catatan...",
1007
1007
  "tool.crop": "Panas",
1008
1008
  "tool.resetCrop": "Setel ulang tanaman",
@@ -1059,7 +1059,7 @@ const wa = {
1059
1059
  "diag.timezone": "Zona Waktu",
1060
1060
  "diag.viewport": "Pintu pandang",
1061
1061
  "diag.user": "Pengguna"
1062
- }, Ma = {
1062
+ }, Na = {
1063
1063
  "launcher.open": "Lascia una nota...",
1064
1064
  "tool.crop": "Ritaglia",
1065
1065
  "tool.resetCrop": "Reimposta il ritaglio",
@@ -1116,7 +1116,7 @@ const wa = {
1116
1116
  "diag.timezone": "Fuso orario",
1117
1117
  "diag.viewport": "Viewport",
1118
1118
  "diag.user": "Utente"
1119
- }, Ia = {
1119
+ }, Ka = {
1120
1120
  "launcher.open": "メモを残してください...",
1121
1121
  "tool.crop": "クロップ",
1122
1122
  "tool.resetCrop": "トリミングをリセット",
@@ -1173,7 +1173,7 @@ const wa = {
1173
1173
  "diag.timezone": "タイムゾーン",
1174
1174
  "diag.viewport": "ビューポート",
1175
1175
  "diag.user": "ユーザ"
1176
- }, Va = {
1176
+ }, Ha = {
1177
1177
  "launcher.open": "메모 남기기...",
1178
1178
  "tool.crop": "크롭",
1179
1179
  "tool.resetCrop": "크롭 재설정",
@@ -1230,7 +1230,7 @@ const wa = {
1230
1230
  "diag.timezone": "타임존",
1231
1231
  "diag.viewport": "뷰포트",
1232
1232
  "diag.user": "사용자"
1233
- }, $a = {
1233
+ }, Ga = {
1234
1234
  "launcher.open": "Palikite pastabą...",
1235
1235
  "tool.crop": "Apkarpyti",
1236
1236
  "tool.resetCrop": "Iš naujo nustatyti apkarpymą",
@@ -1287,7 +1287,7 @@ const wa = {
1287
1287
  "diag.timezone": "Laiko juosta",
1288
1288
  "diag.viewport": "Peržiūros sritis",
1289
1289
  "diag.user": "Vartotojas"
1290
- }, Ba = {
1290
+ }, qa = {
1291
1291
  "launcher.open": "Atstājiet piezīmi...",
1292
1292
  "tool.crop": "Kultūraugs",
1293
1293
  "tool.resetCrop": "Atiestatīt apgriešanu",
@@ -1344,7 +1344,7 @@ const wa = {
1344
1344
  "diag.timezone": "Laika josla",
1345
1345
  "diag.viewport": "Skatu laukums",
1346
1346
  "diag.user": "Lietotājs"
1347
- }, Na = {
1347
+ }, _a = {
1348
1348
  "launcher.open": "Legg igjen et notat...",
1349
1349
  "tool.crop": "Beskjæring",
1350
1350
  "tool.resetCrop": "Tilbakestill beskjæring",
@@ -1401,7 +1401,7 @@ const wa = {
1401
1401
  "diag.timezone": "Tidssone",
1402
1402
  "diag.viewport": "Visningsport",
1403
1403
  "diag.user": "Bruker"
1404
- }, Ka = {
1404
+ }, Wa = {
1405
1405
  "launcher.open": "Laat een briefje achter...",
1406
1406
  "tool.crop": "Gewas",
1407
1407
  "tool.resetCrop": "Bijsnijden opnieuw instellen",
@@ -1458,7 +1458,7 @@ const wa = {
1458
1458
  "diag.timezone": "Tijdzone",
1459
1459
  "diag.viewport": "Viewport",
1460
1460
  "diag.user": "Gebruiker"
1461
- }, Ha = {
1461
+ }, Za = {
1462
1462
  "launcher.open": "Zostaw notatkę...",
1463
1463
  "tool.crop": "Uprawa",
1464
1464
  "tool.resetCrop": "Resetuj kadrowanie",
@@ -1515,7 +1515,7 @@ const wa = {
1515
1515
  "diag.timezone": "Strefa czasowa",
1516
1516
  "diag.viewport": "rzutnia",
1517
1517
  "diag.user": "Użytkownik"
1518
- }, Ga = {
1518
+ }, Ja = {
1519
1519
  "launcher.open": "Deixe uma nota...",
1520
1520
  "tool.crop": "Colheita",
1521
1521
  "tool.resetCrop": "Redefinir o corte",
@@ -1572,7 +1572,7 @@ const wa = {
1572
1572
  "diag.timezone": "Fuso horário",
1573
1573
  "diag.viewport": "Janela de visualização",
1574
1574
  "diag.user": "Usuário"
1575
- }, qa = {
1575
+ }, Ya = {
1576
1576
  "launcher.open": "Deixe uma nota...",
1577
1577
  "tool.crop": "Colheita",
1578
1578
  "tool.resetCrop": "Redefinir o recorte",
@@ -1629,7 +1629,7 @@ const wa = {
1629
1629
  "diag.timezone": "Fuso horário",
1630
1630
  "diag.viewport": "Viewport",
1631
1631
  "diag.user": "Utilizador"
1632
- }, _a = {
1632
+ }, Xa = {
1633
1633
  "launcher.open": "Lăsați o notă...",
1634
1634
  "tool.crop": "Cultură",
1635
1635
  "tool.resetCrop": "Resetați recolta",
@@ -1686,7 +1686,7 @@ const wa = {
1686
1686
  "diag.timezone": "Fus orar",
1687
1687
  "diag.viewport": "Portul de vizualizare",
1688
1688
  "diag.user": "Utilizator"
1689
- }, Wa = {
1689
+ }, Qa = {
1690
1690
  "launcher.open": "Оставьте заметку...",
1691
1691
  "tool.crop": "урожай",
1692
1692
  "tool.resetCrop": "Сбросить урожай",
@@ -1743,7 +1743,7 @@ const wa = {
1743
1743
  "diag.timezone": "Часовой пояс",
1744
1744
  "diag.viewport": "окно просмотра",
1745
1745
  "diag.user": "Пользователь"
1746
- }, Za = {
1746
+ }, eo = {
1747
1747
  "launcher.open": "Zanechať poznámku...",
1748
1748
  "tool.crop": "Oplodina",
1749
1749
  "tool.resetCrop": "Obnoviť orezanie",
@@ -1800,7 +1800,7 @@ const wa = {
1800
1800
  "diag.timezone": "Časové pásmo",
1801
1801
  "diag.viewport": "Zobrazenie",
1802
1802
  "diag.user": "Používateľ"
1803
- }, Ja = {
1803
+ }, to = {
1804
1804
  "launcher.open": "Pustite opombo...",
1805
1805
  "tool.crop": "Pridelek",
1806
1806
  "tool.resetCrop": "Ponastavi obrezovanje",
@@ -1857,7 +1857,7 @@ const wa = {
1857
1857
  "diag.timezone": "Časovni pas",
1858
1858
  "diag.viewport": "Razgledna plošča",
1859
1859
  "diag.user": "Uporabnik"
1860
- }, Ya = {
1860
+ }, ao = {
1861
1861
  "launcher.open": "Ostavite belešku...",
1862
1862
  "tool.crop": "Usjev",
1863
1863
  "tool.resetCrop": "Resetujte usev",
@@ -1914,7 +1914,7 @@ const wa = {
1914
1914
  "diag.timezone": "Vremenska zona",
1915
1915
  "diag.viewport": "Viedport",
1916
1916
  "diag.user": "Korisnik"
1917
- }, Xa = {
1917
+ }, oo = {
1918
1918
  "launcher.open": "Lämna en anteckning...",
1919
1919
  "tool.crop": "Skörda",
1920
1920
  "tool.resetCrop": "Återställ beskärning",
@@ -1971,7 +1971,7 @@ const wa = {
1971
1971
  "diag.timezone": "Tidszon",
1972
1972
  "diag.viewport": "Viewport",
1973
1973
  "diag.user": "Användare"
1974
- }, Qa = {
1974
+ }, io = {
1975
1975
  "launcher.open": "Mag-iwan ng tala...",
1976
1976
  "tool.crop": "Pag-ani",
1977
1977
  "tool.resetCrop": "I-reset ang panani",
@@ -2028,7 +2028,7 @@ const wa = {
2028
2028
  "diag.timezone": "Timesone",
2029
2029
  "diag.viewport": "Viewport",
2030
2030
  "diag.user": "Gumagamit"
2031
- }, eo = {
2031
+ }, so = {
2032
2032
  "launcher.open": "ทิ้งหมายเหตุ...",
2033
2033
  "tool.crop": "พืชผล",
2034
2034
  "tool.resetCrop": "รีเซ็ตการตัดพืช",
@@ -2085,7 +2085,7 @@ const wa = {
2085
2085
  "diag.timezone": "เขตเวลา",
2086
2086
  "diag.viewport": "พอร์ตมุมมอง",
2087
2087
  "diag.user": "ผู้ใช้"
2088
- }, to = {
2088
+ }, ro = {
2089
2089
  "launcher.open": "Bir not bırakın...",
2090
2090
  "tool.crop": "Mahsul",
2091
2091
  "tool.resetCrop": "Kırpmayı sıfırla",
@@ -2142,7 +2142,7 @@ const wa = {
2142
2142
  "diag.timezone": "Saat dilimi",
2143
2143
  "diag.viewport": "Görünüm noktası",
2144
2144
  "diag.user": "Kullanıcı"
2145
- }, ao = {
2145
+ }, no = {
2146
2146
  "launcher.open": "Залиште записку...",
2147
2147
  "tool.crop": "Урожай",
2148
2148
  "tool.resetCrop": "Скинути обрізку",
@@ -2199,7 +2199,7 @@ const wa = {
2199
2199
  "diag.timezone": "Часовий пояс",
2200
2200
  "diag.viewport": "Вигляд",
2201
2201
  "diag.user": "Користувач"
2202
- }, oo = {
2202
+ }, lo = {
2203
2203
  "launcher.open": "Để lại một ghi chú...",
2204
2204
  "tool.crop": "Cây trồng",
2205
2205
  "tool.resetCrop": "Đặt lại cây trồng",
@@ -2256,7 +2256,7 @@ const wa = {
2256
2256
  "diag.timezone": "Múi giờ",
2257
2257
  "diag.viewport": "Cổng quan sát",
2258
2258
  "diag.user": "Người dùng"
2259
- }, io = {
2259
+ }, uo = {
2260
2260
  "launcher.open": "留个笔记...",
2261
2261
  "tool.crop": "作物",
2262
2262
  "tool.resetCrop": "重置裁剪",
@@ -2313,7 +2313,7 @@ const wa = {
2313
2313
  "diag.timezone": "时区",
2314
2314
  "diag.viewport": "视口",
2315
2315
  "diag.user": "用户"
2316
- }, ro = {
2316
+ }, co = {
2317
2317
  "launcher.open": "留下筆記...",
2318
2318
  "tool.crop": "作物",
2319
2319
  "tool.resetCrop": "重設裁切",
@@ -2372,56 +2372,56 @@ const wa = {
2372
2372
  "diag.user": "使用者"
2373
2373
  };
2374
2374
  h("en-US", me);
2375
- h("bg", wa);
2376
- h("ca", Sa);
2377
- h("cs", Aa);
2378
- h("da", za);
2379
- h("de", Ca);
2380
- h("el", ja);
2381
- h("en-GB", Ea);
2382
- h("es", Ra);
2383
- h("es-419", Pa);
2384
- h("et", La);
2385
- h("fi", xa);
2386
- h("fr", Ua);
2387
- h("hi", Ta);
2388
- h("hr", Fa);
2389
- h("hu", Oa);
2390
- h("id", Da);
2391
- h("it", Ma);
2392
- h("ja", Ia);
2393
- h("ko", Va);
2394
- h("lt", $a);
2395
- h("lv", Ba);
2396
- h("nb", Na);
2397
- h("nl", Ka);
2398
- h("pl", Ha);
2399
- h("pt-BR", Ga);
2400
- h("pt-PT", qa);
2401
- h("ro", _a);
2402
- h("ru", Wa);
2403
- h("sk", Za);
2404
- h("sl", Ja);
2405
- h("sr", Ya);
2406
- h("sv", Xa);
2407
- h("fil", Qa);
2408
- h("th", eo);
2409
- h("tr", to);
2410
- h("uk", ao);
2411
- h("vi", oo);
2412
- h("zh-CN", io);
2413
- h("zh-TW", ro);
2414
- function so(e, t) {
2375
+ h("bg", ja);
2376
+ h("ca", Ea);
2377
+ h("cs", Ra);
2378
+ h("da", Pa);
2379
+ h("de", La);
2380
+ h("el", xa);
2381
+ h("en-GB", Ua);
2382
+ h("es", Ta);
2383
+ h("es-419", Fa);
2384
+ h("et", Oa);
2385
+ h("fi", Da);
2386
+ h("fr", Ma);
2387
+ h("hi", Ia);
2388
+ h("hr", Va);
2389
+ h("hu", $a);
2390
+ h("id", Ba);
2391
+ h("it", Na);
2392
+ h("ja", Ka);
2393
+ h("ko", Ha);
2394
+ h("lt", Ga);
2395
+ h("lv", qa);
2396
+ h("nb", _a);
2397
+ h("nl", Wa);
2398
+ h("pl", Za);
2399
+ h("pt-BR", Ja);
2400
+ h("pt-PT", Ya);
2401
+ h("ro", Xa);
2402
+ h("ru", Qa);
2403
+ h("sk", eo);
2404
+ h("sl", to);
2405
+ h("sr", ao);
2406
+ h("sv", oo);
2407
+ h("fil", io);
2408
+ h("th", so);
2409
+ h("tr", ro);
2410
+ h("uk", no);
2411
+ h("vi", lo);
2412
+ h("zh-CN", uo);
2413
+ h("zh-TW", co);
2414
+ function po(e, t) {
2415
2415
  if (e.match(/^[a-z]+:\/\//i))
2416
2416
  return e;
2417
2417
  if (e.match(/^\/\//))
2418
2418
  return window.location.protocol + e;
2419
2419
  if (e.match(/^[a-z]+:/i))
2420
2420
  return e;
2421
- const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), r = a.createElement("a");
2422
- return a.head.appendChild(o), a.body.appendChild(r), t && (o.href = t), r.href = e, r.href;
2421
+ const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), s = a.createElement("a");
2422
+ return a.head.appendChild(o), a.body.appendChild(s), t && (o.href = t), s.href = e, s.href;
2423
2423
  }
2424
- const no = /* @__PURE__ */ (() => {
2424
+ const go = /* @__PURE__ */ (() => {
2425
2425
  let e = 0;
2426
2426
  const t = () => (
2427
2427
  // eslint-disable-next-line no-bitwise
@@ -2436,26 +2436,26 @@ function G(e) {
2436
2436
  return t;
2437
2437
  }
2438
2438
  let te = null;
2439
- function jt(e = {}) {
2439
+ function Lt(e = {}) {
2440
2440
  return te || (e.includeStyleProperties ? (te = e.includeStyleProperties, te) : (te = G(window.getComputedStyle(document.documentElement)), te));
2441
2441
  }
2442
2442
  function ye(e, t) {
2443
2443
  const o = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
2444
2444
  return o ? parseFloat(o.replace("px", "")) : 0;
2445
2445
  }
2446
- function lo(e) {
2446
+ function mo(e) {
2447
2447
  const t = ye(e, "border-left-width"), a = ye(e, "border-right-width");
2448
2448
  return e.clientWidth + t + a;
2449
2449
  }
2450
- function uo(e) {
2450
+ function ho(e) {
2451
2451
  const t = ye(e, "border-top-width"), a = ye(e, "border-bottom-width");
2452
2452
  return e.clientHeight + t + a;
2453
2453
  }
2454
- function Et(e, t = {}) {
2455
- const a = t.width || lo(e), o = t.height || uo(e);
2454
+ function xt(e, t = {}) {
2455
+ const a = t.width || mo(e), o = t.height || ho(e);
2456
2456
  return { width: a, height: o };
2457
2457
  }
2458
- function co() {
2458
+ function fo() {
2459
2459
  let e, t;
2460
2460
  try {
2461
2461
  t = process;
@@ -2465,7 +2465,7 @@ function co() {
2465
2465
  return a && (e = parseInt(a, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
2466
2466
  }
2467
2467
  const R = 16384;
2468
- function po(e) {
2468
+ function yo(e) {
2469
2469
  (e.width > R || e.height > R) && (e.width > R && e.height > R ? e.width > e.height ? (e.height *= R / e.width, e.width = R) : (e.width *= R / e.height, e.height = R) : e.width > R ? (e.height *= R / e.width, e.width = R) : (e.width *= R / e.height, e.height = R));
2470
2470
  }
2471
2471
  function ve(e) {
@@ -2478,12 +2478,12 @@ function ve(e) {
2478
2478
  }, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = e;
2479
2479
  });
2480
2480
  }
2481
- async function go(e) {
2481
+ async function vo(e) {
2482
2482
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
2483
2483
  }
2484
- async function mo(e, t, a) {
2485
- const o = "http://www.w3.org/2000/svg", r = document.createElementNS(o, "svg"), i = document.createElementNS(o, "foreignObject");
2486
- return r.setAttribute("width", `${t}`), r.setAttribute("height", `${a}`), r.setAttribute("viewBox", `0 0 ${t} ${a}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), r.appendChild(i), i.appendChild(e), go(r);
2484
+ async function ko(e, t, a) {
2485
+ const o = "http://www.w3.org/2000/svg", s = document.createElementNS(o, "svg"), i = document.createElementNS(o, "foreignObject");
2486
+ return s.setAttribute("width", `${t}`), s.setAttribute("height", `${a}`), s.setAttribute("viewBox", `0 0 ${t} ${a}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), s.appendChild(i), i.appendChild(e), vo(s);
2487
2487
  }
2488
2488
  const j = (e, t) => {
2489
2489
  if (e instanceof t)
@@ -2491,118 +2491,118 @@ const j = (e, t) => {
2491
2491
  const a = Object.getPrototypeOf(e);
2492
2492
  return a === null ? !1 : a.constructor.name === t.name || j(a, t);
2493
2493
  };
2494
- function ho(e) {
2494
+ function bo(e) {
2495
2495
  const t = e.getPropertyValue("content");
2496
2496
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
2497
2497
  }
2498
- function fo(e, t) {
2499
- return jt(t).map((a) => {
2500
- const o = e.getPropertyValue(a), r = e.getPropertyPriority(a);
2501
- return `${a}: ${o}${r ? " !important" : ""};`;
2498
+ function wo(e, t) {
2499
+ return Lt(t).map((a) => {
2500
+ const o = e.getPropertyValue(a), s = e.getPropertyPriority(a);
2501
+ return `${a}: ${o}${s ? " !important" : ""};`;
2502
2502
  }).join(" ");
2503
2503
  }
2504
- function yo(e, t, a, o) {
2505
- const r = `.${e}:${t}`, i = a.cssText ? ho(a) : fo(a, o);
2506
- return document.createTextNode(`${r}{${i}}`);
2504
+ function So(e, t, a, o) {
2505
+ const s = `.${e}:${t}`, i = a.cssText ? bo(a) : wo(a, o);
2506
+ return document.createTextNode(`${s}{${i}}`);
2507
2507
  }
2508
- function it(e, t, a, o) {
2509
- const r = window.getComputedStyle(e, a), i = r.getPropertyValue("content");
2508
+ function st(e, t, a, o) {
2509
+ const s = window.getComputedStyle(e, a), i = s.getPropertyValue("content");
2510
2510
  if (i === "" || i === "none")
2511
2511
  return;
2512
- const s = no();
2512
+ const r = go();
2513
2513
  try {
2514
- t.className = `${t.className} ${s}`;
2514
+ t.className = `${t.className} ${r}`;
2515
2515
  } catch {
2516
2516
  return;
2517
2517
  }
2518
- const l = document.createElement("style");
2519
- l.appendChild(yo(s, a, r, o)), t.appendChild(l);
2518
+ const n = document.createElement("style");
2519
+ n.appendChild(So(r, a, s, o)), t.appendChild(n);
2520
2520
  }
2521
- function vo(e, t, a) {
2522
- it(e, t, ":before", a), it(e, t, ":after", a);
2521
+ function Ao(e, t, a) {
2522
+ st(e, t, ":before", a), st(e, t, ":after", a);
2523
2523
  }
2524
- const rt = "application/font-woff", st = "image/jpeg", ko = {
2524
+ const rt = "application/font-woff", nt = "image/jpeg", Co = {
2525
2525
  woff: rt,
2526
2526
  woff2: rt,
2527
2527
  ttf: "application/font-truetype",
2528
2528
  eot: "application/vnd.ms-fontobject",
2529
2529
  png: "image/png",
2530
- jpg: st,
2531
- jpeg: st,
2530
+ jpg: nt,
2531
+ jpeg: nt,
2532
2532
  gif: "image/gif",
2533
2533
  tiff: "image/tiff",
2534
2534
  svg: "image/svg+xml",
2535
2535
  webp: "image/webp"
2536
2536
  };
2537
- function bo(e) {
2537
+ function zo(e) {
2538
2538
  const t = /\.([^./]*?)$/g.exec(e);
2539
2539
  return t ? t[1] : "";
2540
2540
  }
2541
2541
  function We(e) {
2542
- const t = bo(e).toLowerCase();
2543
- return ko[t] || "";
2542
+ const t = zo(e).toLowerCase();
2543
+ return Co[t] || "";
2544
2544
  }
2545
- function wo(e) {
2545
+ function jo(e) {
2546
2546
  return e.split(/,/)[1];
2547
2547
  }
2548
2548
  function $e(e) {
2549
2549
  return e.search(/^(data:)/) !== -1;
2550
2550
  }
2551
- function So(e, t) {
2551
+ function Eo(e, t) {
2552
2552
  return `data:${t};base64,${e}`;
2553
2553
  }
2554
- async function Rt(e, t, a) {
2554
+ async function Ut(e, t, a) {
2555
2555
  const o = await fetch(e, t);
2556
2556
  if (o.status === 404)
2557
2557
  throw new Error(`Resource "${o.url}" not found`);
2558
- const r = await o.blob();
2559
- return new Promise((i, s) => {
2560
- const l = new FileReader();
2561
- l.onerror = s, l.onloadend = () => {
2558
+ const s = await o.blob();
2559
+ return new Promise((i, r) => {
2560
+ const n = new FileReader();
2561
+ n.onerror = r, n.onloadend = () => {
2562
2562
  try {
2563
- i(a({ res: o, result: l.result }));
2563
+ i(a({ res: o, result: n.result }));
2564
2564
  } catch (u) {
2565
- s(u);
2565
+ r(u);
2566
2566
  }
2567
- }, l.readAsDataURL(r);
2567
+ }, n.readAsDataURL(s);
2568
2568
  });
2569
2569
  }
2570
2570
  const Fe = {};
2571
- function Ao(e, t, a) {
2571
+ function Ro(e, t, a) {
2572
2572
  let o = e.replace(/\?.*/, "");
2573
2573
  return a && (o = e), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), t ? `[${t}]${o}` : o;
2574
2574
  }
2575
2575
  async function Ze(e, t, a) {
2576
- const o = Ao(e, t, a.includeQueryParams);
2576
+ const o = Ro(e, t, a.includeQueryParams);
2577
2577
  if (Fe[o] != null)
2578
2578
  return Fe[o];
2579
2579
  a.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
2580
- let r;
2580
+ let s;
2581
2581
  try {
2582
- const i = await Rt(e, a.fetchRequestInit, ({ res: s, result: l }) => (t || (t = s.headers.get("Content-Type") || ""), wo(l)));
2583
- r = So(i, t);
2582
+ const i = await Ut(e, a.fetchRequestInit, ({ res: r, result: n }) => (t || (t = r.headers.get("Content-Type") || ""), jo(n)));
2583
+ s = Eo(i, t);
2584
2584
  } catch (i) {
2585
- r = a.imagePlaceholder || "";
2586
- let s = `Failed to fetch resource: ${e}`;
2587
- i && (s = typeof i == "string" ? i : i.message), s && console.warn(s);
2585
+ s = a.imagePlaceholder || "";
2586
+ let r = `Failed to fetch resource: ${e}`;
2587
+ i && (r = typeof i == "string" ? i : i.message), r && console.warn(r);
2588
2588
  }
2589
- return Fe[o] = r, r;
2589
+ return Fe[o] = s, s;
2590
2590
  }
2591
- async function zo(e) {
2591
+ async function Po(e) {
2592
2592
  const t = e.toDataURL();
2593
2593
  return t === "data:," ? e.cloneNode(!1) : ve(t);
2594
2594
  }
2595
- async function Co(e, t) {
2595
+ async function Lo(e, t) {
2596
2596
  if (e.currentSrc) {
2597
- const i = document.createElement("canvas"), s = i.getContext("2d");
2598
- i.width = e.clientWidth, i.height = e.clientHeight, s == null || s.drawImage(e, 0, 0, i.width, i.height);
2599
- const l = i.toDataURL();
2600
- return ve(l);
2597
+ const i = document.createElement("canvas"), r = i.getContext("2d");
2598
+ i.width = e.clientWidth, i.height = e.clientHeight, r == null || r.drawImage(e, 0, 0, i.width, i.height);
2599
+ const n = i.toDataURL();
2600
+ return ve(n);
2601
2601
  }
2602
- const a = e.poster, o = We(a), r = await Ze(a, o, t);
2603
- return ve(r);
2602
+ const a = e.poster, o = We(a), s = await Ze(a, o, t);
2603
+ return ve(s);
2604
2604
  }
2605
- async function jo(e, t) {
2605
+ async function xo(e, t) {
2606
2606
  var a;
2607
2607
  try {
2608
2608
  if (!((a = e == null ? void 0 : e.contentDocument) === null || a === void 0) && a.body)
@@ -2611,203 +2611,203 @@ async function jo(e, t) {
2611
2611
  }
2612
2612
  return e.cloneNode(!1);
2613
2613
  }
2614
- async function Eo(e, t) {
2615
- return j(e, HTMLCanvasElement) ? zo(e) : j(e, HTMLVideoElement) ? Co(e, t) : j(e, HTMLIFrameElement) ? jo(e, t) : e.cloneNode(Pt(e));
2614
+ async function Uo(e, t) {
2615
+ return j(e, HTMLCanvasElement) ? Po(e) : j(e, HTMLVideoElement) ? Lo(e, t) : j(e, HTMLIFrameElement) ? xo(e, t) : e.cloneNode(Tt(e));
2616
2616
  }
2617
- const Ro = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Pt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
2618
- async function Po(e, t, a) {
2619
- var o, r;
2620
- if (Pt(t))
2617
+ const To = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Tt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
2618
+ async function Fo(e, t, a) {
2619
+ var o, s;
2620
+ if (Tt(t))
2621
2621
  return t;
2622
2622
  let i = [];
2623
- return Ro(e) && e.assignedNodes ? i = G(e.assignedNodes()) : j(e, HTMLIFrameElement) && (!((o = e.contentDocument) === null || o === void 0) && o.body) ? i = G(e.contentDocument.body.childNodes) : i = G(((r = e.shadowRoot) !== null && r !== void 0 ? r : e).childNodes), i.length === 0 || j(e, HTMLVideoElement) || await i.reduce((s, l) => s.then(() => je(l, a)).then((u) => {
2623
+ return To(e) && e.assignedNodes ? i = G(e.assignedNodes()) : j(e, HTMLIFrameElement) && (!((o = e.contentDocument) === null || o === void 0) && o.body) ? i = G(e.contentDocument.body.childNodes) : i = G(((s = e.shadowRoot) !== null && s !== void 0 ? s : e).childNodes), i.length === 0 || j(e, HTMLVideoElement) || await i.reduce((r, n) => r.then(() => je(n, a)).then((u) => {
2624
2624
  u && t.appendChild(u);
2625
2625
  }), Promise.resolve()), t;
2626
2626
  }
2627
- function Lo(e, t, a) {
2627
+ function Oo(e, t, a) {
2628
2628
  const o = t.style;
2629
2629
  if (!o)
2630
2630
  return;
2631
- const r = window.getComputedStyle(e);
2632
- r.cssText ? (o.cssText = r.cssText, o.transformOrigin = r.transformOrigin) : jt(a).forEach((i) => {
2633
- let s = r.getPropertyValue(i);
2634
- i === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), j(e, HTMLIFrameElement) && i === "display" && s === "inline" && (s = "block"), i === "d" && t.getAttribute("d") && (s = `path(${t.getAttribute("d")})`), o.setProperty(i, s, r.getPropertyPriority(i));
2631
+ const s = window.getComputedStyle(e);
2632
+ s.cssText ? (o.cssText = s.cssText, o.transformOrigin = s.transformOrigin) : Lt(a).forEach((i) => {
2633
+ let r = s.getPropertyValue(i);
2634
+ i === "font-size" && r.endsWith("px") && (r = `${Math.floor(parseFloat(r.substring(0, r.length - 2))) - 0.1}px`), j(e, HTMLIFrameElement) && i === "display" && r === "inline" && (r = "block"), i === "d" && t.getAttribute("d") && (r = `path(${t.getAttribute("d")})`), o.setProperty(i, r, s.getPropertyPriority(i));
2635
2635
  });
2636
2636
  }
2637
- function xo(e, t) {
2637
+ function Do(e, t) {
2638
2638
  j(e, HTMLTextAreaElement) && (t.innerHTML = e.value), j(e, HTMLInputElement) && t.setAttribute("value", e.value);
2639
2639
  }
2640
- function Uo(e, t) {
2640
+ function Mo(e, t) {
2641
2641
  if (j(e, HTMLSelectElement)) {
2642
- const o = Array.from(t.children).find((r) => e.value === r.getAttribute("value"));
2642
+ const o = Array.from(t.children).find((s) => e.value === s.getAttribute("value"));
2643
2643
  o && o.setAttribute("selected", "");
2644
2644
  }
2645
2645
  }
2646
- function To(e, t, a) {
2647
- return j(t, Element) && (Lo(e, t, a), vo(e, t, a), xo(e, t), Uo(e, t)), t;
2646
+ function Io(e, t, a) {
2647
+ return j(t, Element) && (Oo(e, t, a), Ao(e, t, a), Do(e, t), Mo(e, t)), t;
2648
2648
  }
2649
- async function Fo(e, t) {
2649
+ async function Vo(e, t) {
2650
2650
  const a = e.querySelectorAll ? e.querySelectorAll("use") : [];
2651
2651
  if (a.length === 0)
2652
2652
  return e;
2653
2653
  const o = {};
2654
2654
  for (let i = 0; i < a.length; i++) {
2655
- const l = a[i].getAttribute("xlink:href");
2656
- if (l) {
2657
- const u = e.querySelector(l), d = document.querySelector(l);
2658
- !u && d && !o[l] && (o[l] = await je(d, t, !0));
2655
+ const n = a[i].getAttribute("xlink:href");
2656
+ if (n) {
2657
+ const u = e.querySelector(n), d = document.querySelector(n);
2658
+ !u && d && !o[n] && (o[n] = await je(d, t, !0));
2659
2659
  }
2660
2660
  }
2661
- const r = Object.values(o);
2662
- if (r.length) {
2663
- const i = "http://www.w3.org/1999/xhtml", s = document.createElementNS(i, "svg");
2664
- s.setAttribute("xmlns", i), s.style.position = "absolute", s.style.width = "0", s.style.height = "0", s.style.overflow = "hidden", s.style.display = "none";
2665
- const l = document.createElementNS(i, "defs");
2666
- s.appendChild(l);
2667
- for (let u = 0; u < r.length; u++)
2668
- l.appendChild(r[u]);
2669
- e.appendChild(s);
2661
+ const s = Object.values(o);
2662
+ if (s.length) {
2663
+ const i = "http://www.w3.org/1999/xhtml", r = document.createElementNS(i, "svg");
2664
+ r.setAttribute("xmlns", i), r.style.position = "absolute", r.style.width = "0", r.style.height = "0", r.style.overflow = "hidden", r.style.display = "none";
2665
+ const n = document.createElementNS(i, "defs");
2666
+ r.appendChild(n);
2667
+ for (let u = 0; u < s.length; u++)
2668
+ n.appendChild(s[u]);
2669
+ e.appendChild(r);
2670
2670
  }
2671
2671
  return e;
2672
2672
  }
2673
2673
  async function je(e, t, a) {
2674
- return !a && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((o) => Eo(o, t)).then((o) => Po(e, o, t)).then((o) => To(e, o, t)).then((o) => Fo(o, t));
2674
+ return !a && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((o) => Uo(o, t)).then((o) => Fo(e, o, t)).then((o) => Io(e, o, t)).then((o) => Vo(o, t));
2675
2675
  }
2676
- const Lt = /url\((['"]?)([^'"]+?)\1\)/g, Oo = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Do = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2677
- function Mo(e) {
2676
+ const Ft = /url\((['"]?)([^'"]+?)\1\)/g, $o = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Bo = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2677
+ function No(e) {
2678
2678
  const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
2679
2679
  return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
2680
2680
  }
2681
- function Io(e) {
2681
+ function Ko(e) {
2682
2682
  const t = [];
2683
- return e.replace(Lt, (a, o, r) => (t.push(r), a)), t.filter((a) => !$e(a));
2683
+ return e.replace(Ft, (a, o, s) => (t.push(s), a)), t.filter((a) => !$e(a));
2684
2684
  }
2685
- async function Vo(e, t, a, o, r) {
2685
+ async function Ho(e, t, a, o, s) {
2686
2686
  try {
2687
- const i = a ? so(t, a) : t, s = We(t);
2688
- let l;
2689
- return r || (l = await Ze(i, s, o)), e.replace(Mo(t), `$1${l}$3`);
2687
+ const i = a ? po(t, a) : t, r = We(t);
2688
+ let n;
2689
+ return s || (n = await Ze(i, r, o)), e.replace(No(t), `$1${n}$3`);
2690
2690
  } catch {
2691
2691
  }
2692
2692
  return e;
2693
2693
  }
2694
- function $o(e, { preferredFontFormat: t }) {
2695
- return t ? e.replace(Do, (a) => {
2694
+ function Go(e, { preferredFontFormat: t }) {
2695
+ return t ? e.replace(Bo, (a) => {
2696
2696
  for (; ; ) {
2697
- const [o, , r] = Oo.exec(a) || [];
2698
- if (!r)
2697
+ const [o, , s] = $o.exec(a) || [];
2698
+ if (!s)
2699
2699
  return "";
2700
- if (r === t)
2700
+ if (s === t)
2701
2701
  return `src: ${o};`;
2702
2702
  }
2703
2703
  }) : e;
2704
2704
  }
2705
- function xt(e) {
2706
- return e.search(Lt) !== -1;
2705
+ function Ot(e) {
2706
+ return e.search(Ft) !== -1;
2707
2707
  }
2708
- async function Ut(e, t, a) {
2709
- if (!xt(e))
2708
+ async function Dt(e, t, a) {
2709
+ if (!Ot(e))
2710
2710
  return e;
2711
- const o = $o(e, a);
2712
- return Io(o).reduce((i, s) => i.then((l) => Vo(l, s, t, a)), Promise.resolve(o));
2711
+ const o = Go(e, a);
2712
+ return Ko(o).reduce((i, r) => i.then((n) => Ho(n, r, t, a)), Promise.resolve(o));
2713
2713
  }
2714
2714
  async function ae(e, t, a) {
2715
2715
  var o;
2716
- const r = (o = t.style) === null || o === void 0 ? void 0 : o.getPropertyValue(e);
2717
- if (r) {
2718
- const i = await Ut(r, null, a);
2716
+ const s = (o = t.style) === null || o === void 0 ? void 0 : o.getPropertyValue(e);
2717
+ if (s) {
2718
+ const i = await Dt(s, null, a);
2719
2719
  return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
2720
2720
  }
2721
2721
  return !1;
2722
2722
  }
2723
- async function Bo(e, t) {
2723
+ async function qo(e, t) {
2724
2724
  await ae("background", e, t) || await ae("background-image", e, t), await ae("mask", e, t) || await ae("-webkit-mask", e, t) || await ae("mask-image", e, t) || await ae("-webkit-mask-image", e, t);
2725
2725
  }
2726
- async function No(e, t) {
2726
+ async function _o(e, t) {
2727
2727
  const a = j(e, HTMLImageElement);
2728
2728
  if (!(a && !$e(e.src)) && !(j(e, SVGImageElement) && !$e(e.href.baseVal)))
2729
2729
  return;
2730
- const o = a ? e.src : e.href.baseVal, r = await Ze(o, We(o), t);
2731
- await new Promise((i, s) => {
2730
+ const o = a ? e.src : e.href.baseVal, s = await Ze(o, We(o), t);
2731
+ await new Promise((i, r) => {
2732
2732
  e.onload = i, e.onerror = t.onImageErrorHandler ? (...u) => {
2733
2733
  try {
2734
2734
  i(t.onImageErrorHandler(...u));
2735
2735
  } catch (d) {
2736
- s(d);
2736
+ r(d);
2737
2737
  }
2738
- } : s;
2739
- const l = e;
2740
- l.decode && (l.decode = i), l.loading === "lazy" && (l.loading = "eager"), a ? (e.srcset = "", e.src = r) : e.href.baseVal = r;
2738
+ } : r;
2739
+ const n = e;
2740
+ n.decode && (n.decode = i), n.loading === "lazy" && (n.loading = "eager"), a ? (e.srcset = "", e.src = s) : e.href.baseVal = s;
2741
2741
  });
2742
2742
  }
2743
- async function Ko(e, t) {
2744
- const o = G(e.childNodes).map((r) => Tt(r, t));
2743
+ async function Wo(e, t) {
2744
+ const o = G(e.childNodes).map((s) => Mt(s, t));
2745
2745
  await Promise.all(o).then(() => e);
2746
2746
  }
2747
- async function Tt(e, t) {
2748
- j(e, Element) && (await Bo(e, t), await No(e, t), await Ko(e, t));
2747
+ async function Mt(e, t) {
2748
+ j(e, Element) && (await qo(e, t), await _o(e, t), await Wo(e, t));
2749
2749
  }
2750
- function Ho(e, t) {
2750
+ function Zo(e, t) {
2751
2751
  const { style: a } = e;
2752
2752
  t.backgroundColor && (a.backgroundColor = t.backgroundColor), t.width && (a.width = `${t.width}px`), t.height && (a.height = `${t.height}px`);
2753
2753
  const o = t.style;
2754
- return o != null && Object.keys(o).forEach((r) => {
2755
- a[r] = o[r];
2754
+ return o != null && Object.keys(o).forEach((s) => {
2755
+ a[s] = o[s];
2756
2756
  }), e;
2757
2757
  }
2758
- const nt = {};
2759
- async function lt(e) {
2760
- let t = nt[e];
2758
+ const lt = {};
2759
+ async function ut(e) {
2760
+ let t = lt[e];
2761
2761
  if (t != null)
2762
2762
  return t;
2763
2763
  const o = await (await fetch(e)).text();
2764
- return t = { url: e, cssText: o }, nt[e] = t, t;
2764
+ return t = { url: e, cssText: o }, lt[e] = t, t;
2765
2765
  }
2766
- async function ut(e, t) {
2766
+ async function dt(e, t) {
2767
2767
  let a = e.cssText;
2768
- const o = /url\(["']?([^"')]+)["']?\)/g, i = (a.match(/url\([^)]+\)/g) || []).map(async (s) => {
2769
- let l = s.replace(o, "$1");
2770
- return l.startsWith("https://") || (l = new URL(l, e.url).href), Rt(l, t.fetchRequestInit, ({ result: u }) => (a = a.replace(s, `url(${u})`), [s, u]));
2768
+ const o = /url\(["']?([^"')]+)["']?\)/g, i = (a.match(/url\([^)]+\)/g) || []).map(async (r) => {
2769
+ let n = r.replace(o, "$1");
2770
+ return n.startsWith("https://") || (n = new URL(n, e.url).href), Ut(n, t.fetchRequestInit, ({ result: u }) => (a = a.replace(r, `url(${u})`), [r, u]));
2771
2771
  });
2772
2772
  return Promise.all(i).then(() => a);
2773
2773
  }
2774
- function dt(e) {
2774
+ function ct(e) {
2775
2775
  if (e == null)
2776
2776
  return [];
2777
2777
  const t = [], a = /(\/\*[\s\S]*?\*\/)/gi;
2778
2778
  let o = e.replace(a, "");
2779
- const r = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
2779
+ const s = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
2780
2780
  for (; ; ) {
2781
- const u = r.exec(o);
2781
+ const u = s.exec(o);
2782
2782
  if (u === null)
2783
2783
  break;
2784
2784
  t.push(u[0]);
2785
2785
  }
2786
- o = o.replace(r, "");
2787
- const i = /@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");
2786
+ o = o.replace(s, "");
2787
+ const i = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, r = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", n = new RegExp(r, "gi");
2788
2788
  for (; ; ) {
2789
2789
  let u = i.exec(o);
2790
2790
  if (u === null) {
2791
- if (u = l.exec(o), u === null)
2791
+ if (u = n.exec(o), u === null)
2792
2792
  break;
2793
- i.lastIndex = l.lastIndex;
2793
+ i.lastIndex = n.lastIndex;
2794
2794
  } else
2795
- l.lastIndex = i.lastIndex;
2795
+ n.lastIndex = i.lastIndex;
2796
2796
  t.push(u[0]);
2797
2797
  }
2798
2798
  return t;
2799
2799
  }
2800
- async function Go(e, t) {
2800
+ async function Jo(e, t) {
2801
2801
  const a = [], o = [];
2802
- return e.forEach((r) => {
2803
- if ("cssRules" in r)
2802
+ return e.forEach((s) => {
2803
+ if ("cssRules" in s)
2804
2804
  try {
2805
- G(r.cssRules || []).forEach((i, s) => {
2805
+ G(s.cssRules || []).forEach((i, r) => {
2806
2806
  if (i.type === CSSRule.IMPORT_RULE) {
2807
- let l = s + 1;
2808
- const u = i.href, d = lt(u).then((p) => ut(p, t)).then((p) => dt(p).forEach((y) => {
2807
+ let n = r + 1;
2808
+ const u = i.href, d = ut(u).then((p) => dt(p, t)).then((p) => ct(p).forEach((y) => {
2809
2809
  try {
2810
- r.insertRule(y, y.startsWith("@import") ? l += 1 : r.cssRules.length);
2810
+ s.insertRule(y, y.startsWith("@import") ? n += 1 : s.cssRules.length);
2811
2811
  } catch (v) {
2812
2812
  console.error("Error inserting rule from remote css", {
2813
2813
  rule: y,
@@ -2821,78 +2821,78 @@ async function Go(e, t) {
2821
2821
  }
2822
2822
  });
2823
2823
  } catch (i) {
2824
- const s = e.find((l) => l.href == null) || document.styleSheets[0];
2825
- r.href != null && o.push(lt(r.href).then((l) => ut(l, t)).then((l) => dt(l).forEach((u) => {
2826
- s.insertRule(u, s.cssRules.length);
2827
- })).catch((l) => {
2828
- console.error("Error loading remote stylesheet", l);
2824
+ const r = e.find((n) => n.href == null) || document.styleSheets[0];
2825
+ s.href != null && o.push(ut(s.href).then((n) => dt(n, t)).then((n) => ct(n).forEach((u) => {
2826
+ r.insertRule(u, r.cssRules.length);
2827
+ })).catch((n) => {
2828
+ console.error("Error loading remote stylesheet", n);
2829
2829
  })), console.error("Error inlining remote css file", i);
2830
2830
  }
2831
- }), Promise.all(o).then(() => (e.forEach((r) => {
2832
- if ("cssRules" in r)
2831
+ }), Promise.all(o).then(() => (e.forEach((s) => {
2832
+ if ("cssRules" in s)
2833
2833
  try {
2834
- G(r.cssRules || []).forEach((i) => {
2834
+ G(s.cssRules || []).forEach((i) => {
2835
2835
  a.push(i);
2836
2836
  });
2837
2837
  } catch (i) {
2838
- console.error(`Error while reading CSS rules from ${r.href}`, i);
2838
+ console.error(`Error while reading CSS rules from ${s.href}`, i);
2839
2839
  }
2840
2840
  }), a));
2841
2841
  }
2842
- function qo(e) {
2843
- return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => xt(t.style.getPropertyValue("src")));
2842
+ function Yo(e) {
2843
+ return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => Ot(t.style.getPropertyValue("src")));
2844
2844
  }
2845
- async function _o(e, t) {
2845
+ async function Xo(e, t) {
2846
2846
  if (e.ownerDocument == null)
2847
2847
  throw new Error("Provided element is not within a Document");
2848
- const a = G(e.ownerDocument.styleSheets), o = await Go(a, t);
2849
- return qo(o);
2848
+ const a = G(e.ownerDocument.styleSheets), o = await Jo(a, t);
2849
+ return Yo(o);
2850
2850
  }
2851
- function Ft(e) {
2851
+ function It(e) {
2852
2852
  return e.trim().replace(/["']/g, "");
2853
2853
  }
2854
- function Wo(e) {
2854
+ function Qo(e) {
2855
2855
  const t = /* @__PURE__ */ new Set();
2856
2856
  function a(o) {
2857
2857
  (o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((i) => {
2858
- t.add(Ft(i));
2858
+ t.add(It(i));
2859
2859
  }), Array.from(o.children).forEach((i) => {
2860
2860
  i instanceof HTMLElement && a(i);
2861
2861
  });
2862
2862
  }
2863
2863
  return a(e), t;
2864
2864
  }
2865
- async function Zo(e, t) {
2866
- const a = await _o(e, t), o = Wo(e);
2867
- return (await Promise.all(a.filter((i) => o.has(Ft(i.style.fontFamily))).map((i) => {
2868
- const s = i.parentStyleSheet ? i.parentStyleSheet.href : null;
2869
- return Ut(i.cssText, s, t);
2865
+ async function ei(e, t) {
2866
+ const a = await Xo(e, t), o = Qo(e);
2867
+ return (await Promise.all(a.filter((i) => o.has(It(i.style.fontFamily))).map((i) => {
2868
+ const r = i.parentStyleSheet ? i.parentStyleSheet.href : null;
2869
+ return Dt(i.cssText, r, t);
2870
2870
  }))).join(`
2871
2871
  `);
2872
2872
  }
2873
- async function Jo(e, t) {
2874
- const a = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Zo(e, t);
2873
+ async function ti(e, t) {
2874
+ const a = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await ei(e, t);
2875
2875
  if (a) {
2876
- const o = document.createElement("style"), r = document.createTextNode(a);
2877
- o.appendChild(r), e.firstChild ? e.insertBefore(o, e.firstChild) : e.appendChild(o);
2876
+ const o = document.createElement("style"), s = document.createTextNode(a);
2877
+ o.appendChild(s), e.firstChild ? e.insertBefore(o, e.firstChild) : e.appendChild(o);
2878
2878
  }
2879
2879
  }
2880
- async function Yo(e, t = {}) {
2881
- const { width: a, height: o } = Et(e, t), r = await je(e, t, !0);
2882
- return await Jo(r, t), await Tt(r, t), Ho(r, t), await mo(r, a, o);
2880
+ async function ai(e, t = {}) {
2881
+ const { width: a, height: o } = xt(e, t), s = await je(e, t, !0);
2882
+ return await ti(s, t), await Mt(s, t), Zo(s, t), await ko(s, a, o);
2883
2883
  }
2884
- async function Xo(e, t = {}) {
2885
- const { width: a, height: o } = Et(e, t), r = await Yo(e, t), i = await ve(r), s = document.createElement("canvas"), l = s.getContext("2d"), u = t.pixelRatio || co(), d = t.canvasWidth || a, p = t.canvasHeight || o;
2886
- return s.width = d * u, s.height = p * u, t.skipAutoScale || po(s), s.style.width = `${d}`, s.style.height = `${p}`, t.backgroundColor && (l.fillStyle = t.backgroundColor, l.fillRect(0, 0, s.width, s.height)), l.drawImage(i, 0, 0, s.width, s.height), s;
2884
+ async function oi(e, t = {}) {
2885
+ const { width: a, height: o } = xt(e, t), s = await ai(e, t), i = await ve(s), r = document.createElement("canvas"), n = r.getContext("2d"), u = t.pixelRatio || fo(), d = t.canvasWidth || a, p = t.canvasHeight || o;
2886
+ return r.width = d * u, r.height = p * u, t.skipAutoScale || yo(r), r.style.width = `${d}`, r.style.height = `${p}`, t.backgroundColor && (n.fillStyle = t.backgroundColor, n.fillRect(0, 0, r.width, r.height)), n.drawImage(i, 0, 0, r.width, r.height), r;
2887
2887
  }
2888
- async function ct(e, t = {}) {
2889
- return (await Xo(e, t)).toDataURL();
2888
+ async function pt(e, t = {}) {
2889
+ return (await oi(e, t)).toDataURL();
2890
2890
  }
2891
- const ke = "data-nf-capture-chrome", Qo = "data-nf-canvas-snap", ei = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2892
- function Ot(e) {
2891
+ const ke = "data-nf-capture-chrome", ii = "data-nf-canvas-snap", si = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2892
+ function Vt(e) {
2893
2893
  return e instanceof Element && (e.hasAttribute(ke) || e.hasAttribute("data-nf-mask-cover") || e.id === "notefully");
2894
2894
  }
2895
- function ti() {
2895
+ function ri() {
2896
2896
  const e = [];
2897
2897
  return Array.from(document.styleSheets).forEach((t) => {
2898
2898
  try {
@@ -2916,11 +2916,11 @@ function ti() {
2916
2916
  });
2917
2917
  };
2918
2918
  }
2919
- function ai() {
2919
+ function ni() {
2920
2920
  const e = [];
2921
2921
  return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
2922
- const o = a.getBoundingClientRect(), r = document.createElement("div");
2923
- r.setAttribute("data-nf-mask-cover", "1"), r.style.cssText = [
2922
+ const o = a.getBoundingClientRect(), s = document.createElement("div");
2923
+ s.setAttribute("data-nf-mask-cover", "1"), s.style.cssText = [
2924
2924
  "position:fixed",
2925
2925
  `left:${o.left}px`,
2926
2926
  `top:${o.top}px`,
@@ -2929,17 +2929,17 @@ function ai() {
2929
2929
  "background:#111",
2930
2930
  "z-index:2147483646",
2931
2931
  "pointer-events:none"
2932
- ].join(";"), document.body.appendChild(r), e.push(r);
2932
+ ].join(";"), document.body.appendChild(s), e.push(s);
2933
2933
  }), () => e.forEach((a) => a.remove());
2934
2934
  }
2935
- function oi() {
2935
+ function li() {
2936
2936
  const e = document.querySelector(`[${ke}]`);
2937
2937
  if (e)
2938
2938
  return e;
2939
2939
  const t = document.createElement("div");
2940
2940
  return t.setAttribute(ke, "1"), t.className = "nf-capture-chrome", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.innerHTML = `<span class="nf-capture-chrome-pill">${m("status.capturing")}</span>`, document.body.appendChild(t), t;
2941
2941
  }
2942
- function ii() {
2942
+ function ui() {
2943
2943
  document.querySelectorAll(`[${ke}]`).forEach((e) => e.remove());
2944
2944
  }
2945
2945
  function Be() {
@@ -2953,7 +2953,7 @@ function q(e) {
2953
2953
  const t = e.indexOf(",");
2954
2954
  return t > 0 && t < e.length - 1;
2955
2955
  }
2956
- function ri() {
2956
+ function di() {
2957
2957
  const e = document.documentElement, t = document.body, a = Math.max(
2958
2958
  window.innerWidth || 0,
2959
2959
  (e == null ? void 0 : e.clientWidth) || 0,
@@ -2969,10 +2969,10 @@ function ri() {
2969
2969
  );
2970
2970
  return { width: a, height: o };
2971
2971
  }
2972
- async function si() {
2972
+ async function ci() {
2973
2973
  const e = [], t = Array.from(document.querySelectorAll("canvas"));
2974
2974
  for (const a of t) {
2975
- if (a.closest("#notefully") || Ot(a))
2975
+ if (a.closest("#notefully") || Vt(a))
2976
2976
  continue;
2977
2977
  let o = "";
2978
2978
  try {
@@ -2982,8 +2982,8 @@ async function si() {
2982
2982
  }
2983
2983
  if (!o || o === "data:,")
2984
2984
  continue;
2985
- const r = document.createElement("img"), i = getComputedStyle(a);
2986
- r.setAttribute(Qo, "1"), r.alt = "", r.src = o, r.className = a.className, r.style.cssText = a.style.cssText, r.style.width = i.width, r.style.height = i.height, r.style.maxWidth = i.maxWidth, r.style.maxHeight = i.maxHeight, r.style.objectFit = "fill", r.style.display = i.display === "inline" ? "inline-block" : i.display, a.replaceWith(r), e.push({ canvas: a, img: r });
2985
+ const s = document.createElement("img"), i = getComputedStyle(a);
2986
+ s.setAttribute(ii, "1"), s.alt = "", s.src = o, s.className = a.className, s.style.cssText = a.style.cssText, s.style.width = i.width, s.style.height = i.height, s.style.maxWidth = i.maxWidth, s.style.maxHeight = i.maxHeight, s.style.objectFit = "fill", s.style.display = i.display === "inline" ? "inline-block" : i.display, a.replaceWith(s), e.push({ canvas: a, img: s });
2987
2987
  }
2988
2988
  return await Promise.all(e.map(({ img: a }) => {
2989
2989
  if (!a.complete)
@@ -2999,7 +2999,7 @@ async function si() {
2999
2999
  });
3000
3000
  };
3001
3001
  }
3002
- async function ni(e) {
3002
+ async function pi(e) {
3003
3003
  if (!e)
3004
3004
  return null;
3005
3005
  if (typeof e == "string")
@@ -3012,21 +3012,21 @@ async function ni(e) {
3012
3012
  return null;
3013
3013
  }
3014
3014
  if (typeof Blob < "u" && e instanceof Blob) {
3015
- const t = await li(e);
3015
+ const t = await gi(e);
3016
3016
  return q(t) ? t : null;
3017
3017
  }
3018
3018
  return null;
3019
3019
  }
3020
- async function li(e) {
3020
+ async function gi(e) {
3021
3021
  if (typeof FileReader == "function")
3022
- return new Promise((o, r) => {
3022
+ return new Promise((o, s) => {
3023
3023
  const i = new FileReader();
3024
- i.onload = () => o(String(i.result || "")), i.onerror = () => r(i.error || new Error("Could not read capture blob")), i.readAsDataURL(e);
3024
+ i.onload = () => o(String(i.result || "")), i.onerror = () => s(i.error || new Error("Could not read capture blob")), i.readAsDataURL(e);
3025
3025
  });
3026
3026
  const t = Buffer.from(await e.arrayBuffer());
3027
3027
  return `data:${e.type || "application/octet-stream"};base64,${t.toString("base64")}`;
3028
3028
  }
3029
- async function ui() {
3029
+ async function mi() {
3030
3030
  var t;
3031
3031
  if (!((t = navigator.mediaDevices) != null && t.getDisplayMedia))
3032
3032
  throw new Error(m("status.screenUnsupported"));
@@ -3038,48 +3038,48 @@ async function ui() {
3038
3038
  });
3039
3039
  try {
3040
3040
  const a = document.createElement("video");
3041
- a.muted = !0, a.playsInline = !0, a.srcObject = e, await a.play(), a.videoWidth || await new Promise((l) => {
3042
- a.onloadedmetadata = () => l();
3041
+ a.muted = !0, a.playsInline = !0, a.srcObject = e, await a.play(), a.videoWidth || await new Promise((n) => {
3042
+ a.onloadedmetadata = () => n();
3043
3043
  }), await Be();
3044
- const o = a.videoWidth || 1, r = a.videoHeight || 1, i = document.createElement("canvas");
3045
- i.width = o, i.height = r, i.getContext("2d").drawImage(a, 0, 0, o, r);
3046
- const s = i.toDataURL("image/png");
3047
- if (!q(s))
3044
+ const o = a.videoWidth || 1, s = a.videoHeight || 1, i = document.createElement("canvas");
3045
+ i.width = o, i.height = s, i.getContext("2d").drawImage(a, 0, 0, o, s);
3046
+ const r = i.toDataURL("image/png");
3047
+ if (!q(r))
3048
3048
  throw new Error(m("status.screenEmpty"));
3049
- return s;
3049
+ return r;
3050
3050
  } finally {
3051
3051
  e.getTracks().forEach((a) => a.stop());
3052
3052
  }
3053
3053
  }
3054
- async function Dt(e = {}) {
3055
- const t = document.getElementById("notefully"), a = t ? t.style.display : "", o = oi(), r = ti();
3054
+ async function $t(e = {}) {
3055
+ const t = document.getElementById("notefully"), a = t ? t.style.display : "", o = li(), s = ri();
3056
3056
  let i = () => {
3057
3057
  };
3058
3058
  t && (t.style.display = "none");
3059
- const s = ai();
3059
+ const r = ni();
3060
3060
  try {
3061
3061
  if (typeof e.onBeforeCapture == "function" && await e.onBeforeCapture(), await Be(), typeof e.capture == "function") {
3062
- const y = await ni(await e.capture());
3062
+ const y = await pi(await e.capture());
3063
3063
  if (y)
3064
3064
  return y;
3065
3065
  }
3066
- i = await si(), await Be();
3067
- const { width: l, height: u } = ri(), d = {
3066
+ i = await ci(), await Be();
3067
+ const { width: n, height: u } = di(), d = {
3068
3068
  cacheBust: !0,
3069
- width: l,
3069
+ width: n,
3070
3070
  height: u,
3071
3071
  pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
3072
- filter: (y) => !Ot(y),
3072
+ filter: (y) => !Vt(y),
3073
3073
  // 404 / CORS images must not abort the whole capture.
3074
- imagePlaceholder: ei,
3074
+ imagePlaceholder: si,
3075
3075
  onImageErrorHandler: () => {
3076
3076
  }
3077
3077
  };
3078
3078
  let p = "";
3079
3079
  try {
3080
- p = await ct(document.body, d);
3080
+ p = await pt(document.body, d);
3081
3081
  } catch {
3082
- p = await ct(document.body, { ...d, skipFonts: !0 });
3082
+ p = await pt(document.body, { ...d, skipFonts: !0 });
3083
3083
  }
3084
3084
  if (!q(p))
3085
3085
  throw new Error(m("status.captureEmpty"));
@@ -3089,25 +3089,25 @@ async function Dt(e = {}) {
3089
3089
  i();
3090
3090
  } catch {
3091
3091
  }
3092
- s(), r(), o.remove(), ii(), t && (t.style.display = a);
3092
+ r(), s(), o.remove(), ui(), t && (t.style.display = a);
3093
3093
  }
3094
3094
  }
3095
- function di(e = "") {
3095
+ function hi(e = "") {
3096
3096
  const t = String(e || "");
3097
3097
  return t ? /Windows NT/i.test(t) ? "Windows" : /iPhone|iPad|iPod/i.test(t) ? "iOS" : /Mac OS X|Macintosh/i.test(t) ? "macOS" : /Android/i.test(t) ? "Android" : /CrOS/i.test(t) ? "ChromeOS" : /Linux/i.test(t) ? "Linux" : "Other" : "";
3098
3098
  }
3099
- function ci(e = "") {
3099
+ function fi(e = "") {
3100
3100
  const t = String(e || "");
3101
3101
  return t ? /Edg\//i.test(t) ? "Edge" : /OPR\/|Opera/i.test(t) ? "Opera" : /Firefox\//i.test(t) ? "Firefox" : /Chrome\//i.test(t) || /CriOS\//i.test(t) ? "Chrome" : /Safari\//i.test(t) ? "Safari" : "Other" : "";
3102
3102
  }
3103
- function pi(e = {}) {
3103
+ function yi(e = {}) {
3104
3104
  const t = navigator.userAgent;
3105
3105
  return {
3106
3106
  url: location.href,
3107
3107
  title: document.title,
3108
3108
  userAgent: t,
3109
- os: di(t),
3110
- browser: ci(t),
3109
+ os: hi(t),
3110
+ browser: fi(t),
3111
3111
  language: navigator.language,
3112
3112
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
3113
3113
  viewport: {
@@ -3122,11 +3122,11 @@ function pi(e = {}) {
3122
3122
  }
3123
3123
  };
3124
3124
  }
3125
- const pt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), gt = {
3125
+ const gt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), mt = {
3126
3126
  id: "userId",
3127
3127
  username: "displayName",
3128
3128
  name: "displayName"
3129
- }, mt = /* @__PURE__ */ new Set([
3129
+ }, ht = /* @__PURE__ */ new Set([
3130
3130
  "endpoint",
3131
3131
  "projectKey",
3132
3132
  "version",
@@ -3144,7 +3144,7 @@ const pt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), gt = {
3144
3144
  "displayLink",
3145
3145
  "locale",
3146
3146
  "translations"
3147
- ]), ht = {
3147
+ ]), ft = {
3148
3148
  slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
3149
3149
  projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
3150
3150
  project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
@@ -3153,60 +3153,156 @@ const pt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), gt = {
3153
3153
  email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
3154
3154
  displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
3155
3155
  };
3156
- function gi(e = {}, t = {}) {
3157
- const a = t.warn || Mt, o = e && typeof e == "object" ? e : {}, r = {}, i = [];
3158
- for (const s of pt)
3159
- Object.prototype.hasOwnProperty.call(o, s) && (r[s] = o[s]);
3160
- for (const [s, l] of Object.entries(gt))
3161
- Object.prototype.hasOwnProperty.call(o, s) && (Object.prototype.hasOwnProperty.call(r, l) || (r[l] = o[s]));
3162
- for (const s of Object.keys(o))
3163
- pt.has(s) || Object.prototype.hasOwnProperty.call(gt, s) || i.push(s);
3156
+ function vi(e = {}, t = {}) {
3157
+ const a = t.warn || Bt, o = e && typeof e == "object" ? e : {}, s = {}, i = [];
3158
+ for (const r of gt)
3159
+ Object.prototype.hasOwnProperty.call(o, r) && (s[r] = o[r]);
3160
+ for (const [r, n] of Object.entries(mt))
3161
+ Object.prototype.hasOwnProperty.call(o, r) && (Object.prototype.hasOwnProperty.call(s, n) || (s[n] = o[r]));
3162
+ for (const r of Object.keys(o))
3163
+ gt.has(r) || Object.prototype.hasOwnProperty.call(mt, r) || i.push(r);
3164
3164
  if (i.length) {
3165
- const s = i.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3165
+ const r = i.some((n) => n === "name" || n === "slug" || n === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3166
3166
  a(
3167
- `Notefully.identify: ignoring unknown key(s): ${i.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + s
3167
+ `Notefully.identify: ignoring unknown key(s): ${i.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + r
3168
3168
  );
3169
3169
  }
3170
- return r;
3171
- }
3172
- function mi(e = {}, t = {}) {
3173
- const a = t.warn || Mt, o = e && typeof e == "object" ? e : {}, r = Object.keys(o).filter((i) => !mt.has(i));
3174
- if (r.length)
3175
- for (const i of r) {
3176
- if (ht[i]) {
3177
- a(`Notefully.init: ignoring "${i}". ${ht[i]}`);
3170
+ return s;
3171
+ }
3172
+ function ki(e = {}, t = {}) {
3173
+ const a = t.warn || Bt, o = e && typeof e == "object" ? e : {}, s = Object.keys(o).filter((i) => !ht.has(i));
3174
+ if (s.length)
3175
+ for (const i of s) {
3176
+ if (ft[i]) {
3177
+ a(`Notefully.init: ignoring "${i}". ${ft[i]}`);
3178
3178
  continue;
3179
3179
  }
3180
3180
  a(
3181
- `Notefully.init: ignoring unknown key "${i}". Supported: ${[...mt].join(", ")}.`
3181
+ `Notefully.init: ignoring unknown key "${i}". Supported: ${[...ht].join(", ")}.`
3182
3182
  );
3183
3183
  }
3184
3184
  }
3185
- function Mt(e) {
3185
+ function Bt(e) {
3186
3186
  typeof console < "u" && typeof console.warn == "function" && console.warn(e);
3187
3187
  }
3188
- const hi = 80;
3189
- function fi() {
3188
+ const yt = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, bi = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3189
+ function vt(e) {
3190
+ if (e instanceof Error)
3191
+ return e.stack || e.message || String(e);
3192
+ if (typeof e == "string")
3193
+ return e;
3194
+ try {
3195
+ return JSON.stringify(e);
3196
+ } catch {
3197
+ return String(e);
3198
+ }
3199
+ }
3200
+ function Je(e) {
3201
+ if (!e || typeof e != "string")
3202
+ return "";
3203
+ let t = e.replace(/[\u0000-\u001F\u007F]/g, "").trim();
3204
+ return t ? (yt.test(t) && (t = t.split(";").map((a) => a.trim()).filter((a) => a && !yt.test(a)).join("; "), t && !t.endsWith(";") && (t += ";")), t.slice(0, 500)) : "";
3205
+ }
3206
+ function wi(e = []) {
3207
+ if (!e.length)
3208
+ return { text: "", segments: [{ text: "", style: null }] };
3209
+ const t = e[0];
3210
+ if (typeof t != "string" || !t.includes("%c")) {
3211
+ const r = e.map(vt).join(" ");
3212
+ return { text: r, segments: [{ text: r, style: null }] };
3213
+ }
3214
+ const a = t.split("%c"), o = [];
3215
+ let s = 1;
3216
+ for (let r = 0; r < a.length; r++) {
3217
+ const n = a[r];
3218
+ if (r === 0) {
3219
+ n && o.push({ text: n, style: null });
3220
+ continue;
3221
+ }
3222
+ const u = s < e.length ? String(e[s++] ?? "") : "", d = Je(u) || null;
3223
+ o.push({ text: n, style: d });
3224
+ }
3225
+ if (s < e.length) {
3226
+ const r = e.slice(s).map(vt).join(" ");
3227
+ r && o.push({
3228
+ text: (o.length ? " " : "") + r,
3229
+ style: null
3230
+ });
3231
+ }
3232
+ return {
3233
+ text: o.map((r) => r.text).join(""),
3234
+ segments: o.length ? o : [{ text: "", style: null }]
3235
+ };
3236
+ }
3237
+ function Si(e) {
3238
+ const t = String(e ?? "");
3239
+ if (!t.includes("%c"))
3240
+ return [{ text: t, style: null }];
3241
+ const a = t.split("%c"), o = a[a.length - 1], s = o.match(bi);
3242
+ let i = "";
3243
+ if (s) {
3244
+ const u = s.index, d = /\s/.test(o[u]) ? u + 1 : u;
3245
+ /^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""), i = o.slice(d).trim());
3246
+ }
3247
+ const r = Je(i) || null, n = [];
3248
+ for (let u = 0; u < a.length; u++) {
3249
+ const d = a[u];
3250
+ if (u === 0) {
3251
+ d && n.push({ text: d, style: null });
3252
+ continue;
3253
+ }
3254
+ n.push({
3255
+ text: d,
3256
+ style: u === 1 ? r : null
3257
+ });
3258
+ }
3259
+ return n.length ? n : [{ text: t, style: null }];
3260
+ }
3261
+ function Nt(e = {}) {
3262
+ return Array.isArray(e.segments) && e.segments.length ? e.segments.map((t) => ({
3263
+ text: String((t == null ? void 0 : t.text) ?? ""),
3264
+ style: Je(t == null ? void 0 : t.style) || null
3265
+ })) : Si(e.text);
3266
+ }
3267
+ function Ai(e = {}) {
3268
+ return Nt(e).map((a) => a.text).join("");
3269
+ }
3270
+ function kt(e) {
3271
+ return String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3272
+ }
3273
+ function Ci(e = {}) {
3274
+ return Nt(e).map((t) => {
3275
+ const a = kt(t.text);
3276
+ return t.style ? `<span class="nf-console-styled" style="${kt(t.style)}">${a}</span>` : a;
3277
+ }).join("");
3278
+ }
3279
+ const zi = 80;
3280
+ function ji() {
3190
3281
  const e = [], t = {};
3191
3282
  let a = !1;
3192
- const o = (i, s) => {
3193
- let l = "";
3283
+ const o = (i, r) => {
3284
+ let n = "", u = null;
3194
3285
  try {
3195
- l = s.map((u) => u instanceof Error ? u.stack || u.message : typeof u == "string" ? u : JSON.stringify(u)).join(" ");
3286
+ const p = wi(r);
3287
+ n = p.text, u = p.segments;
3196
3288
  } catch {
3197
- l = String(s[0]);
3289
+ n = String(r[0]), u = [{ text: n, style: null }];
3198
3290
  }
3199
- e.push({
3291
+ const d = {
3200
3292
  level: i,
3201
- text: l.slice(0, 2e3),
3293
+ text: n.slice(0, 2e3),
3202
3294
  at: Date.now()
3203
- }), e.length > hi && e.shift();
3295
+ };
3296
+ u && u.some((p) => p.style) && (d.segments = u.map((p) => ({
3297
+ text: String(p.text || "").slice(0, 2e3),
3298
+ style: p.style || null
3299
+ }))), e.push(d), e.length > zi && e.shift();
3204
3300
  };
3205
3301
  return {
3206
3302
  hook: () => {
3207
3303
  a || typeof window > "u" || (a = !0, ["log", "info", "warn", "error"].forEach((i) => {
3208
- t[i] = console[i].bind(console), console[i] = (...s) => {
3209
- o(i, s), t[i](...s);
3304
+ t[i] = console[i].bind(console), console[i] = (...r) => {
3305
+ o(i, r), t[i](...r);
3210
3306
  };
3211
3307
  }), window.addEventListener("error", (i) => {
3212
3308
  o("error", [i.message || "window.error"]);
@@ -3219,10 +3315,10 @@ function fi() {
3219
3315
  }
3220
3316
  };
3221
3317
  }
3222
- function yi(e) {
3318
+ function Ei(e) {
3223
3319
  const t = window.SpeechRecognition || window.webkitSpeechRecognition;
3224
3320
  let a = null, o = !1;
3225
- const r = () => {
3321
+ const s = () => {
3226
3322
  if (o = !1, a)
3227
3323
  try {
3228
3324
  a.stop();
@@ -3230,13 +3326,13 @@ function yi(e) {
3230
3326
  }
3231
3327
  };
3232
3328
  return {
3233
- start: (s = {}) => {
3329
+ start: (r = {}) => {
3234
3330
  if (!t)
3235
3331
  throw new Error(m("status.speechUnsupported"));
3236
- return o ? (r(), !1) : (a = new t(), a.continuous = !0, a.interimResults = !0, a.lang = s.lang || navigator.language || "en-US", a.onresult = (l) => {
3332
+ return o ? (s(), !1) : (a = new t(), a.continuous = !0, a.interimResults = !0, a.lang = r.lang || navigator.language || "en-US", a.onresult = (n) => {
3237
3333
  let u = "";
3238
- for (let d = l.resultIndex; d < l.results.length; d += 1)
3239
- l.results[d].isFinal && (u += l.results[d][0].transcript);
3334
+ for (let d = n.resultIndex; d < n.results.length; d += 1)
3335
+ n.results[d].isFinal && (u += n.results[d][0].transcript);
3240
3336
  u && e(u);
3241
3337
  }, a.onerror = () => {
3242
3338
  o = !1;
@@ -3244,27 +3340,27 @@ function yi(e) {
3244
3340
  o = !1;
3245
3341
  }, a.start(), o = !0, !0);
3246
3342
  },
3247
- stop: r,
3343
+ stop: s,
3248
3344
  isSupported: () => !!t,
3249
3345
  isActive: () => o
3250
3346
  };
3251
3347
  }
3252
- const vi = 60 * 1e3;
3253
- function ki({ onStart: e, onStop: t, onError: a }) {
3254
- let o = null, r = null, i = [], s = null;
3255
- const l = () => {
3256
- if (s && (clearTimeout(s), s = null), r && r.state !== "inactive")
3348
+ const Ri = 60 * 1e3;
3349
+ function Pi({ onStart: e, onStop: t, onError: a }) {
3350
+ let o = null, s = null, i = [], r = null;
3351
+ const n = () => {
3352
+ if (r && (clearTimeout(r), r = null), s && s.state !== "inactive")
3257
3353
  try {
3258
- r.stop();
3354
+ s.stop();
3259
3355
  } catch {
3260
3356
  }
3261
3357
  o && (o.getTracks().forEach((p) => p.stop()), o = null);
3262
3358
  }, u = () => {
3263
- if (r && r.state === "recording") {
3264
- r.stop();
3359
+ if (s && s.state === "recording") {
3360
+ s.stop();
3265
3361
  return;
3266
3362
  }
3267
- l(), t(null);
3363
+ n(), t(null);
3268
3364
  };
3269
3365
  return { start: async () => {
3270
3366
  var p, y;
@@ -3275,17 +3371,17 @@ function ki({ onStart: e, onStop: t, onError: a }) {
3275
3371
  audio: !1,
3276
3372
  preferCurrentTab: !0,
3277
3373
  selfBrowserSurface: "include"
3278
- }), i = [], r = new MediaRecorder(o, {
3374
+ }), i = [], s = new MediaRecorder(o, {
3279
3375
  mimeType: MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm"
3280
- }), r.ondataavailable = (v) => {
3376
+ }), s.ondataavailable = (v) => {
3281
3377
  v.data && v.data.size && i.push(v.data);
3282
- }, r.onstop = () => {
3283
- const v = i.length ? new Blob(i, { type: r.mimeType || "video/webm" }) : null;
3284
- l(), t(v);
3285
- }, (y = o.getVideoTracks()[0]) == null || y.addEventListener("ended", () => u()), r.start(), s = setTimeout(u, vi);
3378
+ }, s.onstop = () => {
3379
+ const v = i.length ? new Blob(i, { type: s.mimeType || "video/webm" }) : null;
3380
+ n(), t(v);
3381
+ }, (y = o.getVideoTracks()[0]) == null || y.addEventListener("ended", () => u()), s.start(), r = setTimeout(u, Ri);
3286
3382
  }, stop: u };
3287
3383
  }
3288
- function bi() {
3384
+ function Li() {
3289
3385
  const e = /* @__PURE__ */ new Set();
3290
3386
  return {
3291
3387
  alloc() {
@@ -3304,15 +3400,15 @@ function bi() {
3304
3400
  };
3305
3401
  }
3306
3402
  const Oe = { x: 0, y: 0, w: 1, h: 1 };
3307
- function Je() {
3308
- const e = bi();
3403
+ function Ye() {
3404
+ const e = Li();
3309
3405
  let t = [], a = { ...Oe }, o = 1;
3310
3406
  return {
3311
- list: () => t.filter((i) => Ai(i, a)),
3407
+ list: () => t.filter((i) => Ti(i, a)),
3312
3408
  all: () => t.slice(),
3313
3409
  crop: () => ({ ...a }),
3314
3410
  setCrop(i) {
3315
- return a = Si(i), a;
3411
+ return a = Ui(i), a;
3316
3412
  },
3317
3413
  resetCrop() {
3318
3414
  return a = { ...Oe }, a;
@@ -3320,8 +3416,8 @@ function Je() {
3320
3416
  isCropped() {
3321
3417
  return a.x > 1e-6 || a.y > 1e-6 || a.w < 1 - 1e-6 || a.h < 1 - 1e-6;
3322
3418
  },
3323
- add(i, s) {
3324
- const l = {
3419
+ add(i, r) {
3420
+ const n = {
3325
3421
  id: `s${o++}`,
3326
3422
  type: i,
3327
3423
  number: e.alloc(),
@@ -3331,20 +3427,20 @@ function Je() {
3331
3427
  h: i === "arrow" ? 0.05 : 0.16,
3332
3428
  x2: 0.4,
3333
3429
  y2: 0.28,
3334
- ...s
3430
+ ...r
3335
3431
  };
3336
- return t.push(l), l;
3432
+ return t.push(n), n;
3337
3433
  },
3338
- update(i, s) {
3339
- const l = t.find((u) => u.id === i);
3340
- return l ? (Object.assign(l, s), l) : null;
3434
+ update(i, r) {
3435
+ const n = t.find((u) => u.id === i);
3436
+ return n ? (Object.assign(n, r), n) : null;
3341
3437
  },
3342
3438
  remove(i) {
3343
- const s = t.findIndex((u) => u.id === i);
3344
- if (s < 0)
3439
+ const r = t.findIndex((u) => u.id === i);
3440
+ if (r < 0)
3345
3441
  return null;
3346
- const [l] = t.splice(s, 1);
3347
- return e.free(l.number), l;
3442
+ const [n] = t.splice(r, 1);
3443
+ return e.free(n.number), n;
3348
3444
  },
3349
3445
  reset() {
3350
3446
  for (t = [], a = { ...Oe }, o = 1; e.peekUsed().length; )
@@ -3352,28 +3448,28 @@ function Je() {
3352
3448
  }
3353
3449
  };
3354
3450
  }
3355
- function wi(e, t) {
3356
- const a = Number(t == null ? void 0 : t.w) || 1, o = Number(t == null ? void 0 : t.h) || 1, r = Number(t == null ? void 0 : t.x) || 0, i = Number(t == null ? void 0 : t.y) || 0;
3357
- return (Array.isArray(e) ? e : []).map((s) => {
3358
- const l = {
3359
- ...s,
3360
- x: (s.x - r) / a,
3361
- y: (s.y - i) / o,
3362
- w: (s.w || 0) / a,
3363
- h: (s.h || 0) / o
3451
+ function xi(e, t) {
3452
+ const a = Number(t == null ? void 0 : t.w) || 1, o = Number(t == null ? void 0 : t.h) || 1, s = Number(t == null ? void 0 : t.x) || 0, i = Number(t == null ? void 0 : t.y) || 0;
3453
+ return (Array.isArray(e) ? e : []).map((r) => {
3454
+ const n = {
3455
+ ...r,
3456
+ x: (r.x - s) / a,
3457
+ y: (r.y - i) / o,
3458
+ w: (r.w || 0) / a,
3459
+ h: (r.h || 0) / o
3364
3460
  };
3365
- return Number.isFinite(s.x2) && (l.x2 = (s.x2 - r) / a), Number.isFinite(s.y2) && (l.y2 = (s.y2 - i) / o), l;
3461
+ return Number.isFinite(r.x2) && (n.x2 = (r.x2 - s) / a), Number.isFinite(r.y2) && (n.y2 = (r.y2 - i) / o), n;
3366
3462
  });
3367
3463
  }
3368
- function Si(e) {
3369
- const t = Math.min(Math.max(e.x, 0), 0.95), a = Math.min(Math.max(e.y, 0), 0.95), o = Math.min(Math.max(e.w, 0.05), 1 - t), r = Math.min(Math.max(e.h, 0.05), 1 - a);
3370
- return { x: t, y: a, w: o, h: r };
3464
+ function Ui(e) {
3465
+ const t = Math.min(Math.max(e.x, 0), 0.95), a = Math.min(Math.max(e.y, 0), 0.95), o = Math.min(Math.max(e.w, 0.05), 1 - t), s = Math.min(Math.max(e.h, 0.05), 1 - a);
3466
+ return { x: t, y: a, w: o, h: s };
3371
3467
  }
3372
- function Ai(e, t) {
3468
+ function Ti(e, t) {
3373
3469
  const a = e.type === "arrow" ? (e.x + (e.x2 ?? e.x)) / 2 : e.x + (e.w || 0) / 2, o = e.type === "arrow" ? (e.y + (e.y2 ?? e.y)) / 2 : e.y + (e.h || 0) / 2;
3374
3470
  return a >= t.x && o >= t.y && a <= t.x + t.w && o <= t.y + t.h;
3375
3471
  }
3376
- function Ye(e) {
3472
+ function Xe(e) {
3377
3473
  const t = Math.max(1, Number(e) || 1);
3378
3474
  return {
3379
3475
  stroke: Math.max(2, t * 75e-4),
@@ -3383,20 +3479,20 @@ function Ye(e) {
3383
3479
  arrowHeadAngle: 0.4
3384
3480
  };
3385
3481
  }
3386
- function zi(e, {
3482
+ function Fi(e, {
3387
3483
  stickers: t = [],
3388
3484
  crop: a = { x: 0, y: 0, w: 1, h: 1 },
3389
3485
  width: o,
3390
- height: r,
3486
+ height: s,
3391
3487
  colors: i = {}
3392
3488
  }) {
3393
- const s = i.mark || "#fdd341", l = i.markText || "#2a2140", u = Ye(o);
3394
- e.save(), e.lineWidth = u.stroke, e.lineCap = "round", e.lineJoin = "round", e.strokeStyle = s, e.fillStyle = s, e.font = `700 ${Math.round(u.fontSize)}px ui-sans-serif, system-ui, sans-serif`, t.forEach((d) => {
3395
- const p = Ne(d.x, a, o), y = Ke(d.y, a, r), v = d.w / a.w * o, b = d.h / a.h * r, z = u.stroke / 2;
3489
+ const r = i.mark || "#fdd341", n = i.markText || "#2a2140", u = Xe(o);
3490
+ e.save(), e.lineWidth = u.stroke, e.lineCap = "round", e.lineJoin = "round", e.strokeStyle = r, e.fillStyle = r, e.font = `700 ${Math.round(u.fontSize)}px ui-sans-serif, system-ui, sans-serif`, t.forEach((d) => {
3491
+ const p = Ne(d.x, a, o), y = Ke(d.y, a, s), v = d.w / a.w * o, b = d.h / a.h * s, C = u.stroke / 2;
3396
3492
  if (d.type === "rect")
3397
3493
  e.strokeRect(
3398
- p + z,
3399
- y + z,
3494
+ p + C,
3495
+ y + C,
3400
3496
  Math.max(0, v - u.stroke),
3401
3497
  Math.max(0, b - u.stroke)
3402
3498
  );
@@ -3404,20 +3500,20 @@ function zi(e, {
3404
3500
  e.beginPath(), e.ellipse(
3405
3501
  p + v / 2,
3406
3502
  y + b / 2,
3407
- Math.max(0.5, v / 2 - z),
3408
- Math.max(0.5, b / 2 - z),
3503
+ Math.max(0.5, v / 2 - C),
3504
+ Math.max(0.5, b / 2 - C),
3409
3505
  0,
3410
3506
  0,
3411
3507
  Math.PI * 2
3412
3508
  ), e.stroke();
3413
3509
  else if (d.type === "arrow") {
3414
- const P = Ne(d.x2 ?? d.x + d.w, a, o), $ = Ke(d.y2 ?? d.y, a, r);
3415
- ji(e, p, y, P, $, u);
3510
+ const P = Ne(d.x2 ?? d.x + d.w, a, o), $ = Ke(d.y2 ?? d.y, a, s);
3511
+ Di(e, p, y, P, $, u);
3416
3512
  }
3417
3513
  if (d.number == null || d.number === "")
3418
3514
  return;
3419
- const E = Ci(d, a, o, r, p, y, v), M = String(d.number);
3420
- e.beginPath(), e.arc(E.x, E.y, u.badgeRadius, 0, Math.PI * 2), e.fillStyle = s, e.fill(), e.fillStyle = l, e.textAlign = "center", e.textBaseline = "middle", e.fillText(M, E.x, E.y + 0.5), e.fillStyle = s;
3515
+ const E = Oi(d, a, o, s, p, y, v), M = String(d.number);
3516
+ e.beginPath(), e.arc(E.x, E.y, u.badgeRadius, 0, Math.PI * 2), e.fillStyle = r, e.fill(), e.fillStyle = n, e.textAlign = "center", e.textBaseline = "middle", e.fillText(M, E.x, E.y + 0.5), e.fillStyle = r;
3421
3517
  }), e.restore();
3422
3518
  }
3423
3519
  function Ne(e, t, a) {
@@ -3426,47 +3522,47 @@ function Ne(e, t, a) {
3426
3522
  function Ke(e, t, a) {
3427
3523
  return (e - t.y) / t.h * a;
3428
3524
  }
3429
- function Ci(e, t, a, o, r, i, s) {
3525
+ function Oi(e, t, a, o, s, i, r) {
3430
3526
  if (e.type === "arrow") {
3431
- const l = Ne(e.x2 ?? e.x + e.w, t, a), u = Ke(e.y2 ?? e.y, t, o);
3527
+ const n = Ne(e.x2 ?? e.x + e.w, t, a), u = Ke(e.y2 ?? e.y, t, o);
3432
3528
  return {
3433
- x: (r + l) / 2,
3529
+ x: (s + n) / 2,
3434
3530
  y: (i + u) / 2
3435
3531
  };
3436
3532
  }
3437
- return { x: r + s / 2, y: i };
3533
+ return { x: s + r / 2, y: i };
3438
3534
  }
3439
- function It(e, t, a, o, r) {
3440
- const i = Math.atan2(o - t, a - e), s = r.arrowHead, l = Math.min(r.stroke, s * 0.2), u = a, d = o, p = a - Math.cos(i) * s, y = o - Math.sin(i) * s, v = {
3441
- x: u - s * Math.cos(i - r.arrowHeadAngle),
3442
- y: d - s * Math.sin(i - r.arrowHeadAngle)
3535
+ function Kt(e, t, a, o, s) {
3536
+ const i = Math.atan2(o - t, a - e), r = s.arrowHead, n = Math.min(s.stroke, r * 0.2), u = a, d = o, p = a - Math.cos(i) * r, y = o - Math.sin(i) * r, v = {
3537
+ x: u - r * Math.cos(i - s.arrowHeadAngle),
3538
+ y: d - r * Math.sin(i - s.arrowHeadAngle)
3443
3539
  }, b = {
3444
- x: u - s * Math.cos(i + r.arrowHeadAngle),
3445
- y: d - s * Math.sin(i + r.arrowHeadAngle)
3446
- }, z = {
3447
- x: a - Math.cos(i) * l,
3448
- y: o - Math.sin(i) * l
3540
+ x: u - r * Math.cos(i + s.arrowHeadAngle),
3541
+ y: d - r * Math.sin(i + s.arrowHeadAngle)
3542
+ }, C = {
3543
+ x: a - Math.cos(i) * n,
3544
+ y: o - Math.sin(i) * n
3449
3545
  };
3450
- return { angle: i, tipX: u, tipY: d, baseX: p, baseY: y, left: v, right: b, shaftEnd: z };
3546
+ return { angle: i, tipX: u, tipY: d, baseX: p, baseY: y, left: v, right: b, shaftEnd: C };
3451
3547
  }
3452
- function ji(e, t, a, o, r, i) {
3453
- const s = It(t, a, o, r, i);
3454
- e.beginPath(), e.moveTo(t, a), e.lineTo(s.shaftEnd.x, s.shaftEnd.y), e.stroke(), e.beginPath(), e.moveTo(s.tipX, s.tipY), e.lineTo(s.left.x, s.left.y), e.lineTo(s.right.x, s.right.y), e.closePath(), e.fill();
3548
+ function Di(e, t, a, o, s, i) {
3549
+ const r = Kt(t, a, o, s, i);
3550
+ e.beginPath(), e.moveTo(t, a), e.lineTo(r.shaftEnd.x, r.shaftEnd.y), e.stroke(), e.beginPath(), e.moveTo(r.tipX, r.tipY), e.lineTo(r.left.x, r.left.y), e.lineTo(r.right.x, r.right.y), e.closePath(), e.fill();
3455
3551
  }
3456
- function Ei(e, t) {
3457
- return Vt(e, t, [], {});
3552
+ function Mi(e, t) {
3553
+ return Ht(e, t, [], {});
3458
3554
  }
3459
- function Ri(e, t, a, o = {}) {
3460
- return Vt(e, t, a, o);
3555
+ function Ii(e, t, a, o = {}) {
3556
+ return Ht(e, t, a, o);
3461
3557
  }
3462
- function Vt(e, t, a, o) {
3463
- return new Promise((r, i) => {
3464
- const s = new Image();
3465
- s.onload = () => {
3466
- const l = Math.round(t.x * s.width), u = Math.round(t.y * s.height), d = Math.max(1, Math.round(t.w * s.width)), p = Math.max(1, Math.round(t.h * s.height)), y = document.createElement("canvas");
3558
+ function Ht(e, t, a, o) {
3559
+ return new Promise((s, i) => {
3560
+ const r = new Image();
3561
+ r.onload = () => {
3562
+ const n = Math.round(t.x * r.width), u = Math.round(t.y * r.height), d = Math.max(1, Math.round(t.w * r.width)), p = Math.max(1, Math.round(t.h * r.height)), y = document.createElement("canvas");
3467
3563
  y.width = d, y.height = p;
3468
3564
  const v = y.getContext("2d");
3469
- v.drawImage(s, l, u, d, p, 0, 0, d, p), a != null && a.length && zi(v, {
3565
+ v.drawImage(r, n, u, d, p, 0, 0, d, p), a != null && a.length && Fi(v, {
3470
3566
  stickers: a,
3471
3567
  crop: t,
3472
3568
  width: d,
@@ -3477,12 +3573,12 @@ function Vt(e, t, a, o) {
3477
3573
  i(new Error("Could not encode screenshot"));
3478
3574
  return;
3479
3575
  }
3480
- r(b);
3576
+ s(b);
3481
3577
  }, "image/png");
3482
- }, s.onerror = () => i(new Error("Could not load screenshot")), s.src = e;
3578
+ }, r.onerror = () => i(new Error("Could not load screenshot")), r.src = e;
3483
3579
  });
3484
3580
  }
3485
- const Pi = [
3581
+ const Vi = [
3486
3582
  "url",
3487
3583
  "title",
3488
3584
  "userAgent",
@@ -3493,14 +3589,14 @@ const Pi = [
3493
3589
  "viewport",
3494
3590
  "user"
3495
3591
  ];
3496
- function Li(e) {
3592
+ function $i(e) {
3497
3593
  return !e || typeof e != "object" ? !1 : !!(e.userId || e.email || e.displayName);
3498
3594
  }
3499
- function xi(e = {}) {
3595
+ function Bi(e = {}) {
3500
3596
  const t = [];
3501
- for (const a of Pi) {
3597
+ for (const a of Vi) {
3502
3598
  const o = e[a];
3503
- o == null || o === "" || a === "user" && !Li(o) || t.push({
3599
+ o == null || o === "" || a === "user" && !$i(o) || t.push({
3504
3600
  key: a,
3505
3601
  label: m(`diag.${a}`),
3506
3602
  value: o,
@@ -3509,16 +3605,19 @@ function xi(e = {}) {
3509
3605
  }
3510
3606
  return t;
3511
3607
  }
3512
- function Ui(e = []) {
3513
- return e.map((t, a) => ({
3514
- id: `log-${a}-${t.at || 0}`,
3515
- level: t.level || "log",
3516
- text: String(t.text || ""),
3517
- at: t.at || 0,
3518
- redacted: !1
3519
- }));
3608
+ function Ni(e = []) {
3609
+ return e.map((t, a) => {
3610
+ const o = {
3611
+ id: `log-${a}-${t.at || 0}`,
3612
+ level: t.level || "log",
3613
+ text: String(t.text || ""),
3614
+ at: t.at || 0,
3615
+ redacted: !1
3616
+ };
3617
+ return Array.isArray(t.segments) && t.segments.length && (o.segments = t.segments), o;
3618
+ });
3520
3619
  }
3521
- function Ti(e = []) {
3620
+ function Ki(e = []) {
3522
3621
  if (!e.length)
3523
3622
  return { checked: !1, indeterminate: !1 };
3524
3623
  const t = e.filter((a) => a.redacted).length;
@@ -3529,11 +3628,11 @@ function be(e, t) {
3529
3628
  a.redacted = !!t;
3530
3629
  });
3531
3630
  }
3532
- function Fi(e = {}) {
3533
- const t = e.diagnostics || [], a = e.logs || [], o = t.some((i) => !i.redacted), r = a.length > 0 && a.some((i) => !i.redacted);
3534
- return o && r ? m("privacy.disclosure.both") : o ? m("privacy.disclosure.diagnostics") : r ? m("privacy.disclosure.logs") : "";
3631
+ function Hi(e = {}) {
3632
+ const t = e.diagnostics || [], a = e.logs || [], o = t.some((i) => !i.redacted), s = a.length > 0 && a.some((i) => !i.redacted);
3633
+ return o && s ? m("privacy.disclosure.both") : o ? m("privacy.disclosure.diagnostics") : s ? m("privacy.disclosure.logs") : "";
3535
3634
  }
3536
- function Oi(e) {
3635
+ function Gi(e) {
3537
3636
  if (e == null)
3538
3637
  return "";
3539
3638
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
@@ -3544,16 +3643,19 @@ function Oi(e) {
3544
3643
  return String(e);
3545
3644
  }
3546
3645
  }
3547
- function Di(e = {}) {
3646
+ function qi(e = {}) {
3548
3647
  const t = {};
3549
3648
  e.author != null && e.author !== "" && (t.author = e.author);
3550
3649
  for (const o of e.diagnostics || [])
3551
3650
  o.redacted || (t[o.key] = o.value);
3552
- const a = (e.logs || []).filter((o) => !o.redacted).map((o) => ({
3553
- level: o.level,
3554
- text: o.text,
3555
- at: o.at
3556
- }));
3651
+ const a = (e.logs || []).filter((o) => !o.redacted).map((o) => {
3652
+ const s = {
3653
+ level: o.level,
3654
+ text: o.text,
3655
+ at: o.at
3656
+ };
3657
+ return Array.isArray(o.segments) && o.segments.length && (s.segments = o.segments), s;
3658
+ });
3557
3659
  return t.console = a, t;
3558
3660
  }
3559
3661
  const W = [
@@ -3561,20 +3663,20 @@ const W = [
3561
3663
  { id: "idea", label: "Idea" },
3562
3664
  { id: "other", label: "Other" }
3563
3665
  ];
3564
- function ft(e) {
3666
+ function bt(e) {
3565
3667
  return String(e || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
3566
3668
  }
3567
3669
  function De(e) {
3568
3670
  const t = String(e || "").trim();
3569
3671
  return t ? t.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
3570
3672
  }
3571
- function Mi(e) {
3673
+ function _i(e) {
3572
3674
  if (!Array.isArray(e) || !e.length)
3573
3675
  return W.map((o) => ({ ...o }));
3574
3676
  const t = /* @__PURE__ */ new Set(), a = [];
3575
3677
  for (const o of e) {
3576
- let r = "", i = "";
3577
- typeof o == "string" || typeof o == "number" ? (r = ft(o), i = De(r)) : o && typeof o == "object" && (r = ft(o.id ?? o.value ?? o.kind), i = String(o.label || o.name || De(r)).trim() || De(r)), !(!r || t.has(r)) && (t.add(r), a.push({ id: r, label: i }));
3678
+ let s = "", i = "";
3679
+ typeof o == "string" || typeof o == "number" ? (s = bt(o), i = De(s)) : o && typeof o == "object" && (s = bt(o.id ?? o.value ?? o.kind), i = String(o.label || o.name || De(s)).trim() || De(s)), !(!s || t.has(s)) && (t.add(s), a.push({ id: s, label: i }));
3578
3680
  }
3579
3681
  return a.length ? a : W.map((o) => ({ ...o }));
3580
3682
  }
@@ -3583,7 +3685,7 @@ function Ee(e) {
3583
3685
  const t = Array.isArray(e) && e.length ? e : W;
3584
3686
  return t.some((o) => o.id === "bug") ? "bug" : ((a = t[0]) == null ? void 0 : a.id) || "other";
3585
3687
  }
3586
- const Ii = ["maker", "all-business", "brighter-day", "quiet-night"], $t = "maker", Vi = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), He = 0.02, yt = 0.05, $i = `
3688
+ const Wi = ["maker", "all-business", "brighter-day", "quiet-night"], Gt = "maker", Zi = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), He = 0.02, wt = 0.05, Ji = `
3587
3689
  <svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
3588
3690
  <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"/>
3589
3691
  <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"/>
@@ -3604,9 +3706,9 @@ const L = {
3604
3706
  audio: U('<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"/>'),
3605
3707
  video: U('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
3606
3708
  openArrow: U('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>')
3607
- }, Bt = fi();
3608
- Bt.hook();
3609
- const Nt = 10, Bi = 80, Kt = "notefully.author", Ht = "notefully.kind", Gt = "notefully.redactSections";
3709
+ }, qt = ji();
3710
+ qt.hook();
3711
+ const _t = 10, Yi = 80, Wt = "notefully.author", Zt = "notefully.kind", Jt = "notefully.redactSections";
3610
3712
  let c = {
3611
3713
  endpoint: "",
3612
3714
  projectKey: "",
@@ -3614,9 +3716,9 @@ let c = {
3614
3716
  name: "",
3615
3717
  targets: null,
3616
3718
  hideLauncher: !1,
3617
- theme: $t,
3719
+ theme: Gt,
3618
3720
  video: !1,
3619
- consoleLogLimit: Nt,
3721
+ consoleLogLimit: _t,
3620
3722
  kinds: W.map((e) => ({ ...e })),
3621
3723
  kindsCustom: !1,
3622
3724
  capture: null,
@@ -3626,28 +3728,28 @@ let c = {
3626
3728
  displayLink: !1,
3627
3729
  locale: null,
3628
3730
  translations: null
3629
- }, ue = !1, Me = !1, I = {}, g = null, n = {}, k = Je(), F = "", ie = "", V = null, _ = Ee(W), K = null, T = null, S = null, w = null, ge = null, J = null, ne = null, B = { w: 0, h: 0 }, Ie = !1, Re = !1, Pe = !1, D = [], O = [], H = !1;
3731
+ }, ue = !1, Me = !1, I = {}, g = null, l = {}, k = Ye(), F = "", ie = "", V = null, _ = Ee(W), K = null, T = null, S = null, w = null, ge = null, J = null, ne = null, B = { w: 0, h: 0 }, Ie = !1, Re = !1, Pe = !1, D = [], O = [], H = !1;
3630
3732
  function f(e) {
3631
3733
  return g.querySelector(e);
3632
3734
  }
3633
- function qt(e) {
3735
+ function Yt(e) {
3634
3736
  const t = String(e || "").trim().toLowerCase().replace(/\s+/g, "-");
3635
- return Ii.includes(t) ? t : $t;
3737
+ return Wi.includes(t) ? t : Gt;
3636
3738
  }
3637
- function vt(e, t) {
3739
+ function St(e, t) {
3638
3740
  return g && getComputedStyle(g).getPropertyValue(e).trim() || t;
3639
3741
  }
3640
- async function Ni(e) {
3742
+ async function Xi(e) {
3641
3743
  return (await fetch(e)).blob();
3642
3744
  }
3643
3745
  function A(e, t = !1) {
3644
- n.status && (n.status.textContent = e || "", ge && (clearTimeout(ge), ge = null), e && !t && (ge = setTimeout(() => {
3645
- n.status.textContent = "";
3746
+ l.status && (l.status.textContent = e || "", ge && (clearTimeout(ge), ge = null), e && !t && (ge = setTimeout(() => {
3747
+ l.status.textContent = "";
3646
3748
  }, 4e3)));
3647
3749
  }
3648
- function Xe() {
3750
+ function Qe() {
3649
3751
  return g && document.body.contains(g) || (g = document.createElement("div"), g.id = "notefully", g.innerHTML = `
3650
- <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${$i}</button>
3752
+ <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${Ji}</button>
3651
3753
  <div class="nf-dialog" hidden>
3652
3754
  <div class="nf-panel">
3653
3755
  <div class="nf-panel-body">
@@ -3694,7 +3796,7 @@ function Xe() {
3694
3796
  </div>
3695
3797
  </div>
3696
3798
  <button class="nf-stop-video" type="button" hidden data-i18n-text="tool.stopVideo"></button>
3697
- `, document.body.appendChild(g), n = {
3799
+ `, document.body.appendChild(g), l = {
3698
3800
  launcher: f(".nf-launcher"),
3699
3801
  dialog: f(".nf-dialog"),
3700
3802
  panel: f(".nf-panel"),
@@ -3726,21 +3828,21 @@ function Xe() {
3726
3828
  resetCrop: f(".nf-reset-crop"),
3727
3829
  submit: f(".nf-submit"),
3728
3830
  shot: null
3729
- }, Gi(), re()), g;
3831
+ }, ts(), se()), g;
3730
3832
  }
3731
- function re() {
3833
+ function se() {
3732
3834
  var e;
3733
- g && (_t(), g.dataset.theme = qt(c.theme), g.lang = fe(), g.dir = ba(fe()), c.hideLauncher ? g.setAttribute("data-nf-hidden-launcher", "") : g.removeAttribute("data-nf-hidden-launcher"), n.video && (n.video.hidden = !c.video), Ki(), D.length && D.forEach((t) => {
3835
+ g && (Xt(), g.dataset.theme = Yt(c.theme), g.lang = fe(), g.dir = za(fe()), c.hideLauncher ? g.setAttribute("data-nf-hidden-launcher", "") : g.removeAttribute("data-nf-hidden-launcher"), l.video && (l.video.hidden = !c.video), Qi(), D.length && D.forEach((t) => {
3734
3836
  t.label = m(`diag.${t.key}`);
3735
- }), Wt(), H ? ot() : at(), (e = n.dialog) != null && e.hidden && we());
3837
+ }), Qt(), H ? it() : ot(), (e = l.dialog) != null && e.hidden && we());
3736
3838
  }
3737
- function _t() {
3738
- const e = ya({
3839
+ function Xt() {
3840
+ const e = Sa({
3739
3841
  locale: c.locale == null ? void 0 : c.locale
3740
3842
  });
3741
- ka(c.translations), va(e);
3843
+ Ca(c.translations), Aa(e);
3742
3844
  }
3743
- function Ki() {
3845
+ function Qi() {
3744
3846
  if (g && (g.querySelectorAll("[data-i18n-title]").forEach((e) => {
3745
3847
  e.title = m(e.getAttribute("data-i18n-title"));
3746
3848
  }), g.querySelectorAll("[data-i18n-aria]").forEach((e) => {
@@ -3749,95 +3851,95 @@ function Ki() {
3749
3851
  e.setAttribute("placeholder", m(e.getAttribute("data-i18n-placeholder")));
3750
3852
  }), g.querySelectorAll("[data-i18n-text]").forEach((e) => {
3751
3853
  e.textContent = m(e.getAttribute("data-i18n-text"));
3752
- }), n.audio)) {
3753
- const e = n.audio.dataset.active === "true";
3854
+ }), l.audio)) {
3855
+ const e = l.audio.dataset.active === "true";
3754
3856
  xe(e);
3755
3857
  }
3756
3858
  }
3757
- function Hi(e) {
3859
+ function es(e) {
3758
3860
  if (c.kindsCustom)
3759
3861
  return e.label;
3760
3862
  const t = `kind.${e.id}`, a = m(t);
3761
3863
  return a === t ? e.label : a;
3762
3864
  }
3763
3865
  function we() {
3764
- n.launcher && (n.launcher.hidden = !!c.hideLauncher);
3866
+ l.launcher && (l.launcher.hidden = !!c.hideLauncher);
3765
3867
  }
3766
- function Gi() {
3767
- n.launcher.addEventListener("click", () => da()), f(".nf-dialog").addEventListener("click", (t) => {
3768
- Re && !Pe || t.target === n.dialog && se();
3769
- }), document.addEventListener("keydown", sa), g.querySelectorAll(".nf-tool").forEach((t) => {
3868
+ function ts() {
3869
+ l.launcher.addEventListener("click", () => ha()), f(".nf-dialog").addEventListener("click", (t) => {
3870
+ Re && !Pe || t.target === l.dialog && re();
3871
+ }), document.addEventListener("keydown", ca), g.querySelectorAll(".nf-tool").forEach((t) => {
3770
3872
  t.addEventListener("click", () => de(t.dataset.tool));
3771
- }), n.resetCrop.addEventListener("click", tr), n.canvas.addEventListener("pointerdown", Ji), n.canvas.addEventListener("dragstart", (t) => t.preventDefault());
3873
+ }), l.resetCrop.addEventListener("click", cs), l.canvas.addEventListener("pointerdown", rs), l.canvas.addEventListener("dragstart", (t) => t.preventDefault());
3772
3874
  const e = f(".nf-kind");
3773
3875
  e && e.addEventListener("click", (t) => {
3774
3876
  const a = t.target.closest("[data-kind]");
3775
- a && Qe(a.dataset.kind);
3776
- }), n.discard.addEventListener("click", ar), n.recapture.addEventListener("click", () => {
3777
- ir().catch((t) => A(t.message || m("status.recaptureFailed")));
3778
- }), n.restore.addEventListener("click", or), n.audio.addEventListener("click", rr), n.video.addEventListener("click", sr), n.stop.addEventListener("click", () => ne == null ? void 0 : ne.stop()), n.privacyChange.addEventListener("click", () => Ce(!H)), n.privacyDone.addEventListener("click", () => Ce(!1)), n.privacyScroll.addEventListener("change", kr), f(".nf-submit").addEventListener("click", () => {
3779
- pa().catch((t) => A(t.message || m("status.submitFailed")));
3780
- }), Wt(), de(null);
3781
- }
3782
- function C(e) {
3877
+ a && et(a.dataset.kind);
3878
+ }), l.discard.addEventListener("click", ps), l.recapture.addEventListener("click", () => {
3879
+ ms().catch((t) => A(t.message || m("status.recaptureFailed")));
3880
+ }), l.restore.addEventListener("click", gs), l.audio.addEventListener("click", hs), l.video.addEventListener("click", fs), l.stop.addEventListener("click", () => ne == null ? void 0 : ne.stop()), l.privacyChange.addEventListener("click", () => ze(!H)), l.privacyDone.addEventListener("click", () => ze(!1)), l.privacyScroll.addEventListener("change", Ps), f(".nf-submit").addEventListener("click", () => {
3881
+ ya().catch((t) => A(t.message || m("status.submitFailed")));
3882
+ }), Qt(), de(null);
3883
+ }
3884
+ function z(e) {
3783
3885
  return String(e || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3784
3886
  }
3785
- function Wt() {
3887
+ function Qt() {
3786
3888
  const e = g == null ? void 0 : g.querySelector(".nf-kind");
3787
3889
  if (!e)
3788
3890
  return;
3789
3891
  const t = Array.isArray(c.kinds) && c.kinds.length ? c.kinds : W;
3790
- e.innerHTML = t.map((r) => `<button type="button" data-kind="${C(r.id)}">${C(Hi(r))}</button>`).join("");
3791
- const o = t.map((r) => r.id).includes(_) ? _ : Ee(t);
3792
- Qe(o);
3892
+ e.innerHTML = t.map((s) => `<button type="button" data-kind="${z(s.id)}">${z(es(s))}</button>`).join("");
3893
+ const o = t.map((s) => s.id).includes(_) ? _ : Ee(t);
3894
+ et(o);
3793
3895
  }
3794
- function Qe(e) {
3896
+ function et(e) {
3795
3897
  _ = (c.kinds || W).map((a) => a.id).includes(e) ? e : Ee(c.kinds), g == null || g.querySelectorAll("[data-kind]").forEach((a) => {
3796
3898
  a.dataset.active = String(a.dataset.kind === _);
3797
- }), _i(_);
3899
+ }), os(_);
3798
3900
  }
3799
- function qi() {
3901
+ function as() {
3800
3902
  try {
3801
- return String(localStorage.getItem(Ht) || "").trim().toLowerCase();
3903
+ return String(localStorage.getItem(Zt) || "").trim().toLowerCase();
3802
3904
  } catch {
3803
3905
  return "";
3804
3906
  }
3805
3907
  }
3806
- function _i(e) {
3908
+ function os(e) {
3807
3909
  const t = String(e || "").trim().toLowerCase();
3808
3910
  if (t)
3809
3911
  try {
3810
- localStorage.setItem(Ht, t);
3912
+ localStorage.setItem(Zt, t);
3811
3913
  } catch {
3812
3914
  }
3813
3915
  }
3814
- function Wi() {
3815
- const e = (c.kinds || W).map((a) => a.id), t = qi();
3916
+ function is() {
3917
+ const e = (c.kinds || W).map((a) => a.id), t = as();
3816
3918
  return t && e.includes(t) ? t : Ee(c.kinds);
3817
3919
  }
3818
3920
  function de(e) {
3819
- K = Vi.has(e) ? e : null, T = null, g.querySelectorAll(".nf-tool").forEach((t) => {
3921
+ K = Zi.has(e) ? e : null, T = null, g.querySelectorAll(".nf-tool").forEach((t) => {
3820
3922
  t.dataset.active = String(t.dataset.tool === K);
3821
- }), n.canvas && (n.canvas.dataset.draw = K ? "true" : "false"), Z() && x();
3923
+ }), l.canvas && (l.canvas.dataset.draw = K ? "true" : "false"), Z() && x();
3822
3924
  }
3823
- function kt(e) {
3925
+ function At(e) {
3824
3926
  return Math.min(1, Math.max(0, e));
3825
3927
  }
3826
3928
  function ce() {
3827
- return n.shot || n.canvas;
3929
+ return l.shot || l.canvas;
3828
3930
  }
3829
3931
  function Se(e) {
3830
3932
  const t = ce().getBoundingClientRect();
3831
3933
  return {
3832
- x: kt((e.clientX - t.left) / Math.max(t.width, 1)),
3833
- y: kt((e.clientY - t.top) / Math.max(t.height, 1))
3934
+ x: At((e.clientX - t.left) / Math.max(t.width, 1)),
3935
+ y: At((e.clientY - t.top) / Math.max(t.height, 1))
3834
3936
  };
3835
3937
  }
3836
- function Zi(e) {
3938
+ function ss(e) {
3837
3939
  const t = ce().getBoundingClientRect();
3838
3940
  return e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom;
3839
3941
  }
3840
- function Zt(e) {
3942
+ function ea(e) {
3841
3943
  const t = Se(e), a = k.crop();
3842
3944
  return {
3843
3945
  x: a.x + t.x * a.w,
@@ -3853,31 +3955,31 @@ function Le(e, t) {
3853
3955
  h: Math.max(He, Math.abs(t.y - e.y))
3854
3956
  };
3855
3957
  }
3856
- function et(e) {
3958
+ function tt(e) {
3857
3959
  g && (e ? g.dataset.grabbing = "true" : delete g.dataset.grabbing);
3858
3960
  }
3859
3961
  function Ve(e) {
3860
3962
  try {
3861
- n.canvas.setPointerCapture(e.pointerId);
3963
+ l.canvas.setPointerCapture(e.pointerId);
3862
3964
  } catch {
3863
3965
  }
3864
3966
  }
3865
3967
  function Ge() {
3866
- window.addEventListener("pointermove", Yt), window.addEventListener("pointerup", Ae), window.addEventListener("pointercancel", Ae);
3968
+ window.addEventListener("pointermove", aa), window.addEventListener("pointerup", Ae), window.addEventListener("pointercancel", Ae);
3867
3969
  }
3868
- function Jt() {
3869
- window.removeEventListener("pointermove", Yt), window.removeEventListener("pointerup", Ae), window.removeEventListener("pointercancel", Ae);
3970
+ function ta() {
3971
+ window.removeEventListener("pointermove", aa), window.removeEventListener("pointerup", Ae), window.removeEventListener("pointercancel", Ae);
3870
3972
  }
3871
- function Ji(e) {
3973
+ function rs(e) {
3872
3974
  if (e.button !== 0 || !Z())
3873
3975
  return;
3874
- if (!e.target.closest(".nf-sticker") && !Zi(e)) {
3976
+ if (!e.target.closest(".nf-sticker") && !ss(e)) {
3875
3977
  T = null, x();
3876
3978
  return;
3877
3979
  }
3878
3980
  const t = e.target.closest(".nf-handle"), a = e.target.closest(".nf-sticker");
3879
3981
  if (a && a.dataset.preview !== "true") {
3880
- e.preventDefault(), e.stopPropagation(), T = a.dataset.id, Ve(e), Yi({
3982
+ e.preventDefault(), e.stopPropagation(), T = a.dataset.id, Ve(e), ns({
3881
3983
  kind: "sticker",
3882
3984
  id: T,
3883
3985
  dir: (t == null ? void 0 : t.dataset.dir) || "move"
@@ -3890,15 +3992,15 @@ function Ji(e) {
3890
3992
  }
3891
3993
  if (K === "arrow" || K === "rect" || K === "circle") {
3892
3994
  e.preventDefault(), Ve(e);
3893
- const o = Zt(e);
3995
+ const o = ea(e);
3894
3996
  S = { kind: "sticker", type: K, start: o, current: o }, Ge(), x();
3895
3997
  return;
3896
3998
  }
3897
3999
  x();
3898
4000
  }
3899
- function Yi(e, t) {
4001
+ function ns(e, t) {
3900
4002
  t.preventDefault(), t.stopPropagation();
3901
- const a = ce().getBoundingClientRect(), o = k.list().find((r) => r.id === e.id);
4003
+ const a = ce().getBoundingClientRect(), o = k.list().find((s) => s.id === e.id);
3902
4004
  w = {
3903
4005
  ...e,
3904
4006
  startX: t.clientX,
@@ -3906,11 +4008,11 @@ function Yi(e, t) {
3906
4008
  crop: k.crop(),
3907
4009
  sticker: o ? { ...o } : null,
3908
4010
  rect: a
3909
- }, et(e.dir === "move" || e.dir === "start" || e.dir === "end"), Ge();
4011
+ }, tt(e.dir === "move" || e.dir === "start" || e.dir === "end"), Ge();
3910
4012
  }
3911
- function Yt(e) {
4013
+ function aa(e) {
3912
4014
  if (S) {
3913
- S.current = S.kind === "crop" ? Se(e) : Zt(e), x();
4015
+ S.current = S.kind === "crop" ? Se(e) : ea(e), x();
3914
4016
  return;
3915
4017
  }
3916
4018
  if (!w)
@@ -3935,58 +4037,58 @@ function Yt(e) {
3935
4037
  y2: (o.y2 || o.y) + a
3936
4038
  });
3937
4039
  else {
3938
- const r = { x: o.x, y: o.y, w: o.w, h: o.h };
3939
- Xi(r, w.dir, t, a), k.update(o.id, r);
4040
+ const s = { x: o.x, y: o.y, w: o.w, h: o.h };
4041
+ ls(s, w.dir, t, a), k.update(o.id, s);
3940
4042
  }
3941
4043
  x();
3942
4044
  }
3943
4045
  }
3944
- function Xi(e, t, a, o) {
4046
+ function ls(e, t, a, o) {
3945
4047
  if (t.includes("e") && (e.w = Math.max(0.04, e.w + a)), t.includes("s") && (e.h = Math.max(0.04, e.h + o)), t.includes("w")) {
3946
- const r = Math.max(0.04, e.w - a);
3947
- e.x += e.w - r, e.w = r;
4048
+ const s = Math.max(0.04, e.w - a);
4049
+ e.x += e.w - s, e.w = s;
3948
4050
  }
3949
4051
  if (t.includes("n")) {
3950
- const r = Math.max(0.04, e.h - o);
3951
- e.y += e.h - r, e.h = r;
4052
+ const s = Math.max(0.04, e.h - o);
4053
+ e.y += e.h - s, e.h = s;
3952
4054
  }
3953
4055
  }
3954
4056
  function Ae(e) {
3955
- if (Jt(), et(!1), S) {
3956
- Qi();
4057
+ if (ta(), tt(!1), S) {
4058
+ us();
3957
4059
  return;
3958
4060
  }
3959
4061
  if (w) {
3960
4062
  if (w.kind === "sticker") {
3961
- const t = n.canvas.getBoundingClientRect();
4063
+ const t = l.canvas.getBoundingClientRect();
3962
4064
  (e.clientX < t.left - 24 || e.clientX > t.right + 24 || e.clientY < t.top - 24 || e.clientY > t.bottom + 24) && (k.remove(w.id), T = null);
3963
4065
  }
3964
4066
  w = null, x();
3965
4067
  }
3966
4068
  }
3967
- function Qi() {
4069
+ function us() {
3968
4070
  const e = S;
3969
4071
  if (S = null, !e)
3970
4072
  return;
3971
4073
  if (e.kind === "crop") {
3972
4074
  const a = Le(e.start, e.current);
3973
- if (Math.abs(e.current.x - e.start.x) < yt || Math.abs(e.current.y - e.start.y) < yt) {
4075
+ if (Math.abs(e.current.x - e.start.x) < wt || Math.abs(e.current.y - e.start.y) < wt) {
3974
4076
  x();
3975
4077
  return;
3976
4078
  }
3977
- const r = k.crop();
4079
+ const s = k.crop();
3978
4080
  k.setCrop({
3979
- x: r.x + a.x * r.w,
3980
- y: r.y + a.y * r.h,
3981
- w: a.w * r.w,
3982
- h: a.h * r.h
4081
+ x: s.x + a.x * s.w,
4082
+ y: s.y + a.y * s.h,
4083
+ w: a.w * s.w,
4084
+ h: a.h * s.h
3983
4085
  }), Y();
3984
4086
  return;
3985
4087
  }
3986
- const t = er(e);
4088
+ const t = ds(e);
3987
4089
  t && (T = t.id), x();
3988
4090
  }
3989
- function er(e) {
4091
+ function ds(e) {
3990
4092
  if (e.type === "arrow") {
3991
4093
  const t = e.current.x - e.start.x, a = e.current.y - e.start.y;
3992
4094
  return Math.hypot(t, a) < He ? k.add("arrow", {
@@ -4007,67 +4109,67 @@ function er(e) {
4007
4109
  }
4008
4110
  return k.add(e.type, Le(e.start, e.current));
4009
4111
  }
4010
- function tr() {
4112
+ function cs() {
4011
4113
  k.resetCrop(), T = null, Y();
4012
4114
  }
4013
- function ze() {
4014
- n.resetCrop && (n.resetCrop.hidden = !k.isCropped());
4115
+ function Ce() {
4116
+ l.resetCrop && (l.resetCrop.hidden = !k.isCropped());
4015
4117
  }
4016
4118
  function xe(e) {
4017
- if (!n.audio)
4119
+ if (!l.audio)
4018
4120
  return;
4019
4121
  const t = m(e ? "tool.audioStop" : "tool.audio");
4020
- n.audio.title = t, n.audio.setAttribute("aria-label", t), n.audio.dataset.active = String(!!e);
4122
+ l.audio.title = t, l.audio.setAttribute("aria-label", t), l.audio.dataset.active = String(!!e);
4021
4123
  }
4022
4124
  function Z() {
4023
4125
  return q(F);
4024
4126
  }
4025
4127
  function pe() {
4026
- if (!n.stage || !n.palette || !n.actions || !n.recapture)
4128
+ if (!l.stage || !l.palette || !l.actions || !l.recapture)
4027
4129
  return;
4028
4130
  const e = Z();
4029
- n.stage.hidden = !e && !V, n.palette.hidden = !e, n.discard && (n.discard.hidden = !e), n.restore && (n.restore.hidden = e || !ie), e ? (n.palette.appendChild(n.discard), n.palette.appendChild(n.recapture)) : n.audio ? n.audio.after(n.recapture) : n.actions.insertBefore(n.recapture, n.submit || null), n.recapture.hidden = !1;
4131
+ l.stage.hidden = !e && !V, l.palette.hidden = !e, l.discard && (l.discard.hidden = !e), l.restore && (l.restore.hidden = e || !ie), e ? (l.palette.appendChild(l.discard), l.palette.appendChild(l.recapture)) : l.audio ? l.audio.after(l.recapture) : l.actions.insertBefore(l.recapture, l.submit || null), l.recapture.hidden = !1;
4030
4132
  }
4031
- function ar() {
4133
+ function ps() {
4032
4134
  Z() && (ie = F), F = "", de(null), pe(), Y();
4033
4135
  }
4034
- function or() {
4136
+ function gs() {
4035
4137
  q(ie) && (F = ie, pe(), Y());
4036
4138
  }
4037
- function Xt() {
4139
+ function oa() {
4038
4140
  return {
4039
4141
  capture: typeof c.capture == "function" ? c.capture : void 0,
4040
4142
  onBeforeCapture: typeof c.onBeforeCapture == "function" ? c.onBeforeCapture : void 0
4041
4143
  };
4042
4144
  }
4043
- function Qt(e) {
4145
+ function ia(e) {
4044
4146
  if (!q(e))
4045
4147
  throw new Error(m("status.screenshotFailed"));
4046
- F = e, ie = e, k = Je(), B = { w: 0, h: 0 }, T = null, S = null, w = null, de(null);
4148
+ F = e, ie = e, k = Ye(), B = { w: 0, h: 0 }, T = null, S = null, w = null, de(null);
4047
4149
  }
4048
- async function ir() {
4049
- if (!(Me || !n.dialog || n.dialog.hidden)) {
4050
- Me = !0, n.recapture.disabled = !0, A(m("status.capturing"), !0), n.dialog.hidden = !0;
4150
+ async function ms() {
4151
+ if (!(Me || !l.dialog || l.dialog.hidden)) {
4152
+ Me = !0, l.recapture.disabled = !0, A(m("status.capturing"), !0), l.dialog.hidden = !0;
4051
4153
  try {
4052
4154
  let e = "";
4053
4155
  try {
4054
- e = await ui();
4156
+ e = await mi();
4055
4157
  } catch {
4056
- e = await Dt(Xt());
4158
+ e = await $t(oa());
4057
4159
  }
4058
- Qt(e), A("");
4160
+ ia(e), A("");
4059
4161
  } catch (e) {
4060
4162
  A((e == null ? void 0 : e.message) || m("status.screenshotFailed"));
4061
4163
  } finally {
4062
- n.dialog.hidden = !1, n.recapture.disabled = !1, Me = !1, pe(), Y();
4164
+ l.dialog.hidden = !1, l.recapture.disabled = !1, Me = !1, pe(), Y();
4063
4165
  }
4064
4166
  }
4065
4167
  }
4066
- function rr() {
4168
+ function hs() {
4067
4169
  try {
4068
- if (J || (J = yi((t) => {
4069
- const a = n.text.value.trim();
4070
- n.text.value = a ? `${a} ${t}` : t;
4170
+ if (J || (J = Ei((t) => {
4171
+ const a = l.text.value.trim();
4172
+ l.text.value = a ? `${a} ${t}` : t;
4071
4173
  })), !J.isSupported()) {
4072
4174
  A(m("status.audioUnsupported"));
4073
4175
  return;
@@ -4078,16 +4180,16 @@ function rr() {
4078
4180
  A(e.message);
4079
4181
  }
4080
4182
  }
4081
- async function sr() {
4183
+ async function fs() {
4082
4184
  if (!c.video) {
4083
4185
  A(m("status.videoDisabled"));
4084
4186
  return;
4085
4187
  }
4086
- n.dialog.hidden = !0, n.stop.hidden = !1, re(), n.launcher.hidden = !0, ne = ki({
4188
+ l.dialog.hidden = !0, l.stop.hidden = !1, se(), l.launcher.hidden = !0, ne = Pi({
4087
4189
  onStart() {
4088
4190
  },
4089
4191
  onStop(e) {
4090
- V = e, n.stop.hidden = !0, we(), n.dialog.hidden = !1, pe(), Y(), A(m(e ? "status.videoAttached" : "status.recordingCancelled"));
4192
+ V = e, l.stop.hidden = !0, we(), l.dialog.hidden = !1, pe(), Y(), A(m(e ? "status.videoAttached" : "status.recordingCancelled"));
4091
4193
  },
4092
4194
  onError(e) {
4093
4195
  A(e.message);
@@ -4096,30 +4198,30 @@ async function sr() {
4096
4198
  try {
4097
4199
  await ne.start();
4098
4200
  } catch (e) {
4099
- n.stop.hidden = !0, we(), n.dialog.hidden = !1, A(e.message);
4201
+ l.stop.hidden = !0, we(), l.dialog.hidden = !1, A(e.message);
4100
4202
  }
4101
4203
  }
4102
4204
  function Y() {
4103
- if (n.shot = null, !Z()) {
4104
- n.canvas.style.removeProperty("--nf-shot-aspect"), n.canvas.style.removeProperty("aspect-ratio"), n.canvas.innerHTML = V ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(V)}"></video>` : "", ze();
4205
+ if (l.shot = null, !Z()) {
4206
+ l.canvas.style.removeProperty("--nf-shot-aspect"), l.canvas.style.removeProperty("aspect-ratio"), l.canvas.innerHTML = V ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(V)}"></video>` : "", Ce();
4105
4207
  return;
4106
4208
  }
4107
- n.canvas.innerHTML = `<div class="nf-shot"><img alt="${C(m("shot.alt"))}" src="${F}" draggable="false"></div>`, n.shot = n.canvas.querySelector(".nf-shot");
4108
- const e = n.shot.querySelector("img");
4209
+ l.canvas.innerHTML = `<div class="nf-shot"><img alt="${z(m("shot.alt"))}" src="${F}" draggable="false"></div>`, l.shot = l.canvas.querySelector(".nf-shot");
4210
+ const e = l.shot.querySelector("img");
4109
4211
  e.draggable = !1, e.addEventListener("dragstart", (a) => a.preventDefault());
4110
4212
  const t = () => {
4111
- nr(e), x();
4213
+ ys(e), x();
4112
4214
  };
4113
- e.addEventListener("load", t), e.complete && e.naturalWidth && t(), ze();
4215
+ e.addEventListener("load", t), e.complete && e.naturalWidth && t(), Ce();
4114
4216
  }
4115
- function nr(e) {
4217
+ function ys(e) {
4116
4218
  const t = e.naturalWidth || B.w, a = e.naturalHeight || B.h;
4117
- if (t && a && (B = { w: t, h: a }, n.canvas.style.setProperty("--nf-shot-aspect", String(t / a)), n.canvas.style.aspectRatio = `${t} / ${a}`), !n.shot || !B.w || !B.h)
4219
+ if (t && a && (B = { w: t, h: a }, l.canvas.style.setProperty("--nf-shot-aspect", String(t / a)), l.canvas.style.aspectRatio = `${t} / ${a}`), !l.shot || !B.w || !B.h)
4118
4220
  return;
4119
- const o = k.crop(), r = B.w / B.h, i = o.w / o.h * r, s = Math.min(1, i / r), l = Math.min(1, r / i);
4120
- n.shot.style.left = `${(1 - s) / 2 * 100}%`, n.shot.style.top = `${(1 - l) / 2 * 100}%`, n.shot.style.width = `${s * 100}%`, n.shot.style.height = `${l * 100}%`, e.style.width = `${100 / o.w}%`, e.style.height = `${100 / o.h}%`, e.style.left = `${-o.x / o.w * 100}%`, e.style.top = `${-o.y / o.h * 100}%`;
4221
+ const o = k.crop(), s = B.w / B.h, i = o.w / o.h * s, r = Math.min(1, i / s), n = Math.min(1, s / i);
4222
+ l.shot.style.left = `${(1 - r) / 2 * 100}%`, l.shot.style.top = `${(1 - n) / 2 * 100}%`, l.shot.style.width = `${r * 100}%`, l.shot.style.height = `${n * 100}%`, e.style.width = `${100 / o.w}%`, e.style.height = `${100 / o.h}%`, e.style.left = `${-o.x / o.w * 100}%`, e.style.top = `${-o.y / o.h * 100}%`;
4121
4223
  }
4122
- function lr(e) {
4224
+ function vs(e) {
4123
4225
  return e.type === "arrow" ? {
4124
4226
  id: "preview",
4125
4227
  type: "arrow",
@@ -4138,32 +4240,32 @@ function lr(e) {
4138
4240
  };
4139
4241
  }
4140
4242
  function x() {
4141
- if ((n.shot || n.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((i) => i.remove()), !Z() || !n.shot) {
4142
- ze();
4243
+ if ((l.shot || l.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((i) => i.remove()), !Z() || !l.shot) {
4244
+ Ce();
4143
4245
  return;
4144
4246
  }
4145
- const t = k.crop(), a = ce(), o = Ye(a.clientWidth || 400);
4146
- 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`), (S == null ? void 0 : S.kind) === "crop") {
4247
+ const t = k.crop(), a = ce(), o = Xe(a.clientWidth || 400);
4248
+ if (l.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), l.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), l.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), l.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (S == null ? void 0 : S.kind) === "crop") {
4147
4249
  const i = document.createElement("div");
4148
- i.className = "nf-crop", bt(i, Le(S.start, S.current), { x: 0, y: 0, w: 1, h: 1 }), n.shot.appendChild(i);
4250
+ i.className = "nf-crop", Ct(i, Le(S.start, S.current), { x: 0, y: 0, w: 1, h: 1 }), l.shot.appendChild(i);
4149
4251
  }
4150
- const r = k.list().slice();
4151
- if ((S == null ? void 0 : S.kind) === "sticker" && r.push(lr(S)), r.forEach((i) => {
4152
- const s = i.id === "preview", l = !s && i.id === T, u = document.createElement("div");
4153
- if (u.className = `nf-sticker nf-${i.type}`, u.dataset.id = i.id, l && (u.dataset.selected = "true"), s && (u.dataset.preview = "true"), i.type === "arrow" ? ur(u, i, t, l, o) : (bt(u, i, t), l && ["nw", "ne", "sw", "se"].forEach((d) => qe(u, d))), !s && i.number) {
4252
+ const s = k.list().slice();
4253
+ if ((S == null ? void 0 : S.kind) === "sticker" && s.push(vs(S)), s.forEach((i) => {
4254
+ const r = i.id === "preview", n = !r && i.id === T, u = document.createElement("div");
4255
+ if (u.className = `nf-sticker nf-${i.type}`, u.dataset.id = i.id, n && (u.dataset.selected = "true"), r && (u.dataset.preview = "true"), i.type === "arrow" ? ks(u, i, t, n, o) : (Ct(u, i, t), n && ["nw", "ne", "sw", "se"].forEach((d) => qe(u, d))), !r && i.number) {
4154
4256
  const d = document.createElement("span");
4155
4257
  d.className = "nf-badge", d.textContent = String(i.number), u.appendChild(d);
4156
4258
  }
4157
- n.shot.appendChild(u);
4158
- }), n.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((i) => i.remove()), V) {
4259
+ l.shot.appendChild(u);
4260
+ }), l.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((i) => i.remove()), V) {
4159
4261
  const i = document.createElement("video");
4160
- i.className = "nf-recording-preview", i.controls = !0, i.src = URL.createObjectURL(V), i.style.position = "absolute", i.style.right = "8px", i.style.bottom = "8px", i.style.width = "160px", n.canvas.appendChild(i);
4262
+ i.className = "nf-recording-preview", i.controls = !0, i.src = URL.createObjectURL(V), i.style.position = "absolute", i.style.right = "8px", i.style.bottom = "8px", i.style.width = "160px", l.canvas.appendChild(i);
4161
4263
  }
4162
- ze();
4264
+ Ce();
4163
4265
  }
4164
- function ur(e, t, a, o, r = Ye(400)) {
4165
- const i = ce(), s = i.clientWidth, l = i.clientHeight, u = (t.x - a.x) / a.w * s, d = (t.y - a.y) / a.h * l, p = ((t.x2 ?? t.x + t.w) - a.x) / a.w * s, y = ((t.y2 ?? t.y) - a.y) / a.h * l, v = Math.max(18, r.arrowHead + r.stroke * 2), b = Math.min(u, p) - v, z = Math.min(d, y) - v, E = Math.max(2, Math.abs(p - u)) + v * 2, M = Math.max(2, Math.abs(y - d)) + v * 2, P = u - b, $ = d - z, X = p - b, Q = y - z, N = It(P, $, X, Q, r), ee = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4166
- e.style.left = `${b}px`, e.style.top = `${z}px`, e.style.width = `${E}px`, e.style.height = `${M}px`, ee.setAttribute("class", "nf-arrow-svg"), ee.setAttribute("viewBox", `0 0 ${E} ${M}`), ee.setAttribute("width", String(E)), ee.setAttribute("height", String(M)), ee.innerHTML = `
4266
+ function ks(e, t, a, o, s = Xe(400)) {
4267
+ const i = ce(), r = i.clientWidth, n = i.clientHeight, u = (t.x - a.x) / a.w * r, d = (t.y - a.y) / a.h * n, p = ((t.x2 ?? t.x + t.w) - a.x) / a.w * r, y = ((t.y2 ?? t.y) - a.y) / a.h * n, v = Math.max(18, s.arrowHead + s.stroke * 2), b = Math.min(u, p) - v, C = Math.min(d, y) - v, E = Math.max(2, Math.abs(p - u)) + v * 2, M = Math.max(2, Math.abs(y - d)) + v * 2, P = u - b, $ = d - C, X = p - b, Q = y - C, N = Kt(P, $, X, Q, s), ee = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4268
+ e.style.left = `${b}px`, e.style.top = `${C}px`, e.style.width = `${E}px`, e.style.height = `${M}px`, ee.setAttribute("class", "nf-arrow-svg"), ee.setAttribute("viewBox", `0 0 ${E} ${M}`), ee.setAttribute("width", String(E)), ee.setAttribute("height", String(M)), ee.innerHTML = `
4167
4269
  <line class="nf-arrow-hit" x1="${P}" y1="${$}" x2="${X}" y2="${Q}" />
4168
4270
  <line class="nf-arrow-shaft" x1="${P}" y1="${$}" x2="${N.shaftEnd.x}" y2="${N.shaftEnd.y}" />
4169
4271
  <polygon class="nf-arrow-head" points="${N.tipX},${N.tipY} ${N.left.x},${N.left.y} ${N.right.x},${N.right.y}" />
@@ -4173,27 +4275,27 @@ function qe(e, t, a) {
4173
4275
  const o = document.createElement("span");
4174
4276
  o.className = "nf-handle", o.dataset.dir = t, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), e.appendChild(o);
4175
4277
  }
4176
- function bt(e, t, a) {
4278
+ function Ct(e, t, a) {
4177
4279
  e.style.left = `${(t.x - a.x) / a.w * 100}%`, e.style.top = `${(t.y - a.y) / a.h * 100}%`, e.style.width = `${t.w / a.w * 100}%`, e.style.height = `${t.h / a.h * 100}%`;
4178
4280
  }
4179
- function ea() {
4281
+ function sa() {
4180
4282
  try {
4181
- return String(localStorage.getItem(Kt) || "").trim();
4283
+ return String(localStorage.getItem(Wt) || "").trim();
4182
4284
  } catch {
4183
4285
  return "";
4184
4286
  }
4185
4287
  }
4186
- function dr(e) {
4288
+ function bs(e) {
4187
4289
  const t = String(e || "").trim();
4188
4290
  if (!(!t || t === _e()))
4189
4291
  try {
4190
- localStorage.setItem(Kt, t);
4292
+ localStorage.setItem(Wt, t);
4191
4293
  } catch {
4192
4294
  }
4193
4295
  }
4194
- function ta() {
4296
+ function ra() {
4195
4297
  try {
4196
- const e = localStorage.getItem(Gt);
4298
+ const e = localStorage.getItem(Jt);
4197
4299
  if (!e)
4198
4300
  return { diagnostics: !1, logs: !1 };
4199
4301
  const t = JSON.parse(e);
@@ -4205,23 +4307,23 @@ function ta() {
4205
4307
  return { diagnostics: !1, logs: !1 };
4206
4308
  }
4207
4309
  }
4208
- function wt(e = {}) {
4310
+ function zt(e = {}) {
4209
4311
  const t = {
4210
- ...ta(),
4312
+ ...ra(),
4211
4313
  ...e
4212
4314
  };
4213
4315
  try {
4214
- localStorage.setItem(Gt, JSON.stringify({
4316
+ localStorage.setItem(Jt, JSON.stringify({
4215
4317
  diagnostics: !!t.diagnostics,
4216
4318
  logs: !!t.logs
4217
4319
  }));
4218
4320
  } catch {
4219
4321
  }
4220
4322
  }
4221
- function aa() {
4323
+ function na() {
4222
4324
  return !!(String(I.userId || "").trim() || String(I.email || "").trim() || String(I.displayName || "").trim());
4223
4325
  }
4224
- function oa() {
4326
+ function la() {
4225
4327
  return String(
4226
4328
  I.displayName || I.email || I.userId || ""
4227
4329
  ).trim();
@@ -4229,32 +4331,32 @@ function oa() {
4229
4331
  function _e() {
4230
4332
  return m("form.authorPlaceholder");
4231
4333
  }
4232
- function cr() {
4334
+ function ws() {
4233
4335
  var t;
4234
- if (aa())
4235
- return oa() || _e();
4236
- const e = String(((t = n.author) == null ? void 0 : t.value) || "").trim();
4237
- return e ? (dr(e), e) : _e();
4336
+ if (na())
4337
+ return la() || _e();
4338
+ const e = String(((t = l.author) == null ? void 0 : t.value) || "").trim();
4339
+ return e ? (bs(e), e) : _e();
4238
4340
  }
4239
- function ia() {
4240
- if (!n.author)
4341
+ function ua() {
4342
+ if (!l.author)
4241
4343
  return;
4242
- const e = aa();
4243
- if (n.author.hidden = e, e) {
4244
- n.author.value = "";
4344
+ const e = na();
4345
+ if (l.author.hidden = e, e) {
4346
+ l.author.value = "";
4245
4347
  return;
4246
4348
  }
4247
- n.author.value = ea();
4349
+ l.author.value = sa();
4248
4350
  }
4249
- function ra(e, t = Nt) {
4351
+ function da(e, t = _t) {
4250
4352
  const a = Number(e);
4251
- return Number.isFinite(a) ? Math.min(Bi, Math.max(0, Math.floor(a))) : t;
4353
+ return Number.isFinite(a) ? Math.min(Yi, Math.max(0, Math.floor(a))) : t;
4252
4354
  }
4253
- function sa(e) {
4254
- e.key !== "Escape" || !n.dialog || n.dialog.hidden || Re && !Pe || se();
4355
+ function ca(e) {
4356
+ e.key !== "Escape" || !l.dialog || l.dialog.hidden || Re && !Pe || re();
4255
4357
  }
4256
- function na(e = {}) {
4257
- mi(e);
4358
+ function pa(e = {}) {
4359
+ ki(e);
4258
4360
  const t = Object.prototype.hasOwnProperty.call(e, "kinds");
4259
4361
  c = {
4260
4362
  ...c,
@@ -4264,10 +4366,10 @@ function na(e = {}) {
4264
4366
  name: e.name == null ? c.name : String(e.name || ""),
4265
4367
  targets: e.targets === void 0 ? c.targets : e.targets,
4266
4368
  hideLauncher: e.hideLauncher == null ? c.hideLauncher : !!e.hideLauncher,
4267
- theme: qt(e.theme ?? c.theme),
4369
+ theme: Yt(e.theme ?? c.theme),
4268
4370
  video: e.video == null ? c.video : !!e.video,
4269
- consoleLogLimit: e.consoleLogLimit == null ? c.consoleLogLimit : ra(e.consoleLogLimit, c.consoleLogLimit),
4270
- kinds: t ? Mi(e.kinds) : c.kinds,
4371
+ consoleLogLimit: e.consoleLogLimit == null ? c.consoleLogLimit : da(e.consoleLogLimit, c.consoleLogLimit),
4372
+ kinds: t ? _i(e.kinds) : c.kinds,
4271
4373
  kindsCustom: t ? !0 : c.kindsCustom,
4272
4374
  capture: e.capture === void 0 ? c.capture : e.capture,
4273
4375
  onBeforeCapture: e.onBeforeCapture === void 0 ? c.onBeforeCapture : e.onBeforeCapture,
@@ -4278,7 +4380,7 @@ function na(e = {}) {
4278
4380
  translations: e.translations === void 0 ? c.translations : e.translations && typeof e.translations == "object" ? e.translations : null
4279
4381
  };
4280
4382
  }
4281
- function la(e) {
4383
+ function ga(e) {
4282
4384
  const t = c[e];
4283
4385
  if (typeof t == "function")
4284
4386
  try {
@@ -4287,160 +4389,165 @@ function la(e) {
4287
4389
  console.warn(`Notefully.${e} failed:`, a);
4288
4390
  }
4289
4391
  }
4290
- function pr() {
4392
+ function Ss() {
4291
4393
  return ue;
4292
4394
  }
4293
- function gr() {
4395
+ function As() {
4294
4396
  return fe();
4295
4397
  }
4296
- function mr(e, t) {
4297
- return c.locale = e == null || e === "" ? null : String(e), t !== void 0 && (c.translations = t && typeof t == "object" ? t : null), g ? re() : _t(), Ue;
4398
+ function Cs(e, t) {
4399
+ return c.locale = e == null || e === "" ? null : String(e), t !== void 0 && (c.translations = t && typeof t == "object" ? t : null), g ? se() : Xt(), Ue;
4298
4400
  }
4299
- function tt(e = {}) {
4300
- return na(e), g && re(), Ue;
4401
+ function at(e = {}) {
4402
+ return pa(e), g && se(), Ue;
4301
4403
  }
4302
- function hr(e = {}) {
4303
- return na(e), Xe(), re(), Ue;
4404
+ function zs(e = {}) {
4405
+ return pa(e), Qe(), se(), Ue;
4304
4406
  }
4305
- function fr(e) {
4306
- return tt({ theme: e });
4407
+ function js(e) {
4408
+ return at({ theme: e });
4307
4409
  }
4308
- function yr(e) {
4410
+ function Es(e) {
4309
4411
  const t = !!e;
4310
- return !t && g && n.dialog && !n.dialog.hidden && se(), tt({ hideLauncher: !t });
4412
+ return !t && g && l.dialog && !l.dialog.hidden && re(), at({ hideLauncher: !t });
4311
4413
  }
4312
- function vr() {
4313
- const e = oa() || ea() || void 0, t = pi({
4414
+ function Rs() {
4415
+ const e = la() || sa() || void 0, t = yi({
4314
4416
  ...I,
4315
4417
  displayName: I.displayName || e
4316
4418
  });
4317
- D = xi(t), O = Ui(
4318
- Bt.snapshot().slice(-ra(c.consoleLogLimit))
4419
+ D = Bi(t), O = Ni(
4420
+ qt.snapshot().slice(-da(c.consoleLogLimit))
4319
4421
  );
4320
- const a = ta();
4422
+ const a = ra();
4321
4423
  a.diagnostics && be(D, !0), a.logs && O.length && be(O, !0), H = !1;
4322
4424
  }
4323
- function Ce(e) {
4324
- H = !!e, n.privacyPanel && (n.privacyPanel.hidden = !H), n.privacyChange && (n.privacyChange.setAttribute("aria-expanded", H ? "true" : "false"), n.privacyChange.dataset.active = String(H)), H && ot();
4425
+ function ze(e) {
4426
+ H = !!e, l.privacyPanel && (l.privacyPanel.hidden = !H), l.privacyChange && (l.privacyChange.setAttribute("aria-expanded", H ? "true" : "false"), l.privacyChange.dataset.active = String(H)), H && it();
4325
4427
  }
4326
- function at() {
4327
- if (!n.privacy || !n.privacyText || !n.privacyChange)
4428
+ function ot() {
4429
+ if (!l.privacy || !l.privacyText || !l.privacyChange)
4328
4430
  return;
4329
- const e = Fi({
4431
+ const e = Hi({
4330
4432
  diagnostics: D,
4331
4433
  logs: O
4332
4434
  });
4333
- n.privacyText.textContent = e, n.privacyText.hidden = !e;
4435
+ l.privacyText.textContent = e, l.privacyText.hidden = !e;
4334
4436
  const t = D.length === 0 && O.length === 0;
4335
- n.privacySummary && (n.privacySummary.hidden = t), n.privacy.hidden = t, n.privacyChange.hidden = !1;
4437
+ l.privacySummary && (l.privacySummary.hidden = t), l.privacy.hidden = t, l.privacyChange.hidden = !1;
4336
4438
  }
4337
- function ua(e, t, a) {
4439
+ function ma(e, t, a) {
4338
4440
  return `<label class="nf-privacy-toggle">
4339
- <span class="nf-privacy-toggle-label">${C(m("privacy.redact"))}</span>
4340
- <input type="checkbox" ${e ? "checked" : ""} ${t ? 'data-indeterminate="true"' : ""} aria-label="${C(a)}">
4441
+ <span class="nf-privacy-toggle-label">${z(m("privacy.redact"))}</span>
4442
+ <input type="checkbox" ${e ? "checked" : ""} ${t ? 'data-indeterminate="true"' : ""} aria-label="${z(a)}">
4341
4443
  </label>`;
4342
4444
  }
4343
- function St(e, t, a, o, r) {
4344
- const i = ua(r, !1, `${m("privacy.redact")} ${a}`);
4345
- if (r) {
4346
- const s = o ? `${a}: ${o}` : a;
4347
- return `<div class="nf-privacy-row" data-kind="${C(e)}" data-id="${C(t)}" data-redacted="true">
4445
+ function jt(e, t, a, o, s, i = null) {
4446
+ const r = ma(s, !1, `${m("privacy.redact")} ${a}`), n = typeof o == "string" ? o : String(o || "");
4447
+ if (s) {
4448
+ const d = n ? `${a}: ${n}` : a;
4449
+ return `<div class="nf-privacy-row" data-kind="${z(e)}" data-id="${z(t)}" data-redacted="true">
4348
4450
  <div class="nf-privacy-row-text">
4349
- <div class="nf-privacy-row-summary" title="${C(s)}">${C(s)}</div>
4451
+ <div class="nf-privacy-row-summary" title="${z(d)}">${z(d)}</div>
4350
4452
  </div>
4351
- ${i}
4453
+ ${r}
4352
4454
  </div>`;
4353
4455
  }
4354
- return `<div class="nf-privacy-row" data-kind="${C(e)}" data-id="${C(t)}">
4456
+ const u = i ?? z(n);
4457
+ return `<div class="nf-privacy-row" data-kind="${z(e)}" data-id="${z(t)}">
4355
4458
  <div class="nf-privacy-row-text">
4356
- <div class="nf-privacy-row-title">${C(a)}</div>
4357
- <div class="nf-privacy-row-detail">${C(o)}</div>
4459
+ <div class="nf-privacy-row-title">${z(a)}</div>
4460
+ <div class="nf-privacy-row-detail">${u}</div>
4358
4461
  </div>
4359
- ${i}
4462
+ ${r}
4360
4463
  </div>`;
4361
4464
  }
4362
- function At(e, t, a, o) {
4465
+ function Et(e, t, a, o) {
4363
4466
  if (!a.length)
4364
4467
  return "";
4365
- const r = Ti(a), i = r.checked && !r.indeterminate;
4366
- return `<section class="nf-privacy-section" data-section="${C(e)}"${i ? ' data-redacted="true"' : ""}>
4468
+ const s = Ki(a), i = s.checked && !s.indeterminate;
4469
+ return `<section class="nf-privacy-section" data-section="${z(e)}"${i ? ' data-redacted="true"' : ""}>
4367
4470
  <div class="nf-privacy-section-head">
4368
- <h3 class="nf-privacy-section-title">${C(t)}</h3>
4369
- ${ua(r.checked, r.indeterminate, `${m("privacy.redact")} ${t}`)}
4471
+ <h3 class="nf-privacy-section-title">${z(t)}</h3>
4472
+ ${ma(s.checked, s.indeterminate, `${m("privacy.redact")} ${t}`)}
4370
4473
  </div>
4371
4474
  <div class="nf-privacy-rows"${i ? " hidden" : ""}>${o}</div>
4372
4475
  </section>`;
4373
4476
  }
4374
- function ot() {
4375
- if (!n.privacyScroll)
4477
+ function it() {
4478
+ if (!l.privacyScroll)
4376
4479
  return;
4377
- const e = D.map((a) => St(
4480
+ const e = D.map((a) => jt(
4378
4481
  "diagnostic",
4379
4482
  a.key,
4380
4483
  a.label,
4381
- Oi(a.value),
4484
+ Gi(a.value),
4382
4485
  a.redacted
4383
- )).join(""), t = O.map((a) => St(
4384
- "log",
4385
- a.id,
4386
- a.level,
4387
- a.text,
4388
- a.redacted
4389
- )).join("");
4390
- n.privacyScroll.innerHTML = [
4391
- At("diagnostics", m("privacy.section.diagnostics"), D, e),
4392
- O.length ? At("logs", m("privacy.section.logs"), O, t) : ""
4393
- ].join(""), n.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
4486
+ )).join(""), t = O.map((a) => {
4487
+ const o = Ai(a);
4488
+ return jt(
4489
+ "log",
4490
+ a.id,
4491
+ a.level,
4492
+ o,
4493
+ a.redacted,
4494
+ a.redacted ? null : Ci(a)
4495
+ );
4496
+ }).join("");
4497
+ l.privacyScroll.innerHTML = [
4498
+ Et("diagnostics", m("privacy.section.diagnostics"), D, e),
4499
+ O.length ? Et("logs", m("privacy.section.logs"), O, t) : ""
4500
+ ].join(""), l.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
4394
4501
  a.indeterminate = !0, a.removeAttribute("data-indeterminate");
4395
- }), at();
4502
+ }), ot();
4396
4503
  }
4397
- function kr(e) {
4504
+ function Ps(e) {
4398
4505
  const t = e.target;
4399
4506
  if (!(t instanceof HTMLInputElement) || t.type !== "checkbox")
4400
4507
  return;
4401
- const a = t.closest("[data-section]"), o = t.closest(".nf-privacy-row"), r = t.checked;
4508
+ const a = t.closest("[data-section]"), o = t.closest(".nf-privacy-row"), s = t.checked;
4402
4509
  if (o) {
4403
- const i = o.dataset.kind, s = o.dataset.id;
4510
+ const i = o.dataset.kind, r = o.dataset.id;
4404
4511
  if (i === "diagnostic") {
4405
- const l = D.find((u) => u.key === s);
4406
- l && (l.redacted = r);
4512
+ const n = D.find((u) => u.key === r);
4513
+ n && (n.redacted = s);
4407
4514
  } else if (i === "log") {
4408
- const l = O.find((u) => u.id === s);
4409
- l && (l.redacted = r);
4515
+ const n = O.find((u) => u.id === r);
4516
+ n && (n.redacted = s);
4410
4517
  }
4411
4518
  } else if (a) {
4412
4519
  const i = a.dataset.section;
4413
- i === "diagnostics" ? (be(D, r), wt({ diagnostics: r })) : i === "logs" && (be(O, r), wt({ logs: r }));
4520
+ i === "diagnostics" ? (be(D, s), zt({ diagnostics: s })) : i === "logs" && (be(O, s), zt({ logs: s }));
4414
4521
  } else
4415
4522
  return;
4416
- ot();
4523
+ it();
4417
4524
  }
4418
- async function da() {
4419
- Xe(), ue || (ue = !0, la("onOpen")), ca(), re(), n.launcher.hidden = !0, k = Je(), B = { w: 0, h: 0 }, V = null, F = "", ie = "", T = null, S = null, w = null, _ = Wi(), Qe(_), de(null), xe(!1), n.text.value = "", ia(), A(""), vr();
4525
+ async function ha() {
4526
+ Qe(), ue || (ue = !0, ga("onOpen")), fa(), se(), l.launcher.hidden = !0, k = Ye(), B = { w: 0, h: 0 }, V = null, F = "", ie = "", T = null, S = null, w = null, _ = is(), et(_), de(null), xe(!1), l.text.value = "", ua(), A(""), Rs();
4420
4527
  try {
4421
- Qt(await Dt(Xt())), A("");
4528
+ ia(await $t(oa())), A("");
4422
4529
  } catch (t) {
4423
4530
  F = "", A((t == null ? void 0 : t.message) || m("status.screenshotFailed"));
4424
4531
  }
4425
- pe(), Ce(!1), at(), n.dialog.hidden = !1, Y(), n.text.focus();
4532
+ pe(), ze(!1), ot(), l.dialog.hidden = !1, Y(), l.text.focus();
4426
4533
  }
4427
- function se() {
4534
+ function re() {
4428
4535
  if (!g)
4429
4536
  return;
4430
4537
  const e = ue;
4431
- J == null || J.stop(), xe(!1), Jt(), S = null, w = null, et(!1), ca(), Ce(!1), n.dialog.hidden = !0, n.stop.hidden = !0, we(), e && (ue = !1, la("onClose"));
4538
+ J == null || J.stop(), xe(!1), ta(), S = null, w = null, tt(!1), fa(), ze(!1), l.dialog.hidden = !0, l.stop.hidden = !0, we(), e && (ue = !1, ga("onClose"));
4432
4539
  }
4433
- function br(e = "") {
4434
- const t = n.dialog, a = n.panel, o = n.panelBody, r = n.successMsg, i = n.successLink, s = String(e || "").trim(), l = !!(c.displayLink && s);
4435
- if (!t || !a || !o || !r)
4540
+ function Ls(e = "") {
4541
+ const t = l.dialog, a = l.panel, o = l.panelBody, s = l.successMsg, i = l.successLink, r = String(e || "").trim(), n = !!(c.displayLink && r);
4542
+ if (!t || !a || !o || !s)
4436
4543
  return Promise.resolve(!1);
4437
- Re = !0, Pe = l, A("");
4544
+ Re = !0, Pe = n, A("");
4438
4545
  const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, d = a.getBoundingClientRect();
4439
- if (o.hidden = !0, r.hidden = !1, t.classList.add("nf-success"), t.classList.toggle("nf-success-sticky", l), t.style.opacity = "1", i && (l ? (i.hidden = !1, i.href = s) : (i.hidden = !0, i.removeAttribute("href"))), l) {
4546
+ if (o.hidden = !0, s.hidden = !1, t.classList.add("nf-success"), t.classList.toggle("nf-success-sticky", n), t.style.opacity = "1", i && (n ? (i.hidden = !1, i.href = r) : (i.hidden = !0, i.removeAttribute("href"))), n) {
4440
4547
  if (u)
4441
4548
  return Promise.resolve(!0);
4442
- const b = a.getBoundingClientRect(), z = b.width > 0 ? d.width / b.width : 1, E = b.height > 0 ? d.height / b.height : 1;
4443
- return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${z}, ${E})`, a.getBoundingClientRect(), new Promise((M) => {
4549
+ const b = a.getBoundingClientRect(), C = b.width > 0 ? d.width / b.width : 1, E = b.height > 0 ? d.height / b.height : 1;
4550
+ return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${C}, ${E})`, a.getBoundingClientRect(), new Promise((M) => {
4444
4551
  let P = !1;
4445
4552
  const $ = () => {
4446
4553
  P || (P = !0, a.removeEventListener("transitionend", X), M(!0));
@@ -4458,9 +4565,9 @@ function br(e = "") {
4458
4565
  });
4459
4566
  const p = a.getBoundingClientRect(), y = p.width > 0 ? d.width / p.width : 1, v = p.height > 0 ? d.height / p.height : 1;
4460
4567
  return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${y}, ${v})`, a.getBoundingClientRect(), new Promise((b) => {
4461
- let z = !1;
4568
+ let C = !1;
4462
4569
  const E = () => {
4463
- z || (z = !0, a.removeEventListener("transitionend", M), window.setTimeout(() => {
4570
+ C || (C = !0, a.removeEventListener("transitionend", M), window.setTimeout(() => {
4464
4571
  t.style.transition = "opacity 0.28s ease", t.style.opacity = "0", window.setTimeout(() => b(!1), 280);
4465
4572
  }, 1e3));
4466
4573
  }, M = (P) => {
@@ -4471,98 +4578,98 @@ function br(e = "") {
4471
4578
  }), window.setTimeout(E, 700);
4472
4579
  });
4473
4580
  }
4474
- function ca() {
4475
- Re = !1, Pe = !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")));
4581
+ function fa() {
4582
+ Re = !1, Pe = !1, l.dialog && (l.dialog.classList.remove("nf-success", "nf-success-sticky"), l.dialog.style.opacity = "", l.dialog.style.transition = "", l.panel && (l.panel.style.transform = "", l.panel.style.transition = "", l.panel.style.transformOrigin = ""), l.panelBody && (l.panelBody.hidden = !1), l.successMsg && (l.successMsg.hidden = !0), l.successLink && (l.successLink.hidden = !0, l.successLink.removeAttribute("href")));
4476
4583
  }
4477
- function wr(e = {}) {
4478
- I = { ...I, ...gi(e) }, ia();
4584
+ function xs(e = {}) {
4585
+ I = { ...I, ...vi(e) }, ua();
4479
4586
  }
4480
- async function pa() {
4481
- if (Xe(), Ie)
4587
+ async function ya() {
4588
+ if (Qe(), Ie)
4482
4589
  return null;
4483
- const e = n.text.value.trim();
4590
+ const e = l.text.value.trim();
4484
4591
  if (!e && !Z() && !V)
4485
4592
  return A(m("status.emptyReport")), null;
4486
4593
  if (!c.endpoint || !c.projectKey)
4487
4594
  return A(m("status.missingConfig")), null;
4488
- Ie = !0, zt(!0), A(m("status.submitting"), !0);
4595
+ Ie = !0, Rt(!0), A(m("status.submitting"), !0);
4489
4596
  try {
4490
- const t = cr(), a = new FormData();
4491
- a.append("message", e), a.append("kind", _), a.append("version", c.version || "0.0.0"), a.append("author", t), c.name && a.append("name", c.name), a.append("context", JSON.stringify(Di({
4597
+ const t = ws(), a = new FormData();
4598
+ a.append("message", e), a.append("kind", _), a.append("version", c.version || "0.0.0"), a.append("author", t), c.name && a.append("name", c.name), a.append("context", JSON.stringify(qi({
4492
4599
  author: t,
4493
4600
  diagnostics: D,
4494
4601
  logs: O
4495
4602
  })));
4496
- const o = k.crop(), r = k.list(), i = k.isCropped() ? wi(r, o) : r;
4603
+ const o = k.crop(), s = k.list(), i = k.isCropped() ? xi(s, o) : s;
4497
4604
  if (a.append("annotations", JSON.stringify(i)), Array.isArray(c.targets) && a.append("targets", JSON.stringify(c.targets)), Z()) {
4498
- const d = k.isCropped() ? await Ei(F, o) : await Ni(F);
4499
- if (a.append("screenshot", d, "screenshot.png"), r.length) {
4500
- const p = await Ri(
4605
+ const d = k.isCropped() ? await Mi(F, o) : await Xi(F);
4606
+ if (a.append("screenshot", d, "screenshot.png"), s.length) {
4607
+ const p = await Ii(
4501
4608
  F,
4502
4609
  o,
4503
- r,
4610
+ s,
4504
4611
  {
4505
- mark: vt("--nf-mark", "#fdd341"),
4506
- markText: vt("--nf-mark-text", "#2a2140")
4612
+ mark: St("--nf-mark", "#fdd341"),
4613
+ markText: St("--nf-mark-text", "#2a2140")
4507
4614
  }
4508
4615
  );
4509
4616
  a.append("screenshotBaked", p, "screenshot.baked.png");
4510
4617
  }
4511
4618
  }
4512
4619
  V && a.append("recording", V, "recording.webm");
4513
- const s = await fetch(`${c.endpoint}/v1/reports`, {
4620
+ const r = await fetch(`${c.endpoint}/v1/reports`, {
4514
4621
  method: "POST",
4515
4622
  headers: {
4516
4623
  "X-Notefully-Key": c.projectKey
4517
4624
  },
4518
4625
  body: a
4519
4626
  });
4520
- let l = null;
4627
+ let n = null;
4521
4628
  try {
4522
- l = await s.json();
4629
+ n = await r.json();
4523
4630
  } catch {
4524
- l = null;
4631
+ n = null;
4525
4632
  }
4526
- if (!s.ok)
4527
- throw A((l == null ? void 0 : l.error) || m("status.submitFailed")), new Error((l == null ? void 0 : l.error) || `${m("status.submitFailed")} (${s.status})`);
4528
- return await br((l == null ? void 0 : l.trackerUrl) || "") || se(), l;
4633
+ if (!r.ok)
4634
+ throw A((n == null ? void 0 : n.error) || m("status.submitFailed")), new Error((n == null ? void 0 : n.error) || `${m("status.submitFailed")} (${r.status})`);
4635
+ return await Ls((n == null ? void 0 : n.trackerUrl) || "") || re(), n;
4529
4636
  } finally {
4530
- Ie = !1, zt(!1);
4637
+ Ie = !1, Rt(!1);
4531
4638
  }
4532
4639
  }
4533
- function zt(e) {
4534
- n.submit && (n.submit.disabled = !!e, n.submit.setAttribute("aria-busy", e ? "true" : "false"));
4640
+ function Rt(e) {
4641
+ l.submit && (l.submit.disabled = !!e, l.submit.setAttribute("aria-busy", e ? "true" : "false"));
4535
4642
  }
4536
- function Sr() {
4537
- se(), document.removeEventListener("keydown", sa), g == null || g.remove(), g = null, n = {};
4643
+ function Us() {
4644
+ re(), document.removeEventListener("keydown", ca), g == null || g.remove(), g = null, l = {};
4538
4645
  }
4539
4646
  const Ue = {
4540
- init: hr,
4541
- configure: tt,
4542
- setTheme: fr,
4543
- setVisible: yr,
4544
- open: da,
4545
- close: se,
4546
- isOpen: pr,
4547
- getLocale: gr,
4548
- setLocale: mr,
4549
- identify: wr,
4550
- submit: pa,
4551
- destroy: Sr
4647
+ init: zs,
4648
+ configure: at,
4649
+ setTheme: js,
4650
+ setVisible: Es,
4651
+ open: ha,
4652
+ close: re,
4653
+ isOpen: Ss,
4654
+ getLocale: As,
4655
+ setLocale: Cs,
4656
+ identify: xs,
4657
+ submit: ya,
4658
+ destroy: Us
4552
4659
  };
4553
4660
  typeof window < "u" && (window.Notefully = Ue);
4554
4661
  export {
4555
- se as close,
4556
- tt as configure,
4662
+ re as close,
4663
+ at as configure,
4557
4664
  Ue as default,
4558
- Sr as destroy,
4559
- gr as getLocaleTag,
4560
- wr as identify,
4561
- hr as init,
4562
- pr as isOpen,
4563
- da as open,
4564
- mr as setLocale,
4565
- fr as setTheme,
4566
- yr as setVisible,
4567
- pa as submit
4665
+ Us as destroy,
4666
+ As as getLocaleTag,
4667
+ xs as identify,
4668
+ zs as init,
4669
+ Ss as isOpen,
4670
+ ha as open,
4671
+ Cs as setLocale,
4672
+ js as setTheme,
4673
+ Es as setVisible,
4674
+ ya as submit
4568
4675
  };