@makefully/notefully 0.2.11 → 0.2.12
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/README.md +2 -1
- package/dist/notefully.iife.js +12 -12
- package/dist/notefully.js +620 -612
- package/package.json +1 -1
package/dist/notefully.js
CHANGED
|
@@ -79,7 +79,7 @@ const At = {
|
|
|
79
79
|
tl: "fil",
|
|
80
80
|
"zh-Hans": "zh-CN",
|
|
81
81
|
"zh-Hant": "zh-TW"
|
|
82
|
-
},
|
|
82
|
+
}, xa = {
|
|
83
83
|
"es-MX": ["es-419", "es"],
|
|
84
84
|
"es-AR": ["es-419", "es"],
|
|
85
85
|
"es-CL": ["es-419", "es"],
|
|
@@ -99,15 +99,15 @@ const At = {
|
|
|
99
99
|
"es-DO": ["es-419", "es"],
|
|
100
100
|
"es-PR": ["es-419", "es"],
|
|
101
101
|
"es-CU": ["es-419", "es"]
|
|
102
|
-
},
|
|
103
|
-
let gt = "en-US",
|
|
102
|
+
}, La = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
|
|
103
|
+
let gt = "en-US", Ie = {};
|
|
104
104
|
function y(t, e) {
|
|
105
105
|
!t || !e || typeof e != "object" || (zt[String(t)] = e);
|
|
106
106
|
}
|
|
107
107
|
function rt(t) {
|
|
108
108
|
return String(t || "").trim().replace(/_/g, "-");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Ua(t) {
|
|
111
111
|
const e = rt(t);
|
|
112
112
|
if (!e)
|
|
113
113
|
return ["en-US"];
|
|
@@ -115,15 +115,15 @@ function La(t) {
|
|
|
115
115
|
l && !i.includes(l) && i.push(l);
|
|
116
116
|
};
|
|
117
117
|
s(o);
|
|
118
|
-
for (const [l, u] of Object.entries(
|
|
118
|
+
for (const [l, u] of Object.entries(xa))
|
|
119
119
|
l.toLowerCase() === o.toLowerCase() && u.forEach(s);
|
|
120
120
|
const r = o.split("-");
|
|
121
121
|
for (let l = r.length - 1; l >= 1; l -= 1)
|
|
122
122
|
s(r.slice(0, l).join("-"));
|
|
123
123
|
return s(Vt[r[0]] || r[0]), s("en-US"), i;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
for (const e of
|
|
125
|
+
function Ta(t) {
|
|
126
|
+
for (const e of Ua(t)) {
|
|
127
127
|
if (zt[e])
|
|
128
128
|
return e;
|
|
129
129
|
const a = Object.keys(zt).find(
|
|
@@ -134,7 +134,7 @@ function Ua(t) {
|
|
|
134
134
|
}
|
|
135
135
|
return "en-US";
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Fa(t = {}) {
|
|
138
138
|
var e;
|
|
139
139
|
if (t.locale != null && String(t.locale).trim())
|
|
140
140
|
return rt(t.locale);
|
|
@@ -145,25 +145,25 @@ function Ta(t = {}) {
|
|
|
145
145
|
}
|
|
146
146
|
return typeof navigator < "u" && navigator.language ? rt(navigator.language) : "en-US";
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Ma(t, e) {
|
|
149
149
|
return t != null && (gt = rt(t) || "en-US"), gt;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
151
|
+
function Da(t) {
|
|
152
|
+
Ie = t && typeof t == "object" ? { ...t } : {};
|
|
153
153
|
}
|
|
154
154
|
function Et() {
|
|
155
155
|
return gt;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Oa(t = gt) {
|
|
158
158
|
const e = rt(t).split("-")[0].toLowerCase();
|
|
159
|
-
return
|
|
159
|
+
return La.has(e) ? "rtl" : "ltr";
|
|
160
160
|
}
|
|
161
161
|
function p(t, e) {
|
|
162
|
-
const a = String(t || ""), o =
|
|
163
|
-
let s =
|
|
162
|
+
const a = String(t || ""), o = Ta(gt), i = zt[o] || At;
|
|
163
|
+
let s = Ie[a] ?? i[a] ?? At[a] ?? a;
|
|
164
164
|
return e && typeof e == "object" && (s = String(s).replace(/\{(\w+)\}/g, (r, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(s);
|
|
165
165
|
}
|
|
166
|
-
const
|
|
166
|
+
const Ia = {
|
|
167
167
|
"launcher.open": "Оставете бележка...",
|
|
168
168
|
"tool.crop": "Реколта",
|
|
169
169
|
"tool.resetCrop": "Нулиране на изрязването",
|
|
@@ -220,7 +220,7 @@ const Oa = {
|
|
|
220
220
|
"diag.timezone": "Часова зона",
|
|
221
221
|
"diag.viewport": "Изгледна плоча",
|
|
222
222
|
"diag.user": "Потребител"
|
|
223
|
-
},
|
|
223
|
+
}, Va = {
|
|
224
224
|
"launcher.open": "Deixa una nota...",
|
|
225
225
|
"tool.crop": "Cultiu",
|
|
226
226
|
"tool.resetCrop": "Restablir el cultiu",
|
|
@@ -277,7 +277,7 @@ const Oa = {
|
|
|
277
277
|
"diag.timezone": "Zona horària",
|
|
278
278
|
"diag.viewport": "Porta de vista",
|
|
279
279
|
"diag.user": "Usuari"
|
|
280
|
-
},
|
|
280
|
+
}, $a = {
|
|
281
281
|
"launcher.open": "Zanechte poznámku...",
|
|
282
282
|
"tool.crop": "Oříznout",
|
|
283
283
|
"tool.resetCrop": "Obnovit oříznutí",
|
|
@@ -334,7 +334,7 @@ const Oa = {
|
|
|
334
334
|
"diag.timezone": "Časové pásmo",
|
|
335
335
|
"diag.viewport": "Výřez",
|
|
336
336
|
"diag.user": "Uživatel"
|
|
337
|
-
},
|
|
337
|
+
}, Ba = {
|
|
338
338
|
"launcher.open": "Efterlad en note...",
|
|
339
339
|
"tool.crop": "Afgrøde",
|
|
340
340
|
"tool.resetCrop": "Nulstil afgrøde",
|
|
@@ -391,7 +391,7 @@ const Oa = {
|
|
|
391
391
|
"diag.timezone": "Tidszone",
|
|
392
392
|
"diag.viewport": "Viewport",
|
|
393
393
|
"diag.user": "Bruger"
|
|
394
|
-
},
|
|
394
|
+
}, Na = {
|
|
395
395
|
"launcher.open": "Hinterlassen Sie eine Notiz...",
|
|
396
396
|
"tool.crop": "Ernte",
|
|
397
397
|
"tool.resetCrop": "Zuschnitt zurücksetzen",
|
|
@@ -448,7 +448,7 @@ const Oa = {
|
|
|
448
448
|
"diag.timezone": "Zeitzone",
|
|
449
449
|
"diag.viewport": "Sichtfenster",
|
|
450
450
|
"diag.user": "Nutzer"
|
|
451
|
-
},
|
|
451
|
+
}, Ka = {
|
|
452
452
|
"launcher.open": "Αφήστε ένα σημείωμα...",
|
|
453
453
|
"tool.crop": "Καλλιέργεια",
|
|
454
454
|
"tool.resetCrop": "Επαναφορά της καλλιέργειας",
|
|
@@ -505,7 +505,7 @@ const Oa = {
|
|
|
505
505
|
"diag.timezone": "Ζώνη ώρας",
|
|
506
506
|
"diag.viewport": "Θύρα προβολής",
|
|
507
507
|
"diag.user": "Χρήστης"
|
|
508
|
-
},
|
|
508
|
+
}, Ha = {
|
|
509
509
|
"launcher.open": "Leave a note…",
|
|
510
510
|
"tool.crop": "Crop",
|
|
511
511
|
"tool.resetCrop": "Reset crop",
|
|
@@ -578,7 +578,7 @@ const Oa = {
|
|
|
578
578
|
"diag.timezone": "Timezone",
|
|
579
579
|
"diag.viewport": "Viewport",
|
|
580
580
|
"diag.user": "User"
|
|
581
|
-
},
|
|
581
|
+
}, Ga = {
|
|
582
582
|
"launcher.open": "Deja una nota...",
|
|
583
583
|
"tool.crop": "Cultivo",
|
|
584
584
|
"tool.resetCrop": "Restablecer cultivo",
|
|
@@ -635,7 +635,7 @@ const Oa = {
|
|
|
635
635
|
"diag.timezone": "Zona horaria",
|
|
636
636
|
"diag.viewport": "Ventana",
|
|
637
637
|
"diag.user": "Usuario"
|
|
638
|
-
},
|
|
638
|
+
}, _a = {
|
|
639
639
|
"launcher.open": "Deja una nota...",
|
|
640
640
|
"tool.crop": "Cultivo",
|
|
641
641
|
"tool.resetCrop": "Restablecer recorte",
|
|
@@ -692,7 +692,7 @@ const Oa = {
|
|
|
692
692
|
"diag.timezone": "Zona horaria",
|
|
693
693
|
"diag.viewport": "ViEWPORT",
|
|
694
694
|
"diag.user": "Usuario"
|
|
695
|
-
},
|
|
695
|
+
}, qa = {
|
|
696
696
|
"launcher.open": "Jäta märkus...",
|
|
697
697
|
"tool.crop": "Põllukultuur",
|
|
698
698
|
"tool.resetCrop": "Lähtesta põllukultuur",
|
|
@@ -749,7 +749,7 @@ const Oa = {
|
|
|
749
749
|
"diag.timezone": "Ajavöönd",
|
|
750
750
|
"diag.viewport": "Vaatenurk",
|
|
751
751
|
"diag.user": "Kasutaja"
|
|
752
|
-
},
|
|
752
|
+
}, Wa = {
|
|
753
753
|
"launcher.open": "Jätä muistiinpano...",
|
|
754
754
|
"tool.crop": "Viljely",
|
|
755
755
|
"tool.resetCrop": "Nollaa rajaus",
|
|
@@ -806,7 +806,7 @@ const Oa = {
|
|
|
806
806
|
"diag.timezone": "Aikavyöhyke",
|
|
807
807
|
"diag.viewport": "Näyttöikkuna",
|
|
808
808
|
"diag.user": "Käyttäjä"
|
|
809
|
-
},
|
|
809
|
+
}, Za = {
|
|
810
810
|
"launcher.open": "Laissez un message...",
|
|
811
811
|
"tool.crop": "Récolte",
|
|
812
812
|
"tool.resetCrop": "Réinitialiser la récolte",
|
|
@@ -863,7 +863,7 @@ const Oa = {
|
|
|
863
863
|
"diag.timezone": "Fuseau horaire",
|
|
864
864
|
"diag.viewport": "Viewport",
|
|
865
865
|
"diag.user": "Utilisateur"
|
|
866
|
-
},
|
|
866
|
+
}, Ya = {
|
|
867
867
|
"launcher.open": "एक नोट छोड़ें...",
|
|
868
868
|
"tool.crop": "क्रॉप",
|
|
869
869
|
"tool.resetCrop": "क्रॉप रीसेट करें",
|
|
@@ -920,7 +920,7 @@ const Oa = {
|
|
|
920
920
|
"diag.timezone": "टाइमज़ोन",
|
|
921
921
|
"diag.viewport": "व्यूपोर्ट",
|
|
922
922
|
"diag.user": "यूज़र"
|
|
923
|
-
},
|
|
923
|
+
}, Xa = {
|
|
924
924
|
"launcher.open": "Ostavite poruku...",
|
|
925
925
|
"tool.crop": "Usjev",
|
|
926
926
|
"tool.resetCrop": "Resetirajte obrezivanje",
|
|
@@ -977,7 +977,7 @@ const Oa = {
|
|
|
977
977
|
"diag.timezone": "Vremenska zona",
|
|
978
978
|
"diag.viewport": "Prikaznica",
|
|
979
979
|
"diag.user": "Korisnik"
|
|
980
|
-
},
|
|
980
|
+
}, Ja = {
|
|
981
981
|
"launcher.open": "Hagyjon egy jegyzetet...",
|
|
982
982
|
"tool.crop": "Termés",
|
|
983
983
|
"tool.resetCrop": "Vágás visszaállítása",
|
|
@@ -1034,7 +1034,7 @@ const Oa = {
|
|
|
1034
1034
|
"diag.timezone": "Időzóna",
|
|
1035
1035
|
"diag.viewport": "Nézetablak",
|
|
1036
1036
|
"diag.user": "Felhasználó"
|
|
1037
|
-
},
|
|
1037
|
+
}, Qa = {
|
|
1038
1038
|
"launcher.open": "Tinggalkan catatan...",
|
|
1039
1039
|
"tool.crop": "Panas",
|
|
1040
1040
|
"tool.resetCrop": "Setel ulang tanaman",
|
|
@@ -1091,7 +1091,7 @@ const Oa = {
|
|
|
1091
1091
|
"diag.timezone": "Zona Waktu",
|
|
1092
1092
|
"diag.viewport": "Pintu pandang",
|
|
1093
1093
|
"diag.user": "Pengguna"
|
|
1094
|
-
},
|
|
1094
|
+
}, to = {
|
|
1095
1095
|
"launcher.open": "Lascia una nota...",
|
|
1096
1096
|
"tool.crop": "Ritaglia",
|
|
1097
1097
|
"tool.resetCrop": "Reimposta il ritaglio",
|
|
@@ -1148,7 +1148,7 @@ const Oa = {
|
|
|
1148
1148
|
"diag.timezone": "Fuso orario",
|
|
1149
1149
|
"diag.viewport": "Viewport",
|
|
1150
1150
|
"diag.user": "Utente"
|
|
1151
|
-
},
|
|
1151
|
+
}, eo = {
|
|
1152
1152
|
"launcher.open": "メモを残してください...",
|
|
1153
1153
|
"tool.crop": "クロップ",
|
|
1154
1154
|
"tool.resetCrop": "トリミングをリセット",
|
|
@@ -1205,7 +1205,7 @@ const Oa = {
|
|
|
1205
1205
|
"diag.timezone": "タイムゾーン",
|
|
1206
1206
|
"diag.viewport": "ビューポート",
|
|
1207
1207
|
"diag.user": "ユーザ"
|
|
1208
|
-
},
|
|
1208
|
+
}, ao = {
|
|
1209
1209
|
"launcher.open": "메모 남기기...",
|
|
1210
1210
|
"tool.crop": "크롭",
|
|
1211
1211
|
"tool.resetCrop": "크롭 재설정",
|
|
@@ -1262,7 +1262,7 @@ const Oa = {
|
|
|
1262
1262
|
"diag.timezone": "타임존",
|
|
1263
1263
|
"diag.viewport": "뷰포트",
|
|
1264
1264
|
"diag.user": "사용자"
|
|
1265
|
-
},
|
|
1265
|
+
}, oo = {
|
|
1266
1266
|
"launcher.open": "Palikite pastabą...",
|
|
1267
1267
|
"tool.crop": "Apkarpyti",
|
|
1268
1268
|
"tool.resetCrop": "Iš naujo nustatyti apkarpymą",
|
|
@@ -1319,7 +1319,7 @@ const Oa = {
|
|
|
1319
1319
|
"diag.timezone": "Laiko juosta",
|
|
1320
1320
|
"diag.viewport": "Peržiūros sritis",
|
|
1321
1321
|
"diag.user": "Vartotojas"
|
|
1322
|
-
},
|
|
1322
|
+
}, io = {
|
|
1323
1323
|
"launcher.open": "Atstājiet piezīmi...",
|
|
1324
1324
|
"tool.crop": "Kultūraugs",
|
|
1325
1325
|
"tool.resetCrop": "Atiestatīt apgriešanu",
|
|
@@ -1376,7 +1376,7 @@ const Oa = {
|
|
|
1376
1376
|
"diag.timezone": "Laika josla",
|
|
1377
1377
|
"diag.viewport": "Skatu laukums",
|
|
1378
1378
|
"diag.user": "Lietotājs"
|
|
1379
|
-
},
|
|
1379
|
+
}, so = {
|
|
1380
1380
|
"launcher.open": "Legg igjen et notat...",
|
|
1381
1381
|
"tool.crop": "Beskjæring",
|
|
1382
1382
|
"tool.resetCrop": "Tilbakestill beskjæring",
|
|
@@ -1433,7 +1433,7 @@ const Oa = {
|
|
|
1433
1433
|
"diag.timezone": "Tidssone",
|
|
1434
1434
|
"diag.viewport": "Visningsport",
|
|
1435
1435
|
"diag.user": "Bruker"
|
|
1436
|
-
},
|
|
1436
|
+
}, no = {
|
|
1437
1437
|
"launcher.open": "Laat een briefje achter...",
|
|
1438
1438
|
"tool.crop": "Gewas",
|
|
1439
1439
|
"tool.resetCrop": "Bijsnijden opnieuw instellen",
|
|
@@ -1490,7 +1490,7 @@ const Oa = {
|
|
|
1490
1490
|
"diag.timezone": "Tijdzone",
|
|
1491
1491
|
"diag.viewport": "Viewport",
|
|
1492
1492
|
"diag.user": "Gebruiker"
|
|
1493
|
-
},
|
|
1493
|
+
}, ro = {
|
|
1494
1494
|
"launcher.open": "Zostaw notatkę...",
|
|
1495
1495
|
"tool.crop": "Uprawa",
|
|
1496
1496
|
"tool.resetCrop": "Resetuj kadrowanie",
|
|
@@ -1547,7 +1547,7 @@ const Oa = {
|
|
|
1547
1547
|
"diag.timezone": "Strefa czasowa",
|
|
1548
1548
|
"diag.viewport": "rzutnia",
|
|
1549
1549
|
"diag.user": "Użytkownik"
|
|
1550
|
-
},
|
|
1550
|
+
}, lo = {
|
|
1551
1551
|
"launcher.open": "Deixe uma nota...",
|
|
1552
1552
|
"tool.crop": "Colheita",
|
|
1553
1553
|
"tool.resetCrop": "Redefinir o corte",
|
|
@@ -1604,7 +1604,7 @@ const Oa = {
|
|
|
1604
1604
|
"diag.timezone": "Fuso horário",
|
|
1605
1605
|
"diag.viewport": "Janela de visualização",
|
|
1606
1606
|
"diag.user": "Usuário"
|
|
1607
|
-
},
|
|
1607
|
+
}, uo = {
|
|
1608
1608
|
"launcher.open": "Deixe uma nota...",
|
|
1609
1609
|
"tool.crop": "Colheita",
|
|
1610
1610
|
"tool.resetCrop": "Redefinir o recorte",
|
|
@@ -1661,7 +1661,7 @@ const Oa = {
|
|
|
1661
1661
|
"diag.timezone": "Fuso horário",
|
|
1662
1662
|
"diag.viewport": "Viewport",
|
|
1663
1663
|
"diag.user": "Utilizador"
|
|
1664
|
-
},
|
|
1664
|
+
}, co = {
|
|
1665
1665
|
"launcher.open": "Lăsați o notă...",
|
|
1666
1666
|
"tool.crop": "Cultură",
|
|
1667
1667
|
"tool.resetCrop": "Resetați recolta",
|
|
@@ -1718,7 +1718,7 @@ const Oa = {
|
|
|
1718
1718
|
"diag.timezone": "Fus orar",
|
|
1719
1719
|
"diag.viewport": "Portul de vizualizare",
|
|
1720
1720
|
"diag.user": "Utilizator"
|
|
1721
|
-
},
|
|
1721
|
+
}, po = {
|
|
1722
1722
|
"launcher.open": "Оставьте заметку...",
|
|
1723
1723
|
"tool.crop": "урожай",
|
|
1724
1724
|
"tool.resetCrop": "Сбросить урожай",
|
|
@@ -1775,7 +1775,7 @@ const Oa = {
|
|
|
1775
1775
|
"diag.timezone": "Часовой пояс",
|
|
1776
1776
|
"diag.viewport": "окно просмотра",
|
|
1777
1777
|
"diag.user": "Пользователь"
|
|
1778
|
-
},
|
|
1778
|
+
}, go = {
|
|
1779
1779
|
"launcher.open": "Zanechať poznámku...",
|
|
1780
1780
|
"tool.crop": "Oplodina",
|
|
1781
1781
|
"tool.resetCrop": "Obnoviť orezanie",
|
|
@@ -1832,7 +1832,7 @@ const Oa = {
|
|
|
1832
1832
|
"diag.timezone": "Časové pásmo",
|
|
1833
1833
|
"diag.viewport": "Zobrazenie",
|
|
1834
1834
|
"diag.user": "Používateľ"
|
|
1835
|
-
},
|
|
1835
|
+
}, mo = {
|
|
1836
1836
|
"launcher.open": "Pustite opombo...",
|
|
1837
1837
|
"tool.crop": "Pridelek",
|
|
1838
1838
|
"tool.resetCrop": "Ponastavi obrezovanje",
|
|
@@ -1889,7 +1889,7 @@ const Oa = {
|
|
|
1889
1889
|
"diag.timezone": "Časovni pas",
|
|
1890
1890
|
"diag.viewport": "Razgledna plošča",
|
|
1891
1891
|
"diag.user": "Uporabnik"
|
|
1892
|
-
},
|
|
1892
|
+
}, ho = {
|
|
1893
1893
|
"launcher.open": "Ostavite belešku...",
|
|
1894
1894
|
"tool.crop": "Usjev",
|
|
1895
1895
|
"tool.resetCrop": "Resetujte usev",
|
|
@@ -1946,7 +1946,7 @@ const Oa = {
|
|
|
1946
1946
|
"diag.timezone": "Vremenska zona",
|
|
1947
1947
|
"diag.viewport": "Viedport",
|
|
1948
1948
|
"diag.user": "Korisnik"
|
|
1949
|
-
},
|
|
1949
|
+
}, fo = {
|
|
1950
1950
|
"launcher.open": "Lämna en anteckning...",
|
|
1951
1951
|
"tool.crop": "Skörda",
|
|
1952
1952
|
"tool.resetCrop": "Återställ beskärning",
|
|
@@ -2003,7 +2003,7 @@ const Oa = {
|
|
|
2003
2003
|
"diag.timezone": "Tidszon",
|
|
2004
2004
|
"diag.viewport": "Viewport",
|
|
2005
2005
|
"diag.user": "Användare"
|
|
2006
|
-
},
|
|
2006
|
+
}, yo = {
|
|
2007
2007
|
"launcher.open": "Mag-iwan ng tala...",
|
|
2008
2008
|
"tool.crop": "Pag-ani",
|
|
2009
2009
|
"tool.resetCrop": "I-reset ang panani",
|
|
@@ -2060,7 +2060,7 @@ const Oa = {
|
|
|
2060
2060
|
"diag.timezone": "Timesone",
|
|
2061
2061
|
"diag.viewport": "Viewport",
|
|
2062
2062
|
"diag.user": "Gumagamit"
|
|
2063
|
-
},
|
|
2063
|
+
}, vo = {
|
|
2064
2064
|
"launcher.open": "ทิ้งหมายเหตุ...",
|
|
2065
2065
|
"tool.crop": "พืชผล",
|
|
2066
2066
|
"tool.resetCrop": "รีเซ็ตการตัดพืช",
|
|
@@ -2117,7 +2117,7 @@ const Oa = {
|
|
|
2117
2117
|
"diag.timezone": "เขตเวลา",
|
|
2118
2118
|
"diag.viewport": "พอร์ตมุมมอง",
|
|
2119
2119
|
"diag.user": "ผู้ใช้"
|
|
2120
|
-
},
|
|
2120
|
+
}, ko = {
|
|
2121
2121
|
"launcher.open": "Bir not bırakın...",
|
|
2122
2122
|
"tool.crop": "Mahsul",
|
|
2123
2123
|
"tool.resetCrop": "Kırpmayı sıfırla",
|
|
@@ -2174,7 +2174,7 @@ const Oa = {
|
|
|
2174
2174
|
"diag.timezone": "Saat dilimi",
|
|
2175
2175
|
"diag.viewport": "Görünüm noktası",
|
|
2176
2176
|
"diag.user": "Kullanıcı"
|
|
2177
|
-
},
|
|
2177
|
+
}, bo = {
|
|
2178
2178
|
"launcher.open": "Залиште записку...",
|
|
2179
2179
|
"tool.crop": "Урожай",
|
|
2180
2180
|
"tool.resetCrop": "Скинути обрізку",
|
|
@@ -2231,7 +2231,7 @@ const Oa = {
|
|
|
2231
2231
|
"diag.timezone": "Часовий пояс",
|
|
2232
2232
|
"diag.viewport": "Вигляд",
|
|
2233
2233
|
"diag.user": "Користувач"
|
|
2234
|
-
},
|
|
2234
|
+
}, wo = {
|
|
2235
2235
|
"launcher.open": "Để lại một ghi chú...",
|
|
2236
2236
|
"tool.crop": "Cây trồng",
|
|
2237
2237
|
"tool.resetCrop": "Đặt lại cây trồng",
|
|
@@ -2288,7 +2288,7 @@ const Oa = {
|
|
|
2288
2288
|
"diag.timezone": "Múi giờ",
|
|
2289
2289
|
"diag.viewport": "Cổng quan sát",
|
|
2290
2290
|
"diag.user": "Người dùng"
|
|
2291
|
-
},
|
|
2291
|
+
}, So = {
|
|
2292
2292
|
"launcher.open": "留个笔记...",
|
|
2293
2293
|
"tool.crop": "作物",
|
|
2294
2294
|
"tool.resetCrop": "重置裁剪",
|
|
@@ -2345,7 +2345,7 @@ const Oa = {
|
|
|
2345
2345
|
"diag.timezone": "时区",
|
|
2346
2346
|
"diag.viewport": "视口",
|
|
2347
2347
|
"diag.user": "用户"
|
|
2348
|
-
},
|
|
2348
|
+
}, Co = {
|
|
2349
2349
|
"launcher.open": "留下筆記...",
|
|
2350
2350
|
"tool.crop": "作物",
|
|
2351
2351
|
"tool.resetCrop": "重設裁切",
|
|
@@ -2404,46 +2404,46 @@ const Oa = {
|
|
|
2404
2404
|
"diag.user": "使用者"
|
|
2405
2405
|
};
|
|
2406
2406
|
y("en-US", At);
|
|
2407
|
-
y("bg",
|
|
2408
|
-
y("ca",
|
|
2409
|
-
y("cs",
|
|
2410
|
-
y("da",
|
|
2411
|
-
y("de",
|
|
2412
|
-
y("el",
|
|
2413
|
-
y("en-GB",
|
|
2414
|
-
y("es",
|
|
2415
|
-
y("es-419",
|
|
2416
|
-
y("et",
|
|
2417
|
-
y("fi",
|
|
2418
|
-
y("fr",
|
|
2419
|
-
y("hi",
|
|
2420
|
-
y("hr",
|
|
2421
|
-
y("hu",
|
|
2422
|
-
y("id",
|
|
2423
|
-
y("it",
|
|
2424
|
-
y("ja",
|
|
2425
|
-
y("ko",
|
|
2426
|
-
y("lt",
|
|
2427
|
-
y("lv",
|
|
2428
|
-
y("nb",
|
|
2429
|
-
y("nl",
|
|
2430
|
-
y("pl",
|
|
2431
|
-
y("pt-BR",
|
|
2432
|
-
y("pt-PT",
|
|
2433
|
-
y("ro",
|
|
2434
|
-
y("ru",
|
|
2435
|
-
y("sk",
|
|
2436
|
-
y("sl",
|
|
2437
|
-
y("sr",
|
|
2438
|
-
y("sv",
|
|
2439
|
-
y("fil",
|
|
2440
|
-
y("th",
|
|
2441
|
-
y("tr",
|
|
2442
|
-
y("uk",
|
|
2443
|
-
y("vi",
|
|
2444
|
-
y("zh-CN",
|
|
2445
|
-
y("zh-TW",
|
|
2446
|
-
function
|
|
2407
|
+
y("bg", Ia);
|
|
2408
|
+
y("ca", Va);
|
|
2409
|
+
y("cs", $a);
|
|
2410
|
+
y("da", Ba);
|
|
2411
|
+
y("de", Na);
|
|
2412
|
+
y("el", Ka);
|
|
2413
|
+
y("en-GB", Ha);
|
|
2414
|
+
y("es", Ga);
|
|
2415
|
+
y("es-419", _a);
|
|
2416
|
+
y("et", qa);
|
|
2417
|
+
y("fi", Wa);
|
|
2418
|
+
y("fr", Za);
|
|
2419
|
+
y("hi", Ya);
|
|
2420
|
+
y("hr", Xa);
|
|
2421
|
+
y("hu", Ja);
|
|
2422
|
+
y("id", Qa);
|
|
2423
|
+
y("it", to);
|
|
2424
|
+
y("ja", eo);
|
|
2425
|
+
y("ko", ao);
|
|
2426
|
+
y("lt", oo);
|
|
2427
|
+
y("lv", io);
|
|
2428
|
+
y("nb", so);
|
|
2429
|
+
y("nl", no);
|
|
2430
|
+
y("pl", ro);
|
|
2431
|
+
y("pt-BR", lo);
|
|
2432
|
+
y("pt-PT", uo);
|
|
2433
|
+
y("ro", co);
|
|
2434
|
+
y("ru", po);
|
|
2435
|
+
y("sk", go);
|
|
2436
|
+
y("sl", mo);
|
|
2437
|
+
y("sr", ho);
|
|
2438
|
+
y("sv", fo);
|
|
2439
|
+
y("fil", yo);
|
|
2440
|
+
y("th", vo);
|
|
2441
|
+
y("tr", ko);
|
|
2442
|
+
y("uk", bo);
|
|
2443
|
+
y("vi", wo);
|
|
2444
|
+
y("zh-CN", So);
|
|
2445
|
+
y("zh-TW", Co);
|
|
2446
|
+
function Ao(t, e) {
|
|
2447
2447
|
if (t.match(/^[a-z]+:\/\//i))
|
|
2448
2448
|
return t;
|
|
2449
2449
|
if (t.match(/^\/\//))
|
|
@@ -2453,7 +2453,7 @@ function Co(t, e) {
|
|
|
2453
2453
|
const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), i = a.createElement("a");
|
|
2454
2454
|
return a.head.appendChild(o), a.body.appendChild(i), e && (o.href = e), i.href = t, i.href;
|
|
2455
2455
|
}
|
|
2456
|
-
const
|
|
2456
|
+
const zo = /* @__PURE__ */ (() => {
|
|
2457
2457
|
let t = 0;
|
|
2458
2458
|
const e = () => (
|
|
2459
2459
|
// eslint-disable-next-line no-bitwise
|
|
@@ -2468,26 +2468,26 @@ function J(t) {
|
|
|
2468
2468
|
return e;
|
|
2469
2469
|
}
|
|
2470
2470
|
let it = null;
|
|
2471
|
-
function
|
|
2471
|
+
function Ve(t = {}) {
|
|
2472
2472
|
return it || (t.includeStyleProperties ? (it = t.includeStyleProperties, it) : (it = J(window.getComputedStyle(document.documentElement)), it));
|
|
2473
2473
|
}
|
|
2474
2474
|
function Rt(t, e) {
|
|
2475
2475
|
const o = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
|
|
2476
2476
|
return o ? parseFloat(o.replace("px", "")) : 0;
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2478
|
+
function Eo(t) {
|
|
2479
2479
|
const e = Rt(t, "border-left-width"), a = Rt(t, "border-right-width");
|
|
2480
2480
|
return t.clientWidth + e + a;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function Ro(t) {
|
|
2483
2483
|
const e = Rt(t, "border-top-width"), a = Rt(t, "border-bottom-width");
|
|
2484
2484
|
return t.clientHeight + e + a;
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2487
|
-
const a = e.width ||
|
|
2486
|
+
function $e(t, e = {}) {
|
|
2487
|
+
const a = e.width || Eo(t), o = e.height || Ro(t);
|
|
2488
2488
|
return { width: a, height: o };
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function jo() {
|
|
2491
2491
|
let t, e;
|
|
2492
2492
|
try {
|
|
2493
2493
|
e = process;
|
|
@@ -2497,7 +2497,7 @@ function Ro() {
|
|
|
2497
2497
|
return a && (t = parseInt(a, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
|
|
2498
2498
|
}
|
|
2499
2499
|
const U = 16384;
|
|
2500
|
-
function
|
|
2500
|
+
function Po(t) {
|
|
2501
2501
|
(t.width > U || t.height > U) && (t.width > U && t.height > U ? t.width > t.height ? (t.height *= U / t.width, t.width = U) : (t.width *= U / t.height, t.height = U) : t.width > U ? (t.height *= U / t.width, t.width = U) : (t.width *= U / t.height, t.height = U));
|
|
2502
2502
|
}
|
|
2503
2503
|
function jt(t) {
|
|
@@ -2510,12 +2510,12 @@ function jt(t) {
|
|
|
2510
2510
|
}, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = t;
|
|
2511
2511
|
});
|
|
2512
2512
|
}
|
|
2513
|
-
async function
|
|
2513
|
+
async function xo(t) {
|
|
2514
2514
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
2515
2515
|
}
|
|
2516
|
-
async function
|
|
2516
|
+
async function Lo(t, e, a) {
|
|
2517
2517
|
const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"), s = document.createElementNS(o, "foreignObject");
|
|
2518
|
-
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(t),
|
|
2518
|
+
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(t), xo(i);
|
|
2519
2519
|
}
|
|
2520
2520
|
const L = (t, e) => {
|
|
2521
2521
|
if (t instanceof e)
|
|
@@ -2523,67 +2523,67 @@ const L = (t, e) => {
|
|
|
2523
2523
|
const a = Object.getPrototypeOf(t);
|
|
2524
2524
|
return a === null ? !1 : a.constructor.name === e.name || L(a, e);
|
|
2525
2525
|
};
|
|
2526
|
-
function
|
|
2526
|
+
function Uo(t) {
|
|
2527
2527
|
const e = t.getPropertyValue("content");
|
|
2528
2528
|
return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2531
|
-
return
|
|
2530
|
+
function To(t, e) {
|
|
2531
|
+
return Ve(e).map((a) => {
|
|
2532
2532
|
const o = t.getPropertyValue(a), i = t.getPropertyPriority(a);
|
|
2533
2533
|
return `${a}: ${o}${i ? " !important" : ""};`;
|
|
2534
2534
|
}).join(" ");
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2537
|
-
const i = `.${t}:${e}`, s = a.cssText ?
|
|
2536
|
+
function Fo(t, e, a, o) {
|
|
2537
|
+
const i = `.${t}:${e}`, s = a.cssText ? Uo(a) : To(a, o);
|
|
2538
2538
|
return document.createTextNode(`${i}{${s}}`);
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2540
|
+
function pe(t, e, a, o) {
|
|
2541
2541
|
const i = window.getComputedStyle(t, a), s = i.getPropertyValue("content");
|
|
2542
2542
|
if (s === "" || s === "none")
|
|
2543
2543
|
return;
|
|
2544
|
-
const r =
|
|
2544
|
+
const r = zo();
|
|
2545
2545
|
try {
|
|
2546
2546
|
e.className = `${e.className} ${r}`;
|
|
2547
2547
|
} catch {
|
|
2548
2548
|
return;
|
|
2549
2549
|
}
|
|
2550
2550
|
const l = document.createElement("style");
|
|
2551
|
-
l.appendChild(
|
|
2551
|
+
l.appendChild(Fo(r, a, i, o)), e.appendChild(l);
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2554
|
-
|
|
2553
|
+
function Mo(t, e, a) {
|
|
2554
|
+
pe(t, e, ":before", a), pe(t, e, ":after", a);
|
|
2555
2555
|
}
|
|
2556
|
-
const
|
|
2557
|
-
woff:
|
|
2558
|
-
woff2:
|
|
2556
|
+
const ge = "application/font-woff", me = "image/jpeg", Do = {
|
|
2557
|
+
woff: ge,
|
|
2558
|
+
woff2: ge,
|
|
2559
2559
|
ttf: "application/font-truetype",
|
|
2560
2560
|
eot: "application/vnd.ms-fontobject",
|
|
2561
2561
|
png: "image/png",
|
|
2562
|
-
jpg:
|
|
2563
|
-
jpeg:
|
|
2562
|
+
jpg: me,
|
|
2563
|
+
jpeg: me,
|
|
2564
2564
|
gif: "image/gif",
|
|
2565
2565
|
tiff: "image/tiff",
|
|
2566
2566
|
svg: "image/svg+xml",
|
|
2567
2567
|
webp: "image/webp"
|
|
2568
2568
|
};
|
|
2569
|
-
function
|
|
2569
|
+
function Oo(t) {
|
|
2570
2570
|
const e = /\.([^./]*?)$/g.exec(t);
|
|
2571
2571
|
return e ? e[1] : "";
|
|
2572
2572
|
}
|
|
2573
2573
|
function Jt(t) {
|
|
2574
|
-
const e =
|
|
2575
|
-
return
|
|
2574
|
+
const e = Oo(t).toLowerCase();
|
|
2575
|
+
return Do[e] || "";
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function Io(t) {
|
|
2578
2578
|
return t.split(/,/)[1];
|
|
2579
2579
|
}
|
|
2580
2580
|
function Gt(t) {
|
|
2581
2581
|
return t.search(/^(data:)/) !== -1;
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function Vo(t, e) {
|
|
2584
2584
|
return `data:${e};base64,${t}`;
|
|
2585
2585
|
}
|
|
2586
|
-
async function
|
|
2586
|
+
async function Be(t, e, a) {
|
|
2587
2587
|
const o = await fetch(t, e);
|
|
2588
2588
|
if (o.status === 404)
|
|
2589
2589
|
throw new Error(`Resource "${o.url}" not found`);
|
|
@@ -2600,19 +2600,19 @@ async function $e(t, e, a) {
|
|
|
2600
2600
|
});
|
|
2601
2601
|
}
|
|
2602
2602
|
const $t = {};
|
|
2603
|
-
function
|
|
2603
|
+
function $o(t, e, a) {
|
|
2604
2604
|
let o = t.replace(/\?.*/, "");
|
|
2605
2605
|
return a && (o = t), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), e ? `[${e}]${o}` : o;
|
|
2606
2606
|
}
|
|
2607
2607
|
async function Qt(t, e, a) {
|
|
2608
|
-
const o =
|
|
2608
|
+
const o = $o(t, e, a.includeQueryParams);
|
|
2609
2609
|
if ($t[o] != null)
|
|
2610
2610
|
return $t[o];
|
|
2611
2611
|
a.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
2612
2612
|
let i;
|
|
2613
2613
|
try {
|
|
2614
|
-
const s = await
|
|
2615
|
-
i =
|
|
2614
|
+
const s = await Be(t, a.fetchRequestInit, ({ res: r, result: l }) => (e || (e = r.headers.get("Content-Type") || ""), Io(l)));
|
|
2615
|
+
i = Vo(s, e);
|
|
2616
2616
|
} catch (s) {
|
|
2617
2617
|
i = a.imagePlaceholder || "";
|
|
2618
2618
|
let r = `Failed to fetch resource: ${t}`;
|
|
@@ -2620,11 +2620,11 @@ async function Qt(t, e, a) {
|
|
|
2620
2620
|
}
|
|
2621
2621
|
return $t[o] = i, i;
|
|
2622
2622
|
}
|
|
2623
|
-
async function
|
|
2623
|
+
async function Bo(t) {
|
|
2624
2624
|
const e = t.toDataURL();
|
|
2625
2625
|
return e === "data:," ? t.cloneNode(!1) : jt(e);
|
|
2626
2626
|
}
|
|
2627
|
-
async function
|
|
2627
|
+
async function No(t, e) {
|
|
2628
2628
|
if (t.currentSrc) {
|
|
2629
2629
|
const s = document.createElement("canvas"), r = s.getContext("2d");
|
|
2630
2630
|
s.width = t.clientWidth, s.height = t.clientHeight, r == null || r.drawImage(t, 0, 0, s.width, s.height);
|
|
@@ -2634,7 +2634,7 @@ async function Bo(t, e) {
|
|
|
2634
2634
|
const a = t.poster, o = Jt(a), i = await Qt(a, o, e);
|
|
2635
2635
|
return jt(i);
|
|
2636
2636
|
}
|
|
2637
|
-
async function
|
|
2637
|
+
async function Ko(t, e) {
|
|
2638
2638
|
var a;
|
|
2639
2639
|
try {
|
|
2640
2640
|
if (!((a = t == null ? void 0 : t.contentDocument) === null || a === void 0) && a.body)
|
|
@@ -2643,42 +2643,42 @@ async function No(t, e) {
|
|
|
2643
2643
|
}
|
|
2644
2644
|
return t.cloneNode(!1);
|
|
2645
2645
|
}
|
|
2646
|
-
async function
|
|
2647
|
-
return L(t, HTMLCanvasElement) ?
|
|
2646
|
+
async function Ho(t, e) {
|
|
2647
|
+
return L(t, HTMLCanvasElement) ? Bo(t) : L(t, HTMLVideoElement) ? No(t, e) : L(t, HTMLIFrameElement) ? Ko(t, e) : t.cloneNode(Ne(t));
|
|
2648
2648
|
}
|
|
2649
|
-
const
|
|
2650
|
-
async function
|
|
2649
|
+
const Go = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", Ne = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
|
|
2650
|
+
async function _o(t, e, a) {
|
|
2651
2651
|
var o, i;
|
|
2652
|
-
if (
|
|
2652
|
+
if (Ne(e))
|
|
2653
2653
|
return e;
|
|
2654
2654
|
let s = [];
|
|
2655
|
-
return
|
|
2655
|
+
return Go(t) && t.assignedNodes ? s = J(t.assignedNodes()) : L(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? s = J(t.contentDocument.body.childNodes) : s = J(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), s.length === 0 || L(t, HTMLVideoElement) || await s.reduce((r, l) => r.then(() => Mt(l, a)).then((u) => {
|
|
2656
2656
|
u && e.appendChild(u);
|
|
2657
2657
|
}), Promise.resolve()), e;
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function qo(t, e, a) {
|
|
2660
2660
|
const o = e.style;
|
|
2661
2661
|
if (!o)
|
|
2662
2662
|
return;
|
|
2663
2663
|
const i = window.getComputedStyle(t);
|
|
2664
|
-
i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) :
|
|
2664
|
+
i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : Ve(a).forEach((s) => {
|
|
2665
2665
|
let r = i.getPropertyValue(s);
|
|
2666
2666
|
s === "font-size" && r.endsWith("px") && (r = `${Math.floor(parseFloat(r.substring(0, r.length - 2))) - 0.1}px`), L(t, HTMLIFrameElement) && s === "display" && r === "inline" && (r = "block"), s === "d" && e.getAttribute("d") && (r = `path(${e.getAttribute("d")})`), o.setProperty(s, r, i.getPropertyPriority(s));
|
|
2667
2667
|
});
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function Wo(t, e) {
|
|
2670
2670
|
L(t, HTMLTextAreaElement) && (e.innerHTML = t.value), L(t, HTMLInputElement) && e.setAttribute("value", t.value);
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function Zo(t, e) {
|
|
2673
2673
|
if (L(t, HTMLSelectElement)) {
|
|
2674
2674
|
const o = Array.from(e.children).find((i) => t.value === i.getAttribute("value"));
|
|
2675
2675
|
o && o.setAttribute("selected", "");
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2679
|
-
return L(e, Element) && (
|
|
2678
|
+
function Yo(t, e, a) {
|
|
2679
|
+
return L(e, Element) && (qo(t, e, a), Mo(t, e, a), Wo(t, e), Zo(t, e)), e;
|
|
2680
2680
|
}
|
|
2681
|
-
async function
|
|
2681
|
+
async function Xo(t, e) {
|
|
2682
2682
|
const a = t.querySelectorAll ? t.querySelectorAll("use") : [];
|
|
2683
2683
|
if (a.length === 0)
|
|
2684
2684
|
return t;
|
|
@@ -2686,8 +2686,8 @@ async function Yo(t, e) {
|
|
|
2686
2686
|
for (let s = 0; s < a.length; s++) {
|
|
2687
2687
|
const l = a[s].getAttribute("xlink:href");
|
|
2688
2688
|
if (l) {
|
|
2689
|
-
const u = t.querySelector(l),
|
|
2690
|
-
!u &&
|
|
2689
|
+
const u = t.querySelector(l), d = document.querySelector(l);
|
|
2690
|
+
!u && d && !o[l] && (o[l] = await Mt(d, e, !0));
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
2693
2693
|
const i = Object.values(o);
|
|
@@ -2703,30 +2703,30 @@ async function Yo(t, e) {
|
|
|
2703
2703
|
return t;
|
|
2704
2704
|
}
|
|
2705
2705
|
async function Mt(t, e, a) {
|
|
2706
|
-
return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) =>
|
|
2706
|
+
return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => Ho(o, e)).then((o) => _o(t, o, e)).then((o) => Yo(t, o, e)).then((o) => Xo(o, e));
|
|
2707
2707
|
}
|
|
2708
|
-
const
|
|
2709
|
-
function
|
|
2708
|
+
const Ke = /url\((['"]?)([^'"]+?)\1\)/g, Jo = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Qo = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
2709
|
+
function ti(t) {
|
|
2710
2710
|
const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
2711
2711
|
return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2713
|
+
function ei(t) {
|
|
2714
2714
|
const e = [];
|
|
2715
|
-
return t.replace(
|
|
2715
|
+
return t.replace(Ke, (a, o, i) => (e.push(i), a)), e.filter((a) => !Gt(a));
|
|
2716
2716
|
}
|
|
2717
|
-
async function
|
|
2717
|
+
async function ai(t, e, a, o, i) {
|
|
2718
2718
|
try {
|
|
2719
|
-
const s = a ?
|
|
2719
|
+
const s = a ? Ao(e, a) : e, r = Jt(e);
|
|
2720
2720
|
let l;
|
|
2721
|
-
return i || (l = await Qt(s, r, o)), t.replace(
|
|
2721
|
+
return i || (l = await Qt(s, r, o)), t.replace(ti(e), `$1${l}$3`);
|
|
2722
2722
|
} catch {
|
|
2723
2723
|
}
|
|
2724
2724
|
return t;
|
|
2725
2725
|
}
|
|
2726
|
-
function
|
|
2727
|
-
return e ? t.replace(
|
|
2726
|
+
function oi(t, { preferredFontFormat: e }) {
|
|
2727
|
+
return e ? t.replace(Qo, (a) => {
|
|
2728
2728
|
for (; ; ) {
|
|
2729
|
-
const [o, , i] =
|
|
2729
|
+
const [o, , i] = Jo.exec(a) || [];
|
|
2730
2730
|
if (!i)
|
|
2731
2731
|
return "";
|
|
2732
2732
|
if (i === e)
|
|
@@ -2734,28 +2734,28 @@ function ai(t, { preferredFontFormat: e }) {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
}) : t;
|
|
2736
2736
|
}
|
|
2737
|
-
function
|
|
2738
|
-
return t.search(
|
|
2737
|
+
function He(t) {
|
|
2738
|
+
return t.search(Ke) !== -1;
|
|
2739
2739
|
}
|
|
2740
|
-
async function
|
|
2741
|
-
if (!
|
|
2740
|
+
async function Ge(t, e, a) {
|
|
2741
|
+
if (!He(t))
|
|
2742
2742
|
return t;
|
|
2743
|
-
const o =
|
|
2744
|
-
return
|
|
2743
|
+
const o = oi(t, a);
|
|
2744
|
+
return ei(o).reduce((s, r) => s.then((l) => ai(l, r, e, a)), Promise.resolve(o));
|
|
2745
2745
|
}
|
|
2746
2746
|
async function st(t, e, a) {
|
|
2747
2747
|
var o;
|
|
2748
2748
|
const i = (o = e.style) === null || o === void 0 ? void 0 : o.getPropertyValue(t);
|
|
2749
2749
|
if (i) {
|
|
2750
|
-
const s = await
|
|
2750
|
+
const s = await Ge(i, null, a);
|
|
2751
2751
|
return e.style.setProperty(t, s, e.style.getPropertyPriority(t)), !0;
|
|
2752
2752
|
}
|
|
2753
2753
|
return !1;
|
|
2754
2754
|
}
|
|
2755
|
-
async function
|
|
2755
|
+
async function ii(t, e) {
|
|
2756
2756
|
await st("background", t, e) || await st("background-image", t, e), await st("mask", t, e) || await st("-webkit-mask", t, e) || await st("mask-image", t, e) || await st("-webkit-mask-image", t, e);
|
|
2757
2757
|
}
|
|
2758
|
-
async function
|
|
2758
|
+
async function si(t, e) {
|
|
2759
2759
|
const a = L(t, HTMLImageElement);
|
|
2760
2760
|
if (!(a && !Gt(t.src)) && !(L(t, SVGImageElement) && !Gt(t.href.baseVal)))
|
|
2761
2761
|
return;
|
|
@@ -2764,22 +2764,22 @@ async function ii(t, e) {
|
|
|
2764
2764
|
t.onload = s, t.onerror = e.onImageErrorHandler ? (...u) => {
|
|
2765
2765
|
try {
|
|
2766
2766
|
s(e.onImageErrorHandler(...u));
|
|
2767
|
-
} catch (
|
|
2768
|
-
r(
|
|
2767
|
+
} catch (d) {
|
|
2768
|
+
r(d);
|
|
2769
2769
|
}
|
|
2770
2770
|
} : r;
|
|
2771
2771
|
const l = t;
|
|
2772
2772
|
l.decode && (l.decode = s), l.loading === "lazy" && (l.loading = "eager"), a ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
|
-
async function
|
|
2776
|
-
const o = J(t.childNodes).map((i) =>
|
|
2775
|
+
async function ni(t, e) {
|
|
2776
|
+
const o = J(t.childNodes).map((i) => _e(i, e));
|
|
2777
2777
|
await Promise.all(o).then(() => t);
|
|
2778
2778
|
}
|
|
2779
|
-
async function
|
|
2780
|
-
L(t, Element) && (await
|
|
2779
|
+
async function _e(t, e) {
|
|
2780
|
+
L(t, Element) && (await ii(t, e), await si(t, e), await ni(t, e));
|
|
2781
2781
|
}
|
|
2782
|
-
function
|
|
2782
|
+
function ri(t, e) {
|
|
2783
2783
|
const { style: a } = t;
|
|
2784
2784
|
e.backgroundColor && (a.backgroundColor = e.backgroundColor), e.width && (a.width = `${e.width}px`), e.height && (a.height = `${e.height}px`);
|
|
2785
2785
|
const o = e.style;
|
|
@@ -2787,23 +2787,23 @@ function ni(t, e) {
|
|
|
2787
2787
|
a[i] = o[i];
|
|
2788
2788
|
}), t;
|
|
2789
2789
|
}
|
|
2790
|
-
const
|
|
2791
|
-
async function
|
|
2792
|
-
let e =
|
|
2790
|
+
const he = {};
|
|
2791
|
+
async function fe(t) {
|
|
2792
|
+
let e = he[t];
|
|
2793
2793
|
if (e != null)
|
|
2794
2794
|
return e;
|
|
2795
2795
|
const o = await (await fetch(t)).text();
|
|
2796
|
-
return e = { url: t, cssText: o },
|
|
2796
|
+
return e = { url: t, cssText: o }, he[t] = e, e;
|
|
2797
2797
|
}
|
|
2798
|
-
async function
|
|
2798
|
+
async function ye(t, e) {
|
|
2799
2799
|
let a = t.cssText;
|
|
2800
2800
|
const o = /url\(["']?([^"')]+)["']?\)/g, s = (a.match(/url\([^)]+\)/g) || []).map(async (r) => {
|
|
2801
2801
|
let l = r.replace(o, "$1");
|
|
2802
|
-
return l.startsWith("https://") || (l = new URL(l, t.url).href),
|
|
2802
|
+
return l.startsWith("https://") || (l = new URL(l, t.url).href), Be(l, e.fetchRequestInit, ({ result: u }) => (a = a.replace(r, `url(${u})`), [r, u]));
|
|
2803
2803
|
});
|
|
2804
2804
|
return Promise.all(s).then(() => a);
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function ve(t) {
|
|
2807
2807
|
if (t == null)
|
|
2808
2808
|
return [];
|
|
2809
2809
|
const e = [], a = /(\/\*[\s\S]*?\*\/)/gi;
|
|
@@ -2829,7 +2829,7 @@ function ye(t) {
|
|
|
2829
2829
|
}
|
|
2830
2830
|
return e;
|
|
2831
2831
|
}
|
|
2832
|
-
async function
|
|
2832
|
+
async function li(t, e) {
|
|
2833
2833
|
const a = [], o = [];
|
|
2834
2834
|
return t.forEach((i) => {
|
|
2835
2835
|
if ("cssRules" in i)
|
|
@@ -2837,7 +2837,7 @@ async function ri(t, e) {
|
|
|
2837
2837
|
J(i.cssRules || []).forEach((s, r) => {
|
|
2838
2838
|
if (s.type === CSSRule.IMPORT_RULE) {
|
|
2839
2839
|
let l = r + 1;
|
|
2840
|
-
const u = s.href,
|
|
2840
|
+
const u = s.href, d = fe(u).then((g) => ye(g, e)).then((g) => ve(g).forEach((k) => {
|
|
2841
2841
|
try {
|
|
2842
2842
|
i.insertRule(k, k.startsWith("@import") ? l += 1 : i.cssRules.length);
|
|
2843
2843
|
} catch (v) {
|
|
@@ -2849,12 +2849,12 @@ async function ri(t, e) {
|
|
|
2849
2849
|
})).catch((g) => {
|
|
2850
2850
|
console.error("Error loading remote css", g.toString());
|
|
2851
2851
|
});
|
|
2852
|
-
o.push(
|
|
2852
|
+
o.push(d);
|
|
2853
2853
|
}
|
|
2854
2854
|
});
|
|
2855
2855
|
} catch (s) {
|
|
2856
2856
|
const r = t.find((l) => l.href == null) || document.styleSheets[0];
|
|
2857
|
-
i.href != null && o.push(
|
|
2857
|
+
i.href != null && o.push(fe(i.href).then((l) => ye(l, e)).then((l) => ve(l).forEach((u) => {
|
|
2858
2858
|
r.insertRule(u, r.cssRules.length);
|
|
2859
2859
|
})).catch((l) => {
|
|
2860
2860
|
console.error("Error loading remote stylesheet", l);
|
|
@@ -2871,60 +2871,60 @@ async function ri(t, e) {
|
|
|
2871
2871
|
}
|
|
2872
2872
|
}), a));
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2875
|
-
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
2874
|
+
function ui(t) {
|
|
2875
|
+
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => He(e.style.getPropertyValue("src")));
|
|
2876
2876
|
}
|
|
2877
|
-
async function
|
|
2877
|
+
async function ci(t, e) {
|
|
2878
2878
|
if (t.ownerDocument == null)
|
|
2879
2879
|
throw new Error("Provided element is not within a Document");
|
|
2880
|
-
const a = J(t.ownerDocument.styleSheets), o = await
|
|
2881
|
-
return
|
|
2880
|
+
const a = J(t.ownerDocument.styleSheets), o = await li(a, e);
|
|
2881
|
+
return ui(o);
|
|
2882
2882
|
}
|
|
2883
|
-
function
|
|
2883
|
+
function qe(t) {
|
|
2884
2884
|
return t.trim().replace(/["']/g, "");
|
|
2885
2885
|
}
|
|
2886
|
-
function
|
|
2886
|
+
function di(t) {
|
|
2887
2887
|
const e = /* @__PURE__ */ new Set();
|
|
2888
2888
|
function a(o) {
|
|
2889
2889
|
(o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((s) => {
|
|
2890
|
-
e.add(
|
|
2890
|
+
e.add(qe(s));
|
|
2891
2891
|
}), Array.from(o.children).forEach((s) => {
|
|
2892
2892
|
s instanceof HTMLElement && a(s);
|
|
2893
2893
|
});
|
|
2894
2894
|
}
|
|
2895
2895
|
return a(t), e;
|
|
2896
2896
|
}
|
|
2897
|
-
async function
|
|
2898
|
-
const a = await
|
|
2899
|
-
return (await Promise.all(a.filter((s) => o.has(
|
|
2897
|
+
async function pi(t, e) {
|
|
2898
|
+
const a = await ci(t, e), o = di(t);
|
|
2899
|
+
return (await Promise.all(a.filter((s) => o.has(qe(s.style.fontFamily))).map((s) => {
|
|
2900
2900
|
const r = s.parentStyleSheet ? s.parentStyleSheet.href : null;
|
|
2901
|
-
return
|
|
2901
|
+
return Ge(s.cssText, r, e);
|
|
2902
2902
|
}))).join(`
|
|
2903
2903
|
`);
|
|
2904
2904
|
}
|
|
2905
|
-
async function
|
|
2906
|
-
const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await
|
|
2905
|
+
async function gi(t, e) {
|
|
2906
|
+
const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await pi(t, e);
|
|
2907
2907
|
if (a) {
|
|
2908
2908
|
const o = document.createElement("style"), i = document.createTextNode(a);
|
|
2909
2909
|
o.appendChild(i), t.firstChild ? t.insertBefore(o, t.firstChild) : t.appendChild(o);
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
async function gi(t, e = {}) {
|
|
2913
|
-
const { width: a, height: o } = Ve(t, e), i = await Mt(t, e, !0);
|
|
2914
|
-
return await pi(i, e), await Ge(i, e), ni(i, e), await xo(i, a, o);
|
|
2915
|
-
}
|
|
2916
2912
|
async function mi(t, e = {}) {
|
|
2917
|
-
const { width: a, height: o } =
|
|
2918
|
-
return
|
|
2913
|
+
const { width: a, height: o } = $e(t, e), i = await Mt(t, e, !0);
|
|
2914
|
+
return await gi(i, e), await _e(i, e), ri(i, e), await Lo(i, a, o);
|
|
2919
2915
|
}
|
|
2920
|
-
async function
|
|
2921
|
-
|
|
2916
|
+
async function hi(t, e = {}) {
|
|
2917
|
+
const { width: a, height: o } = $e(t, e), i = await mi(t, e), s = await jt(i), r = document.createElement("canvas"), l = r.getContext("2d"), u = e.pixelRatio || jo(), d = e.canvasWidth || a, g = e.canvasHeight || o;
|
|
2918
|
+
return r.width = d * u, r.height = g * u, e.skipAutoScale || Po(r), r.style.width = `${d}`, r.style.height = `${g}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, r.width, r.height)), l.drawImage(s, 0, 0, r.width, r.height), r;
|
|
2922
2919
|
}
|
|
2923
|
-
|
|
2924
|
-
|
|
2920
|
+
async function ke(t, e = {}) {
|
|
2921
|
+
return (await hi(t, e)).toDataURL();
|
|
2922
|
+
}
|
|
2923
|
+
const Pt = "data-nf-capture-chrome", fi = "data-nf-canvas-snap", yi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
|
|
2924
|
+
function We(t) {
|
|
2925
2925
|
return t instanceof Element && (t.hasAttribute(Pt) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
|
|
2926
2926
|
}
|
|
2927
|
-
function
|
|
2927
|
+
function vi() {
|
|
2928
2928
|
const t = [];
|
|
2929
2929
|
return Array.from(document.styleSheets).forEach((e) => {
|
|
2930
2930
|
try {
|
|
@@ -2948,7 +2948,7 @@ function yi() {
|
|
|
2948
2948
|
});
|
|
2949
2949
|
};
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2951
|
+
function ki() {
|
|
2952
2952
|
const t = [];
|
|
2953
2953
|
return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
|
|
2954
2954
|
const o = a.getBoundingClientRect(), i = document.createElement("div");
|
|
@@ -2964,14 +2964,14 @@ function vi() {
|
|
|
2964
2964
|
].join(";"), document.body.appendChild(i), t.push(i);
|
|
2965
2965
|
}), () => t.forEach((a) => a.remove());
|
|
2966
2966
|
}
|
|
2967
|
-
function
|
|
2967
|
+
function bi() {
|
|
2968
2968
|
const t = document.querySelector(`[${Pt}]`);
|
|
2969
2969
|
if (t)
|
|
2970
2970
|
return t;
|
|
2971
2971
|
const e = document.createElement("div");
|
|
2972
2972
|
return e.setAttribute(Pt, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${p("status.capturing")}</span>`, document.body.appendChild(e), e;
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2974
|
+
function wi() {
|
|
2975
2975
|
document.querySelectorAll(`[${Pt}]`).forEach((t) => t.remove());
|
|
2976
2976
|
}
|
|
2977
2977
|
function _t() {
|
|
@@ -2985,7 +2985,7 @@ function Q(t) {
|
|
|
2985
2985
|
const e = t.indexOf(",");
|
|
2986
2986
|
return e > 0 && e < t.length - 1;
|
|
2987
2987
|
}
|
|
2988
|
-
function
|
|
2988
|
+
function Si() {
|
|
2989
2989
|
const t = document.documentElement, e = document.body, a = Math.max(
|
|
2990
2990
|
window.innerWidth || 0,
|
|
2991
2991
|
(t == null ? void 0 : t.clientWidth) || 0,
|
|
@@ -3001,10 +3001,10 @@ function wi() {
|
|
|
3001
3001
|
);
|
|
3002
3002
|
return { width: a, height: o };
|
|
3003
3003
|
}
|
|
3004
|
-
async function
|
|
3004
|
+
async function Ci() {
|
|
3005
3005
|
const t = [], e = Array.from(document.querySelectorAll("canvas"));
|
|
3006
3006
|
for (const a of e) {
|
|
3007
|
-
if (a.closest("#notefully") ||
|
|
3007
|
+
if (a.closest("#notefully") || We(a))
|
|
3008
3008
|
continue;
|
|
3009
3009
|
let o = "";
|
|
3010
3010
|
try {
|
|
@@ -3015,7 +3015,7 @@ async function Si() {
|
|
|
3015
3015
|
if (!o || o === "data:,")
|
|
3016
3016
|
continue;
|
|
3017
3017
|
const i = document.createElement("img"), s = getComputedStyle(a);
|
|
3018
|
-
i.setAttribute(
|
|
3018
|
+
i.setAttribute(fi, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = s.width, i.style.height = s.height, i.style.maxWidth = s.maxWidth, i.style.maxHeight = s.maxHeight, i.style.objectFit = "fill", i.style.display = s.display === "inline" ? "inline-block" : s.display, a.replaceWith(i), t.push({ canvas: a, img: i });
|
|
3019
3019
|
}
|
|
3020
3020
|
return await Promise.all(t.map(({ img: a }) => {
|
|
3021
3021
|
if (!a.complete)
|
|
@@ -3031,7 +3031,7 @@ async function Si() {
|
|
|
3031
3031
|
});
|
|
3032
3032
|
};
|
|
3033
3033
|
}
|
|
3034
|
-
async function
|
|
3034
|
+
async function Ai(t) {
|
|
3035
3035
|
if (!t)
|
|
3036
3036
|
return null;
|
|
3037
3037
|
if (typeof t == "string")
|
|
@@ -3044,12 +3044,12 @@ async function Ci(t) {
|
|
|
3044
3044
|
return null;
|
|
3045
3045
|
}
|
|
3046
3046
|
if (typeof Blob < "u" && t instanceof Blob) {
|
|
3047
|
-
const e = await
|
|
3047
|
+
const e = await zi(t);
|
|
3048
3048
|
return Q(e) ? e : null;
|
|
3049
3049
|
}
|
|
3050
3050
|
return null;
|
|
3051
3051
|
}
|
|
3052
|
-
async function
|
|
3052
|
+
async function zi(t) {
|
|
3053
3053
|
if (typeof FileReader == "function")
|
|
3054
3054
|
return new Promise((o, i) => {
|
|
3055
3055
|
const s = new FileReader();
|
|
@@ -3058,7 +3058,7 @@ async function Ai(t) {
|
|
|
3058
3058
|
const e = Buffer.from(await t.arrayBuffer());
|
|
3059
3059
|
return `data:${t.type || "application/octet-stream"};base64,${e.toString("base64")}`;
|
|
3060
3060
|
}
|
|
3061
|
-
async function
|
|
3061
|
+
async function Ei() {
|
|
3062
3062
|
var e;
|
|
3063
3063
|
if (!((e = navigator.mediaDevices) != null && e.getDisplayMedia))
|
|
3064
3064
|
throw new Error(p("status.screenUnsupported"));
|
|
@@ -3083,35 +3083,35 @@ async function zi() {
|
|
|
3083
3083
|
t.getTracks().forEach((a) => a.stop());
|
|
3084
3084
|
}
|
|
3085
3085
|
}
|
|
3086
|
-
async function
|
|
3087
|
-
const e = document.getElementById("notefully"), a = e ? e.style.display : "", o =
|
|
3086
|
+
async function Ze(t = {}) {
|
|
3087
|
+
const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = bi(), i = vi();
|
|
3088
3088
|
let s = () => {
|
|
3089
3089
|
};
|
|
3090
3090
|
e && (e.style.display = "none");
|
|
3091
|
-
const r =
|
|
3091
|
+
const r = ki();
|
|
3092
3092
|
try {
|
|
3093
3093
|
if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await _t(), typeof t.capture == "function") {
|
|
3094
|
-
const k = await
|
|
3094
|
+
const k = await Ai(await t.capture());
|
|
3095
3095
|
if (k)
|
|
3096
3096
|
return k;
|
|
3097
3097
|
}
|
|
3098
|
-
s = await
|
|
3099
|
-
const { width: l, height: u } =
|
|
3098
|
+
s = await Ci(), await _t();
|
|
3099
|
+
const { width: l, height: u } = Si(), d = {
|
|
3100
3100
|
cacheBust: !0,
|
|
3101
3101
|
width: l,
|
|
3102
3102
|
height: u,
|
|
3103
3103
|
pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
|
|
3104
|
-
filter: (k) => !
|
|
3104
|
+
filter: (k) => !We(k),
|
|
3105
3105
|
// 404 / CORS images must not abort the whole capture.
|
|
3106
|
-
imagePlaceholder:
|
|
3106
|
+
imagePlaceholder: yi,
|
|
3107
3107
|
onImageErrorHandler: () => {
|
|
3108
3108
|
}
|
|
3109
3109
|
};
|
|
3110
3110
|
let g = "";
|
|
3111
3111
|
try {
|
|
3112
|
-
g = await
|
|
3112
|
+
g = await ke(document.body, d);
|
|
3113
3113
|
} catch {
|
|
3114
|
-
g = await
|
|
3114
|
+
g = await ke(document.body, { ...d, skipFonts: !0 });
|
|
3115
3115
|
}
|
|
3116
3116
|
if (!Q(g))
|
|
3117
3117
|
throw new Error(p("status.captureEmpty"));
|
|
@@ -3121,25 +3121,25 @@ async function We(t = {}) {
|
|
|
3121
3121
|
s();
|
|
3122
3122
|
} catch {
|
|
3123
3123
|
}
|
|
3124
|
-
r(), i(), o.remove(),
|
|
3124
|
+
r(), i(), o.remove(), wi(), e && (e.style.display = a);
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function Ri(t = "") {
|
|
3128
3128
|
const e = String(t || "");
|
|
3129
3129
|
return e ? /Windows NT/i.test(e) ? "Windows" : /iPhone|iPad|iPod/i.test(e) ? "iOS" : /Mac OS X|Macintosh/i.test(e) ? "macOS" : /Android/i.test(e) ? "Android" : /CrOS/i.test(e) ? "ChromeOS" : /Linux/i.test(e) ? "Linux" : "Other" : "";
|
|
3130
3130
|
}
|
|
3131
|
-
function
|
|
3131
|
+
function ji(t = "") {
|
|
3132
3132
|
const e = String(t || "");
|
|
3133
3133
|
return e ? /Edg\//i.test(e) ? "Edge" : /OPR\/|Opera/i.test(e) ? "Opera" : /Firefox\//i.test(e) ? "Firefox" : /Chrome\//i.test(e) || /CriOS\//i.test(e) ? "Chrome" : /Safari\//i.test(e) ? "Safari" : "Other" : "";
|
|
3134
3134
|
}
|
|
3135
|
-
function
|
|
3135
|
+
function Pi(t = {}) {
|
|
3136
3136
|
const e = navigator.userAgent;
|
|
3137
3137
|
return {
|
|
3138
3138
|
url: location.href,
|
|
3139
3139
|
title: document.title,
|
|
3140
3140
|
userAgent: e,
|
|
3141
|
-
os:
|
|
3142
|
-
browser:
|
|
3141
|
+
os: Ri(e),
|
|
3142
|
+
browser: ji(e),
|
|
3143
3143
|
language: navigator.language,
|
|
3144
3144
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
3145
3145
|
viewport: {
|
|
@@ -3159,17 +3159,18 @@ function ji(t = {}) {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
};
|
|
3161
3161
|
}
|
|
3162
|
-
const
|
|
3162
|
+
const be = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), we = {
|
|
3163
3163
|
id: "userId",
|
|
3164
3164
|
username: "displayName",
|
|
3165
3165
|
name: "displayName"
|
|
3166
|
-
},
|
|
3166
|
+
}, Se = /* @__PURE__ */ new Set([
|
|
3167
3167
|
"endpoint",
|
|
3168
3168
|
"projectKey",
|
|
3169
3169
|
"version",
|
|
3170
3170
|
"name",
|
|
3171
3171
|
"targets",
|
|
3172
3172
|
"hideLauncher",
|
|
3173
|
+
"launcherCorner",
|
|
3173
3174
|
"theme",
|
|
3174
3175
|
"video",
|
|
3175
3176
|
"consoleLogLimit",
|
|
@@ -3181,7 +3182,7 @@ const ke = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), be = {
|
|
|
3181
3182
|
"displayLink",
|
|
3182
3183
|
"locale",
|
|
3183
3184
|
"translations"
|
|
3184
|
-
]),
|
|
3185
|
+
]), Ce = {
|
|
3185
3186
|
slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
|
|
3186
3187
|
projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
|
|
3187
3188
|
project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
|
|
@@ -3190,14 +3191,14 @@ const ke = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), be = {
|
|
|
3190
3191
|
email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
|
|
3191
3192
|
displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
|
|
3192
3193
|
};
|
|
3193
|
-
function
|
|
3194
|
-
const a = e.warn ||
|
|
3195
|
-
for (const r of
|
|
3194
|
+
function xi(t = {}, e = {}) {
|
|
3195
|
+
const a = e.warn || Ye, o = t && typeof t == "object" ? t : {}, i = {}, s = [];
|
|
3196
|
+
for (const r of be)
|
|
3196
3197
|
Object.prototype.hasOwnProperty.call(o, r) && (i[r] = o[r]);
|
|
3197
|
-
for (const [r, l] of Object.entries(
|
|
3198
|
+
for (const [r, l] of Object.entries(we))
|
|
3198
3199
|
Object.prototype.hasOwnProperty.call(o, r) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[r]));
|
|
3199
3200
|
for (const r of Object.keys(o))
|
|
3200
|
-
|
|
3201
|
+
be.has(r) || Object.prototype.hasOwnProperty.call(we, r) || s.push(r);
|
|
3201
3202
|
if (s.length) {
|
|
3202
3203
|
const r = s.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
|
|
3203
3204
|
a(
|
|
@@ -3206,24 +3207,24 @@ function Pi(t = {}, e = {}) {
|
|
|
3206
3207
|
}
|
|
3207
3208
|
return i;
|
|
3208
3209
|
}
|
|
3209
|
-
function
|
|
3210
|
-
const a = e.warn ||
|
|
3210
|
+
function Li(t = {}, e = {}) {
|
|
3211
|
+
const a = e.warn || Ye, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((s) => !Se.has(s));
|
|
3211
3212
|
if (i.length)
|
|
3212
3213
|
for (const s of i) {
|
|
3213
|
-
if (
|
|
3214
|
-
a(`Notefully.init: ignoring "${s}". ${
|
|
3214
|
+
if (Ce[s]) {
|
|
3215
|
+
a(`Notefully.init: ignoring "${s}". ${Ce[s]}`);
|
|
3215
3216
|
continue;
|
|
3216
3217
|
}
|
|
3217
3218
|
a(
|
|
3218
|
-
`Notefully.init: ignoring unknown key "${s}". Supported: ${[...
|
|
3219
|
+
`Notefully.init: ignoring unknown key "${s}". Supported: ${[...Se].join(", ")}.`
|
|
3219
3220
|
);
|
|
3220
3221
|
}
|
|
3221
3222
|
}
|
|
3222
|
-
function
|
|
3223
|
+
function Ye(t) {
|
|
3223
3224
|
typeof console < "u" && typeof console.warn == "function" && console.warn(t);
|
|
3224
3225
|
}
|
|
3225
|
-
const
|
|
3226
|
-
function
|
|
3226
|
+
const Ae = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, Ui = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
|
|
3227
|
+
function ze(t) {
|
|
3227
3228
|
if (t instanceof Error)
|
|
3228
3229
|
return t.stack || t.message || String(t);
|
|
3229
3230
|
if (typeof t == "string")
|
|
@@ -3238,14 +3239,14 @@ function te(t) {
|
|
|
3238
3239
|
if (!t || typeof t != "string")
|
|
3239
3240
|
return "";
|
|
3240
3241
|
let e = t.replace(/[\u0000-\u001F\u007F]/g, "").trim();
|
|
3241
|
-
return e ? (
|
|
3242
|
+
return e ? (Ae.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !Ae.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
|
|
3242
3243
|
}
|
|
3243
|
-
function
|
|
3244
|
+
function Ti(t = []) {
|
|
3244
3245
|
if (!t.length)
|
|
3245
3246
|
return { text: "", segments: [{ text: "", style: null }] };
|
|
3246
3247
|
const e = t[0];
|
|
3247
3248
|
if (typeof e != "string" || !e.includes("%c")) {
|
|
3248
|
-
const r = t.map(
|
|
3249
|
+
const r = t.map(ze).join(" ");
|
|
3249
3250
|
return { text: r, segments: [{ text: r, style: null }] };
|
|
3250
3251
|
}
|
|
3251
3252
|
const a = e.split("%c"), o = [];
|
|
@@ -3256,11 +3257,11 @@ function Ui(t = []) {
|
|
|
3256
3257
|
l && o.push({ text: l, style: null });
|
|
3257
3258
|
continue;
|
|
3258
3259
|
}
|
|
3259
|
-
const u = i < t.length ? String(t[i++] ?? "") : "",
|
|
3260
|
-
o.push({ text: l, style:
|
|
3260
|
+
const u = i < t.length ? String(t[i++] ?? "") : "", d = te(u) || null;
|
|
3261
|
+
o.push({ text: l, style: d });
|
|
3261
3262
|
}
|
|
3262
3263
|
if (i < t.length) {
|
|
3263
|
-
const r = t.slice(i).map(
|
|
3264
|
+
const r = t.slice(i).map(ze).join(" ");
|
|
3264
3265
|
r && o.push({
|
|
3265
3266
|
text: (o.length ? " " : "") + r,
|
|
3266
3267
|
style: null
|
|
@@ -3271,69 +3272,69 @@ function Ui(t = []) {
|
|
|
3271
3272
|
segments: o.length ? o : [{ text: "", style: null }]
|
|
3272
3273
|
};
|
|
3273
3274
|
}
|
|
3274
|
-
function
|
|
3275
|
+
function Fi(t) {
|
|
3275
3276
|
const e = String(t ?? "");
|
|
3276
3277
|
if (!e.includes("%c"))
|
|
3277
3278
|
return [{ text: e, style: null }];
|
|
3278
|
-
const a = e.split("%c"), o = a[a.length - 1], i = o.match(
|
|
3279
|
+
const a = e.split("%c"), o = a[a.length - 1], i = o.match(Ui);
|
|
3279
3280
|
let s = "";
|
|
3280
3281
|
if (i) {
|
|
3281
|
-
const u = i.index,
|
|
3282
|
-
/^[a-z-]+\s*:/i.test(o.slice(
|
|
3282
|
+
const u = i.index, d = /\s/.test(o[u]) ? u + 1 : u;
|
|
3283
|
+
/^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""), s = o.slice(d).trim());
|
|
3283
3284
|
}
|
|
3284
3285
|
const r = te(s) || null, l = [];
|
|
3285
3286
|
for (let u = 0; u < a.length; u++) {
|
|
3286
|
-
const
|
|
3287
|
+
const d = a[u];
|
|
3287
3288
|
if (u === 0) {
|
|
3288
|
-
|
|
3289
|
+
d && l.push({ text: d, style: null });
|
|
3289
3290
|
continue;
|
|
3290
3291
|
}
|
|
3291
3292
|
l.push({
|
|
3292
|
-
text:
|
|
3293
|
+
text: d,
|
|
3293
3294
|
style: u === 1 ? r : null
|
|
3294
3295
|
});
|
|
3295
3296
|
}
|
|
3296
3297
|
return l.length ? l : [{ text: e, style: null }];
|
|
3297
3298
|
}
|
|
3298
|
-
function
|
|
3299
|
+
function Xe(t = {}) {
|
|
3299
3300
|
return Array.isArray(t.segments) && t.segments.length ? t.segments.map((e) => ({
|
|
3300
3301
|
text: String((e == null ? void 0 : e.text) ?? ""),
|
|
3301
3302
|
style: te(e == null ? void 0 : e.style) || null
|
|
3302
|
-
})) :
|
|
3303
|
+
})) : Fi(t.text);
|
|
3303
3304
|
}
|
|
3304
|
-
function
|
|
3305
|
-
return
|
|
3305
|
+
function Mi(t = {}) {
|
|
3306
|
+
return Xe(t).map((a) => a.text).join("");
|
|
3306
3307
|
}
|
|
3307
|
-
function
|
|
3308
|
+
function Ee(t) {
|
|
3308
3309
|
return String(t ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3309
3310
|
}
|
|
3310
|
-
function
|
|
3311
|
-
return
|
|
3312
|
-
const a =
|
|
3313
|
-
return e.style ? `<span class="nf-console-styled" style="${
|
|
3311
|
+
function Di(t = {}) {
|
|
3312
|
+
return Xe(t).map((e) => {
|
|
3313
|
+
const a = Ee(e.text);
|
|
3314
|
+
return e.style ? `<span class="nf-console-styled" style="${Ee(e.style)}">${a}</span>` : a;
|
|
3314
3315
|
}).join("");
|
|
3315
3316
|
}
|
|
3316
|
-
const
|
|
3317
|
-
function
|
|
3317
|
+
const Oi = 80;
|
|
3318
|
+
function Ii() {
|
|
3318
3319
|
const t = [], e = {};
|
|
3319
3320
|
let a = !1;
|
|
3320
3321
|
const o = (s, r) => {
|
|
3321
3322
|
let l = "", u = null;
|
|
3322
3323
|
try {
|
|
3323
|
-
const g =
|
|
3324
|
+
const g = Ti(r);
|
|
3324
3325
|
l = g.text, u = g.segments;
|
|
3325
3326
|
} catch {
|
|
3326
3327
|
l = String(r[0]), u = [{ text: l, style: null }];
|
|
3327
3328
|
}
|
|
3328
|
-
const
|
|
3329
|
+
const d = {
|
|
3329
3330
|
level: s,
|
|
3330
3331
|
text: l.slice(0, 2e3),
|
|
3331
3332
|
at: Date.now()
|
|
3332
3333
|
};
|
|
3333
|
-
u && u.some((g) => g.style) && (
|
|
3334
|
+
u && u.some((g) => g.style) && (d.segments = u.map((g) => ({
|
|
3334
3335
|
text: String(g.text || "").slice(0, 2e3),
|
|
3335
3336
|
style: g.style || null
|
|
3336
|
-
}))), t.push(
|
|
3337
|
+
}))), t.push(d), t.length > Oi && t.shift();
|
|
3337
3338
|
};
|
|
3338
3339
|
return {
|
|
3339
3340
|
hook: () => {
|
|
@@ -3352,11 +3353,11 @@ function Oi() {
|
|
|
3352
3353
|
}
|
|
3353
3354
|
};
|
|
3354
3355
|
}
|
|
3355
|
-
function
|
|
3356
|
+
function Vi(t, e = {}) {
|
|
3356
3357
|
const a = window.SpeechRecognition || window.webkitSpeechRecognition, o = typeof e.onActiveChange == "function" ? e.onActiveChange : null;
|
|
3357
3358
|
let i = null, s = !1;
|
|
3358
|
-
const r = (
|
|
3359
|
-
const g = !!
|
|
3359
|
+
const r = (d) => {
|
|
3360
|
+
const g = !!d;
|
|
3360
3361
|
s !== g && (s = g, o == null || o(s));
|
|
3361
3362
|
}, l = () => {
|
|
3362
3363
|
if (r(!1), i)
|
|
@@ -3366,10 +3367,10 @@ function Ii(t, e = {}) {
|
|
|
3366
3367
|
}
|
|
3367
3368
|
};
|
|
3368
3369
|
return {
|
|
3369
|
-
start: (
|
|
3370
|
+
start: (d = {}) => {
|
|
3370
3371
|
if (!a)
|
|
3371
3372
|
throw new Error(p("status.speechUnsupported"));
|
|
3372
|
-
return s ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang =
|
|
3373
|
+
return s ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = d.lang || navigator.language || "en-US", i.onresult = (g) => {
|
|
3373
3374
|
let k = "";
|
|
3374
3375
|
for (let v = g.resultIndex; v < g.results.length; v += 1)
|
|
3375
3376
|
g.results[v].isFinal && (k += g.results[v][0].transcript);
|
|
@@ -3385,8 +3386,8 @@ function Ii(t, e = {}) {
|
|
|
3385
3386
|
isActive: () => s
|
|
3386
3387
|
};
|
|
3387
3388
|
}
|
|
3388
|
-
const
|
|
3389
|
-
function
|
|
3389
|
+
const $i = 60 * 1e3;
|
|
3390
|
+
function Bi({ onStart: t, onStop: e, onError: a }) {
|
|
3390
3391
|
let o = null, i = null, s = [], r = null;
|
|
3391
3392
|
const l = () => {
|
|
3392
3393
|
if (r && (clearTimeout(r), r = null), i && i.state !== "inactive")
|
|
@@ -3418,10 +3419,10 @@ function $i({ onStart: t, onStop: e, onError: a }) {
|
|
|
3418
3419
|
}, i.onstop = () => {
|
|
3419
3420
|
const v = s.length ? new Blob(s, { type: i.mimeType || "video/webm" }) : null;
|
|
3420
3421
|
l(), e(v);
|
|
3421
|
-
}, (k = o.getVideoTracks()[0]) == null || k.addEventListener("ended", () => u()), i.start(), r = setTimeout(u,
|
|
3422
|
+
}, (k = o.getVideoTracks()[0]) == null || k.addEventListener("ended", () => u()), i.start(), r = setTimeout(u, $i), t();
|
|
3422
3423
|
}, stop: u };
|
|
3423
3424
|
}
|
|
3424
|
-
function
|
|
3425
|
+
function Ni() {
|
|
3425
3426
|
const t = /* @__PURE__ */ new Set();
|
|
3426
3427
|
return {
|
|
3427
3428
|
alloc() {
|
|
@@ -3441,14 +3442,14 @@ function Bi() {
|
|
|
3441
3442
|
}
|
|
3442
3443
|
const Bt = { x: 0, y: 0, w: 1, h: 1 };
|
|
3443
3444
|
function ee() {
|
|
3444
|
-
const t =
|
|
3445
|
+
const t = Ni();
|
|
3445
3446
|
let e = [], a = { ...Bt }, o = 1;
|
|
3446
3447
|
return {
|
|
3447
|
-
list: () => e.filter((s) =>
|
|
3448
|
+
list: () => e.filter((s) => Gi(s, a)),
|
|
3448
3449
|
all: () => e.slice(),
|
|
3449
3450
|
crop: () => ({ ...a }),
|
|
3450
3451
|
setCrop(s) {
|
|
3451
|
-
return a =
|
|
3452
|
+
return a = Hi(s), a;
|
|
3452
3453
|
},
|
|
3453
3454
|
resetCrop() {
|
|
3454
3455
|
return a = { ...Bt }, a;
|
|
@@ -3488,7 +3489,7 @@ function ee() {
|
|
|
3488
3489
|
}
|
|
3489
3490
|
};
|
|
3490
3491
|
}
|
|
3491
|
-
function
|
|
3492
|
+
function Ki(t, e) {
|
|
3492
3493
|
const a = Number(e == null ? void 0 : e.w) || 1, o = Number(e == null ? void 0 : e.h) || 1, i = Number(e == null ? void 0 : e.x) || 0, s = Number(e == null ? void 0 : e.y) || 0;
|
|
3493
3494
|
return (Array.isArray(t) ? t : []).map((r) => {
|
|
3494
3495
|
const l = {
|
|
@@ -3501,15 +3502,15 @@ function Ni(t, e) {
|
|
|
3501
3502
|
return Number.isFinite(r.x2) && (l.x2 = (r.x2 - i) / a), Number.isFinite(r.y2) && (l.y2 = (r.y2 - s) / o), l;
|
|
3502
3503
|
});
|
|
3503
3504
|
}
|
|
3504
|
-
function
|
|
3505
|
+
function Hi(t) {
|
|
3505
3506
|
const e = Math.min(Math.max(t.x, 0), 0.95), a = Math.min(Math.max(t.y, 0), 0.95), o = Math.min(Math.max(t.w, 0.05), 1 - e), i = Math.min(Math.max(t.h, 0.05), 1 - a);
|
|
3506
3507
|
return { x: e, y: a, w: o, h: i };
|
|
3507
3508
|
}
|
|
3508
|
-
function
|
|
3509
|
+
function Gi(t, e) {
|
|
3509
3510
|
const a = t.type === "arrow" ? (t.x + (t.x2 ?? t.x)) / 2 : t.x + (t.w || 0) / 2, o = t.type === "arrow" ? (t.y + (t.y2 ?? t.y)) / 2 : t.y + (t.h || 0) / 2;
|
|
3510
3511
|
return a >= e.x && o >= e.y && a <= e.x + e.w && o <= e.y + e.h;
|
|
3511
3512
|
}
|
|
3512
|
-
function
|
|
3513
|
+
function Je(t) {
|
|
3513
3514
|
const e = Math.max(1, Number(t) || 1);
|
|
3514
3515
|
return {
|
|
3515
3516
|
stroke: Math.max(2, e * 75e-4),
|
|
@@ -3519,31 +3520,31 @@ function Xe(t) {
|
|
|
3519
3520
|
arrowHeadAngle: 0.4
|
|
3520
3521
|
};
|
|
3521
3522
|
}
|
|
3522
|
-
function
|
|
3523
|
-
const s = Math.atan2(o - e, a - t), r = i.arrowHead, l = Math.min(i.stroke, r * 0.2), u = a,
|
|
3523
|
+
function _i(t, e, a, o, i) {
|
|
3524
|
+
const s = Math.atan2(o - e, a - t), r = i.arrowHead, l = Math.min(i.stroke, r * 0.2), u = a, d = o, g = a - Math.cos(s) * r, k = o - Math.sin(s) * r, v = {
|
|
3524
3525
|
x: u - r * Math.cos(s - i.arrowHeadAngle),
|
|
3525
|
-
y:
|
|
3526
|
+
y: d - r * Math.sin(s - i.arrowHeadAngle)
|
|
3526
3527
|
}, w = {
|
|
3527
3528
|
x: u - r * Math.cos(s + i.arrowHeadAngle),
|
|
3528
|
-
y:
|
|
3529
|
+
y: d - r * Math.sin(s + i.arrowHeadAngle)
|
|
3529
3530
|
}, b = {
|
|
3530
3531
|
x: a - Math.cos(s) * l,
|
|
3531
3532
|
y: o - Math.sin(s) * l
|
|
3532
3533
|
};
|
|
3533
|
-
return { angle: s, tipX: u, tipY:
|
|
3534
|
+
return { angle: s, tipX: u, tipY: d, baseX: g, baseY: k, left: v, right: w, shaftEnd: b };
|
|
3534
3535
|
}
|
|
3535
|
-
async function
|
|
3536
|
-
const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, s = await
|
|
3537
|
-
w.width = k, w.height = v, w.getContext("2d").drawImage(s, r, l, u,
|
|
3538
|
-
const z = await
|
|
3536
|
+
async function Re(t, e = {}) {
|
|
3537
|
+
const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, s = await Yi(t), r = Math.round(a.x * s.width), l = Math.round(a.y * s.height), u = Math.max(1, Math.round(a.w * s.width)), d = Math.max(1, Math.round(a.h * s.height)), g = qi(u, d, o), k = g.width, v = g.height, w = document.createElement("canvas");
|
|
3538
|
+
w.width = k, w.height = v, w.getContext("2d").drawImage(s, r, l, u, d, 0, 0, k, v);
|
|
3539
|
+
const z = await je(w, "image/webp", i);
|
|
3539
3540
|
if (z && z.size > 0 && z.type === "image/webp")
|
|
3540
3541
|
return { blob: z, width: k, height: v, mime: "image/webp", ext: "webp" };
|
|
3541
|
-
const j = await
|
|
3542
|
+
const j = await je(w, "image/png");
|
|
3542
3543
|
if (!j || !j.size)
|
|
3543
3544
|
throw new Error("Could not encode screenshot");
|
|
3544
3545
|
return { blob: j, width: k, height: v, mime: "image/png", ext: "png" };
|
|
3545
3546
|
}
|
|
3546
|
-
function
|
|
3547
|
+
function qi(t, e, a = 2048) {
|
|
3547
3548
|
const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), s = Math.max(1, Number(a) || 2048), r = Math.min(1, s / Math.max(o, i));
|
|
3548
3549
|
return {
|
|
3549
3550
|
width: Math.max(1, Math.round(o * r)),
|
|
@@ -3551,23 +3552,23 @@ function _i(t, e, a = 2048) {
|
|
|
3551
3552
|
scale: r
|
|
3552
3553
|
};
|
|
3553
3554
|
}
|
|
3554
|
-
function
|
|
3555
|
+
function Wi(t = 2048) {
|
|
3555
3556
|
const e = Math.floor(Number(t) / 2);
|
|
3556
3557
|
return Math.max(1, Math.min(1024, e || 1024));
|
|
3557
3558
|
}
|
|
3558
|
-
function
|
|
3559
|
+
function Zi(t, e = null) {
|
|
3559
3560
|
if ((e == null ? void 0 : e.code) === "payload_too_large" || Number(e == null ? void 0 : e.status) === 413 || Number(t == null ? void 0 : t.status) === 413)
|
|
3560
3561
|
return !0;
|
|
3561
3562
|
const a = String((t == null ? void 0 : t.message) || t || (e == null ? void 0 : e.error) || "").toLowerCase();
|
|
3562
3563
|
return a.includes("failed to fetch") || a.includes("networkerror") || a.includes("load failed") || a.includes("too large") || a.includes("payload") || a.includes("entity too large") ? !0 : Number(t == null ? void 0 : t.status) === 413;
|
|
3563
3564
|
}
|
|
3564
|
-
function
|
|
3565
|
+
function Yi(t) {
|
|
3565
3566
|
return new Promise((e, a) => {
|
|
3566
3567
|
const o = new Image();
|
|
3567
3568
|
o.onload = () => e(o), o.onerror = () => a(new Error("Could not load screenshot")), o.src = t;
|
|
3568
3569
|
});
|
|
3569
3570
|
}
|
|
3570
|
-
function
|
|
3571
|
+
function je(t, e, a) {
|
|
3571
3572
|
return new Promise((o) => {
|
|
3572
3573
|
try {
|
|
3573
3574
|
t.toBlob((i) => o(i), e, a);
|
|
@@ -3576,7 +3577,7 @@ function Re(t, e, a) {
|
|
|
3576
3577
|
}
|
|
3577
3578
|
});
|
|
3578
3579
|
}
|
|
3579
|
-
const
|
|
3580
|
+
const Xi = [
|
|
3580
3581
|
"url",
|
|
3581
3582
|
"title",
|
|
3582
3583
|
"userAgent",
|
|
@@ -3587,14 +3588,14 @@ const Yi = [
|
|
|
3587
3588
|
"viewport",
|
|
3588
3589
|
"user"
|
|
3589
3590
|
];
|
|
3590
|
-
function
|
|
3591
|
+
function Ji(t) {
|
|
3591
3592
|
return !t || typeof t != "object" ? !1 : !!(t.userId || t.email || t.displayName);
|
|
3592
3593
|
}
|
|
3593
|
-
function
|
|
3594
|
+
function Qi(t = {}) {
|
|
3594
3595
|
const e = [];
|
|
3595
|
-
for (const a of
|
|
3596
|
+
for (const a of Xi) {
|
|
3596
3597
|
const o = t[a];
|
|
3597
|
-
o == null || o === "" || a === "user" && !
|
|
3598
|
+
o == null || o === "" || a === "user" && !Ji(o) || e.push({
|
|
3598
3599
|
key: a,
|
|
3599
3600
|
label: p(`diag.${a}`),
|
|
3600
3601
|
value: o,
|
|
@@ -3603,7 +3604,7 @@ function Ji(t = {}) {
|
|
|
3603
3604
|
}
|
|
3604
3605
|
return e;
|
|
3605
3606
|
}
|
|
3606
|
-
function
|
|
3607
|
+
function ts(t = []) {
|
|
3607
3608
|
return t.map((e, a) => {
|
|
3608
3609
|
const o = {
|
|
3609
3610
|
id: `log-${a}-${e.at || 0}`,
|
|
@@ -3615,7 +3616,7 @@ function Qi(t = []) {
|
|
|
3615
3616
|
return Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
|
|
3616
3617
|
});
|
|
3617
3618
|
}
|
|
3618
|
-
function
|
|
3619
|
+
function es(t = []) {
|
|
3619
3620
|
if (!t.length)
|
|
3620
3621
|
return { checked: !0, indeterminate: !1 };
|
|
3621
3622
|
const e = t.filter((a) => !a.redacted).length;
|
|
@@ -3626,11 +3627,11 @@ function xt(t, e) {
|
|
|
3626
3627
|
a.redacted = !!e;
|
|
3627
3628
|
});
|
|
3628
3629
|
}
|
|
3629
|
-
function
|
|
3630
|
+
function as(t = {}) {
|
|
3630
3631
|
const e = t.diagnostics || [], a = t.logs || [], o = e.some((s) => !s.redacted), i = a.length > 0 && a.some((s) => !s.redacted);
|
|
3631
3632
|
return o && i ? p("privacy.disclosure.both") : o ? p("privacy.disclosure.diagnostics") : i ? p("privacy.disclosure.logs") : "";
|
|
3632
3633
|
}
|
|
3633
|
-
function
|
|
3634
|
+
function os(t) {
|
|
3634
3635
|
if (t == null)
|
|
3635
3636
|
return "";
|
|
3636
3637
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean")
|
|
@@ -3641,7 +3642,7 @@ function as(t) {
|
|
|
3641
3642
|
return String(t);
|
|
3642
3643
|
}
|
|
3643
3644
|
}
|
|
3644
|
-
function
|
|
3645
|
+
function is(t = {}) {
|
|
3645
3646
|
const e = {};
|
|
3646
3647
|
t.author != null && t.author !== "" && (e.author = t.author);
|
|
3647
3648
|
for (const o of t.diagnostics || [])
|
|
@@ -3661,20 +3662,20 @@ const Y = [
|
|
|
3661
3662
|
{ id: "idea", label: "Idea" },
|
|
3662
3663
|
{ id: "other", label: "Other" }
|
|
3663
3664
|
];
|
|
3664
|
-
function
|
|
3665
|
+
function Pe(t) {
|
|
3665
3666
|
return String(t || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
|
|
3666
3667
|
}
|
|
3667
3668
|
function Ct(t) {
|
|
3668
3669
|
const e = String(t || "").trim();
|
|
3669
3670
|
return e ? e.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
|
|
3670
3671
|
}
|
|
3671
|
-
function
|
|
3672
|
+
function ss(t) {
|
|
3672
3673
|
if (!Array.isArray(t) || !t.length)
|
|
3673
3674
|
return Y.map((o) => ({ ...o }));
|
|
3674
3675
|
const e = /* @__PURE__ */ new Set(), a = [];
|
|
3675
3676
|
for (const o of t) {
|
|
3676
3677
|
let i = "", s = "", r = "", l = "";
|
|
3677
|
-
if (typeof o == "string" || typeof o == "number" ? (i =
|
|
3678
|
+
if (typeof o == "string" || typeof o == "number" ? (i = Pe(o), s = Ct(i)) : o && typeof o == "object" && (i = Pe(o.id ?? o.value ?? o.kind), s = String(o.label || o.name || Ct(i)).trim() || Ct(i), r = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
|
|
3678
3679
|
continue;
|
|
3679
3680
|
e.add(i);
|
|
3680
3681
|
const u = { id: i, label: s };
|
|
@@ -3686,7 +3687,7 @@ function Dt(t) {
|
|
|
3686
3687
|
var a;
|
|
3687
3688
|
return ((a = (Array.isArray(t) && t.length ? t : Y)[0]) == null ? void 0 : a.id) || "other";
|
|
3688
3689
|
}
|
|
3689
|
-
const
|
|
3690
|
+
const ns = ["maker", "all-business", "brighter-day", "quiet-night"], Qe = "maker", rs = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), qt = 0.02, xe = 0.05, ls = `
|
|
3690
3691
|
<svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
|
|
3691
3692
|
<path fill="currentColor" d="M5.2 2.8h9.1A2.7 2.7 0 0 1 17 5.5v8.2c0 .4-.3.7-.7.7h-.1a.7.7 0 0 1-.7-.7V5.5c0-.7-.6-1.3-1.3-1.3H5.2c-.7 0-1.3.6-1.3 1.3v12.2c0 .7.6 1.3 1.3 1.3h6.4a.7.7 0 0 1 0 1.4H5.2A2.7 2.7 0 0 1 2.5 17.7V5.5A2.7 2.7 0 0 1 5.2 2.8zm1.6 4.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h3.6a.7.7 0 0 0 0-1.4H6.8z"/>
|
|
3692
3693
|
<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"/>
|
|
@@ -3709,19 +3710,21 @@ const x = {
|
|
|
3709
3710
|
stop: '<svg class="nf-icon" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><rect x="7" y="7" width="10" height="10" rx="1.5"/></svg>',
|
|
3710
3711
|
openArrow: F('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
|
|
3711
3712
|
close: F('<path d="M6 6l12 12M18 6 6 18"/>')
|
|
3712
|
-
},
|
|
3713
|
-
|
|
3714
|
-
const
|
|
3715
|
-
let
|
|
3713
|
+
}, ta = Ii();
|
|
3714
|
+
ta.hook();
|
|
3715
|
+
const ea = 10, us = 80, aa = "notefully.author", oa = "notefully.kind", ia = "notefully.launcherCorner", sa = "notefully.redactSections", nt = 48, cs = 6, kt = ["tl", "tr", "bl", "br"];
|
|
3716
|
+
let c = {
|
|
3716
3717
|
endpoint: "",
|
|
3717
3718
|
projectKey: "",
|
|
3718
3719
|
version: "0.0.0",
|
|
3719
3720
|
name: "",
|
|
3720
3721
|
targets: null,
|
|
3721
3722
|
hideLauncher: !1,
|
|
3722
|
-
|
|
3723
|
+
/** Initial dock corner when localStorage has none: tl | tr | bl | br */
|
|
3724
|
+
launcherCorner: null,
|
|
3725
|
+
theme: Qe,
|
|
3723
3726
|
video: !1,
|
|
3724
|
-
consoleLogLimit:
|
|
3727
|
+
consoleLogLimit: ea,
|
|
3725
3728
|
kinds: Y.map((t) => ({ ...t })),
|
|
3726
3729
|
kindsCustom: !1,
|
|
3727
3730
|
capture: null,
|
|
@@ -3735,9 +3738,9 @@ let d = {
|
|
|
3735
3738
|
function h(t) {
|
|
3736
3739
|
return f.querySelector(t);
|
|
3737
3740
|
}
|
|
3738
|
-
function
|
|
3741
|
+
function na(t) {
|
|
3739
3742
|
const e = String(t || "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
3740
|
-
return
|
|
3743
|
+
return ns.includes(e) ? e : Qe;
|
|
3741
3744
|
}
|
|
3742
3745
|
function S(t, e = !1) {
|
|
3743
3746
|
n.status && (n.status.textContent = t || "", St && (clearTimeout(St), St = null), t && !e && (St = setTimeout(() => {
|
|
@@ -3746,7 +3749,7 @@ function S(t, e = !1) {
|
|
|
3746
3749
|
}
|
|
3747
3750
|
function ae() {
|
|
3748
3751
|
return f && document.body.contains(f) || (f = document.createElement("div"), f.id = "notefully", f.innerHTML = `
|
|
3749
|
-
<button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${
|
|
3752
|
+
<button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${ls}</button>
|
|
3750
3753
|
<div class="nf-dialog" hidden>
|
|
3751
3754
|
<div class="nf-panel">
|
|
3752
3755
|
<div class="nf-pill nf-close-pill">
|
|
@@ -3856,23 +3859,21 @@ function ae() {
|
|
|
3856
3859
|
resetCrop: h(".nf-reset-crop"),
|
|
3857
3860
|
submit: h(".nf-submit"),
|
|
3858
3861
|
shot: null
|
|
3859
|
-
},
|
|
3862
|
+
}, bs(), ut()), f;
|
|
3860
3863
|
}
|
|
3861
3864
|
function ut() {
|
|
3862
|
-
var t
|
|
3863
|
-
f && (
|
|
3864
|
-
|
|
3865
|
-
}),
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
const t = Ta({
|
|
3871
|
-
locale: d.locale == null ? void 0 : d.locale
|
|
3865
|
+
var t;
|
|
3866
|
+
f && (ra(), f.dataset.theme = na(c.theme), f.lang = Et(), f.dir = Oa(Et()), c.hideLauncher ? f.setAttribute("data-nf-hidden-launcher", "") : f.removeAttribute("data-nf-hidden-launcher"), n.video && (n.video.hidden = !c.video), ds(), N.length && N.forEach((e) => {
|
|
3867
|
+
e.label = p(`diag.${e.key}`);
|
|
3868
|
+
}), da(), Z ? de() : ce(), ie(ua()), (t = n.dialog) != null && t.hidden && Lt());
|
|
3869
|
+
}
|
|
3870
|
+
function ra() {
|
|
3871
|
+
const t = Fa({
|
|
3872
|
+
locale: c.locale == null ? void 0 : c.locale
|
|
3872
3873
|
});
|
|
3873
|
-
|
|
3874
|
+
Da(c.translations), Ma(t);
|
|
3874
3875
|
}
|
|
3875
|
-
function
|
|
3876
|
+
function ds() {
|
|
3876
3877
|
if (f) {
|
|
3877
3878
|
if (f.querySelectorAll("[data-i18n-title]").forEach((t) => {
|
|
3878
3879
|
t.title = p(t.getAttribute("data-i18n-title"));
|
|
@@ -3886,44 +3887,50 @@ function cs() {
|
|
|
3886
3887
|
const t = n.audio.dataset.active === "true";
|
|
3887
3888
|
vt(t);
|
|
3888
3889
|
}
|
|
3889
|
-
|
|
3890
|
+
ne();
|
|
3890
3891
|
}
|
|
3891
3892
|
}
|
|
3892
|
-
function
|
|
3893
|
-
if (
|
|
3893
|
+
function la(t) {
|
|
3894
|
+
if (c.kindsCustom)
|
|
3894
3895
|
return t.label;
|
|
3895
3896
|
const e = `kind.${t.id}`, a = p(e);
|
|
3896
3897
|
return a === e ? t.label : a;
|
|
3897
3898
|
}
|
|
3898
3899
|
function Lt() {
|
|
3899
|
-
n.launcher && (n.launcher.hidden = !!
|
|
3900
|
+
n.launcher && (n.launcher.hidden = !!c.hideLauncher);
|
|
3900
3901
|
}
|
|
3901
|
-
function
|
|
3902
|
+
function oe(t) {
|
|
3903
|
+
const e = String(t || "").trim().toLowerCase();
|
|
3904
|
+
return kt.includes(e) ? e : "";
|
|
3905
|
+
}
|
|
3906
|
+
function ps() {
|
|
3902
3907
|
try {
|
|
3903
|
-
|
|
3904
|
-
return kt.includes(t) ? t : "";
|
|
3908
|
+
return oe(localStorage.getItem(ia));
|
|
3905
3909
|
} catch {
|
|
3906
3910
|
return "";
|
|
3907
3911
|
}
|
|
3908
3912
|
}
|
|
3909
|
-
function
|
|
3913
|
+
function gs(t) {
|
|
3910
3914
|
if (kt.includes(t))
|
|
3911
3915
|
try {
|
|
3912
|
-
localStorage.setItem(
|
|
3916
|
+
localStorage.setItem(ia, t);
|
|
3913
3917
|
} catch {
|
|
3914
3918
|
}
|
|
3915
3919
|
}
|
|
3916
|
-
function
|
|
3917
|
-
|
|
3920
|
+
function ua() {
|
|
3921
|
+
return ps() || oe(c.launcherCorner) || "bl";
|
|
3918
3922
|
}
|
|
3919
|
-
function
|
|
3923
|
+
function ie(t, e = !1) {
|
|
3924
|
+
!n.launcher || !kt.includes(t) || (n.launcher.dataset.corner = t, e && gs(t));
|
|
3925
|
+
}
|
|
3926
|
+
function ms() {
|
|
3920
3927
|
if (!n.launcher)
|
|
3921
3928
|
return 16;
|
|
3922
3929
|
const t = getComputedStyle(n.launcher).getPropertyValue("--nf-launcher-inset").trim() || getComputedStyle(f).getPropertyValue("--nf-launcher-inset").trim() || "16px", e = Number.parseFloat(t);
|
|
3923
3930
|
return Number.isFinite(e) ? e : 16;
|
|
3924
3931
|
}
|
|
3925
|
-
function
|
|
3926
|
-
const e =
|
|
3932
|
+
function hs(t) {
|
|
3933
|
+
const e = ms(), a = window.innerWidth, o = window.innerHeight;
|
|
3927
3934
|
switch (t) {
|
|
3928
3935
|
case "tl":
|
|
3929
3936
|
return { x: e, y: e };
|
|
@@ -3936,30 +3943,30 @@ function gs(t) {
|
|
|
3936
3943
|
return { x: e, y: o - e - nt };
|
|
3937
3944
|
}
|
|
3938
3945
|
}
|
|
3939
|
-
function
|
|
3946
|
+
function fs(t, e) {
|
|
3940
3947
|
var i;
|
|
3941
3948
|
let a = ((i = n.launcher) == null ? void 0 : i.dataset.corner) || "bl", o = -1 / 0;
|
|
3942
3949
|
for (const s of kt) {
|
|
3943
|
-
const r =
|
|
3944
|
-
|
|
3950
|
+
const r = hs(s), l = Math.hypot(t.x - r.x, t.y - r.y), u = Math.hypot(e.x - r.x, e.y - r.y), d = l - u;
|
|
3951
|
+
d > o && (o = d, a = s);
|
|
3945
3952
|
}
|
|
3946
3953
|
return a;
|
|
3947
3954
|
}
|
|
3948
|
-
function
|
|
3955
|
+
function ca() {
|
|
3949
3956
|
n.launcher && (n.launcher.style.left = "", n.launcher.style.top = "", n.launcher.style.right = "", n.launcher.style.bottom = "", n.launcher.style.transform = "", n.launcher.style.transition = "");
|
|
3950
3957
|
}
|
|
3951
|
-
function
|
|
3958
|
+
function ys(t, e) {
|
|
3952
3959
|
if (!n.launcher)
|
|
3953
3960
|
return;
|
|
3954
3961
|
const a = Math.max(0, window.innerWidth - nt), o = Math.max(0, window.innerHeight - nt), i = Math.min(a, Math.max(0, t)), s = Math.min(o, Math.max(0, e));
|
|
3955
3962
|
n.launcher.style.right = "auto", n.launcher.style.bottom = "auto", n.launcher.style.left = `${i}px`, n.launcher.style.top = `${s}px`;
|
|
3956
3963
|
}
|
|
3957
|
-
function
|
|
3964
|
+
function vs(t) {
|
|
3958
3965
|
const e = n.launcher;
|
|
3959
3966
|
if (!e || !kt.includes(t))
|
|
3960
3967
|
return;
|
|
3961
3968
|
const a = e.getBoundingClientRect();
|
|
3962
|
-
|
|
3969
|
+
ca(), ie(t, !0);
|
|
3963
3970
|
const o = e.getBoundingClientRect(), i = a.left - o.left, s = a.top - o.top;
|
|
3964
3971
|
Math.abs(i) < 0.5 && Math.abs(s) < 0.5 || (e.style.transition = "none", e.style.transform = `translate(${i}px, ${s}px)`, e.getBoundingClientRect(), requestAnimationFrame(() => {
|
|
3965
3972
|
e.style.transition = "transform 0.42s cubic-bezier(0.22, 1, 0.36, 1)", e.style.transform = "";
|
|
@@ -3969,7 +3976,7 @@ function fs(t) {
|
|
|
3969
3976
|
e.addEventListener("transitionend", r), window.setTimeout(r, 500);
|
|
3970
3977
|
}));
|
|
3971
3978
|
}
|
|
3972
|
-
function
|
|
3979
|
+
function Le(t) {
|
|
3973
3980
|
if (!M || !n.launcher)
|
|
3974
3981
|
return;
|
|
3975
3982
|
const e = M;
|
|
@@ -3979,17 +3986,17 @@ function xe(t) {
|
|
|
3979
3986
|
} catch {
|
|
3980
3987
|
}
|
|
3981
3988
|
if (!e.moved) {
|
|
3982
|
-
|
|
3989
|
+
ca();
|
|
3983
3990
|
return;
|
|
3984
3991
|
}
|
|
3985
3992
|
Wt = !0;
|
|
3986
|
-
const a = n.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, s =
|
|
3987
|
-
|
|
3993
|
+
const a = n.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, s = fs(i, o);
|
|
3994
|
+
vs(s);
|
|
3988
3995
|
}
|
|
3989
|
-
function
|
|
3996
|
+
function ks() {
|
|
3990
3997
|
const t = n.launcher;
|
|
3991
3998
|
!t || t.dataset.nfDragBound === "true" || (t.dataset.nfDragBound = "true", t.addEventListener("pointerdown", (e) => {
|
|
3992
|
-
if (e.button != null && e.button !== 0 ||
|
|
3999
|
+
if (e.button != null && e.button !== 0 || c.hideLauncher || t.hidden)
|
|
3993
4000
|
return;
|
|
3994
4001
|
const a = t.getBoundingClientRect();
|
|
3995
4002
|
M = {
|
|
@@ -4005,97 +4012,97 @@ function ys() {
|
|
|
4005
4012
|
return;
|
|
4006
4013
|
const a = e.clientX - M.startX, o = e.clientY - M.startY;
|
|
4007
4014
|
if (!M.moved) {
|
|
4008
|
-
if (Math.hypot(a, o) <
|
|
4015
|
+
if (Math.hypot(a, o) < cs)
|
|
4009
4016
|
return;
|
|
4010
4017
|
M.moved = !0, t.dataset.dragging = "true";
|
|
4011
4018
|
}
|
|
4012
|
-
|
|
4013
|
-
}), t.addEventListener("pointerup",
|
|
4019
|
+
ys(M.originX + a, M.originY + o);
|
|
4020
|
+
}), t.addEventListener("pointerup", Le), t.addEventListener("pointercancel", Le));
|
|
4014
4021
|
}
|
|
4015
|
-
function
|
|
4022
|
+
function bs() {
|
|
4016
4023
|
var e;
|
|
4017
4024
|
n.launcher.addEventListener("click", (a) => {
|
|
4018
4025
|
if (Wt) {
|
|
4019
4026
|
a.preventDefault(), a.stopPropagation(), Wt = !1;
|
|
4020
4027
|
return;
|
|
4021
4028
|
}
|
|
4022
|
-
|
|
4023
|
-
}),
|
|
4029
|
+
Ra();
|
|
4030
|
+
}), ks(), ie(ua()), h(".nf-dialog").addEventListener("click", (a) => {
|
|
4024
4031
|
ht && !ft || a.target === n.dialog && at();
|
|
4025
4032
|
}), (e = n.close) == null || e.addEventListener("click", () => {
|
|
4026
4033
|
ht && !ft || at();
|
|
4027
|
-
}), document.addEventListener("keydown",
|
|
4034
|
+
}), document.addEventListener("keydown", Ca), f.querySelectorAll(".nf-tool").forEach((a) => {
|
|
4028
4035
|
a.addEventListener("click", () => yt(a.dataset.tool));
|
|
4029
|
-
}), n.resetCrop.addEventListener("click",
|
|
4036
|
+
}), n.resetCrop.addEventListener("click", Us), n.canvas.addEventListener("pointerdown", Rs), n.canvas.addEventListener("dragstart", (a) => a.preventDefault());
|
|
4030
4037
|
const t = h(".nf-kind");
|
|
4031
4038
|
t && t.addEventListener("click", (a) => {
|
|
4032
4039
|
const o = a.target.closest("[data-kind]");
|
|
4033
|
-
o &&
|
|
4034
|
-
}), n.discard.addEventListener("click",
|
|
4035
|
-
|
|
4036
|
-
}), n.restore.addEventListener("click",
|
|
4037
|
-
|
|
4038
|
-
}), n.stop.addEventListener("click", () => $ == null ? void 0 : $.stop()), n.privacyChange.addEventListener("click", () =>
|
|
4039
|
-
|
|
4040
|
-
}),
|
|
4040
|
+
o && se(o.dataset.kind);
|
|
4041
|
+
}), n.discard.addEventListener("click", Ts), n.recapture.addEventListener("click", () => {
|
|
4042
|
+
Ms().catch((a) => S(a.message || p("status.recaptureFailed")));
|
|
4043
|
+
}), n.restore.addEventListener("click", Fs), n.audio.addEventListener("click", Ds), n.video.addEventListener("click", () => {
|
|
4044
|
+
Os().catch((a) => S((a == null ? void 0 : a.message) || p("status.screenUnsupported")));
|
|
4045
|
+
}), n.stop.addEventListener("click", () => $ == null ? void 0 : $.stop()), n.privacyChange.addEventListener("click", () => ue(!Z)), n.privacyScroll.addEventListener("change", tn), h(".nf-submit").addEventListener("click", () => {
|
|
4046
|
+
Pa().catch((a) => S(a.message || p("status.submitFailed")));
|
|
4047
|
+
}), da(), yt(null);
|
|
4041
4048
|
}
|
|
4042
4049
|
function D(t) {
|
|
4043
4050
|
return String(t || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
4044
4051
|
}
|
|
4045
|
-
function
|
|
4052
|
+
function da() {
|
|
4046
4053
|
const t = f == null ? void 0 : f.querySelector(".nf-kind");
|
|
4047
4054
|
if (!t)
|
|
4048
4055
|
return;
|
|
4049
|
-
const e = Array.isArray(
|
|
4050
|
-
t.innerHTML = e.map((i) => `<button type="button" data-kind="${D(i.id)}">${D(
|
|
4056
|
+
const e = Array.isArray(c.kinds) && c.kinds.length ? c.kinds : Y;
|
|
4057
|
+
t.innerHTML = e.map((i) => `<button type="button" data-kind="${D(i.id)}">${D(la(i))}</button>`).join("");
|
|
4051
4058
|
const o = e.map((i) => i.id).includes(_) ? _ : Dt(e);
|
|
4052
|
-
|
|
4059
|
+
se(o);
|
|
4053
4060
|
}
|
|
4054
|
-
function
|
|
4055
|
-
_ = (
|
|
4061
|
+
function se(t) {
|
|
4062
|
+
_ = (c.kinds || Y).map((a) => a.id).includes(t) ? t : Dt(c.kinds), f == null || f.querySelectorAll("[data-kind]").forEach((a) => {
|
|
4056
4063
|
a.dataset.active = String(a.dataset.kind === _);
|
|
4057
|
-
}),
|
|
4064
|
+
}), As(_), ne();
|
|
4058
4065
|
}
|
|
4059
|
-
function
|
|
4060
|
-
return (Array.isArray(
|
|
4066
|
+
function ws() {
|
|
4067
|
+
return (Array.isArray(c.kinds) && c.kinds.length ? c.kinds : Y).find((e) => e.id === _) || null;
|
|
4061
4068
|
}
|
|
4062
|
-
function
|
|
4063
|
-
const t =
|
|
4064
|
-
kind: t ?
|
|
4069
|
+
function Ss() {
|
|
4070
|
+
const t = ws(), e = (t == null ? void 0 : t.id) || _ || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || p(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || p(a ? `form.intro.${e}` : "form.intro.other"), s = a ? p(`form.placeholder.${e}`) : p("form.placeholder.custom", {
|
|
4071
|
+
kind: t ? la(t) : Ct(e)
|
|
4065
4072
|
});
|
|
4066
4073
|
return { title: o, intro: i, placeholder: s };
|
|
4067
4074
|
}
|
|
4068
|
-
function
|
|
4075
|
+
function ne() {
|
|
4069
4076
|
if (!n.title && !n.intro && !n.text)
|
|
4070
4077
|
return;
|
|
4071
|
-
const t =
|
|
4078
|
+
const t = Ss(), e = V() ? ` ${p("form.screenshotNote")}` : "";
|
|
4072
4079
|
n.title && (n.title.textContent = t.title), n.intro && (n.intro.textContent = `${t.intro}${e}`), n.text && n.text.setAttribute("placeholder", t.placeholder);
|
|
4073
4080
|
}
|
|
4074
|
-
function
|
|
4081
|
+
function Cs() {
|
|
4075
4082
|
try {
|
|
4076
|
-
return String(localStorage.getItem(
|
|
4083
|
+
return String(localStorage.getItem(oa) || "").trim().toLowerCase();
|
|
4077
4084
|
} catch {
|
|
4078
4085
|
return "";
|
|
4079
4086
|
}
|
|
4080
4087
|
}
|
|
4081
|
-
function
|
|
4088
|
+
function As(t) {
|
|
4082
4089
|
const e = String(t || "").trim().toLowerCase();
|
|
4083
4090
|
if (e)
|
|
4084
4091
|
try {
|
|
4085
|
-
localStorage.setItem(
|
|
4092
|
+
localStorage.setItem(oa, e);
|
|
4086
4093
|
} catch {
|
|
4087
4094
|
}
|
|
4088
4095
|
}
|
|
4089
|
-
function
|
|
4090
|
-
const t = (
|
|
4091
|
-
return e && t.includes(e) ? e : Dt(
|
|
4096
|
+
function zs() {
|
|
4097
|
+
const t = (c.kinds || Y).map((a) => a.id), e = Cs();
|
|
4098
|
+
return e && t.includes(e) ? e : Dt(c.kinds);
|
|
4092
4099
|
}
|
|
4093
4100
|
function yt(t) {
|
|
4094
|
-
X =
|
|
4101
|
+
X = rs.has(t) ? t : null, I = null, f.querySelectorAll(".nf-tool").forEach((e) => {
|
|
4095
4102
|
e.dataset.active = String(e.dataset.tool === X);
|
|
4096
4103
|
}), n.canvas && (n.canvas.dataset.draw = X ? "true" : "false"), V() && O();
|
|
4097
4104
|
}
|
|
4098
|
-
function
|
|
4105
|
+
function Ue(t) {
|
|
4099
4106
|
return Math.min(1, Math.max(0, t));
|
|
4100
4107
|
}
|
|
4101
4108
|
function bt() {
|
|
@@ -4104,15 +4111,15 @@ function bt() {
|
|
|
4104
4111
|
function Ut(t) {
|
|
4105
4112
|
const e = bt().getBoundingClientRect();
|
|
4106
4113
|
return {
|
|
4107
|
-
x:
|
|
4108
|
-
y:
|
|
4114
|
+
x: Ue((t.clientX - e.left) / Math.max(e.width, 1)),
|
|
4115
|
+
y: Ue((t.clientY - e.top) / Math.max(e.height, 1))
|
|
4109
4116
|
};
|
|
4110
4117
|
}
|
|
4111
|
-
function
|
|
4118
|
+
function Es(t) {
|
|
4112
4119
|
const e = bt().getBoundingClientRect();
|
|
4113
4120
|
return t.clientX >= e.left && t.clientX <= e.right && t.clientY >= e.top && t.clientY <= e.bottom;
|
|
4114
4121
|
}
|
|
4115
|
-
function
|
|
4122
|
+
function pa(t) {
|
|
4116
4123
|
const e = Ut(t), a = C.crop();
|
|
4117
4124
|
return {
|
|
4118
4125
|
x: a.x + e.x * a.w,
|
|
@@ -4128,7 +4135,7 @@ function Ot(t, e) {
|
|
|
4128
4135
|
h: Math.max(qt, Math.abs(e.y - t.y))
|
|
4129
4136
|
};
|
|
4130
4137
|
}
|
|
4131
|
-
function
|
|
4138
|
+
function re(t) {
|
|
4132
4139
|
f && (t ? f.dataset.grabbing = "true" : delete f.dataset.grabbing);
|
|
4133
4140
|
}
|
|
4134
4141
|
function Ht(t) {
|
|
@@ -4138,21 +4145,21 @@ function Ht(t) {
|
|
|
4138
4145
|
}
|
|
4139
4146
|
}
|
|
4140
4147
|
function Zt() {
|
|
4141
|
-
window.addEventListener("pointermove",
|
|
4148
|
+
window.addEventListener("pointermove", ma), window.addEventListener("pointerup", Tt), window.addEventListener("pointercancel", Tt);
|
|
4142
4149
|
}
|
|
4143
|
-
function
|
|
4144
|
-
window.removeEventListener("pointermove",
|
|
4150
|
+
function ga() {
|
|
4151
|
+
window.removeEventListener("pointermove", ma), window.removeEventListener("pointerup", Tt), window.removeEventListener("pointercancel", Tt);
|
|
4145
4152
|
}
|
|
4146
|
-
function
|
|
4153
|
+
function Rs(t) {
|
|
4147
4154
|
if (t.button !== 0 || !V())
|
|
4148
4155
|
return;
|
|
4149
|
-
if (!t.target.closest(".nf-sticker") && !
|
|
4156
|
+
if (!t.target.closest(".nf-sticker") && !Es(t)) {
|
|
4150
4157
|
I = null, O();
|
|
4151
4158
|
return;
|
|
4152
4159
|
}
|
|
4153
4160
|
const e = t.target.closest(".nf-handle"), a = t.target.closest(".nf-sticker");
|
|
4154
4161
|
if (a && a.dataset.preview !== "true") {
|
|
4155
|
-
t.preventDefault(), t.stopPropagation(), I = a.dataset.id, Ht(t),
|
|
4162
|
+
t.preventDefault(), t.stopPropagation(), I = a.dataset.id, Ht(t), js({
|
|
4156
4163
|
kind: "sticker",
|
|
4157
4164
|
id: I,
|
|
4158
4165
|
dir: (e == null ? void 0 : e.dataset.dir) || "move"
|
|
@@ -4165,13 +4172,13 @@ function zs(t) {
|
|
|
4165
4172
|
}
|
|
4166
4173
|
if (X === "arrow" || X === "rect" || X === "circle") {
|
|
4167
4174
|
t.preventDefault(), Ht(t);
|
|
4168
|
-
const o =
|
|
4175
|
+
const o = pa(t);
|
|
4169
4176
|
R = { kind: "sticker", type: X, start: o, current: o }, Zt(), O();
|
|
4170
4177
|
return;
|
|
4171
4178
|
}
|
|
4172
4179
|
O();
|
|
4173
4180
|
}
|
|
4174
|
-
function
|
|
4181
|
+
function js(t, e) {
|
|
4175
4182
|
e.preventDefault(), e.stopPropagation();
|
|
4176
4183
|
const a = bt().getBoundingClientRect(), o = C.list().find((i) => i.id === t.id);
|
|
4177
4184
|
E = {
|
|
@@ -4181,11 +4188,11 @@ function Es(t, e) {
|
|
|
4181
4188
|
crop: C.crop(),
|
|
4182
4189
|
sticker: o ? { ...o } : null,
|
|
4183
4190
|
rect: a
|
|
4184
|
-
},
|
|
4191
|
+
}, re(t.dir === "move" || t.dir === "start" || t.dir === "end"), Zt();
|
|
4185
4192
|
}
|
|
4186
|
-
function
|
|
4193
|
+
function ma(t) {
|
|
4187
4194
|
if (R) {
|
|
4188
|
-
R.current = R.kind === "crop" ? Ut(t) :
|
|
4195
|
+
R.current = R.kind === "crop" ? Ut(t) : pa(t), O();
|
|
4189
4196
|
return;
|
|
4190
4197
|
}
|
|
4191
4198
|
if (!E)
|
|
@@ -4211,12 +4218,12 @@ function ga(t) {
|
|
|
4211
4218
|
});
|
|
4212
4219
|
else {
|
|
4213
4220
|
const i = { x: o.x, y: o.y, w: o.w, h: o.h };
|
|
4214
|
-
|
|
4221
|
+
Ps(i, E.dir, e, a), C.update(o.id, i);
|
|
4215
4222
|
}
|
|
4216
4223
|
O();
|
|
4217
4224
|
}
|
|
4218
4225
|
}
|
|
4219
|
-
function
|
|
4226
|
+
function Ps(t, e, a, o) {
|
|
4220
4227
|
if (e.includes("e") && (t.w = Math.max(0.04, t.w + a)), e.includes("s") && (t.h = Math.max(0.04, t.h + o)), e.includes("w")) {
|
|
4221
4228
|
const i = Math.max(0.04, t.w - a);
|
|
4222
4229
|
t.x += t.w - i, t.w = i;
|
|
@@ -4227,8 +4234,8 @@ function Rs(t, e, a, o) {
|
|
|
4227
4234
|
}
|
|
4228
4235
|
}
|
|
4229
4236
|
function Tt(t) {
|
|
4230
|
-
if (
|
|
4231
|
-
|
|
4237
|
+
if (ga(), re(!1), R) {
|
|
4238
|
+
xs();
|
|
4232
4239
|
return;
|
|
4233
4240
|
}
|
|
4234
4241
|
if (E) {
|
|
@@ -4239,13 +4246,13 @@ function Tt(t) {
|
|
|
4239
4246
|
E = null, O();
|
|
4240
4247
|
}
|
|
4241
4248
|
}
|
|
4242
|
-
function
|
|
4249
|
+
function xs() {
|
|
4243
4250
|
const t = R;
|
|
4244
4251
|
if (R = null, !t)
|
|
4245
4252
|
return;
|
|
4246
4253
|
if (t.kind === "crop") {
|
|
4247
4254
|
const a = Ot(t.start, t.current);
|
|
4248
|
-
if (Math.abs(t.current.x - t.start.x) <
|
|
4255
|
+
if (Math.abs(t.current.x - t.start.x) < xe || Math.abs(t.current.y - t.start.y) < xe) {
|
|
4249
4256
|
O();
|
|
4250
4257
|
return;
|
|
4251
4258
|
}
|
|
@@ -4258,10 +4265,10 @@ function js() {
|
|
|
4258
4265
|
}), ot();
|
|
4259
4266
|
return;
|
|
4260
4267
|
}
|
|
4261
|
-
const e =
|
|
4268
|
+
const e = Ls(t);
|
|
4262
4269
|
e && (I = e.id), O();
|
|
4263
4270
|
}
|
|
4264
|
-
function
|
|
4271
|
+
function Ls(t) {
|
|
4265
4272
|
if (t.type === "arrow") {
|
|
4266
4273
|
const e = t.current.x - t.start.x, a = t.current.y - t.start.y;
|
|
4267
4274
|
return Math.hypot(e, a) < qt ? C.add("arrow", {
|
|
@@ -4282,7 +4289,7 @@ function Ps(t) {
|
|
|
4282
4289
|
}
|
|
4283
4290
|
return C.add(t.type, Ot(t.start, t.current));
|
|
4284
4291
|
}
|
|
4285
|
-
function
|
|
4292
|
+
function Us() {
|
|
4286
4293
|
C.resetCrop(), I = null, ot();
|
|
4287
4294
|
}
|
|
4288
4295
|
function Ft() {
|
|
@@ -4311,36 +4318,36 @@ function wt() {
|
|
|
4311
4318
|
if (!n.stage || !n.palette || !n.actions || !n.recapture)
|
|
4312
4319
|
return;
|
|
4313
4320
|
const t = V();
|
|
4314
|
-
n.stage.hidden = !t && !G, n.palette.hidden = !t, n.discard && (n.discard.hidden = !t), n.restore && (n.restore.hidden = t || !lt), t && n.paletteShot ? (n.paletteShot.appendChild(n.recapture), n.paletteShot.appendChild(n.discard)) : n.actionsMedia ? n.actionsMedia.after(n.recapture) : n.audio ? n.audio.after(n.recapture) : n.actions.insertBefore(n.recapture, n.submit || null), n.recapture.hidden = !1,
|
|
4321
|
+
n.stage.hidden = !t && !G, n.palette.hidden = !t, n.discard && (n.discard.hidden = !t), n.restore && (n.restore.hidden = t || !lt), t && n.paletteShot ? (n.paletteShot.appendChild(n.recapture), n.paletteShot.appendChild(n.discard)) : n.actionsMedia ? n.actionsMedia.after(n.recapture) : n.audio ? n.audio.after(n.recapture) : n.actions.insertBefore(n.recapture, n.submit || null), n.recapture.hidden = !1, ne();
|
|
4315
4322
|
}
|
|
4316
|
-
function
|
|
4323
|
+
function Ts() {
|
|
4317
4324
|
V() && (lt = q), q = "", yt(null), wt(), ot();
|
|
4318
4325
|
}
|
|
4319
|
-
function
|
|
4326
|
+
function Fs() {
|
|
4320
4327
|
Q(lt) && (q = lt, wt(), ot());
|
|
4321
4328
|
}
|
|
4322
|
-
function
|
|
4329
|
+
function ha() {
|
|
4323
4330
|
return {
|
|
4324
|
-
capture: typeof
|
|
4325
|
-
onBeforeCapture: typeof
|
|
4331
|
+
capture: typeof c.capture == "function" ? c.capture : void 0,
|
|
4332
|
+
onBeforeCapture: typeof c.onBeforeCapture == "function" ? c.onBeforeCapture : void 0
|
|
4326
4333
|
};
|
|
4327
4334
|
}
|
|
4328
|
-
function
|
|
4335
|
+
function fa(t) {
|
|
4329
4336
|
if (!Q(t))
|
|
4330
4337
|
throw new Error(p("status.screenshotFailed"));
|
|
4331
4338
|
q = t, lt = t, C = ee(), pt = { w: 0, h: 0 }, I = null, R = null, E = null, yt(null);
|
|
4332
4339
|
}
|
|
4333
|
-
async function
|
|
4340
|
+
async function Ms() {
|
|
4334
4341
|
if (!(Nt || !n.dialog || n.dialog.hidden)) {
|
|
4335
4342
|
Nt = !0, n.recapture.disabled = !0, S(p("status.capturing"), !0), n.dialog.hidden = !0;
|
|
4336
4343
|
try {
|
|
4337
4344
|
let t = "";
|
|
4338
4345
|
try {
|
|
4339
|
-
t = await
|
|
4346
|
+
t = await Ei();
|
|
4340
4347
|
} catch {
|
|
4341
|
-
t = await
|
|
4348
|
+
t = await Ze(ha());
|
|
4342
4349
|
}
|
|
4343
|
-
|
|
4350
|
+
fa(t), S("");
|
|
4344
4351
|
} catch (t) {
|
|
4345
4352
|
S((t == null ? void 0 : t.message) || p("status.screenshotFailed"));
|
|
4346
4353
|
} finally {
|
|
@@ -4348,9 +4355,9 @@ async function Ts() {
|
|
|
4348
4355
|
}
|
|
4349
4356
|
}
|
|
4350
4357
|
}
|
|
4351
|
-
function
|
|
4358
|
+
function Ds() {
|
|
4352
4359
|
try {
|
|
4353
|
-
if (W || (W =
|
|
4360
|
+
if (W || (W = Vi((e) => {
|
|
4354
4361
|
const a = n.text.value.trim();
|
|
4355
4362
|
n.text.value = a ? `${a} ${e}` : e;
|
|
4356
4363
|
}, {
|
|
@@ -4371,20 +4378,20 @@ function Fs() {
|
|
|
4371
4378
|
S(t.message);
|
|
4372
4379
|
}
|
|
4373
4380
|
}
|
|
4374
|
-
async function
|
|
4381
|
+
async function Os() {
|
|
4375
4382
|
if (et) {
|
|
4376
4383
|
$ == null || $.stop();
|
|
4377
4384
|
return;
|
|
4378
4385
|
}
|
|
4379
|
-
await
|
|
4386
|
+
await Is();
|
|
4380
4387
|
}
|
|
4381
|
-
async function
|
|
4382
|
-
if (!
|
|
4388
|
+
async function Is() {
|
|
4389
|
+
if (!c.video) {
|
|
4383
4390
|
S(p("status.videoDisabled"));
|
|
4384
4391
|
return;
|
|
4385
4392
|
}
|
|
4386
4393
|
if (!et) {
|
|
4387
|
-
n.dialog.hidden = !0, n.stop.hidden = !1, ut(), n.launcher.hidden = !0, $ =
|
|
4394
|
+
n.dialog.hidden = !0, n.stop.hidden = !1, ut(), n.launcher.hidden = !0, $ = Bi({
|
|
4388
4395
|
onStart() {
|
|
4389
4396
|
dt(!0);
|
|
4390
4397
|
},
|
|
@@ -4402,18 +4409,18 @@ async function Ds() {
|
|
|
4402
4409
|
}
|
|
4403
4410
|
}
|
|
4404
4411
|
}
|
|
4405
|
-
function
|
|
4412
|
+
function Vs() {
|
|
4406
4413
|
var e;
|
|
4407
4414
|
const t = n.shotBlock || n.canvas;
|
|
4408
4415
|
t == null || t.style.removeProperty("--nf-shot-aspect"), (e = n.canvas) == null || e.style.removeProperty("aspect-ratio");
|
|
4409
4416
|
}
|
|
4410
|
-
function
|
|
4417
|
+
function $s(t, e) {
|
|
4411
4418
|
if (!(t > 0) || !(e > 0))
|
|
4412
4419
|
return;
|
|
4413
4420
|
const a = n.shotBlock || n.canvas, o = t / e;
|
|
4414
4421
|
a == null || a.style.setProperty("--nf-shot-aspect", String(o)), n.canvas && (n.canvas.style.aspectRatio = `${t} / ${e}`);
|
|
4415
4422
|
}
|
|
4416
|
-
function
|
|
4423
|
+
function Bs(t) {
|
|
4417
4424
|
if (!n.shot || !n.canvas || !(t > 0))
|
|
4418
4425
|
return;
|
|
4419
4426
|
const e = n.canvas.clientWidth, a = n.canvas.clientHeight;
|
|
@@ -4426,28 +4433,28 @@ function Vs(t) {
|
|
|
4426
4433
|
}
|
|
4427
4434
|
function ot() {
|
|
4428
4435
|
if (n.shot = null, !V()) {
|
|
4429
|
-
|
|
4436
|
+
Vs(), n.canvas.innerHTML = G ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(G)}"></video>` : "", Ft();
|
|
4430
4437
|
return;
|
|
4431
4438
|
}
|
|
4432
4439
|
n.canvas.innerHTML = `<div class="nf-shot"><img alt="${D(p("shot.alt"))}" src="${q}" draggable="false"></div>`, n.shot = n.canvas.querySelector(".nf-shot");
|
|
4433
4440
|
const t = n.shot.querySelector("img");
|
|
4434
4441
|
t.draggable = !1, t.addEventListener("dragstart", (a) => a.preventDefault());
|
|
4435
4442
|
const e = () => {
|
|
4436
|
-
|
|
4443
|
+
Ns(t), O();
|
|
4437
4444
|
};
|
|
4438
4445
|
t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Ft();
|
|
4439
4446
|
}
|
|
4440
|
-
function
|
|
4447
|
+
function Ns(t) {
|
|
4441
4448
|
const e = t.naturalWidth || pt.w, a = t.naturalHeight || pt.h;
|
|
4442
4449
|
if (!n.shot || !(e > 0) || !(a > 0))
|
|
4443
4450
|
return;
|
|
4444
4451
|
pt = { w: e, h: a };
|
|
4445
4452
|
const o = C.crop(), i = o.w * e, s = o.h * a, r = i / s;
|
|
4446
|
-
|
|
4447
|
-
const l = () =>
|
|
4453
|
+
$s(i, s), t.style.width = `${100 / o.w}%`, t.style.height = `${100 / o.h}%`, t.style.left = `${-o.x / o.w * 100}%`, t.style.top = `${-o.y / o.h * 100}%`;
|
|
4454
|
+
const l = () => Bs(r);
|
|
4448
4455
|
l(), requestAnimationFrame(l);
|
|
4449
4456
|
}
|
|
4450
|
-
function
|
|
4457
|
+
function Ks(t) {
|
|
4451
4458
|
return t.type === "arrow" ? {
|
|
4452
4459
|
id: "preview",
|
|
4453
4460
|
type: "arrow",
|
|
@@ -4470,17 +4477,17 @@ function O() {
|
|
|
4470
4477
|
Ft();
|
|
4471
4478
|
return;
|
|
4472
4479
|
}
|
|
4473
|
-
const e = C.crop(), a = bt(), o =
|
|
4480
|
+
const e = C.crop(), a = bt(), o = Je(a.clientWidth || 400);
|
|
4474
4481
|
if (n.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), n.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), n.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), n.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (R == null ? void 0 : R.kind) === "crop") {
|
|
4475
4482
|
const s = document.createElement("div");
|
|
4476
|
-
s.className = "nf-crop",
|
|
4483
|
+
s.className = "nf-crop", Te(s, Ot(R.start, R.current), { x: 0, y: 0, w: 1, h: 1 }), n.shot.appendChild(s);
|
|
4477
4484
|
}
|
|
4478
4485
|
const i = C.list().slice();
|
|
4479
|
-
if ((R == null ? void 0 : R.kind) === "sticker" && i.push(
|
|
4486
|
+
if ((R == null ? void 0 : R.kind) === "sticker" && i.push(Ks(R)), i.forEach((s) => {
|
|
4480
4487
|
const r = s.id === "preview", l = !r && s.id === I, u = document.createElement("div");
|
|
4481
|
-
if (u.className = `nf-sticker nf-${s.type}`, u.dataset.id = s.id, l && (u.dataset.selected = "true"), r && (u.dataset.preview = "true"), s.type === "arrow" ?
|
|
4482
|
-
const
|
|
4483
|
-
|
|
4488
|
+
if (u.className = `nf-sticker nf-${s.type}`, u.dataset.id = s.id, l && (u.dataset.selected = "true"), r && (u.dataset.preview = "true"), s.type === "arrow" ? Hs(u, s, e, l, o) : (Te(u, s, e), l && ["nw", "ne", "sw", "se"].forEach((d) => Yt(u, d))), !r && s.number) {
|
|
4489
|
+
const d = document.createElement("span");
|
|
4490
|
+
d.className = "nf-badge", d.textContent = String(s.number), u.appendChild(d);
|
|
4484
4491
|
}
|
|
4485
4492
|
n.shot.appendChild(u);
|
|
4486
4493
|
}), n.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((s) => s.remove()), G) {
|
|
@@ -4489,8 +4496,8 @@ function O() {
|
|
|
4489
4496
|
}
|
|
4490
4497
|
Ft();
|
|
4491
4498
|
}
|
|
4492
|
-
function
|
|
4493
|
-
const s = bt(), r = s.clientWidth, l = s.clientHeight, u = (e.x - a.x) / a.w * r,
|
|
4499
|
+
function Hs(t, e, a, o, i = Je(400)) {
|
|
4500
|
+
const s = bt(), r = s.clientWidth, l = s.clientHeight, u = (e.x - a.x) / a.w * r, d = (e.y - a.y) / a.h * l, g = ((e.x2 ?? e.x + e.w) - a.x) / a.w * r, k = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), w = Math.min(u, g) - v, b = Math.min(d, k) - v, z = Math.max(2, Math.abs(g - u)) + v * 2, j = Math.max(2, Math.abs(k - d)) + v * 2, T = u - w, K = d - b, P = g - w, m = k - b, A = _i(T, K, P, m, i), tt = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4494
4501
|
t.style.left = `${w}px`, t.style.top = `${b}px`, t.style.width = `${z}px`, t.style.height = `${j}px`, tt.setAttribute("class", "nf-arrow-svg"), tt.setAttribute("viewBox", `0 0 ${z} ${j}`), tt.setAttribute("width", String(z)), tt.setAttribute("height", String(j)), tt.innerHTML = `
|
|
4495
4502
|
<line class="nf-arrow-hit" x1="${T}" y1="${K}" x2="${P}" y2="${m}" />
|
|
4496
4503
|
<line class="nf-arrow-shaft" x1="${T}" y1="${K}" x2="${A.shaftEnd.x}" y2="${A.shaftEnd.y}" />
|
|
@@ -4501,27 +4508,27 @@ function Yt(t, e, a) {
|
|
|
4501
4508
|
const o = document.createElement("span");
|
|
4502
4509
|
o.className = "nf-handle", o.dataset.dir = e, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), t.appendChild(o);
|
|
4503
4510
|
}
|
|
4504
|
-
function
|
|
4511
|
+
function Te(t, e, a) {
|
|
4505
4512
|
t.style.left = `${(e.x - a.x) / a.w * 100}%`, t.style.top = `${(e.y - a.y) / a.h * 100}%`, t.style.width = `${e.w / a.w * 100}%`, t.style.height = `${e.h / a.h * 100}%`;
|
|
4506
4513
|
}
|
|
4507
|
-
function
|
|
4514
|
+
function ya() {
|
|
4508
4515
|
try {
|
|
4509
|
-
return String(localStorage.getItem(
|
|
4516
|
+
return String(localStorage.getItem(aa) || "").trim();
|
|
4510
4517
|
} catch {
|
|
4511
4518
|
return "";
|
|
4512
4519
|
}
|
|
4513
4520
|
}
|
|
4514
|
-
function
|
|
4521
|
+
function Gs(t) {
|
|
4515
4522
|
const e = String(t || "").trim();
|
|
4516
4523
|
if (!(!e || e === Xt()))
|
|
4517
4524
|
try {
|
|
4518
|
-
localStorage.setItem(
|
|
4525
|
+
localStorage.setItem(aa, e);
|
|
4519
4526
|
} catch {
|
|
4520
4527
|
}
|
|
4521
4528
|
}
|
|
4522
|
-
function
|
|
4529
|
+
function va() {
|
|
4523
4530
|
try {
|
|
4524
|
-
const t = localStorage.getItem(
|
|
4531
|
+
const t = localStorage.getItem(sa);
|
|
4525
4532
|
if (!t)
|
|
4526
4533
|
return { diagnostics: !1, logs: !1 };
|
|
4527
4534
|
const e = JSON.parse(t);
|
|
@@ -4533,23 +4540,23 @@ function ya() {
|
|
|
4533
4540
|
return { diagnostics: !1, logs: !1 };
|
|
4534
4541
|
}
|
|
4535
4542
|
}
|
|
4536
|
-
function
|
|
4543
|
+
function Fe(t = {}) {
|
|
4537
4544
|
const e = {
|
|
4538
|
-
...
|
|
4545
|
+
...va(),
|
|
4539
4546
|
...t
|
|
4540
4547
|
};
|
|
4541
4548
|
try {
|
|
4542
|
-
localStorage.setItem(
|
|
4549
|
+
localStorage.setItem(sa, JSON.stringify({
|
|
4543
4550
|
diagnostics: !!e.diagnostics,
|
|
4544
4551
|
logs: !!e.logs
|
|
4545
4552
|
}));
|
|
4546
4553
|
} catch {
|
|
4547
4554
|
}
|
|
4548
4555
|
}
|
|
4549
|
-
function
|
|
4556
|
+
function ka() {
|
|
4550
4557
|
return !!(String(H.userId || "").trim() || String(H.email || "").trim() || String(H.displayName || "").trim());
|
|
4551
4558
|
}
|
|
4552
|
-
function
|
|
4559
|
+
function ba() {
|
|
4553
4560
|
return String(
|
|
4554
4561
|
H.displayName || H.email || H.userId || ""
|
|
4555
4562
|
).trim();
|
|
@@ -4557,57 +4564,58 @@ function ka() {
|
|
|
4557
4564
|
function Xt() {
|
|
4558
4565
|
return p("form.authorPlaceholder");
|
|
4559
4566
|
}
|
|
4560
|
-
function
|
|
4567
|
+
function _s() {
|
|
4561
4568
|
var e;
|
|
4562
|
-
if (
|
|
4563
|
-
return
|
|
4569
|
+
if (ka())
|
|
4570
|
+
return ba() || Xt();
|
|
4564
4571
|
const t = String(((e = n.author) == null ? void 0 : e.value) || "").trim();
|
|
4565
|
-
return t ? (
|
|
4572
|
+
return t ? (Gs(t), t) : Xt();
|
|
4566
4573
|
}
|
|
4567
|
-
function
|
|
4574
|
+
function wa() {
|
|
4568
4575
|
if (!n.author)
|
|
4569
4576
|
return;
|
|
4570
|
-
const t =
|
|
4577
|
+
const t = ka();
|
|
4571
4578
|
if (n.author.hidden = t, t) {
|
|
4572
4579
|
n.author.value = "";
|
|
4573
4580
|
return;
|
|
4574
4581
|
}
|
|
4575
|
-
n.author.value =
|
|
4582
|
+
n.author.value = ya();
|
|
4576
4583
|
}
|
|
4577
|
-
function
|
|
4584
|
+
function Sa(t, e = ea) {
|
|
4578
4585
|
const a = Number(t);
|
|
4579
|
-
return Number.isFinite(a) ? Math.min(
|
|
4586
|
+
return Number.isFinite(a) ? Math.min(us, Math.max(0, Math.floor(a))) : e;
|
|
4580
4587
|
}
|
|
4581
|
-
function
|
|
4588
|
+
function Ca(t) {
|
|
4582
4589
|
t.key !== "Escape" || !n.dialog || n.dialog.hidden || ht && !ft || at();
|
|
4583
4590
|
}
|
|
4584
|
-
function
|
|
4585
|
-
|
|
4591
|
+
function Aa(t = {}) {
|
|
4592
|
+
Li(t);
|
|
4586
4593
|
const e = Object.prototype.hasOwnProperty.call(t, "kinds");
|
|
4587
|
-
|
|
4588
|
-
...
|
|
4589
|
-
endpoint: String(t.endpoint ||
|
|
4590
|
-
projectKey: t.projectKey == null ?
|
|
4591
|
-
version: t.version == null ?
|
|
4592
|
-
name: t.name == null ?
|
|
4593
|
-
targets: t.targets === void 0 ?
|
|
4594
|
-
hideLauncher: t.hideLauncher == null ?
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4594
|
+
c = {
|
|
4595
|
+
...c,
|
|
4596
|
+
endpoint: String(t.endpoint || c.endpoint || "").replace(/\/$/, ""),
|
|
4597
|
+
projectKey: t.projectKey == null ? c.projectKey : String(t.projectKey),
|
|
4598
|
+
version: t.version == null ? c.version : String(t.version),
|
|
4599
|
+
name: t.name == null ? c.name : String(t.name || ""),
|
|
4600
|
+
targets: t.targets === void 0 ? c.targets : t.targets,
|
|
4601
|
+
hideLauncher: t.hideLauncher == null ? c.hideLauncher : !!t.hideLauncher,
|
|
4602
|
+
launcherCorner: t.launcherCorner === void 0 ? c.launcherCorner : oe(t.launcherCorner) || null,
|
|
4603
|
+
theme: na(t.theme ?? c.theme),
|
|
4604
|
+
video: t.video == null ? c.video : !!t.video,
|
|
4605
|
+
consoleLogLimit: t.consoleLogLimit == null ? c.consoleLogLimit : Sa(t.consoleLogLimit, c.consoleLogLimit),
|
|
4606
|
+
kinds: e ? ss(t.kinds) : c.kinds,
|
|
4607
|
+
kindsCustom: e ? !0 : c.kindsCustom,
|
|
4608
|
+
capture: t.capture === void 0 ? c.capture : t.capture,
|
|
4609
|
+
onBeforeCapture: t.onBeforeCapture === void 0 ? c.onBeforeCapture : t.onBeforeCapture,
|
|
4610
|
+
onOpen: t.onOpen === void 0 ? c.onOpen : t.onOpen,
|
|
4611
|
+
onClose: t.onClose === void 0 ? c.onClose : t.onClose,
|
|
4612
|
+
displayLink: t.displayLink == null ? c.displayLink : !!t.displayLink,
|
|
4613
|
+
locale: t.locale === void 0 ? c.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
|
|
4614
|
+
translations: t.translations === void 0 ? c.translations : t.translations && typeof t.translations == "object" ? t.translations : null
|
|
4607
4615
|
};
|
|
4608
4616
|
}
|
|
4609
|
-
function
|
|
4610
|
-
const e =
|
|
4617
|
+
function za(t) {
|
|
4618
|
+
const e = c[t];
|
|
4611
4619
|
if (typeof e == "function")
|
|
4612
4620
|
try {
|
|
4613
4621
|
e();
|
|
@@ -4615,46 +4623,46 @@ function Aa(t) {
|
|
|
4615
4623
|
console.warn(`Notefully.${t} failed:`, a);
|
|
4616
4624
|
}
|
|
4617
4625
|
}
|
|
4618
|
-
function
|
|
4626
|
+
function qs() {
|
|
4619
4627
|
return mt;
|
|
4620
4628
|
}
|
|
4621
|
-
function
|
|
4629
|
+
function Ws() {
|
|
4622
4630
|
return Et();
|
|
4623
4631
|
}
|
|
4624
|
-
function
|
|
4625
|
-
return
|
|
4632
|
+
function Zs(t, e) {
|
|
4633
|
+
return c.locale = t == null || t === "" ? null : String(t), e !== void 0 && (c.translations = e && typeof e == "object" ? e : null), f ? ut() : ra(), It;
|
|
4626
4634
|
}
|
|
4627
|
-
function
|
|
4628
|
-
return
|
|
4635
|
+
function le(t = {}) {
|
|
4636
|
+
return Aa(t), f && ut(), It;
|
|
4629
4637
|
}
|
|
4630
|
-
function
|
|
4631
|
-
return
|
|
4638
|
+
function Ys(t = {}) {
|
|
4639
|
+
return Aa(t), ae(), ut(), It;
|
|
4632
4640
|
}
|
|
4633
|
-
function
|
|
4634
|
-
return
|
|
4641
|
+
function Xs(t) {
|
|
4642
|
+
return le({ theme: t });
|
|
4635
4643
|
}
|
|
4636
|
-
function
|
|
4644
|
+
function Js(t) {
|
|
4637
4645
|
const e = !!t;
|
|
4638
|
-
return !e && f && n.dialog && !n.dialog.hidden && at(),
|
|
4646
|
+
return !e && f && n.dialog && !n.dialog.hidden && at(), le({ hideLauncher: !e });
|
|
4639
4647
|
}
|
|
4640
|
-
function
|
|
4641
|
-
const t =
|
|
4648
|
+
function Qs() {
|
|
4649
|
+
const t = ba() || ya() || void 0, e = Pi({
|
|
4642
4650
|
...H,
|
|
4643
4651
|
displayName: H.displayName || t
|
|
4644
4652
|
});
|
|
4645
|
-
N =
|
|
4646
|
-
|
|
4653
|
+
N = Qi(e), B = ts(
|
|
4654
|
+
ta.snapshot().slice(-Sa(c.consoleLogLimit))
|
|
4647
4655
|
);
|
|
4648
|
-
const a =
|
|
4656
|
+
const a = va();
|
|
4649
4657
|
a.diagnostics && xt(N, !0), a.logs && B.length && xt(B, !0), Z = !1;
|
|
4650
4658
|
}
|
|
4651
|
-
function
|
|
4652
|
-
Z = !!t, n.privacyPanel && (n.privacyPanel.hidden = !Z), n.privacyStack && (n.privacyStack.dataset.open = String(Z)), n.privacyChange && (n.privacyChange.setAttribute("aria-expanded", Z ? "true" : "false"), n.privacyChange.dataset.active = String(Z)), Z &&
|
|
4659
|
+
function ue(t) {
|
|
4660
|
+
Z = !!t, n.privacyPanel && (n.privacyPanel.hidden = !Z), n.privacyStack && (n.privacyStack.dataset.open = String(Z)), n.privacyChange && (n.privacyChange.setAttribute("aria-expanded", Z ? "true" : "false"), n.privacyChange.dataset.active = String(Z)), Z && de();
|
|
4653
4661
|
}
|
|
4654
|
-
function
|
|
4662
|
+
function ce() {
|
|
4655
4663
|
if (!n.privacy || !n.privacyText || !n.privacyChange)
|
|
4656
4664
|
return;
|
|
4657
|
-
const t =
|
|
4665
|
+
const t = as({
|
|
4658
4666
|
diagnostics: N,
|
|
4659
4667
|
logs: B
|
|
4660
4668
|
});
|
|
@@ -4662,7 +4670,7 @@ function ue() {
|
|
|
4662
4670
|
const e = N.length === 0 && B.length === 0;
|
|
4663
4671
|
n.privacySummary && (n.privacySummary.hidden = e), n.privacy.hidden = e, n.privacyChange.hidden = !1;
|
|
4664
4672
|
}
|
|
4665
|
-
function
|
|
4673
|
+
function Ea(t, e, a) {
|
|
4666
4674
|
const i = `${p(t ? "privacy.included" : "privacy.redacted")} ${a}`;
|
|
4667
4675
|
return `<label class="pill-switch nf-privacy-toggle" data-included="${t ? "true" : "false"}">
|
|
4668
4676
|
<input type="checkbox" class="pill-switch-input" role="switch" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${D(i)}" aria-checked="${t ? "true" : "false"}">
|
|
@@ -4672,56 +4680,56 @@ function za(t, e, a) {
|
|
|
4672
4680
|
</span>
|
|
4673
4681
|
</label>`;
|
|
4674
4682
|
}
|
|
4675
|
-
function
|
|
4676
|
-
const r =
|
|
4683
|
+
function Me(t, e, a, o, i, s = null) {
|
|
4684
|
+
const r = Ea(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), u = i ? D(l) : s ?? D(l), d = l ? `${a}: ${l}` : a;
|
|
4677
4685
|
return `<div class="nf-privacy-row" data-kind="${D(t)}" data-id="${D(e)}"${i ? ' data-redacted="true"' : ""}>
|
|
4678
4686
|
${r}
|
|
4679
|
-
<div class="nf-privacy-row-text"${i ? ` title="${D(
|
|
4687
|
+
<div class="nf-privacy-row-text"${i ? ` title="${D(d)}"` : ""}>
|
|
4680
4688
|
<span class="nf-privacy-row-title">${D(a)}</span>
|
|
4681
4689
|
<span class="nf-privacy-row-detail">${u}</span>
|
|
4682
4690
|
</div>
|
|
4683
4691
|
</div>`;
|
|
4684
4692
|
}
|
|
4685
|
-
function
|
|
4693
|
+
function De(t, e, a, o) {
|
|
4686
4694
|
if (!a.length)
|
|
4687
4695
|
return "";
|
|
4688
|
-
const i =
|
|
4696
|
+
const i = es(a), s = !i.checked && !i.indeterminate;
|
|
4689
4697
|
return `<section class="nf-privacy-section" data-section="${D(t)}"${s ? ' data-redacted="true"' : ""}>
|
|
4690
4698
|
<div class="nf-privacy-section-head">
|
|
4691
|
-
${
|
|
4699
|
+
${Ea(i.checked, i.indeterminate, e)}
|
|
4692
4700
|
<h3 class="nf-privacy-section-title">${D(e)}</h3>
|
|
4693
4701
|
</div>
|
|
4694
4702
|
<div class="nf-privacy-rows"${s ? " hidden" : ""}>${o}</div>
|
|
4695
4703
|
</section>`;
|
|
4696
4704
|
}
|
|
4697
|
-
function
|
|
4705
|
+
function de() {
|
|
4698
4706
|
if (!n.privacyScroll)
|
|
4699
4707
|
return;
|
|
4700
|
-
const t = N.map((a) =>
|
|
4708
|
+
const t = N.map((a) => Me(
|
|
4701
4709
|
"diagnostic",
|
|
4702
4710
|
a.key,
|
|
4703
4711
|
a.label,
|
|
4704
|
-
|
|
4712
|
+
os(a.value),
|
|
4705
4713
|
a.redacted
|
|
4706
4714
|
)).join(""), e = B.map((a) => {
|
|
4707
|
-
const o =
|
|
4708
|
-
return
|
|
4715
|
+
const o = Mi(a);
|
|
4716
|
+
return Me(
|
|
4709
4717
|
"log",
|
|
4710
4718
|
a.id,
|
|
4711
4719
|
a.level,
|
|
4712
4720
|
o,
|
|
4713
4721
|
a.redacted,
|
|
4714
|
-
a.redacted ? null :
|
|
4722
|
+
a.redacted ? null : Di(a)
|
|
4715
4723
|
);
|
|
4716
4724
|
}).join("");
|
|
4717
4725
|
n.privacyScroll.innerHTML = [
|
|
4718
|
-
|
|
4719
|
-
B.length ?
|
|
4726
|
+
De("diagnostics", p("privacy.section.diagnostics"), N, t),
|
|
4727
|
+
B.length ? De("logs", p("privacy.section.logs"), B, e) : ""
|
|
4720
4728
|
].join(""), n.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
|
|
4721
4729
|
a.indeterminate = !0, a.removeAttribute("data-indeterminate");
|
|
4722
|
-
}),
|
|
4730
|
+
}), ce();
|
|
4723
4731
|
}
|
|
4724
|
-
function
|
|
4732
|
+
function tn(t) {
|
|
4725
4733
|
const e = t.target;
|
|
4726
4734
|
if (!(e instanceof HTMLInputElement) || e.type !== "checkbox")
|
|
4727
4735
|
return;
|
|
@@ -4737,36 +4745,36 @@ function Js(t) {
|
|
|
4737
4745
|
}
|
|
4738
4746
|
} else if (a) {
|
|
4739
4747
|
const s = a.dataset.section;
|
|
4740
|
-
s === "diagnostics" ? (xt(N, i),
|
|
4748
|
+
s === "diagnostics" ? (xt(N, i), Fe({ diagnostics: i })) : s === "logs" && (xt(B, i), Fe({ logs: i }));
|
|
4741
4749
|
} else
|
|
4742
4750
|
return;
|
|
4743
|
-
|
|
4751
|
+
de();
|
|
4744
4752
|
}
|
|
4745
|
-
async function
|
|
4746
|
-
ae(), mt || (mt = !0,
|
|
4753
|
+
async function Ra() {
|
|
4754
|
+
ae(), mt || (mt = !0, za("onOpen")), ja(), ut(), n.launcher.hidden = !0, C = ee(), pt = { w: 0, h: 0 }, G = null, q = "", lt = "", I = null, R = null, E = null, _ = zs(), se(_), yt(null), vt(!1), n.text.value = "", wa(), S(""), Qs();
|
|
4747
4755
|
try {
|
|
4748
|
-
|
|
4756
|
+
fa(await Ze(ha())), S("");
|
|
4749
4757
|
} catch (e) {
|
|
4750
4758
|
q = "", S((e == null ? void 0 : e.message) || p("status.screenshotFailed"));
|
|
4751
4759
|
}
|
|
4752
|
-
wt(),
|
|
4760
|
+
wt(), ue(!1), ce(), n.dialog.hidden = !1, ot(), n.text.focus();
|
|
4753
4761
|
}
|
|
4754
4762
|
function at() {
|
|
4755
4763
|
if (!f)
|
|
4756
4764
|
return;
|
|
4757
4765
|
const t = mt;
|
|
4758
|
-
W == null || W.stop(), vt(!1), et && ($ == null || $.stop()), dt(!1),
|
|
4766
|
+
W == null || W.stop(), vt(!1), et && ($ == null || $.stop()), dt(!1), ga(), R = null, E = null, re(!1), ja(), ue(!1), n.dialog.hidden = !0, n.stop.hidden = !0, Lt(), t && (mt = !1, za("onClose"));
|
|
4759
4767
|
}
|
|
4760
|
-
function
|
|
4761
|
-
const e = n.dialog, a = n.panel, o = n.panelBody, i = n.successMsg, s = n.successLink, r = String(t || "").trim(), l = !!(
|
|
4768
|
+
function en(t = "") {
|
|
4769
|
+
const e = n.dialog, a = n.panel, o = n.panelBody, i = n.successMsg, s = n.successLink, r = String(t || "").trim(), l = !!(c.displayLink && r);
|
|
4762
4770
|
if (!e || !a || !o || !i)
|
|
4763
4771
|
return Promise.resolve(!1);
|
|
4764
4772
|
ht = !0, ft = l, S("");
|
|
4765
|
-
const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches,
|
|
4773
|
+
const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, d = a.getBoundingClientRect();
|
|
4766
4774
|
if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", s && (l ? (s.hidden = !1, s.href = r) : (s.hidden = !0, s.removeAttribute("href"))), l) {
|
|
4767
4775
|
if (u)
|
|
4768
4776
|
return Promise.resolve(!0);
|
|
4769
|
-
const w = a.getBoundingClientRect(), b = w.width > 0 ?
|
|
4777
|
+
const w = a.getBoundingClientRect(), b = w.width > 0 ? d.width / w.width : 1, z = w.height > 0 ? d.height / w.height : 1;
|
|
4770
4778
|
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${b}, ${z})`, a.getBoundingClientRect(), new Promise((j) => {
|
|
4771
4779
|
let T = !1;
|
|
4772
4780
|
const K = () => {
|
|
@@ -4783,7 +4791,7 @@ function Qs(t = "") {
|
|
|
4783
4791
|
return new Promise((w) => {
|
|
4784
4792
|
window.setTimeout(() => w(!1), 1e3);
|
|
4785
4793
|
});
|
|
4786
|
-
const g = a.getBoundingClientRect(), k = g.width > 0 ?
|
|
4794
|
+
const g = a.getBoundingClientRect(), k = g.width > 0 ? d.width / g.width : 1, v = g.height > 0 ? d.height / g.height : 1;
|
|
4787
4795
|
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${k}, ${v})`, a.getBoundingClientRect(), new Promise((w) => {
|
|
4788
4796
|
let b = !1;
|
|
4789
4797
|
const z = () => {
|
|
@@ -4798,24 +4806,24 @@ function Qs(t = "") {
|
|
|
4798
4806
|
}), window.setTimeout(z, 700);
|
|
4799
4807
|
});
|
|
4800
4808
|
}
|
|
4801
|
-
function
|
|
4809
|
+
function ja() {
|
|
4802
4810
|
ht = !1, ft = !1, n.dialog && (n.dialog.classList.remove("nf-success", "nf-success-sticky"), n.dialog.style.opacity = "", n.dialog.style.transition = "", n.panel && (n.panel.style.transform = "", n.panel.style.transition = "", n.panel.style.transformOrigin = ""), n.panelBody && (n.panelBody.hidden = !1), n.successMsg && (n.successMsg.hidden = !0), n.successLink && (n.successLink.hidden = !0, n.successLink.removeAttribute("href")));
|
|
4803
4811
|
}
|
|
4804
|
-
function
|
|
4805
|
-
H = { ...H, ...
|
|
4812
|
+
function an(t = {}) {
|
|
4813
|
+
H = { ...H, ...xi(t) }, wa();
|
|
4806
4814
|
}
|
|
4807
|
-
async function
|
|
4815
|
+
async function Pa() {
|
|
4808
4816
|
var e, a;
|
|
4809
4817
|
if (ae(), Kt)
|
|
4810
4818
|
return null;
|
|
4811
4819
|
const t = n.text.value.trim();
|
|
4812
4820
|
if (!t && !V() && !G)
|
|
4813
4821
|
return S(p("status.emptyReport")), null;
|
|
4814
|
-
if (!
|
|
4822
|
+
if (!c.endpoint || !c.projectKey)
|
|
4815
4823
|
return S(p("status.missingConfig")), null;
|
|
4816
|
-
Kt = !0,
|
|
4824
|
+
Kt = !0, Oe(!0), S(p("status.submitting"), !0);
|
|
4817
4825
|
try {
|
|
4818
|
-
const o =
|
|
4826
|
+
const o = _s(), i = C.crop(), s = C.list(), r = C.isCropped(), l = r ? Ki(s, i) : s, u = r ? { x: 0, y: 0, w: 1, h: 1 } : i, d = is({
|
|
4819
4827
|
author: o,
|
|
4820
4828
|
diagnostics: N,
|
|
4821
4829
|
logs: B
|
|
@@ -4825,7 +4833,7 @@ async function ja() {
|
|
|
4825
4833
|
dpr: window.devicePixelRatio || 1
|
|
4826
4834
|
}, k = [];
|
|
4827
4835
|
let v = 2048, w = null, b = null;
|
|
4828
|
-
V() && (b = await
|
|
4836
|
+
V() && (b = await Re(q, {
|
|
4829
4837
|
crop: r ? i : { x: 0, y: 0, w: 1, h: 1 },
|
|
4830
4838
|
maxEdge: v
|
|
4831
4839
|
}));
|
|
@@ -4840,7 +4848,7 @@ async function ja() {
|
|
|
4840
4848
|
mime: b.mime,
|
|
4841
4849
|
attempt: z
|
|
4842
4850
|
}, K = {
|
|
4843
|
-
...
|
|
4851
|
+
...d,
|
|
4844
4852
|
screen: g,
|
|
4845
4853
|
screenshotMeta: T
|
|
4846
4854
|
};
|
|
@@ -4849,12 +4857,12 @@ async function ja() {
|
|
|
4849
4857
|
attempts: [...k]
|
|
4850
4858
|
});
|
|
4851
4859
|
const P = new FormData();
|
|
4852
|
-
P.append("message", t), P.append("kind", _), P.append("version",
|
|
4860
|
+
P.append("message", t), P.append("kind", _), P.append("version", c.version || "0.0.0"), P.append("author", o), c.name && P.append("name", c.name), P.append("context", JSON.stringify(K)), P.append("annotations", JSON.stringify(l)), P.append("crop", JSON.stringify(u)), Array.isArray(c.targets) && P.append("targets", JSON.stringify(c.targets)), !j && b && P.append("screenshot", b.blob, `screenshot.${b.ext}`), G && P.append("recording", G, "recording.webm");
|
|
4853
4861
|
try {
|
|
4854
|
-
const m = await fetch(`${
|
|
4862
|
+
const m = await fetch(`${c.endpoint}/v1/reports`, {
|
|
4855
4863
|
method: "POST",
|
|
4856
4864
|
headers: {
|
|
4857
|
-
"X-Notefully-Key":
|
|
4865
|
+
"X-Notefully-Key": c.projectKey
|
|
4858
4866
|
},
|
|
4859
4867
|
body: P
|
|
4860
4868
|
});
|
|
@@ -4868,7 +4876,7 @@ async function ja() {
|
|
|
4868
4876
|
const ct = new Error((A == null ? void 0 : A.error) || `${p("status.submitFailed")} (${m.status})`);
|
|
4869
4877
|
throw ct.status = m.status, ct.code = A == null ? void 0 : A.code, ct.json = A, ct;
|
|
4870
4878
|
}
|
|
4871
|
-
return j && V() && S(p("status.submitWithoutImage"), !0), await
|
|
4879
|
+
return j && V() && S(p("status.submitWithoutImage"), !0), await en((A == null ? void 0 : A.trackerUrl) || "") || at(), A;
|
|
4872
4880
|
} catch (m) {
|
|
4873
4881
|
if (w = m, k.push({
|
|
4874
4882
|
attempt: z,
|
|
@@ -4878,10 +4886,10 @@ async function ja() {
|
|
|
4878
4886
|
message: String((m == null ? void 0 : m.message) || m)
|
|
4879
4887
|
}), j || !b)
|
|
4880
4888
|
throw S(((e = m == null ? void 0 : m.json) == null ? void 0 : e.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
|
|
4881
|
-
if (!
|
|
4889
|
+
if (!Zi(m, (m == null ? void 0 : m.json) || null))
|
|
4882
4890
|
throw S(((a = m == null ? void 0 : m.json) == null ? void 0 : a.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
|
|
4883
4891
|
if (z === 1) {
|
|
4884
|
-
S(p("status.submitTooLarge"), !0), v =
|
|
4892
|
+
S(p("status.submitTooLarge"), !0), v = Wi(v), b = await Re(q, {
|
|
4885
4893
|
crop: r ? i : { x: 0, y: 0, w: 1, h: 1 },
|
|
4886
4894
|
maxEdge: v
|
|
4887
4895
|
});
|
|
@@ -4892,42 +4900,42 @@ async function ja() {
|
|
|
4892
4900
|
}
|
|
4893
4901
|
throw w || new Error(p("status.submitFailed"));
|
|
4894
4902
|
} finally {
|
|
4895
|
-
Kt = !1,
|
|
4903
|
+
Kt = !1, Oe(!1);
|
|
4896
4904
|
}
|
|
4897
4905
|
}
|
|
4898
|
-
function
|
|
4906
|
+
function Oe(t) {
|
|
4899
4907
|
n.submit && (n.submit.disabled = !!t, n.submit.setAttribute("aria-busy", t ? "true" : "false"));
|
|
4900
4908
|
}
|
|
4901
|
-
function
|
|
4902
|
-
at(), document.removeEventListener("keydown",
|
|
4909
|
+
function on() {
|
|
4910
|
+
at(), document.removeEventListener("keydown", Ca), f == null || f.remove(), f = null, n = {};
|
|
4903
4911
|
}
|
|
4904
4912
|
const It = {
|
|
4905
|
-
init:
|
|
4906
|
-
configure:
|
|
4907
|
-
setTheme:
|
|
4908
|
-
setVisible:
|
|
4909
|
-
open:
|
|
4913
|
+
init: Ys,
|
|
4914
|
+
configure: le,
|
|
4915
|
+
setTheme: Xs,
|
|
4916
|
+
setVisible: Js,
|
|
4917
|
+
open: Ra,
|
|
4910
4918
|
close: at,
|
|
4911
|
-
isOpen:
|
|
4912
|
-
getLocale:
|
|
4913
|
-
setLocale:
|
|
4914
|
-
identify:
|
|
4915
|
-
submit:
|
|
4916
|
-
destroy:
|
|
4919
|
+
isOpen: qs,
|
|
4920
|
+
getLocale: Ws,
|
|
4921
|
+
setLocale: Zs,
|
|
4922
|
+
identify: an,
|
|
4923
|
+
submit: Pa,
|
|
4924
|
+
destroy: on
|
|
4917
4925
|
};
|
|
4918
4926
|
typeof window < "u" && (window.Notefully = It);
|
|
4919
4927
|
export {
|
|
4920
4928
|
at as close,
|
|
4921
|
-
|
|
4929
|
+
le as configure,
|
|
4922
4930
|
It as default,
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4931
|
+
on as destroy,
|
|
4932
|
+
Ws as getLocaleTag,
|
|
4933
|
+
an as identify,
|
|
4934
|
+
Ys as init,
|
|
4935
|
+
qs as isOpen,
|
|
4936
|
+
Ra as open,
|
|
4937
|
+
Zs as setLocale,
|
|
4938
|
+
Xs as setTheme,
|
|
4939
|
+
Js as setVisible,
|
|
4940
|
+
Pa as submit
|
|
4933
4941
|
};
|