@arkitektbedriftene/fe-lib 5.1.3 → 5.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- var Ce = Object.defineProperty;
2
- var Me = (t, r, e) => r in t ? Ce(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
1
+ var ve = Object.defineProperty;
2
+ var Me = (t, r, e) => r in t ? ve(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
3
  var $ = (t, r, e) => Me(t, typeof r != "symbol" ? r + "" : r, e);
4
- import { createHeadlessEditor as Bt } from "@lexical/headless";
5
- import { $generateHtmlFromNodes as Pt } from "@lexical/html";
6
- import { $getRoot as V, ParagraphNode as Te, $createParagraphNode as G, $createTextNode as z, $setSelection as nt, $getNodeByKey as dt, DecoratorNode as xe, $applyNodeReplacement as Le, SELECTION_CHANGE_COMMAND as Q, $getSelection as _, COMMAND_PRIORITY_EDITOR as q, $isRangeSelection as R, $isRootOrShadowRoot as Ht, FORMAT_TEXT_COMMAND as A, COMMAND_PRIORITY_LOW as D, KEY_ARROW_DOWN_COMMAND as we, KEY_ARROW_UP_COMMAND as ye, KEY_ESCAPE_COMMAND as Ft, KEY_SPACE_COMMAND as _e, $getNearestNodeFromDOMNode as mt, KEY_ARROW_LEFT_COMMAND as Se, $isElementNode as Ne, createCommand as Ee, $insertNodes as Re, $createRangeSelection as Ut, COMMAND_PRIORITY_HIGH as Ie, FORMAT_ELEMENT_COMMAND as ht } from "lexical";
7
- import { trimTextContentFromAnchor as Oe, $setBlocksType as ut, $getSelectionStyleValueForProperty as ze, $patchStyleText as $e, $isAtNodeEnd as _t } from "@lexical/selection";
8
- import { $dfs as Ae, $getNearestNodeOfType as De, $findMatchingParent as Wt, mergeRegister as ot, isHTMLElement as St, $wrapNodeInElement as Be, mediaFileReader as Pe, isMimeType as He } from "@lexical/utils";
4
+ import { createHeadlessEditor as Pt } from "@lexical/headless";
5
+ import { $generateHtmlFromNodes as Bt } from "@lexical/html";
6
+ import { $getRoot as V, ParagraphNode as xe, $createParagraphNode as G, $createTextNode as z, $setSelection as nt, $getNodeByKey as dt, DecoratorNode as Te, $applyNodeReplacement as Le, SELECTION_CHANGE_COMMAND as Q, $getSelection as y, COMMAND_PRIORITY_EDITOR as q, $isRangeSelection as E, $isRootOrShadowRoot as Ft, FORMAT_TEXT_COMMAND as A, COMMAND_PRIORITY_LOW as D, KEY_ARROW_DOWN_COMMAND as we, KEY_ARROW_UP_COMMAND as _e, KEY_ESCAPE_COMMAND as Ht, KEY_SPACE_COMMAND as ye, $getNearestNodeFromDOMNode as mt, KEY_ARROW_LEFT_COMMAND as Se, $isElementNode as Ne, createCommand as Ee, $insertNodes as Re, $createRangeSelection as Ut, COMMAND_PRIORITY_HIGH as Ie, FORMAT_ELEMENT_COMMAND as ht } from "lexical";
7
+ import { trimTextContentFromAnchor as Oe, $setBlocksType as ut, $getSelectionStyleValueForProperty as ze, $patchStyleText as $e, $isAtNodeEnd as yt } from "@lexical/selection";
8
+ import { $dfs as Ae, $getNearestNodeOfType as De, $findMatchingParent as Wt, mergeRegister as ot, isHTMLElement as St, $wrapNodeInElement as Pe, mediaFileReader as Be, isMimeType as Fe } from "@lexical/utils";
9
9
  import { LinkNode as W, AutoLinkNode as jt, $isLinkNode as tt, TOGGLE_LINK_COMMAND as it } from "@lexical/link";
10
- import { ListNode as ft, ListItemNode as Kt, $isListNode as kt, INSERT_UNORDERED_LIST_COMMAND as Fe, INSERT_ORDERED_LIST_COMMAND as Ue, INSERT_CHECK_LIST_COMMAND as Gt, insertList as We, $isListItemNode as j } from "@lexical/list";
10
+ import { ListNode as ft, ListItemNode as Kt, $isListNode as kt, INSERT_UNORDERED_LIST_COMMAND as He, INSERT_ORDERED_LIST_COMMAND as Ue, INSERT_CHECK_LIST_COMMAND as Gt, insertList as We, $isListItemNode as j } from "@lexical/list";
11
11
  import { HeadingNode as qt, QuoteNode as Jt, $isHeadingNode as je, $createHeadingNode as Ke, $createQuoteNode as Ge, DRAG_DROP_PASTE as qe } from "@lexical/rich-text";
12
12
  import { TableNode as Yt, TableRowNode as Xt, TableCellNode as Vt, INSERT_TABLE_COMMAND as Je, $getTableCellNodeFromLexicalNode as Ye, $deleteTableColumn__EXPERIMENTAL as Xe, $deleteTableRow__EXPERIMENTAL as Ve, $insertTableColumn__EXPERIMENTAL as Nt, $insertTableRow__EXPERIMENTAL as Et } from "@lexical/table";
13
- import { jsx as n, jsxs as h, Fragment as P } from "react/jsx-runtime";
13
+ import { jsx as n, jsxs as h, Fragment as B } from "react/jsx-runtime";
14
14
  import { createContext as Qe, useState as p, useRef as J, useCallback as M, useContext as Ze, useEffect as L, useMemo as Qt, useLayoutEffect as tr } from "react";
15
- import { Box as B, Stack as er, Button as S, DropdownMenu as at, ToolbarButton as lt, DropdownMenuIconItem as T, ToolbarToggleGroup as et, ToolbarToggleItem as O, Popover as Zt, PopoverTrigger as te, PopoverContent as ee, OverlayCard as re, Toolbar as rr, ToolbarSeparator as Rt, styled as nr, Spinner as st, Dialog as ne, DialogHeader as or, TextInput as bt, DialogActions as ct, DropdownMenuItem as U, DropdownMenuSeparator as It, NavBar as ir, NavBarItem as gt, Combobox as ar } from "./ui.es.js";
15
+ import { Box as P, Stack as er, Button as S, DropdownMenu as at, ToolbarButton as lt, DropdownMenuIconItem as T, ToolbarToggleGroup as et, ToolbarToggleItem as O, Popover as Zt, PopoverTrigger as te, PopoverContent as ee, OverlayCard as re, Toolbar as rr, ToolbarSeparator as Rt, styled as nr, Spinner as st, Dialog as ne, DialogHeader as or, TextInput as bt, DialogActions as ct, DropdownMenuItem as U, DropdownMenuSeparator as It, NavBar as ir, NavBarItem as gt, Combobox as ar } from "./ui.es.js";
16
16
  import { f as lr, g as sr, h as cr, G as f, i as dr, j as hr, k as ur, l as gr } from "./index.esm-Dzt91gSZ.js";
17
17
  import { useLexicalComposerContext as w } from "@lexical/react/LexicalComposerContext.js";
18
18
  import { HorizontalRuleNode as pr } from "@lexical/react/LexicalHorizontalRuleNode.js";
19
19
  import { LexicalComposer as mr } from "@lexical/react/LexicalComposer.js";
20
20
  import { RichTextPlugin as fr } from "@lexical/react/LexicalRichTextPlugin.js";
21
21
  import { LexicalErrorBoundary as kr } from "@lexical/react/LexicalErrorBoundary.js";
22
- import { useFloating as vt, autoUpdate as oe, size as br, flip as vr, offset as ie, shift as Cr, useInteractions as ae, useRole as le, FloatingPortal as se, inline as Mr, useDismiss as Tr } from "@floating-ui/react";
23
- import { s as xr, c as Lr } from "./stitches.config-CEYOm13b.js";
22
+ import { useFloating as Ct, autoUpdate as oe, size as br, flip as Cr, offset as ie, shift as vr, useInteractions as ae, useRole as le, FloatingPortal as se, inline as Mr, useDismiss as xr } from "@floating-ui/react";
23
+ import { s as Tr, c as Lr } from "./stitches.config-CEYOm13b.js";
24
24
  import { ListPlugin as wr } from "@lexical/react/LexicalListPlugin.js";
25
- import { HistoryPlugin as yr } from "@lexical/react/LexicalHistoryPlugin.js";
26
- import { TablePlugin as _r } from "@lexical/react/LexicalTablePlugin.js";
25
+ import { HistoryPlugin as _r } from "@lexical/react/LexicalHistoryPlugin.js";
26
+ import { TablePlugin as yr } from "@lexical/react/LexicalTablePlugin.js";
27
27
  import { HorizontalRulePlugin as Sr } from "@lexical/react/LexicalHorizontalRulePlugin.js";
28
28
  import { TabIndentationPlugin as Nr } from "@lexical/react/LexicalTabIndentationPlugin.js";
29
- import { useLexicalComposerContext as Ct } from "@lexical/react/LexicalComposerContext";
29
+ import { useLexicalComposerContext as vt } from "@lexical/react/LexicalComposerContext";
30
30
  const Er = ({
31
31
  text: t,
32
32
  maxChars: r,
@@ -50,7 +50,7 @@ const Er = ({
50
50
  const o = V(), i = o.getTextContent(), a = Er({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = o.select().anchor;
51
51
  Oe(t, d, l);
52
52
  const c = o.getLastChild();
53
- return c instanceof Te && c.getChildrenSize() === 0 && c.remove(), l;
53
+ return c instanceof xe && c.getChildrenSize() === 0 && c.remove(), l;
54
54
  }, Mt = {
55
55
  quote: "ain-rich-text-quote",
56
56
  text: {
@@ -64,7 +64,7 @@ const Er = ({
64
64
  listitem: "ain-rich-text-nested-list-item"
65
65
  }
66
66
  }
67
- }, Tt = (t) => t[0] === "{", Rr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ir = (t, r) => {
67
+ }, xt = (t) => t[0] === "{", Rr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ir = (t, r) => {
68
68
  t.update(
69
69
  () => {
70
70
  const e = V();
@@ -88,17 +88,17 @@ const Er = ({
88
88
  tag: e
89
89
  }
90
90
  ), r.blur();
91
- }, io = async (t, r, e) => {
91
+ }, no = async (t, r, e) => {
92
92
  var l;
93
93
  let o = 0;
94
- const i = Bt({
94
+ const i = Pt({
95
95
  nodes: r,
96
96
  editable: !1,
97
97
  theme: Mt
98
98
  });
99
99
  if (t)
100
100
  try {
101
- if (typeof t == "string" && !Tt(t))
101
+ if (typeof t == "string" && !xt(t))
102
102
  i.update(() => {
103
103
  const s = V(), d = G();
104
104
  d.append(z(t.trim())), s.append(d);
@@ -118,18 +118,18 @@ const Er = ({
118
118
  await ((l = e == null ? void 0 : e.updateFn) == null ? void 0 : l.call(e, i));
119
119
  let a = "";
120
120
  return i.read(() => {
121
- a = Pt(i);
121
+ a = Bt(i);
122
122
  }), { html: a, trimCount: o };
123
- }, ao = (t, r, e) => {
123
+ }, oo = (t, r, e) => {
124
124
  let o = 0;
125
- const i = Bt({
125
+ const i = Pt({
126
126
  nodes: r,
127
127
  editable: !1,
128
128
  theme: Mt
129
129
  });
130
130
  if (t)
131
131
  try {
132
- if (typeof t == "string" && !Tt(t))
132
+ if (typeof t == "string" && !xt(t))
133
133
  i.update(() => {
134
134
  const l = V(), s = G();
135
135
  s.append(z(t.trim())), l.append(s);
@@ -149,12 +149,12 @@ const Er = ({
149
149
  let a = "";
150
150
  try {
151
151
  i.read(() => {
152
- a = Pt(i);
152
+ a = Bt(i);
153
153
  });
154
154
  } catch {
155
155
  }
156
156
  return { html: a, trimCount: o };
157
- }, lo = (t) => Ae().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
157
+ }, io = (t) => Ae().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
158
158
  class rt extends W {
159
159
  static getType() {
160
160
  return "target-link";
@@ -203,7 +203,7 @@ const de = Qe({
203
203
  onBlur: a
204
204
  }
205
205
  };
206
- }, H = () => Ze(de);
206
+ }, F = () => Ze(de);
207
207
  function $r({
208
208
  src: t,
209
209
  altText: r,
@@ -211,28 +211,28 @@ function $r({
211
211
  height: o,
212
212
  nodeKey: i
213
213
  }) {
214
- const { signUrl: a } = H(), [l, s] = p(a ? "" : t), [d, c] = p(!1), u = J(!1), [g] = w();
214
+ const { signUrl: a } = F(), [l, s] = p(a ? "" : t), [d, c] = p(!1), u = J(!1), [g] = w();
215
215
  L(() => {
216
216
  const m = async () => {
217
217
  s(await (a == null ? void 0 : a(t)) || t);
218
218
  };
219
219
  !l && !u.current && (u.current = !0, m());
220
220
  }, []);
221
- const v = (m) => (C) => {
222
- C.relatedTarget instanceof HTMLElement && C.relatedTarget.dataset.controls === "true" || c(m);
221
+ const C = (m) => (v) => {
222
+ v.relatedTarget instanceof HTMLElement && v.relatedTarget.dataset.controls === "true" || c(m);
223
223
  }, x = () => {
224
224
  g.update(() => {
225
225
  const m = dt(i);
226
226
  m && m.remove();
227
227
  });
228
- }, y = () => {
228
+ }, _ = () => {
229
229
  g.update(() => {
230
230
  var N;
231
231
  const m = dt(i);
232
232
  if (!m)
233
233
  return;
234
- const C = m.getPreviousSibling() || ((N = m.getParent()) == null ? void 0 : N.getPreviousSibling());
235
- C && C.insertBefore(m);
234
+ const v = m.getPreviousSibling() || ((N = m.getParent()) == null ? void 0 : N.getPreviousSibling());
235
+ v && v.insertBefore(m);
236
236
  });
237
237
  }, k = () => {
238
238
  g.update(() => {
@@ -240,11 +240,11 @@ function $r({
240
240
  const m = dt(i);
241
241
  if (!m)
242
242
  return;
243
- const C = m.getNextSibling() || ((N = m.getParent()) == null ? void 0 : N.getNextSibling());
244
- C && C.insertAfter(m);
243
+ const v = m.getNextSibling() || ((N = m.getParent()) == null ? void 0 : N.getNextSibling());
244
+ v && v.insertAfter(m);
245
245
  });
246
246
  };
247
- return l ? /* @__PURE__ */ h(B, { css: { position: "relative", display: "inline-block" }, children: [
247
+ return l ? /* @__PURE__ */ h(P, { css: { position: "relative", display: "inline-block" }, children: [
248
248
  /* @__PURE__ */ h(
249
249
  er,
250
250
  {
@@ -258,7 +258,7 @@ function $r({
258
258
  },
259
259
  gap: 1,
260
260
  "data-controls": "true",
261
- onMouseLeave: v(!1),
261
+ onMouseLeave: C(!1),
262
262
  children: [
263
263
  /* @__PURE__ */ n(
264
264
  S,
@@ -277,7 +277,7 @@ function $r({
277
277
  icon: !0,
278
278
  size: "sm",
279
279
  css: { width: "20px", height: "20px" },
280
- onClick: y,
280
+ onClick: _,
281
281
  children: /* @__PURE__ */ n(sr, {})
282
282
  }
283
283
  ),
@@ -304,8 +304,8 @@ function $r({
304
304
  width: e
305
305
  },
306
306
  className: "ain-rich-text-image",
307
- onMouseEnter: v(!0),
308
- onMouseLeave: v(!1),
307
+ onMouseEnter: C(!0),
308
+ onMouseLeave: C(!1),
309
309
  "data-controls": "true"
310
310
  }
311
311
  )
@@ -313,9 +313,9 @@ function $r({
313
313
  }
314
314
  function Ar(t) {
315
315
  const r = t, { alt: e, src: o, width: i, height: a } = r;
316
- return { node: xt({ altText: e, height: a, src: o, width: i }) };
316
+ return { node: Tt({ altText: e, height: a, src: o, width: i }) };
317
317
  }
318
- class F extends xe {
318
+ class H extends Te {
319
319
  constructor(e, o, i, a, l, s) {
320
320
  super(s);
321
321
  $(this, "__src");
@@ -329,7 +329,7 @@ class F extends xe {
329
329
  return "image";
330
330
  }
331
331
  static clone(e) {
332
- return new F(
332
+ return new H(
333
333
  e.__src,
334
334
  e.__altText,
335
335
  e.__width,
@@ -340,7 +340,7 @@ class F extends xe {
340
340
  }
341
341
  static importJSON(e) {
342
342
  const { altText: o, height: i, width: a, src: l, meta: s } = e;
343
- return xt({
343
+ return Tt({
344
344
  altText: o,
345
345
  height: i,
346
346
  src: l,
@@ -408,7 +408,7 @@ class F extends xe {
408
408
  );
409
409
  }
410
410
  }
411
- function xt({
411
+ function Tt({
412
412
  altText: t,
413
413
  height: r,
414
414
  src: e,
@@ -417,13 +417,13 @@ function xt({
417
417
  key: a
418
418
  }) {
419
419
  return Le(
420
- new F(e, t, o, r, i, a)
420
+ new H(e, t, o, r, i, a)
421
421
  );
422
422
  }
423
- function so(t) {
424
- return t instanceof F;
423
+ function ao(t) {
424
+ return t instanceof H;
425
425
  }
426
- const co = [
426
+ const lo = [
427
427
  qt,
428
428
  Jt,
429
429
  ft,
@@ -433,9 +433,9 @@ const co = [
433
433
  Yt,
434
434
  Xt,
435
435
  Vt,
436
- F,
436
+ H,
437
437
  pr
438
- ], ho = [
438
+ ], so = [
439
439
  qt,
440
440
  Jt,
441
441
  ft,
@@ -445,7 +445,7 @@ const co = [
445
445
  Yt,
446
446
  Xt,
447
447
  Vt,
448
- F,
448
+ H,
449
449
  rt,
450
450
  {
451
451
  replace: W,
@@ -461,16 +461,16 @@ function Dr(t) {
461
461
  function Ot(t) {
462
462
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M4 12l10 0" } }, { tag: "path", attr: { d: "M4 18l14 0" } }] })(t);
463
463
  }
464
- function Br(t) {
464
+ function Pr(t) {
465
465
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M10 12l10 0" } }, { tag: "path", attr: { d: "M6 18l14 0" } }] })(t);
466
466
  }
467
- function Pr(t) {
467
+ function Br(t) {
468
468
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" } }, { tag: "path", attr: { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" } }] })(t);
469
469
  }
470
- function Hr(t) {
470
+ function Fr(t) {
471
471
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 8l-4 4l4 4" } }, { tag: "path", attr: { d: "M17 8l4 4l-4 4" } }, { tag: "path", attr: { d: "M14 4l-4 16" } }] })(t);
472
472
  }
473
- function Fr(t) {
473
+ function Hr(t) {
474
474
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 18v-8l-2 2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
475
475
  }
476
476
  function Ur(t) {
@@ -483,51 +483,45 @@ function jr(t) {
483
483
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M20 18v-8l-4 6h5" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
484
484
  }
485
485
  function Kr(t) {
486
- return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 18h2a2 2 0 1 0 0 -4h-2v-4h4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
487
- }
488
- function Gr(t) {
489
- return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z" } }, { tag: "path", attr: { d: "M21 12a2 2 0 1 0 -4 0v4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
490
- }
491
- function qr(t) {
492
486
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 5l6 0" } }, { tag: "path", attr: { d: "M7 19l6 0" } }, { tag: "path", attr: { d: "M14 5l-4 14" } }] })(t);
493
487
  }
494
- function Jr(t) {
488
+ function Gr(t) {
495
489
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" } }, { tag: "path", attr: { d: "M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" } }, { tag: "path", attr: { d: "M3 13h7" } }, { tag: "path", attr: { d: "M21 12v7" } }] })(t);
496
490
  }
497
- function Yr(t) {
491
+ function qr(t) {
498
492
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" } }, { tag: "path", attr: { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" } }] })(t);
499
493
  }
500
- function Xr(t) {
494
+ function Jr(t) {
501
495
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M3.5 5.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 11.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 17.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M11 6l9 0" } }, { tag: "path", attr: { d: "M11 12l9 0" } }, { tag: "path", attr: { d: "M11 18l9 0" } }] })(t);
502
496
  }
503
- function Vr(t) {
497
+ function Yr(t) {
504
498
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 6h9" } }, { tag: "path", attr: { d: "M11 12h9" } }, { tag: "path", attr: { d: "M12 18h8" } }, { tag: "path", attr: { d: "M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" } }, { tag: "path", attr: { d: "M6 10v-6l-2 2" } }] })(t);
505
499
  }
506
- function Qr(t) {
500
+ function Xr(t) {
507
501
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 6l11 0" } }, { tag: "path", attr: { d: "M9 12l11 0" } }, { tag: "path", attr: { d: "M9 18l11 0" } }, { tag: "path", attr: { d: "M5 6l0 .01" } }, { tag: "path", attr: { d: "M5 12l0 .01" } }, { tag: "path", attr: { d: "M5 18l0 .01" } }] })(t);
508
502
  }
509
- function Zr(t) {
503
+ function Vr(t) {
510
504
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }, { tag: "path", attr: { d: "M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }] })(t);
511
505
  }
512
- function tn(t) {
506
+ function Qr(t) {
513
507
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 12l14 0" } }, { tag: "path", attr: { d: "M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5" } }] })(t);
514
508
  }
515
- function en(t) {
509
+ function Zr(t) {
516
510
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
517
511
  }
518
- function rn(t) {
512
+ function tn(t) {
519
513
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
520
514
  }
521
- function nn(t) {
515
+ function en(t) {
522
516
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" } }, { tag: "path", attr: { d: "M4 10l16 0" } }, { tag: "path", attr: { d: "M10 4l0 16" } }] })(t);
523
517
  }
524
- function on(t) {
518
+ function rn(t) {
525
519
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 15v-7a3 3 0 0 1 6 0v7" } }, { tag: "path", attr: { d: "M9 11h6" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
526
520
  }
527
- function an(t) {
521
+ function nn(t) {
528
522
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5v5a5 5 0 0 0 10 0v-5" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
529
523
  }
530
- const ln = xr("div", {
524
+ const on = Tr("div", {
531
525
  width: "10rem",
532
526
  display: "flex"
533
527
  }), he = {
@@ -536,30 +530,26 @@ const ln = xr("div", {
536
530
  h2: "Overskrift 2",
537
531
  h3: "Overskrift 3",
538
532
  h4: "Overskrift 4",
539
- h5: "Overskrift 5",
540
- h6: "Overskrift 6",
541
533
  number: "Nummerert liste",
542
534
  paragraph: "Normal",
543
535
  quote: "Sitat",
544
536
  check: "Avkrysningsliste"
545
- }, sn = {
546
- bullet: /* @__PURE__ */ n(Qr, { size: "1.25rem" }),
547
- h1: /* @__PURE__ */ n(Fr, { size: "1.25rem" }),
537
+ }, an = {
538
+ bullet: /* @__PURE__ */ n(Xr, { size: "1.25rem" }),
539
+ h1: /* @__PURE__ */ n(Hr, { size: "1.25rem" }),
548
540
  h2: /* @__PURE__ */ n(Ur, { size: "1.25rem" }),
549
541
  h3: /* @__PURE__ */ n(Wr, { size: "1.25rem" }),
550
542
  h4: /* @__PURE__ */ n(jr, { size: "1.25rem" }),
551
- h5: /* @__PURE__ */ n(Kr, { size: "1.25rem" }),
552
- h6: /* @__PURE__ */ n(Gr, { size: "1.25rem" }),
553
- number: /* @__PURE__ */ n(Vr, { size: "1.25rem" }),
554
- check: /* @__PURE__ */ n(Xr, { size: "1.25rem" }),
555
- paragraph: /* @__PURE__ */ n(Jr, { size: "1.25rem" }),
556
- quote: /* @__PURE__ */ n(Zr, { size: "1.25rem" })
557
- }, E = ({
543
+ number: /* @__PURE__ */ n(Yr, { size: "1.25rem" }),
544
+ check: /* @__PURE__ */ n(Jr, { size: "1.25rem" }),
545
+ paragraph: /* @__PURE__ */ n(Gr, { size: "1.25rem" }),
546
+ quote: /* @__PURE__ */ n(Vr, { size: "1.25rem" })
547
+ }, I = ({
558
548
  blockType: t
559
- }) => /* @__PURE__ */ h(P, { children: [
560
- /* @__PURE__ */ n(B, { css: { display: "flex", flex: "0 0 auto" }, children: sn[t] }),
549
+ }) => /* @__PURE__ */ h(B, { children: [
550
+ /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: an[t] }),
561
551
  /* @__PURE__ */ n(
562
- B,
552
+ P,
563
553
  {
564
554
  css: {
565
555
  flex: "1 1 auto",
@@ -570,31 +560,31 @@ const ln = xr("div", {
570
560
  children: he[t]
571
561
  }
572
562
  )
573
- ] }), cn = (t) => {
574
- if (!R(t))
563
+ ] }), ln = (t) => {
564
+ if (!E(t))
575
565
  return null;
576
566
  const r = t.anchor.getNode();
577
567
  let e = r.getKey() === "root" ? r : Wt(r, (o) => {
578
568
  const i = o.getParent();
579
- return i !== null && Ht(i);
569
+ return i !== null && Ft(i);
580
570
  });
581
571
  return e === null && (e = r.getTopLevelElementOrThrow()), {
582
572
  anchorNode: r,
583
573
  element: e
584
574
  };
585
- }, dn = () => {
575
+ }, sn = () => {
586
576
  const [t] = w(), [r, e] = p("paragraph");
587
577
  L(() => t.registerCommand(
588
578
  Q,
589
579
  () => {
590
- const c = _(), u = cn(c);
580
+ const c = y(), u = ln(c);
591
581
  if (!u)
592
582
  return !1;
593
- const { element: g, anchorNode: v } = u, x = g.getKey();
583
+ const { element: g, anchorNode: C } = u, x = g.getKey();
594
584
  if (t.getElementByKey(x) !== null)
595
585
  if (kt(g)) {
596
586
  const k = De(
597
- v,
587
+ C,
598
588
  ft
599
589
  ), m = k ? k.getListType() : g.getListType();
600
590
  e(m);
@@ -608,11 +598,11 @@ const ln = xr("div", {
608
598
  ), [t]);
609
599
  const o = (c) => {
610
600
  r !== c && t.update(() => {
611
- const u = _();
612
- R(u) && (ut(u, () => Ke(c)), e(c));
601
+ const u = y();
602
+ E(u) && (ut(u, () => Ke(c)), e(c));
613
603
  });
614
604
  };
615
- return /* @__PURE__ */ n(ln, { children: /* @__PURE__ */ h(
605
+ return /* @__PURE__ */ n(on, { children: /* @__PURE__ */ h(
616
606
  at,
617
607
  {
618
608
  trigger: /* @__PURE__ */ n(
@@ -620,7 +610,7 @@ const ln = xr("div", {
620
610
  {
621
611
  dropdown: !0,
622
612
  css: { display: "flex", width: "100%", overflow: "hidden" },
623
- children: /* @__PURE__ */ n(E, { blockType: r })
613
+ children: /* @__PURE__ */ n(I, { blockType: r })
624
614
  }
625
615
  ),
626
616
  side: "bottom",
@@ -628,51 +618,49 @@ const ln = xr("div", {
628
618
  children: [
629
619
  /* @__PURE__ */ n(T, { onClick: () => {
630
620
  r !== "paragraph" && t.update(() => {
631
- const c = _();
632
- R(c) && (ut(c, () => G()), e("paragraph"));
621
+ const c = y();
622
+ E(c) && (ut(c, () => G()), e("paragraph"));
633
623
  });
634
- }, children: /* @__PURE__ */ n(E, { blockType: "paragraph" }) }),
635
- /* @__PURE__ */ n(T, { onClick: () => o("h1"), children: /* @__PURE__ */ n(E, { blockType: "h1" }) }),
636
- /* @__PURE__ */ n(T, { onClick: () => o("h2"), children: /* @__PURE__ */ n(E, { blockType: "h2" }) }),
637
- /* @__PURE__ */ n(T, { onClick: () => o("h3"), children: /* @__PURE__ */ n(E, { blockType: "h3" }) }),
638
- /* @__PURE__ */ n(T, { onClick: () => o("h4"), children: /* @__PURE__ */ n(E, { blockType: "h4" }) }),
639
- /* @__PURE__ */ n(T, { onClick: () => o("h5"), children: /* @__PURE__ */ n(E, { blockType: "h5" }) }),
640
- /* @__PURE__ */ n(T, { onClick: () => o("h6"), children: /* @__PURE__ */ n(E, { blockType: "h6" }) }),
624
+ }, children: /* @__PURE__ */ n(I, { blockType: "paragraph" }) }),
625
+ /* @__PURE__ */ n(T, { onClick: () => o("h1"), children: /* @__PURE__ */ n(I, { blockType: "h1" }) }),
626
+ /* @__PURE__ */ n(T, { onClick: () => o("h2"), children: /* @__PURE__ */ n(I, { blockType: "h2" }) }),
627
+ /* @__PURE__ */ n(T, { onClick: () => o("h3"), children: /* @__PURE__ */ n(I, { blockType: "h3" }) }),
628
+ /* @__PURE__ */ n(T, { onClick: () => o("h4"), children: /* @__PURE__ */ n(I, { blockType: "h4" }) }),
641
629
  /* @__PURE__ */ n(T, { onClick: () => {
642
- r !== "bullet" && (t.dispatchCommand(Fe, void 0), e("bullet"));
643
- }, children: /* @__PURE__ */ n(E, { blockType: "bullet" }) }),
630
+ r !== "bullet" && (t.dispatchCommand(He, void 0), e("bullet"));
631
+ }, children: /* @__PURE__ */ n(I, { blockType: "bullet" }) }),
644
632
  /* @__PURE__ */ n(T, { onClick: () => {
645
633
  r !== "number" && (t.dispatchCommand(Ue, void 0), e("number"));
646
- }, children: /* @__PURE__ */ n(E, { blockType: "number" }) }),
634
+ }, children: /* @__PURE__ */ n(I, { blockType: "number" }) }),
647
635
  /* @__PURE__ */ n(T, { onClick: () => {
648
636
  r !== "check" && (t.dispatchCommand(Gt, void 0), e("check"));
649
- }, children: /* @__PURE__ */ n(E, { blockType: "check" }) }),
637
+ }, children: /* @__PURE__ */ n(I, { blockType: "check" }) }),
650
638
  /* @__PURE__ */ n(T, { onClick: () => {
651
639
  r !== "quote" && t.update(() => {
652
- const c = _();
653
- R(c) && (ut(c, () => Ge()), e("quote"));
640
+ const c = y();
641
+ E(c) && (ut(c, () => Ge()), e("quote"));
654
642
  });
655
- }, children: /* @__PURE__ */ n(E, { blockType: "quote" }) })
643
+ }, children: /* @__PURE__ */ n(I, { blockType: "quote" }) })
656
644
  ]
657
645
  }
658
646
  ) });
659
- }, hn = () => {
660
- const [t] = w(), [r, e] = p(!1), [o, i] = p(!1), [a, l] = p(!1), [s, d] = p(!1), [c, u] = p(!1), [g, v] = p(!1), [x, y] = p(!1), [k, m] = p(""), [C, N] = p(!1), I = M(() => {
661
- const b = _();
662
- R(b) && (e(b.hasFormat("bold")), i(b.hasFormat("italic")), l(b.hasFormat("underline")), d(b.hasFormat("strikethrough")), u(b.hasFormat("code")), v(b.hasFormat("superscript")), y(b.hasFormat("subscript")), m(ze(b, "color", "")));
647
+ }, cn = () => {
648
+ const [t] = w(), [r, e] = p(!1), [o, i] = p(!1), [a, l] = p(!1), [s, d] = p(!1), [c, u] = p(!1), [g, C] = p(!1), [x, _] = p(!1), [k, m] = p(""), [v, N] = p(!1), R = M(() => {
649
+ const b = y();
650
+ E(b) && (e(b.hasFormat("bold")), i(b.hasFormat("italic")), l(b.hasFormat("underline")), d(b.hasFormat("strikethrough")), u(b.hasFormat("code")), C(b.hasFormat("superscript")), _(b.hasFormat("subscript")), m(ze(b, "color", "")));
663
651
  }, []);
664
652
  L(() => ot(
665
653
  t.registerCommand(
666
654
  Q,
667
- () => (I(), !1),
655
+ () => (R(), !1),
668
656
  q
669
657
  ),
670
658
  t.registerUpdateListener(({ editorState: b }) => {
671
659
  b.read(() => {
672
- I();
660
+ R();
673
661
  });
674
662
  })
675
- ), [t, I]);
663
+ ), [t, R]);
676
664
  const Y = M(
677
665
  () => t.dispatchCommand(A, "bold"),
678
666
  [t]
@@ -691,10 +679,10 @@ const ln = xr("div", {
691
679
  ), be = M(
692
680
  () => t.dispatchCommand(A, "superscript"),
693
681
  [t]
694
- ), ve = M(
682
+ ), Ce = M(
695
683
  () => t.dispatchCommand(A, "subscript"),
696
684
  [t]
697
- ), yt = Qt(() => {
685
+ ), _t = Qt(() => {
698
686
  const b = [];
699
687
  return r && b.push("bold"), o && b.push("italic"), a && b.push("underline"), s && b.push("strikethrough"), c && b.push("code"), g && b.push("superscript"), x && b.push("subscript"), k && b.push("color"), b;
700
688
  }, [
@@ -707,22 +695,22 @@ const ln = xr("div", {
707
695
  s,
708
696
  k
709
697
  ]);
710
- return /* @__PURE__ */ h(P, { children: [
698
+ return /* @__PURE__ */ h(B, { children: [
711
699
  /* @__PURE__ */ h(
712
700
  et,
713
701
  {
714
702
  type: "multiple",
715
703
  "aria-label": "Tekstformattering",
716
- value: yt,
704
+ value: _t,
717
705
  children: [
718
- /* @__PURE__ */ n(O, { onClick: Y, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Pr, { size: "1.25rem" }) }),
706
+ /* @__PURE__ */ n(O, { onClick: Y, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Br, { size: "1.25rem" }) }),
719
707
  /* @__PURE__ */ n(
720
708
  O,
721
709
  {
722
710
  onClick: Z,
723
711
  title: "Kursiv tekst",
724
712
  value: "italic",
725
- children: /* @__PURE__ */ n(qr, { size: "1.25rem" })
713
+ children: /* @__PURE__ */ n(Kr, { size: "1.25rem" })
726
714
  }
727
715
  ),
728
716
  /* @__PURE__ */ n(
@@ -731,20 +719,20 @@ const ln = xr("div", {
731
719
  onClick: me,
732
720
  title: "Understreket tekst",
733
721
  value: "underline",
734
- children: /* @__PURE__ */ n(an, { size: "1.25rem" })
722
+ children: /* @__PURE__ */ n(nn, { size: "1.25rem" })
735
723
  }
736
724
  )
737
725
  ]
738
726
  }
739
727
  ),
740
- /* @__PURE__ */ h(Zt, { open: C, onOpenChange: N, children: [
728
+ /* @__PURE__ */ h(Zt, { open: v, onOpenChange: N, children: [
741
729
  /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(lt, { children: /* @__PURE__ */ n(dr, { size: "1.25rem" }) }) }),
742
730
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ h(
743
731
  et,
744
732
  {
745
733
  type: "multiple",
746
734
  "aria-label": "Tekstformattering",
747
- value: yt,
735
+ value: _t,
748
736
  css: { margin: "$1" },
749
737
  children: [
750
738
  /* @__PURE__ */ n(
@@ -753,7 +741,7 @@ const ln = xr("div", {
753
741
  onClick: fe,
754
742
  title: "Gjennomstreking",
755
743
  value: "strikethrough",
756
- children: /* @__PURE__ */ n(tn, { size: "1.25rem" })
744
+ children: /* @__PURE__ */ n(Qr, { size: "1.25rem" })
757
745
  }
758
746
  ),
759
747
  /* @__PURE__ */ n(
@@ -762,40 +750,40 @@ const ln = xr("div", {
762
750
  onClick: be,
763
751
  title: "Superscript",
764
752
  value: "superscript",
765
- children: /* @__PURE__ */ n(rn, { size: "1.25rem" })
753
+ children: /* @__PURE__ */ n(tn, { size: "1.25rem" })
766
754
  }
767
755
  ),
768
756
  /* @__PURE__ */ n(
769
757
  O,
770
758
  {
771
- onClick: ve,
759
+ onClick: Ce,
772
760
  title: "Subscript",
773
761
  value: "subscript",
774
- children: /* @__PURE__ */ n(en, { size: "1.25rem" })
762
+ children: /* @__PURE__ */ n(Zr, { size: "1.25rem" })
775
763
  }
776
764
  ),
777
- /* @__PURE__ */ n(O, { onClick: ke, title: "Kode", value: "code", children: /* @__PURE__ */ n(Hr, { size: "1.25rem" }) }),
778
- /* @__PURE__ */ n(gn, { activeColor: k })
765
+ /* @__PURE__ */ n(O, { onClick: ke, title: "Kode", value: "code", children: /* @__PURE__ */ n(Fr, { size: "1.25rem" }) }),
766
+ /* @__PURE__ */ n(hn, { activeColor: k })
779
767
  ]
780
768
  }
781
769
  ) })
782
770
  ] })
783
771
  ] });
784
- }, un = [
772
+ }, dn = [
785
773
  { name: "Reset", value: "" },
786
774
  { name: "Rød", value: "#df2222" },
787
775
  { name: "Grønn", value: "#1ca021" },
788
776
  { name: "Blå", value: "#2044b8" },
789
777
  { name: "Lilla", value: "#9c31de" }
790
- ], gn = ({ activeColor: t }) => {
778
+ ], hn = ({ activeColor: t }) => {
791
779
  const [r] = w(), [e, o] = p(!1), i = (a) => {
792
780
  r.update(() => {
793
- const l = _();
781
+ const l = y();
794
782
  l && $e(l, { color: a });
795
783
  });
796
784
  };
797
785
  return /* @__PURE__ */ h(Zt, { open: e, onOpenChange: o, children: [
798
- /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(O, { value: "color", title: "Tekstfarge", children: /* @__PURE__ */ n(on, { size: "1.25rem" }) }) }),
786
+ /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(O, { value: "color", title: "Tekstfarge", children: /* @__PURE__ */ n(rn, { size: "1.25rem" }) }) }),
799
787
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n(
800
788
  et,
801
789
  {
@@ -803,7 +791,7 @@ const ln = xr("div", {
803
791
  "aria-label": "Tekstfarge",
804
792
  value: t,
805
793
  css: { margin: "$1" },
806
- children: un.map((a) => /* @__PURE__ */ n(
794
+ children: dn.map((a) => /* @__PURE__ */ n(
807
795
  O,
808
796
  {
809
797
  value: a.value,
@@ -811,7 +799,7 @@ const ln = xr("div", {
811
799
  !a.value || a.value === t ? null : a.value
812
800
  ),
813
801
  children: a.value ? /* @__PURE__ */ n(
814
- B,
802
+ P,
815
803
  {
816
804
  css: {
817
805
  width: "1rem",
@@ -834,12 +822,12 @@ const ln = xr("div", {
834
822
  }
835
823
  ) })
836
824
  ] });
837
- }, pn = ({ children: t }) => {
838
- const { hasFocus: r, editorRef: e } = H(), o = r, [i, a] = p(o);
825
+ }, un = ({ children: t }) => {
826
+ const { hasFocus: r, editorRef: e } = F(), o = r, [i, a] = p(o);
839
827
  tr(() => {
840
828
  a(o);
841
829
  }, [o]);
842
- const { context: l, refs: s, floatingStyles: d } = vt({
830
+ const { context: l, refs: s, floatingStyles: d } = Ct({
843
831
  placement: "top",
844
832
  whileElementsMounted: oe,
845
833
  middleware: [
@@ -848,11 +836,11 @@ const ln = xr("div", {
848
836
  g.floating.style.minWidth = `${u.reference.width}px`;
849
837
  }
850
838
  }),
851
- vr(),
839
+ Cr(),
852
840
  ie({
853
841
  mainAxis: 8
854
842
  }),
855
- Cr({
843
+ vr({
856
844
  padding: 8
857
845
  })
858
846
  ],
@@ -878,20 +866,20 @@ const ln = xr("div", {
878
866
  overflow: "hidden",
879
867
  boxShadow: "$md"
880
868
  },
881
- children: /* @__PURE__ */ n(mn, { children: t })
869
+ children: /* @__PURE__ */ n(gn, { children: t })
882
870
  }
883
871
  ) }) : null;
884
- }, mn = ({
872
+ }, gn = ({
885
873
  children: t,
886
874
  ...r
887
875
  }) => /* @__PURE__ */ h(rr, { "aria-label": "Formattering", ...r, children: [
888
- /* @__PURE__ */ n(dn, {}),
876
+ /* @__PURE__ */ n(sn, {}),
889
877
  /* @__PURE__ */ n(Rt, {}),
890
- /* @__PURE__ */ n(hn, {}),
878
+ /* @__PURE__ */ n(cn, {}),
891
879
  /* @__PURE__ */ n(Rt, {}),
892
880
  t
893
881
  ] });
894
- function fn() {
882
+ function pn() {
895
883
  const [t] = w();
896
884
  return L(() => ot(
897
885
  t.registerCommand(
@@ -905,12 +893,12 @@ function fn() {
905
893
  D
906
894
  ),
907
895
  t.registerCommand(
908
- ye,
896
+ _e,
909
897
  (r) => At(r, t, !0),
910
898
  D
911
899
  ),
912
900
  t.registerCommand(
913
- Ft,
901
+ Ht,
914
902
  (r) => {
915
903
  if (pt() != null) {
916
904
  const o = t.getRootElement();
@@ -921,7 +909,7 @@ function fn() {
921
909
  D
922
910
  ),
923
911
  t.registerCommand(
924
- _e,
912
+ ye,
925
913
  (r) => {
926
914
  const e = pt();
927
915
  return e != null && t.isEditable() ? (t.update(() => {
@@ -934,8 +922,8 @@ function fn() {
934
922
  t.registerCommand(
935
923
  Se,
936
924
  (r) => t.getEditorState().read(() => {
937
- const e = _();
938
- if (R(e) && e.isCollapsed()) {
925
+ const e = y();
926
+ if (E(e) && e.isCollapsed()) {
939
927
  const { anchor: o } = e, i = o.type === "element";
940
928
  if (i || o.offset === 0) {
941
929
  const a = o.getNode(), l = Wt(
@@ -976,7 +964,7 @@ function ue(t, r) {
976
964
  }
977
965
  function zt(t) {
978
966
  ue(t, () => {
979
- const r = t.target, e = kn(r);
967
+ const r = t.target, e = mn(r);
980
968
  e != null && e.isEditable() && e.update(() => {
981
969
  if (t.target) {
982
970
  const o = mt(r);
@@ -990,7 +978,7 @@ function $t(t) {
990
978
  t.preventDefault();
991
979
  });
992
980
  }
993
- function kn(t) {
981
+ function mn(t) {
994
982
  let r = t;
995
983
  for (; r; ) {
996
984
  if (r.__lexicalEditor)
@@ -1004,7 +992,7 @@ function pt() {
1004
992
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
1005
993
  t.parentNode.__lexicalListType === "check" ? t : null;
1006
994
  }
1007
- function bn(t, r) {
995
+ function fn(t, r) {
1008
996
  let e = r ? t.getPreviousSibling() : t.getNextSibling(), o = t;
1009
997
  for (; e == null && j(o); )
1010
998
  o = o.getParentOrThrow().getParent(), o != null && (e = r ? o.getPreviousSibling() : o.getNextSibling());
@@ -1022,7 +1010,7 @@ function At(t, r, e) {
1022
1010
  const i = mt(o);
1023
1011
  if (!j(i))
1024
1012
  return;
1025
- const a = bn(i, e);
1013
+ const a = fn(i, e);
1026
1014
  if (a != null) {
1027
1015
  a.selectStart();
1028
1016
  const l = r.getElementByKey(a.__key);
@@ -1033,32 +1021,32 @@ function At(t, r, e) {
1033
1021
  }), !1;
1034
1022
  }
1035
1023
  const Lt = Ee("INSERT_IMAGE_COMMAND");
1036
- function vn() {
1037
- const [t] = Ct();
1024
+ function kn() {
1025
+ const [t] = vt();
1038
1026
  return L(() => {
1039
- if (!t.hasNodes([F]))
1027
+ if (!t.hasNodes([H]))
1040
1028
  throw new Error("ImagePlugin: ImageNode not registered on editor");
1041
1029
  return ot(
1042
1030
  t.registerCommand(
1043
1031
  Lt,
1044
1032
  (r) => {
1045
- const e = xt(r);
1046
- return Re([e]), Ht(e.getParentOrThrow()) && Be(e, G).selectEnd(), !0;
1033
+ const e = Tt(r);
1034
+ return Re([e]), Ft(e.getParentOrThrow()) && Pe(e, G).selectEnd(), !0;
1047
1035
  },
1048
1036
  q
1049
1037
  )
1050
1038
  );
1051
1039
  }, [t]), null;
1052
1040
  }
1053
- const Cn = () => /* @__PURE__ */ h(P, { children: [
1041
+ const bn = () => /* @__PURE__ */ h(B, { children: [
1054
1042
  /* @__PURE__ */ n(wr, {}),
1055
- /* @__PURE__ */ n(_r, {}),
1056
1043
  /* @__PURE__ */ n(yr, {}),
1057
- /* @__PURE__ */ n(fn, {}),
1044
+ /* @__PURE__ */ n(_r, {}),
1045
+ /* @__PURE__ */ n(pn, {}),
1058
1046
  /* @__PURE__ */ n(Nr, {}),
1059
- /* @__PURE__ */ n(vn, {}),
1047
+ /* @__PURE__ */ n(kn, {}),
1060
1048
  /* @__PURE__ */ n(Sr, {})
1061
- ] }), Mn = ({
1049
+ ] }), Cn = ({
1062
1050
  state: t
1063
1051
  }) => {
1064
1052
  const [r] = w(), e = J(!1);
@@ -1069,7 +1057,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1069
1057
  t.isEmpty() ? Ir(r) : r.setEditorState(t);
1070
1058
  return;
1071
1059
  }
1072
- if (typeof t == "string" && !Tt(t)) {
1060
+ if (typeof t == "string" && !xt(t)) {
1073
1061
  Or(t, r);
1074
1062
  return;
1075
1063
  }
@@ -1080,7 +1068,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1080
1068
  }
1081
1069
  }));
1082
1070
  }, []), null;
1083
- }, Tn = nr("div", {
1071
+ }, vn = nr("div", {
1084
1072
  border: "1px solid $borderDarker",
1085
1073
  borderRadius: "$md",
1086
1074
  position: "relative",
@@ -1117,10 +1105,10 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1117
1105
  }
1118
1106
  }
1119
1107
  ]
1120
- }), xn = ({
1108
+ }), Mn = ({
1121
1109
  isLoading: t
1122
1110
  }) => /* @__PURE__ */ n(
1123
- B,
1111
+ P,
1124
1112
  {
1125
1113
  css: {
1126
1114
  visibility: t ? "visible" : "hidden",
@@ -1131,7 +1119,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1131
1119
  },
1132
1120
  children: /* @__PURE__ */ n(st, {})
1133
1121
  }
1134
- ), uo = ({
1122
+ ), co = ({
1135
1123
  isLoading: t,
1136
1124
  children: r,
1137
1125
  placeholderText: e,
@@ -1144,31 +1132,31 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1144
1132
  onBlur: c,
1145
1133
  defaultState: u,
1146
1134
  css: g,
1147
- signUrl: v,
1135
+ signUrl: C,
1148
1136
  fileUpload: x,
1149
- editable: y = !0
1137
+ editable: _ = !0
1150
1138
  }) => {
1151
- const { hasFocus: k, attributes: m } = zr({ onBlur: c }), C = J(null), N = Qt(
1152
- () => ({ hasFocus: k, editorRef: C, signUrl: v, fileUpload: x }),
1153
- [k, v, x]
1139
+ const { hasFocus: k, attributes: m } = zr({ onBlur: c }), v = J(null), N = Qt(
1140
+ () => ({ hasFocus: k, editorRef: v, signUrl: C, fileUpload: x }),
1141
+ [k, C, x]
1154
1142
  );
1155
1143
  return /* @__PURE__ */ n(de.Provider, { value: N, children: /* @__PURE__ */ h(
1156
1144
  mr,
1157
1145
  {
1158
1146
  initialConfig: {
1159
1147
  namespace: "ain-rich-text",
1160
- onError: (I) => {
1161
- console.error(I);
1148
+ onError: (R) => {
1149
+ console.error(R);
1162
1150
  },
1163
1151
  theme: Mt,
1164
1152
  nodes: o,
1165
- editable: y
1153
+ editable: _
1166
1154
  },
1167
1155
  children: [
1168
1156
  /* @__PURE__ */ h(
1169
- Tn,
1157
+ vn,
1170
1158
  {
1171
- ref: C,
1159
+ ref: v,
1172
1160
  hasFocus: k,
1173
1161
  hideBorder: d,
1174
1162
  css: g,
@@ -1180,7 +1168,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1180
1168
  {
1181
1169
  contentEditable: s,
1182
1170
  placeholder: e ? /* @__PURE__ */ n(
1183
- B,
1171
+ P,
1184
1172
  {
1185
1173
  css: {
1186
1174
  position: "absolute",
@@ -1196,19 +1184,19 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1196
1184
  ErrorBoundary: kr
1197
1185
  }
1198
1186
  ),
1199
- /* @__PURE__ */ n(Cn, {}),
1187
+ /* @__PURE__ */ n(bn, {}),
1200
1188
  i,
1201
- /* @__PURE__ */ n(xn, { isLoading: t }),
1202
- y && !a && /* @__PURE__ */ n(pn, { children: l })
1189
+ /* @__PURE__ */ n(Mn, { isLoading: t }),
1190
+ _ && !a && /* @__PURE__ */ n(un, { children: l })
1203
1191
  ]
1204
1192
  }
1205
1193
  ),
1206
- /* @__PURE__ */ n(Mn, { state: u }),
1207
- /* @__PURE__ */ n(P, { children: r })
1194
+ /* @__PURE__ */ n(Cn, { state: u }),
1195
+ /* @__PURE__ */ n(B, { children: r })
1208
1196
  ]
1209
1197
  }
1210
1198
  ) });
1211
- }, Ln = {
1199
+ }, xn = {
1212
1200
  lineHeight: "1.5",
1213
1201
  whiteSpace: "pre-wrap",
1214
1202
  wordBreak: "break-word",
@@ -1350,7 +1338,8 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1350
1338
  td: {
1351
1339
  border: "1px solid black",
1352
1340
  verticalAlign: "top",
1353
- padding: "$2"
1341
+ padding: "$2",
1342
+ width: "75px"
1354
1343
  }
1355
1344
  },
1356
1345
  a: {
@@ -1418,7 +1407,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1418
1407
  defaultVariants: {
1419
1408
  size: "md"
1420
1409
  }
1421
- }, go = Lr(Ln), wn = ({
1410
+ }, ho = Lr(xn), Tn = ({
1422
1411
  fileUpload: t,
1423
1412
  ...r
1424
1413
  }) => {
@@ -1428,8 +1417,8 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1428
1417
  if (d) {
1429
1418
  const u = new Image(), g = window.URL.createObjectURL(d);
1430
1419
  u.onload = async () => {
1431
- const v = await t.uploadFile({ file: d });
1432
- i({ url: v, width: u.naturalWidth, height: u.naturalHeight }), window.URL.revokeObjectURL(g);
1420
+ const C = await t.uploadFile({ file: d });
1421
+ i({ url: C, width: u.naturalWidth, height: u.naturalHeight }), window.URL.revokeObjectURL(g);
1433
1422
  }, u.src = g;
1434
1423
  }
1435
1424
  }, l = () => {
@@ -1464,15 +1453,15 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1464
1453
  )
1465
1454
  ] })
1466
1455
  ] });
1467
- }, po = () => {
1468
- const [t] = w(), { fileUpload: r } = H(), [e, o] = p(!1), i = M(() => {
1456
+ }, uo = () => {
1457
+ const [t] = w(), { fileUpload: r } = F(), [e, o] = p(!1), i = M(() => {
1469
1458
  t.dispatchCommand(Je, {
1470
1459
  rows: "3",
1471
1460
  columns: "3",
1472
1461
  includeHeaders: !1
1473
1462
  });
1474
1463
  }, [t]);
1475
- return /* @__PURE__ */ h(P, { children: [
1464
+ return /* @__PURE__ */ h(B, { children: [
1476
1465
  /* @__PURE__ */ h(
1477
1466
  at,
1478
1467
  {
@@ -1481,7 +1470,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1481
1470
  align: "end",
1482
1471
  children: [
1483
1472
  /* @__PURE__ */ h(T, { onClick: i, children: [
1484
- /* @__PURE__ */ n(nn, { size: "1.25rem" }),
1473
+ /* @__PURE__ */ n(en, { size: "1.25rem" }),
1485
1474
  " Tabell"
1486
1475
  ] }),
1487
1476
  r && /* @__PURE__ */ h(T, { onClick: () => o(!0), children: [
@@ -1492,7 +1481,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1492
1481
  }
1493
1482
  ),
1494
1483
  r && /* @__PURE__ */ n(
1495
- wn,
1484
+ Tn,
1496
1485
  {
1497
1486
  open: e,
1498
1487
  onOpenChange: o,
@@ -1501,15 +1490,15 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1501
1490
  )
1502
1491
  ] });
1503
1492
  };
1504
- function yn(t) {
1493
+ function Ln(t) {
1505
1494
  return f({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "circle", attr: { cx: "256", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "416", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "96", cy: "256", r: "48" } }] })(t);
1506
1495
  }
1507
- const mo = () => {
1508
- const [t] = w(), [r, e] = p(null), { hasFocus: o } = H();
1496
+ const go = () => {
1497
+ const [t] = w(), [r, e] = p(null), { hasFocus: o } = F();
1509
1498
  L(() => {
1510
1499
  !o && r && e(null);
1511
1500
  }, [o, r]);
1512
- const { refs: i, floatingStyles: a } = vt({
1501
+ const { refs: i, floatingStyles: a } = Ct({
1513
1502
  placement: "top-end",
1514
1503
  open: !!r,
1515
1504
  elements: {
@@ -1520,8 +1509,8 @@ const mo = () => {
1520
1509
  L(() => t.registerCommand(
1521
1510
  Q,
1522
1511
  () => {
1523
- const s = _();
1524
- if (R(s)) {
1512
+ const s = y();
1513
+ if (E(s)) {
1525
1514
  const d = s.anchor.getNode(), c = Ye(d);
1526
1515
  e(c ? t.getElementByKey(c.getKey()) : null);
1527
1516
  }
@@ -1565,7 +1554,7 @@ const mo = () => {
1565
1554
  ref: i.setFloating,
1566
1555
  style: a,
1567
1556
  css: { padding: "2px", width: "18px", height: "18px" },
1568
- children: /* @__PURE__ */ n(yn, {})
1557
+ children: /* @__PURE__ */ n(Ln, {})
1569
1558
  }
1570
1559
  ),
1571
1560
  children: [
@@ -1588,9 +1577,9 @@ function wt(t) {
1588
1577
  }
1589
1578
  function ge(t) {
1590
1579
  const r = t.anchor, e = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1591
- return o === i ? o : t.isBackward() ? _t(e) ? o : i : _t(r) ? o : i;
1580
+ return o === i ? o : t.isBackward() ? yt(e) ? o : i : yt(r) ? o : i;
1592
1581
  }
1593
- const fo = (t) => (K.baseURL = t, K), X = class X extends W {
1582
+ const po = (t) => (K.baseURL = t, K), X = class X extends W {
1594
1583
  static getType() {
1595
1584
  return "rutine_link";
1596
1585
  }
@@ -1625,15 +1614,15 @@ let K = X;
1625
1614
  function pe(t) {
1626
1615
  return new K(t);
1627
1616
  }
1628
- function _n(t) {
1617
+ function wn(t) {
1629
1618
  return t instanceof K;
1630
1619
  }
1631
- const Sn = ({ onClose: t }) => {
1620
+ const _n = ({ onClose: t }) => {
1632
1621
  const [r] = w(), e = M(
1633
1622
  (i) => {
1634
1623
  r.update(() => {
1635
- const a = _();
1636
- if (R(a) && a.isCollapsed()) {
1624
+ const a = y();
1625
+ if (E(a) && a.isCollapsed()) {
1637
1626
  const l = z(i);
1638
1627
  a.insertNodes([l]);
1639
1628
  const s = Ut();
@@ -1653,7 +1642,7 @@ const Sn = ({ onClose: t }) => {
1653
1642
  /* @__PURE__ */ n(S, { type: "submit", variant: "primary", children: "Sett inn" })
1654
1643
  ] })
1655
1644
  ] });
1656
- }, Nn = ({
1645
+ }, yn = ({
1657
1646
  onClose: t,
1658
1647
  getDocs: r
1659
1648
  }) => {
@@ -1671,12 +1660,12 @@ const Sn = ({ onClose: t }) => {
1671
1660
  const d = M(
1672
1661
  (c) => {
1673
1662
  e.update(() => {
1674
- const u = _();
1675
- if (R(u)) {
1663
+ const u = y();
1664
+ if (E(u)) {
1676
1665
  const g = [];
1677
- for (const [v, x] of c.entries()) {
1678
- const y = pe(x.value);
1679
- y.append(z(x.label)), g.push(y), v !== c.length - 1 && g.push(z(" "));
1666
+ for (const [C, x] of c.entries()) {
1667
+ const _ = pe(x.value);
1668
+ _.append(z(x.label)), g.push(_), C !== c.length - 1 && g.push(z(" "));
1680
1669
  }
1681
1670
  u.insertNodes(g);
1682
1671
  }
@@ -1684,7 +1673,7 @@ const Sn = ({ onClose: t }) => {
1684
1673
  },
1685
1674
  [e]
1686
1675
  );
1687
- return /* @__PURE__ */ h(P, { children: [
1676
+ return /* @__PURE__ */ h(B, { children: [
1688
1677
  !i && /* @__PURE__ */ n(st, {}),
1689
1678
  i && /* @__PURE__ */ n(
1690
1679
  ar,
@@ -1708,7 +1697,7 @@ const Sn = ({ onClose: t }) => {
1708
1697
  )
1709
1698
  ] })
1710
1699
  ] });
1711
- }, En = ({
1700
+ }, Sn = ({
1712
1701
  onClose: t,
1713
1702
  fileUpload: r,
1714
1703
  filePrefix: e
@@ -1727,8 +1716,8 @@ const Sn = ({ onClose: t }) => {
1727
1716
  o.update(() => {
1728
1717
  if (!i)
1729
1718
  return;
1730
- const d = _();
1731
- if (R(d) && d.isCollapsed()) {
1719
+ const d = y();
1720
+ if (E(d) && d.isCollapsed()) {
1732
1721
  const c = z(i.name);
1733
1722
  d.insertNodes([c]);
1734
1723
  const u = Ut();
@@ -1737,7 +1726,7 @@ const Sn = ({ onClose: t }) => {
1737
1726
  o.dispatchCommand(it, wt(i.url));
1738
1727
  });
1739
1728
  }, [o, i]);
1740
- return /* @__PURE__ */ h(P, { children: [
1729
+ return /* @__PURE__ */ h(B, { children: [
1741
1730
  r.isLoading && /* @__PURE__ */ n(st, {}),
1742
1731
  /* @__PURE__ */ n(
1743
1732
  bt,
@@ -1762,13 +1751,13 @@ const Sn = ({ onClose: t }) => {
1762
1751
  )
1763
1752
  ] })
1764
1753
  ] });
1765
- }, Rn = ({
1754
+ }, Nn = ({
1766
1755
  open: t,
1767
1756
  onOpenChange: r,
1768
1757
  getDocs: e,
1769
1758
  filePrefix: o
1770
1759
  }) => {
1771
- const { fileUpload: i } = H(), [a, l] = p("url"), s = () => {
1760
+ const { fileUpload: i } = F(), [a, l] = p("url"), s = () => {
1772
1761
  r(!1);
1773
1762
  };
1774
1763
  return /* @__PURE__ */ h(ne, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
@@ -1784,10 +1773,10 @@ const Sn = ({ onClose: t }) => {
1784
1773
  ),
1785
1774
  i && /* @__PURE__ */ n(gt, { active: a === "file", onClick: () => l("file"), children: "Fil" })
1786
1775
  ] }),
1787
- a === "url" && /* @__PURE__ */ n(Sn, { onClose: s }),
1788
- a === "rutine" && e && /* @__PURE__ */ n(Nn, { onClose: s, getDocs: e }),
1776
+ a === "url" && /* @__PURE__ */ n(_n, { onClose: s }),
1777
+ a === "rutine" && e && /* @__PURE__ */ n(yn, { onClose: s, getDocs: e }),
1789
1778
  a === "file" && i && /* @__PURE__ */ n(
1790
- En,
1779
+ Sn,
1791
1780
  {
1792
1781
  onClose: s,
1793
1782
  fileUpload: i,
@@ -1795,13 +1784,13 @@ const Sn = ({ onClose: t }) => {
1795
1784
  }
1796
1785
  )
1797
1786
  ] });
1798
- }, ko = ({
1787
+ }, mo = ({
1799
1788
  getDocs: t,
1800
1789
  filePrefix: r
1801
1790
  }) => {
1802
1791
  const [e] = w(), [o, i] = p(!1), [a, l] = p(!1), s = M(() => {
1803
- const d = _();
1804
- if (R(d)) {
1792
+ const d = y();
1793
+ if (E(d)) {
1805
1794
  const c = ge(d), u = c.getParent();
1806
1795
  i(tt(u) || tt(c));
1807
1796
  }
@@ -1819,11 +1808,11 @@ const Sn = ({ onClose: t }) => {
1819
1808
  },
1820
1809
  title: "Lenke",
1821
1810
  value: "link",
1822
- children: /* @__PURE__ */ n(Yr, { size: "1.25rem" })
1811
+ children: /* @__PURE__ */ n(qr, { size: "1.25rem" })
1823
1812
  }
1824
1813
  ),
1825
1814
  /* @__PURE__ */ n(
1826
- Rn,
1815
+ Nn,
1827
1816
  {
1828
1817
  open: a,
1829
1818
  onOpenChange: l,
@@ -1832,14 +1821,14 @@ const Sn = ({ onClose: t }) => {
1832
1821
  }
1833
1822
  )
1834
1823
  ] });
1835
- }, bo = () => {
1836
- const [t] = w(), r = J(null), [e, o] = p(null), [i, a] = p(""), { hasFocus: l } = H();
1824
+ }, fo = () => {
1825
+ const [t] = w(), r = J(null), [e, o] = p(null), [i, a] = p(""), { hasFocus: l } = F();
1837
1826
  L(() => {
1838
1827
  e ? t.update(() => {
1839
1828
  a(e.getURL());
1840
1829
  }) : a("");
1841
1830
  }, [t, e]);
1842
- const s = !!(e && i && l), { refs: d, floatingStyles: c, context: u } = vt({
1831
+ const s = !!(e && i && l), { refs: d, floatingStyles: c, context: u } = Ct({
1843
1832
  placement: "top",
1844
1833
  strategy: "fixed",
1845
1834
  open: s,
@@ -1850,46 +1839,46 @@ const Sn = ({ onClose: t }) => {
1850
1839
  middleware: [Mr()]
1851
1840
  }), { getFloatingProps: g } = ae([
1852
1841
  le(u),
1853
- Tr(u)
1854
- ]), v = M(() => {
1842
+ xr(u)
1843
+ ]), C = M(() => {
1855
1844
  var m;
1856
- const k = _();
1857
- if (R(k)) {
1858
- const C = ge(k), N = C.getParent();
1859
- let I = null;
1860
- if (tt(N) ? I = N : tt(C) && (I = C), I) {
1845
+ const k = y();
1846
+ if (E(k)) {
1847
+ const v = ge(k), N = v.getParent();
1848
+ let R = null;
1849
+ if (tt(N) ? R = N : tt(v) && (R = v), R) {
1861
1850
  const Y = window.getSelection(), Z = t.getRootElement();
1862
1851
  k !== null && Y !== null && Z !== null && Z.contains(Y.anchorNode) && t.isEditable() && (r.current = ((m = Y.focusNode) == null ? void 0 : m.parentElement) ?? null);
1863
1852
  }
1864
- o(I);
1853
+ o(R);
1865
1854
  }
1866
1855
  }, [t]), x = M(() => {
1867
- e && _n(e) && t.update(() => {
1856
+ e && wn(e) && t.update(() => {
1868
1857
  e.remove();
1869
1858
  }), t.dispatchCommand(it, null);
1870
1859
  }, [t, e]);
1871
1860
  if (L(() => {
1872
1861
  t.getEditorState().read(() => {
1873
- v();
1862
+ C();
1874
1863
  });
1875
- }, [t, v]), L(() => ot(
1864
+ }, [t, C]), L(() => ot(
1876
1865
  t.registerUpdateListener(({ editorState: k }) => {
1877
1866
  k.read(() => {
1878
- v();
1867
+ C();
1879
1868
  });
1880
1869
  }),
1881
1870
  t.registerCommand(
1882
1871
  Q,
1883
- () => (v(), !1),
1872
+ () => (C(), !1),
1884
1873
  q
1885
1874
  ),
1886
1875
  t.registerCommand(
1887
- Ft,
1876
+ Ht,
1888
1877
  () => e ? (o(null), !0) : !1,
1889
1878
  Ie
1890
1879
  )
1891
- ), [t, v, e]), !s) return null;
1892
- const y = wt(i);
1880
+ ), [t, C, e]), !s) return null;
1881
+ const _ = wt(i);
1893
1882
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ h(
1894
1883
  re,
1895
1884
  {
@@ -1905,7 +1894,7 @@ const Sn = ({ onClose: t }) => {
1905
1894
  ...g(),
1906
1895
  children: [
1907
1896
  /* @__PURE__ */ n(
1908
- B,
1897
+ P,
1909
1898
  {
1910
1899
  as: "a",
1911
1900
  css: {
@@ -1915,8 +1904,8 @@ const Sn = ({ onClose: t }) => {
1915
1904
  textOverflow: "ellipsis",
1916
1905
  marginRight: "$4"
1917
1906
  },
1918
- href: y,
1919
- title: y,
1907
+ href: _,
1908
+ title: _,
1920
1909
  target: "_blank",
1921
1910
  rel: "noreferrer",
1922
1911
  children: i
@@ -1926,8 +1915,8 @@ const Sn = ({ onClose: t }) => {
1926
1915
  ]
1927
1916
  }
1928
1917
  ) });
1929
- }, vo = () => {
1930
- const [t] = Ct();
1918
+ }, ko = () => {
1919
+ const [t] = vt();
1931
1920
  return /* @__PURE__ */ h(
1932
1921
  at,
1933
1922
  {
@@ -1959,7 +1948,7 @@ const Sn = ({ onClose: t }) => {
1959
1948
  {
1960
1949
  onClick: () => t.dispatchCommand(ht, "right"),
1961
1950
  children: [
1962
- /* @__PURE__ */ n(Br, { size: "1.25rem" }),
1951
+ /* @__PURE__ */ n(Pr, { size: "1.25rem" }),
1963
1952
  "Høyre"
1964
1953
  ]
1965
1954
  }
@@ -1967,17 +1956,17 @@ const Sn = ({ onClose: t }) => {
1967
1956
  ]
1968
1957
  }
1969
1958
  );
1970
- }, Dt = ["image/"], Co = () => {
1971
- const [t] = Ct(), { fileUpload: r } = H();
1959
+ }, Dt = ["image/"], bo = () => {
1960
+ const [t] = vt(), { fileUpload: r } = F();
1972
1961
  return L(() => t.registerCommand(
1973
1962
  qe,
1974
1963
  (e) => ((async () => {
1975
- const o = await Pe(
1964
+ const o = await Be(
1976
1965
  e,
1977
1966
  [Dt].flatMap((i) => i)
1978
1967
  );
1979
1968
  for (const { file: i, result: a } of o)
1980
- if (He(i, Dt)) {
1969
+ if (Fe(i, Dt)) {
1981
1970
  let l = a;
1982
1971
  const s = new Image(), d = window.URL.createObjectURL(i);
1983
1972
  s.onload = async () => {
@@ -1993,35 +1982,35 @@ const Sn = ({ onClose: t }) => {
1993
1982
  ), [t, r]), null;
1994
1983
  };
1995
1984
  export {
1996
- xt as $createImageNode,
1985
+ Tt as $createImageNode,
1997
1986
  pe as $createRutineLinkNode,
1998
- lo as $getNodesOfTypes,
1999
- so as $isImageNode,
2000
- _n as $isRutineLinkNode,
2001
- vo as AlignToolbarDropdown,
2002
- Co as DragDropPastePlugin,
2003
- pn as FloatingToolbar,
2004
- F as ImageNode,
2005
- po as InsertSelector,
2006
- bo as LinkEditPlugin,
1987
+ io as $getNodesOfTypes,
1988
+ ao as $isImageNode,
1989
+ wn as $isRutineLinkNode,
1990
+ ko as AlignToolbarDropdown,
1991
+ bo as DragDropPastePlugin,
1992
+ un as FloatingToolbar,
1993
+ H as ImageNode,
1994
+ uo as InsertSelector,
1995
+ fo as LinkEditPlugin,
2007
1996
  rt as LinkTargetNode,
2008
- ko as LinkToolbarButton,
2009
- uo as RichTextEditor,
2010
- mn as RichTextToolbar,
1997
+ mo as LinkToolbarButton,
1998
+ co as RichTextEditor,
1999
+ gn as RichTextToolbar,
2011
2000
  K as RutineLinkNode,
2012
- fo as RutineLinkNodeInit,
2013
- mo as TableEditPlugin,
2001
+ po as RutineLinkNodeInit,
2002
+ go as TableEditPlugin,
2014
2003
  Ir as clearEditorState,
2015
- co as defaultNodes,
2016
- ho as defaultViewNodes,
2004
+ lo as defaultNodes,
2005
+ so as defaultViewNodes,
2017
2006
  Rr as isEditorState,
2018
- Tt as isJSON,
2007
+ xt as isJSON,
2019
2008
  de as richTextContext,
2020
- go as richTextCss,
2021
- Ln as richTextStyleObj,
2009
+ ho as richTextCss,
2010
+ xn as richTextStyleObj,
2022
2011
  Or as setStateFromPlainText,
2023
- io as stateToHTML,
2024
- ao as syncStateToHTML,
2012
+ no as stateToHTML,
2013
+ oo as syncStateToHTML,
2025
2014
  zr as useHasFocusWithin,
2026
- H as useRichTextContext
2015
+ F as useRichTextContext
2027
2016
  };