@qualityunit/liveagent-components-editor 0.0.75 → 0.0.77

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,231 +1,231 @@
1
- import { b as ae, E as pe, c as te, a as D, d as S, U as ye, s as re, r as $, p as ne, h as y, e as se, f as le, H as ie, g as z, i as G, j as H, k as w, l as x, m as Te, n as Ae, o as Ne, q as j, t as fe, u as Me, v as xe, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as De, D as Re, F as ke, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as K, Y as F, Z as ce, _ as de, $ as O, a0 as U, a1 as J, a2 as V, a3 as Ke, a4 as We, a5 as Xe, a6 as Ze } from "./ckeditor5-CejG8_Bt.js";
2
- function ze(e, t, a = !1) {
1
+ import { b as ae, E as pe, c as te, a as k, d as S, U as ye, s as re, r as Q, p as ne, h as y, e as se, f as le, H as ie, g as Z, i as z, j as H, k as w, l as M, m as Ae, n as Te, o as Ne, q as j, t as fe, u as xe, v as Me, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as ke, D as De, F as Re, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as $, Y as F, Z as ce, _ as de, $ as U, a0 as G, a1 as O, a2 as V, a3 as $e, a4 as Ke, a5 as We, a6 as Xe } from "./ckeditor5-CR79-ItL.js";
2
+ function Ze(e, t, a = !1) {
3
3
  y && se();
4
- var r = e, n = null, f = null, s = ye, c = a ? pe : 0, o = !1;
5
- const E = (u, i = !0) => {
6
- o = !0, l(i, u);
4
+ var r = e, n = null, i = null, u = ye, o = a ? pe : 0, c = !1;
5
+ const m = (v, s = !0) => {
6
+ c = !0, l(s, v);
7
7
  };
8
- var d = null;
9
- function m() {
10
- d !== null && (d.lastChild.remove(), r.before(d), d = null);
11
- var u = s ? n : f, i = s ? f : n;
12
- u && $(u), i && ne(i, () => {
13
- s ? f = null : n = null;
8
+ var _ = null;
9
+ function E() {
10
+ _ !== null && (_.lastChild.remove(), r.before(_), _ = null);
11
+ var v = u ? n : i, s = u ? i : n;
12
+ v && Q(v), s && ne(s, () => {
13
+ u ? i = null : n = null;
14
14
  });
15
15
  }
16
- const l = (u, i) => {
17
- if (s === (s = u)) return;
18
- let v = !1;
16
+ const l = (v, s) => {
17
+ if (u === (u = v)) return;
18
+ let f = !1;
19
19
  if (y) {
20
20
  const p = le(r) === ie;
21
- !!s === p && (r = z(), G(r), H(!1), v = !0);
21
+ !!u === p && (r = Z(), z(r), H(!1), f = !0);
22
22
  }
23
23
  var b = re(), N = r;
24
- if (b && (d = document.createDocumentFragment(), d.append(N = te())), s ? n ??= i && D(() => i(N)) : f ??= i && D(() => i(N)), b) {
24
+ if (b && (_ = document.createDocumentFragment(), _.append(N = te())), u ? n ??= s && k(() => s(N)) : i ??= s && k(() => s(N)), b) {
25
25
  var g = (
26
26
  /** @type {Batch} */
27
27
  S
28
- ), _ = s ? n : f, h = s ? f : n;
29
- _ && g.skipped_effects.delete(_), h && g.skipped_effects.add(h), g.add_callback(m);
28
+ ), d = u ? n : i, h = u ? i : n;
29
+ d && g.skipped_effects.delete(d), h && g.skipped_effects.add(h), g.add_callback(E);
30
30
  } else
31
- m();
32
- v && H(!0);
31
+ E();
32
+ f && H(!0);
33
33
  };
34
34
  ae(() => {
35
- o = !1, t(E), o || l(null, null);
36
- }, c), y && (r = w);
35
+ c = !1, t(m), c || l(null, null);
36
+ }, o), y && (r = w);
37
37
  }
38
- function Ge(e, t) {
38
+ function ze(e, t) {
39
39
  return t;
40
40
  }
41
- function Je(e, t, a) {
42
- for (var r = e.items, n = [], f = t.length, s = 0; s < f; s++)
43
- Ce(t[s].e, n, !0);
44
- var c = f > 0 && n.length === 0 && a !== null;
45
- if (c) {
46
- var o = (
41
+ function Ge(e, t, a) {
42
+ for (var r = e.items, n = [], i = t.length, u = 0; u < i; u++)
43
+ Ce(t[u].e, n, !0);
44
+ var o = i > 0 && n.length === 0 && a !== null;
45
+ if (o) {
46
+ var c = (
47
47
  /** @type {Element} */
48
48
  /** @type {Element} */
49
49
  a.parentNode
50
50
  );
51
- He(o), o.append(
51
+ He(c), c.append(
52
52
  /** @type {Element} */
53
53
  a
54
- ), r.clear(), M(e, t[0].prev, t[f - 1].next);
54
+ ), r.clear(), x(e, t[0].prev, t[i - 1].next);
55
55
  }
56
- De(n, () => {
57
- for (var E = 0; E < f; E++) {
58
- var d = t[E];
59
- c || (r.delete(d.k), M(e, d.prev, d.next)), ue(d.e, !c);
56
+ ke(n, () => {
57
+ for (var m = 0; m < i; m++) {
58
+ var _ = t[m];
59
+ o || (r.delete(_.k), x(e, _.prev, _.next)), ue(_.e, !o);
60
60
  }
61
61
  });
62
62
  }
63
- function Qe(e, t, a, r, n, f = null) {
64
- var s = e, c = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
63
+ function Je(e, t, a, r, n, i = null) {
64
+ var u = e, o = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
65
65
  y && se();
66
- var o = null, E = !1, d = /* @__PURE__ */ new Map(), m = Te(() => {
67
- var v = a();
68
- return Me(v) ? v : v == null ? [] : fe(v);
69
- }), l, u;
70
- function i() {
71
- $e(
72
- u,
66
+ var c = null, m = !1, _ = /* @__PURE__ */ new Map(), E = Ae(() => {
67
+ var f = a();
68
+ return xe(f) ? f : f == null ? [] : fe(f);
69
+ }), l, v;
70
+ function s() {
71
+ Qe(
72
+ v,
73
73
  l,
74
- c,
75
- d,
76
- s,
74
+ o,
75
+ _,
76
+ u,
77
77
  n,
78
78
  t,
79
79
  r,
80
80
  a
81
- ), f !== null && (l.length === 0 ? o ? $(o) : o = D(() => f(s)) : o !== null && ne(o, () => {
82
- o = null;
81
+ ), i !== null && (l.length === 0 ? c ? Q(c) : c = k(() => i(u)) : c !== null && ne(c, () => {
82
+ c = null;
83
83
  }));
84
84
  }
85
85
  ae(() => {
86
- u ??= /** @type {Effect} */
87
- Re, l = /** @type {V[]} */
88
- x(m);
89
- var v = l.length;
90
- if (E && v === 0)
86
+ v ??= /** @type {Effect} */
87
+ De, l = /** @type {V[]} */
88
+ M(E);
89
+ var f = l.length;
90
+ if (m && f === 0)
91
91
  return;
92
- E = v === 0;
92
+ m = f === 0;
93
93
  let b = !1;
94
94
  if (y) {
95
- var N = le(s) === ie;
96
- N !== (v === 0) && (s = z(), G(s), H(!1), b = !0);
95
+ var N = le(u) === ie;
96
+ N !== (f === 0) && (u = Z(), z(u), H(!1), b = !0);
97
97
  }
98
98
  if (y) {
99
- for (var g = null, _, h = 0; h < v; h++) {
100
- if (w.nodeType === ke && /** @type {Comment} */
99
+ for (var g = null, d, h = 0; h < f; h++) {
100
+ if (w.nodeType === Re && /** @type {Comment} */
101
101
  w.data === Le) {
102
- s = /** @type {Comment} */
102
+ u = /** @type {Comment} */
103
103
  w, b = !0, H(!1);
104
104
  break;
105
105
  }
106
- var p = l[h], T = r(p, h);
107
- _ = Q(
106
+ var p = l[h], A = r(p, h);
107
+ d = J(
108
108
  w,
109
- c,
109
+ o,
110
110
  g,
111
111
  null,
112
112
  p,
113
- T,
113
+ A,
114
114
  h,
115
115
  n,
116
116
  t,
117
117
  a
118
- ), c.items.set(T, _), g = _;
118
+ ), o.items.set(A, d), g = d;
119
119
  }
120
- v > 0 && G(z());
120
+ f > 0 && z(Z());
121
121
  }
122
122
  if (y)
123
- v === 0 && f && (o = D(() => f(s)));
123
+ f === 0 && i && (c = k(() => i(u)));
124
124
  else if (re()) {
125
- var R = /* @__PURE__ */ new Set(), I = (
125
+ var D = /* @__PURE__ */ new Set(), I = (
126
126
  /** @type {Batch} */
127
127
  S
128
128
  );
129
- for (h = 0; h < v; h += 1) {
130
- p = l[h], T = r(p, h);
131
- var A = c.items.get(T) ?? d.get(T);
132
- A ? _e(A, p, h) : (_ = Q(
129
+ for (h = 0; h < f; h += 1) {
130
+ p = l[h], A = r(p, h);
131
+ var T = o.items.get(A) ?? _.get(A);
132
+ T ? _e(T, p, h) : (d = J(
133
133
  null,
134
- c,
134
+ o,
135
135
  null,
136
136
  null,
137
137
  p,
138
- T,
138
+ A,
139
139
  h,
140
140
  n,
141
141
  t,
142
142
  a,
143
143
  !0
144
- ), d.set(T, _)), R.add(T);
144
+ ), _.set(A, d)), D.add(A);
145
145
  }
146
- for (const [k, C] of c.items)
147
- R.has(k) || I.skipped_effects.add(C.e);
148
- I.add_callback(i);
146
+ for (const [R, C] of o.items)
147
+ D.has(R) || I.skipped_effects.add(C.e);
148
+ I.add_callback(s);
149
149
  } else
150
- i();
151
- b && H(!0), x(m);
152
- }), y && (s = w);
150
+ s();
151
+ b && H(!0), M(E);
152
+ }), y && (u = w);
153
153
  }
154
- function $e(e, t, a, r, n, f, s, c, o) {
155
- var E = t.length, d = a.items, m = a.first, l = m, u, i = null, v = [], b = [], N, g, _, h;
156
- for (h = 0; h < E; h += 1) {
157
- if (N = t[h], g = c(N, h), _ = d.get(g), _ === void 0) {
154
+ function Qe(e, t, a, r, n, i, u, o, c) {
155
+ var m = t.length, _ = a.items, E = a.first, l = E, v, s = null, f = [], b = [], N, g, d, h;
156
+ for (h = 0; h < m; h += 1) {
157
+ if (N = t[h], g = o(N, h), d = _.get(g), d === void 0) {
158
158
  var p = r.get(g);
159
159
  if (p !== void 0) {
160
- r.delete(g), d.set(g, p);
161
- var T = i ? i.next : l;
162
- M(a, i, p), M(a, p, T), W(p, T, n), i = p;
160
+ r.delete(g), _.set(g, p);
161
+ var A = s ? s.next : l;
162
+ x(a, s, p), x(a, p, A), K(p, A, n), s = p;
163
163
  } else {
164
- var R = l ? (
164
+ var D = l ? (
165
165
  /** @type {TemplateNode} */
166
166
  l.e.nodes_start
167
167
  ) : n;
168
- i = Q(
169
- R,
168
+ s = J(
169
+ D,
170
170
  a,
171
- i,
172
- i === null ? a.first : i.next,
171
+ s,
172
+ s === null ? a.first : s.next,
173
173
  N,
174
174
  g,
175
175
  h,
176
- f,
177
- s,
178
- o
176
+ i,
177
+ u,
178
+ c
179
179
  );
180
180
  }
181
- d.set(g, i), v = [], b = [], l = i.next;
181
+ _.set(g, s), f = [], b = [], l = s.next;
182
182
  continue;
183
183
  }
184
- if (_e(_, N, h), (_.e.f & Y) !== 0 && $(_.e), _ !== l) {
185
- if (u !== void 0 && u.has(_)) {
186
- if (v.length < b.length) {
187
- var I = b[0], A;
188
- i = I.prev;
189
- var k = v[0], C = v[v.length - 1];
190
- for (A = 0; A < v.length; A += 1)
191
- W(v[A], I, n);
192
- for (A = 0; A < b.length; A += 1)
193
- u.delete(b[A]);
194
- M(a, k.prev, C.next), M(a, i, k), M(a, C, I), l = I, i = C, h -= 1, v = [], b = [];
184
+ if (_e(d, N, h), (d.e.f & Y) !== 0 && Q(d.e), d !== l) {
185
+ if (v !== void 0 && v.has(d)) {
186
+ if (f.length < b.length) {
187
+ var I = b[0], T;
188
+ s = I.prev;
189
+ var R = f[0], C = f[f.length - 1];
190
+ for (T = 0; T < f.length; T += 1)
191
+ K(f[T], I, n);
192
+ for (T = 0; T < b.length; T += 1)
193
+ v.delete(b[T]);
194
+ x(a, R.prev, C.next), x(a, s, R), x(a, C, I), l = I, s = C, h -= 1, f = [], b = [];
195
195
  } else
196
- u.delete(_), W(_, l, n), M(a, _.prev, _.next), M(a, _, i === null ? a.first : i.next), M(a, i, _), i = _;
196
+ v.delete(d), K(d, l, n), x(a, d.prev, d.next), x(a, d, s === null ? a.first : s.next), x(a, s, d), s = d;
197
197
  continue;
198
198
  }
199
- for (v = [], b = []; l !== null && l.k !== g; )
200
- (l.e.f & Y) === 0 && (u ??= /* @__PURE__ */ new Set()).add(l), b.push(l), l = l.next;
199
+ for (f = [], b = []; l !== null && l.k !== g; )
200
+ (l.e.f & Y) === 0 && (v ??= /* @__PURE__ */ new Set()).add(l), b.push(l), l = l.next;
201
201
  if (l === null)
202
202
  continue;
203
- _ = l;
203
+ d = l;
204
204
  }
205
- v.push(_), i = _, l = _.next;
205
+ f.push(d), s = d, l = d.next;
206
206
  }
207
- if (l !== null || u !== void 0) {
208
- for (var B = u === void 0 ? [] : fe(u); l !== null; )
207
+ if (l !== null || v !== void 0) {
208
+ for (var B = v === void 0 ? [] : fe(v); l !== null; )
209
209
  (l.e.f & Y) === 0 && B.push(l), l = l.next;
210
210
  var be = B.length;
211
211
  if (be > 0) {
212
212
  var Ee = null;
213
- Je(a, B, Ee);
213
+ Ge(a, B, Ee);
214
214
  }
215
215
  }
216
- e.first = a.first && a.first.e, e.last = i && i.e;
216
+ e.first = a.first && a.first.e, e.last = s && s.e;
217
217
  for (var ge of r.values())
218
218
  ue(ge.e);
219
219
  r.clear();
220
220
  }
221
221
  function _e(e, t, a, r) {
222
- Ae(e.v, t), e.i = a;
222
+ Te(e.v, t), e.i = a;
223
223
  }
224
- function Q(e, t, a, r, n, f, s, c, o, E, d) {
225
- var m = (o & Ie) !== 0, l = (o & Se) === 0, u = m ? l ? Ne(n, !1, !1) : j(n) : n, i = (o & xe) === 0 ? s : j(s), v = {
226
- i,
227
- v: u,
228
- k: f,
224
+ function J(e, t, a, r, n, i, u, o, c, m, _) {
225
+ var E = (c & Ie) !== 0, l = (c & Se) === 0, v = E ? l ? Ne(n, !1, !1) : j(n) : n, s = (c & Me) === 0 ? u : j(u), f = {
226
+ i: s,
227
+ v,
228
+ k: i,
229
229
  a: null,
230
230
  // @ts-expect-error
231
231
  e: null,
@@ -237,35 +237,35 @@ function Q(e, t, a, r, n, f, s, c, o, E, d) {
237
237
  var b = document.createDocumentFragment();
238
238
  b.append(e = te());
239
239
  }
240
- return v.e = D(() => c(
240
+ return f.e = k(() => o(
241
241
  /** @type {Node} */
242
242
  e,
243
- u,
244
- i,
245
- E
246
- ), y), v.e.prev = a && a.e, v.e.next = r && r.e, a === null ? d || (t.first = v) : (a.next = v, a.e.next = v.e), r !== null && (r.prev = v, r.e.prev = v.e), v;
243
+ v,
244
+ s,
245
+ m
246
+ ), y), f.e.prev = a && a.e, f.e.next = r && r.e, a === null ? _ || (t.first = f) : (a.next = f, a.e.next = f.e), r !== null && (r.prev = f, r.e.prev = f.e), f;
247
247
  } finally {
248
248
  }
249
249
  }
250
- function W(e, t, a) {
250
+ function K(e, t, a) {
251
251
  for (var r = e.next ? (
252
252
  /** @type {TemplateNode} */
253
253
  e.next.e.nodes_start
254
254
  ) : a, n = t ? (
255
255
  /** @type {TemplateNode} */
256
256
  t.e.nodes_start
257
- ) : a, f = (
257
+ ) : a, i = (
258
258
  /** @type {TemplateNode} */
259
259
  e.e.nodes_start
260
- ); f !== null && f !== r; ) {
261
- var s = (
260
+ ); i !== null && i !== r; ) {
261
+ var u = (
262
262
  /** @type {TemplateNode} */
263
- we(f)
263
+ we(i)
264
264
  );
265
- n.before(f), f = s;
265
+ n.before(i), i = u;
266
266
  }
267
267
  }
268
- function M(e, t, a) {
268
+ function x(e, t, a) {
269
269
  t === null ? e.first = a : (t.next = a, t.e.next = a && a.e), a !== null && (a.prev = t, a.e.prev = t && t.e);
270
270
  }
271
271
  function he(e) {
@@ -288,13 +288,13 @@ function aa(e, t, a) {
288
288
  var r = e == null ? "" : "" + e;
289
289
  return r === "" ? null : r;
290
290
  }
291
- function ta(e, t, a, r, n, f) {
292
- var s = e.__className;
293
- if (y || s !== a || s === void 0) {
294
- var c = aa(a);
295
- (!y || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : e.className = c), e.__className = a;
291
+ function ta(e, t, a, r, n, i) {
292
+ var u = e.__className;
293
+ if (y || u !== a || u === void 0) {
294
+ var o = aa(a);
295
+ (!y || o !== e.getAttribute("class")) && (o == null ? e.removeAttribute("class") : e.className = o), e.__className = a;
296
296
  }
297
- return f;
297
+ return i;
298
298
  }
299
299
  const ra = Symbol("is custom element"), na = Symbol("is html");
300
300
  function sa(e, t, a, r) {
@@ -313,47 +313,47 @@ function la(e) {
313
313
  }
314
314
  var ee = /* @__PURE__ */ new Map();
315
315
  function ia(e) {
316
- var t = ee.get(e.nodeName);
317
- if (t) return t;
318
- ee.set(e.nodeName, t = []);
319
- for (var a, r = e, n = Element.prototype; n !== r; ) {
320
- a = Fe(r);
321
- for (var f in a)
322
- a[f].set && t.push(f);
323
- r = Oe(r);
316
+ var t = e.getAttribute("is") || e.nodeName, a = ee.get(t);
317
+ if (a) return a;
318
+ ee.set(t, a = []);
319
+ for (var r, n = e, i = Element.prototype; i !== n; ) {
320
+ r = Fe(n);
321
+ for (var u in r)
322
+ r[u].set && a.push(u);
323
+ n = Oe(n);
324
324
  }
325
- return t;
325
+ return a;
326
326
  }
327
327
  function fa(e, t, a = t) {
328
- var r = Ue(), n = /* @__PURE__ */ new WeakSet();
329
- Ve(e, "input", (f) => {
330
- var s = f ? e.defaultValue : e.value;
331
- if (s = X(e) ? Z(s) : s, a(s), S !== null && n.add(S), r && s !== (s = t())) {
332
- var c = e.selectionStart, o = e.selectionEnd;
333
- e.value = s ?? "", o !== null && (e.selectionStart = c, e.selectionEnd = Math.min(o, e.value.length));
328
+ var r = /* @__PURE__ */ new WeakSet();
329
+ Ue(e, "input", async (n) => {
330
+ var i = n ? e.defaultValue : e.value;
331
+ if (i = W(e) ? X(i) : i, a(i), S !== null && r.add(S), await Ve(), i !== (i = t())) {
332
+ var u = e.selectionStart, o = e.selectionEnd;
333
+ e.value = i ?? "", o !== null && (e.selectionStart = u, e.selectionEnd = Math.min(o, e.value.length));
334
334
  }
335
335
  }), // If we are hydrating and the value has since changed,
336
336
  // then use the updated value from the input instead.
337
337
  (y && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
338
338
  // TODO Svelte 6: remove input.value check and set to empty string?
339
- L(t) == null && e.value) && (a(X(e) ? Z(e.value) : e.value), S !== null && n.add(S)), qe(() => {
340
- var f = t();
339
+ L(t) == null && e.value) && (a(W(e) ? X(e.value) : e.value), S !== null && r.add(S)), qe(() => {
340
+ var n = t();
341
341
  if (e === document.activeElement) {
342
- var s = (
342
+ var i = (
343
343
  /** @type {Batch} */
344
344
  Be ?? S
345
345
  );
346
- if (n.has(s))
346
+ if (r.has(i))
347
347
  return;
348
348
  }
349
- X(e) && f === Z(e.value) || e.type === "date" && !f && !e.value || f !== e.value && (e.value = f ?? "");
349
+ W(e) && n === X(e.value) || e.type === "date" && !n && !e.value || n !== e.value && (e.value = n ?? "");
350
350
  });
351
351
  }
352
- function X(e) {
352
+ function W(e) {
353
353
  var t = e.type;
354
354
  return t === "number" || t === "range";
355
355
  }
356
- function Z(e) {
356
+ function X(e) {
357
357
  return e === "" ? null : +e;
358
358
  }
359
359
  var ua = q("<button> </button>"), va = q('<div><button class="HTMLEditor">HTML</button> <button class="PlainEditor">Plain</button> <!></div>');
@@ -364,89 +364,91 @@ function me(e, t) {
364
364
  function n() {
365
365
  a("html", {});
366
366
  }
367
- function f() {
367
+ function i() {
368
368
  a("plain", {});
369
369
  }
370
- oe();
371
- var s = va(), c = U(s), o = J(c, 2), E = J(o, 2);
372
- return Qe(E, 1, r, Ge, (d, m) => {
373
- var l = ua(), u = U(l, !0);
374
- V(l), Ke(() => {
375
- ta(l, 1, ea((x(m), L(() => x(m).style)))), sa(l, "title", (x(m), L(() => x(m).text))), We(u, (x(m), L(() => x(m).text)));
376
- }), K("click", l, function(...i) {
377
- x(m).handler?.apply(this, i);
378
- }), F(d, l);
379
- }), V(s), K("click", c, n), K("click", o, f), F(e, s), ce({
370
+ var u = {
380
371
  get buttons() {
381
372
  return r();
382
373
  },
383
- set buttons(d) {
384
- r(d), O();
374
+ set buttons(E) {
375
+ r(E), O();
385
376
  }
386
- });
377
+ };
378
+ oe();
379
+ var o = va(), c = U(o), m = G(c, 2), _ = G(m, 2);
380
+ return Je(_, 1, r, ze, (E, l) => {
381
+ var v = ua(), s = U(v, !0);
382
+ V(v), $e(() => {
383
+ ta(v, 1, ea((M(l), L(() => M(l).style)))), sa(v, "title", (M(l), L(() => M(l).text))), Ke(s, (M(l), L(() => M(l).text)));
384
+ }), $("click", v, function(...f) {
385
+ M(l).handler?.apply(this, f);
386
+ }), F(E, v);
387
+ }), V(o), $("click", c, n), $("click", m, i), F(e, o), ce(u);
387
388
  }
388
389
  ve(me, { buttons: {} }, [], [], !0);
389
390
  var oa = q("<textarea></textarea>"), ca = q('<main><div class="Editor"><!></div> <!></main>');
390
391
  function da(e, t) {
391
392
  de(t, !1);
392
393
  let a = P(t, "value", 12, ""), r = P(t, "buttons", 28, () => []), n = P(t, "html", 12, !0);
393
- function f() {
394
+ function i() {
394
395
  n() || n(!0);
395
396
  }
396
- function s() {
397
+ function u() {
397
398
  n() && (a(a().replace(/<[^>]*>?/gm, "")), n(!1));
398
399
  }
400
+ var o = {
401
+ get value() {
402
+ return a();
403
+ },
404
+ set value(s) {
405
+ a(s), O();
406
+ },
407
+ get buttons() {
408
+ return r();
409
+ },
410
+ set buttons(s) {
411
+ r(s), O();
412
+ },
413
+ get html() {
414
+ return n();
415
+ },
416
+ set html(s) {
417
+ n(s), O();
418
+ }
419
+ };
399
420
  oe();
400
- var c = ca(), o = U(c), E = U(o);
421
+ var c = ca(), m = U(c), _ = U(m);
401
422
  {
402
- var d = (u) => {
403
- Xe(u, {
423
+ var E = (s) => {
424
+ We(s, {
404
425
  get value() {
405
426
  return a();
406
427
  },
407
- set value(i) {
408
- a(i);
428
+ set value(f) {
429
+ a(f);
409
430
  },
410
431
  $$legacy: !0
411
432
  });
412
- }, m = (u) => {
413
- var i = oa();
414
- Ze(i), fa(i, a), F(u, i);
433
+ }, l = (s) => {
434
+ var f = oa();
435
+ Xe(f), fa(f, a), F(s, f);
415
436
  };
416
- ze(E, (u) => {
417
- n() ? u(d) : u(m, !1);
437
+ Ze(_, (s) => {
438
+ n() ? s(E) : s(l, !1);
418
439
  });
419
440
  }
420
- V(o);
421
- var l = J(o, 2);
422
- return me(l, {
441
+ V(m);
442
+ var v = G(m, 2);
443
+ return me(v, {
423
444
  get buttons() {
424
445
  return r();
425
446
  },
426
- set buttons(u) {
427
- r(u);
447
+ set buttons(s) {
448
+ r(s);
428
449
  },
429
- $$events: { html: f, plain: s },
450
+ $$events: { html: i, plain: u },
430
451
  $$legacy: !0
431
- }), V(c), F(e, c), ce({
432
- get value() {
433
- return a();
434
- },
435
- set value(u) {
436
- a(u), O();
437
- },
438
- get buttons() {
439
- return r();
440
- },
441
- set buttons(u) {
442
- r(u), O();
443
- },
444
- get html() {
445
- return n();
446
- },
447
- set html(u) {
448
- n(u), O();
449
- }
450
- });
452
+ }), V(c), F(e, c), ce(o);
451
453
  }
452
454
  customElements.define("switchable-editor", ve(da, { value: {}, buttons: {}, html: {} }, [], [], !1));