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