@arkitektbedriftene/fe-lib 0.4.34 → 0.4.36

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,34 +1,30 @@
1
- var Gt = Object.defineProperty;
2
- var Jt = (t, e, r) => e in t ? Gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var st = (t, e, r) => (Jt(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { createHeadlessEditor as Xt } from "@lexical/headless";
5
- import { $generateHtmlFromNodes as Qt } from "@lexical/html";
6
- import { $getRoot as K, ParagraphNode as Vt, $createParagraphNode as q, $createTextNode as D, $setSelection as bt, SELECTION_CHANGE_COMMAND as F, $getSelection as T, COMMAND_PRIORITY_CRITICAL as Q, $isRangeSelection as L, $isRootOrShadowRoot as Zt, FORMAT_TEXT_COMMAND as B, COMMAND_PRIORITY_LOW as E, KEY_ARROW_DOWN_COMMAND as te, KEY_ARROW_UP_COMMAND as ee, KEY_ESCAPE_COMMAND as vt, KEY_SPACE_COMMAND as re, $getNearestNodeFromDOMNode as V, KEY_ARROW_LEFT_COMMAND as ne, $isElementNode as oe, COMMAND_PRIORITY_NORMAL as ie, $isParagraphNode as ae, COMMAND_PRIORITY_HIGH as le } from "lexical";
7
- import { trimTextContentFromAnchor as se, $setBlocksType as J, $isAtNodeEnd as ct } from "@lexical/selection";
1
+ var Yt = Object.defineProperty;
2
+ var Gt = (t, e, r) => e in t ? Yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var st = (t, e, r) => (Gt(t, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import { createHeadlessEditor as Jt } from "@lexical/headless";
5
+ import { $generateHtmlFromNodes as Xt } from "@lexical/html";
6
+ import { $getRoot as K, ParagraphNode as Qt, $createParagraphNode as q, $createTextNode as D, $setSelection as bt, SELECTION_CHANGE_COMMAND as F, $getSelection as T, COMMAND_PRIORITY_CRITICAL as Q, $isRangeSelection as L, $isRootOrShadowRoot as Vt, FORMAT_TEXT_COMMAND as B, COMMAND_PRIORITY_LOW as E, KEY_ARROW_DOWN_COMMAND as Zt, KEY_ARROW_UP_COMMAND as te, KEY_ESCAPE_COMMAND as vt, KEY_SPACE_COMMAND as ee, $getNearestNodeFromDOMNode as V, KEY_ARROW_LEFT_COMMAND as re, $isElementNode as ne, COMMAND_PRIORITY_NORMAL as oe, $isParagraphNode as ie, COMMAND_PRIORITY_HIGH as ae } from "lexical";
7
+ import { trimTextContentFromAnchor as le, $setBlocksType as J, $isAtNodeEnd as ct } from "@lexical/selection";
8
8
  import { LinkNode as z, AutoLinkNode as Mt, $isLinkNode as U, TOGGLE_LINK_COMMAND as Z } from "@lexical/link";
9
- import { ListNode as tt, ListItemNode as Ct, $isListNode as et, INSERT_UNORDERED_LIST_COMMAND as ce, INSERT_ORDERED_LIST_COMMAND as de, INSERT_CHECK_LIST_COMMAND as Tt, insertList as ue, $isListItemNode as O } from "@lexical/list";
10
- import { HeadingNode as Lt, QuoteNode as xt, $isHeadingNode as he, $createHeadingNode as pe, $createQuoteNode as ge } from "@lexical/rich-text";
11
- import { TableNode as yt, TableRowNode as Nt, TableCellNode as St, INSERT_TABLE_COMMAND as fe, $getTableCellNodeFromLexicalNode as me, $deleteTableColumn__EXPERIMENTAL as ke, $deleteTableRow__EXPERIMENTAL as be, $insertTableColumn__EXPERIMENTAL as dt, $insertTableRow__EXPERIMENTAL as ut } from "@lexical/table";
9
+ import { ListNode as tt, ListItemNode as Ct, $isListNode as et, INSERT_UNORDERED_LIST_COMMAND as se, INSERT_ORDERED_LIST_COMMAND as ce, INSERT_CHECK_LIST_COMMAND as Tt, insertList as de, $isListItemNode as O } from "@lexical/list";
10
+ import { HeadingNode as Lt, QuoteNode as xt, $isHeadingNode as ue, $createHeadingNode as he, $createQuoteNode as pe } from "@lexical/rich-text";
11
+ import { TableNode as yt, TableRowNode as Nt, TableCellNode as St, INSERT_TABLE_COMMAND as ge, $getTableCellNodeFromLexicalNode as fe, $deleteTableColumn__EXPERIMENTAL as me, $deleteTableRow__EXPERIMENTAL as ke, $insertTableColumn__EXPERIMENTAL as dt, $insertTableRow__EXPERIMENTAL as ut } from "@lexical/table";
12
12
  import { jsx as n, jsxs as g, Fragment as Y } from "react/jsx-runtime";
13
- import { createContext as ve, useState as b, useRef as rt, useCallback as v, useContext as Me, useEffect as x, useMemo as wt, useLayoutEffect as Ce } from "react";
14
- import { s as Et, D as nt, T as _t, a as C, B as P, b as Rt, c as I, u as ot, d as It, e as Te, f as Le, o as zt, g as xe, h as Ot, i as $t, F as At, O as Bt, j as ye, k as Ne, S as Se, l as we, m as $, n as R, p as ht, q as Ee, N as _e, r as pt, t as Re, v as Dt, C as Ie, w as ze, x as Oe } from "./Checkbox-0c1030b1.js";
15
- import "react-select";
16
- import { LexicalComposer as $e } from "@lexical/react/LexicalComposer.js";
17
- import { RichTextPlugin as Ae } from "@lexical/react/LexicalRichTextPlugin.js";
18
- import Be from "@lexical/react/LexicalErrorBoundary.js";
13
+ import { createContext as be, useState as b, useRef as rt, useCallback as v, useContext as ve, useEffect as x, useMemo as wt, useLayoutEffect as Me } from "react";
14
+ import { DropdownMenu as nt, ToolbarButton as Et, DropdownMenuIconItem as C, Box as P, ToolbarToggleGroup as _t, ToolbarToggleItem as I, OverlayCard as Rt, Toolbar as Ce, ToolbarSeparator as Te, styled as Le, Spinner as xe, Button as $, DropdownMenuItem as R, DropdownMenuSeparator as ht, Dialog as ye, NavBar as Ne, NavBarItem as pt, TextInput as Se, DialogActions as It, Combobox as we } from "./ui.es.js";
15
+ import { LexicalComposer as Ee } from "@lexical/react/LexicalComposer.js";
16
+ import { RichTextPlugin as _e } from "@lexical/react/LexicalRichTextPlugin.js";
17
+ import Re from "@lexical/react/LexicalErrorBoundary.js";
18
+ import { s as Ie, u as ot, a as zt, b as ze, f as Oe, o as Ot, c as $e, d as $t, e as At, F as Bt, g as Ae, i as Be, h as De } from "./stitches.config-543644f4.js";
19
19
  import { useLexicalComposerContext as y } from "@lexical/react/LexicalComposerContext.js";
20
- import { $getNearestNodeOfType as De, $findMatchingParent as Pt, mergeRegister as it, isHTMLElement as gt } from "@lexical/utils";
21
- import { G as h, f as Pe } from "./index.esm-3266b7f8.js";
22
- import { ListPlugin as Fe } from "@lexical/react/LexicalListPlugin.js";
23
- import { HistoryPlugin as He } from "@lexical/react/LexicalHistoryPlugin.js";
24
- import { TablePlugin as Ue } from "@lexical/react/LexicalTablePlugin.js";
25
- import { TabIndentationPlugin as We } from "@lexical/react/LexicalTabIndentationPlugin.js";
20
+ import { $getNearestNodeOfType as Pe, $findMatchingParent as Dt, mergeRegister as it, isHTMLElement as gt } from "@lexical/utils";
21
+ import { G as h, e as Fe } from "./index.esm-e4db0c1f.js";
22
+ import { ListPlugin as He } from "@lexical/react/LexicalListPlugin.js";
23
+ import { HistoryPlugin as Ue } from "@lexical/react/LexicalHistoryPlugin.js";
24
+ import { TablePlugin as We } from "@lexical/react/LexicalTablePlugin.js";
25
+ import { TabIndentationPlugin as je } from "@lexical/react/LexicalTabIndentationPlugin.js";
26
26
  import "react-dom";
27
- import "@radix-ui/react-toolbar";
28
- import "@radix-ui/react-dialog";
29
- import "@radix-ui/react-dropdown-menu";
30
- import "@radix-ui/react-checkbox";
31
- const je = ({
27
+ const Ke = ({
32
28
  text: t,
33
29
  maxChars: e,
34
30
  maxLines: r
@@ -43,16 +39,16 @@ const je = ({
43
39
  t[a] === `
44
40
  ` && l++, a++;
45
41
  return t.slice(0, a).length;
46
- }, Ke = ({
42
+ }, qe = ({
47
43
  editor: t,
48
44
  maxChars: e,
49
45
  maxLines: r
50
46
  }) => {
51
- const o = K(), i = o.getTextContent(), l = je({ text: i, maxChars: e, maxLines: r }), a = i.length - l, d = o.select().anchor;
52
- se(t, d, a);
47
+ const o = K(), i = o.getTextContent(), l = Ke({ text: i, maxChars: e, maxLines: r }), a = i.length - l, d = o.select().anchor;
48
+ le(t, d, a);
53
49
  const c = o.getLastChild();
54
- return c instanceof Vt && c.getChildrenSize() === 0 && c.remove(), a;
55
- }, Ft = {
50
+ return c instanceof Qt && c.getChildrenSize() === 0 && c.remove(), a;
51
+ }, Pt = {
56
52
  quote: "ain-rich-text-quote",
57
53
  text: {
58
54
  bold: "ain-rich-text-bold",
@@ -64,7 +60,7 @@ const je = ({
64
60
  listitem: "ain-rich-text-nested-list-item"
65
61
  }
66
62
  }
67
- }, Ht = (t) => t[0] === "{", qe = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ye = (t, e) => {
63
+ }, Ft = (t) => t[0] === "{", Ye = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ge = (t, e) => {
68
64
  t.update(
69
65
  () => {
70
66
  const r = K();
@@ -76,7 +72,7 @@ const je = ({
76
72
  tag: e
77
73
  }
78
74
  );
79
- }, Ge = (t, e, r) => {
75
+ }, Je = (t, e, r) => {
80
76
  e.update(
81
77
  () => {
82
78
  const o = K();
@@ -88,23 +84,23 @@ const je = ({
88
84
  tag: r
89
85
  }
90
86
  ), e.blur();
91
- }, cn = (t, e, r) => {
87
+ }, an = (t, e, r) => {
92
88
  let o = 0;
93
- const i = Xt({
89
+ const i = Jt({
94
90
  nodes: e,
95
91
  editable: !1,
96
- theme: Ft
92
+ theme: Pt
97
93
  });
98
94
  if (t)
99
95
  try {
100
- if (typeof t == "string" && !Ht(t))
96
+ if (typeof t == "string" && !Ft(t))
101
97
  i.update(() => {
102
98
  const a = K(), s = q();
103
99
  s.append(D(t.trim())), a.append(s);
104
100
  });
105
101
  else {
106
102
  const a = i.parseEditorState(t, () => {
107
- (r == null ? void 0 : r.maxLines) !== void 0 && (o = Ke({
103
+ (r == null ? void 0 : r.maxLines) !== void 0 && (o = qe({
108
104
  editor: i,
109
105
  maxLines: r.maxLines
110
106
  }));
@@ -117,7 +113,7 @@ const je = ({
117
113
  let l = "";
118
114
  return i.update(() => {
119
115
  var a;
120
- r != null && r.updateFn && ((a = r.updateFn) == null || a.call(r)), l = Qt(i);
116
+ r != null && r.updateFn && ((a = r.updateFn) == null || a.call(r)), l = Xt(i);
121
117
  }), { html: l, trimCount: o };
122
118
  };
123
119
  class W extends z {
@@ -148,7 +144,7 @@ class W extends z {
148
144
  return z.importJSON(e);
149
145
  }
150
146
  }
151
- const dn = [
147
+ const ln = [
152
148
  Lt,
153
149
  xt,
154
150
  tt,
@@ -158,7 +154,7 @@ const dn = [
158
154
  yt,
159
155
  Nt,
160
156
  St
161
- ], un = [
157
+ ], sn = [
162
158
  Lt,
163
159
  xt,
164
160
  tt,
@@ -176,7 +172,7 @@ const dn = [
176
172
  { rel: t.__rel, target: t.__target, title: t.__title }
177
173
  )
178
174
  }
179
- ], Ut = ve({ hasFocus: !1, editorRef: { current: null } }), Je = ({ onBlur: t }) => {
175
+ ], Ht = be({ hasFocus: !1, editorRef: { current: null } }), Xe = ({ onBlur: t }) => {
180
176
  const [e, r] = b(!1), o = rt(null), i = v(() => {
181
177
  r(!0), o.current && window.clearTimeout(o.current);
182
178
  }, []), l = v(() => {
@@ -191,65 +187,65 @@ const dn = [
191
187
  onBlur: l
192
188
  }
193
189
  };
194
- }, at = () => Me(Ut);
195
- function Xe(t) {
190
+ }, at = () => ve(Ht);
191
+ function Qe(t) {
196
192
  return h({ 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);
197
193
  }
198
- function Qe(t) {
194
+ function Ve(t) {
199
195
  return h({ 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);
200
196
  }
201
- function Ve(t) {
197
+ function Ze(t) {
202
198
  return h({ 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);
203
199
  }
204
- function Ze(t) {
200
+ function tr(t) {
205
201
  return h({ 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);
206
202
  }
207
- function tr(t) {
203
+ function er(t) {
208
204
  return h({ 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);
209
205
  }
210
- function er(t) {
206
+ function rr(t) {
211
207
  return h({ 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);
212
208
  }
213
- function rr(t) {
209
+ function nr(t) {
214
210
  return h({ 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);
215
211
  }
216
- function nr(t) {
212
+ function or(t) {
217
213
  return h({ 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);
218
214
  }
219
- function or(t) {
215
+ function ir(t) {
220
216
  return h({ 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);
221
217
  }
222
- function ir(t) {
218
+ function ar(t) {
223
219
  return h({ 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);
224
220
  }
225
- function ar(t) {
221
+ function lr(t) {
226
222
  return h({ 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);
227
223
  }
228
- function lr(t) {
224
+ function sr(t) {
229
225
  return h({ 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);
230
226
  }
231
- function sr(t) {
227
+ function cr(t) {
232
228
  return h({ 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);
233
229
  }
234
- function cr(t) {
230
+ function dr(t) {
235
231
  return h({ 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);
236
232
  }
237
- function dr(t) {
233
+ function ur(t) {
238
234
  return h({ 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);
239
235
  }
240
- function ur(t) {
236
+ function hr(t) {
241
237
  return h({ 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);
242
238
  }
243
- function hr(t) {
239
+ function pr(t) {
244
240
  return h({ 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);
245
241
  }
246
- function pr(t) {
242
+ function gr(t) {
247
243
  return h({ 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);
248
244
  }
249
- const gr = Et("div", {
245
+ const fr = Ie("div", {
250
246
  width: "10rem",
251
247
  display: "flex"
252
- }), Wt = {
248
+ }), Ut = {
253
249
  bullet: "Punktliste",
254
250
  h1: "Overskrift 1",
255
251
  h2: "Overskrift 2",
@@ -261,22 +257,22 @@ const gr = Et("div", {
261
257
  paragraph: "Normal",
262
258
  quote: "Sitat",
263
259
  check: "Avkrysningsliste"
264
- }, fr = {
265
- bullet: /* @__PURE__ */ n(cr, { size: "1.25rem" }),
266
- h1: /* @__PURE__ */ n(Ve, { size: "1.25rem" }),
267
- h2: /* @__PURE__ */ n(Ze, { size: "1.25rem" }),
268
- h3: /* @__PURE__ */ n(tr, { size: "1.25rem" }),
269
- h4: /* @__PURE__ */ n(er, { size: "1.25rem" }),
270
- h5: /* @__PURE__ */ n(rr, { size: "1.25rem" }),
271
- h6: /* @__PURE__ */ n(nr, { size: "1.25rem" }),
272
- number: /* @__PURE__ */ n(sr, { size: "1.25rem" }),
273
- check: /* @__PURE__ */ n(lr, { size: "1.25rem" }),
274
- paragraph: /* @__PURE__ */ n(ir, { size: "1.25rem" }),
275
- quote: /* @__PURE__ */ n(dr, { size: "1.25rem" })
260
+ }, mr = {
261
+ bullet: /* @__PURE__ */ n(dr, { size: "1.25rem" }),
262
+ h1: /* @__PURE__ */ n(Ze, { size: "1.25rem" }),
263
+ h2: /* @__PURE__ */ n(tr, { size: "1.25rem" }),
264
+ h3: /* @__PURE__ */ n(er, { size: "1.25rem" }),
265
+ h4: /* @__PURE__ */ n(rr, { size: "1.25rem" }),
266
+ h5: /* @__PURE__ */ n(nr, { size: "1.25rem" }),
267
+ h6: /* @__PURE__ */ n(or, { size: "1.25rem" }),
268
+ number: /* @__PURE__ */ n(cr, { size: "1.25rem" }),
269
+ check: /* @__PURE__ */ n(sr, { size: "1.25rem" }),
270
+ paragraph: /* @__PURE__ */ n(ar, { size: "1.25rem" }),
271
+ quote: /* @__PURE__ */ n(ur, { size: "1.25rem" })
276
272
  }, M = ({
277
273
  blockType: t
278
274
  }) => /* @__PURE__ */ g(Y, { children: [
279
- /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: fr[t] }),
275
+ /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: mr[t] }),
280
276
  /* @__PURE__ */ n(
281
277
  P,
282
278
  {
@@ -286,40 +282,40 @@ const gr = Et("div", {
286
282
  textOverflow: "ellipsis",
287
283
  whiteSpace: "nowrap"
288
284
  },
289
- children: Wt[t]
285
+ children: Ut[t]
290
286
  }
291
287
  )
292
- ] }), mr = (t) => {
288
+ ] }), kr = (t) => {
293
289
  if (!L(t))
294
290
  return null;
295
291
  const e = t.anchor.getNode();
296
- let r = e.getKey() === "root" ? e : Pt(e, (o) => {
292
+ let r = e.getKey() === "root" ? e : Dt(e, (o) => {
297
293
  const i = o.getParent();
298
- return i !== null && Zt(i);
294
+ return i !== null && Vt(i);
299
295
  });
300
296
  return r === null && (r = e.getTopLevelElementOrThrow()), {
301
297
  anchorNode: e,
302
298
  element: r
303
299
  };
304
- }, kr = () => {
300
+ }, br = () => {
305
301
  const [t] = y(), [e, r] = b("paragraph");
306
302
  x(() => t.registerCommand(
307
303
  F,
308
304
  () => {
309
- const c = T(), f = mr(c);
305
+ const c = T(), f = kr(c);
310
306
  if (!f)
311
307
  return !1;
312
308
  const { element: u, anchorNode: m } = f, w = u.getKey();
313
309
  if (t.getElementByKey(w) !== null)
314
310
  if (et(u)) {
315
- const k = De(
311
+ const k = Pe(
316
312
  m,
317
313
  tt
318
314
  ), S = k ? k.getListType() : u.getListType();
319
315
  r(S);
320
316
  } else {
321
- const k = he(u) ? u.getTag() : u.getType();
322
- k in Wt && r(k);
317
+ const k = ue(u) ? u.getTag() : u.getType();
318
+ k in Ut && r(k);
323
319
  }
324
320
  return !1;
325
321
  },
@@ -328,14 +324,14 @@ const gr = Et("div", {
328
324
  const o = (c) => {
329
325
  e !== c && t.update(() => {
330
326
  const f = T();
331
- L(f) && (J(f, () => pe(c)), r(c));
327
+ L(f) && (J(f, () => he(c)), r(c));
332
328
  });
333
329
  };
334
- return /* @__PURE__ */ n(gr, { children: /* @__PURE__ */ g(
330
+ return /* @__PURE__ */ n(fr, { children: /* @__PURE__ */ g(
335
331
  nt,
336
332
  {
337
333
  trigger: /* @__PURE__ */ n(
338
- _t,
334
+ Et,
339
335
  {
340
336
  dropdown: !0,
341
337
  css: { display: "flex", width: "100%", overflow: "hidden" },
@@ -358,10 +354,10 @@ const gr = Et("div", {
358
354
  /* @__PURE__ */ n(C, { onClick: () => o("h5"), children: /* @__PURE__ */ n(M, { blockType: "h5" }) }),
359
355
  /* @__PURE__ */ n(C, { onClick: () => o("h6"), children: /* @__PURE__ */ n(M, { blockType: "h6" }) }),
360
356
  /* @__PURE__ */ n(C, { onClick: () => {
361
- e !== "bullet" && (t.dispatchCommand(ce, void 0), r("bullet"));
357
+ e !== "bullet" && (t.dispatchCommand(se, void 0), r("bullet"));
362
358
  }, children: /* @__PURE__ */ n(M, { blockType: "bullet" }) }),
363
359
  /* @__PURE__ */ n(C, { onClick: () => {
364
- e !== "number" && (t.dispatchCommand(de, void 0), r("number"));
360
+ e !== "number" && (t.dispatchCommand(ce, void 0), r("number"));
365
361
  }, children: /* @__PURE__ */ n(M, { blockType: "number" }) }),
366
362
  /* @__PURE__ */ n(C, { onClick: () => {
367
363
  e !== "check" && (t.dispatchCommand(Tt, void 0), r("check"));
@@ -369,13 +365,13 @@ const gr = Et("div", {
369
365
  /* @__PURE__ */ n(C, { onClick: () => {
370
366
  e !== "quote" && t.update(() => {
371
367
  const c = T();
372
- L(c) && (J(c, () => ge()), r("quote"));
368
+ L(c) && (J(c, () => pe()), r("quote"));
373
369
  });
374
370
  }, children: /* @__PURE__ */ n(M, { blockType: "quote" }) })
375
371
  ]
376
372
  }
377
373
  ) });
378
- }, br = () => {
374
+ }, vr = () => {
379
375
  const [t] = y(), [e, r] = b(!1), [o, i] = b(!1), [l, a] = b(!1), [s, d] = b(!1), [c, f] = b(!1), u = v(() => {
380
376
  const p = T();
381
377
  L(p) && (r(p.hasFormat("bold")), i(p.hasFormat("italic")), a(p.hasFormat("underline")), d(p.hasFormat("code")), f(p.hasFormat("superscript")));
@@ -412,28 +408,20 @@ const gr = Et("div", {
412
408
  return e && p.push("bold"), o && p.push("italic"), l && p.push("underline"), s && p.push("code"), c && p.push("superscript"), p;
413
409
  }, [e, o, l, s, c]);
414
410
  return /* @__PURE__ */ g(
415
- Rt,
411
+ _t,
416
412
  {
417
413
  type: "multiple",
418
414
  "aria-label": "Tekstformattering",
419
415
  value: A,
420
416
  children: [
421
- /* @__PURE__ */ n(
422
- I,
423
- {
424
- onClick: m,
425
- title: "Fet tekst",
426
- value: "bold",
427
- children: /* @__PURE__ */ n(Xe, { size: "1.25rem" })
428
- }
429
- ),
417
+ /* @__PURE__ */ n(I, { onClick: m, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Qe, { size: "1.25rem" }) }),
430
418
  /* @__PURE__ */ n(
431
419
  I,
432
420
  {
433
421
  onClick: w,
434
422
  title: "Kursiv tekst",
435
423
  value: "italic",
436
- children: /* @__PURE__ */ n(or, { size: "1.25rem" })
424
+ children: /* @__PURE__ */ n(ir, { size: "1.25rem" })
437
425
  }
438
426
  ),
439
427
  /* @__PURE__ */ n(
@@ -442,49 +430,41 @@ const gr = Et("div", {
442
430
  onClick: N,
443
431
  title: "Understreket tekst",
444
432
  value: "underline",
445
- children: /* @__PURE__ */ n(pr, { size: "1.25rem" })
446
- }
447
- ),
448
- /* @__PURE__ */ n(
449
- I,
450
- {
451
- onClick: k,
452
- title: "Kode",
453
- value: "code",
454
- children: /* @__PURE__ */ n(Qe, { size: "1.25rem" })
433
+ children: /* @__PURE__ */ n(gr, { size: "1.25rem" })
455
434
  }
456
435
  ),
436
+ /* @__PURE__ */ n(I, { onClick: k, title: "Kode", value: "code", children: /* @__PURE__ */ n(Ve, { size: "1.25rem" }) }),
457
437
  /* @__PURE__ */ n(
458
438
  I,
459
439
  {
460
440
  onClick: S,
461
441
  title: "Superscript",
462
442
  value: "superscript",
463
- children: /* @__PURE__ */ n(ur, { size: "1.25rem" })
443
+ children: /* @__PURE__ */ n(hr, { size: "1.25rem" })
464
444
  }
465
445
  )
466
446
  ]
467
447
  }
468
448
  );
469
- }, vr = ({ children: t }) => {
449
+ }, Mr = ({ children: t }) => {
470
450
  const { hasFocus: e, editorRef: r } = at(), o = e, [i, l] = b(o);
471
- Ce(() => {
451
+ Me(() => {
472
452
  l(o);
473
453
  }, [o]);
474
454
  const { context: a, refs: s, floatingStyles: d } = ot({
475
455
  placement: "top",
476
- whileElementsMounted: It,
456
+ whileElementsMounted: zt,
477
457
  middleware: [
478
- Te({
458
+ ze({
479
459
  apply: ({ rects: f, elements: u }) => {
480
460
  u.floating.style.minWidth = `${f.reference.width}px`;
481
461
  }
482
462
  }),
483
- Le(),
484
- zt({
463
+ Oe(),
464
+ Ot({
485
465
  mainAxis: 8
486
466
  }),
487
- xe({
467
+ $e({
488
468
  padding: 8
489
469
  })
490
470
  ],
@@ -493,13 +473,13 @@ const gr = Et("div", {
493
473
  elements: {
494
474
  reference: r.current
495
475
  }
496
- }), { getFloatingProps: c } = Ot([
497
- $t(a, {
476
+ }), { getFloatingProps: c } = $t([
477
+ At(a, {
498
478
  role: "dialog"
499
479
  })
500
480
  ]);
501
- return i ? /* @__PURE__ */ n(At, { children: /* @__PURE__ */ n(
502
- Bt,
481
+ return i ? /* @__PURE__ */ n(Bt, { children: /* @__PURE__ */ n(
482
+ Rt,
503
483
  {
504
484
  ref: s.setFloating,
505
485
  style: d,
@@ -510,33 +490,33 @@ const gr = Et("div", {
510
490
  overflow: "hidden",
511
491
  boxShadow: "$md"
512
492
  },
513
- children: /* @__PURE__ */ n(Mr, { children: t })
493
+ children: /* @__PURE__ */ n(Cr, { children: t })
514
494
  }
515
495
  ) }) : null;
516
- }, Mr = ({
496
+ }, Cr = ({
517
497
  children: t,
518
498
  ...e
519
- }) => /* @__PURE__ */ g(ye, { "aria-label": "Formattering", ...e, children: [
520
- /* @__PURE__ */ n(kr, {}),
521
- /* @__PURE__ */ n(Ne, {}),
499
+ }) => /* @__PURE__ */ g(Ce, { "aria-label": "Formattering", ...e, children: [
522
500
  /* @__PURE__ */ n(br, {}),
501
+ /* @__PURE__ */ n(Te, {}),
502
+ /* @__PURE__ */ n(vr, {}),
523
503
  t
524
504
  ] });
525
- function Cr() {
505
+ function Tr() {
526
506
  const [t] = y();
527
507
  return x(() => it(
528
508
  t.registerCommand(
529
509
  Tt,
530
- () => (ue(t, "check"), !0),
510
+ () => (de(t, "check"), !0),
531
511
  E
532
512
  ),
533
513
  t.registerCommand(
534
- te,
514
+ Zt,
535
515
  (e) => kt(e, t, !1),
536
516
  E
537
517
  ),
538
518
  t.registerCommand(
539
- ee,
519
+ te,
540
520
  (e) => kt(e, t, !0),
541
521
  E
542
522
  ),
@@ -552,7 +532,7 @@ function Cr() {
552
532
  E
553
533
  ),
554
534
  t.registerCommand(
555
- re,
535
+ ee,
556
536
  (e) => {
557
537
  const r = X();
558
538
  return r != null && t.isEditable() ? (t.update(() => {
@@ -563,15 +543,15 @@ function Cr() {
563
543
  E
564
544
  ),
565
545
  t.registerCommand(
566
- ne,
546
+ re,
567
547
  (e) => t.getEditorState().read(() => {
568
548
  const r = T();
569
549
  if (L(r) && r.isCollapsed()) {
570
550
  const { anchor: o } = r, i = o.type === "element";
571
551
  if (i || o.offset === 0) {
572
- const l = o.getNode(), a = Pt(
552
+ const l = o.getNode(), a = Dt(
573
553
  l,
574
- (s) => oe(s) && !s.isInline()
554
+ (s) => ne(s) && !s.isInline()
575
555
  );
576
556
  if (O(a)) {
577
557
  const s = a.getParent();
@@ -592,7 +572,7 @@ function Cr() {
592
572
  })
593
573
  ), [t]), null;
594
574
  }
595
- function jt(t, e) {
575
+ function Wt(t, e) {
596
576
  const r = t.target;
597
577
  if (r === null || !gt(r))
598
578
  return;
@@ -606,8 +586,8 @@ function jt(t, e) {
606
586
  (r.dir === "rtl" ? l < a.right && l > a.right - 20 : l > a.left && l < a.left + 20) && e();
607
587
  }
608
588
  function ft(t) {
609
- jt(t, () => {
610
- const e = t.target, r = Tr(e);
589
+ Wt(t, () => {
590
+ const e = t.target, r = Lr(e);
611
591
  r != null && r.isEditable() && r.update(() => {
612
592
  if (t.target) {
613
593
  const o = V(e);
@@ -617,11 +597,11 @@ function ft(t) {
617
597
  });
618
598
  }
619
599
  function mt(t) {
620
- jt(t, () => {
600
+ Wt(t, () => {
621
601
  t.preventDefault();
622
602
  });
623
603
  }
624
- function Tr(t) {
604
+ function Lr(t) {
625
605
  let e = t;
626
606
  for (; e; ) {
627
607
  if (e.__lexicalEditor)
@@ -635,7 +615,7 @@ function X() {
635
615
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
636
616
  t.parentNode.__lexicalListType === "check" ? t : null;
637
617
  }
638
- function Lr(t, e) {
618
+ function xr(t, e) {
639
619
  let r = e ? t.getPreviousSibling() : t.getNextSibling(), o = t;
640
620
  for (; r == null && O(o); )
641
621
  o = o.getParentOrThrow().getParent(), o != null && (r = e ? o.getPreviousSibling() : o.getNextSibling());
@@ -653,7 +633,7 @@ function kt(t, e, r) {
653
633
  const i = V(o);
654
634
  if (!O(i))
655
635
  return;
656
- const l = Lr(i, r);
636
+ const l = xr(i, r);
657
637
  if (l != null) {
658
638
  l.selectStart();
659
639
  const a = e.getElementByKey(l.__key);
@@ -663,25 +643,25 @@ function kt(t, e, r) {
663
643
  }
664
644
  }), !1;
665
645
  }
666
- const xr = () => /* @__PURE__ */ g(Y, { children: [
667
- /* @__PURE__ */ n(Fe, {}),
668
- /* @__PURE__ */ n(Ue, {}),
646
+ const yr = () => /* @__PURE__ */ g(Y, { children: [
669
647
  /* @__PURE__ */ n(He, {}),
670
- /* @__PURE__ */ n(Cr, {}),
671
- /* @__PURE__ */ n(We, {})
672
- ] }), yr = ({
648
+ /* @__PURE__ */ n(We, {}),
649
+ /* @__PURE__ */ n(Ue, {}),
650
+ /* @__PURE__ */ n(Tr, {}),
651
+ /* @__PURE__ */ n(je, {})
652
+ ] }), Nr = ({
673
653
  state: t
674
654
  }) => {
675
655
  const [e] = y();
676
656
  return x(() => {
677
657
  if (t)
678
658
  try {
679
- if (qe(t)) {
680
- t.isEmpty() ? Ye(e) : e.setEditorState(t);
659
+ if (Ye(t)) {
660
+ t.isEmpty() ? Ge(e) : e.setEditorState(t);
681
661
  return;
682
662
  }
683
- if (typeof t == "string" && !Ht(t)) {
684
- Ge(t, e);
663
+ if (typeof t == "string" && !Ft(t)) {
664
+ Je(t, e);
685
665
  return;
686
666
  }
687
667
  const r = e.parseEditorState(t);
@@ -690,7 +670,7 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
690
670
  console.error("Could not parse"), console.error(r);
691
671
  }
692
672
  }, []), null;
693
- }, Nr = Et("div", {
673
+ }, Sr = Le("div", {
694
674
  border: "1px solid $borderDarker",
695
675
  borderRadius: "$md",
696
676
  position: "relative",
@@ -727,7 +707,7 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
727
707
  }
728
708
  }
729
709
  ]
730
- }), Sr = ({
710
+ }), wr = ({
731
711
  isLoading: t
732
712
  }) => /* @__PURE__ */ n(
733
713
  P,
@@ -739,9 +719,9 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
739
719
  right: "1rem",
740
720
  display: "flex"
741
721
  },
742
- children: /* @__PURE__ */ n(Se, {})
722
+ children: /* @__PURE__ */ n(xe, {})
743
723
  }
744
- ), hn = ({
724
+ ), cn = ({
745
725
  isLoading: t,
746
726
  children: e,
747
727
  placeholderText: r,
@@ -755,22 +735,22 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
755
735
  defaultState: f,
756
736
  css: u
757
737
  }) => {
758
- const { hasFocus: m, attributes: w } = Je({ onBlur: c }), N = rt(null), k = wt(() => ({ hasFocus: m, editorRef: N }), [m]);
759
- return /* @__PURE__ */ n(Ut.Provider, { value: k, children: /* @__PURE__ */ g(
760
- $e,
738
+ const { hasFocus: m, attributes: w } = Xe({ onBlur: c }), N = rt(null), k = wt(() => ({ hasFocus: m, editorRef: N }), [m]);
739
+ return /* @__PURE__ */ n(Ht.Provider, { value: k, children: /* @__PURE__ */ g(
740
+ Ee,
761
741
  {
762
742
  initialConfig: {
763
743
  namespace: "ain-rich-text",
764
744
  onError: (S) => {
765
745
  console.error(S);
766
746
  },
767
- theme: Ft,
747
+ theme: Pt,
768
748
  nodes: o,
769
749
  editable: !0
770
750
  },
771
751
  children: [
772
752
  /* @__PURE__ */ g(
773
- Nr,
753
+ Sr,
774
754
  {
775
755
  ref: N,
776
756
  hasFocus: m,
@@ -780,7 +760,7 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
780
760
  children: [
781
761
  l,
782
762
  /* @__PURE__ */ n(
783
- Ae,
763
+ _e,
784
764
  {
785
765
  contentEditable: s,
786
766
  placeholder: r ? /* @__PURE__ */ n(
@@ -797,22 +777,22 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
797
777
  children: r
798
778
  }
799
779
  ) : null,
800
- ErrorBoundary: Be
780
+ ErrorBoundary: Re
801
781
  }
802
782
  ),
803
- /* @__PURE__ */ n(xr, {}),
783
+ /* @__PURE__ */ n(yr, {}),
804
784
  i,
805
- /* @__PURE__ */ n(Sr, { isLoading: t }),
806
- !l && /* @__PURE__ */ n(vr, { children: a })
785
+ /* @__PURE__ */ n(wr, { isLoading: t }),
786
+ !l && /* @__PURE__ */ n(Mr, { children: a })
807
787
  ]
808
788
  }
809
789
  ),
810
- /* @__PURE__ */ n(yr, { state: f }),
790
+ /* @__PURE__ */ n(Nr, { state: f }),
811
791
  /* @__PURE__ */ n(Y, { children: e })
812
792
  ]
813
793
  }
814
794
  ) });
815
- }, wr = {
795
+ }, Er = {
816
796
  fontSize: "1rem",
817
797
  lineHeight: "1.5",
818
798
  "h1, h2, h3, h4, h5, h6": {
@@ -1002,9 +982,9 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
1002
982
  defaultVariants: {
1003
983
  size: "md"
1004
984
  }
1005
- }, pn = we(wr), gn = () => {
985
+ }, dn = Ae(Er), un = () => {
1006
986
  const [t] = y(), e = v(() => {
1007
- t.dispatchCommand(fe, {
987
+ t.dispatchCommand(ge, {
1008
988
  rows: "3",
1009
989
  columns: "3",
1010
990
  includeHeaders: !1
@@ -1013,20 +993,20 @@ const xr = () => /* @__PURE__ */ g(Y, { children: [
1013
993
  return /* @__PURE__ */ n(
1014
994
  nt,
1015
995
  {
1016
- trigger: /* @__PURE__ */ n(_t, { dropdown: !0, children: "Sett inn" }),
996
+ trigger: /* @__PURE__ */ n(Et, { dropdown: !0, children: "Sett inn" }),
1017
997
  side: "bottom",
1018
998
  align: "end",
1019
999
  children: /* @__PURE__ */ g(C, { onClick: e, children: [
1020
- /* @__PURE__ */ n(hr, { size: "1.25rem" }),
1000
+ /* @__PURE__ */ n(pr, { size: "1.25rem" }),
1021
1001
  " Tabell"
1022
1002
  ] })
1023
1003
  }
1024
1004
  );
1025
1005
  };
1026
- function Er(t) {
1006
+ function _r(t) {
1027
1007
  return h({ 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);
1028
1008
  }
1029
- const fn = () => {
1009
+ const hn = () => {
1030
1010
  const [t] = y(), [e, r] = b(null), { hasFocus: o } = at();
1031
1011
  x(() => {
1032
1012
  !o && e && r(null);
@@ -1037,19 +1017,19 @@ const fn = () => {
1037
1017
  elements: {
1038
1018
  reference: e
1039
1019
  },
1040
- middleware: [zt({ mainAxis: -20, crossAxis: -2 })]
1020
+ middleware: [Ot({ mainAxis: -20, crossAxis: -2 })]
1041
1021
  });
1042
1022
  x(() => t.registerCommand(
1043
1023
  F,
1044
1024
  () => {
1045
1025
  const s = T();
1046
1026
  if (L(s)) {
1047
- const d = s.anchor.getNode(), c = me(d);
1027
+ const d = s.anchor.getNode(), c = fe(d);
1048
1028
  r(c ? t.getElementByKey(c.getKey()) : null);
1049
1029
  }
1050
1030
  return !1;
1051
1031
  },
1052
- ie
1032
+ oe
1053
1033
  ), [t]);
1054
1034
  const a = (s) => () => {
1055
1035
  t.update(() => {
@@ -1067,10 +1047,10 @@ const fn = () => {
1067
1047
  dt(!0);
1068
1048
  break;
1069
1049
  case "delete-row":
1070
- be();
1050
+ ke();
1071
1051
  break;
1072
1052
  case "delete-column":
1073
- ke();
1053
+ me();
1074
1054
  break;
1075
1055
  }
1076
1056
  });
@@ -1087,7 +1067,7 @@ const fn = () => {
1087
1067
  ref: i.setFloating,
1088
1068
  style: l,
1089
1069
  css: { padding: "2px", width: "18px", height: "18px" },
1090
- children: /* @__PURE__ */ n(Er, {})
1070
+ children: /* @__PURE__ */ n(_r, {})
1091
1071
  }
1092
1072
  ),
1093
1073
  children: [
@@ -1103,16 +1083,16 @@ const fn = () => {
1103
1083
  }
1104
1084
  ) : null;
1105
1085
  };
1106
- function Kt(t) {
1086
+ function jt(t) {
1107
1087
  let e = t;
1108
1088
  const r = /^(?:(?: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;
1109
1089
  return e = String(e).trim(), e.match(r) || e.match(o) ? e : "https://";
1110
1090
  }
1111
- function qt(t) {
1091
+ function Kt(t) {
1112
1092
  const e = t.anchor, r = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1113
1093
  return o === i ? o : t.isBackward() ? ct(r) ? o : i : ct(e) ? o : i;
1114
1094
  }
1115
- const mn = (t) => (_.baseURL = t, _), j = class extends z {
1095
+ const pn = (t) => (_.baseURL = t, _), j = class extends z {
1116
1096
  static getType() {
1117
1097
  return "rutine_link";
1118
1098
  }
@@ -1124,7 +1104,7 @@ const mn = (t) => (_.baseURL = t, _), j = class extends z {
1124
1104
  return r.setAttribute("href", this.getURL()), r.setAttribute("target", "_blank"), r.setAttribute("rel", "noopener noreferrer"), r.classList.add("rutine-link"), r;
1125
1105
  }
1126
1106
  static importJSON(e) {
1127
- return Yt(e.url);
1107
+ return qt(e.url);
1128
1108
  }
1129
1109
  exportJSON() {
1130
1110
  return {
@@ -1144,13 +1124,13 @@ const mn = (t) => (_.baseURL = t, _), j = class extends z {
1144
1124
  };
1145
1125
  let _ = j;
1146
1126
  st(_, "baseURL", "");
1147
- function Yt(t) {
1127
+ function qt(t) {
1148
1128
  return new _(t);
1149
1129
  }
1150
- function _r(t) {
1130
+ function Rr(t) {
1151
1131
  return t instanceof _;
1152
1132
  }
1153
- const Rr = ({ onClose: t }) => {
1133
+ const Ir = ({ onClose: t }) => {
1154
1134
  const [e] = y(), r = v(
1155
1135
  (i) => {
1156
1136
  e.update(() => {
@@ -1159,23 +1139,23 @@ const Rr = ({ onClose: t }) => {
1159
1139
  const a = l.getNodes();
1160
1140
  if (a.length === 1) {
1161
1141
  const s = a[0];
1162
- ae(s) && s.getChildren().length === 0 && l.insertText(i);
1142
+ ie(s) && s.getChildren().length === 0 && l.insertText(i);
1163
1143
  }
1164
1144
  }
1165
- }), e.dispatchCommand(Z, Kt(i));
1145
+ }), e.dispatchCommand(Z, jt(i));
1166
1146
  },
1167
1147
  [e]
1168
1148
  );
1169
1149
  return /* @__PURE__ */ g("form", { onSubmit: (i) => {
1170
1150
  r(i.target.url.value), t();
1171
1151
  }, children: [
1172
- /* @__PURE__ */ n(Re, { name: "url", label: "URL", type: "url", required: !0 }),
1173
- /* @__PURE__ */ g(Dt, { children: [
1152
+ /* @__PURE__ */ n(Se, { name: "url", label: "URL", type: "url", required: !0 }),
1153
+ /* @__PURE__ */ g(It, { children: [
1174
1154
  /* @__PURE__ */ n($, { onClick: t, children: "Avbryt" }),
1175
1155
  /* @__PURE__ */ n($, { type: "submit", variant: "primary", children: "Lagre" })
1176
1156
  ] })
1177
1157
  ] });
1178
- }, Ir = ({ onClose: t, getDocs: e }) => {
1158
+ }, zr = ({ onClose: t, getDocs: e }) => {
1179
1159
  const [r] = y(), [o, i] = b([]), l = e(), a = v(
1180
1160
  (s) => {
1181
1161
  r.update(() => {
@@ -1183,7 +1163,7 @@ const Rr = ({ onClose: t }) => {
1183
1163
  if (L(d)) {
1184
1164
  const c = [];
1185
1165
  for (const [f, u] of s.entries()) {
1186
- const m = Yt(u.value);
1166
+ const m = qt(u.value);
1187
1167
  m.append(D(u.label)), c.push(m), f !== s.length - 1 && c.push(D(" "));
1188
1168
  }
1189
1169
  d.insertNodes(c);
@@ -1193,8 +1173,8 @@ const Rr = ({ onClose: t }) => {
1193
1173
  [r]
1194
1174
  );
1195
1175
  return /* @__PURE__ */ g(Y, { children: [
1196
- /* @__PURE__ */ n(Ie, { isMulti: !0, options: l, onChange: i }),
1197
- /* @__PURE__ */ g(Dt, { children: [
1176
+ /* @__PURE__ */ n(we, { isMulti: !0, options: l, onChange: i }),
1177
+ /* @__PURE__ */ g(It, { children: [
1198
1178
  /* @__PURE__ */ n($, { onClick: t, children: "Avbryt" }),
1199
1179
  /* @__PURE__ */ n(
1200
1180
  $,
@@ -1208,7 +1188,7 @@ const Rr = ({ onClose: t }) => {
1208
1188
  )
1209
1189
  ] })
1210
1190
  ] });
1211
- }, zr = ({
1191
+ }, Or = ({
1212
1192
  open: t,
1213
1193
  onOpenChange: e,
1214
1194
  getDocs: r
@@ -1216,19 +1196,19 @@ const Rr = ({ onClose: t }) => {
1216
1196
  const [o, i] = b("url"), l = () => {
1217
1197
  e(!1);
1218
1198
  };
1219
- return /* @__PURE__ */ g(Ee, { open: t, onOpenChange: e, css: { width: "600px" }, children: [
1220
- /* @__PURE__ */ g(_e, { css: { marginBottom: "$8" }, children: [
1199
+ return /* @__PURE__ */ g(ye, { open: t, onOpenChange: e, css: { width: "600px" }, children: [
1200
+ /* @__PURE__ */ g(Ne, { css: { marginBottom: "$8" }, children: [
1221
1201
  /* @__PURE__ */ n(pt, { active: o === "url", onClick: () => i("url"), children: "URL" }),
1222
1202
  /* @__PURE__ */ n(pt, { active: o === "rutine", onClick: () => i("rutine"), children: "Rutine" })
1223
1203
  ] }),
1224
- o === "url" && /* @__PURE__ */ n(Rr, { onClose: l }),
1225
- o === "rutine" && /* @__PURE__ */ n(Ir, { onClose: l, getDocs: r })
1204
+ o === "url" && /* @__PURE__ */ n(Ir, { onClose: l }),
1205
+ o === "rutine" && /* @__PURE__ */ n(zr, { onClose: l, getDocs: r })
1226
1206
  ] });
1227
- }, kn = ({ getDocs: t }) => {
1207
+ }, gn = ({ getDocs: t }) => {
1228
1208
  const [e] = y(), [r, o] = b(!1), [i, l] = b(!1), a = v(() => {
1229
1209
  const s = T();
1230
1210
  if (L(s)) {
1231
- const d = qt(s), c = d.getParent();
1211
+ const d = Kt(s), c = d.getParent();
1232
1212
  o(U(c) || U(d));
1233
1213
  }
1234
1214
  }, []);
@@ -1236,7 +1216,7 @@ const Rr = ({ onClose: t }) => {
1236
1216
  F,
1237
1217
  () => (a(), !1),
1238
1218
  Q
1239
- ), [e, a]), /* @__PURE__ */ g(Rt, { type: "single", value: r ? "link" : "", children: [
1219
+ ), [e, a]), /* @__PURE__ */ g(_t, { type: "single", value: r ? "link" : "", children: [
1240
1220
  /* @__PURE__ */ n(
1241
1221
  I,
1242
1222
  {
@@ -1245,11 +1225,11 @@ const Rr = ({ onClose: t }) => {
1245
1225
  },
1246
1226
  title: "Lenke",
1247
1227
  value: "link",
1248
- children: /* @__PURE__ */ n(ar, { size: "1.25rem" })
1228
+ children: /* @__PURE__ */ n(lr, { size: "1.25rem" })
1249
1229
  }
1250
1230
  ),
1251
1231
  /* @__PURE__ */ n(
1252
- zr,
1232
+ Or,
1253
1233
  {
1254
1234
  open: i,
1255
1235
  onOpenChange: l,
@@ -1257,7 +1237,7 @@ const Rr = ({ onClose: t }) => {
1257
1237
  }
1258
1238
  )
1259
1239
  ] });
1260
- }, bn = () => {
1240
+ }, fn = () => {
1261
1241
  const [t] = y(), e = rt(null), [r, o] = b(null), [i, l] = b(""), { hasFocus: a } = at();
1262
1242
  x(() => {
1263
1243
  r ? t.update(() => {
@@ -1268,19 +1248,19 @@ const Rr = ({ onClose: t }) => {
1268
1248
  placement: "top",
1269
1249
  strategy: "fixed",
1270
1250
  open: s,
1271
- whileElementsMounted: It,
1251
+ whileElementsMounted: zt,
1272
1252
  elements: {
1273
1253
  reference: e.current
1274
1254
  },
1275
- middleware: [ze()]
1276
- }), { getFloatingProps: u } = Ot([
1277
- $t(f),
1278
- Oe(f)
1255
+ middleware: [Be()]
1256
+ }), { getFloatingProps: u } = $t([
1257
+ At(f),
1258
+ De(f)
1279
1259
  ]), m = v(() => {
1280
1260
  var S;
1281
1261
  const k = T();
1282
1262
  if (L(k)) {
1283
- const A = qt(k), p = A.getParent();
1263
+ const A = Kt(k), p = A.getParent();
1284
1264
  let H = null;
1285
1265
  if (U(p) ? H = p : U(A) && (H = A), H) {
1286
1266
  const G = window.getSelection(), lt = t.getRootElement();
@@ -1289,7 +1269,7 @@ const Rr = ({ onClose: t }) => {
1289
1269
  o(H);
1290
1270
  }
1291
1271
  }, [t]), w = v(() => {
1292
- r && _r(r) && t.update(() => {
1272
+ r && Rr(r) && t.update(() => {
1293
1273
  r.remove();
1294
1274
  }), t.dispatchCommand(Z, null);
1295
1275
  }, [t, r]);
@@ -1311,13 +1291,13 @@ const Rr = ({ onClose: t }) => {
1311
1291
  t.registerCommand(
1312
1292
  vt,
1313
1293
  () => r ? (o(null), !0) : !1,
1314
- le
1294
+ ae
1315
1295
  )
1316
1296
  ), [t, m, r]), !s)
1317
1297
  return null;
1318
- const N = Kt(i);
1319
- return /* @__PURE__ */ n(At, { children: /* @__PURE__ */ g(
1320
- Bt,
1298
+ const N = jt(i);
1299
+ return /* @__PURE__ */ n(Bt, { children: /* @__PURE__ */ g(
1300
+ Rt,
1321
1301
  {
1322
1302
  ref: d.setFloating,
1323
1303
  css: {
@@ -1348,34 +1328,34 @@ const Rr = ({ onClose: t }) => {
1348
1328
  children: i
1349
1329
  }
1350
1330
  ),
1351
- /* @__PURE__ */ n($, { color: "danger", icon: !0, size: "sm", onClick: w, children: /* @__PURE__ */ n(Pe, { size: 24 }) })
1331
+ /* @__PURE__ */ n($, { color: "danger", icon: !0, size: "sm", onClick: w, children: /* @__PURE__ */ n(Fe, { size: 24 }) })
1352
1332
  ]
1353
1333
  }
1354
1334
  ) });
1355
1335
  };
1356
1336
  export {
1357
- Yt as $createRutineLinkNode,
1358
- _r as $isRutineLinkNode,
1359
- vr as FloatingToolbar,
1360
- gn as InsertSelector,
1361
- bn as LinkEditPlugin,
1337
+ qt as $createRutineLinkNode,
1338
+ Rr as $isRutineLinkNode,
1339
+ Mr as FloatingToolbar,
1340
+ un as InsertSelector,
1341
+ fn as LinkEditPlugin,
1362
1342
  W as LinkTargetNode,
1363
- kn as LinkToolbarButton,
1364
- hn as RichTextEditor,
1365
- Mr as RichTextToolbar,
1343
+ gn as LinkToolbarButton,
1344
+ cn as RichTextEditor,
1345
+ Cr as RichTextToolbar,
1366
1346
  _ as RutineLinkNode,
1367
- mn as RutineLinkNodeInit,
1368
- fn as TableEditPlugin,
1369
- Ye as clearEditorState,
1370
- dn as defaultNodes,
1371
- un as defaultViewNodes,
1372
- qe as isEditorState,
1373
- Ht as isJSON,
1374
- Ut as richTextContext,
1375
- pn as richTextCss,
1376
- wr as richTextStyleObj,
1377
- Ge as setStateFromPlainText,
1378
- cn as stateToHTML,
1379
- Je as useHasFocusWithin,
1347
+ pn as RutineLinkNodeInit,
1348
+ hn as TableEditPlugin,
1349
+ Ge as clearEditorState,
1350
+ ln as defaultNodes,
1351
+ sn as defaultViewNodes,
1352
+ Ye as isEditorState,
1353
+ Ft as isJSON,
1354
+ Ht as richTextContext,
1355
+ dn as richTextCss,
1356
+ Er as richTextStyleObj,
1357
+ Je as setStateFromPlainText,
1358
+ an as stateToHTML,
1359
+ Xe as useHasFocusWithin,
1380
1360
  at as useRichTextContext
1381
1361
  };