@paroicms/internal-link-plugin 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,515 +1,520 @@
1
- const ft = (t, e) => t === e, V = {
2
- equals: ft
1
+ const fe = (e, t) => e === t, R = {
2
+ equals: fe
3
3
  };
4
- let et = st;
5
- const E = 1, R = 2, nt = {
4
+ let te = re;
5
+ const S = 1, V = 2, ne = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var k = null;
12
- let F = null, dt = null, w = null, b = null, I = null, H = 0;
13
- function ht(t, e) {
14
- const n = w, l = k, i = t.length === 0, s = l, o = i ? nt : {
11
+ var v = null;
12
+ let H = null, de = null, b = null, y = null, I = null, K = 0;
13
+ function he(e, t) {
14
+ const n = b, i = v, l = e.length === 0, r = i, o = l ? ne : {
15
15
  owned: null,
16
16
  cleanups: null,
17
- context: s ? s.context : null,
18
- owner: s
19
- }, r = i ? t : () => t(() => A(() => x(o)));
20
- k = o, w = null;
17
+ context: r ? r.context : null,
18
+ owner: r
19
+ }, s = l ? e : () => e(() => A(() => x(o)));
20
+ v = o, b = null;
21
21
  try {
22
- return N(r, !0);
22
+ return T(s, !0);
23
23
  } finally {
24
- w = n, k = l;
24
+ b = n, v = i;
25
25
  }
26
26
  }
27
- function S(t, e) {
28
- e = e ? Object.assign({}, V, e) : V;
27
+ function E(e, t) {
28
+ t = t ? Object.assign({}, R, t) : R;
29
29
  const n = {
30
- value: t,
30
+ value: e,
31
31
  observers: null,
32
32
  observerSlots: null,
33
- comparator: e.equals || void 0
34
- }, l = (i) => (typeof i == "function" && (i = i(n.value)), it(n, i));
35
- return [lt.bind(n), l];
36
- }
37
- function C(t, e, n) {
38
- const l = K(t, e, !1, E);
39
- B(l);
40
- }
41
- function q(t, e, n) {
42
- et = $t;
43
- const l = K(t, e, !1, E);
44
- l.user = !0, I ? I.push(l) : B(l);
45
- }
46
- function P(t, e, n) {
47
- n = n ? Object.assign({}, V, n) : V;
48
- const l = K(t, e, !0, 0);
49
- return l.observers = null, l.observerSlots = null, l.comparator = n.equals || void 0, B(l), lt.bind(l);
50
- }
51
- function A(t) {
52
- if (w === null) return t();
53
- const e = w;
54
- w = null;
33
+ comparator: t.equals || void 0
34
+ }, i = (l) => (typeof l == "function" && (l = l(n.value)), le(n, l));
35
+ return [ie.bind(n), i];
36
+ }
37
+ function C(e, t, n) {
38
+ const i = q(e, t, !1, S);
39
+ N(i);
40
+ }
41
+ function G(e, t, n) {
42
+ te = $e;
43
+ const i = q(e, t, !1, S);
44
+ i.user = !0, I ? I.push(i) : N(i);
45
+ }
46
+ function D(e, t, n) {
47
+ n = n ? Object.assign({}, R, n) : R;
48
+ const i = q(e, t, !0, 0);
49
+ return i.observers = null, i.observerSlots = null, i.comparator = n.equals || void 0, N(i), ie.bind(i);
50
+ }
51
+ function A(e) {
52
+ if (b === null) return e();
53
+ const t = b;
54
+ b = null;
55
55
  try {
56
- return t();
56
+ return e();
57
57
  } finally {
58
- w = e;
58
+ b = t;
59
59
  }
60
60
  }
61
- function lt() {
61
+ function ie() {
62
62
  if (this.sources && this.state)
63
- if (this.state === E) B(this);
63
+ if (this.state === S) N(this);
64
64
  else {
65
- const t = b;
66
- b = null, N(() => M(this), !1), b = t;
65
+ const e = y;
66
+ y = null, T(() => M(this), !1), y = e;
67
67
  }
68
- if (w) {
69
- const t = this.observers ? this.observers.length : 0;
70
- w.sources ? (w.sources.push(this), w.sourceSlots.push(t)) : (w.sources = [this], w.sourceSlots = [t]), this.observers ? (this.observers.push(w), this.observerSlots.push(w.sources.length - 1)) : (this.observers = [w], this.observerSlots = [w.sources.length - 1]);
68
+ if (b) {
69
+ const e = this.observers ? this.observers.length : 0;
70
+ b.sources ? (b.sources.push(this), b.sourceSlots.push(e)) : (b.sources = [this], b.sourceSlots = [e]), this.observers ? (this.observers.push(b), this.observerSlots.push(b.sources.length - 1)) : (this.observers = [b], this.observerSlots = [b.sources.length - 1]);
71
71
  }
72
72
  return this.value;
73
73
  }
74
- function it(t, e, n) {
75
- let l = t.value;
76
- return (!t.comparator || !t.comparator(l, e)) && (t.value = e, t.observers && t.observers.length && N(() => {
77
- for (let i = 0; i < t.observers.length; i += 1) {
78
- const s = t.observers[i], o = F && F.running;
79
- o && F.disposed.has(s), (o ? !s.tState : !s.state) && (s.pure ? b.push(s) : I.push(s), s.observers && rt(s)), o || (s.state = E);
74
+ function le(e, t, n) {
75
+ let i = e.value;
76
+ return (!e.comparator || !e.comparator(i, t)) && (e.value = t, e.observers && e.observers.length && T(() => {
77
+ for (let l = 0; l < e.observers.length; l += 1) {
78
+ const r = e.observers[l], o = H && H.running;
79
+ o && H.disposed.has(r), (o ? !r.tState : !r.state) && (r.pure ? y.push(r) : I.push(r), r.observers && se(r)), o || (r.state = S);
80
80
  }
81
- if (b.length > 1e6)
82
- throw b = [], new Error();
83
- }, !1)), e;
81
+ if (y.length > 1e6)
82
+ throw y = [], new Error();
83
+ }, !1)), t;
84
84
  }
85
- function B(t) {
86
- if (!t.fn) return;
87
- x(t);
88
- const e = H;
89
- pt(t, t.value, e);
85
+ function N(e) {
86
+ if (!e.fn) return;
87
+ x(e);
88
+ const t = K;
89
+ pe(e, e.value, t);
90
90
  }
91
- function pt(t, e, n) {
92
- let l;
93
- const i = k, s = w;
94
- w = k = t;
91
+ function pe(e, t, n) {
92
+ let i;
93
+ const l = v, r = b;
94
+ b = v = e;
95
95
  try {
96
- l = t.fn(e);
96
+ i = e.fn(t);
97
97
  } catch (o) {
98
- return t.pure && (t.state = E, t.owned && t.owned.forEach(x), t.owned = null), t.updatedAt = n + 1, ot(o);
98
+ return e.pure && (e.state = S, e.owned && e.owned.forEach(x), e.owned = null), e.updatedAt = n + 1, oe(o);
99
99
  } finally {
100
- w = s, k = i;
100
+ b = r, v = l;
101
101
  }
102
- (!t.updatedAt || t.updatedAt <= n) && (t.updatedAt != null && "observers" in t ? it(t, l) : t.value = l, t.updatedAt = n);
102
+ (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? le(e, i) : e.value = i, e.updatedAt = n);
103
103
  }
104
- function K(t, e, n, l = E, i) {
105
- const s = {
106
- fn: t,
107
- state: l,
104
+ function q(e, t, n, i = S, l) {
105
+ const r = {
106
+ fn: e,
107
+ state: i,
108
108
  updatedAt: null,
109
109
  owned: null,
110
110
  sources: null,
111
111
  sourceSlots: null,
112
112
  cleanups: null,
113
- value: e,
114
- owner: k,
115
- context: k ? k.context : null,
113
+ value: t,
114
+ owner: v,
115
+ context: v ? v.context : null,
116
116
  pure: n
117
117
  };
118
- return k === null || k !== nt && (k.owned ? k.owned.push(s) : k.owned = [s]), s;
119
- }
120
- function j(t) {
121
- if (t.state === 0) return;
122
- if (t.state === R) return M(t);
123
- if (t.suspense && A(t.suspense.inFallback)) return t.suspense.effects.push(t);
124
- const e = [t];
125
- for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < H); )
126
- t.state && e.push(t);
127
- for (let n = e.length - 1; n >= 0; n--)
128
- if (t = e[n], t.state === E)
129
- B(t);
130
- else if (t.state === R) {
131
- const l = b;
132
- b = null, N(() => M(t, e[0]), !1), b = l;
118
+ return v === null || v !== ne && (v.owned ? v.owned.push(r) : v.owned = [r]), r;
119
+ }
120
+ function j(e) {
121
+ if (e.state === 0) return;
122
+ if (e.state === V) return M(e);
123
+ if (e.suspense && A(e.suspense.inFallback)) return e.suspense.effects.push(e);
124
+ const t = [e];
125
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < K); )
126
+ e.state && t.push(e);
127
+ for (let n = t.length - 1; n >= 0; n--)
128
+ if (e = t[n], e.state === S)
129
+ N(e);
130
+ else if (e.state === V) {
131
+ const i = y;
132
+ y = null, T(() => M(e, t[0]), !1), y = i;
133
133
  }
134
134
  }
135
- function N(t, e) {
136
- if (b) return t();
135
+ function T(e, t) {
136
+ if (y) return e();
137
137
  let n = !1;
138
- e || (b = []), I ? n = !0 : I = [], H++;
138
+ t || (y = []), I ? n = !0 : I = [], K++;
139
139
  try {
140
- const l = t();
141
- return gt(n), l;
142
- } catch (l) {
143
- n || (I = null), b = null, ot(l);
140
+ const i = e();
141
+ return ge(n), i;
142
+ } catch (i) {
143
+ n || (I = null), y = null, oe(i);
144
144
  }
145
145
  }
146
- function gt(t) {
147
- if (b && (st(b), b = null), t) return;
148
- const e = I;
149
- I = null, e.length && N(() => et(e), !1);
146
+ function ge(e) {
147
+ if (y && (re(y), y = null), e) return;
148
+ const t = I;
149
+ I = null, t.length && T(() => te(t), !1);
150
150
  }
151
- function st(t) {
152
- for (let e = 0; e < t.length; e++) j(t[e]);
151
+ function re(e) {
152
+ for (let t = 0; t < e.length; t++) j(e[t]);
153
153
  }
154
- function $t(t) {
155
- let e, n = 0;
156
- for (e = 0; e < t.length; e++) {
157
- const l = t[e];
158
- l.user ? t[n++] = l : j(l);
154
+ function $e(e) {
155
+ let t, n = 0;
156
+ for (t = 0; t < e.length; t++) {
157
+ const i = e[t];
158
+ i.user ? e[n++] = i : j(i);
159
159
  }
160
- for (e = 0; e < n; e++) j(t[e]);
161
- }
162
- function M(t, e) {
163
- t.state = 0;
164
- for (let n = 0; n < t.sources.length; n += 1) {
165
- const l = t.sources[n];
166
- if (l.sources) {
167
- const i = l.state;
168
- i === E ? l !== e && (!l.updatedAt || l.updatedAt < H) && j(l) : i === R && M(l, e);
160
+ for (t = 0; t < n; t++) j(e[t]);
161
+ }
162
+ function M(e, t) {
163
+ e.state = 0;
164
+ for (let n = 0; n < e.sources.length; n += 1) {
165
+ const i = e.sources[n];
166
+ if (i.sources) {
167
+ const l = i.state;
168
+ l === S ? i !== t && (!i.updatedAt || i.updatedAt < K) && j(i) : l === V && M(i, t);
169
169
  }
170
170
  }
171
171
  }
172
- function rt(t) {
173
- for (let e = 0; e < t.observers.length; e += 1) {
174
- const n = t.observers[e];
175
- n.state || (n.state = R, n.pure ? b.push(n) : I.push(n), n.observers && rt(n));
172
+ function se(e) {
173
+ for (let t = 0; t < e.observers.length; t += 1) {
174
+ const n = e.observers[t];
175
+ n.state || (n.state = V, n.pure ? y.push(n) : I.push(n), n.observers && se(n));
176
176
  }
177
177
  }
178
- function x(t) {
179
- let e;
180
- if (t.sources)
181
- for (; t.sources.length; ) {
182
- const n = t.sources.pop(), l = t.sourceSlots.pop(), i = n.observers;
183
- if (i && i.length) {
184
- const s = i.pop(), o = n.observerSlots.pop();
185
- l < i.length && (s.sourceSlots[o] = l, i[l] = s, n.observerSlots[l] = o);
178
+ function x(e) {
179
+ let t;
180
+ if (e.sources)
181
+ for (; e.sources.length; ) {
182
+ const n = e.sources.pop(), i = e.sourceSlots.pop(), l = n.observers;
183
+ if (l && l.length) {
184
+ const r = l.pop(), o = n.observerSlots.pop();
185
+ i < l.length && (r.sourceSlots[o] = i, l[i] = r, n.observerSlots[i] = o);
186
186
  }
187
187
  }
188
- if (t.tOwned) {
189
- for (e = t.tOwned.length - 1; e >= 0; e--) x(t.tOwned[e]);
190
- delete t.tOwned;
188
+ if (e.tOwned) {
189
+ for (t = e.tOwned.length - 1; t >= 0; t--) x(e.tOwned[t]);
190
+ delete e.tOwned;
191
191
  }
192
- if (t.owned) {
193
- for (e = t.owned.length - 1; e >= 0; e--) x(t.owned[e]);
194
- t.owned = null;
192
+ if (e.owned) {
193
+ for (t = e.owned.length - 1; t >= 0; t--) x(e.owned[t]);
194
+ e.owned = null;
195
195
  }
196
- if (t.cleanups) {
197
- for (e = t.cleanups.length - 1; e >= 0; e--) t.cleanups[e]();
198
- t.cleanups = null;
196
+ if (e.cleanups) {
197
+ for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
198
+ e.cleanups = null;
199
199
  }
200
- t.state = 0;
200
+ e.state = 0;
201
201
  }
202
- function mt(t) {
203
- return t instanceof Error ? t : new Error(typeof t == "string" ? t : "Unknown error", {
204
- cause: t
202
+ function ke(e) {
203
+ return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
204
+ cause: e
205
205
  });
206
206
  }
207
- function ot(t, e = k) {
208
- throw mt(t);
207
+ function oe(e, t = v) {
208
+ throw ke(e);
209
209
  }
210
- function T(t, e) {
211
- return A(() => t(e || {}));
210
+ function B(e, t) {
211
+ return A(() => e(t || {}));
212
212
  }
213
- const yt = (t) => `Stale read from <${t}>.`;
214
- function X(t) {
215
- const e = t.keyed, n = P(() => t.when, void 0, void 0), l = e ? n : P(n, void 0, {
216
- equals: (i, s) => !i == !s
213
+ const me = (e) => `Stale read from <${e}>.`;
214
+ function X(e) {
215
+ const t = e.keyed, n = D(() => e.when, void 0, void 0), i = t ? n : D(n, void 0, {
216
+ equals: (l, r) => !l == !r
217
217
  });
218
- return P(() => {
219
- const i = l();
220
- if (i) {
221
- const s = t.children;
222
- return typeof s == "function" && s.length > 0 ? A(() => s(e ? i : () => {
223
- if (!A(l)) throw yt("Show");
218
+ return D(() => {
219
+ const l = i();
220
+ if (l) {
221
+ const r = e.children;
222
+ return typeof r == "function" && r.length > 0 ? A(() => r(t ? l : () => {
223
+ if (!A(i)) throw me("Show");
224
224
  return n();
225
- })) : s;
225
+ })) : r;
226
226
  }
227
- return t.fallback;
227
+ return e.fallback;
228
228
  }, void 0, void 0);
229
229
  }
230
- const L = (t) => P(() => t());
231
- function wt(t, e, n) {
232
- let l = n.length, i = e.length, s = l, o = 0, r = 0, c = e[i - 1].nextSibling, m = null;
233
- for (; o < i || r < s; ) {
234
- if (e[o] === n[r]) {
235
- o++, r++;
230
+ const _ = (e) => D(() => e());
231
+ function be(e, t, n) {
232
+ let i = n.length, l = t.length, r = i, o = 0, s = 0, a = t[l - 1].nextSibling, k = null;
233
+ for (; o < l || s < r; ) {
234
+ if (t[o] === n[s]) {
235
+ o++, s++;
236
236
  continue;
237
237
  }
238
- for (; e[i - 1] === n[s - 1]; )
239
- i--, s--;
240
- if (i === o) {
241
- const $ = s < l ? r ? n[r - 1].nextSibling : n[s - r] : c;
242
- for (; r < s; ) t.insertBefore(n[r++], $);
243
- } else if (s === r)
244
- for (; o < i; )
245
- (!m || !m.has(e[o])) && e[o].remove(), o++;
246
- else if (e[o] === n[s - 1] && n[r] === e[i - 1]) {
247
- const $ = e[--i].nextSibling;
248
- t.insertBefore(n[r++], e[o++].nextSibling), t.insertBefore(n[--s], $), e[i] = n[s];
238
+ for (; t[l - 1] === n[r - 1]; )
239
+ l--, r--;
240
+ if (l === o) {
241
+ const $ = r < i ? s ? n[s - 1].nextSibling : n[r - s] : a;
242
+ for (; s < r; ) e.insertBefore(n[s++], $);
243
+ } else if (r === s)
244
+ for (; o < l; )
245
+ (!k || !k.has(t[o])) && t[o].remove(), o++;
246
+ else if (t[o] === n[r - 1] && n[s] === t[l - 1]) {
247
+ const $ = t[--l].nextSibling;
248
+ e.insertBefore(n[s++], t[o++].nextSibling), e.insertBefore(n[--r], $), t[l] = n[r];
249
249
  } else {
250
- if (!m) {
251
- m = /* @__PURE__ */ new Map();
252
- let f = r;
253
- for (; f < s; ) m.set(n[f], f++);
250
+ if (!k) {
251
+ k = /* @__PURE__ */ new Map();
252
+ let f = s;
253
+ for (; f < r; ) k.set(n[f], f++);
254
254
  }
255
- const $ = m.get(e[o]);
255
+ const $ = k.get(t[o]);
256
256
  if ($ != null)
257
- if (r < $ && $ < s) {
258
- let f = o, g = 1, a;
259
- for (; ++f < i && f < s && !((a = m.get(e[f])) == null || a !== $ + g); )
257
+ if (s < $ && $ < r) {
258
+ let f = o, g = 1, c;
259
+ for (; ++f < l && f < r && !((c = k.get(t[f])) == null || c !== $ + g); )
260
260
  g++;
261
- if (g > $ - r) {
262
- const d = e[o];
263
- for (; r < $; ) t.insertBefore(n[r++], d);
264
- } else t.replaceChild(n[r++], e[o++]);
261
+ if (g > $ - s) {
262
+ const d = t[o];
263
+ for (; s < $; ) e.insertBefore(n[s++], d);
264
+ } else e.replaceChild(n[s++], t[o++]);
265
265
  } else o++;
266
- else e[o++].remove();
266
+ else t[o++].remove();
267
267
  }
268
268
  }
269
269
  }
270
270
  const J = "_$DX_DELEGATE";
271
- function y(t, e, n, l) {
272
- let i;
273
- const s = () => {
274
- const r = document.createElement("template");
275
- return r.innerHTML = t, r.content.firstChild;
276
- }, o = () => (i || (i = s())).cloneNode(!0);
271
+ function m(e, t, n, i) {
272
+ let l;
273
+ const r = () => {
274
+ const s = document.createElement("template");
275
+ return s.innerHTML = e, s.content.firstChild;
276
+ }, o = () => (l || (l = r())).cloneNode(!0);
277
277
  return o.cloneNode = o, o;
278
278
  }
279
- function Q(t, e = window.document) {
280
- const n = e[J] || (e[J] = /* @__PURE__ */ new Set());
281
- for (let l = 0, i = t.length; l < i; l++) {
282
- const s = t[l];
283
- n.has(s) || (n.add(s), e.addEventListener(s, kt));
279
+ function Q(e, t = window.document) {
280
+ const n = t[J] || (t[J] = /* @__PURE__ */ new Set());
281
+ for (let i = 0, l = e.length; i < l; i++) {
282
+ const r = e[i];
283
+ n.has(r) || (n.add(r), t.addEventListener(r, ve));
284
284
  }
285
285
  }
286
- function bt(t, e) {
287
- e == null ? t.removeAttribute("class") : t.className = e;
286
+ function ye(e, t) {
287
+ t == null ? e.removeAttribute("class") : e.className = t;
288
288
  }
289
- function p(t, e, n, l) {
290
- if (n !== void 0 && !l && (l = []), typeof e != "function") return U(t, e, l, n);
291
- C((i) => U(t, e(), i, n), l);
289
+ function p(e, t, n, i) {
290
+ if (n !== void 0 && !i && (i = []), typeof t != "function") return U(e, t, i, n);
291
+ C((l) => U(e, t(), l, n), i);
292
292
  }
293
- function kt(t) {
294
- let e = t.target;
295
- const n = `$$${t.type}`, l = t.target, i = t.currentTarget, s = (c) => Object.defineProperty(t, "target", {
293
+ function ve(e) {
294
+ let t = e.target;
295
+ const n = `$$${e.type}`, i = e.target, l = e.currentTarget, r = (a) => Object.defineProperty(e, "target", {
296
296
  configurable: !0,
297
- value: c
297
+ value: a
298
298
  }), o = () => {
299
- const c = e[n];
300
- if (c && !e.disabled) {
301
- const m = e[`${n}Data`];
302
- if (m !== void 0 ? c.call(e, m, t) : c.call(e, t), t.cancelBubble) return;
299
+ const a = t[n];
300
+ if (a && !t.disabled) {
301
+ const k = t[`${n}Data`];
302
+ if (k !== void 0 ? a.call(t, k, e) : a.call(t, e), e.cancelBubble) return;
303
303
  }
304
- return e.host && typeof e.host != "string" && !e.host._$host && e.contains(t.target) && s(e.host), !0;
305
- }, r = () => {
306
- for (; o() && (e = e._$host || e.parentNode || e.host); ) ;
304
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && r(t.host), !0;
305
+ }, s = () => {
306
+ for (; o() && (t = t._$host || t.parentNode || t.host); ) ;
307
307
  };
308
- if (Object.defineProperty(t, "currentTarget", {
308
+ if (Object.defineProperty(e, "currentTarget", {
309
309
  configurable: !0,
310
310
  get() {
311
- return e || document;
311
+ return t || document;
312
312
  }
313
- }), t.composedPath) {
314
- const c = t.composedPath();
315
- s(c[0]);
316
- for (let m = 0; m < c.length - 2 && (e = c[m], !!o()); m++) {
317
- if (e._$host) {
318
- e = e._$host, r();
313
+ }), e.composedPath) {
314
+ const a = e.composedPath();
315
+ r(a[0]);
316
+ for (let k = 0; k < a.length - 2 && (t = a[k], !!o()); k++) {
317
+ if (t._$host) {
318
+ t = t._$host, s();
319
319
  break;
320
320
  }
321
- if (e.parentNode === i)
321
+ if (t.parentNode === l)
322
322
  break;
323
323
  }
324
- } else r();
325
- s(l);
324
+ } else s();
325
+ r(i);
326
326
  }
327
- function U(t, e, n, l, i) {
327
+ function U(e, t, n, i, l) {
328
328
  for (; typeof n == "function"; ) n = n();
329
- if (e === n) return n;
330
- const s = typeof e, o = l !== void 0;
331
- if (t = o && n[0] && n[0].parentNode || t, s === "string" || s === "number") {
332
- if (s === "number" && (e = e.toString(), e === n))
329
+ if (t === n) return n;
330
+ const r = typeof t, o = i !== void 0;
331
+ if (e = o && n[0] && n[0].parentNode || e, r === "string" || r === "number") {
332
+ if (r === "number" && (t = t.toString(), t === n))
333
333
  return n;
334
334
  if (o) {
335
- let r = n[0];
336
- r && r.nodeType === 3 ? r.data !== e && (r.data = e) : r = document.createTextNode(e), n = D(t, n, l, r);
335
+ let s = n[0];
336
+ s && s.nodeType === 3 ? s.data !== t && (s.data = t) : s = document.createTextNode(t), n = P(e, n, i, s);
337
337
  } else
338
- n !== "" && typeof n == "string" ? n = t.firstChild.data = e : n = t.textContent = e;
339
- } else if (e == null || s === "boolean")
340
- n = D(t, n, l);
338
+ n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
339
+ } else if (t == null || r === "boolean")
340
+ n = P(e, n, i);
341
341
  else {
342
- if (s === "function")
342
+ if (r === "function")
343
343
  return C(() => {
344
- let r = e();
345
- for (; typeof r == "function"; ) r = r();
346
- n = U(t, r, n, l);
344
+ let s = t();
345
+ for (; typeof s == "function"; ) s = s();
346
+ n = U(e, s, n, i);
347
347
  }), () => n;
348
- if (Array.isArray(e)) {
349
- const r = [], c = n && Array.isArray(n);
350
- if (G(r, e, n, i))
351
- return C(() => n = U(t, r, n, l, !0)), () => n;
352
- if (r.length === 0) {
353
- if (n = D(t, n, l), o) return n;
354
- } else c ? n.length === 0 ? Y(t, r, l) : wt(t, n, r) : (n && D(t), Y(t, r));
355
- n = r;
356
- } else if (e.nodeType) {
348
+ if (Array.isArray(t)) {
349
+ const s = [], a = n && Array.isArray(n);
350
+ if (F(s, t, n, l))
351
+ return C(() => n = U(e, s, n, i, !0)), () => n;
352
+ if (s.length === 0) {
353
+ if (n = P(e, n, i), o) return n;
354
+ } else a ? n.length === 0 ? Y(e, s, i) : be(e, n, s) : (n && P(e), Y(e, s));
355
+ n = s;
356
+ } else if (t.nodeType) {
357
357
  if (Array.isArray(n)) {
358
- if (o) return n = D(t, n, l, e);
359
- D(t, n, null, e);
360
- } else n == null || n === "" || !t.firstChild ? t.appendChild(e) : t.replaceChild(e, t.firstChild);
361
- n = e;
358
+ if (o) return n = P(e, n, i, t);
359
+ P(e, n, null, t);
360
+ } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
361
+ n = t;
362
362
  }
363
363
  }
364
364
  return n;
365
365
  }
366
- function G(t, e, n, l) {
367
- let i = !1;
368
- for (let s = 0, o = e.length; s < o; s++) {
369
- let r = e[s], c = n && n[t.length], m;
370
- if (!(r == null || r === !0 || r === !1)) if ((m = typeof r) == "object" && r.nodeType)
371
- t.push(r);
372
- else if (Array.isArray(r))
373
- i = G(t, r, c) || i;
374
- else if (m === "function")
375
- if (l) {
376
- for (; typeof r == "function"; ) r = r();
377
- i = G(t, Array.isArray(r) ? r : [r], Array.isArray(c) ? c : [c]) || i;
366
+ function F(e, t, n, i) {
367
+ let l = !1;
368
+ for (let r = 0, o = t.length; r < o; r++) {
369
+ let s = t[r], a = n && n[e.length], k;
370
+ if (!(s == null || s === !0 || s === !1)) if ((k = typeof s) == "object" && s.nodeType)
371
+ e.push(s);
372
+ else if (Array.isArray(s))
373
+ l = F(e, s, a) || l;
374
+ else if (k === "function")
375
+ if (i) {
376
+ for (; typeof s == "function"; ) s = s();
377
+ l = F(e, Array.isArray(s) ? s : [s], Array.isArray(a) ? a : [a]) || l;
378
378
  } else
379
- t.push(r), i = !0;
379
+ e.push(s), l = !0;
380
380
  else {
381
- const $ = String(r);
382
- c && c.nodeType === 3 && c.data === $ ? t.push(c) : t.push(document.createTextNode($));
381
+ const $ = String(s);
382
+ a && a.nodeType === 3 && a.data === $ ? e.push(a) : e.push(document.createTextNode($));
383
383
  }
384
384
  }
385
- return i;
386
- }
387
- function Y(t, e, n = null) {
388
- for (let l = 0, i = e.length; l < i; l++) t.insertBefore(e[l], n);
389
- }
390
- function D(t, e, n, l) {
391
- if (n === void 0) return t.textContent = "";
392
- const i = l || document.createTextNode("");
393
- if (e.length) {
394
- let s = !1;
395
- for (let o = e.length - 1; o >= 0; o--) {
396
- const r = e[o];
397
- if (i !== r) {
398
- const c = r.parentNode === t;
399
- !s && !o ? c ? t.replaceChild(i, r) : t.insertBefore(i, n) : c && r.remove();
400
- } else s = !0;
385
+ return l;
386
+ }
387
+ function Y(e, t, n = null) {
388
+ for (let i = 0, l = t.length; i < l; i++) e.insertBefore(t[i], n);
389
+ }
390
+ function P(e, t, n, i) {
391
+ if (n === void 0) return e.textContent = "";
392
+ const l = i || document.createTextNode("");
393
+ if (t.length) {
394
+ let r = !1;
395
+ for (let o = t.length - 1; o >= 0; o--) {
396
+ const s = t[o];
397
+ if (l !== s) {
398
+ const a = s.parentNode === e;
399
+ !r && !o ? a ? e.replaceChild(l, s) : e.insertBefore(l, n) : a && s.remove();
400
+ } else r = !0;
401
401
  }
402
- } else t.insertBefore(i, n);
403
- return [i];
404
- }
405
- const ct = (t) => t != null && (t = Object.getPrototypeOf(t), t === Array.prototype || t === Object.prototype);
406
- function at(t, e, n) {
407
- for (const [l, i] of Object.entries(e)) {
408
- const s = `${n}.${l}`;
409
- t[s] = i, ct(i) && at(t, i, s);
402
+ } else e.insertBefore(l, n);
403
+ return [l];
404
+ }
405
+ const ae = (e) => e != null && (e = Object.getPrototypeOf(e), e === Array.prototype || e === Object.prototype);
406
+ function ce(e, t, n) {
407
+ for (const [i, l] of Object.entries(t)) {
408
+ const r = `${n}.${i}`;
409
+ e[r] = l, ae(l) && ce(e, l, r);
410
410
  }
411
411
  }
412
- function vt(t) {
413
- const e = { ...t };
414
- for (const [n, l] of Object.entries(t))
415
- ct(l) && at(e, l, n);
416
- return e;
412
+ function Le(e) {
413
+ const t = { ...e };
414
+ for (const [n, i] of Object.entries(e))
415
+ ae(i) && ce(t, i, n);
416
+ return t;
417
417
  }
418
- const _t = (t) => t;
419
- function Lt(t, e = _t) {
420
- return (n, ...l) => {
418
+ const we = (e) => e;
419
+ function _e(e, t = we) {
420
+ return (n, ...i) => {
421
421
  n[0] === "." && (n = n.slice(1));
422
- const i = t()?.[n];
423
- switch (typeof i) {
422
+ const l = e()?.[n];
423
+ switch (typeof l) {
424
424
  case "function":
425
- return i(...l);
425
+ return l(...i);
426
426
  case "string":
427
- return e(i, l[0]);
427
+ return t(l, i[0]);
428
428
  default:
429
- return i;
429
+ return l;
430
430
  }
431
431
  };
432
432
  }
433
- const It = { insertLink: "Insert link", change: "Change", editor: { noResult: "No results found", draft: "Draft", published: "Published", sheduled: "Sheduled" }, dialog: { title: "Insert an internal link", removeLink: "Remove link", changeLink: "Find another link", ok: "OK" } }, St = {
434
- InternalLink: It
435
- }, Et = { insertLink: "Insérer un lien", change: "Modifier", editor: { noResult: "Aucun résultat trouvé", draft: "Brouillon", published: "Publié", sheduled: "Programmé" }, dialog: { title: "Insérer un lien interne", removeLink: "Supprimer le lien", changeLink: "Trouver un autre lien", ok: "OK" } }, Dt = {
436
- InternalLink: Et
437
- }, Z = { en: St, fr: Dt };
438
- function W(t) {
439
- const e = P(() => {
440
- const l = t(), i = l in Z ? l : "en";
441
- return vt(Z[i]);
433
+ const Ie = { insertLink: "Link einfügen", change: "Ändern", editor: { noResult: "Keine Ergebnisse gefunden", draft: "Entwurf", published: "Veröffentlicht", sheduled: "Geplant" }, dialog: { title: "Einen internen Link einfügen", removeLink: "Link entfernen", changeLink: "Einen anderen Link finden", ok: "OK" } }, Ee = {
434
+ InternalLink: Ie
435
+ }, Se = { insertLink: "Insert link", change: "Change", editor: { noResult: "No results found", draft: "Draft", published: "Published", sheduled: "Sheduled" }, dialog: { title: "Insert an internal link", removeLink: "Remove link", changeLink: "Find another link", ok: "OK" } }, Pe = {
436
+ InternalLink: Se
437
+ }, De = { insertLink: "Insertar enlace", change: "Cambiar", editor: { noResult: "No se encontraron resultados", draft: "Borrador", published: "Publicado", sheduled: "Programado" }, dialog: { title: "Insertar un enlace interno", removeLink: "Eliminar enlace", changeLink: "Encontrar otro enlace", ok: "OK" } }, Ce = {
438
+ InternalLink: De
439
+ }, Ae = { insertLink: "Insérer un lien", change: "Modifier", editor: { noResult: "Aucun résultat trouvé", draft: "Brouillon", published: "Publié", sheduled: "Programmé" }, dialog: { title: "Insérer un lien interne", removeLink: "Supprimer le lien", changeLink: "Trouver un autre lien", ok: "OK" } }, xe = {
440
+ InternalLink: Ae
441
+ }, Be = { insertLink: "Inserisci link", change: "Cambia", editor: { noResult: "Nessun risultato trovato", draft: "Bozza", published: "Pubblicato", sheduled: "Programmato" }, dialog: { title: "Inserisci un link interno", removeLink: "Rimuovi link", changeLink: "Trova un altro link", ok: "OK" } }, Ne = {
442
+ InternalLink: Be
443
+ }, Te = { insertLink: "Inserir link", change: "Alterar", editor: { noResult: "Nenhum resultado encontrado", draft: "Rascunho", published: "Publicado", sheduled: "Agendado" }, dialog: { title: "Inserir um link interno", removeLink: "Remover link", changeLink: "Encontrar outro link", ok: "OK" } }, Oe = {
444
+ InternalLink: Te
445
+ }, Z = { en: Pe, fr: xe, es: Ce, de: Ee, it: Ne, pt: Oe };
446
+ function W(e) {
447
+ const t = D(() => {
448
+ const i = e(), l = i in Z ? i : "en";
449
+ return Le(Z[l]);
442
450
  });
443
- return { t: Lt(e) };
451
+ return { t: _e(t) };
444
452
  }
445
- var Pt = /* @__PURE__ */ y("<div class=ILResult>"), Ct = /* @__PURE__ */ y('<div class=ILNoResult><span class=ILNoResult-message></span><span class="pi pi-exclamation-circle">'), At = /* @__PURE__ */ y("<div class=InternalLinkEditor><form class=ILForm><input class=InternalLinkEditor-input type=text placeholder=Search>"), xt = /* @__PURE__ */ y("<div class=ILResultItem><div class=ILResultItem-title></div><span>");
446
- function ut(t) {
453
+ var Re = /* @__PURE__ */ m("<div class=ILResult>"), Ve = /* @__PURE__ */ m('<div class=ILNoResult><span class=ILNoResult-message></span><span class="pi pi-exclamation-circle">'), je = /* @__PURE__ */ m("<div class=InternalLinkEditor><form class=ILForm><input class=InternalLinkEditor-input type=text placeholder=Search>"), Me = /* @__PURE__ */ m("<div class=ILResultItem><div class=ILResultItem-title></div><span>");
454
+ function ue(e) {
447
455
  const {
448
- value: e,
456
+ value: t,
449
457
  setValue: n,
450
- service: l
451
- } = t, [i, s] = S(""), [o, r] = S([]), {
452
- t: c
453
- } = W(t.language);
454
- q(async () => {
455
- const f = e();
458
+ service: i
459
+ } = e, [l, r] = E(""), [o, s] = E([]), {
460
+ t: a
461
+ } = W(e.language);
462
+ G(async () => {
463
+ const f = t();
456
464
  if (!f) return;
457
- const g = await l.getDocument(f);
458
- s(g?.title ?? ""), await m();
465
+ const g = await i.getDocument(f);
466
+ r(g?.title ?? ""), await k();
459
467
  });
460
- const m = async (f) => {
461
- if (f?.preventDefault(), i().length < 3) return;
462
- const g = await l.searchDocuments({
463
- searchString: i()
468
+ const k = async (f) => {
469
+ if (f?.preventDefault(), l().length < 3) return;
470
+ const g = await i.searchDocuments({
471
+ searchString: l()
464
472
  });
465
- r(g);
473
+ s(g);
466
474
  }, $ = (f) => f && new Date(f).getTime() < Date.now();
467
475
  return (() => {
468
- var f = At(), g = f.firstChild, a = g.firstChild;
469
- return g.addEventListener("submit", m), a.$$input = (d) => s(d.currentTarget.value), p(f, T(X, {
476
+ var f = je(), g = f.firstChild, c = g.firstChild;
477
+ return g.addEventListener("submit", k), c.$$input = (d) => r(d.currentTarget.value), p(f, B(X, {
470
478
  when: o,
471
479
  get children() {
472
- var d = Pt();
473
- return p(d, () => o().map((u) => (
474
- // biome-ignore lint/correctness/useJsxKeyInIterable: key not needed in SolidJS div
475
- (() => {
476
- var h = xt(), _ = h.firstChild, v = _.nextSibling;
477
- return h.$$click = () => {
478
- n(u.id);
479
- }, p(_, () => u.title), p(v, (() => {
480
- var O = L(() => !!u.ready);
481
- return () => O() ? L(() => !!$(u.publishDate))() ? c("InternalLink.editor.published") : c("InternalLink.editor.sheduled") : c("InternalLink.editor.draft");
482
- })()), C(() => bt(v, `ILResultItem-status
480
+ var d = Re();
481
+ return p(d, () => o().map((u) => (() => {
482
+ var h = Me(), w = h.firstChild, L = w.nextSibling;
483
+ return h.$$click = () => {
484
+ n(u.id);
485
+ }, p(w, () => u.title), p(L, (() => {
486
+ var O = _(() => !!u.ready);
487
+ return () => O() ? _(() => !!$(u.publishDate))() ? a("InternalLink.editor.published") : a("InternalLink.editor.sheduled") : a("InternalLink.editor.draft");
488
+ })()), C(() => ye(L, `ILResultItem-status
483
489
  ${u.ready ? $(u.publishDate) ? "published" : "sheduled" : "draft"}`)), h;
484
- })()
485
- ))), d;
490
+ })())), d;
486
491
  }
487
- }), null), p(f, T(X, {
492
+ }), null), p(f, B(X, {
488
493
  get when() {
489
494
  return !o() || o().length === 0;
490
495
  },
491
496
  get children() {
492
- var d = Ct(), u = d.firstChild;
493
- return p(u, () => c("InternalLink.editor.noResult")), d;
497
+ var d = Ve(), u = d.firstChild;
498
+ return p(u, () => a("InternalLink.editor.noResult")), d;
494
499
  }
495
- }), null), C(() => a.value = i()), f;
500
+ }), null), C(() => c.value = l()), f;
496
501
  })();
497
502
  }
498
503
  Q(["input", "click"]);
499
- var Tt = /* @__PURE__ */ y("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Bt = /* @__PURE__ */ y('<button class="PlgBtn pi pi-arrow-left"type=button>'), Nt = /* @__PURE__ */ y("<div class=InternalLinkDialog-content>"), Ot = /* @__PURE__ */ y('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>'), z = /* @__PURE__ */ y("<div>"), Vt = /* @__PURE__ */ y('<div><button class="PlgBtn primary"type=button>'), Rt = /* @__PURE__ */ y('<button type=button class="PlgBtn danger outlined">'), tt = /* @__PURE__ */ y("<button class=PlgBtn type=button>"), jt = /* @__PURE__ */ y('<button class="PlgBtn primary"type=button>'), Mt = /* @__PURE__ */ y('<div class=InternalLinkDialog-linkPreview><div></div><button class="PlgBtn iconBtn pi pi-pencil"type=button>');
500
- function Ut({
501
- service: t,
502
- setValue: e,
504
+ var Ue = /* @__PURE__ */ m("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Ke = /* @__PURE__ */ m('<button class="PlgBtn pi pi-arrow-left"type=button>'), He = /* @__PURE__ */ m("<div class=InternalLinkDialog-content>"), Fe = /* @__PURE__ */ m('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>'), z = /* @__PURE__ */ m("<div>"), Ge = /* @__PURE__ */ m('<div><button class="PlgBtn primary"type=button>'), qe = /* @__PURE__ */ m('<button type=button class="PlgBtn danger outlined">'), ee = /* @__PURE__ */ m("<button class=PlgBtn type=button>"), Qe = /* @__PURE__ */ m('<button class="PlgBtn primary"type=button>'), We = /* @__PURE__ */ m('<div class=InternalLinkDialog-linkPreview><div></div><button class="PlgBtn iconBtn pi pi-pencil"type=button>');
505
+ function Xe({
506
+ service: e,
507
+ setValue: t,
503
508
  value: n,
504
- language: l
509
+ language: i
505
510
  }) {
506
511
  const {
507
- t: i
508
- } = W(l), [s, o] = S(), [r, c] = S(!!n());
509
- q(async () => {
510
- const a = n();
511
- if (!a) return;
512
- const d = await t.getDocument(a);
512
+ t: l
513
+ } = W(i), [r, o] = E(), [s, a] = E(!!n());
514
+ G(async () => {
515
+ const c = n();
516
+ if (!c) return;
517
+ const d = await e.getDocument(c);
513
518
  if (!d) return;
514
519
  const {
515
520
  title: u,
@@ -520,231 +525,231 @@ function Ut({
520
525
  typeName: h
521
526
  });
522
527
  });
523
- const m = (() => {
524
- var a = Tt(), d = a.firstChild;
525
- return p(a, (() => {
526
- var u = L(() => !!(n() && !r()));
528
+ const k = (() => {
529
+ var c = Ue(), d = c.firstChild;
530
+ return p(c, (() => {
531
+ var u = _(() => !!(n() && !s()));
527
532
  return () => u() && (() => {
528
- var h = Bt();
533
+ var h = Ke();
529
534
  return h.$$click = () => {
530
- c(!0);
535
+ a(!0);
531
536
  }, h;
532
537
  })();
533
- })(), d), p(d, () => i("InternalLink.dialog.title")), a;
538
+ })(), d), p(d, () => l("InternalLink.dialog.title")), c;
534
539
  })(), $ = (() => {
535
- var a = Nt();
536
- return p(a, (() => {
537
- var d = L(() => !!(r() && n()));
540
+ var c = He();
541
+ return p(c, (() => {
542
+ var d = _(() => !!(s() && n()));
538
543
  return () => d() ? (() => {
539
- var u = Ot(), h = u.firstChild, _ = h.nextSibling;
540
- return p(h, () => s()?.title), _.$$click = () => {
541
- const v = n(), O = s()?.typeName;
542
- !v || !O || (g.close(), t.openDocumentEdition(v, O));
544
+ var u = Fe(), h = u.firstChild, w = h.nextSibling;
545
+ return p(h, () => r()?.title), w.$$click = () => {
546
+ const L = n(), O = r()?.typeName;
547
+ !L || !O || (g.close(), e.openDocumentEdition(L, O));
543
548
  }, u;
544
- })() : T(ut, {
545
- service: t,
546
- language: l,
549
+ })() : B(ue, {
550
+ service: e,
551
+ language: i,
547
552
  value: n,
548
553
  setValue: (u) => {
549
- e(u), c(!0), g.hide();
554
+ t(u), a(!0), g.hide();
550
555
  }
551
556
  });
552
- })()), a;
557
+ })()), c;
553
558
  })(), f = (() => {
554
- var a = z();
555
- return p(a, (() => {
556
- var d = L(() => !!r());
559
+ var c = z();
560
+ return p(c, (() => {
561
+ var d = _(() => !!s());
557
562
  return () => d() ? (() => {
558
- var u = Vt(), h = u.firstChild;
563
+ var u = Ge(), h = u.firstChild;
559
564
  return p(u, (() => {
560
- var _ = L(() => !!n());
561
- return () => _() && [(() => {
562
- var v = Rt();
563
- return v.$$click = () => {
564
- e(void 0), g.hide();
565
- }, p(v, () => i("InternalLink.dialog.removeLink")), v;
565
+ var w = _(() => !!n());
566
+ return () => w() && [(() => {
567
+ var L = qe();
568
+ return L.$$click = () => {
569
+ t(void 0), g.hide();
570
+ }, p(L, () => l("InternalLink.dialog.removeLink")), L;
566
571
  })(), (() => {
567
- var v = tt();
568
- return v.$$click = () => c(!1), p(v, () => i("InternalLink.dialog.changeLink")), v;
572
+ var L = ee();
573
+ return L.$$click = () => a(!1), p(L, () => l("InternalLink.dialog.changeLink")), L;
569
574
  })()];
570
575
  })(), h), h.$$click = () => {
571
576
  g.hide();
572
- }, p(h, () => i("InternalLink.dialog.ok")), u;
577
+ }, p(h, () => l("InternalLink.dialog.ok")), u;
573
578
  })() : (() => {
574
- var u = jt();
579
+ var u = Qe();
575
580
  return u.$$click = () => {
576
581
  g.hide();
577
- }, p(u, () => i("InternalLink.dialog.ok")), u;
582
+ }, p(u, () => l("InternalLink.dialog.ok")), u;
578
583
  })();
579
- })()), a;
580
- })(), g = t.createModalDialog({
584
+ })()), c;
585
+ })(), g = e.createModalDialog({
581
586
  content: $,
582
587
  footer: f,
583
- header: m
588
+ header: k
584
589
  });
585
590
  return (() => {
586
- var a = z();
587
- return p(a, (() => {
588
- var d = L(() => !!n());
591
+ var c = z();
592
+ return p(c, (() => {
593
+ var d = _(() => !!n());
589
594
  return () => d() ? (() => {
590
- var u = Mt(), h = u.firstChild, _ = h.nextSibling;
591
- return p(h, () => s()?.title), _.$$click = () => g.show(), u;
595
+ var u = We(), h = u.firstChild, w = h.nextSibling;
596
+ return p(h, () => r()?.title), w.$$click = () => g.show(), u;
592
597
  })() : (() => {
593
- var u = tt();
594
- return u.$$click = () => g.show(), p(u, () => i("InternalLink.insertLink")), u;
598
+ var u = ee();
599
+ return u.$$click = () => g.show(), p(u, () => l("InternalLink.insertLink")), u;
595
600
  })();
596
- })()), a;
601
+ })()), c;
597
602
  })();
598
603
  }
599
604
  Q(["click"]);
600
- var Ht = /* @__PURE__ */ y("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Ft = /* @__PURE__ */ y('<button class="PlgBtn pi pi-arrow-left"type=button>'), Gt = /* @__PURE__ */ y("<div>"), qt = /* @__PURE__ */ y('<div><button class="PlgBtn primary"type=button>'), Kt = /* @__PURE__ */ y('<button type=button class="PlgBtn danger outlined">'), Qt = /* @__PURE__ */ y("<button class=PlgBtn type=button>"), Wt = /* @__PURE__ */ y('<button class="PlgBtn primary"type=button>'), Xt = /* @__PURE__ */ y("<div class=InternalLinkDialog-content>"), Jt = /* @__PURE__ */ y('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>');
601
- async function Yt({
602
- value: t,
603
- getLanguage: e,
605
+ var Je = /* @__PURE__ */ m("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Ye = /* @__PURE__ */ m('<button class="PlgBtn pi pi-arrow-left"type=button>'), Ze = /* @__PURE__ */ m("<div>"), ze = /* @__PURE__ */ m('<div><button class="PlgBtn primary"type=button>'), et = /* @__PURE__ */ m('<button type=button class="PlgBtn danger outlined">'), tt = /* @__PURE__ */ m("<button class=PlgBtn type=button>"), nt = /* @__PURE__ */ m('<button class="PlgBtn primary"type=button>'), it = /* @__PURE__ */ m("<div class=InternalLinkDialog-content>"), lt = /* @__PURE__ */ m('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>');
606
+ async function rt({
607
+ value: e,
608
+ getLanguage: t,
604
609
  service: n
605
610
  }) {
606
- const [l, i] = S(), {
607
- t: s
608
- } = W(e), [o, r] = S(!!t());
609
- q(async () => {
610
- const f = t();
611
+ const [i, l] = E(), {
612
+ t: r
613
+ } = W(t), [o, s] = E(!!e());
614
+ G(async () => {
615
+ const f = e();
611
616
  if (!f) return;
612
617
  const g = await n.getDocument(f);
613
618
  if (!g) return;
614
619
  const {
615
- title: a,
620
+ title: c,
616
621
  typeName: d
617
622
  } = g;
618
- i({
619
- title: a,
623
+ l({
624
+ title: c,
620
625
  typeName: d
621
626
  });
622
627
  });
623
- const c = (() => {
624
- var f = Ht(), g = f.firstChild;
628
+ const a = (() => {
629
+ var f = Je(), g = f.firstChild;
625
630
  return p(f, (() => {
626
- var a = L(() => !!(t() && !o()));
627
- return () => a() && (() => {
628
- var d = Ft();
631
+ var c = _(() => !!(e() && !o()));
632
+ return () => c() && (() => {
633
+ var d = Ye();
629
634
  return d.$$click = () => {
630
- r(!0);
635
+ s(!0);
631
636
  }, d;
632
637
  })();
633
- })(), g), p(g, () => s("InternalLink.dialog.title")), f;
634
- })(), m = (() => {
635
- var f = Gt();
638
+ })(), g), p(g, () => r("InternalLink.dialog.title")), f;
639
+ })(), k = (() => {
640
+ var f = Ze();
636
641
  return p(f, (() => {
637
- var g = L(() => !!o());
642
+ var g = _(() => !!o());
638
643
  return () => g() ? (() => {
639
- var a = qt(), d = a.firstChild;
640
- return p(a, (() => {
641
- var u = L(() => !!t());
644
+ var c = ze(), d = c.firstChild;
645
+ return p(c, (() => {
646
+ var u = _(() => !!e());
642
647
  return () => u() && [(() => {
643
- var h = Kt();
644
- return h.$$click = () => $.close("remove"), p(h, () => s("InternalLink.dialog.removeLink")), h;
648
+ var h = et();
649
+ return h.$$click = () => $.close("remove"), p(h, () => r("InternalLink.dialog.removeLink")), h;
645
650
  })(), (() => {
646
- var h = Qt();
647
- return h.$$click = () => r(!1), p(h, () => s("InternalLink.dialog.changeLink")), h;
651
+ var h = tt();
652
+ return h.$$click = () => s(!1), p(h, () => r("InternalLink.dialog.changeLink")), h;
648
653
  })()];
649
- })(), d), d.$$click = () => $.close(), p(d, () => s("InternalLink.dialog.ok")), a;
654
+ })(), d), d.$$click = () => $.close(), p(d, () => r("InternalLink.dialog.ok")), c;
650
655
  })() : (() => {
651
- var a = Wt();
652
- return a.$$click = () => $.close(), p(a, () => s("InternalLink.dialog.ok")), a;
656
+ var c = nt();
657
+ return c.$$click = () => $.close(), p(c, () => r("InternalLink.dialog.ok")), c;
653
658
  })();
654
659
  })()), f;
655
660
  })(), $ = n.createModalDialog({
656
661
  content: (() => {
657
- var f = Xt();
662
+ var f = it();
658
663
  return p(f, (() => {
659
- var g = L(() => !!(o() && t()));
664
+ var g = _(() => !!(o() && e()));
660
665
  return () => g() ? (() => {
661
- var a = Jt(), d = a.firstChild, u = d.nextSibling;
662
- return p(d, () => l()?.title), u.$$click = () => {
663
- const h = t(), _ = l()?.typeName;
664
- !h || !_ || ($.close(), n.openDocumentEdition(h, _));
665
- }, a;
666
- })() : T(ut, {
666
+ var c = lt(), d = c.firstChild, u = d.nextSibling;
667
+ return p(d, () => i()?.title), u.$$click = () => {
668
+ const h = e(), w = i()?.typeName;
669
+ !h || !w || ($.close(), n.openDocumentEdition(h, w));
670
+ }, c;
671
+ })() : B(ue, {
667
672
  service: n,
668
- language: e,
669
- value: t,
670
- setValue: (a) => $.close(a)
673
+ language: t,
674
+ value: e,
675
+ setValue: (c) => $.close(c)
671
676
  });
672
677
  })()), f;
673
678
  })(),
674
- header: c,
675
- footer: m
679
+ header: a,
680
+ footer: k
676
681
  });
677
682
  return await $.open();
678
683
  }
679
684
  Q(["click"]);
680
- const ne = {
681
- create: ee,
682
- init: te
685
+ const ut = {
686
+ create: ct,
687
+ init: at
683
688
  };
684
- function Zt(t) {
685
- t.executeHook("htmlEditorServiceProvider").forEach((n) => {
686
- n.registerInternalLinkPlugin(zt(t));
689
+ function st(e) {
690
+ e.executeHook("htmlEditorServiceProvider").forEach((n) => {
691
+ n.registerInternalLinkPlugin(ot(e));
687
692
  });
688
693
  }
689
- function zt(t) {
694
+ function ot(e) {
690
695
  return {
691
- async getDocumentTitle(e) {
692
- return (await t.getDocument(e))?.title;
696
+ async getDocumentTitle(t) {
697
+ return (await e.getDocument(t))?.title;
693
698
  },
694
- async openDialog(e, n) {
695
- const l = await Yt({
696
- value: () => e,
699
+ async openDialog(t, n) {
700
+ const i = await rt({
701
+ value: () => t,
697
702
  getLanguage: n.getLanguage,
698
- service: t
703
+ service: e
699
704
  });
700
- if (e) {
701
- if (!l) return;
702
- if (l === "remove") return {
705
+ if (t) {
706
+ if (!i) return;
707
+ if (i === "remove") return {
703
708
  documentId: void 0
704
709
  };
705
710
  }
706
711
  return {
707
- documentId: l
712
+ documentId: i
708
713
  };
709
714
  }
710
715
  };
711
716
  }
712
- function te({
713
- pluginBaseUrl: t,
714
- addAfterInitListener: e
717
+ function at({
718
+ pluginBaseUrl: e,
719
+ addAfterInitListener: t
715
720
  }) {
716
- const n = `${t}/internal-link.css`, l = document.createElement("link");
717
- l.rel = "stylesheet", l.href = n, document.head.appendChild(l), e(Zt);
721
+ const n = `${e}/internal-link.css`, i = document.createElement("link");
722
+ i.rel = "stylesheet", i.href = n, document.head.appendChild(i), t(st);
718
723
  }
719
- function ee(t) {
724
+ function ct(e) {
720
725
  const {
721
- fieldType: e,
726
+ fieldType: t,
722
727
  initialValue: n
723
- } = t;
724
- if (e.dataType !== "string")
725
- throw new Error(`field type '${e.name}' is incompatible with internal-link plugin, needs data type 'string'`);
728
+ } = e;
729
+ if (t.dataType !== "string")
730
+ throw new Error(`field type '${t.name}' is incompatible with internal-link plugin, needs data type 'string'`);
726
731
  if (n !== void 0 && typeof n != "string")
727
- throw new Error(`field type '${e.name}' is incompatible, should be a string, got '${typeof n}'`);
728
- return ht((l) => {
729
- const [i, s] = S(n ?? ""), [o, r] = S(t.language);
732
+ throw new Error(`field type '${t.name}' is incompatible, should be a string, got '${typeof n}'`);
733
+ return he((i) => {
734
+ const [l, r] = E(n ?? ""), [o, s] = E(e.language);
730
735
  return {
731
- element: T(Ut, {
736
+ element: B(Xe, {
732
737
  language: o,
733
- value: i,
734
- setValue: (c) => {
735
- s(c ?? ""), t.setModifiedValue(c ?? null);
738
+ value: l,
739
+ setValue: (a) => {
740
+ r(a ?? ""), e.setModifiedValue(a ?? null);
736
741
  },
737
- service: t
742
+ service: e
738
743
  }),
739
- setLanguage: r,
740
- setValue: s,
744
+ setLanguage: s,
745
+ setValue: r,
741
746
  getValue() {
742
- return i();
747
+ return l();
743
748
  },
744
- dispose: l
749
+ dispose: i
745
750
  };
746
751
  });
747
752
  }
748
753
  export {
749
- ne as default
754
+ ut as default
750
755
  };