@arkitektbedriftene/fe-lib 4.3.3 → 5.1.1

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.
Files changed (67) hide show
  1. package/dist/elements/components/CompanyLogo.d.ts +8 -14
  2. package/dist/elements/elements.d.ts +1 -1
  3. package/dist/elements.d.ts +1 -0
  4. package/dist/elements.es.js +23 -23
  5. package/dist/icons.d.ts +1 -0
  6. package/dist/icons.es.js +3 -4
  7. package/dist/{index.esm-fa9e6ea7.js → index.esm-Dzt91gSZ.js} +29 -32
  8. package/dist/normalize.css.d.ts +1 -1
  9. package/dist/oidc/impersonate.d.ts +1 -1
  10. package/dist/oidc/oidc.d.ts +6 -6
  11. package/dist/oidc.d.ts +1 -0
  12. package/dist/oidc.es.js +5 -5
  13. package/dist/rich-text/Editor.d.ts +13 -18
  14. package/dist/rich-text/Plugins/Image/ImageComponent.d.ts +1 -1
  15. package/dist/rich-text/Plugins/Image/ImageNode.d.ts +2 -3
  16. package/dist/rich-text/Plugins/Image/ImagePlugin.d.ts +3 -3
  17. package/dist/rich-text/Plugins/LinkInsertPlugin.d.ts +3 -3
  18. package/dist/rich-text/Plugins/LinkTargetNode.d.ts +2 -2
  19. package/dist/rich-text/Plugins/ParsePlugin.d.ts +2 -2
  20. package/dist/rich-text/Plugins/RutineLinkNode.d.ts +12 -12
  21. package/dist/rich-text/Toolbar/Toolbar.d.ts +3 -119
  22. package/dist/rich-text/config.d.ts +9 -8
  23. package/dist/rich-text/editorContext.d.ts +7 -7
  24. package/dist/rich-text/getSelectedNode.d.ts +1 -1
  25. package/dist/rich-text/state.d.ts +5 -5
  26. package/dist/rich-text/styles.d.ts +102 -94
  27. package/dist/rich-text/theme.d.ts +1 -1
  28. package/dist/rich-text/trim.d.ts +3 -3
  29. package/dist/rich-text.d.ts +1 -0
  30. package/dist/rich-text.es.js +291 -281
  31. package/dist/ui/components/Alert.d.ts +95 -96
  32. package/dist/ui/components/Avatar.d.ts +97 -215
  33. package/dist/ui/components/Badge.d.ts +94 -94
  34. package/dist/ui/components/Box.d.ts +94 -94
  35. package/dist/ui/components/Button.d.ts +95 -96
  36. package/dist/ui/components/Card.d.ts +94 -94
  37. package/dist/ui/components/Dialog.d.ts +284 -400
  38. package/dist/ui/components/Form/Checkbox.d.ts +97 -216
  39. package/dist/ui/components/Form/Combobox.d.ts +2 -2
  40. package/dist/ui/components/Form/ReactSelect.d.ts +4 -2
  41. package/dist/ui/components/Form/Select.d.ts +3 -3
  42. package/dist/ui/components/Form/Switch.d.ts +195 -549
  43. package/dist/ui/components/Form/TextArea.d.ts +96 -97
  44. package/dist/ui/components/Form/TextInput.d.ts +96 -97
  45. package/dist/ui/components/Form/text.d.ts +188 -188
  46. package/dist/ui/components/Menu/DropdownMenu.d.ts +287 -287
  47. package/dist/ui/components/Menu/Menu.d.ts +281 -281
  48. package/dist/ui/components/NavBar.d.ts +98 -222
  49. package/dist/ui/components/OverlayCard.d.ts +94 -95
  50. package/dist/ui/components/Popover.d.ts +7 -124
  51. package/dist/ui/components/Spinner.d.ts +95 -96
  52. package/dist/ui/components/Stack.d.ts +95 -95
  53. package/dist/ui/components/Toolbar.d.ts +381 -382
  54. package/dist/ui/stitches.config.d.ts +569 -568
  55. package/dist/ui.css.d.ts +1 -1
  56. package/dist/ui.d.ts +1 -0
  57. package/dist/ui.es.js +54 -55
  58. package/package.json +5 -17
  59. package/dist/colors/colors.d.ts +0 -18
  60. package/dist/colors.d.ts +0 -1
  61. package/dist/colors.es.js +0 -20
  62. package/dist/hooks/hooks.d.ts +0 -2
  63. package/dist/hooks.d.ts +0 -1
  64. package/dist/hooks.es.js +0 -4
  65. package/dist/index.d.ts +0 -1
  66. package/dist/index.es.js +0 -4
  67. /package/dist/{stitches.config-00c23cdb.js → stitches.config-CEYOm13b.js} +0 -0
@@ -1,32 +1,33 @@
1
1
  var Ce = Object.defineProperty;
2
2
  var Me = (t, r, e) => r in t ? Ce(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var $ = (t, r, e) => (Me(t, typeof r != "symbol" ? r + "" : r, e), e);
3
+ var $ = (t, r, e) => Me(t, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { createHeadlessEditor as Bt } from "@lexical/headless";
5
5
  import { $generateHtmlFromNodes as Pt } from "@lexical/html";
6
- import { $getRoot as X, 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 V, $getSelection as y, COMMAND_PRIORITY_EDITOR as q, $isRangeSelection as R, $isRootOrShadowRoot as Ft, FORMAT_TEXT_COMMAND as A, COMMAND_PRIORITY_LOW as D, KEY_ARROW_DOWN_COMMAND as _e, KEY_ARROW_UP_COMMAND as we, 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";
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 y, 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 _e, KEY_ESCAPE_COMMAND as Ft, 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
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 Be, mediaFileReader as Pe, isMimeType as Fe } from "@lexical/utils";
9
- import { LinkNode as j, AutoLinkNode as jt, $isLinkNode as Z, TOGGLE_LINK_COMMAND as it } from "@lexical/link";
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 K } from "@lexical/list";
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";
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";
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 F } from "react/jsx-runtime";
13
+ import { jsx as n, jsxs as h, Fragment as P } 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 P, Stack as er, Button as S, DropdownMenu as at, ToolbarButton as lt, DropdownMenuIconItem as T, ToolbarToggleGroup as tt, 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 W, DropdownMenuSeparator as It, NavBar as ir, NavBarItem as gt, Combobox as ar } from "./ui.es.js";
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-fa9e6ea7.js";
17
- import { useLexicalComposerContext as _ } from "@lexical/react/LexicalComposerContext.js";
18
- import { LexicalComposer as pr } from "@lexical/react/LexicalComposer.js";
19
- import { RichTextPlugin as mr } from "@lexical/react/LexicalRichTextPlugin.js";
20
- import { LexicalErrorBoundary as fr } from "@lexical/react/LexicalErrorBoundary.js";
21
- import { useFloating as vt, autoUpdate as oe, size as kr, flip as br, offset as ie, shift as vr, useInteractions as ae, useRole as le, FloatingPortal as se, inline as Cr, useDismiss as Mr } from "@floating-ui/react";
22
- import { s as Tr, c as xr } from "./stitches.config-00c23cdb.js";
23
- import { ListPlugin as Lr } from "@lexical/react/LexicalListPlugin.js";
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";
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
+ import { useLexicalComposerContext as w } from "@lexical/react/LexicalComposerContext.js";
18
+ import { HorizontalRuleNode as pr } from "@lexical/react/LexicalHorizontalRuleNode.js";
19
+ import { LexicalComposer as mr } from "@lexical/react/LexicalComposer.js";
20
+ import { RichTextPlugin as fr } from "@lexical/react/LexicalRichTextPlugin.js";
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";
24
+ import { ListPlugin as wr } from "@lexical/react/LexicalListPlugin.js";
24
25
  import { HistoryPlugin as _r } from "@lexical/react/LexicalHistoryPlugin.js";
25
- import { TablePlugin as wr } from "@lexical/react/LexicalTablePlugin.js";
26
- import { TabIndentationPlugin as yr } from "@lexical/react/LexicalTabIndentationPlugin.js";
26
+ import { TablePlugin as yr } from "@lexical/react/LexicalTablePlugin.js";
27
+ import { HorizontalRulePlugin as Sr } from "@lexical/react/LexicalHorizontalRulePlugin.js";
28
+ import { TabIndentationPlugin as Nr } from "@lexical/react/LexicalTabIndentationPlugin.js";
27
29
  import { useLexicalComposerContext as Ct } from "@lexical/react/LexicalComposerContext";
28
- import "@stitches/react";
29
- const Sr = ({
30
+ const Er = ({
30
31
  text: t,
31
32
  maxChars: r,
32
33
  maxLines: e
@@ -46,7 +47,7 @@ const Sr = ({
46
47
  maxChars: r,
47
48
  maxLines: e
48
49
  }) => {
49
- const o = X(), i = o.getTextContent(), a = Sr({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = o.select().anchor;
50
+ const o = V(), i = o.getTextContent(), a = Er({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = o.select().anchor;
50
51
  Oe(t, d, l);
51
52
  const c = o.getLastChild();
52
53
  return c instanceof Te && c.getChildrenSize() === 0 && c.remove(), l;
@@ -63,10 +64,10 @@ const Sr = ({
63
64
  listitem: "ain-rich-text-nested-list-item"
64
65
  }
65
66
  }
66
- }, Tt = (t) => t[0] === "{", Nr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Er = (t, r) => {
67
+ }, Tt = (t) => t[0] === "{", Rr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ir = (t, r) => {
67
68
  t.update(
68
69
  () => {
69
- const e = X();
70
+ const e = V();
70
71
  e.clear();
71
72
  const o = G();
72
73
  o.append(z("")), e.append(o), nt(null);
@@ -75,10 +76,10 @@ const Sr = ({
75
76
  tag: r
76
77
  }
77
78
  );
78
- }, Rr = (t, r, e) => {
79
+ }, Or = (t, r, e) => {
79
80
  r.update(
80
81
  () => {
81
- const o = X();
82
+ const o = V();
82
83
  o.clear();
83
84
  const i = G();
84
85
  i.append(z(t.trim())), o.append(i), nt(null);
@@ -87,7 +88,7 @@ const Sr = ({
87
88
  tag: e
88
89
  }
89
90
  ), r.blur();
90
- }, ro = async (t, r, e) => {
91
+ }, io = async (t, r, e) => {
91
92
  var l;
92
93
  let o = 0;
93
94
  const i = Bt({
@@ -99,7 +100,7 @@ const Sr = ({
99
100
  try {
100
101
  if (typeof t == "string" && !Tt(t))
101
102
  i.update(() => {
102
- const s = X(), d = G();
103
+ const s = V(), d = G();
103
104
  d.append(z(t.trim())), s.append(d);
104
105
  });
105
106
  else {
@@ -119,7 +120,7 @@ const Sr = ({
119
120
  return i.read(() => {
120
121
  a = Pt(i);
121
122
  }), { html: a, trimCount: o };
122
- }, no = (t, r, e) => {
123
+ }, ao = (t, r, e) => {
123
124
  let o = 0;
124
125
  const i = Bt({
125
126
  nodes: r,
@@ -130,7 +131,7 @@ const Sr = ({
130
131
  try {
131
132
  if (typeof t == "string" && !Tt(t))
132
133
  i.update(() => {
133
- const l = X(), s = G();
134
+ const l = V(), s = G();
134
135
  s.append(z(t.trim())), l.append(s);
135
136
  });
136
137
  else {
@@ -153,8 +154,8 @@ const Sr = ({
153
154
  } catch {
154
155
  }
155
156
  return { html: a, trimCount: o };
156
- }, oo = (t) => Ae().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
157
- class et extends j {
157
+ }, lo = (t) => Ae().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
158
+ class rt extends W {
158
159
  static getType() {
159
160
  return "target-link";
160
161
  }
@@ -169,7 +170,7 @@ class et extends j {
169
170
  i && (a.target = "_blank", a.rel = "noopener noreferrer"), super(r, a, o);
170
171
  }
171
172
  static clone(r) {
172
- return new et(
173
+ return new rt(
173
174
  r.__url,
174
175
  { rel: r.__rel, target: r.__target, title: r.__title },
175
176
  r.__key
@@ -179,7 +180,7 @@ class et extends j {
179
180
  return super.exportJSON();
180
181
  }
181
182
  static importJSON(r) {
182
- return j.importJSON(r);
183
+ return W.importJSON(r);
183
184
  }
184
185
  }
185
186
  const de = Qe({
@@ -187,7 +188,7 @@ const de = Qe({
187
188
  editorRef: { current: null },
188
189
  signUrl: void 0,
189
190
  fileUpload: void 0
190
- }), Ir = ({ onBlur: t }) => {
191
+ }), zr = ({ onBlur: t }) => {
191
192
  const [r, e] = p(!1), o = J(null), i = M(() => {
192
193
  e(!0), o.current && window.clearTimeout(o.current);
193
194
  }, []), a = M(() => {
@@ -203,17 +204,17 @@ const de = Qe({
203
204
  }
204
205
  };
205
206
  }, H = () => Ze(de);
206
- function Or({
207
+ function $r({
207
208
  src: t,
208
209
  altText: r,
209
210
  width: e,
210
211
  height: o,
211
212
  nodeKey: i
212
213
  }) {
213
- const { signUrl: a } = H(), [l, s] = p(a ? "" : t), [d, c] = p(!1), u = J(!1), [g] = _();
214
+ const { signUrl: a } = H(), [l, s] = p(a ? "" : t), [d, c] = p(!1), u = J(!1), [g] = w();
214
215
  L(() => {
215
216
  const m = async () => {
216
- s(await (a == null ? void 0 : a(t)) ?? t);
217
+ s(await (a == null ? void 0 : a(t)) || t);
217
218
  };
218
219
  !l && !u.current && (u.current = !0, m());
219
220
  }, []);
@@ -224,7 +225,7 @@ function Or({
224
225
  const m = dt(i);
225
226
  m && m.remove();
226
227
  });
227
- }, w = () => {
228
+ }, _ = () => {
228
229
  g.update(() => {
229
230
  var N;
230
231
  const m = dt(i);
@@ -243,7 +244,7 @@ function Or({
243
244
  C && C.insertAfter(m);
244
245
  });
245
246
  };
246
- return l ? /* @__PURE__ */ h(P, { css: { position: "relative", display: "inline-block" }, children: [
247
+ return l ? /* @__PURE__ */ h(B, { css: { position: "relative", display: "inline-block" }, children: [
247
248
  /* @__PURE__ */ h(
248
249
  er,
249
250
  {
@@ -276,7 +277,7 @@ function Or({
276
277
  icon: !0,
277
278
  size: "sm",
278
279
  css: { width: "20px", height: "20px" },
279
- onClick: w,
280
+ onClick: _,
280
281
  children: /* @__PURE__ */ n(sr, {})
281
282
  }
282
283
  ),
@@ -310,11 +311,11 @@ function Or({
310
311
  )
311
312
  ] }) : /* @__PURE__ */ n("span", {});
312
313
  }
313
- function zr(t) {
314
+ function Ar(t) {
314
315
  const r = t, { alt: e, src: o, width: i, height: a } = r;
315
316
  return { node: xt({ altText: e, height: a, src: o, width: i }) };
316
317
  }
317
- class U extends xe {
318
+ class F extends xe {
318
319
  constructor(e, o, i, a, l, s) {
319
320
  super(s);
320
321
  $(this, "__src");
@@ -328,7 +329,7 @@ class U extends xe {
328
329
  return "image";
329
330
  }
330
331
  static clone(e) {
331
- return new U(
332
+ return new F(
332
333
  e.__src,
333
334
  e.__altText,
334
335
  e.__width,
@@ -354,7 +355,7 @@ class U extends xe {
354
355
  static importDOM() {
355
356
  return {
356
357
  img: (e) => ({
357
- conversion: zr,
358
+ conversion: Ar,
358
359
  priority: 0
359
360
  })
360
361
  };
@@ -396,7 +397,7 @@ class U extends xe {
396
397
  }
397
398
  decorate() {
398
399
  return /* @__PURE__ */ n(
399
- Or,
400
+ $r,
400
401
  {
401
402
  src: this.__src,
402
403
  altText: this.__altText,
@@ -416,116 +417,117 @@ function xt({
416
417
  key: a
417
418
  }) {
418
419
  return Le(
419
- new U(e, t, o, r, i, a)
420
+ new F(e, t, o, r, i, a)
420
421
  );
421
422
  }
422
- function io(t) {
423
- return t instanceof U;
423
+ function so(t) {
424
+ return t instanceof F;
424
425
  }
425
- const ao = [
426
+ const co = [
426
427
  qt,
427
428
  Jt,
428
429
  ft,
429
430
  Kt,
430
431
  jt,
431
- j,
432
+ W,
432
433
  Yt,
433
434
  Xt,
434
435
  Vt,
435
- U
436
- ], lo = [
436
+ F,
437
+ pr
438
+ ], ho = [
437
439
  qt,
438
440
  Jt,
439
441
  ft,
440
442
  Kt,
441
443
  jt,
442
- j,
444
+ W,
443
445
  Yt,
444
446
  Xt,
445
447
  Vt,
446
- U,
447
- et,
448
+ F,
449
+ rt,
448
450
  {
449
- replace: j,
450
- with: (t) => new et(
451
+ replace: W,
452
+ with: (t) => new rt(
451
453
  t.getURL(),
452
454
  { rel: t.__rel, target: t.__target, title: t.__title }
453
455
  )
454
456
  }
455
457
  ];
456
- function $r(t) {
458
+ function Dr(t) {
457
459
  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: "M8 12l8 0" } }, { tag: "path", attr: { d: "M6 18l12 0" } }] })(t);
458
460
  }
459
461
  function Ot(t) {
460
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);
461
463
  }
462
- function Ar(t) {
464
+ function Br(t) {
463
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);
464
466
  }
465
- function Dr(t) {
467
+ function Pr(t) {
466
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);
467
469
  }
468
- function Br(t) {
470
+ function Hr(t) {
469
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);
470
472
  }
471
- function Pr(t) {
473
+ function Fr(t) {
472
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);
473
475
  }
474
- function Fr(t) {
476
+ function Ur(t) {
475
477
  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 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0" } }, { 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);
476
478
  }
477
- function Hr(t) {
479
+ function Wr(t) {
478
480
  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 -2 -2" } }, { tag: "path", attr: { d: "M17 16a2 2 0 1 0 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);
479
481
  }
480
- function Ur(t) {
482
+ function jr(t) {
481
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);
482
484
  }
483
- function Wr(t) {
485
+ function Kr(t) {
484
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);
485
487
  }
486
- function jr(t) {
488
+ function Gr(t) {
487
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);
488
490
  }
489
- function Kr(t) {
491
+ function qr(t) {
490
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: "M11 5l6 0" } }, { tag: "path", attr: { d: "M7 19l6 0" } }, { tag: "path", attr: { d: "M14 5l-4 14" } }] })(t);
491
493
  }
492
- function Gr(t) {
494
+ function Jr(t) {
493
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: "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);
494
496
  }
495
- function qr(t) {
497
+ function Yr(t) {
496
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: "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);
497
499
  }
498
- function Jr(t) {
500
+ function Xr(t) {
499
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: "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);
500
502
  }
501
- function Yr(t) {
503
+ function Vr(t) {
502
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: "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);
503
505
  }
504
- function Xr(t) {
506
+ function Qr(t) {
505
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: "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);
506
508
  }
507
- function Vr(t) {
509
+ function Zr(t) {
508
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: "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);
509
511
  }
510
- function Qr(t) {
512
+ function tn(t) {
511
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 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);
512
514
  }
513
- function Zr(t) {
515
+ function en(t) {
514
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: "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);
515
517
  }
516
- function tn(t) {
518
+ function rn(t) {
517
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: "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);
518
520
  }
519
- function en(t) {
521
+ function nn(t) {
520
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: "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);
521
523
  }
522
- function rn(t) {
524
+ function on(t) {
523
525
  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);
524
526
  }
525
- function nn(t) {
527
+ function an(t) {
526
528
  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);
527
529
  }
528
- const on = Tr("div", {
530
+ const ln = xr("div", {
529
531
  width: "10rem",
530
532
  display: "flex"
531
533
  }), he = {
@@ -540,24 +542,24 @@ const on = Tr("div", {
540
542
  paragraph: "Normal",
541
543
  quote: "Sitat",
542
544
  check: "Avkrysningsliste"
543
- }, an = {
544
- bullet: /* @__PURE__ */ n(Xr, { size: "1.25rem" }),
545
- h1: /* @__PURE__ */ n(Pr, { size: "1.25rem" }),
546
- h2: /* @__PURE__ */ n(Fr, { size: "1.25rem" }),
547
- h3: /* @__PURE__ */ n(Hr, { size: "1.25rem" }),
548
- h4: /* @__PURE__ */ n(Ur, { size: "1.25rem" }),
549
- h5: /* @__PURE__ */ n(Wr, { size: "1.25rem" }),
550
- h6: /* @__PURE__ */ n(jr, { size: "1.25rem" }),
551
- number: /* @__PURE__ */ n(Yr, { size: "1.25rem" }),
552
- check: /* @__PURE__ */ n(Jr, { size: "1.25rem" }),
553
- paragraph: /* @__PURE__ */ n(Gr, { size: "1.25rem" }),
554
- quote: /* @__PURE__ */ n(Vr, { size: "1.25rem" })
545
+ }, sn = {
546
+ bullet: /* @__PURE__ */ n(Qr, { size: "1.25rem" }),
547
+ h1: /* @__PURE__ */ n(Fr, { size: "1.25rem" }),
548
+ h2: /* @__PURE__ */ n(Ur, { size: "1.25rem" }),
549
+ h3: /* @__PURE__ */ n(Wr, { size: "1.25rem" }),
550
+ 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" })
555
557
  }, E = ({
556
558
  blockType: t
557
- }) => /* @__PURE__ */ h(F, { children: [
558
- /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: an[t] }),
559
+ }) => /* @__PURE__ */ h(P, { children: [
560
+ /* @__PURE__ */ n(B, { css: { display: "flex", flex: "0 0 auto" }, children: sn[t] }),
559
561
  /* @__PURE__ */ n(
560
- P,
562
+ B,
561
563
  {
562
564
  css: {
563
565
  flex: "1 1 auto",
@@ -568,24 +570,24 @@ const on = Tr("div", {
568
570
  children: he[t]
569
571
  }
570
572
  )
571
- ] }), ln = (t) => {
573
+ ] }), cn = (t) => {
572
574
  if (!R(t))
573
575
  return null;
574
576
  const r = t.anchor.getNode();
575
577
  let e = r.getKey() === "root" ? r : Wt(r, (o) => {
576
578
  const i = o.getParent();
577
- return i !== null && Ft(i);
579
+ return i !== null && Ht(i);
578
580
  });
579
581
  return e === null && (e = r.getTopLevelElementOrThrow()), {
580
582
  anchorNode: r,
581
583
  element: e
582
584
  };
583
- }, sn = () => {
584
- const [t] = _(), [r, e] = p("paragraph");
585
+ }, dn = () => {
586
+ const [t] = w(), [r, e] = p("paragraph");
585
587
  L(() => t.registerCommand(
586
- V,
588
+ Q,
587
589
  () => {
588
- const c = y(), u = ln(c);
590
+ const c = y(), u = cn(c);
589
591
  if (!u)
590
592
  return !1;
591
593
  const { element: g, anchorNode: v } = u, x = g.getKey();
@@ -610,7 +612,7 @@ const on = Tr("div", {
610
612
  R(u) && (ut(u, () => Ke(c)), e(c));
611
613
  });
612
614
  };
613
- return /* @__PURE__ */ n(on, { children: /* @__PURE__ */ h(
615
+ return /* @__PURE__ */ n(ln, { children: /* @__PURE__ */ h(
614
616
  at,
615
617
  {
616
618
  trigger: /* @__PURE__ */ n(
@@ -637,7 +639,7 @@ const on = Tr("div", {
637
639
  /* @__PURE__ */ n(T, { onClick: () => o("h5"), children: /* @__PURE__ */ n(E, { blockType: "h5" }) }),
638
640
  /* @__PURE__ */ n(T, { onClick: () => o("h6"), children: /* @__PURE__ */ n(E, { blockType: "h6" }) }),
639
641
  /* @__PURE__ */ n(T, { onClick: () => {
640
- r !== "bullet" && (t.dispatchCommand(He, void 0), e("bullet"));
642
+ r !== "bullet" && (t.dispatchCommand(Fe, void 0), e("bullet"));
641
643
  }, children: /* @__PURE__ */ n(E, { blockType: "bullet" }) }),
642
644
  /* @__PURE__ */ n(T, { onClick: () => {
643
645
  r !== "number" && (t.dispatchCommand(Ue, void 0), e("number"));
@@ -654,14 +656,14 @@ const on = Tr("div", {
654
656
  ]
655
657
  }
656
658
  ) });
657
- }, cn = () => {
658
- const [t] = _(), [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, w] = p(!1), [k, m] = p(""), [C, N] = p(!1), I = M(() => {
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, _] = p(!1), [k, m] = p(""), [C, N] = p(!1), I = M(() => {
659
661
  const b = y();
660
- 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")), w(b.hasFormat("subscript")), m(ze(b, "color", "")));
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")), _(b.hasFormat("subscript")), m(ze(b, "color", "")));
661
663
  }, []);
662
664
  L(() => ot(
663
665
  t.registerCommand(
664
- V,
666
+ Q,
665
667
  () => (I(), !1),
666
668
  q
667
669
  ),
@@ -674,7 +676,7 @@ const on = Tr("div", {
674
676
  const Y = M(
675
677
  () => t.dispatchCommand(A, "bold"),
676
678
  [t]
677
- ), Q = M(
679
+ ), Z = M(
678
680
  () => t.dispatchCommand(A, "italic"),
679
681
  [t]
680
682
  ), me = M(
@@ -692,7 +694,7 @@ const on = Tr("div", {
692
694
  ), ve = M(
693
695
  () => t.dispatchCommand(A, "subscript"),
694
696
  [t]
695
- ), wt = Qt(() => {
697
+ ), _t = Qt(() => {
696
698
  const b = [];
697
699
  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;
698
700
  }, [
@@ -705,22 +707,22 @@ const on = Tr("div", {
705
707
  s,
706
708
  k
707
709
  ]);
708
- return /* @__PURE__ */ h(F, { children: [
710
+ return /* @__PURE__ */ h(P, { children: [
709
711
  /* @__PURE__ */ h(
710
- tt,
712
+ et,
711
713
  {
712
714
  type: "multiple",
713
715
  "aria-label": "Tekstformattering",
714
- value: wt,
716
+ value: _t,
715
717
  children: [
716
- /* @__PURE__ */ n(O, { onClick: Y, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Dr, { size: "1.25rem" }) }),
718
+ /* @__PURE__ */ n(O, { onClick: Y, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Pr, { size: "1.25rem" }) }),
717
719
  /* @__PURE__ */ n(
718
720
  O,
719
721
  {
720
- onClick: Q,
722
+ onClick: Z,
721
723
  title: "Kursiv tekst",
722
724
  value: "italic",
723
- children: /* @__PURE__ */ n(Kr, { size: "1.25rem" })
725
+ children: /* @__PURE__ */ n(qr, { size: "1.25rem" })
724
726
  }
725
727
  ),
726
728
  /* @__PURE__ */ n(
@@ -729,7 +731,7 @@ const on = Tr("div", {
729
731
  onClick: me,
730
732
  title: "Understreket tekst",
731
733
  value: "underline",
732
- children: /* @__PURE__ */ n(nn, { size: "1.25rem" })
734
+ children: /* @__PURE__ */ n(an, { size: "1.25rem" })
733
735
  }
734
736
  )
735
737
  ]
@@ -738,11 +740,11 @@ const on = Tr("div", {
738
740
  /* @__PURE__ */ h(Zt, { open: C, onOpenChange: N, children: [
739
741
  /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(lt, { children: /* @__PURE__ */ n(dr, { size: "1.25rem" }) }) }),
740
742
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ h(
741
- tt,
743
+ et,
742
744
  {
743
745
  type: "multiple",
744
746
  "aria-label": "Tekstformattering",
745
- value: wt,
747
+ value: _t,
746
748
  css: { margin: "$1" },
747
749
  children: [
748
750
  /* @__PURE__ */ n(
@@ -751,7 +753,7 @@ const on = Tr("div", {
751
753
  onClick: fe,
752
754
  title: "Gjennomstreking",
753
755
  value: "strikethrough",
754
- children: /* @__PURE__ */ n(Qr, { size: "1.25rem" })
756
+ children: /* @__PURE__ */ n(tn, { size: "1.25rem" })
755
757
  }
756
758
  ),
757
759
  /* @__PURE__ */ n(
@@ -760,7 +762,7 @@ const on = Tr("div", {
760
762
  onClick: be,
761
763
  title: "Superscript",
762
764
  value: "superscript",
763
- children: /* @__PURE__ */ n(tn, { size: "1.25rem" })
765
+ children: /* @__PURE__ */ n(rn, { size: "1.25rem" })
764
766
  }
765
767
  ),
766
768
  /* @__PURE__ */ n(
@@ -769,39 +771,39 @@ const on = Tr("div", {
769
771
  onClick: ve,
770
772
  title: "Subscript",
771
773
  value: "subscript",
772
- children: /* @__PURE__ */ n(Zr, { size: "1.25rem" })
774
+ children: /* @__PURE__ */ n(en, { size: "1.25rem" })
773
775
  }
774
776
  ),
775
- /* @__PURE__ */ n(O, { onClick: ke, title: "Kode", value: "code", children: /* @__PURE__ */ n(Br, { size: "1.25rem" }) }),
776
- /* @__PURE__ */ n(hn, { activeColor: k })
777
+ /* @__PURE__ */ n(O, { onClick: ke, title: "Kode", value: "code", children: /* @__PURE__ */ n(Hr, { size: "1.25rem" }) }),
778
+ /* @__PURE__ */ n(gn, { activeColor: k })
777
779
  ]
778
780
  }
779
781
  ) })
780
782
  ] })
781
783
  ] });
782
- }, dn = [
784
+ }, un = [
783
785
  { name: "Reset", value: "" },
784
786
  { name: "Rød", value: "#df2222" },
785
787
  { name: "Grønn", value: "#1ca021" },
786
788
  { name: "Blå", value: "#2044b8" },
787
789
  { name: "Lilla", value: "#9c31de" }
788
- ], hn = ({ activeColor: t }) => {
789
- const [r] = _(), [e, o] = p(!1), i = (a) => {
790
+ ], gn = ({ activeColor: t }) => {
791
+ const [r] = w(), [e, o] = p(!1), i = (a) => {
790
792
  r.update(() => {
791
793
  const l = y();
792
794
  l && $e(l, { color: a });
793
795
  });
794
796
  };
795
797
  return /* @__PURE__ */ h(Zt, { open: e, onOpenChange: o, children: [
796
- /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(O, { value: "color", title: "Tekstfarge", children: /* @__PURE__ */ n(rn, { size: "1.25rem" }) }) }),
798
+ /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(O, { value: "color", title: "Tekstfarge", children: /* @__PURE__ */ n(on, { size: "1.25rem" }) }) }),
797
799
  /* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n(
798
- tt,
800
+ et,
799
801
  {
800
802
  type: "single",
801
803
  "aria-label": "Tekstfarge",
802
804
  value: t,
803
805
  css: { margin: "$1" },
804
- children: dn.map((a) => /* @__PURE__ */ n(
806
+ children: un.map((a) => /* @__PURE__ */ n(
805
807
  O,
806
808
  {
807
809
  value: a.value,
@@ -809,7 +811,7 @@ const on = Tr("div", {
809
811
  !a.value || a.value === t ? null : a.value
810
812
  ),
811
813
  children: a.value ? /* @__PURE__ */ n(
812
- P,
814
+ B,
813
815
  {
814
816
  css: {
815
817
  width: "1rem",
@@ -832,7 +834,7 @@ const on = Tr("div", {
832
834
  }
833
835
  ) })
834
836
  ] });
835
- }, un = ({ children: t }) => {
837
+ }, pn = ({ children: t }) => {
836
838
  const { hasFocus: r, editorRef: e } = H(), o = r, [i, a] = p(o);
837
839
  tr(() => {
838
840
  a(o);
@@ -841,16 +843,16 @@ const on = Tr("div", {
841
843
  placement: "top",
842
844
  whileElementsMounted: oe,
843
845
  middleware: [
844
- kr({
846
+ br({
845
847
  apply: ({ rects: u, elements: g }) => {
846
848
  g.floating.style.minWidth = `${u.reference.width}px`;
847
849
  }
848
850
  }),
849
- br(),
851
+ vr(),
850
852
  ie({
851
853
  mainAxis: 8
852
854
  }),
853
- vr({
855
+ Cr({
854
856
  padding: 8
855
857
  })
856
858
  ],
@@ -876,21 +878,21 @@ const on = Tr("div", {
876
878
  overflow: "hidden",
877
879
  boxShadow: "$md"
878
880
  },
879
- children: /* @__PURE__ */ n(gn, { children: t })
881
+ children: /* @__PURE__ */ n(mn, { children: t })
880
882
  }
881
883
  ) }) : null;
882
- }, gn = ({
884
+ }, mn = ({
883
885
  children: t,
884
886
  ...r
885
887
  }) => /* @__PURE__ */ h(rr, { "aria-label": "Formattering", ...r, children: [
886
- /* @__PURE__ */ n(sn, {}),
888
+ /* @__PURE__ */ n(dn, {}),
887
889
  /* @__PURE__ */ n(Rt, {}),
888
- /* @__PURE__ */ n(cn, {}),
890
+ /* @__PURE__ */ n(hn, {}),
889
891
  /* @__PURE__ */ n(Rt, {}),
890
892
  t
891
893
  ] });
892
- function pn() {
893
- const [t] = _();
894
+ function fn() {
895
+ const [t] = w();
894
896
  return L(() => ot(
895
897
  t.registerCommand(
896
898
  Gt,
@@ -898,17 +900,17 @@ function pn() {
898
900
  D
899
901
  ),
900
902
  t.registerCommand(
901
- _e,
903
+ we,
902
904
  (r) => At(r, t, !1),
903
905
  D
904
906
  ),
905
907
  t.registerCommand(
906
- we,
908
+ _e,
907
909
  (r) => At(r, t, !0),
908
910
  D
909
911
  ),
910
912
  t.registerCommand(
911
- Ht,
913
+ Ft,
912
914
  (r) => {
913
915
  if (pt() != null) {
914
916
  const o = t.getRootElement();
@@ -924,7 +926,7 @@ function pn() {
924
926
  const e = pt();
925
927
  return e != null && t.isEditable() ? (t.update(() => {
926
928
  const o = mt(e);
927
- K(o) && (r.preventDefault(), o.toggleChecked());
929
+ j(o) && (r.preventDefault(), o.toggleChecked());
928
930
  }), !0) : !1;
929
931
  },
930
932
  D
@@ -940,7 +942,7 @@ function pn() {
940
942
  a,
941
943
  (s) => Ne(s) && !s.isInline()
942
944
  );
943
- if (K(l)) {
945
+ if (j(l)) {
944
946
  const s = l.getParent();
945
947
  if (kt(s) && s.getListType() === "check" && (i || l.getFirstDescendant() === a)) {
946
948
  const d = t.getElementByKey(l.__key);
@@ -974,11 +976,11 @@ function ue(t, r) {
974
976
  }
975
977
  function zt(t) {
976
978
  ue(t, () => {
977
- const r = t.target, e = mn(r);
979
+ const r = t.target, e = kn(r);
978
980
  e != null && e.isEditable() && e.update(() => {
979
981
  if (t.target) {
980
982
  const o = mt(r);
981
- K(o) && (r.focus(), o.toggleChecked());
983
+ j(o) && (r.focus(), o.toggleChecked());
982
984
  }
983
985
  });
984
986
  });
@@ -988,7 +990,7 @@ function $t(t) {
988
990
  t.preventDefault();
989
991
  });
990
992
  }
991
- function mn(t) {
993
+ function kn(t) {
992
994
  let r = t;
993
995
  for (; r; ) {
994
996
  if (r.__lexicalEditor)
@@ -1002,11 +1004,11 @@ function pt() {
1002
1004
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
1003
1005
  t.parentNode.__lexicalListType === "check" ? t : null;
1004
1006
  }
1005
- function fn(t, r) {
1007
+ function bn(t, r) {
1006
1008
  let e = r ? t.getPreviousSibling() : t.getNextSibling(), o = t;
1007
- for (; e == null && K(o); )
1009
+ for (; e == null && j(o); )
1008
1010
  o = o.getParentOrThrow().getParent(), o != null && (e = r ? o.getPreviousSibling() : o.getNextSibling());
1009
- for (; K(e); ) {
1011
+ for (; j(e); ) {
1010
1012
  const i = r ? e.getLastChild() : e.getFirstChild();
1011
1013
  if (!kt(i))
1012
1014
  return e;
@@ -1018,9 +1020,9 @@ function At(t, r, e) {
1018
1020
  const o = pt();
1019
1021
  return o != null && r.update(() => {
1020
1022
  const i = mt(o);
1021
- if (!K(i))
1023
+ if (!j(i))
1022
1024
  return;
1023
- const a = fn(i, e);
1025
+ const a = bn(i, e);
1024
1026
  if (a != null) {
1025
1027
  a.selectStart();
1026
1028
  const l = r.getElementByKey(a.__key);
@@ -1031,43 +1033,44 @@ function At(t, r, e) {
1031
1033
  }), !1;
1032
1034
  }
1033
1035
  const Lt = Ee("INSERT_IMAGE_COMMAND");
1034
- function kn() {
1036
+ function vn() {
1035
1037
  const [t] = Ct();
1036
1038
  return L(() => {
1037
- if (!t.hasNodes([U]))
1039
+ if (!t.hasNodes([F]))
1038
1040
  throw new Error("ImagePlugin: ImageNode not registered on editor");
1039
1041
  return ot(
1040
1042
  t.registerCommand(
1041
1043
  Lt,
1042
1044
  (r) => {
1043
1045
  const e = xt(r);
1044
- return Re([e]), Ft(e.getParentOrThrow()) && Be(e, G).selectEnd(), !0;
1046
+ return Re([e]), Ht(e.getParentOrThrow()) && Be(e, G).selectEnd(), !0;
1045
1047
  },
1046
1048
  q
1047
1049
  )
1048
1050
  );
1049
1051
  }, [t]), null;
1050
1052
  }
1051
- const bn = () => /* @__PURE__ */ h(F, { children: [
1052
- /* @__PURE__ */ n(Lr, {}),
1053
+ const Cn = () => /* @__PURE__ */ h(P, { children: [
1053
1054
  /* @__PURE__ */ n(wr, {}),
1054
- /* @__PURE__ */ n(_r, {}),
1055
- /* @__PURE__ */ n(pn, {}),
1056
1055
  /* @__PURE__ */ n(yr, {}),
1057
- /* @__PURE__ */ n(kn, {})
1058
- ] }), vn = ({
1056
+ /* @__PURE__ */ n(_r, {}),
1057
+ /* @__PURE__ */ n(fn, {}),
1058
+ /* @__PURE__ */ n(Nr, {}),
1059
+ /* @__PURE__ */ n(vn, {}),
1060
+ /* @__PURE__ */ n(Sr, {})
1061
+ ] }), Mn = ({
1059
1062
  state: t
1060
1063
  }) => {
1061
- const [r] = _(), e = J(!1);
1064
+ const [r] = w(), e = J(!1);
1062
1065
  return L(() => {
1063
1066
  !t || e.current || (e.current = !0, window.queueMicrotask(() => {
1064
1067
  try {
1065
- if (Nr(t)) {
1066
- t.isEmpty() ? Er(r) : r.setEditorState(t);
1068
+ if (Rr(t)) {
1069
+ t.isEmpty() ? Ir(r) : r.setEditorState(t);
1067
1070
  return;
1068
1071
  }
1069
1072
  if (typeof t == "string" && !Tt(t)) {
1070
- Rr(t, r);
1073
+ Or(t, r);
1071
1074
  return;
1072
1075
  }
1073
1076
  const o = r.parseEditorState(t);
@@ -1077,7 +1080,7 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1077
1080
  }
1078
1081
  }));
1079
1082
  }, []), null;
1080
- }, Cn = nr("div", {
1083
+ }, Tn = nr("div", {
1081
1084
  border: "1px solid $borderDarker",
1082
1085
  borderRadius: "$md",
1083
1086
  position: "relative",
@@ -1114,10 +1117,10 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1114
1117
  }
1115
1118
  }
1116
1119
  ]
1117
- }), Mn = ({
1120
+ }), xn = ({
1118
1121
  isLoading: t
1119
1122
  }) => /* @__PURE__ */ n(
1120
- P,
1123
+ B,
1121
1124
  {
1122
1125
  css: {
1123
1126
  visibility: t ? "visible" : "hidden",
@@ -1128,7 +1131,7 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1128
1131
  },
1129
1132
  children: /* @__PURE__ */ n(st, {})
1130
1133
  }
1131
- ), so = ({
1134
+ ), uo = ({
1132
1135
  isLoading: t,
1133
1136
  children: r,
1134
1137
  placeholderText: e,
@@ -1143,14 +1146,14 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1143
1146
  css: g,
1144
1147
  signUrl: v,
1145
1148
  fileUpload: x,
1146
- editable: w = !0
1149
+ editable: _ = !0
1147
1150
  }) => {
1148
- const { hasFocus: k, attributes: m } = Ir({ onBlur: c }), C = J(null), N = Qt(
1151
+ const { hasFocus: k, attributes: m } = zr({ onBlur: c }), C = J(null), N = Qt(
1149
1152
  () => ({ hasFocus: k, editorRef: C, signUrl: v, fileUpload: x }),
1150
1153
  [k, v, x]
1151
1154
  );
1152
1155
  return /* @__PURE__ */ n(de.Provider, { value: N, children: /* @__PURE__ */ h(
1153
- pr,
1156
+ mr,
1154
1157
  {
1155
1158
  initialConfig: {
1156
1159
  namespace: "ain-rich-text",
@@ -1159,11 +1162,11 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1159
1162
  },
1160
1163
  theme: Mt,
1161
1164
  nodes: o,
1162
- editable: w
1165
+ editable: _
1163
1166
  },
1164
1167
  children: [
1165
1168
  /* @__PURE__ */ h(
1166
- Cn,
1169
+ Tn,
1167
1170
  {
1168
1171
  ref: C,
1169
1172
  hasFocus: k,
@@ -1173,11 +1176,11 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1173
1176
  children: [
1174
1177
  a,
1175
1178
  /* @__PURE__ */ n(
1176
- mr,
1179
+ fr,
1177
1180
  {
1178
1181
  contentEditable: s,
1179
1182
  placeholder: e ? /* @__PURE__ */ n(
1180
- P,
1183
+ B,
1181
1184
  {
1182
1185
  css: {
1183
1186
  position: "absolute",
@@ -1190,24 +1193,26 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1190
1193
  children: e
1191
1194
  }
1192
1195
  ) : null,
1193
- ErrorBoundary: fr
1196
+ ErrorBoundary: kr
1194
1197
  }
1195
1198
  ),
1196
- /* @__PURE__ */ n(bn, {}),
1199
+ /* @__PURE__ */ n(Cn, {}),
1197
1200
  i,
1198
- /* @__PURE__ */ n(Mn, { isLoading: t }),
1199
- w && !a && /* @__PURE__ */ n(un, { children: l })
1201
+ /* @__PURE__ */ n(xn, { isLoading: t }),
1202
+ _ && !a && /* @__PURE__ */ n(pn, { children: l })
1200
1203
  ]
1201
1204
  }
1202
1205
  ),
1203
- /* @__PURE__ */ n(vn, { state: u }),
1204
- /* @__PURE__ */ n(F, { children: r })
1206
+ /* @__PURE__ */ n(Mn, { state: u }),
1207
+ /* @__PURE__ */ n(P, { children: r })
1205
1208
  ]
1206
1209
  }
1207
1210
  ) });
1208
- }, Tn = {
1211
+ }, Ln = {
1209
1212
  fontSize: "1rem",
1210
1213
  lineHeight: "1.5",
1214
+ whiteSpace: "pre-wrap",
1215
+ wordBreak: "break-word",
1211
1216
  "h1, h2, h3, h4, h5, h6": {
1212
1217
  fontWeight: "700",
1213
1218
  lineHeight: "1.2",
@@ -1365,6 +1370,12 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1365
1370
  maxWidth: "100%",
1366
1371
  height: "auto"
1367
1372
  },
1373
+ hr: {
1374
+ height: "2px",
1375
+ border: 0,
1376
+ backgroundColor: "$gray400",
1377
+ margin: 0
1378
+ },
1368
1379
  variants: {
1369
1380
  size: {
1370
1381
  xs: {
@@ -1402,11 +1413,11 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1402
1413
  defaultVariants: {
1403
1414
  size: "md"
1404
1415
  }
1405
- }, co = xr(Tn), xn = ({
1416
+ }, go = Lr(Ln), wn = ({
1406
1417
  fileUpload: t,
1407
1418
  ...r
1408
1419
  }) => {
1409
- const [e] = _(), [o, i] = p(null), a = (s) => {
1420
+ const [e] = w(), [o, i] = p(null), a = (s) => {
1410
1421
  var c;
1411
1422
  const d = (c = s.target.files) == null ? void 0 : c[0];
1412
1423
  if (d) {
@@ -1448,15 +1459,15 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1448
1459
  )
1449
1460
  ] })
1450
1461
  ] });
1451
- }, ho = () => {
1452
- const [t] = _(), { fileUpload: r } = H(), [e, o] = p(!1), i = M(() => {
1462
+ }, po = () => {
1463
+ const [t] = w(), { fileUpload: r } = H(), [e, o] = p(!1), i = M(() => {
1453
1464
  t.dispatchCommand(Je, {
1454
1465
  rows: "3",
1455
1466
  columns: "3",
1456
1467
  includeHeaders: !1
1457
1468
  });
1458
1469
  }, [t]);
1459
- return /* @__PURE__ */ h(F, { children: [
1470
+ return /* @__PURE__ */ h(P, { children: [
1460
1471
  /* @__PURE__ */ h(
1461
1472
  at,
1462
1473
  {
@@ -1465,7 +1476,7 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1465
1476
  align: "end",
1466
1477
  children: [
1467
1478
  /* @__PURE__ */ h(T, { onClick: i, children: [
1468
- /* @__PURE__ */ n(en, { size: "1.25rem" }),
1479
+ /* @__PURE__ */ n(nn, { size: "1.25rem" }),
1469
1480
  " Tabell"
1470
1481
  ] }),
1471
1482
  r && /* @__PURE__ */ h(T, { onClick: () => o(!0), children: [
@@ -1476,7 +1487,7 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1476
1487
  }
1477
1488
  ),
1478
1489
  r && /* @__PURE__ */ n(
1479
- xn,
1490
+ wn,
1480
1491
  {
1481
1492
  open: e,
1482
1493
  onOpenChange: o,
@@ -1485,11 +1496,11 @@ const bn = () => /* @__PURE__ */ h(F, { children: [
1485
1496
  )
1486
1497
  ] });
1487
1498
  };
1488
- function Ln(t) {
1499
+ function _n(t) {
1489
1500
  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);
1490
1501
  }
1491
- const uo = () => {
1492
- const [t] = _(), [r, e] = p(null), { hasFocus: o } = H();
1502
+ const mo = () => {
1503
+ const [t] = w(), [r, e] = p(null), { hasFocus: o } = H();
1493
1504
  L(() => {
1494
1505
  !o && r && e(null);
1495
1506
  }, [o, r]);
@@ -1502,7 +1513,7 @@ const uo = () => {
1502
1513
  middleware: [ie({ mainAxis: -20, crossAxis: -2 })]
1503
1514
  });
1504
1515
  L(() => t.registerCommand(
1505
- V,
1516
+ Q,
1506
1517
  () => {
1507
1518
  const s = y();
1508
1519
  if (R(s)) {
@@ -1549,23 +1560,23 @@ const uo = () => {
1549
1560
  ref: i.setFloating,
1550
1561
  style: a,
1551
1562
  css: { padding: "2px", width: "18px", height: "18px" },
1552
- children: /* @__PURE__ */ n(Ln, {})
1563
+ children: /* @__PURE__ */ n(_n, {})
1553
1564
  }
1554
1565
  ),
1555
1566
  children: [
1556
- /* @__PURE__ */ n(W, { onClick: l("add-row-over"), children: "Legg til rad over" }),
1557
- /* @__PURE__ */ n(W, { onClick: l("add-row-under"), children: "Legg til rad under" }),
1567
+ /* @__PURE__ */ n(U, { onClick: l("add-row-over"), children: "Legg til rad over" }),
1568
+ /* @__PURE__ */ n(U, { onClick: l("add-row-under"), children: "Legg til rad under" }),
1558
1569
  /* @__PURE__ */ n(It, {}),
1559
- /* @__PURE__ */ n(W, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
1560
- /* @__PURE__ */ n(W, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
1570
+ /* @__PURE__ */ n(U, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
1571
+ /* @__PURE__ */ n(U, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
1561
1572
  /* @__PURE__ */ n(It, {}),
1562
- /* @__PURE__ */ n(W, { onClick: l("delete-row"), children: "Fjern rad" }),
1563
- /* @__PURE__ */ n(W, { onClick: l("delete-column"), children: "Fjern kolonne" })
1573
+ /* @__PURE__ */ n(U, { onClick: l("delete-row"), children: "Fjern rad" }),
1574
+ /* @__PURE__ */ n(U, { onClick: l("delete-column"), children: "Fjern kolonne" })
1564
1575
  ]
1565
1576
  }
1566
1577
  ) : null;
1567
1578
  };
1568
- function _t(t) {
1579
+ function wt(t) {
1569
1580
  let r = t;
1570
1581
  const e = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, o = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
1571
1582
  return r = String(r).trim(), r.match(e) || r.match(o) ? r : "https://";
@@ -1574,12 +1585,12 @@ function ge(t) {
1574
1585
  const r = t.anchor, e = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1575
1586
  return o === i ? o : t.isBackward() ? yt(e) ? o : i : yt(r) ? o : i;
1576
1587
  }
1577
- const go = (t) => (B.baseURL = t, B), rt = class extends j {
1588
+ const fo = (t) => (K.baseURL = t, K), X = class X extends W {
1578
1589
  static getType() {
1579
1590
  return "rutine_link";
1580
1591
  }
1581
1592
  static clone(r) {
1582
- return new rt(r.__url, {}, r.__key);
1593
+ return new X(r.__url, {}, r.__key);
1583
1594
  }
1584
1595
  createDOM(r) {
1585
1596
  const e = super.createDOM(r);
@@ -1598,22 +1609,22 @@ const go = (t) => (B.baseURL = t, B), rt = class extends j {
1598
1609
  }
1599
1610
  getURL() {
1600
1611
  try {
1601
- return new URL(this.__url, rt.baseURL).toString();
1612
+ return new URL(this.__url, X.baseURL).toString();
1602
1613
  } catch {
1603
1614
  return "";
1604
1615
  }
1605
1616
  }
1606
1617
  };
1607
- let B = rt;
1608
- $(B, "baseURL", "");
1618
+ $(X, "baseURL", "");
1619
+ let K = X;
1609
1620
  function pe(t) {
1610
- return new B(t);
1621
+ return new K(t);
1611
1622
  }
1612
- function _n(t) {
1613
- return t instanceof B;
1623
+ function yn(t) {
1624
+ return t instanceof K;
1614
1625
  }
1615
- const wn = ({ onClose: t }) => {
1616
- const [r] = _(), e = M(
1626
+ const Sn = ({ onClose: t }) => {
1627
+ const [r] = w(), e = M(
1617
1628
  (i) => {
1618
1629
  r.update(() => {
1619
1630
  const a = y();
@@ -1623,7 +1634,7 @@ const wn = ({ onClose: t }) => {
1623
1634
  const s = Ut();
1624
1635
  s.setTextNodeRange(l, 0, l, i.length), nt(s);
1625
1636
  }
1626
- r.dispatchCommand(it, _t(i));
1637
+ r.dispatchCommand(it, wt(i));
1627
1638
  });
1628
1639
  },
1629
1640
  [r]
@@ -1637,11 +1648,11 @@ const wn = ({ onClose: t }) => {
1637
1648
  /* @__PURE__ */ n(S, { type: "submit", variant: "primary", children: "Sett inn" })
1638
1649
  ] })
1639
1650
  ] });
1640
- }, yn = ({
1651
+ }, Nn = ({
1641
1652
  onClose: t,
1642
1653
  getDocs: r
1643
1654
  }) => {
1644
- const [e] = _(), o = J(!1), [i, a] = p(null), [l, s] = p([]);
1655
+ const [e] = w(), o = J(!1), [i, a] = p(null), [l, s] = p([]);
1645
1656
  L(() => {
1646
1657
  o.current || (async () => {
1647
1658
  o.current = !0;
@@ -1659,8 +1670,8 @@ const wn = ({ onClose: t }) => {
1659
1670
  if (R(u)) {
1660
1671
  const g = [];
1661
1672
  for (const [v, x] of c.entries()) {
1662
- const w = pe(x.value);
1663
- w.append(z(x.label)), g.push(w), v !== c.length - 1 && g.push(z(" "));
1673
+ const _ = pe(x.value);
1674
+ _.append(z(x.label)), g.push(_), v !== c.length - 1 && g.push(z(" "));
1664
1675
  }
1665
1676
  u.insertNodes(g);
1666
1677
  }
@@ -1668,7 +1679,7 @@ const wn = ({ onClose: t }) => {
1668
1679
  },
1669
1680
  [e]
1670
1681
  );
1671
- return /* @__PURE__ */ h(F, { children: [
1682
+ return /* @__PURE__ */ h(P, { children: [
1672
1683
  !i && /* @__PURE__ */ n(st, {}),
1673
1684
  i && /* @__PURE__ */ n(
1674
1685
  ar,
@@ -1692,12 +1703,12 @@ const wn = ({ onClose: t }) => {
1692
1703
  )
1693
1704
  ] })
1694
1705
  ] });
1695
- }, Sn = ({
1706
+ }, En = ({
1696
1707
  onClose: t,
1697
1708
  fileUpload: r,
1698
1709
  filePrefix: e
1699
1710
  }) => {
1700
- const [o] = _(), [i, a] = p(null), l = async (d) => {
1711
+ const [o] = w(), [i, a] = p(null), l = async (d) => {
1701
1712
  var u;
1702
1713
  const c = (u = d.target.files) == null ? void 0 : u[0];
1703
1714
  if (c) {
@@ -1718,10 +1729,10 @@ const wn = ({ onClose: t }) => {
1718
1729
  const u = Ut();
1719
1730
  u.setTextNodeRange(c, 0, c, i.name.length), nt(u);
1720
1731
  }
1721
- o.dispatchCommand(it, _t(i.url));
1732
+ o.dispatchCommand(it, wt(i.url));
1722
1733
  });
1723
1734
  }, [o, i]);
1724
- return /* @__PURE__ */ h(F, { children: [
1735
+ return /* @__PURE__ */ h(P, { children: [
1725
1736
  r.isLoading && /* @__PURE__ */ n(st, {}),
1726
1737
  /* @__PURE__ */ n(
1727
1738
  bt,
@@ -1746,7 +1757,7 @@ const wn = ({ onClose: t }) => {
1746
1757
  )
1747
1758
  ] })
1748
1759
  ] });
1749
- }, Nn = ({
1760
+ }, Rn = ({
1750
1761
  open: t,
1751
1762
  onOpenChange: r,
1752
1763
  getDocs: e,
@@ -1768,10 +1779,10 @@ const wn = ({ onClose: t }) => {
1768
1779
  ),
1769
1780
  i && /* @__PURE__ */ n(gt, { active: a === "file", onClick: () => l("file"), children: "Fil" })
1770
1781
  ] }),
1771
- a === "url" && /* @__PURE__ */ n(wn, { onClose: s }),
1772
- a === "rutine" && e && /* @__PURE__ */ n(yn, { onClose: s, getDocs: e }),
1782
+ a === "url" && /* @__PURE__ */ n(Sn, { onClose: s }),
1783
+ a === "rutine" && e && /* @__PURE__ */ n(Nn, { onClose: s, getDocs: e }),
1773
1784
  a === "file" && i && /* @__PURE__ */ n(
1774
- Sn,
1785
+ En,
1775
1786
  {
1776
1787
  onClose: s,
1777
1788
  fileUpload: i,
@@ -1779,22 +1790,22 @@ const wn = ({ onClose: t }) => {
1779
1790
  }
1780
1791
  )
1781
1792
  ] });
1782
- }, po = ({
1793
+ }, ko = ({
1783
1794
  getDocs: t,
1784
1795
  filePrefix: r
1785
1796
  }) => {
1786
- const [e] = _(), [o, i] = p(!1), [a, l] = p(!1), s = M(() => {
1797
+ const [e] = w(), [o, i] = p(!1), [a, l] = p(!1), s = M(() => {
1787
1798
  const d = y();
1788
1799
  if (R(d)) {
1789
1800
  const c = ge(d), u = c.getParent();
1790
- i(Z(u) || Z(c));
1801
+ i(tt(u) || tt(c));
1791
1802
  }
1792
1803
  }, []);
1793
1804
  return L(() => e.registerCommand(
1794
- V,
1805
+ Q,
1795
1806
  () => (s(), !1),
1796
1807
  q
1797
- ), [e, s]), /* @__PURE__ */ h(tt, { type: "single", value: o ? "link" : "", children: [
1808
+ ), [e, s]), /* @__PURE__ */ h(et, { type: "single", value: o ? "link" : "", children: [
1798
1809
  /* @__PURE__ */ n(
1799
1810
  O,
1800
1811
  {
@@ -1803,11 +1814,11 @@ const wn = ({ onClose: t }) => {
1803
1814
  },
1804
1815
  title: "Lenke",
1805
1816
  value: "link",
1806
- children: /* @__PURE__ */ n(qr, { size: "1.25rem" })
1817
+ children: /* @__PURE__ */ n(Yr, { size: "1.25rem" })
1807
1818
  }
1808
1819
  ),
1809
1820
  /* @__PURE__ */ n(
1810
- Nn,
1821
+ Rn,
1811
1822
  {
1812
1823
  open: a,
1813
1824
  onOpenChange: l,
@@ -1816,8 +1827,8 @@ const wn = ({ onClose: t }) => {
1816
1827
  }
1817
1828
  )
1818
1829
  ] });
1819
- }, mo = () => {
1820
- const [t] = _(), r = J(null), [e, o] = p(null), [i, a] = p(""), { hasFocus: l } = H();
1830
+ }, bo = () => {
1831
+ const [t] = w(), r = J(null), [e, o] = p(null), [i, a] = p(""), { hasFocus: l } = H();
1821
1832
  L(() => {
1822
1833
  e ? t.update(() => {
1823
1834
  a(e.getURL());
@@ -1831,24 +1842,24 @@ const wn = ({ onClose: t }) => {
1831
1842
  elements: {
1832
1843
  reference: r.current
1833
1844
  },
1834
- middleware: [Cr()]
1845
+ middleware: [Mr()]
1835
1846
  }), { getFloatingProps: g } = ae([
1836
1847
  le(u),
1837
- Mr(u)
1848
+ Tr(u)
1838
1849
  ]), v = M(() => {
1839
1850
  var m;
1840
1851
  const k = y();
1841
1852
  if (R(k)) {
1842
1853
  const C = ge(k), N = C.getParent();
1843
1854
  let I = null;
1844
- if (Z(N) ? I = N : Z(C) && (I = C), I) {
1845
- const Y = window.getSelection(), Q = t.getRootElement();
1846
- k !== null && Y !== null && Q !== null && Q.contains(Y.anchorNode) && t.isEditable() && (r.current = ((m = Y.focusNode) == null ? void 0 : m.parentElement) ?? null);
1855
+ if (tt(N) ? I = N : tt(C) && (I = C), I) {
1856
+ const Y = window.getSelection(), Z = t.getRootElement();
1857
+ k !== null && Y !== null && Z !== null && Z.contains(Y.anchorNode) && t.isEditable() && (r.current = ((m = Y.focusNode) == null ? void 0 : m.parentElement) ?? null);
1847
1858
  }
1848
1859
  o(I);
1849
1860
  }
1850
1861
  }, [t]), x = M(() => {
1851
- e && _n(e) && t.update(() => {
1862
+ e && yn(e) && t.update(() => {
1852
1863
  e.remove();
1853
1864
  }), t.dispatchCommand(it, null);
1854
1865
  }, [t, e]);
@@ -1863,18 +1874,17 @@ const wn = ({ onClose: t }) => {
1863
1874
  });
1864
1875
  }),
1865
1876
  t.registerCommand(
1866
- V,
1877
+ Q,
1867
1878
  () => (v(), !1),
1868
1879
  q
1869
1880
  ),
1870
1881
  t.registerCommand(
1871
- Ht,
1882
+ Ft,
1872
1883
  () => e ? (o(null), !0) : !1,
1873
1884
  Ie
1874
1885
  )
1875
- ), [t, v, e]), !s)
1876
- return null;
1877
- const w = _t(i);
1886
+ ), [t, v, e]), !s) return null;
1887
+ const _ = wt(i);
1878
1888
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ h(
1879
1889
  re,
1880
1890
  {
@@ -1890,7 +1900,7 @@ const wn = ({ onClose: t }) => {
1890
1900
  ...g(),
1891
1901
  children: [
1892
1902
  /* @__PURE__ */ n(
1893
- P,
1903
+ B,
1894
1904
  {
1895
1905
  as: "a",
1896
1906
  css: {
@@ -1900,8 +1910,8 @@ const wn = ({ onClose: t }) => {
1900
1910
  textOverflow: "ellipsis",
1901
1911
  marginRight: "$4"
1902
1912
  },
1903
- href: w,
1904
- title: w,
1913
+ href: _,
1914
+ title: _,
1905
1915
  target: "_blank",
1906
1916
  rel: "noreferrer",
1907
1917
  children: i
@@ -1911,7 +1921,7 @@ const wn = ({ onClose: t }) => {
1911
1921
  ]
1912
1922
  }
1913
1923
  ) });
1914
- }, fo = () => {
1924
+ }, vo = () => {
1915
1925
  const [t] = Ct();
1916
1926
  return /* @__PURE__ */ h(
1917
1927
  at,
@@ -1934,7 +1944,7 @@ const wn = ({ onClose: t }) => {
1934
1944
  {
1935
1945
  onClick: () => t.dispatchCommand(ht, "center"),
1936
1946
  children: [
1937
- /* @__PURE__ */ n($r, { size: "1.25rem" }),
1947
+ /* @__PURE__ */ n(Dr, { size: "1.25rem" }),
1938
1948
  "Midt"
1939
1949
  ]
1940
1950
  }
@@ -1944,7 +1954,7 @@ const wn = ({ onClose: t }) => {
1944
1954
  {
1945
1955
  onClick: () => t.dispatchCommand(ht, "right"),
1946
1956
  children: [
1947
- /* @__PURE__ */ n(Ar, { size: "1.25rem" }),
1957
+ /* @__PURE__ */ n(Br, { size: "1.25rem" }),
1948
1958
  "Høyre"
1949
1959
  ]
1950
1960
  }
@@ -1952,7 +1962,7 @@ const wn = ({ onClose: t }) => {
1952
1962
  ]
1953
1963
  }
1954
1964
  );
1955
- }, Dt = ["image/"], ko = () => {
1965
+ }, Dt = ["image/"], Co = () => {
1956
1966
  const [t] = Ct(), { fileUpload: r } = H();
1957
1967
  return L(() => t.registerCommand(
1958
1968
  qe,
@@ -1962,7 +1972,7 @@ const wn = ({ onClose: t }) => {
1962
1972
  [Dt].flatMap((i) => i)
1963
1973
  );
1964
1974
  for (const { file: i, result: a } of o)
1965
- if (Fe(i, Dt)) {
1975
+ if (He(i, Dt)) {
1966
1976
  let l = a;
1967
1977
  const s = new Image(), d = window.URL.createObjectURL(i);
1968
1978
  s.onload = async () => {
@@ -1980,33 +1990,33 @@ const wn = ({ onClose: t }) => {
1980
1990
  export {
1981
1991
  xt as $createImageNode,
1982
1992
  pe as $createRutineLinkNode,
1983
- oo as $getNodesOfTypes,
1984
- io as $isImageNode,
1985
- _n as $isRutineLinkNode,
1986
- fo as AlignToolbarDropdown,
1987
- ko as DragDropPastePlugin,
1988
- un as FloatingToolbar,
1989
- U as ImageNode,
1990
- ho as InsertSelector,
1991
- mo as LinkEditPlugin,
1992
- et as LinkTargetNode,
1993
- po as LinkToolbarButton,
1994
- so as RichTextEditor,
1995
- gn as RichTextToolbar,
1996
- B as RutineLinkNode,
1997
- go as RutineLinkNodeInit,
1998
- uo as TableEditPlugin,
1999
- Er as clearEditorState,
2000
- ao as defaultNodes,
2001
- lo as defaultViewNodes,
2002
- Nr as isEditorState,
1993
+ lo as $getNodesOfTypes,
1994
+ so as $isImageNode,
1995
+ yn as $isRutineLinkNode,
1996
+ vo as AlignToolbarDropdown,
1997
+ Co as DragDropPastePlugin,
1998
+ pn as FloatingToolbar,
1999
+ F as ImageNode,
2000
+ po as InsertSelector,
2001
+ bo as LinkEditPlugin,
2002
+ rt as LinkTargetNode,
2003
+ ko as LinkToolbarButton,
2004
+ uo as RichTextEditor,
2005
+ mn as RichTextToolbar,
2006
+ K as RutineLinkNode,
2007
+ fo as RutineLinkNodeInit,
2008
+ mo as TableEditPlugin,
2009
+ Ir as clearEditorState,
2010
+ co as defaultNodes,
2011
+ ho as defaultViewNodes,
2012
+ Rr as isEditorState,
2003
2013
  Tt as isJSON,
2004
2014
  de as richTextContext,
2005
- co as richTextCss,
2006
- Tn as richTextStyleObj,
2007
- Rr as setStateFromPlainText,
2008
- ro as stateToHTML,
2009
- no as syncStateToHTML,
2010
- Ir as useHasFocusWithin,
2015
+ go as richTextCss,
2016
+ Ln as richTextStyleObj,
2017
+ Or as setStateFromPlainText,
2018
+ io as stateToHTML,
2019
+ ao as syncStateToHTML,
2020
+ zr as useHasFocusWithin,
2011
2021
  H as useRichTextContext
2012
2022
  };