@instructure/platform-notebook 1.10.3 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,107 +1,111 @@
1
- import { jsx as i, jsxs as T, Fragment as Xe } from "react/jsx-runtime";
2
- import { createContext as Ve, useMemo as he, useContext as Qe, useReducer as Ye, useRef as F, useEffect as W, useState as G, useCallback as K } from "react";
3
- import { createPortal as ht } from "react-dom";
4
- import { z as f } from "zod";
5
- import pt from "diff-match-patch";
6
- import { useQueryClient as ke, useMutation as Oe, useQuery as yt } from "@tanstack/react-query";
7
- import { CloseButton as Nt, Button as ne, IconButton as me } from "@instructure/ui-buttons/v11_7";
8
- import { Flex as x } from "@instructure/ui-flex/v11_7";
9
- import { Heading as Se } from "@instructure/ui-heading/v11_7";
1
+ import { jsx as i, jsxs as S, Fragment as Xe } from "react/jsx-runtime";
2
+ import { createContext as Ve, useMemo as pe, useContext as Qe, useReducer as Ye, useRef as F, useEffect as q, useState as W, useCallback as K } from "react";
3
+ import { createPortal as pt } from "react-dom";
4
+ import { z as d } from "zod";
5
+ import yt from "diff-match-patch";
6
+ import { useQueryClient as Oe, useMutation as Le, useQuery as Nt } from "@tanstack/react-query";
7
+ import { CloseButton as bt, Button as ne, IconButton as ge } from "@instructure/ui-buttons/v11_7";
8
+ import { Flex as C } from "@instructure/ui-flex/v11_7";
9
+ import { Heading as ve } from "@instructure/ui-heading/v11_7";
10
10
  import { Tray as Et } from "@instructure/ui-tray/v11_7";
11
11
  import { View as V } from "@instructure/ui-view/v11_7";
12
- import { IconQuestionLine as Le, IconPinLine as Ae, IconWarningLine as bt, IconNoteLine as Tt, IconEditLine as Re, IconTrashLine as Te, IconArrowStartLine as St } from "@instructure/ui-icons";
13
- import { Menu as ue } from "@instructure/ui-menu/v11_7";
14
- import { TruncateText as be } from "@instructure/ui-truncate-text/v11_7";
12
+ import { IconQuestionLine as Ae, IconPinLine as De, IconWarningLine as St, NotebookInstUIIcon as Tt, IconEditLine as we, IconTrashLine as Te, IconArrowStartLine as vt } from "@instructure/ui-icons";
13
+ import { Menu as fe } from "@instructure/ui-menu/v11_7";
14
+ import { TruncateText as Se } from "@instructure/ui-truncate-text/v11_7";
15
15
  import { SimpleSelect as He } from "@instructure/ui-simple-select/v11_7";
16
- import { Text as te } from "@instructure/ui-text/v11_7";
17
- import { ScreenReaderContent as pe } from "@instructure/ui-a11y-content";
18
- import { Dialog as Ct } from "@instructure/ui-dialog";
16
+ import { Text as Z } from "@instructure/ui-text/v11_7";
17
+ import { ScreenReaderContent as ye } from "@instructure/ui-a11y-content";
18
+ import { Dialog as It } from "@instructure/ui-dialog";
19
19
  import { TextArea as Ze } from "@instructure/ui-text-area/v11_7";
20
- import { Pill as Ue } from "@instructure/ui-pill/v11_7";
21
- import { Pagination as vt } from "@instructure/ui-pagination/v11_7";
22
- import { Spinner as It } from "@instructure/ui-spinner/v11_7";
23
- const xt = f.object({
24
- startContainer: f.string(),
25
- endContainer: f.string(),
26
- startOffset: f.number(),
27
- endOffset: f.number()
28
- }), Rt = f.object({
29
- start: f.number(),
30
- end: f.number()
31
- }), De = f.object({
32
- selectedText: f.string(),
33
- hasNoHighlightAnymore: f.boolean().optional(),
34
- textPosition: Rt.nullable(),
35
- range: xt.nullable(),
36
- pageLastModifiedAt: f.string()
20
+ import { Pill as $e } from "@instructure/ui-pill/v11_7";
21
+ import { Pagination as Ct } from "@instructure/ui-pagination/v11_7";
22
+ import { Spinner as xt } from "@instructure/ui-spinner/v11_7";
23
+ const Rt = d.object({
24
+ startContainer: d.string(),
25
+ endContainer: d.string(),
26
+ startOffset: d.number(),
27
+ endOffset: d.number()
28
+ }), wt = d.object({
29
+ start: d.number(),
30
+ end: d.number()
31
+ }), Pe = d.object({
32
+ selectedText: d.string(),
33
+ hasNoHighlightAnymore: d.boolean().optional(),
34
+ textPosition: wt.nullable(),
35
+ range: Rt.nullable(),
36
+ pageLastModifiedAt: d.string()
37
37
  });
38
- var k = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(k || {});
39
- const Pe = f.enum([
38
+ var L = /* @__PURE__ */ ((t) => (t.IMPORTANT = "Important", t.CONFUSING = "Confusing", t))(L || {});
39
+ const _e = d.enum([
40
40
  "Important",
41
41
  "Confusing"
42
42
  /* CONFUSING */
43
- ]), wt = f.object({
44
- totalCount: f.number().nullish(),
45
- totalNrOfPages: f.number().nullish()
46
- }), Ce = f.object({
47
- id: f.string(),
48
- rootAccountUuid: f.string(),
49
- userId: f.string(),
50
- courseId: f.string(),
51
- objectId: f.string(),
52
- objectType: f.string(),
53
- userText: f.string().optional(),
54
- reaction: f.array(Pe),
55
- highlightData: De,
56
- createdAt: f.string(),
57
- updatedAt: f.string()
58
- }), kt = f.object({
59
- cursor: f.string(),
60
- node: Ce
43
+ ]), kt = d.object({
44
+ totalCount: d.number().nullish(),
45
+ totalNrOfPages: d.number().nullish()
46
+ }), Ie = d.object({
47
+ id: d.string(),
48
+ rootAccountUuid: d.string(),
49
+ userId: d.string(),
50
+ courseId: d.string(),
51
+ objectId: d.string(),
52
+ objectType: d.string(),
53
+ userText: d.string().optional(),
54
+ reaction: d.array(_e),
55
+ highlightData: Pe,
56
+ // Set by the host when the note's highlight is gone specifically because its source
57
+ // (the page/assignment/quiz it was captured from) was unpublished or deleted, as opposed
58
+ // to the note never having had a highlight. Selects the HighlightError reason in NoteCard.
59
+ highlightSourceUnavailable: d.boolean().optional(),
60
+ createdAt: d.string(),
61
+ updatedAt: d.string()
62
+ }), Ot = d.object({
63
+ cursor: d.string(),
64
+ node: Ie
61
65
  });
62
- f.object({
63
- notes: f.object({
64
- edges: f.array(kt),
65
- nodes: f.array(Ce),
66
- pageInfo: wt
66
+ d.object({
67
+ notes: d.object({
68
+ edges: d.array(Ot),
69
+ nodes: d.array(Ie),
70
+ pageInfo: kt
67
71
  })
68
72
  });
69
- const Ot = f.object({
70
- type: f.string(),
71
- id: f.string()
72
- }), Lt = f.object({
73
- courseId: f.string().optional(),
74
- learningObject: Ot.optional(),
75
- reactions: f.array(f.string()).optional()
73
+ const Lt = d.object({
74
+ type: d.string(),
75
+ id: d.string()
76
+ }), At = d.object({
77
+ courseId: d.string().optional(),
78
+ learningObject: Lt.optional(),
79
+ reactions: d.array(d.string()).optional()
76
80
  }).optional();
77
- f.object({
78
- courseId: f.string().optional(),
79
- filter: Lt,
80
- offset: f.number().optional(),
81
- pageSize: f.number().optional()
81
+ d.object({
82
+ courseId: d.string().optional(),
83
+ filter: At,
84
+ offset: d.number().optional(),
85
+ pageSize: d.number().optional()
82
86
  });
83
- f.object({
84
- courseId: f.string(),
85
- objectId: f.string(),
86
- objectType: f.string(),
87
- userText: f.string().optional(),
88
- reaction: f.array(Pe),
89
- highlightData: De
87
+ d.object({
88
+ courseId: d.string(),
89
+ objectId: d.string(),
90
+ objectType: d.string(),
91
+ userText: d.string().optional(),
92
+ reaction: d.array(_e),
93
+ highlightData: Pe
90
94
  });
91
- f.object({
92
- createNote: Ce
95
+ d.object({
96
+ createNote: Ie
93
97
  });
94
- f.object({
95
- id: f.string(),
96
- userText: f.string().optional(),
97
- reaction: f.array(Pe),
98
- highlightData: De
98
+ d.object({
99
+ id: d.string(),
100
+ userText: d.string().optional(),
101
+ reaction: d.array(_e),
102
+ highlightData: Pe
99
103
  });
100
- f.object({
101
- updateNote: Ce
104
+ d.object({
105
+ updateNote: Ie
102
106
  });
103
- f.object({
104
- deleteNote: f.string()
107
+ d.object({
108
+ deleteNote: d.string()
105
109
  });
106
110
  var Je = /* @__PURE__ */ ((t) => (t[t.FORWARDS = 1] = "FORWARDS", t[t.BACKWARDS = 2] = "BACKWARDS", t))(Je || {});
107
111
  class oe {
@@ -200,18 +204,18 @@ class X {
200
204
  return new X(n, o);
201
205
  }
202
206
  }
203
- const At = (t) => {
207
+ const Dt = (t) => {
204
208
  const e = t.nodeName.toLowerCase();
205
209
  return e === "#text" ? "text()" : e;
206
210
  };
207
- function Dt(t) {
211
+ function Pt(t) {
208
212
  let e = 0, n = t;
209
213
  for (; n; )
210
214
  n.nodeName === t.nodeName && (e += 1), n = n.previousSibling;
211
215
  return e;
212
216
  }
213
- const Pt = (t) => {
214
- const e = At(t), n = Dt(t);
217
+ const _t = (t) => {
218
+ const e = Dt(t), n = Pt(t);
215
219
  return `${e}[${n}]`;
216
220
  }, Ge = (t, e) => {
217
221
  let n = "", o = t;
@@ -220,10 +224,10 @@ const Pt = (t) => {
220
224
  console.error("Node is not a descendant of root");
221
225
  return;
222
226
  }
223
- n = `${Pt(o)}/${n}`, o = o.parentNode;
227
+ n = `${_t(o)}/${n}`, o = o.parentNode;
224
228
  }
225
229
  return n = `/${n}`, n = n.replace(/\/$/, ""), n;
226
- }, _t = (t, e, n) => {
230
+ }, Ft = (t, e, n) => {
227
231
  const o = e.toUpperCase();
228
232
  let r = -1;
229
233
  for (let s = 0; s < t.children.length; s++) {
@@ -232,7 +236,7 @@ const Pt = (t) => {
232
236
  return l;
233
237
  }
234
238
  return null;
235
- }, Ft = (t, e) => {
239
+ }, Mt = (t, e) => {
236
240
  if (!(t.match(/^(\/[A-Za-z0-9-]+(\[[0-9]+])?)+$/) !== null))
237
241
  return console.error("Expression is not a simple XPath"), null;
238
242
  const o = t.split("/");
@@ -243,32 +247,32 @@ const Pt = (t) => {
243
247
  const m = s.indexOf("[");
244
248
  if (m !== -1) {
245
249
  l = s.slice(0, m);
246
- const p = s.slice(m + 1, s.indexOf("]"));
247
- if (a = Number.parseInt(p, 10) - 1, a < 0)
250
+ const f = s.slice(m + 1, s.indexOf("]"));
251
+ if (a = Number.parseInt(f, 10) - 1, a < 0)
248
252
  return null;
249
253
  } else
250
254
  l = s, a = 0;
251
- const c = _t(r, l, a);
252
- if (!c)
255
+ const u = Ft(r, l, a);
256
+ if (!u)
253
257
  return null;
254
- r = c;
258
+ r = u;
255
259
  }
256
260
  return r;
257
261
  }, je = (t, e = document.body) => {
258
262
  if (t === "")
259
263
  return e;
260
264
  try {
261
- return Ft(t, e);
265
+ return Mt(t, e);
262
266
  } catch {
263
267
  return document.evaluate(`.${t}`, e, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
264
268
  }
265
269
  };
266
- class ae {
270
+ class ce {
267
271
  constructor(e, n) {
268
272
  this.root = e, this.range = n;
269
273
  }
270
274
  static fromRange(e, n) {
271
- return new ae(e, n);
275
+ return new ce(e, n);
272
276
  }
273
277
  static fromSelector(e, n) {
274
278
  if ((n == null ? void 0 : n.startContainer) == null || (n == null ? void 0 : n.endContainer) == null)
@@ -283,7 +287,7 @@ class ae {
283
287
  if (!s || !l)
284
288
  return null;
285
289
  const a = new oe(s, l).toRange();
286
- return a ? !e.contains(a.startContainer) || !e.contains(a.endContainer) ? (console.error("Resolved range escapes root"), null) : new ae(e, a) : null;
290
+ return a ? !e.contains(a.startContainer) || !e.contains(a.endContainer) ? (console.error("Resolved range escapes root"), null) : new ce(e, a) : null;
287
291
  }
288
292
  toRange() {
289
293
  return this.range;
@@ -299,17 +303,17 @@ class ae {
299
303
  };
300
304
  }
301
305
  }
302
- class ie {
306
+ class le {
303
307
  constructor(e, n, o) {
304
308
  this.root = e, this.start = n, this.end = o;
305
309
  }
306
310
  static fromRange(e, n) {
307
311
  var r;
308
312
  const o = (r = oe.fromRange(n)) == null ? void 0 : r.relativeTo(e);
309
- return o ? new ie(e, o.start.offset, o.end.offset) : null;
313
+ return o ? new le(e, o.start.offset, o.end.offset) : null;
310
314
  }
311
315
  static fromSelector(e, n) {
312
- return new ie(e, n.start, n.end);
316
+ return new le(e, n.start, n.end);
313
317
  }
314
318
  toSelector() {
315
319
  return {
@@ -344,63 +348,63 @@ const et = (t) => {
344
348
  for (; n !== void 0 && l && a === n; )
345
349
  r.push({ node: l, offset: l.data.length }), n = e.shift();
346
350
  return n !== void 0 && console.error("Offset exceeds text length"), r;
347
- }, Mt = (t, e, n, o) => {
351
+ }, Bt = (t, e, n, o) => {
348
352
  const r = n - e;
349
- return Math.abs(r - o) <= 5 ? ie.fromSelector(t, {
353
+ return Math.abs(r - o) <= 5 ? le.fromSelector(t, {
350
354
  start: e,
351
355
  end: n
352
356
  }) : null;
353
- }, Bt = (t, e, n, o) => {
354
- const r = new pt();
357
+ }, Ut = (t, e, n, o) => {
358
+ const r = new yt();
355
359
  r.Match_Distance = 5e3;
356
360
  const s = t.textContent;
357
361
  if (!s)
358
362
  return null;
359
363
  if (e.length > 32) {
360
364
  const l = e.slice(0, 32), a = e.slice(-32), m = o - n;
361
- let c = r.match_main(s, l, n);
362
- const p = r.match_main(s, a, o), d = p + a.length;
363
- if (c === -1 || p === -1)
365
+ let u = r.match_main(s, l, n);
366
+ const f = r.match_main(s, a, o), c = f + a.length;
367
+ if (u === -1 || f === -1)
364
368
  return null;
365
- const h = d - c, E = Math.abs(h - m);
366
- if ((c > d || E > 5) && (r.Match_Distance = e.length + 100, c = r.match_main(s, l, d), c !== -1 && c < d))
367
- return Mt(t, c, d, m);
368
- if (c < d && E <= 5)
369
- return ie.fromSelector(t, {
370
- start: c,
371
- end: d
369
+ const h = c - u, N = Math.abs(h - m);
370
+ if ((u > c || N > 5) && (r.Match_Distance = e.length + 100, u = r.match_main(s, l, c), u !== -1 && u < c))
371
+ return Bt(t, u, c, m);
372
+ if (u < c && N <= 5)
373
+ return le.fromSelector(t, {
374
+ start: u,
375
+ end: c
372
376
  });
373
377
  } else {
374
378
  const l = r.match_main(s, e, n);
375
379
  if (l !== -1)
376
- return ie.fromSelector(t, {
380
+ return le.fromSelector(t, {
377
381
  start: l,
378
382
  end: l + e.length
379
383
  });
380
384
  }
381
385
  return null;
382
- }, $t = (t, e) => {
386
+ }, Ht = (t, e) => {
383
387
  if (!e) return null;
384
388
  const { highlightData: n } = t, { textPosition: o, selectedText: r } = n;
385
- return Bt(
389
+ return Ut(
386
390
  e,
387
391
  r,
388
392
  (o == null ? void 0 : o.start) ?? 0,
389
393
  (o == null ? void 0 : o.end) ?? 0
390
394
  );
391
- }, Ht = (t, e, n) => {
395
+ }, $t = (t, e, n) => {
392
396
  const o = [], r = [];
393
397
  for (const s of e) {
394
- const l = $t(s, t);
398
+ const l = Ht(s, t);
395
399
  if (l) {
396
- const a = l.toRange(), m = a && ae.fromRange(t, a), c = (a == null ? void 0 : a.toString().trim()) || s.highlightData.selectedText;
400
+ const a = l.toRange(), m = a && ce.fromRange(t, a), u = (a == null ? void 0 : a.toString().trim()) || s.highlightData.selectedText;
397
401
  o.push({
398
402
  id: s.id,
399
403
  reaction: s.reaction,
400
404
  userText: s.userText,
401
405
  highlightData: {
402
406
  ...s.highlightData,
403
- selectedText: c,
407
+ selectedText: u,
404
408
  hasNoHighlightAnymore: !1,
405
409
  range: (m == null ? void 0 : m.toSelector()) ?? null,
406
410
  textPosition: l.toSelector(),
@@ -424,59 +428,59 @@ const et = (t) => {
424
428
  var l;
425
429
  if (!e) return;
426
430
  const { highlightData: n, id: o } = t, { range: r } = n ?? {};
427
- r && ((l = ae.fromSelector(e, r)) == null ? void 0 : l.toRange()) && Jt({ id: o });
428
- }, Ut = (t) => {
431
+ r && ((l = ce.fromSelector(e, r)) == null ? void 0 : l.toRange()) && en({ id: o });
432
+ }, Gt = (t) => {
429
433
  const n = document.querySelector(
430
434
  `[data-highlight-id="${CSS.escape(t)}"].highlight-content`
431
- ) ?? document.getElementById(ve(t));
435
+ ) ?? document.getElementById(Ce(t));
432
436
  if (n) {
433
437
  const o = n.getBoundingClientRect();
434
438
  o.top >= 0 && o.bottom <= (window.innerHeight || document.documentElement.clientHeight) || n.scrollIntoView({ behavior: "smooth", block: "center" });
435
439
  }
436
- }, ye = 90, Ne = 172, Gt = (t) => {
440
+ }, Ne = 90, be = 172, jt = (t) => {
437
441
  const e = t.getClientRects();
438
442
  if (!e.length)
439
443
  return null;
440
- const n = e[0], o = e[e.length - 1], r = 4, s = 16, l = window.innerWidth || document.documentElement.clientWidth, a = window.innerHeight || document.documentElement.clientHeight, m = (y) => {
441
- const b = y + Ne;
442
- return y >= s && b <= l - s;
443
- }, c = (y) => {
444
- const b = y + ye;
445
- return y >= s && b <= a - s;
444
+ const n = e[0], o = e[e.length - 1], r = 4, s = 16, l = window.innerWidth || document.documentElement.clientWidth, a = window.innerHeight || document.documentElement.clientHeight, m = (p) => {
445
+ const x = p + be;
446
+ return p >= s && x <= l - s;
447
+ }, u = (p) => {
448
+ const x = p + Ne;
449
+ return p >= s && x <= a - s;
446
450
  };
447
- let p;
448
- const d = n.right - Ne;
449
- if (m(d))
450
- p = d;
451
+ let f;
452
+ const c = n.right - be;
453
+ if (m(c))
454
+ f = c;
451
455
  else {
452
- const y = n.left;
453
- if (m(y))
454
- p = y;
456
+ const p = n.left;
457
+ if (m(p))
458
+ f = p;
455
459
  else {
456
- const g = (n.left + n.right) / 2 - Ne / 2;
457
- m(g) ? p = g : d < s ? p = s : p = l - Ne - s;
460
+ const y = (n.left + n.right) / 2 - be / 2;
461
+ m(y) ? f = y : c < s ? f = s : f = l - be - s;
458
462
  }
459
463
  }
460
464
  let h;
461
- const E = o.bottom + r;
462
- if (c(E))
463
- h = E;
465
+ const N = o.bottom + r;
466
+ if (u(N))
467
+ h = N;
464
468
  else {
465
- const y = n.top - ye - r;
466
- c(y) ? h = y : E + ye > a - s ? h = a - ye - s : h = s;
469
+ const p = n.top - Ne - r;
470
+ u(p) ? h = p : N + Ne > a - s ? h = a - Ne - s : h = s;
467
471
  }
468
- return { top: h, left: p };
469
- }, jt = (t, e) => {
472
+ return { top: h, left: f };
473
+ }, Wt = (t, e) => {
470
474
  for (const n of e)
471
475
  if (t.start < n.end && t.end > n.start)
472
476
  return !0;
473
477
  return !1;
474
- }, _e = (t) => `highlight-wrapper-${t}`, ve = (t) => `${_e(t)}-start`, nt = (t) => `${_e(t)}-end`, ge = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, Wt = "2px", zt = "3px", qt = "1px", ot = "3px", Kt = "1px", rt = "Notebook note", Fe = (t, e) => {
478
+ }, Fe = (t) => `highlight-wrapper-${t}`, Ce = (t) => `${Fe(t)}-start`, nt = (t) => `${Fe(t)}-end`, he = (t) => `[data-highlight-id="${CSS.escape(t)}"]`, zt = "2px", qt = "3px", Kt = "1px", ot = "3px", Xt = "1px", rt = "Notebook note", Me = (t, e) => {
475
479
  const n = Number.parseInt(t.slice(1, 3), 16), o = Number.parseInt(t.slice(3, 5), 16), r = Number.parseInt(t.slice(5, 7), 16);
476
480
  return `rgba(${n}, ${o}, ${r}, ${e})`;
477
481
  }, st = (t, e, n, o, r) => {
478
- t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${qt} ${r} ${o}`, t.style.outlineOffset = Kt, t.style.borderRadius = ot, t.style.fontWeight = "bold") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "");
479
- }, Xt = /* @__PURE__ */ new Set([
482
+ t.style.backgroundColor = n, t.style.textDecorationColor = o, t.style.textDecorationStyle = r, e ? (t.dataset.selected = "true", t.style.outline = `${Kt} ${r} ${o}`, t.style.outlineOffset = Xt, t.style.borderRadius = ot, t.style.fontWeight = "bold") : (t.removeAttribute("data-selected"), t.style.outline = "", t.style.outlineOffset = "", t.style.borderRadius = "", t.style.fontWeight = "");
483
+ }, Vt = /* @__PURE__ */ new Set([
480
484
  "AREA",
481
485
  "BASE",
482
486
  "BR",
@@ -495,11 +499,11 @@ const et = (t) => {
495
499
  const n = t.cloneRange();
496
500
  n.collapse(e);
497
501
  const o = n.startContainer;
498
- if (!(o.nodeType === Node.ELEMENT_NODE && Xt.has(o.tagName)) || !o.parentNode)
502
+ if (!(o.nodeType === Node.ELEMENT_NODE && Vt.has(o.tagName)) || !o.parentNode)
499
503
  return n;
500
504
  const s = o.parentNode, l = Array.from(s.childNodes).indexOf(o), a = document.createRange();
501
505
  return a.setStart(s, l), a.collapse(!0), a;
502
- }, Vt = (t, e) => {
506
+ }, Qt = (t, e) => {
503
507
  var n;
504
508
  try {
505
509
  const o = ((n = e.nodeValue) == null ? void 0 : n.length) ?? e.childNodes.length;
@@ -507,7 +511,7 @@ const et = (t) => {
507
511
  } catch {
508
512
  return !1;
509
513
  }
510
- }, Qt = (t) => {
514
+ }, Yt = (t) => {
511
515
  var s;
512
516
  if (t.collapsed)
513
517
  return [];
@@ -517,7 +521,7 @@ const et = (t) => {
517
521
  const n = [], o = (s = e == null ? void 0 : e.ownerDocument) == null ? void 0 : s.createNodeIterator(e, NodeFilter.SHOW_TEXT);
518
522
  let r = (o == null ? void 0 : o.nextNode()) || null;
519
523
  for (; r; ) {
520
- if (!Vt(t, r)) {
524
+ if (!Qt(t, r)) {
521
525
  r = (o == null ? void 0 : o.nextNode()) || null;
522
526
  continue;
523
527
  }
@@ -529,106 +533,106 @@ const et = (t) => {
529
533
  l === t.endContainer && t.endOffset < l.data.length && l.splitText(t.endOffset), n.push(l), r = (o == null ? void 0 : o.nextNode()) || null;
530
534
  }
531
535
  return n;
532
- }, Yt = (t, e, n) => {
536
+ }, Zt = (t, e, n) => {
533
537
  if (t.collapsed) return;
534
- const o = e.id ?? "", r = _e(o);
535
- if (document.getElementById(ve(o))) {
536
- Zt(e, n);
538
+ const o = e.id ?? "", r = Fe(o);
539
+ if (document.getElementById(Ce(o))) {
540
+ Jt(e, n);
537
541
  return;
538
542
  }
539
- const l = e.type === k.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, a = e.id === e.selectedNoteId, m = a ? l : Fe(l, 0.5), c = e.type === k.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, p = e.type === k.IMPORTANT ? "solid" : "dashed", d = document.createElement("span");
540
- d.id = `${r}-start`, d.className = "highlight-marker-start", d.dataset.highlightId = o || "";
543
+ const l = e.type === L.IMPORTANT ? n.colors.importantBackground : n.colors.confusingBackground, a = e.id === e.selectedNoteId, m = a ? l : Me(l, 0.5), u = e.type === L.IMPORTANT ? n.colors.importantUnderline : n.colors.confusingUnderline, f = e.type === L.IMPORTANT ? "solid" : "dashed", c = document.createElement("span");
544
+ c.id = `${r}-start`, c.className = "highlight-marker-start", c.dataset.highlightId = o || "";
541
545
  const h = e.labelPrefix ?? rt;
542
- d.setAttribute("role", "button"), d.setAttribute("tabindex", "0"), d.setAttribute("aria-label", h), d.setAttribute("aria-haspopup", "dialog"), d.setAttribute("aria-expanded", String(a && !!e.isTrayOpen)), a && d.setAttribute("aria-current", "true"), e.popupId && d.setAttribute("aria-controls", e.popupId), d.style.position = "relative", d.style.fontSize = "0", d.style.lineHeight = "0", d.style.width = "0", d.style.height = "0", d.style.margin = "0", d.style.padding = "0", d.style.border = "0", d.style.outline = "none";
543
- const E = document.createElement("span");
544
- E.id = nt(o), E.className = "highlight-marker-end", E.dataset.highlightId = o || "", qe(t, !1).insertNode(E), qe(t, !0).insertNode(d);
545
- const g = document.createRange();
546
- g.setStartAfter(d), g.setEndBefore(E);
547
- const j = Qt(g).filter((N) => N.textContent && N.textContent.length > 0);
548
- j.forEach((N, I) => {
549
- var $;
550
- const B = N.parentElement;
551
- if ((B == null ? void 0 : B.dataset.highlightId) === o) return;
552
- const D = I === 0, P = I === j.length - 1, S = j.length === 1;
546
+ c.setAttribute("role", "button"), c.setAttribute("tabindex", "0"), c.setAttribute("aria-label", h), c.setAttribute("aria-haspopup", "dialog"), c.setAttribute("aria-expanded", String(a && !!e.isTrayOpen)), a && c.setAttribute("aria-current", "true"), e.popupId && c.setAttribute("aria-controls", e.popupId), c.style.position = "relative", c.style.fontSize = "0", c.style.lineHeight = "0", c.style.width = "0", c.style.height = "0", c.style.margin = "0", c.style.padding = "0", c.style.border = "0", c.style.outline = "none";
547
+ const N = document.createElement("span");
548
+ N.id = nt(o), N.className = "highlight-marker-end", N.dataset.highlightId = o || "", qe(t, !1).insertNode(N), qe(t, !0).insertNode(c);
549
+ const y = document.createRange();
550
+ y.setStartAfter(c), y.setEndBefore(N);
551
+ const z = Yt(y).filter((b) => b.textContent && b.textContent.length > 0);
552
+ z.forEach((b, T) => {
553
+ var j;
554
+ const P = b.parentElement;
555
+ if ((P == null ? void 0 : P.dataset.highlightId) === o) return;
556
+ const D = T === 0, G = T === z.length - 1, E = z.length === 1;
553
557
  let w;
554
- S ? w = "single" : D ? w = "first" : P ? w = "last" : w = "middle";
555
- const C = document.createElement("span");
556
- C.className = "highlight-content", C.dataset.highlightId = o || "", C.dataset.position = w, C.style.textDecorationLine = "underline", C.style.textDecorationThickness = n.borderWidthSmall, C.style.textUnderlineOffset = n.underlineOffset, C.style.cursor = "pointer", st(C, a, m, c, p), C.addEventListener("click", (re) => {
557
- var z;
558
- re.target.tagName !== "A" && ((z = e.onClick) == null || z.call(e));
559
- }), ($ = N.parentNode) == null || $.insertBefore(C, N), C.appendChild(N);
560
- }), d.addEventListener("click", (N) => {
561
- var I;
562
- N.target.tagName !== "A" && ((I = e.onClick) == null || I.call(e));
563
- }), d.addEventListener("keydown", (N) => {
564
- var I;
565
- if (N.key === "Enter" || N.key === " ")
566
- N.preventDefault(), (I = e.onClick) == null || I.call(e);
567
- else if (N.key === "Tab" && !N.shiftKey) {
568
- const B = document.querySelectorAll(ge(o));
569
- for (const D of B) {
570
- const P = D.querySelector("a");
571
- if (P) {
572
- N.preventDefault(), P.focus();
558
+ E ? w = "single" : D ? w = "first" : G ? w = "last" : w = "middle";
559
+ const v = document.createElement("span");
560
+ v.className = "highlight-content", v.dataset.highlightId = o || "", v.dataset.position = w, v.style.textDecorationLine = "underline", v.style.textDecorationThickness = n.borderWidthSmall, v.style.textUnderlineOffset = n.underlineOffset, v.style.cursor = "pointer", st(v, a, m, u, f), v.addEventListener("click", (ee) => {
561
+ var Q;
562
+ ee.target.tagName !== "A" && ((Q = e.onClick) == null || Q.call(e));
563
+ }), (j = b.parentNode) == null || j.insertBefore(v, b), v.appendChild(b);
564
+ }), c.addEventListener("click", (b) => {
565
+ var T;
566
+ b.target.tagName !== "A" && ((T = e.onClick) == null || T.call(e));
567
+ }), c.addEventListener("keydown", (b) => {
568
+ var T;
569
+ if (b.key === "Enter" || b.key === " ")
570
+ b.preventDefault(), (T = e.onClick) == null || T.call(e);
571
+ else if (b.key === "Tab" && !b.shiftKey) {
572
+ const P = document.querySelectorAll(he(o));
573
+ for (const D of P) {
574
+ const G = D.querySelector("a");
575
+ if (G) {
576
+ b.preventDefault(), G.focus();
573
577
  break;
574
578
  }
575
579
  }
576
580
  }
577
- }), d.addEventListener("focus", () => {
581
+ }), c.addEventListener("focus", () => {
578
582
  document.querySelectorAll(
579
- `.highlight-content${ge(o)}`
580
- ).forEach((I) => {
581
- I.style.boxShadow = `0 0 0 ${Wt} ${n.colors.focusOutline}`, I.style.borderRadius = zt;
583
+ `.highlight-content${he(o)}`
584
+ ).forEach((T) => {
585
+ T.style.boxShadow = `0 0 0 ${zt} ${n.colors.focusOutline}`, T.style.borderRadius = qt;
582
586
  });
583
- }), d.addEventListener("blur", () => {
587
+ }), c.addEventListener("blur", () => {
584
588
  document.querySelectorAll(
585
- `.highlight-content${ge(o)}`
586
- ).forEach((I) => {
587
- I.style.boxShadow = "", I.style.borderRadius = I.dataset.selected ? ot : "";
589
+ `.highlight-content${he(o)}`
590
+ ).forEach((T) => {
591
+ T.style.boxShadow = "", T.style.borderRadius = T.dataset.selected ? ot : "";
588
592
  });
589
593
  });
590
594
  };
591
- function Zt(t, e) {
592
- const n = t.type === k.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : Fe(n, 0.5), s = t.type === k.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, l = t.type === k.IMPORTANT ? "solid" : "dashed";
595
+ function Jt(t, e) {
596
+ const n = t.type === L.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground, o = t.id === t.selectedNoteId, r = o ? n : Me(n, 0.5), s = t.type === L.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline, l = t.type === L.IMPORTANT ? "solid" : "dashed";
593
597
  document.querySelectorAll(
594
- `.highlight-content${ge(t.id ?? "")}`
595
- ).forEach((c) => {
596
- st(c, o, r, s, l);
598
+ `.highlight-content${he(t.id ?? "")}`
599
+ ).forEach((u) => {
600
+ st(u, o, r, s, l);
597
601
  });
598
602
  const m = document.getElementById(
599
- ve(t.id ?? "")
603
+ Ce(t.id ?? "")
600
604
  );
601
605
  m && (m.setAttribute("aria-label", t.labelPrefix ?? rt), m.setAttribute("aria-expanded", String(o && !!t.isTrayOpen)), o ? m.setAttribute("aria-current", "true") : m.removeAttribute("aria-current"));
602
606
  }
603
- const Jt = (t) => {
604
- const e = t.id ?? "", n = document.getElementById(ve(e)), o = document.getElementById(nt(e));
607
+ const en = (t) => {
608
+ const e = t.id ?? "", n = document.getElementById(Ce(e)), o = document.getElementById(nt(e));
605
609
  document.querySelectorAll(
606
- ge(e)
610
+ he(e)
607
611
  ).forEach((s) => {
608
612
  var l;
609
613
  for (; s.firstChild; )
610
614
  (l = s.parentNode) == null || l.insertBefore(s.firstChild, s);
611
615
  s.remove();
612
616
  }), n == null || n.remove(), o == null || o.remove();
613
- }, fe = {
617
+ }, me = {
614
618
  all: ["notebook"],
615
619
  notes: (t) => ["notebook", "notes", t]
616
620
  };
617
- function en(t) {
618
- const e = ke();
619
- return Oe({
621
+ function tn(t) {
622
+ const e = Oe();
623
+ return Le({
620
624
  mutationFn: (n) => t.createNote(n),
621
625
  onSuccess: () => {
622
- e.invalidateQueries({ queryKey: fe.all });
626
+ e.invalidateQueries({ queryKey: me.all });
623
627
  }
624
628
  });
625
629
  }
626
- function tn(t) {
627
- const e = ke();
628
- return Oe({
630
+ function nn(t) {
631
+ const e = Oe();
632
+ return Le({
629
633
  mutationFn: (n) => t.deleteNote(n),
630
634
  onSuccess: () => {
631
- e.invalidateQueries({ queryKey: fe.all });
635
+ e.invalidateQueries({ queryKey: me.all });
632
636
  }
633
637
  });
634
638
  }
@@ -637,13 +641,13 @@ function it({
637
641
  enabled: e = !0,
638
642
  ...n
639
643
  }) {
640
- return yt({
641
- queryKey: fe.notes(n),
644
+ return Nt({
645
+ queryKey: me.notes(n),
642
646
  queryFn: () => t.getNotes(n),
643
647
  enabled: e
644
648
  });
645
649
  }
646
- const nn = 100;
650
+ const on = 100;
647
651
  function lt({
648
652
  api: t,
649
653
  courseId: e,
@@ -659,23 +663,23 @@ function lt({
659
663
  ...o != null && o.length ? { reactions: o } : {}
660
664
  },
661
665
  offset: 0,
662
- pageSize: nn,
666
+ pageSize: on,
663
667
  enabled: r
664
668
  });
665
669
  }
666
- function on(t) {
667
- const e = ke();
668
- return Oe({
670
+ function rn(t) {
671
+ const e = Oe();
672
+ return Le({
669
673
  mutationFn: ({ id: n, input: o }) => t.updateNote(n, o),
670
674
  onMutate: async ({ id: n, input: o }) => {
671
- await e.cancelQueries({ queryKey: fe.all });
672
- const s = e.getQueryCache().findAll({ queryKey: fe.all }), l = /* @__PURE__ */ new Map();
675
+ await e.cancelQueries({ queryKey: me.all });
676
+ const s = e.getQueryCache().findAll({ queryKey: me.all }), l = /* @__PURE__ */ new Map();
673
677
  for (const a of s) {
674
678
  const m = a.state.data;
675
679
  m && (l.set(a.queryKey, m), e.setQueryData(a.queryKey, {
676
680
  ...m,
677
681
  notes: m.notes.map(
678
- (c) => c.id === n ? { ...c, ...o, updatedAt: (/* @__PURE__ */ new Date()).toISOString() } : c
682
+ (u) => u.id === n ? { ...u, ...o, updatedAt: (/* @__PURE__ */ new Date()).toISOString() } : u
679
683
  )
680
684
  }));
681
685
  }
@@ -687,61 +691,63 @@ function on(t) {
687
691
  e.setQueryData(s, l);
688
692
  },
689
693
  onSettled: () => {
690
- e.invalidateQueries({ queryKey: fe.all });
694
+ e.invalidateQueries({ queryKey: me.all });
691
695
  }
692
696
  });
693
697
  }
694
- const rn = "Notebook", sn = "Notes", ln = "Important", an = "Unclear", cn = "Back", dn = "Edit note", un = "Save", fn = "Cancel", mn = "Delete note", gn = "Delete note confirmation", hn = "note", pn = "Add note (optional)", yn = "Remove from Notebook", Nn = "Add a note (optional)", En = "Mark important", bn = "Mark unclear", Tn = "Saved to Notebook.", Sn = "Note updated", Cn = "Note deleted", vn = "Error saving to Notebook.", In = "Error updating note", xn = "Note deletion failed", Rn = "Loading notes", wn = "Failed to load notes", kn = "Start capturing your notes", On = "Your notes from learning materials will appear here. Highlight key ideas, reflections, or questions as you learn—they'll all be saved in your Notebook for easy review later.", Ln = "Nothing here yet", An = "Adjust your filters or create a new note to get started.", Dn = "You have no notes for the selected filter", Pn = "Filter", _n = "Previous page", Fn = "Next page", Mn = "All courses", Bn = "All notes", $n = "Close Notebook panel", Hn = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", Un = "The content you highlighted is no longer available.", Gn = "Notebook note", Me = {
695
- notebook: rn,
696
- notes: sn,
697
- important: ln,
698
- unclear: an,
699
- back: cn,
700
- editNote: dn,
701
- save: un,
702
- cancel: fn,
703
- deleteNote: mn,
704
- deleteNoteConfirmation: gn,
705
- note: hn,
706
- addNotePrompt: pn,
707
- removeFromNotebook: yn,
708
- addNoteOptional: Nn,
698
+ const sn = "Notebook", ln = "Notes", an = "Important", cn = "Unclear", dn = "Back", un = "Edit note", fn = "Save", mn = "Cancel", gn = "Delete note", hn = "Delete note confirmation", pn = "note", yn = "Add note (optional)", Nn = "Remove from Notebook", bn = "Add a note (optional)", En = "Mark important", Sn = "Mark unclear", Tn = "Saved to Notebook.", vn = "Note updated", In = "Note deleted", Cn = "Error saving to Notebook.", xn = "Error updating note", Rn = "Note deletion failed", wn = "Loading notes", kn = "Failed to load notes", On = "Start capturing your notes", Ln = "To use the Notebook feature, select text on a page to mark it as Important or Unclear, and add an optional note.", An = "Only you can see your Notebook. Instructors and classmates don't see your notes.", Dn = "Nothing here yet", Pn = "Adjust your filters or create a new note to get started.", _n = "You have no notes for the selected filter", Fn = "Filter", Mn = "Previous page", Bn = "Next page", Un = "All courses", Hn = "All notes", $n = "Close Notebook panel", Gn = "To use the Notebook feature, highlight an excerpt from your learning material to flag it as 'confusing' or 'important' and leave an optional note.", jn = "The content you highlighted is no longer available.", Wn = "This source is no longer available.", zn = "Notebook note", Be = {
699
+ notebook: sn,
700
+ notes: ln,
701
+ important: an,
702
+ unclear: cn,
703
+ back: dn,
704
+ editNote: un,
705
+ save: fn,
706
+ cancel: mn,
707
+ deleteNote: gn,
708
+ deleteNoteConfirmation: hn,
709
+ note: pn,
710
+ addNotePrompt: yn,
711
+ removeFromNotebook: Nn,
712
+ addNoteOptional: bn,
709
713
  markImportant: En,
710
- markUnclear: bn,
714
+ markUnclear: Sn,
711
715
  savedToNotebook: Tn,
712
- noteUpdated: Sn,
713
- noteDeleted: Cn,
714
- errorSavingNote: vn,
715
- errorUpdatingNote: In,
716
- noteDeletionFailed: xn,
717
- loadingNotes: Rn,
718
- failedToLoadNotes: wn,
719
- emptyStateHeading: kn,
720
- emptyStateDescription: On,
721
- nothingHereYet: Ln,
722
- adjustFiltersOrCreate: An,
723
- noNotesForFilter: Dn,
724
- filter: Pn,
725
- previousPage: _n,
726
- nextPage: Fn,
727
- allCourses: Mn,
728
- allNotes: Bn,
716
+ noteUpdated: vn,
717
+ noteDeleted: In,
718
+ errorSavingNote: Cn,
719
+ errorUpdatingNote: xn,
720
+ noteDeletionFailed: Rn,
721
+ loadingNotes: wn,
722
+ failedToLoadNotes: kn,
723
+ emptyStateHeading: On,
724
+ emptyStateDescription: Ln,
725
+ emptyStatePrecision: An,
726
+ nothingHereYet: Dn,
727
+ adjustFiltersOrCreate: Pn,
728
+ noNotesForFilter: _n,
729
+ filter: Fn,
730
+ previousPage: Mn,
731
+ nextPage: Bn,
732
+ allCourses: Un,
733
+ allNotes: Hn,
729
734
  closeNotebookPanel: $n,
730
- featureDescription: Hn,
731
- highlightUnavailable: Un,
732
- notebookNote: Gn
735
+ featureDescription: Gn,
736
+ highlightUnavailable: jn,
737
+ highlightSourceUnavailable: Wn,
738
+ notebookNote: zn
733
739
  }, at = Ve(null);
734
740
  function ct(t, e) {
735
- const n = Me[t] ?? t;
741
+ const n = Be[t] ?? t;
736
742
  return e ? n.replace(/%\{([^}]+)}/g, (o, r) => String(e[r] ?? `%{${r}}`)) : n;
737
743
  }
738
- function jn({
744
+ function qn({
739
745
  translations: t,
740
746
  translate: e,
741
747
  children: n
742
748
  }) {
743
- const o = he(() => ({
744
- translations: new Proxy(Me, {
749
+ const o = pe(() => ({
750
+ translations: new Proxy(Be, {
745
751
  get(s, l) {
746
752
  return (t == null ? void 0 : t[l]) ?? s[l];
747
753
  }
@@ -750,16 +756,16 @@ function jn({
750
756
  }), [t, e]);
751
757
  return /* @__PURE__ */ i(at.Provider, { value: o, children: n });
752
758
  }
753
- function Z() {
759
+ function J() {
754
760
  const t = Qe(at);
755
- return t || { translations: Me, translate: ct };
761
+ return t || { translations: Be, translate: ct };
756
762
  }
757
- const Wn = (t) => ({
763
+ const Kn = (t) => ({
758
764
  selectedNoteId: t ?? null,
759
765
  isNoteEditing: !1,
760
766
  isTrayOpen: t != null
761
767
  });
762
- function zn(t, e) {
768
+ function Xn(t, e) {
763
769
  switch (e.type) {
764
770
  case "SELECT_NOTE":
765
771
  return {
@@ -780,7 +786,7 @@ function zn(t, e) {
780
786
  }
781
787
  }
782
788
  const dt = Ve(null);
783
- function Co({
789
+ function xo({
784
790
  api: t,
785
791
  currentUserId: e,
786
792
  objectId: n,
@@ -790,10 +796,10 @@ function Co({
790
796
  onOpen: l,
791
797
  initialNoteId: a,
792
798
  translations: m,
793
- translate: c,
794
- children: p
799
+ translate: u,
800
+ children: f
795
801
  }) {
796
- const [d, h] = Ye(zn, Wn(a)), E = F(a != null), y = he(
802
+ const [c, h] = Ye(Xn, Kn(a)), N = F(a != null), p = pe(
797
803
  () => ({
798
804
  api: t,
799
805
  currentUserId: e,
@@ -801,20 +807,20 @@ function Co({
801
807
  objectType: o,
802
808
  courseId: r,
803
809
  pageLastModifiedAt: s,
804
- ...d,
805
- selectNote: (b, g = !1) => h({ type: "SELECT_NOTE", payload: { id: b, isEditing: g } }),
810
+ ...c,
811
+ selectNote: (x, y = !1) => h({ type: "SELECT_NOTE", payload: { id: x, isEditing: y } }),
806
812
  clearSelectedNote: () => h({ type: "CLEAR_SELECTED_NOTE" }),
807
- setEditing: (b) => h({ type: "SET_EDITING", payload: b }),
813
+ setEditing: (x) => h({ type: "SET_EDITING", payload: x }),
808
814
  openTray: () => {
809
- E.current || (E.current = !0, l == null || l()), h({ type: "OPEN_TRAY" });
815
+ N.current || (N.current = !0, l == null || l()), h({ type: "OPEN_TRAY" });
810
816
  },
811
817
  closeTray: () => {
812
- E.current = !1, h({ type: "CLOSE_TRAY" });
818
+ N.current = !1, h({ type: "CLOSE_TRAY" });
813
819
  }
814
820
  }),
815
- [t, e, n, o, r, s, l, d]
821
+ [t, e, n, o, r, s, l, c]
816
822
  );
817
- return /* @__PURE__ */ i(dt.Provider, { value: y, children: /* @__PURE__ */ i(jn, { translations: m, translate: c, children: p }) });
823
+ return /* @__PURE__ */ i(dt.Provider, { value: p, children: /* @__PURE__ */ i(qn, { translations: m, translate: u, children: f }) });
818
824
  }
819
825
  function ut() {
820
826
  const t = Qe(dt);
@@ -822,8 +828,8 @@ function ut() {
822
828
  throw new Error("useNotebook must be used within a NotebookProvider");
823
829
  return t;
824
830
  }
825
- const ft = "notebook-tray-content", vo = ({ children: t }) => {
826
- const { isTrayOpen: e, closeTray: n } = ut(), { translations: o } = Z();
831
+ const ft = "notebook-tray-content", Ro = ({ children: t }) => {
832
+ const { isTrayOpen: e, closeTray: n } = ut(), { translations: o } = J();
827
833
  return /* @__PURE__ */ i(
828
834
  Et,
829
835
  {
@@ -832,11 +838,11 @@ const ft = "notebook-tray-content", vo = ({ children: t }) => {
832
838
  onDismiss: n,
833
839
  placement: "end",
834
840
  size: "regular",
835
- children: /* @__PURE__ */ T(x, { direction: "column", height: "100vh", id: ft, children: [
836
- /* @__PURE__ */ i(x.Item, { children: /* @__PURE__ */ i(V, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ T(x, { justifyItems: "space-between", alignItems: "center", children: [
837
- /* @__PURE__ */ i(Se, { level: "h3", children: o.notebook }),
841
+ children: /* @__PURE__ */ S(C, { direction: "column", height: "100vh", id: ft, children: [
842
+ /* @__PURE__ */ i(C.Item, { children: /* @__PURE__ */ i(V, { as: "div", padding: "small medium", borderWidth: "0 0 small 0", children: /* @__PURE__ */ S(C, { justifyItems: "space-between", alignItems: "center", children: [
843
+ /* @__PURE__ */ i(ve, { level: "h3", children: o.notebook }),
838
844
  /* @__PURE__ */ i(
839
- Nt,
845
+ bt,
840
846
  {
841
847
  screenReaderLabel: o.closeNotebookPanel,
842
848
  onClick: n,
@@ -845,18 +851,18 @@ const ft = "notebook-tray-content", vo = ({ children: t }) => {
845
851
  }
846
852
  )
847
853
  ] }) }) }),
848
- /* @__PURE__ */ i(x.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
854
+ /* @__PURE__ */ i(C.Item, { shouldGrow: !0, shouldShrink: !0, overflowY: "auto", overflowX: "hidden", children: t })
849
855
  ] })
850
856
  }
851
857
  );
852
- }, qn = ({
858
+ }, Vn = ({
853
859
  currentType: t,
854
860
  disabled: e = !1,
855
861
  onSelectReaction: n
856
862
  }) => {
857
- const { translations: o } = Z(), r = F(null), s = F(null);
858
- return W(() => {
859
- t === k.CONFUSING && r.current ? r.current.focus() : t === k.IMPORTANT && s.current ? s.current.focus() : r.current && r.current.focus();
863
+ const { translations: o } = J(), r = F(null), s = F(null);
864
+ return q(() => {
865
+ t === L.CONFUSING && r.current ? r.current.focus() : t === L.IMPORTANT && s.current ? s.current.focus() : r.current && r.current.focus();
860
866
  }, [t]), /* @__PURE__ */ i(
861
867
  V,
862
868
  {
@@ -866,27 +872,27 @@ const ft = "notebook-tray-content", vo = ({ children: t }) => {
866
872
  borderColor: "secondary",
867
873
  borderRadius: "medium",
868
874
  shadow: "resting",
869
- children: /* @__PURE__ */ T(ue, { children: [
870
- /* @__PURE__ */ T(
871
- ue.Item,
875
+ children: /* @__PURE__ */ S(fe, { children: [
876
+ /* @__PURE__ */ S(
877
+ fe.Item,
872
878
  {
873
879
  ref: r,
874
880
  disabled: e,
875
- onClick: () => n(k.CONFUSING),
881
+ onClick: () => n(L.CONFUSING),
876
882
  children: [
877
- /* @__PURE__ */ i(Le, { size: "x-small" }),
883
+ /* @__PURE__ */ i(Ae, { size: "x-small" }),
878
884
  ` ${o.markUnclear}`
879
885
  ]
880
886
  }
881
887
  ),
882
- /* @__PURE__ */ T(
883
- ue.Item,
888
+ /* @__PURE__ */ S(
889
+ fe.Item,
884
890
  {
885
891
  ref: s,
886
892
  disabled: e,
887
- onClick: () => n(k.IMPORTANT),
893
+ onClick: () => n(L.IMPORTANT),
888
894
  children: [
889
- /* @__PURE__ */ i(Ae, { size: "x-small" }),
895
+ /* @__PURE__ */ i(De, { size: "x-small" }),
890
896
  ` ${o.markImportant}`
891
897
  ]
892
898
  }
@@ -894,8 +900,8 @@ const ft = "notebook-tray-content", vo = ({ children: t }) => {
894
900
  ] })
895
901
  }
896
902
  );
897
- }, Ie = "notebook-inline-reaction-menu";
898
- function Io({
903
+ }, xe = "notebook-inline-reaction-menu";
904
+ function wo({
899
905
  containerRef: t,
900
906
  highlightTheme: e,
901
907
  debounceTime: n = 500,
@@ -907,201 +913,201 @@ function Io({
907
913
  const {
908
914
  api: a,
909
915
  objectId: m,
910
- objectType: c,
911
- courseId: p,
912
- pageLastModifiedAt: d,
916
+ objectType: u,
917
+ courseId: f,
918
+ pageLastModifiedAt: c,
913
919
  selectedNoteId: h,
914
- isTrayOpen: E,
915
- selectNote: y,
916
- openTray: b
917
- } = ut(), { translations: g } = Z(), { data: Q } = lt({
920
+ isTrayOpen: N,
921
+ selectNote: p,
922
+ openTray: x
923
+ } = ut(), { translations: y } = J(), { data: k } = lt({
918
924
  api: a,
919
- courseId: p,
920
- learningObject: { type: c, id: m }
921
- }), { mutate: j, isPending: N } = en(a), { mutateAsync: I } = on(a), { mutate: B } = tn(a), D = F([]), [P, S] = G([]), [w, C] = G(null), [$, re] = G(""), [z, ce] = G(null), se = F(null);
922
- se.current = z;
923
- const le = F(!1), [J, ee] = G(!1);
924
- W(() => {
925
- const _ = t.current;
926
- if (!_) return;
927
- const v = _.closest(".user_content") ?? _;
928
- if (v.classList.contains("enhanced")) {
929
- ee(!0);
925
+ courseId: f,
926
+ learningObject: { type: u, id: m }
927
+ }), { mutate: z, isPending: b } = tn(a), { mutateAsync: T } = rn(a), { mutate: P } = nn(a), D = F([]), [G, E] = W([]), [w, v] = W(null), [j, ee] = W(""), [Q, ae] = W(null), de = F(null);
928
+ de.current = Q;
929
+ const te = F(!1), [re, se] = W(!1);
930
+ q(() => {
931
+ const M = t.current;
932
+ if (!M) return;
933
+ const I = M.closest(".user_content") ?? M;
934
+ if (I.classList.contains("enhanced")) {
935
+ se(!0);
930
936
  return;
931
937
  }
932
- const U = new MutationObserver((M) => {
933
- for (const L of M)
934
- if (L.type === "attributes" && L.attributeName === "class" && L.target.classList.contains("enhanced")) {
935
- ee(!0), U.disconnect();
938
+ const _ = new MutationObserver((B) => {
939
+ for (const H of B)
940
+ if (H.type === "attributes" && H.attributeName === "class" && H.target.classList.contains("enhanced")) {
941
+ se(!0), _.disconnect();
936
942
  return;
937
943
  }
938
944
  });
939
- return U.observe(v, { attributes: !0, attributeFilter: ["class"] }), () => U.disconnect();
945
+ return _.observe(I, { attributes: !0, attributeFilter: ["class"] }), () => _.disconnect();
940
946
  }, [t]);
941
- const O = K(() => {
942
- ce(null), C(null), re("");
947
+ const A = K(() => {
948
+ ae(null), v(null), ee("");
943
949
  }, []);
944
- W(() => {
945
- if (!J || !t.current) return;
946
- let v = null;
947
- const U = () => {
948
- v && clearTimeout(v), v = setTimeout(() => {
949
- var $e;
950
- const R = window.getSelection(), u = t.current;
951
- if (!(R != null && R.rangeCount) || !u) return;
952
- const H = R.toString().trim();
953
- if (H === "") return;
954
- const q = R.getRangeAt(0);
955
- if (!u.contains(q.commonAncestorContainer)) return;
956
- const Be = ($e = ie.fromRange(u, q)) == null ? void 0 : $e.toSelector();
957
- Be && !jt(Be, P) && (C(q.cloneRange()), re(H), ce(Gt(q)));
950
+ q(() => {
951
+ if (!re || !t.current) return;
952
+ let I = null;
953
+ const _ = () => {
954
+ I && clearTimeout(I), I = setTimeout(() => {
955
+ var Ue;
956
+ const R = window.getSelection(), U = t.current;
957
+ if (!(R != null && R.rangeCount) || !U) return;
958
+ const g = R.toString().trim();
959
+ if (g === "") return;
960
+ const $ = R.getRangeAt(0);
961
+ if (!U.contains($.commonAncestorContainer)) return;
962
+ const ie = (Ue = le.fromRange(U, $)) == null ? void 0 : Ue.toSelector();
963
+ ie && !Wt(ie, G) && (v($.cloneRange()), ee(g), ae(jt($)));
958
964
  }, n);
959
- }, M = (R) => {
965
+ }, B = (R) => {
960
966
  if (!(R.target instanceof Node)) return;
961
- const u = document.getElementById(Ie);
962
- u != null && u.contains(R.target) ? (R.preventDefault(), R.stopImmediatePropagation()) : O();
963
- }, L = () => {
964
- O();
965
- }, A = (R) => {
966
- R.key === "Escape" && se.current !== null && (O(), R.stopImmediatePropagation());
967
+ const U = document.getElementById(xe);
968
+ U != null && U.contains(R.target) ? (R.preventDefault(), R.stopImmediatePropagation()) : A();
969
+ }, H = () => {
970
+ A();
971
+ }, O = (R) => {
972
+ R.key === "Escape" && de.current !== null && (A(), R.stopImmediatePropagation());
967
973
  };
968
- return document.addEventListener("selectionchange", U), document.addEventListener("mousedown", M), document.addEventListener("touchstart", M), document.addEventListener("keydown", A), window.addEventListener("scroll", L, !0), () => {
969
- v && clearTimeout(v), document.removeEventListener("selectionchange", U), document.removeEventListener("mousedown", M), document.removeEventListener("touchstart", M), document.removeEventListener("keydown", A), window.removeEventListener("scroll", L, !0);
974
+ return document.addEventListener("selectionchange", _), document.addEventListener("mousedown", B), document.addEventListener("touchstart", B), document.addEventListener("keydown", O), window.addEventListener("scroll", H, !0), () => {
975
+ I && clearTimeout(I), document.removeEventListener("selectionchange", _), document.removeEventListener("mousedown", B), document.removeEventListener("touchstart", B), document.removeEventListener("keydown", O), window.removeEventListener("scroll", H, !0);
970
976
  };
971
- }, [J, P, n, t, O]);
977
+ }, [re, G, n, t, A]);
972
978
  const Y = K(
973
- (_) => {
974
- var u;
975
- const v = t.current;
976
- if (!v || !_.highlightData) return null;
977
- const { highlightData: U, reaction: M, id: L } = _, { range: A } = U, R = A && ((u = ae.fromSelector(v, A)) == null ? void 0 : u.toRange());
979
+ (M) => {
980
+ var U;
981
+ const I = t.current;
982
+ if (!I || !M.highlightData) return null;
983
+ const { highlightData: _, reaction: B, id: H } = M, { range: O } = _, R = O && ((U = ce.fromSelector(I, O)) == null ? void 0 : U.toRange());
978
984
  if (R) {
979
- const H = M[0] === k.IMPORTANT ? g.important : g.unclear, q = {
980
- id: L,
985
+ const g = B[0] === L.IMPORTANT ? y.important : y.unclear, $ = {
986
+ id: H,
981
987
  selectedNoteId: h,
982
- type: M[0],
983
- isTrayOpen: E,
984
- labelPrefix: `${g.notebookNote} (${H})`,
988
+ type: B[0],
989
+ isTrayOpen: N,
990
+ labelPrefix: `${y.notebookNote} (${g})`,
985
991
  popupId: ft,
986
992
  onClick: () => {
987
- y(L), b();
993
+ p(H), x();
988
994
  }
989
995
  };
990
- return Yt(R, q, e), U.textPosition;
996
+ return Zt(R, $, e), _.textPosition;
991
997
  }
992
998
  return null;
993
999
  },
994
- [t, h, E, e, g, y, b]
1000
+ [t, h, N, e, y, p, x]
995
1001
  );
996
- W(() => {
997
- if (!J || !Q || !t.current) return;
998
- const _ = t.current, v = Q.notes, U = /* @__PURE__ */ new Set(), M = [], L = [];
999
- if (v.length === 0) {
1002
+ q(() => {
1003
+ if (!re || !k || !t.current) return;
1004
+ const M = t.current, I = k.notes, _ = /* @__PURE__ */ new Set(), B = [], H = [];
1005
+ if (I.length === 0) {
1000
1006
  if (D.current.length > 0) {
1001
- for (const A of D.current)
1002
- ze(A, _);
1003
- D.current = [], S([]);
1007
+ for (const O of D.current)
1008
+ ze(O, M);
1009
+ D.current = [], E([]);
1004
1010
  }
1005
1011
  return;
1006
1012
  }
1007
- if (d && v[0].highlightData.pageLastModifiedAt !== d) {
1008
- const { notesForUpdate: A, noteIdsForDelete: R } = Ht(
1009
- _,
1010
- v,
1011
- d
1013
+ if (c && I[0].highlightData.pageLastModifiedAt !== c) {
1014
+ const { notesForUpdate: O, noteIdsForDelete: R } = $t(
1015
+ M,
1016
+ I,
1017
+ c
1012
1018
  );
1013
- for (const u of A)
1014
- I({ id: u.id, input: u }).catch((H) => r == null ? void 0 : r(H));
1015
- for (const u of R)
1016
- B(u, { onError: s });
1019
+ for (const U of O)
1020
+ T({ id: U.id, input: U }).catch((g) => r == null ? void 0 : r(g));
1021
+ for (const U of R)
1022
+ P(U, { onError: s });
1017
1023
  } else {
1018
- for (const A of v) {
1019
- const R = Y(A);
1020
- U.add(A.id), R && (M.push(A), L.push(R));
1024
+ for (const O of I) {
1025
+ const R = Y(O);
1026
+ _.add(O.id), R && (B.push(O), H.push(R));
1021
1027
  }
1022
- for (const A of D.current)
1023
- U.has(A.id) || ze(A, _);
1024
- S(L), D.current = M, h && Ut(h);
1028
+ for (const O of D.current)
1029
+ _.has(O.id) || ze(O, M);
1030
+ E(H), D.current = B, h && Gt(h);
1025
1031
  }
1026
1032
  }, [
1027
- J,
1028
- Q,
1033
+ re,
1034
+ k,
1029
1035
  Y,
1030
- d,
1036
+ c,
1031
1037
  t,
1032
- I,
1033
- B,
1038
+ T,
1039
+ P,
1034
1040
  h
1035
1041
  ]);
1036
- const de = (_) => {
1037
- const v = t.current;
1038
- if (!w || !v || le.current) return;
1039
- le.current = !0;
1040
- const U = ae.fromRange(v, w), M = ie.fromRange(v, w);
1041
- j(
1042
+ const ue = (M) => {
1043
+ const I = t.current;
1044
+ if (!w || !I || te.current) return;
1045
+ te.current = !0;
1046
+ const _ = ce.fromRange(I, w), B = le.fromRange(I, w);
1047
+ z(
1042
1048
  {
1043
- courseId: p,
1049
+ courseId: f,
1044
1050
  objectId: m,
1045
- objectType: c,
1051
+ objectType: u,
1046
1052
  userText: "",
1047
- reaction: [_],
1053
+ reaction: [M],
1048
1054
  highlightData: {
1049
- selectedText: $,
1050
- textPosition: (M == null ? void 0 : M.toSelector()) ?? null,
1051
- range: U.toSelector(),
1052
- pageLastModifiedAt: d ?? ""
1055
+ selectedText: j,
1056
+ textPosition: (B == null ? void 0 : B.toSelector()) ?? null,
1057
+ range: _.toSelector(),
1058
+ pageLastModifiedAt: c ?? ""
1053
1059
  }
1054
1060
  },
1055
1061
  {
1056
- onSuccess: (L) => {
1062
+ onSuccess: (H) => {
1057
1063
  var R;
1058
- const A = L.id;
1059
- O(), (R = window.getSelection()) == null || R.removeAllRanges(), y(A), b(), l == null || l(L);
1064
+ const O = H.id;
1065
+ A(), (R = window.getSelection()) == null || R.removeAllRanges(), p(O), x(), l == null || l(H);
1060
1066
  },
1061
1067
  onError: o,
1062
1068
  // Unlock on failure too, so the user can retry from the still-open menu
1063
1069
  onSettled: () => {
1064
- le.current = !1;
1070
+ te.current = !1;
1065
1071
  }
1066
1072
  }
1067
1073
  );
1068
1074
  };
1069
- return !w || !z ? null : ht(
1075
+ return !w || !Q ? null : pt(
1070
1076
  /* @__PURE__ */ i(
1071
1077
  "div",
1072
1078
  {
1073
- id: Ie,
1079
+ id: xe,
1074
1080
  role: "toolbar",
1075
1081
  style: {
1076
1082
  position: "fixed",
1077
1083
  zIndex: 100,
1078
- top: z.top,
1079
- left: z.left,
1084
+ top: Q.top,
1085
+ left: Q.left,
1080
1086
  whiteSpace: "nowrap"
1081
1087
  },
1082
- onBlur: (_) => {
1083
- const v = document.getElementById(Ie);
1084
- v != null && v.contains(_.relatedTarget) || O();
1088
+ onBlur: (M) => {
1089
+ const I = document.getElementById(xe);
1090
+ I != null && I.contains(M.relatedTarget) || A();
1085
1091
  },
1086
- children: /* @__PURE__ */ i(qn, { onSelectReaction: de, disabled: N })
1092
+ children: /* @__PURE__ */ i(Vn, { onSelectReaction: ue, disabled: b })
1087
1093
  }
1088
1094
  ),
1089
1095
  document.body
1090
1096
  );
1091
1097
  }
1092
- const Kn = (t, e) => ({
1093
- backgroundColor: t === k.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
1094
- underlineColor: t === k.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
1095
- underlineStyle: t === k.IMPORTANT ? "solid" : "dashed"
1096
- }), we = ({
1098
+ const Qn = (t, e) => ({
1099
+ backgroundColor: t === L.IMPORTANT ? e.colors.importantBackground : e.colors.confusingBackground,
1100
+ underlineColor: t === L.IMPORTANT ? e.colors.importantUnderline : e.colors.confusingUnderline,
1101
+ underlineStyle: t === L.IMPORTANT ? "solid" : "dashed"
1102
+ }), ke = ({
1097
1103
  children: t,
1098
- type: e = k.IMPORTANT,
1104
+ type: e = L.IMPORTANT,
1099
1105
  isCardActive: n = !0,
1100
1106
  theme: o
1101
1107
  }) => {
1102
- const r = Kn(e, o), l = {
1108
+ const r = Qn(e, o), l = {
1103
1109
  position: "relative",
1104
- backgroundColor: n ? r.backgroundColor : Fe(r.backgroundColor, 0.5),
1110
+ backgroundColor: n ? r.backgroundColor : Me(r.backgroundColor, 0.5),
1105
1111
  textDecorationLine: "underline",
1106
1112
  textDecorationStyle: r.underlineStyle,
1107
1113
  textDecorationColor: r.underlineColor,
@@ -1110,13 +1116,17 @@ const Kn = (t, e) => ({
1110
1116
  lineHeight: "normal"
1111
1117
  };
1112
1118
  return /* @__PURE__ */ i("span", { "data-note-highlight": "true", style: l, children: t });
1113
- }, mt = () => {
1114
- const { translations: t } = Z();
1115
- return /* @__PURE__ */ T(x, { gap: "xx-small", alignItems: "start", as: "div", children: [
1116
- /* @__PURE__ */ i(x.Item, { as: "div", children: /* @__PURE__ */ i(bt, { color: "error" }) }),
1117
- /* @__PURE__ */ i(x.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ i(be, { maxLines: 3, children: t.highlightUnavailable }) })
1119
+ };
1120
+ function mt(t, e = "noHighlight") {
1121
+ return e === "sourceUnavailable" ? t.highlightSourceUnavailable : t.highlightUnavailable;
1122
+ }
1123
+ const gt = ({ reason: t } = {}) => {
1124
+ const { translations: e } = J();
1125
+ return /* @__PURE__ */ S(C, { gap: "xx-small", alignItems: "start", as: "div", children: [
1126
+ /* @__PURE__ */ i(C.Item, { as: "div", children: /* @__PURE__ */ i(St, { color: "error" }) }),
1127
+ /* @__PURE__ */ i(C.Item, { padding: "xxx-small none", shouldShrink: !0, children: /* @__PURE__ */ i(Se, { maxLines: 3, children: mt(e, t) }) })
1118
1128
  ] });
1119
- }, Xn = {
1129
+ }, Yn = {
1120
1130
  filter: null,
1121
1131
  courseFilter: null,
1122
1132
  currentPage: 1,
@@ -1126,7 +1136,7 @@ function Ee(t, e) {
1126
1136
  const n = typeof e == "number" ? Math.min(e, t) : t;
1127
1137
  return Math.max(1, n);
1128
1138
  }
1129
- function Vn(t, e) {
1139
+ function Zn(t, e) {
1130
1140
  switch (e.type) {
1131
1141
  case "SET_FILTER":
1132
1142
  return { ...t, filter: e.payload, currentPage: 1 };
@@ -1150,7 +1160,7 @@ function Vn(t, e) {
1150
1160
  return t;
1151
1161
  }
1152
1162
  }
1153
- function xo({
1163
+ function ko({
1154
1164
  api: t,
1155
1165
  courseId: e,
1156
1166
  enableCourseFilter: n = !1,
@@ -1158,109 +1168,109 @@ function xo({
1158
1168
  pageSize: r = 16,
1159
1169
  focusNoteId: s
1160
1170
  }) {
1161
- var ee;
1162
- const [l, a] = Ye(Vn, Xn), { filter: m, courseFilter: c, currentPage: p, totalPages: d } = l;
1163
- W(() => {
1171
+ var se;
1172
+ const [l, a] = Ye(Zn, Yn), { filter: m, courseFilter: u, currentPage: f, totalPages: c } = l;
1173
+ q(() => {
1164
1174
  a({ type: "SET_PAGE", payload: 1 });
1165
1175
  }, [r]);
1166
- const h = n ? c : e, E = (p - 1) * r, y = !!o, b = {
1176
+ const h = n ? u : e, N = (f - 1) * r, p = !!o, x = {
1167
1177
  ...h ? { courseId: h } : {},
1168
1178
  ...m ? { reactions: [m] } : {},
1169
1179
  ...o ? { learningObject: o } : {}
1170
1180
  }, {
1171
- data: g,
1172
- isLoading: Q,
1173
- isError: j
1181
+ data: y,
1182
+ isLoading: k,
1183
+ isError: z
1174
1184
  } = it({
1175
1185
  api: t,
1176
- filter: b,
1177
- offset: E,
1186
+ filter: x,
1187
+ offset: N,
1178
1188
  pageSize: r,
1179
- enabled: !y
1189
+ enabled: !p
1180
1190
  }), {
1181
- data: N,
1182
- isLoading: I,
1183
- isError: B
1191
+ data: b,
1192
+ isLoading: T,
1193
+ isError: P
1184
1194
  } = lt({
1185
1195
  api: t,
1186
1196
  courseId: h ?? void 0,
1187
1197
  learningObject: o,
1188
- enabled: y
1189
- }), D = he(() => {
1190
- const O = (N == null ? void 0 : N.notes) ?? [];
1191
- return m ? O.filter((Y) => Y.reaction.includes(m)) : O;
1192
- }, [N, m]), P = F(null);
1193
- W(() => {
1198
+ enabled: p
1199
+ }), D = pe(() => {
1200
+ const A = (b == null ? void 0 : b.notes) ?? [];
1201
+ return m ? A.filter((Y) => Y.reaction.includes(m)) : A;
1202
+ }, [b, m]), G = F(null);
1203
+ q(() => {
1194
1204
  if (!s) {
1195
- P.current = null;
1205
+ G.current = null;
1196
1206
  return;
1197
1207
  }
1198
- if (P.current === s) return;
1199
- const O = D.findIndex((de) => de.id === s);
1200
- if (O === -1) return;
1201
- P.current = s;
1202
- const Y = Math.floor(O / r) + 1;
1203
- Y !== p && a({ type: "FOCUS_PAGE", payload: Y });
1204
- }, [s, D, r, p]);
1205
- const S = y ? D.slice(E, E + r) : (g == null ? void 0 : g.notes) ?? [], w = y ? I : Q, C = y ? B : j, $ = y ? Math.max(1, Math.ceil(D.length / r)) : ((ee = g == null ? void 0 : g.pageInfo) == null ? void 0 : ee.totalNrOfPages) ?? void 0, re = y ? { totalCount: D.length, totalNrOfPages: $ } : g == null ? void 0 : g.pageInfo;
1206
- W(() => {
1207
- a({ type: "SET_TOTAL_PAGES", payload: $ });
1208
- }, [$]);
1209
- const z = K((O) => {
1210
- a({ type: "SET_PAGE", payload: O });
1211
- }, []), ce = K(() => {
1208
+ if (G.current === s) return;
1209
+ const A = D.findIndex((ue) => ue.id === s);
1210
+ if (A === -1) return;
1211
+ G.current = s;
1212
+ const Y = Math.floor(A / r) + 1;
1213
+ Y !== f && a({ type: "FOCUS_PAGE", payload: Y });
1214
+ }, [s, D, r, f]);
1215
+ const E = p ? D.slice(N, N + r) : (y == null ? void 0 : y.notes) ?? [], w = p ? T : k, v = p ? P : z, j = p ? Math.max(1, Math.ceil(D.length / r)) : ((se = y == null ? void 0 : y.pageInfo) == null ? void 0 : se.totalNrOfPages) ?? void 0, ee = p ? { totalCount: D.length, totalNrOfPages: j } : y == null ? void 0 : y.pageInfo;
1216
+ q(() => {
1217
+ a({ type: "SET_TOTAL_PAGES", payload: j });
1218
+ }, [j]);
1219
+ const Q = K((A) => {
1220
+ a({ type: "SET_PAGE", payload: A });
1221
+ }, []), ae = K(() => {
1212
1222
  a({
1213
1223
  type: "INCREMENT_PAGE"
1214
1224
  /* IncrementPage */
1215
1225
  });
1216
- }, []), se = K(() => {
1226
+ }, []), de = K(() => {
1217
1227
  a({
1218
1228
  type: "DECREMENT_PAGE"
1219
1229
  /* DecrementPage */
1220
1230
  });
1221
- }, []), le = K((O) => {
1222
- a({ type: "SET_FILTER", payload: O });
1223
- }, []), J = K((O) => {
1224
- a({ type: "SET_COURSE_FILTER", payload: O });
1231
+ }, []), te = K((A) => {
1232
+ a({ type: "SET_FILTER", payload: A });
1233
+ }, []), re = K((A) => {
1234
+ a({ type: "SET_COURSE_FILTER", payload: A });
1225
1235
  }, []);
1226
1236
  return {
1227
- notes: S,
1228
- pageInfo: re,
1237
+ notes: E,
1238
+ pageInfo: ee,
1229
1239
  isLoading: w,
1230
- isError: C,
1240
+ isError: v,
1231
1241
  filter: m,
1232
- courseFilter: c,
1233
- currentPage: p,
1234
- totalPages: d,
1235
- setFilter: le,
1236
- setCourseFilter: J,
1237
- setPage: z,
1238
- fetchNextPage: ce,
1239
- fetchPreviousPage: se
1242
+ courseFilter: u,
1243
+ currentPage: f,
1244
+ totalPages: c,
1245
+ setFilter: te,
1246
+ setCourseFilter: re,
1247
+ setPage: Q,
1248
+ fetchNextPage: ae,
1249
+ fetchPreviousPage: de
1240
1250
  };
1241
1251
  }
1242
- const xe = "all";
1243
- function Ro({ filter: t, setFilter: e }) {
1244
- const { translations: n } = Z(), o = he(
1252
+ const Re = "all";
1253
+ function Oo({ filter: t, setFilter: e }) {
1254
+ const { translations: n } = J(), o = pe(
1245
1255
  () => [
1246
- { label: n.allNotes, value: xe },
1247
- { label: n.important, value: k.IMPORTANT },
1248
- { label: n.unclear, value: k.CONFUSING }
1256
+ { label: n.allNotes, value: Re },
1257
+ { label: n.important, value: L.IMPORTANT },
1258
+ { label: n.unclear, value: L.CONFUSING }
1249
1259
  ],
1250
1260
  [n]
1251
1261
  ), r = K(
1252
1262
  (l, { value: a }) => {
1253
- e(!a || a === xe ? null : a);
1263
+ e(!a || a === Re ? null : a);
1254
1264
  },
1255
1265
  [e]
1256
1266
  );
1257
1267
  return {
1258
- filterElement: he(
1268
+ filterElement: pe(
1259
1269
  () => /* @__PURE__ */ i(
1260
1270
  He,
1261
1271
  {
1262
1272
  renderLabel: n.filter,
1263
- value: t ?? xe,
1273
+ value: t ?? Re,
1264
1274
  onChange: r,
1265
1275
  children: o.map((l) => /* @__PURE__ */ i(He.Option, { id: l.value, value: l.value, children: l.label }, l.value))
1266
1276
  }
@@ -1271,44 +1281,45 @@ function Ro({ filter: t, setFilter: e }) {
1271
1281
  handleReactionFilterChange: r
1272
1282
  };
1273
1283
  }
1274
- const Qn = ({ hasActiveFilter: t = !1 }) => {
1275
- const { translations: e } = Z(), n = t ? e.nothingHereYet : e.emptyStateHeading, o = t ? e.adjustFiltersOrCreate : e.emptyStateDescription;
1276
- return /* @__PURE__ */ i(V, { as: "div", textAlign: "center", children: /* @__PURE__ */ T(x, { direction: "column", alignItems: "center", gap: "small", children: [
1284
+ const Jn = ({ hasActiveFilter: t = !1 }) => {
1285
+ const { translations: e } = J(), n = t ? e.nothingHereYet : e.emptyStateHeading, o = t ? e.adjustFiltersOrCreate : e.emptyStateDescription;
1286
+ return /* @__PURE__ */ i(V, { as: "div", textAlign: "center", children: /* @__PURE__ */ S(C, { direction: "column", alignItems: "center", gap: "small", children: [
1277
1287
  !t && /* @__PURE__ */ i(Tt, { size: "medium" }),
1278
- /* @__PURE__ */ i(Se, { level: "h3", children: n }),
1279
- /* @__PURE__ */ i(te, { color: "secondary", children: o })
1288
+ /* @__PURE__ */ i(ve, { level: "h3", children: n }),
1289
+ /* @__PURE__ */ i(Z, { color: "secondary", children: o }),
1290
+ !t && /* @__PURE__ */ i(Z, { color: "secondary", children: e.emptyStatePrecision })
1280
1291
  ] }) });
1281
- }, Yn = {
1282
- [k.IMPORTANT]: {
1292
+ }, eo = {
1293
+ [L.IMPORTANT]: {
1283
1294
  color: "success",
1284
1295
  translationKey: "important",
1285
- icon: /* @__PURE__ */ i(Ae, { size: "x-small" })
1296
+ icon: /* @__PURE__ */ i(De, { size: "x-small" })
1286
1297
  },
1287
- [k.CONFUSING]: {
1298
+ [L.CONFUSING]: {
1288
1299
  color: "error",
1289
1300
  translationKey: "unclear",
1290
- icon: /* @__PURE__ */ i(Le, { size: "x-small" })
1301
+ icon: /* @__PURE__ */ i(Ae, { size: "x-small" })
1291
1302
  }
1292
- }, gt = ({ type: t, onTypeChange: e, renderAsMenuTrigger: n = !1 }) => {
1293
- const { translations: o } = Z(), r = Yn[t], s = o[r.translationKey], [l, a] = G(!1), m = F(null), c = F(null), p = F(null), d = K(
1303
+ }, ht = ({ type: t, onTypeChange: e, renderAsMenuTrigger: n = !1 }) => {
1304
+ const { translations: o } = J(), r = eo[t], s = o[r.translationKey], [l, a] = W(!1), m = F(null), u = F(null), f = F(null), c = K(
1294
1305
  (h) => {
1295
1306
  e == null || e(h), a(!1);
1296
1307
  },
1297
1308
  [e]
1298
1309
  );
1299
- return W(() => {
1310
+ return q(() => {
1300
1311
  if (!l) return;
1301
- const h = (y) => {
1302
- y.key === "Escape" && y.stopPropagation();
1303
- }, E = (y) => {
1304
- var b;
1305
- y.key === "Escape" && (y.stopPropagation(), a(!1), (b = p.current) == null || b.focus());
1312
+ const h = (p) => {
1313
+ p.key === "Escape" && p.stopPropagation();
1314
+ }, N = (p) => {
1315
+ var x;
1316
+ p.key === "Escape" && (p.stopPropagation(), a(!1), (x = f.current) == null || x.focus());
1306
1317
  };
1307
- return document.addEventListener("keydown", h, !0), document.addEventListener("keyup", E, !0), () => {
1308
- document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", E, !0);
1318
+ return document.addEventListener("keydown", h, !0), document.addEventListener("keyup", N, !0), () => {
1319
+ document.removeEventListener("keydown", h, !0), document.removeEventListener("keyup", N, !0);
1309
1320
  };
1310
- }, [l]), n && e ? /* @__PURE__ */ T(
1311
- ue,
1321
+ }, [l]), n && e ? /* @__PURE__ */ S(
1322
+ fe,
1312
1323
  {
1313
1324
  placement: "bottom start",
1314
1325
  show: l,
@@ -1316,28 +1327,28 @@ const Qn = ({ hasActiveFilter: t = !1 }) => {
1316
1327
  shouldHideOnSelect: !0,
1317
1328
  shouldFocusTriggerOnClose: !0,
1318
1329
  trigger: /* @__PURE__ */ i(
1319
- Ue,
1330
+ $e,
1320
1331
  {
1321
1332
  color: r.color,
1322
1333
  renderIcon: r.icon,
1323
1334
  elementRef: (h) => {
1324
- p.current = h;
1335
+ f.current = h;
1325
1336
  },
1326
1337
  children: s
1327
1338
  }
1328
1339
  ),
1329
1340
  children: [
1330
- /* @__PURE__ */ T(ue.Item, { ref: m, onClick: () => d(k.CONFUSING), children: [
1331
- /* @__PURE__ */ i(Le, { size: "x-small" }),
1341
+ /* @__PURE__ */ S(fe.Item, { ref: m, onClick: () => c(L.CONFUSING), children: [
1342
+ /* @__PURE__ */ i(Ae, { size: "x-small" }),
1332
1343
  ` ${o.markUnclear}`
1333
1344
  ] }),
1334
- /* @__PURE__ */ T(ue.Item, { ref: c, onClick: () => d(k.IMPORTANT), children: [
1335
- /* @__PURE__ */ i(Ae, { size: "x-small" }),
1345
+ /* @__PURE__ */ S(fe.Item, { ref: u, onClick: () => c(L.IMPORTANT), children: [
1346
+ /* @__PURE__ */ i(De, { size: "x-small" }),
1336
1347
  ` ${o.markImportant}`
1337
1348
  ] })
1338
1349
  ]
1339
1350
  }
1340
- ) : /* @__PURE__ */ i(V, { display: "inline-flex", children: /* @__PURE__ */ i(Ue, { color: r.color, renderIcon: r.icon, children: s }) });
1351
+ ) : /* @__PURE__ */ i(V, { display: "inline-flex", children: /* @__PURE__ */ i($e, { color: r.color, renderIcon: r.icon, children: s }) });
1341
1352
  };
1342
1353
  function Ke(t, e) {
1343
1354
  return (t instanceof Date ? t : new Date(t)).toLocaleString(e, {
@@ -1346,59 +1357,62 @@ function Ke(t, e) {
1346
1357
  day: "numeric"
1347
1358
  });
1348
1359
  }
1349
- const Zn = ({
1360
+ const to = ({
1350
1361
  noteId: t,
1351
1362
  date: e,
1352
1363
  highlight: n,
1353
- note: o,
1354
- type: r,
1355
- onClick: s,
1356
- onDelete: l,
1357
- onSaveNote: a,
1358
- onTypeChange: m,
1359
- isActive: c,
1360
- isPanelView: p = !1,
1361
- courseName: d,
1362
- locale: h,
1363
- highlightTheme: E,
1364
- renderLink: y,
1365
- href: b
1364
+ highlightUnavailableReason: o,
1365
+ note: r,
1366
+ type: s,
1367
+ onClick: l,
1368
+ onDelete: a,
1369
+ onSaveNote: m,
1370
+ onTypeChange: u,
1371
+ isActive: f,
1372
+ isPanelView: c = !1,
1373
+ courseName: h,
1374
+ locale: N,
1375
+ highlightTheme: p,
1376
+ renderLink: x,
1377
+ href: y
1366
1378
  }) => {
1367
- const { translations: g } = Z(), [Q, j] = G(!1), [N, I] = G(!1), [B, D] = G(o || ""), [P, S] = G(!1), [w, C] = G(!1), [$, re] = G(!1), [z, ce] = G(!1), se = F(null), le = K((u) => {
1368
- se.current = u;
1369
- }, []), J = F(null), ee = F(null), O = F(!1), Y = F(null), de = F(null), _ = F(!1);
1370
- W(() => {
1371
- var u, H;
1372
- c ? ((u = se.current) == null || u.scrollIntoView({ behavior: "smooth", block: "nearest" }), (H = se.current) == null || H.focus()) : S(!1);
1373
- }, [c]), W(() => {
1374
- var u, H;
1375
- N ? (O.current = !0, (u = J.current) == null || u.focus()) : O.current && (O.current = !1, (H = ee.current) == null || H.focus());
1376
- }, [N]), W(() => {
1377
- if (!P && _.current) {
1378
- _.current = !1;
1379
- const u = Y.current;
1380
- u != null && u.isConnected && u.focus();
1379
+ const { translations: k } = J(), [z, b] = W(!1), [T, P] = W(!1), [D, G] = W(r || ""), [E, w] = W(!1), [v, j] = W(!1), [ee, Q] = W(!1), [ae, de] = W(!1), te = F(null), re = K((g) => {
1380
+ te.current = g;
1381
+ }, []), se = F(null), A = F(null), Y = F(!1), ue = F(null), M = F(null), I = F(!1);
1382
+ q(() => {
1383
+ var g, $;
1384
+ f ? ((g = te.current) == null || g.scrollIntoView({ behavior: "smooth", block: "nearest" }), ($ = te.current) == null || $.focus()) : w(!1);
1385
+ }, [f]), q(() => {
1386
+ var g, $;
1387
+ T ? (Y.current = !0, (g = se.current) == null || g.focus()) : Y.current && (Y.current = !1, ($ = A.current) == null || $.focus());
1388
+ }, [T]), q(() => {
1389
+ if (!E && I.current) {
1390
+ I.current = !1;
1391
+ const g = ue.current;
1392
+ g != null && g.isConnected && g.focus();
1381
1393
  }
1382
- }, [P]);
1383
- const v = K((u, H) => {
1384
- _.current = !H, S(!1);
1394
+ }, [E]);
1395
+ const _ = K((g, $) => {
1396
+ I.current = !$, w(!1);
1385
1397
  }, []);
1386
- W(() => {
1387
- if (!P) return;
1388
- const u = (q) => {
1389
- q.key === "Escape" && q.stopPropagation();
1390
- }, H = (q) => {
1391
- q.key === "Escape" && (q.stopPropagation(), v());
1398
+ q(() => {
1399
+ if (!E) return;
1400
+ const g = (ie) => {
1401
+ ie.key === "Escape" && ie.stopPropagation();
1402
+ }, $ = (ie) => {
1403
+ ie.key === "Escape" && (ie.stopPropagation(), _());
1392
1404
  };
1393
- return window.addEventListener("keydown", u, !0), window.addEventListener("keyup", H, !0), () => {
1394
- window.removeEventListener("keydown", u, !0), window.removeEventListener("keyup", H, !0);
1405
+ return window.addEventListener("keydown", g, !0), window.addEventListener("keyup", $, !0), () => {
1406
+ window.removeEventListener("keydown", g, !0), window.removeEventListener("keyup", $, !0);
1395
1407
  };
1396
- }, [P, v]);
1397
- const U = r === k.IMPORTANT ? g.important : g.unclear, M = (u) => {
1398
- u.key === "Enter" && (u.preventDefault(), s == null || s());
1399
- }, L = [g.note, U];
1400
- L.push(n || g.highlightUnavailable), o && L.push(o), e && L.push(Ke(e, h)), d && L.push(d);
1401
- const A = L.join(", "), R = /* @__PURE__ */ T(
1408
+ }, [E, _]);
1409
+ const B = s === L.IMPORTANT ? k.important : k.unclear, H = (g) => {
1410
+ g.key === "Enter" && (g.preventDefault(), l == null || l());
1411
+ }, O = [k.note, B];
1412
+ O.push(
1413
+ n || mt(k, o)
1414
+ ), r && O.push(r), e && O.push(Ke(e, N)), h && O.push(h);
1415
+ const R = O.join(", "), U = /* @__PURE__ */ S(
1402
1416
  V,
1403
1417
  {
1404
1418
  as: "div",
@@ -1407,17 +1421,17 @@ const Zn = ({
1407
1421
  borderRadius: "medium",
1408
1422
  padding: "small",
1409
1423
  position: "relative",
1410
- role: b ? void 0 : c || N ? "group" : "button",
1411
- "aria-label": b ? void 0 : A,
1412
- "aria-pressed": b || c || N ? void 0 : c,
1413
- tabIndex: b || c ? -1 : 0,
1424
+ role: y ? void 0 : f || T ? "group" : "button",
1425
+ "aria-label": y ? void 0 : R,
1426
+ "aria-pressed": y || f || T ? void 0 : f,
1427
+ tabIndex: y || f ? -1 : 0,
1414
1428
  "data-testid": `note-card-${t}`,
1415
- elementRef: le,
1416
- onClick: c ? void 0 : s,
1417
- onMouseEnter: () => j(!0),
1418
- onMouseLeave: () => j(!1),
1419
- onKeyDown: c ? void 0 : M,
1420
- cursor: N ? "default" : "pointer",
1429
+ elementRef: re,
1430
+ onClick: f ? void 0 : l,
1431
+ onMouseEnter: () => b(!0),
1432
+ onMouseLeave: () => b(!1),
1433
+ onKeyDown: f ? void 0 : H,
1434
+ cursor: T ? "default" : "pointer",
1421
1435
  children: [
1422
1436
  /* @__PURE__ */ i(
1423
1437
  "div",
@@ -1425,15 +1439,15 @@ const Zn = ({
1425
1439
  "data-testid": `note-card-${t}-content`,
1426
1440
  style: {
1427
1441
  height: "100%",
1428
- opacity: c && P && l ? 0.25 : void 0
1442
+ opacity: f && E && a ? 0.25 : void 0
1429
1443
  },
1430
- children: /* @__PURE__ */ T(x, { direction: "column", gap: "small", height: "100%", children: [
1444
+ children: /* @__PURE__ */ S(C, { direction: "column", gap: "small", height: "100%", children: [
1431
1445
  /* @__PURE__ */ i(
1432
- gt,
1446
+ ht,
1433
1447
  {
1434
- type: r,
1435
- onTypeChange: p && m ? (u) => m(t, u) : void 0,
1436
- renderAsMenuTrigger: p && !!m && !!c
1448
+ type: s,
1449
+ onTypeChange: c && u ? (g) => u(t, g) : void 0,
1450
+ renderAsMenuTrigger: c && !!u && !!f
1437
1451
  }
1438
1452
  ),
1439
1453
  n ? /* @__PURE__ */ i(
@@ -1444,56 +1458,56 @@ const Zn = ({
1444
1458
  overflowWrap: "break-word",
1445
1459
  whiteSpace: "pre-wrap"
1446
1460
  },
1447
- children: /* @__PURE__ */ i(te, { children: c && p ? /* @__PURE__ */ i(
1448
- we,
1461
+ children: /* @__PURE__ */ i(Z, { children: f && c ? /* @__PURE__ */ i(
1462
+ ke,
1449
1463
  {
1450
- type: r,
1451
- isCardActive: !!c || Q,
1452
- theme: E,
1464
+ type: s,
1465
+ isCardActive: !!f || z,
1466
+ theme: p,
1453
1467
  children: n
1454
1468
  }
1455
- ) : /* @__PURE__ */ T(Xe, { children: [
1456
- w && /* @__PURE__ */ i(pe, { children: n }),
1457
- /* @__PURE__ */ i("span", { "aria-hidden": w, style: { display: "block" }, children: /* @__PURE__ */ i(be, { maxLines: 3, truncate: "word", onUpdate: C, children: /* @__PURE__ */ i(
1458
- we,
1469
+ ) : /* @__PURE__ */ S(Xe, { children: [
1470
+ v && /* @__PURE__ */ i(ye, { children: n }),
1471
+ /* @__PURE__ */ i("span", { "aria-hidden": v, style: { display: "block" }, children: /* @__PURE__ */ i(Se, { maxLines: 3, truncate: "word", onUpdate: j, children: /* @__PURE__ */ i(
1472
+ ke,
1459
1473
  {
1460
- type: r,
1461
- isCardActive: !!c || Q,
1462
- theme: E,
1474
+ type: s,
1475
+ isCardActive: !!f || z,
1476
+ theme: p,
1463
1477
  children: n
1464
1478
  }
1465
1479
  ) }) })
1466
1480
  ] }) })
1467
1481
  }
1468
- ) : /* @__PURE__ */ i(mt, {}),
1469
- /* @__PURE__ */ i(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ T(x, { direction: "column", gap: "small", height: "100%", children: [
1470
- N && p ? /* @__PURE__ */ T(x, { direction: "column", gap: "x-small", margin: "xx-small", children: [
1482
+ ) : /* @__PURE__ */ i(gt, { reason: o }),
1483
+ /* @__PURE__ */ i(C.Item, { shouldGrow: !0, children: /* @__PURE__ */ S(C, { direction: "column", gap: "small", height: "100%", children: [
1484
+ T && c ? /* @__PURE__ */ S(C, { direction: "column", gap: "x-small", margin: "xx-small", children: [
1471
1485
  /* @__PURE__ */ i(
1472
1486
  Ze,
1473
1487
  {
1474
- label: /* @__PURE__ */ i(pe, { children: g.editNote }),
1475
- value: B,
1476
- onChange: (u) => D(u.target.value),
1477
- placeholder: g.addNoteOptional,
1478
- textareaRef: (u) => {
1479
- J.current = u;
1488
+ label: /* @__PURE__ */ i(ye, { children: k.editNote }),
1489
+ value: D,
1490
+ onChange: (g) => G(g.target.value),
1491
+ placeholder: k.addNoteOptional,
1492
+ textareaRef: (g) => {
1493
+ se.current = g;
1480
1494
  }
1481
1495
  }
1482
1496
  ),
1483
- /* @__PURE__ */ T(x, { gap: "xx-small", children: [
1484
- /* @__PURE__ */ i(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1497
+ /* @__PURE__ */ S(C, { gap: "xx-small", children: [
1498
+ /* @__PURE__ */ i(C.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1485
1499
  ne,
1486
1500
  {
1487
1501
  display: "block",
1488
1502
  size: "small",
1489
1503
  "data-testid": `note-card-${t}-cancel`,
1490
1504
  onClick: () => {
1491
- D(o || ""), I(!1);
1505
+ G(r || ""), P(!1);
1492
1506
  },
1493
- children: g.cancel
1507
+ children: k.cancel
1494
1508
  }
1495
1509
  ) }),
1496
- /* @__PURE__ */ i(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1510
+ /* @__PURE__ */ i(C.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1497
1511
  ne,
1498
1512
  {
1499
1513
  display: "block",
@@ -1501,13 +1515,13 @@ const Zn = ({
1501
1515
  size: "small",
1502
1516
  "data-testid": `note-card-${t}-save`,
1503
1517
  onClick: () => {
1504
- a == null || a(t, B.trim()), I(!1);
1518
+ m == null || m(t, D.trim()), P(!1);
1505
1519
  },
1506
- children: g.save
1520
+ children: k.save
1507
1521
  }
1508
1522
  ) })
1509
1523
  ] })
1510
- ] }) : o ? /* @__PURE__ */ i(
1524
+ ] }) : r ? /* @__PURE__ */ i(
1511
1525
  "div",
1512
1526
  {
1513
1527
  style: {
@@ -1515,86 +1529,86 @@ const Zn = ({
1515
1529
  overflowWrap: "break-word",
1516
1530
  whiteSpace: "pre-wrap"
1517
1531
  },
1518
- children: c && p ? /* @__PURE__ */ T(te, { children: [
1519
- o,
1532
+ children: f && c ? /* @__PURE__ */ S(Z, { children: [
1533
+ r,
1520
1534
  " ",
1521
1535
  /* @__PURE__ */ i(
1522
- me,
1536
+ ge,
1523
1537
  {
1524
1538
  size: "small",
1525
1539
  withBackground: !1,
1526
1540
  withBorder: !1,
1527
1541
  margin: "xx-small 0 0 xxx-small",
1528
- screenReaderLabel: g.editNote,
1542
+ screenReaderLabel: k.editNote,
1529
1543
  "data-testid": `note-card-${t}-edit`,
1530
- elementRef: (u) => {
1531
- ee.current = u;
1544
+ elementRef: (g) => {
1545
+ A.current = g;
1532
1546
  },
1533
- onClick: (u) => {
1534
- u.stopPropagation(), I(!0);
1547
+ onClick: (g) => {
1548
+ g.stopPropagation(), P(!0);
1535
1549
  },
1536
- children: /* @__PURE__ */ i(Re, {})
1550
+ children: /* @__PURE__ */ i(we, {})
1537
1551
  }
1538
1552
  )
1539
- ] }) : /* @__PURE__ */ T(te, { children: [
1540
- $ && /* @__PURE__ */ i(pe, { children: o }),
1541
- /* @__PURE__ */ i("span", { "aria-hidden": $, style: { display: "block" }, children: /* @__PURE__ */ i(be, { maxLines: 3, truncate: "word", onUpdate: re, children: o }) })
1553
+ ] }) : /* @__PURE__ */ S(Z, { children: [
1554
+ ee && /* @__PURE__ */ i(ye, { children: r }),
1555
+ /* @__PURE__ */ i("span", { "aria-hidden": ee, style: { display: "block" }, children: /* @__PURE__ */ i(Se, { maxLines: 3, truncate: "word", onUpdate: Q, children: r }) })
1542
1556
  ] })
1543
1557
  }
1544
- ) : p && c ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ T(te, { color: "secondary", children: [
1545
- g.addNotePrompt,
1558
+ ) : c && f ? /* @__PURE__ */ i("div", { children: /* @__PURE__ */ S(Z, { color: "secondary", children: [
1559
+ k.addNotePrompt,
1546
1560
  " ",
1547
1561
  /* @__PURE__ */ i(
1548
- me,
1562
+ ge,
1549
1563
  {
1550
1564
  size: "small",
1551
1565
  withBackground: !1,
1552
1566
  withBorder: !1,
1553
1567
  margin: "xx-small 0 0 xxx-small",
1554
- screenReaderLabel: g.editNote,
1568
+ screenReaderLabel: k.editNote,
1555
1569
  "data-testid": `note-card-${t}-edit`,
1556
- elementRef: (u) => {
1557
- ee.current = u;
1570
+ elementRef: (g) => {
1571
+ A.current = g;
1558
1572
  },
1559
- onClick: (u) => {
1560
- u.stopPropagation(), I(!0);
1573
+ onClick: (g) => {
1574
+ g.stopPropagation(), P(!0);
1561
1575
  },
1562
- children: /* @__PURE__ */ i(Re, {})
1576
+ children: /* @__PURE__ */ i(we, {})
1563
1577
  }
1564
1578
  )
1565
1579
  ] }) }) : null,
1566
- /* @__PURE__ */ T(x, { justifyItems: "space-between", alignItems: "center", margin: "auto 0 0 0", children: [
1567
- /* @__PURE__ */ i(te, { as: "div", size: "small", color: "secondary", children: Ke(e, h) }),
1568
- c && l && /* @__PURE__ */ i(
1569
- me,
1580
+ /* @__PURE__ */ S(C, { justifyItems: "space-between", alignItems: "center", margin: "auto 0 0 0", children: [
1581
+ /* @__PURE__ */ i(Z, { as: "div", size: "small", color: "secondary", children: Ke(e, N) }),
1582
+ f && a && /* @__PURE__ */ i(
1583
+ ge,
1570
1584
  {
1571
1585
  size: "small",
1572
1586
  withBackground: !1,
1573
1587
  withBorder: !1,
1574
1588
  color: "danger",
1575
1589
  margin: "xx-small",
1576
- screenReaderLabel: g.deleteNote,
1590
+ screenReaderLabel: k.deleteNote,
1577
1591
  "data-testid": `note-card-${t}-delete`,
1578
- elementRef: (u) => {
1579
- Y.current = u;
1592
+ elementRef: (g) => {
1593
+ ue.current = g;
1580
1594
  },
1581
- onClick: (u) => {
1582
- u.stopPropagation(), _.current = !1, S(!0);
1595
+ onClick: (g) => {
1596
+ g.stopPropagation(), I.current = !1, w(!0);
1583
1597
  },
1584
1598
  children: /* @__PURE__ */ i(Te, {})
1585
1599
  }
1586
1600
  )
1587
1601
  ] }),
1588
- d && /* @__PURE__ */ T(
1589
- te,
1602
+ h && /* @__PURE__ */ S(
1603
+ Z,
1590
1604
  {
1591
1605
  as: "div",
1592
1606
  size: "small",
1593
1607
  color: "secondary",
1594
1608
  "data-testid": `note-card-${t}-course`,
1595
1609
  children: [
1596
- z && /* @__PURE__ */ i(pe, { children: d }),
1597
- /* @__PURE__ */ i("span", { "aria-hidden": z, style: { display: "block" }, children: /* @__PURE__ */ i(be, { maxLines: 1, onUpdate: ce, children: d }) })
1610
+ ae && /* @__PURE__ */ i(ye, { children: h }),
1611
+ /* @__PURE__ */ i("span", { "aria-hidden": ae, style: { display: "block" }, children: /* @__PURE__ */ i(Se, { maxLines: 1, onUpdate: de, children: h }) })
1598
1612
  ]
1599
1613
  }
1600
1614
  )
@@ -1602,19 +1616,19 @@ const Zn = ({
1602
1616
  ] })
1603
1617
  }
1604
1618
  ),
1605
- c && P && l && /* @__PURE__ */ i(
1606
- Ct,
1619
+ f && E && a && /* @__PURE__ */ i(
1620
+ It,
1607
1621
  {
1608
1622
  open: !0,
1609
1623
  as: "div",
1610
- label: g.deleteNoteConfirmation,
1624
+ label: k.deleteNoteConfirmation,
1611
1625
  shouldContainFocus: !0,
1612
1626
  shouldFocusOnOpen: !0,
1613
- defaultFocusElement: () => de.current,
1627
+ defaultFocusElement: () => M.current,
1614
1628
  shouldCloseOnDocumentClick: !0,
1615
1629
  shouldCloseOnEscape: !1,
1616
1630
  shouldReturnFocus: !1,
1617
- onDismiss: v,
1631
+ onDismiss: _,
1618
1632
  children: /* @__PURE__ */ i(
1619
1633
  V,
1620
1634
  {
@@ -1628,8 +1642,8 @@ const Zn = ({
1628
1642
  insetInlineStart: "0",
1629
1643
  insetInlineEnd: "0",
1630
1644
  stacking: "above",
1631
- children: /* @__PURE__ */ T(
1632
- x,
1645
+ children: /* @__PURE__ */ S(
1646
+ C,
1633
1647
  {
1634
1648
  direction: "column",
1635
1649
  justifyItems: "center",
@@ -1645,10 +1659,10 @@ const Zn = ({
1645
1659
  withBackground: !1,
1646
1660
  renderIcon: /* @__PURE__ */ i(Te, {}),
1647
1661
  "data-testid": `note-card-${t}-confirm-delete`,
1648
- onClick: (u) => {
1649
- u.stopPropagation(), l(t), S(!1);
1662
+ onClick: (g) => {
1663
+ g.stopPropagation(), a(t), w(!1);
1650
1664
  },
1651
- children: g.deleteNote
1665
+ children: k.deleteNote
1652
1666
  }
1653
1667
  ),
1654
1668
  /* @__PURE__ */ i(
@@ -1657,13 +1671,13 @@ const Zn = ({
1657
1671
  display: "block",
1658
1672
  withBackground: !1,
1659
1673
  "data-testid": `note-card-${t}-cancel-delete`,
1660
- elementRef: (u) => {
1661
- de.current = u;
1674
+ elementRef: (g) => {
1675
+ M.current = g;
1662
1676
  },
1663
- onClick: (u) => {
1664
- u.stopPropagation(), v();
1677
+ onClick: (g) => {
1678
+ g.stopPropagation(), _();
1665
1679
  },
1666
- children: g.cancel
1680
+ children: k.cancel
1667
1681
  }
1668
1682
  )
1669
1683
  ]
@@ -1676,8 +1690,8 @@ const Zn = ({
1676
1690
  ]
1677
1691
  }
1678
1692
  );
1679
- return b && y ? y({ href: b, children: R, ariaLabel: A }) : R;
1680
- }, Jn = {
1693
+ return y && x ? x({ href: y, children: U, ariaLabel: R }) : U;
1694
+ }, no = {
1681
1695
  display: "grid",
1682
1696
  gap: "1rem",
1683
1697
  boxSizing: "border-box",
@@ -1685,7 +1699,7 @@ const Zn = ({
1685
1699
  margin: 0,
1686
1700
  padding: 0,
1687
1701
  listStyle: "none"
1688
- }, wo = ({
1702
+ }, Lo = ({
1689
1703
  notes: t,
1690
1704
  isLoading: e,
1691
1705
  isError: n,
@@ -1695,92 +1709,93 @@ const Zn = ({
1695
1709
  onNoteSelect: l,
1696
1710
  onNoteDelete: a,
1697
1711
  onNoteSave: m,
1698
- onNoteTypeChange: c,
1699
- onNotesEmptied: p,
1700
- selectedNoteId: d,
1712
+ onNoteTypeChange: u,
1713
+ onNotesEmptied: f,
1714
+ selectedNoteId: c,
1701
1715
  hasActiveFilter: h = !1,
1702
- columnCount: E = 1,
1703
- highlightTheme: y,
1704
- locale: b,
1705
- courseNames: g,
1706
- renderNoteLink: Q,
1707
- noteHref: j
1716
+ columnCount: N = 1,
1717
+ highlightTheme: p,
1718
+ locale: x,
1719
+ courseNames: y,
1720
+ renderNoteLink: k,
1721
+ noteHref: z
1708
1722
  }) => {
1709
- const { translations: N } = Z(), I = F(null), B = F(null), D = K(
1710
- (S) => {
1711
- const w = t.findIndex(($) => $.id === S);
1712
- let C = null;
1713
- t.length > 1 && (C = w > 0 ? t[w - 1].id : t[1].id), B.current = { targetId: C }, a == null || a(S);
1723
+ const { translations: b } = J(), T = F(null), P = F(null), D = K(
1724
+ (E) => {
1725
+ const w = t.findIndex((j) => j.id === E);
1726
+ let v = null;
1727
+ t.length > 1 && (v = w > 0 ? t[w - 1].id : t[1].id), P.current = { targetId: v }, a == null || a(E);
1714
1728
  },
1715
1729
  [t, a]
1716
1730
  );
1717
- if (W(() => {
1731
+ if (q(() => {
1718
1732
  var w;
1719
- const S = B.current;
1720
- if (S)
1721
- if (B.current = null, S.targetId === null)
1722
- p == null || p();
1733
+ const E = P.current;
1734
+ if (E)
1735
+ if (P.current = null, E.targetId === null)
1736
+ f == null || f();
1723
1737
  else {
1724
- const C = (w = I.current) == null ? void 0 : w.querySelector(
1725
- `[data-testid="note-card-${S.targetId}"]`
1738
+ const v = (w = T.current) == null ? void 0 : w.querySelector(
1739
+ `[data-testid="note-card-${E.targetId}"]`
1726
1740
  );
1727
- C == null || C.focus();
1741
+ v == null || v.focus();
1728
1742
  }
1729
- }, [t, p]), e)
1730
- return /* @__PURE__ */ i(V, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ i(It, { renderTitle: N.loadingNotes }) });
1743
+ }, [t, f]), e)
1744
+ return /* @__PURE__ */ i(V, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-loading", children: /* @__PURE__ */ i(xt, { renderTitle: b.loadingNotes }) });
1731
1745
  if (n)
1732
- return /* @__PURE__ */ i(V, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ i(Se, { level: "h4", children: N.failedToLoadNotes }) });
1746
+ return /* @__PURE__ */ i(V, { as: "div", textAlign: "center", padding: "large", "data-testid": "notes-error", children: /* @__PURE__ */ i(ve, { level: "h4", children: b.failedToLoadNotes }) });
1733
1747
  if (t.length === 0)
1734
- return /* @__PURE__ */ i(V, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ i(Qn, { hasActiveFilter: h }) });
1735
- const P = typeof o == "number" && typeof r == "number" && r > 1 && s !== void 0;
1736
- return /* @__PURE__ */ T(Xe, { children: [
1748
+ return /* @__PURE__ */ i(V, { as: "div", padding: "large", "data-testid": "empty-notes", children: /* @__PURE__ */ i(Jn, { hasActiveFilter: h }) });
1749
+ const G = typeof o == "number" && typeof r == "number" && r > 1 && s !== void 0;
1750
+ return /* @__PURE__ */ S(Xe, { children: [
1737
1751
  /* @__PURE__ */ i(
1738
1752
  "ul",
1739
1753
  {
1740
- ref: I,
1741
- style: { ...Jn, gridTemplateColumns: `repeat(${E}, minmax(0, 1fr))` },
1754
+ ref: T,
1755
+ style: { ...no, gridTemplateColumns: `repeat(${N}, minmax(0, 1fr))` },
1742
1756
  role: "list",
1743
1757
  "data-testid": "notes-grid",
1744
- children: t.map((S) => {
1758
+ children: t.map((E) => {
1745
1759
  var w;
1746
1760
  return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1747
- Zn,
1761
+ to,
1748
1762
  {
1749
- noteId: S.id,
1750
- date: S.createdAt,
1751
- type: S.reaction[0] ?? k.IMPORTANT,
1752
- highlight: (w = S.highlightData) == null ? void 0 : w.selectedText,
1753
- note: S.userText,
1754
- isActive: d === S.id,
1755
- isPanelView: !!d,
1756
- onClick: l ? () => l(S.id) : void 0,
1763
+ noteId: E.id,
1764
+ date: E.createdAt,
1765
+ type: E.reaction[0] ?? L.IMPORTANT,
1766
+ highlight: (w = E.highlightData) == null ? void 0 : w.selectedText,
1767
+ highlightUnavailableReason: E.highlightSourceUnavailable ? "sourceUnavailable" : void 0,
1768
+ note: E.userText,
1769
+ isActive: c === E.id,
1770
+ isPanelView: !!c,
1771
+ onClick: l ? () => l(E.id) : void 0,
1757
1772
  onDelete: a ? D : void 0,
1758
- onSaveNote: m ? (C, $) => m(C, $) : void 0,
1759
- onTypeChange: c ? (C, $) => c(C, $) : void 0,
1760
- highlightTheme: y,
1761
- locale: b,
1762
- courseName: g == null ? void 0 : g.get(S.courseId),
1763
- renderLink: Q,
1764
- href: j ? j(S.id, S) : void 0
1773
+ onSaveNote: m ? (v, j) => m(v, j) : void 0,
1774
+ onTypeChange: u ? (v, j) => u(v, j) : void 0,
1775
+ highlightTheme: p,
1776
+ locale: x,
1777
+ courseName: y == null ? void 0 : y.get(E.courseId),
1778
+ renderLink: k,
1779
+ href: z ? z(E.id, E) : void 0
1765
1780
  }
1766
- ) }, S.id);
1781
+ ) }, E.id);
1767
1782
  })
1768
1783
  }
1769
1784
  ),
1770
- P && /* @__PURE__ */ i(x, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ i(x.Item, { children: /* @__PURE__ */ i(
1771
- vt,
1785
+ G && /* @__PURE__ */ i(C, { justifyItems: "center", padding: "small", "data-testid": "notes-pagination", children: /* @__PURE__ */ i(C.Item, { children: /* @__PURE__ */ i(
1786
+ Ct,
1772
1787
  {
1773
1788
  as: "nav",
1774
1789
  variant: "input",
1775
- labelNext: N.nextPage,
1776
- labelPrev: N.previousPage,
1790
+ labelNext: b.nextPage,
1791
+ labelPrev: b.previousPage,
1777
1792
  currentPage: o,
1778
1793
  totalPageNumber: r,
1779
1794
  onPageChange: s
1780
1795
  }
1781
1796
  ) }) })
1782
1797
  ] });
1783
- }, ko = ({
1798
+ }, Ao = ({
1784
1799
  noteText: t,
1785
1800
  reaction: e,
1786
1801
  highlightText: n,
@@ -1791,34 +1806,34 @@ const Zn = ({
1791
1806
  onBack: a,
1792
1807
  editing: m = !1
1793
1808
  }) => {
1794
- const { translations: c } = Z(), [p, d] = G(m), [h, E] = G(t || ""), [y, b] = G(!1);
1795
- return /* @__PURE__ */ T(x, { direction: "column", gap: "small", "data-testid": "single-note", children: [
1796
- n != null ? /* @__PURE__ */ i(V, { as: "div", children: /* @__PURE__ */ i(te, { children: /* @__PURE__ */ i(we, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ i(mt, {}),
1797
- /* @__PURE__ */ i(gt, { type: e, onTypeChange: l, renderAsMenuTrigger: !!l }),
1798
- p ? /* @__PURE__ */ T(x, { direction: "column", gap: "x-small", children: [
1809
+ const { translations: u } = J(), [f, c] = W(m), [h, N] = W(t || ""), [p, x] = W(!1);
1810
+ return /* @__PURE__ */ S(C, { direction: "column", gap: "small", "data-testid": "single-note", children: [
1811
+ n != null ? /* @__PURE__ */ i(V, { as: "div", children: /* @__PURE__ */ i(Z, { children: /* @__PURE__ */ i(ke, { type: e, isCardActive: !0, theme: o, children: n }) }) }) : /* @__PURE__ */ i(gt, {}),
1812
+ /* @__PURE__ */ i(ht, { type: e, onTypeChange: l, renderAsMenuTrigger: !!l }),
1813
+ f ? /* @__PURE__ */ S(C, { direction: "column", gap: "x-small", children: [
1799
1814
  /* @__PURE__ */ i(
1800
1815
  Ze,
1801
1816
  {
1802
- label: c.addNoteOptional,
1817
+ label: u.addNoteOptional,
1803
1818
  value: h,
1804
- onChange: (g) => E(g.target.value),
1819
+ onChange: (y) => N(y.target.value),
1805
1820
  resize: "vertical"
1806
1821
  }
1807
1822
  ),
1808
- /* @__PURE__ */ T(x, { gap: "xx-small", children: [
1809
- /* @__PURE__ */ i(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1823
+ /* @__PURE__ */ S(C, { gap: "xx-small", children: [
1824
+ /* @__PURE__ */ i(C.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1810
1825
  ne,
1811
1826
  {
1812
1827
  display: "block",
1813
1828
  size: "small",
1814
1829
  "data-testid": "single-note-cancel",
1815
1830
  onClick: () => {
1816
- E(t || ""), d(!1);
1831
+ N(t || ""), c(!1);
1817
1832
  },
1818
- children: c.cancel
1833
+ children: u.cancel
1819
1834
  }
1820
1835
  ) }),
1821
- /* @__PURE__ */ i(x.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1836
+ /* @__PURE__ */ i(C.Item, { shouldGrow: !0, children: /* @__PURE__ */ i(
1822
1837
  ne,
1823
1838
  {
1824
1839
  display: "block",
@@ -1826,57 +1841,57 @@ const Zn = ({
1826
1841
  size: "small",
1827
1842
  "data-testid": "single-note-save",
1828
1843
  onClick: () => {
1829
- r(h), d(!1);
1844
+ r(h), c(!1);
1830
1845
  },
1831
- children: c.save
1846
+ children: u.save
1832
1847
  }
1833
1848
  ) })
1834
1849
  ] })
1835
- ] }) : /* @__PURE__ */ T(x, { direction: "column", gap: "small", children: [
1836
- t && /* @__PURE__ */ T(V, { as: "div", children: [
1837
- /* @__PURE__ */ i(Se, { level: "h4", margin: "0 0 xx-small 0", children: c.note }),
1838
- /* @__PURE__ */ i(te, { children: t })
1850
+ ] }) : /* @__PURE__ */ S(C, { direction: "column", gap: "small", children: [
1851
+ t && /* @__PURE__ */ S(V, { as: "div", children: [
1852
+ /* @__PURE__ */ i(ve, { level: "h4", margin: "0 0 xx-small 0", children: u.note }),
1853
+ /* @__PURE__ */ i(Z, { children: t })
1839
1854
  ] }),
1840
- /* @__PURE__ */ T(x, { justifyItems: "space-between", children: [
1855
+ /* @__PURE__ */ S(C, { justifyItems: "space-between", children: [
1841
1856
  /* @__PURE__ */ i(
1842
1857
  ne,
1843
1858
  {
1844
1859
  size: "small",
1845
- renderIcon: /* @__PURE__ */ i(St, {}),
1860
+ renderIcon: /* @__PURE__ */ i(vt, {}),
1846
1861
  "data-testid": "single-note-back",
1847
1862
  onClick: () => a == null ? void 0 : a(),
1848
- children: c.back
1863
+ children: u.back
1849
1864
  }
1850
1865
  ),
1851
- /* @__PURE__ */ T(x, { gap: "xx-small", children: [
1866
+ /* @__PURE__ */ S(C, { gap: "xx-small", children: [
1852
1867
  s && /* @__PURE__ */ i(
1853
- me,
1868
+ ge,
1854
1869
  {
1855
1870
  size: "small",
1856
1871
  withBackground: !1,
1857
1872
  withBorder: !1,
1858
1873
  color: "danger",
1859
- screenReaderLabel: c.deleteNote,
1874
+ screenReaderLabel: u.deleteNote,
1860
1875
  "data-testid": "single-note-delete",
1861
- onClick: () => b(!0),
1876
+ onClick: () => x(!0),
1862
1877
  children: /* @__PURE__ */ i(Te, {})
1863
1878
  }
1864
1879
  ),
1865
1880
  /* @__PURE__ */ i(
1866
- me,
1881
+ ge,
1867
1882
  {
1868
1883
  size: "small",
1869
1884
  withBackground: !1,
1870
1885
  withBorder: !1,
1871
- screenReaderLabel: c.editNote,
1886
+ screenReaderLabel: u.editNote,
1872
1887
  "data-testid": "single-note-edit",
1873
- onClick: () => d(!0),
1874
- children: /* @__PURE__ */ i(Re, {})
1888
+ onClick: () => c(!0),
1889
+ children: /* @__PURE__ */ i(we, {})
1875
1890
  }
1876
1891
  )
1877
1892
  ] })
1878
1893
  ] }),
1879
- y && s && /* @__PURE__ */ i(V, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ T(x, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
1894
+ p && s && /* @__PURE__ */ i(V, { as: "div", background: "primary", padding: "medium", borderRadius: "large", children: /* @__PURE__ */ S(C, { direction: "column", justifyItems: "center", alignItems: "center", gap: "x-small", children: [
1880
1895
  /* @__PURE__ */ i(
1881
1896
  ne,
1882
1897
  {
@@ -1886,9 +1901,9 @@ const Zn = ({
1886
1901
  renderIcon: /* @__PURE__ */ i(Te, {}),
1887
1902
  "data-testid": "single-note-confirm-delete",
1888
1903
  onClick: () => {
1889
- s(), b(!1);
1904
+ s(), x(!1);
1890
1905
  },
1891
- children: c.deleteNote
1906
+ children: u.deleteNote
1892
1907
  }
1893
1908
  ),
1894
1909
  /* @__PURE__ */ i(
@@ -1897,8 +1912,8 @@ const Zn = ({
1897
1912
  display: "block",
1898
1913
  size: "small",
1899
1914
  "data-testid": "single-note-cancel-delete",
1900
- onClick: () => b(!1),
1901
- children: c.cancel
1915
+ onClick: () => x(!1),
1916
+ children: u.cancel
1902
1917
  }
1903
1918
  )
1904
1919
  ] }) })
@@ -1906,26 +1921,27 @@ const Zn = ({
1906
1921
  ] });
1907
1922
  };
1908
1923
  export {
1909
- Io as ContentWithNoteWrapper,
1910
- we as Highlight,
1911
- mt as HighlightError,
1912
- Zn as NoteCard,
1913
- gt as NoteChip,
1914
- qn as NoteReactionMenu,
1915
- Qn as NotebookEmptyState,
1916
- Co as NotebookProvider,
1917
- jn as NotebookTranslationsProvider,
1918
- vo as NotebookTray,
1919
- wo as NotesListView,
1920
- k as REACTION_TYPE,
1921
- ko as SingleNote,
1922
- Fe as createTransparentColor,
1923
- en as useCreateNote,
1924
- tn as useDeleteNote,
1924
+ wo as ContentWithNoteWrapper,
1925
+ ke as Highlight,
1926
+ gt as HighlightError,
1927
+ to as NoteCard,
1928
+ ht as NoteChip,
1929
+ Vn as NoteReactionMenu,
1930
+ Jn as NotebookEmptyState,
1931
+ xo as NotebookProvider,
1932
+ qn as NotebookTranslationsProvider,
1933
+ Ro as NotebookTray,
1934
+ Lo as NotesListView,
1935
+ L as REACTION_TYPE,
1936
+ Ao as SingleNote,
1937
+ Me as createTransparentColor,
1938
+ mt as getHighlightUnavailableMessage,
1939
+ tn as useCreateNote,
1940
+ nn as useDeleteNote,
1925
1941
  it as useGetNotes,
1926
1942
  ut as useNotebook,
1927
- Z as useNotebookTranslations,
1928
- xo as useNotesData,
1929
- Ro as useReactionFilter,
1930
- on as useUpdateNote
1943
+ J as useNotebookTranslations,
1944
+ ko as useNotesData,
1945
+ Oo as useReactionFilter,
1946
+ rn as useUpdateNote
1931
1947
  };