@inpageedit/core 0.14.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +13 -4
  2. package/dist/{BasePlugin-CU8beLYu.js → BasePlugin-YOi2_vUo.js} +2 -2
  3. package/dist/{BasePlugin-CU8beLYu.js.map → BasePlugin-YOi2_vUo.js.map} +1 -1
  4. package/dist/{PluginPrefSync-B-gPsC2n.js → PluginPrefSync-jTNlRQE-.js} +3 -3
  5. package/dist/{PluginPrefSync-B-gPsC2n.js.map → PluginPrefSync-jTNlRQE-.js.map} +1 -1
  6. package/dist/{PluginStoreApp-CDteVCBG.js → PluginStoreApp-CGNxKXAN.js} +2 -2
  7. package/dist/{PluginStoreApp-CDteVCBG.js.map → PluginStoreApp-CGNxKXAN.js.map} +1 -1
  8. package/dist/{Preferences-85Q9FAmb.js → Preferences-BF2fcXrn.js} +140 -132
  9. package/dist/Preferences-BF2fcXrn.js.map +1 -0
  10. package/dist/{index-DjPpAyfE.js → index-3NZkG2a3.js} +3 -3
  11. package/dist/{index-DjPpAyfE.js.map → index-3NZkG2a3.js.map} +1 -1
  12. package/dist/{index-DGtq21uW.js → index-BBNseJXG.js} +3 -3
  13. package/dist/{index-DGtq21uW.js.map → index-BBNseJXG.js.map} +1 -1
  14. package/dist/{index-CVTBg5O9.js → index-Bb0FiU2c.js} +3 -3
  15. package/dist/{index-CVTBg5O9.js.map → index-Bb0FiU2c.js.map} +1 -1
  16. package/dist/{index-19CgGBI0.js → index-BgkZW91u.js} +234 -231
  17. package/dist/index-BgkZW91u.js.map +1 -0
  18. package/dist/{index-Ci82vLXg.js → index-BrYKe18j.js} +4 -4
  19. package/dist/index-BrYKe18j.js.map +1 -0
  20. package/dist/index-D-fW3ESK.js +195 -0
  21. package/dist/index-D-fW3ESK.js.map +1 -0
  22. package/dist/{index-CQr1DJ8n.js → index-D6zFqL2u.js} +4 -4
  23. package/dist/index-D6zFqL2u.js.map +1 -0
  24. package/dist/{index-BrtFJ-M0.js → index-D97lUU3h.js} +3 -3
  25. package/dist/{index-BrtFJ-M0.js.map → index-D97lUU3h.js.map} +1 -1
  26. package/dist/{index-BKIf3i0I.js → index-DELHsLHS.js} +5 -5
  27. package/dist/{index-BKIf3i0I.js.map → index-DELHsLHS.js.map} +1 -1
  28. package/dist/{index-D3iZhRMJ.js → index-DTHY5rAO.js} +4 -4
  29. package/dist/{index-D3iZhRMJ.js.map → index-DTHY5rAO.js.map} +1 -1
  30. package/dist/{index-DXL7teb0.js → index-DmLoihN1.js} +4 -4
  31. package/dist/{index-DXL7teb0.js.map → index-DmLoihN1.js.map} +1 -1
  32. package/dist/index.d.ts +46 -20
  33. package/dist/index.js +5 -5
  34. package/dist/plugins/index.js +10 -10
  35. package/dist/services/index.js +1 -1
  36. package/lib/index.umd.js +10 -10
  37. package/lib/index.umd.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/Preferences-85Q9FAmb.js.map +0 -1
  40. package/dist/index-19CgGBI0.js.map +0 -1
  41. package/dist/index-CQr1DJ8n.js.map +0 -1
  42. package/dist/index-Ci82vLXg.js.map +0 -1
  43. package/dist/index-rpiO9fpc.js +0 -145
  44. package/dist/index-rpiO9fpc.js.map +0 -1
@@ -1,22 +1,22 @@
1
- const xe = () => {
1
+ const ke = () => {
2
2
  let e, t;
3
3
  return { promise: new Promise((n, c) => {
4
4
  e = n, t = c;
5
5
  }), resolve: e, reject: t };
6
6
  };
7
- Promise.withResolvers || (Promise.withResolvers = xe);
7
+ Promise.withResolvers || (Promise.withResolvers = ke);
8
8
  var ve = Object.defineProperty, w = (e, t) => ve(e, "name", { value: t, configurable: !0 });
9
- function ke() {
9
+ function Oe() {
10
10
  }
11
- w(ke, "noop");
11
+ w(Oe, "noop");
12
12
  function $(e) {
13
13
  return e == null;
14
14
  }
15
15
  w($, "isNullable");
16
- function Oe(e) {
16
+ function Se(e) {
17
17
  return !$(e);
18
18
  }
19
- w(Oe, "isNonNullable");
19
+ w(Se, "isNonNullable");
20
20
  function J(e) {
21
21
  return e && typeof e == "object" && !Array.isArray(e);
22
22
  }
@@ -37,47 +37,47 @@ function ae(e, t, r) {
37
37
  return n;
38
38
  }
39
39
  w(ae, "pick");
40
- function Se(e, t) {
40
+ function je(e, t) {
41
41
  if (!t) return { ...e };
42
42
  const r = { ...e };
43
43
  for (const n of t)
44
44
  Reflect.deleteProperty(r, n);
45
45
  return r;
46
46
  }
47
- w(Se, "omit");
47
+ w(je, "omit");
48
48
  function A(e, t, r) {
49
49
  return Object.defineProperty(e, t, { writable: !0, value: r, enumerable: !1 });
50
50
  }
51
51
  w(A, "defineProperty");
52
- function je(e, t) {
52
+ function $e(e, t) {
53
53
  return t.every((r) => e.includes(r));
54
54
  }
55
- w(je, "contain");
56
- function $e(e, t) {
55
+ w($e, "contain");
56
+ function _e(e, t) {
57
57
  return e.filter((r) => t.includes(r));
58
58
  }
59
- w($e, "intersection");
60
- function _e(e, t) {
59
+ w(_e, "intersection");
60
+ function Ae(e, t) {
61
61
  return e.filter((r) => !t.includes(r));
62
62
  }
63
- w(_e, "difference");
64
- function Ae(e, t) {
63
+ w(Ae, "difference");
64
+ function Re(e, t) {
65
65
  return Array.from(/* @__PURE__ */ new Set([...e, ...t]));
66
66
  }
67
- w(Ae, "union");
68
- function Re(e) {
67
+ w(Re, "union");
68
+ function Pe(e) {
69
69
  return [...new Set(e)];
70
70
  }
71
- w(Re, "deduplicate");
71
+ w(Pe, "deduplicate");
72
72
  function N(e, t) {
73
73
  const r = e?.indexOf(t);
74
74
  return r >= 0 ? (e.splice(r, 1), !0) : !1;
75
75
  }
76
76
  w(N, "remove");
77
- function Pe(e) {
77
+ function Ee(e) {
78
78
  return Array.isArray(e) ? e : $(e) ? [] : [e];
79
79
  }
80
- w(Pe, "makeArray");
80
+ w(Ee, "makeArray");
81
81
  function I(e, t) {
82
82
  return arguments.length === 1 ? (r) => I(e, r) : e in globalThis && t instanceof globalThis[e] || Object.prototype.toString.call(t).slice(8, -1) === e;
83
83
  }
@@ -166,18 +166,18 @@ function B(e, t, r) {
166
166
  }) ?? Object.keys({ ...e, ...t }).every((c) => B(e[c], t[c], r));
167
167
  }
168
168
  w(B, "deepEqual");
169
- function Ee(e) {
169
+ function De(e) {
170
170
  return e.charAt(0).toUpperCase() + e.slice(1);
171
171
  }
172
- w(Ee, "capitalize");
173
- function De(e) {
172
+ w(De, "capitalize");
173
+ function Ce(e) {
174
174
  return e.charAt(0).toLowerCase() + e.slice(1);
175
175
  }
176
- w(De, "uncapitalize");
177
- function Ce(e) {
176
+ w(Ce, "uncapitalize");
177
+ function Ne(e) {
178
178
  return e.replace(/[_-][a-z]/g, (t) => t.slice(1).toUpperCase());
179
179
  }
180
- w(Ce, "camelCase");
180
+ w(Ne, "camelCase");
181
181
  function X(e, t, r) {
182
182
  const n = [];
183
183
  let c = 0;
@@ -195,18 +195,18 @@ function X(e, t, r) {
195
195
  return String.fromCharCode(...n);
196
196
  }
197
197
  w(X, "tokenize");
198
- function Ne(e) {
198
+ function Ie(e) {
199
199
  return X(e, [45, 95], 45);
200
200
  }
201
- w(Ne, "paramCase");
202
- function Ie(e) {
201
+ w(Ie, "paramCase");
202
+ function Be(e) {
203
203
  return X(e, [45, 95], 95);
204
204
  }
205
- w(Ie, "snakeCase");
206
- function Be(e) {
205
+ w(Be, "snakeCase");
206
+ function Fe(e) {
207
207
  return typeof e != "string" ? `[${e.toString()}]` : /^[a-z_$][\w$]*$/i.test(e) ? `.${e}` : `[${JSON.stringify(e)}]`;
208
208
  }
209
- w(Be, "formatProperty");
209
+ w(Fe, "formatProperty");
210
210
  function le(e) {
211
211
  return e.replace(/\/$/, "");
212
212
  }
@@ -227,13 +227,13 @@ var se;
227
227
  return t;
228
228
  }
229
229
  e.getTimezoneOffset = n, w(n, "getTimezoneOffset");
230
- function c(x = /* @__PURE__ */ new Date(), v) {
231
- return typeof x == "number" && (x = new Date(x)), v === void 0 && (v = t), Math.floor((x.valueOf() / e.minute - v) / 1440);
230
+ function c(x = /* @__PURE__ */ new Date(), k) {
231
+ return typeof x == "number" && (x = new Date(x)), k === void 0 && (k = t), Math.floor((x.valueOf() / e.minute - k) / 1440);
232
232
  }
233
233
  e.getDateNumber = c, w(c, "getDateNumber");
234
- function i(x, v) {
235
- const U = new Date(x * e.day);
236
- return v === void 0 && (v = t), new Date(+U + v * e.minute);
234
+ function i(x, k) {
235
+ const F = new Date(x * e.day);
236
+ return k === void 0 && (k = t), new Date(+F + k * e.minute);
237
237
  }
238
238
  e.fromDateNumber = i, w(i, "fromDateNumber");
239
239
  const a = /\d+(?:\.\d+)?/.source, y = new RegExp(`^${[
@@ -244,26 +244,26 @@ var se;
244
244
  "s(?:ec(?:ond)?(?:s)?)?"
245
245
  ].map((x) => `(${a}${x})?`).join("")}$`);
246
246
  function d(x) {
247
- const v = y.exec(x);
248
- return v ? (parseFloat(v[1]) * e.week || 0) + (parseFloat(v[2]) * e.day || 0) + (parseFloat(v[3]) * e.hour || 0) + (parseFloat(v[4]) * e.minute || 0) + (parseFloat(v[5]) * e.second || 0) : 0;
247
+ const k = y.exec(x);
248
+ return k ? (parseFloat(k[1]) * e.week || 0) + (parseFloat(k[2]) * e.day || 0) + (parseFloat(k[3]) * e.hour || 0) + (parseFloat(k[4]) * e.minute || 0) + (parseFloat(k[5]) * e.second || 0) : 0;
249
249
  }
250
250
  e.parseTime = d, w(d, "parseTime");
251
251
  function b(x) {
252
- const v = d(x);
253
- return v ? x = Date.now() + v : /^\d{1,2}(:\d{1,2}){1,2}$/.test(x) ? x = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${x}` : /^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(x) && (x = `${(/* @__PURE__ */ new Date()).getFullYear()}-${x}`), x ? new Date(x) : /* @__PURE__ */ new Date();
252
+ const k = d(x);
253
+ return k ? x = Date.now() + k : /^\d{1,2}(:\d{1,2}){1,2}$/.test(x) ? x = `${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${x}` : /^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(x) && (x = `${(/* @__PURE__ */ new Date()).getFullYear()}-${x}`), x ? new Date(x) : /* @__PURE__ */ new Date();
254
254
  }
255
255
  e.parseDate = b, w(b, "parseDate");
256
256
  function j(x) {
257
- const v = Math.abs(x);
258
- return v >= e.day - e.hour / 2 ? Math.round(x / e.day) + "d" : v >= e.hour - e.minute / 2 ? Math.round(x / e.hour) + "h" : v >= e.minute - e.second / 2 ? Math.round(x / e.minute) + "m" : v >= e.second ? Math.round(x / e.second) + "s" : x + "ms";
257
+ const k = Math.abs(x);
258
+ return k >= e.day - e.hour / 2 ? Math.round(x / e.day) + "d" : k >= e.hour - e.minute / 2 ? Math.round(x / e.hour) + "h" : k >= e.minute - e.second / 2 ? Math.round(x / e.minute) + "m" : k >= e.second ? Math.round(x / e.second) + "s" : x + "ms";
259
259
  }
260
260
  e.format = j, w(j, "format");
261
- function O(x, v = 2) {
262
- return x.toString().padStart(v, "0");
261
+ function O(x, k = 2) {
262
+ return x.toString().padStart(k, "0");
263
263
  }
264
264
  e.toDigits = O, w(O, "toDigits");
265
- function R(x, v = /* @__PURE__ */ new Date()) {
266
- return x.replace("yyyy", v.getFullYear().toString()).replace("yy", v.getFullYear().toString().slice(2)).replace("MM", O(v.getMonth() + 1)).replace("dd", O(v.getDate())).replace("hh", O(v.getHours())).replace("mm", O(v.getMinutes())).replace("ss", O(v.getSeconds())).replace("SSS", O(v.getMilliseconds(), 3));
265
+ function R(x, k = /* @__PURE__ */ new Date()) {
266
+ return x.replace("yyyy", k.getFullYear().toString()).replace("yy", k.getFullYear().toString().slice(2)).replace("MM", O(k.getMonth() + 1)).replace("dd", O(k.getDate())).replace("hh", O(k.getHours())).replace("mm", O(k.getMinutes())).replace("ss", O(k.getSeconds())).replace("SSS", O(k.getMilliseconds(), 3));
267
267
  }
268
268
  e.template = R, w(R, "template");
269
269
  })(se || (se = {}));
@@ -288,11 +288,11 @@ var ze = Object.defineProperty, g = (e, t) => ze(e, "name", { value: t, configur
288
288
  tracker: Symbol.for("cordis.tracker"),
289
289
  provide: Symbol.for("cordis.provide"),
290
290
  immediate: Symbol.for("cordis.immediate")
291
- }, Fe = function* () {
291
+ }, Le = function* () {
292
292
  }.constructor, oe = async function* () {
293
293
  }.constructor;
294
294
  function ee(e) {
295
- return !(!e.prototype || e instanceof Fe || oe !== Function && e instanceof oe);
295
+ return !(!e.prototype || e instanceof Le || oe !== Function && e instanceof oe);
296
296
  }
297
297
  g(ee, "isConstructor");
298
298
  function q(e, t) {
@@ -399,7 +399,7 @@ function Y(e, t, r) {
399
399
  return A(n, "name", e), Object.setPrototypeOf(n, t);
400
400
  }
401
401
  g(Y, "createCallable");
402
- var Le = class z {
402
+ var Me = class U {
403
403
  constructor(t) {
404
404
  this.ctx = t, A(this, h.tracker, {
405
405
  associate: "reflect",
@@ -427,18 +427,18 @@ var Le = class z {
427
427
  if (typeof r != "string") return Reflect.get(t, r, n);
428
428
  if (Reflect.has(t, r))
429
429
  return D(n, Reflect.get(t, r, n), !0);
430
- const [c, i] = z.resolveInject(t, r), a = new Error(`property ${c} is not registered, declare it as \`inject\` to suppress this warning`);
431
- return i ? i.type === "accessor" ? i.get.call(n, n[h.receiver]) : (i.builtin || z.checkInject(n, c, a), n.reflect.get(c)) : (z.checkInject(n, c, a), Reflect.get(t, c, n));
430
+ const [c, i] = U.resolveInject(t, r), a = new Error(`property ${c} is not registered, declare it as \`inject\` to suppress this warning`);
431
+ return i ? i.type === "accessor" ? i.get.call(n, n[h.receiver]) : (i.builtin || U.checkInject(n, c, a), n.reflect.get(c)) : (U.checkInject(n, c, a), Reflect.get(t, c, n));
432
432
  }, "get"),
433
433
  set: /* @__PURE__ */ g((t, r, n, c) => {
434
434
  if (typeof r != "string") return Reflect.set(t, r, n, c);
435
- const [i, a] = z.resolveInject(t, r);
435
+ const [i, a] = U.resolveInject(t, r);
436
436
  return a ? a.type === "accessor" ? a.set ? a.set.call(c, n, c[h.receiver]) : !1 : (c.reflect.set(i, n), !0) : Reflect.set(t, i, n, c);
437
437
  }, "set"),
438
438
  has: /* @__PURE__ */ g((t, r) => {
439
439
  if (typeof r != "string") return Reflect.has(t, r);
440
440
  if (Reflect.has(t, r)) return !0;
441
- const [, n] = z.resolveInject(t, r);
441
+ const [, n] = U.resolveInject(t, r);
442
442
  return !!n;
443
443
  }, "has")
444
444
  };
@@ -512,12 +512,12 @@ var Le = class z {
512
512
  apply: /* @__PURE__ */ g((r, n, c) => r.apply(this.trace(n), c.map((i) => this.trace(i))), "apply")
513
513
  });
514
514
  }
515
- }, Q = Le;
515
+ }, Q = Me;
516
516
  function Z(e) {
517
517
  return e !== null && e !== !1 && e !== void 0;
518
518
  }
519
519
  g(Z, "isBailed");
520
- var Me = class {
520
+ var qe = class {
521
521
  constructor(e) {
522
522
  this.ctx = e, A(this, h.tracker, {
523
523
  associate: "lifecycle",
@@ -630,7 +630,7 @@ var Me = class {
630
630
  async stop() {
631
631
  this.isActive = !1, this.ctx.scope.reset();
632
632
  }
633
- }, qe = Me, Je = /* @__PURE__ */ ((e) => (e[e.PENDING = 0] = "PENDING", e[e.LOADING = 1] = "LOADING", e[e.ACTIVE = 2] = "ACTIVE", e[e.FAILED = 3] = "FAILED", e[e.DISPOSED = 4] = "DISPOSED", e))(Je || {}), T = class ye extends Error {
633
+ }, Je = qe, Ve = /* @__PURE__ */ ((e) => (e[e.PENDING = 0] = "PENDING", e[e.LOADING = 1] = "LOADING", e[e.ACTIVE = 2] = "ACTIVE", e[e.FAILED = 3] = "FAILED", e[e.DISPOSED = 4] = "DISPOSED", e))(Ve || {}), T = class ye extends Error {
634
634
  constructor(t, r) {
635
635
  super(r ?? ye.Code[t]), this.code = t;
636
636
  }
@@ -759,7 +759,7 @@ var de = class {
759
759
  }
760
760
  return [i, a];
761
761
  }
762
- }, Ve = class extends de {
762
+ }, He = class extends de {
763
763
  constructor(e, t, r, n) {
764
764
  super(e, r), this.runtime = t, this.dispose = A(e.scope.collect(`fork <${e.runtime.name}>`, () => {
765
765
  this.uid = null, this.reset(), this.context.emit("internal/fork", this);
@@ -808,7 +808,7 @@ var de = class {
808
808
  return this.forkables.length > 0;
809
809
  }
810
810
  fork(e, t, r) {
811
- return new Ve(e, this, t, r);
811
+ return new He(e, this, t, r);
812
812
  }
813
813
  dispose() {
814
814
  return this.uid = null, this.reset(), this.context.emit("internal/runtime", this), !0;
@@ -884,7 +884,7 @@ g(K, "Inject");
884
884
  }
885
885
  e.resolve = t, g(t, "resolve");
886
886
  })(K || (K = {}));
887
- var He = class {
887
+ var Ke = class {
888
888
  constructor(e, t) {
889
889
  this.ctx = e, A(this, h.tracker, {
890
890
  associate: "registry",
@@ -955,7 +955,7 @@ var He = class {
955
955
  let n = this.get(e);
956
956
  return n ? (n.isForkable || this.context.emit(this.ctx, "internal/warning", new Error(`duplicate plugin detected: ${e.name}`)), n.fork(this.ctx, t, r)) : (n = new ce(this.ctx, e, t, r), this.set(e, n), n.fork(this.ctx, t, r));
957
957
  }
958
- }, Ke = He, P = class F {
958
+ }, Ge = Ke, P = class z {
959
959
  static {
960
960
  g(this, "Context");
961
961
  }
@@ -970,10 +970,10 @@ var He = class {
970
970
  static origin = "ctx";
971
971
  static current = "ctx";
972
972
  static is(t) {
973
- return !!t?.[F.is];
973
+ return !!t?.[z.is];
974
974
  }
975
975
  static {
976
- F.is[Symbol.toPrimitive] = () => Symbol.for("cordis.is"), F.prototype[F.is] = !0;
976
+ z.is[Symbol.toPrimitive] = () => Symbol.for("cordis.is"), z.prototype[z.is] = !0;
977
977
  }
978
978
  /** @deprecated use `Service.traceable` instead */
979
979
  static associate(t, r) {
@@ -982,7 +982,7 @@ var He = class {
982
982
  constructor(t) {
983
983
  t = q(this.constructor, t), this[h.store] = /* @__PURE__ */ Object.create(null), this[h.isolate] = /* @__PURE__ */ Object.create(null), this[h.internal] = /* @__PURE__ */ Object.create(null), this[h.intercept] = /* @__PURE__ */ Object.create(null);
984
984
  const r = new Proxy(this, Q.handler);
985
- r.root = r, r.reflect = new Q(r), r.registry = new Ke(r, t), r.lifecycle = new qe(r);
985
+ r.root = r, r.reflect = new Q(r), r.registry = new Ge(r, t), r.lifecycle = new Je(r);
986
986
  const n = /* @__PURE__ */ g((c) => {
987
987
  if (c) {
988
988
  n(Object.getPrototypeOf(c));
@@ -1024,7 +1024,7 @@ var He = class {
1024
1024
  }
1025
1025
  };
1026
1026
  P.prototype[P.internal] = /* @__PURE__ */ Object.create(null);
1027
- var Te = class be {
1027
+ var Xe = class be {
1028
1028
  static {
1029
1029
  g(this, "Service");
1030
1030
  }
@@ -1071,9 +1071,9 @@ var Te = class be {
1071
1071
  }
1072
1072
  return !1;
1073
1073
  }
1074
- }, Ge = Object.defineProperty, We = Object.getOwnPropertyNames, k = (e, t) => Ge(e, "name", { value: t, configurable: !0 }), Ye = (e, t) => function() {
1075
- return t || (0, e[We(e)[0]])((t = { exports: {} }).exports, t), t.exports;
1076
- }, Qe = Ye({
1074
+ }, We = Object.defineProperty, Ye = Object.getOwnPropertyNames, v = (e, t) => We(e, "name", { value: t, configurable: !0 }), Qe = (e, t) => function() {
1075
+ return t || (0, e[Ye(e)[0]])((t = { exports: {} }).exports, t), t.exports;
1076
+ }, Ze = Qe({
1077
1077
  "src/index.ts"(e, t) {
1078
1078
  var r = Symbol.for("schemastery"), n = Symbol.for("ValidationError");
1079
1079
  globalThis.__schemastery_index__ ??= 0;
@@ -1085,7 +1085,7 @@ var Te = class be {
1085
1085
  f.startsWith(".") && (f = f.slice(1)), super((f === "$" ? "" : `${f} `) + o), this.options = s;
1086
1086
  }
1087
1087
  static {
1088
- k(this, "ValidationError");
1088
+ v(this, "ValidationError");
1089
1089
  }
1090
1090
  name = "ValidationError";
1091
1091
  static is(o) {
@@ -1095,12 +1095,12 @@ var Te = class be {
1095
1095
  Object.defineProperty(c.prototype, n, {
1096
1096
  value: !0
1097
1097
  });
1098
- var i = /* @__PURE__ */ k(function(o) {
1099
- const s = /* @__PURE__ */ k(function(f, u = {}) {
1098
+ var i = /* @__PURE__ */ v(function(o) {
1099
+ const s = /* @__PURE__ */ v(function(f, u = {}) {
1100
1100
  return i.resolve(f, s, u)[0];
1101
1101
  }, "schema");
1102
1102
  if (o.refs) {
1103
- const f = C(o.refs, (l) => new i(l)), u = /* @__PURE__ */ k((l) => f[l], "getRef");
1103
+ const f = C(o.refs, (l) => new i(l)), u = /* @__PURE__ */ v((l) => f[l], "getRef");
1104
1104
  for (const l in f) {
1105
1105
  const p = f[l];
1106
1106
  p.sKey = u(p.sKey), p.inner = u(p.inner), p.list = p.list && p.list.map(u), p.dict = p.dict && C(p.dict, u);
@@ -1116,15 +1116,15 @@ var Te = class be {
1116
1116
  }, "Schema");
1117
1117
  i.prototype = Object.create(Function.prototype), i.prototype[r] = !0, i.ValidationError = c;
1118
1118
  var a;
1119
- i.prototype.toJSON = /* @__PURE__ */ k(function() {
1119
+ i.prototype.toJSON = /* @__PURE__ */ v(function() {
1120
1120
  if (a)
1121
1121
  return a[this.uid] ??= JSON.parse(JSON.stringify({ ...this })), this.uid;
1122
1122
  a = { [this.uid]: { ...this } }, a[this.uid] = JSON.parse(JSON.stringify({ ...this }));
1123
1123
  const s = { uid: this.uid, refs: a };
1124
1124
  return a = void 0, s;
1125
- }, "toJSON"), i.prototype.set = /* @__PURE__ */ k(function(s, f) {
1125
+ }, "toJSON"), i.prototype.set = /* @__PURE__ */ v(function(s, f) {
1126
1126
  return this.dict[s] = f, this;
1127
- }, "set"), i.prototype.push = /* @__PURE__ */ k(function(s) {
1127
+ }, "set"), i.prototype.push = /* @__PURE__ */ v(function(s) {
1128
1128
  return this.list.push(s), this;
1129
1129
  }, "push");
1130
1130
  function y(o, s) {
@@ -1135,18 +1135,18 @@ var Te = class be {
1135
1135
  }
1136
1136
  return f;
1137
1137
  }
1138
- k(y, "mergeDesc");
1138
+ v(y, "mergeDesc");
1139
1139
  function d(o) {
1140
1140
  return o?.$value ?? o?.$inner;
1141
1141
  }
1142
- k(d, "getInner");
1142
+ v(d, "getInner");
1143
1143
  function b(o) {
1144
1144
  return fe(o ?? {}, (s) => !s.startsWith("$"));
1145
1145
  }
1146
- k(b, "extractKeys"), i.prototype.i18n = /* @__PURE__ */ k(function(s) {
1146
+ v(b, "extractKeys"), i.prototype.i18n = /* @__PURE__ */ v(function(s) {
1147
1147
  const f = i(this), u = y(f.meta.description, s);
1148
1148
  return Object.keys(u).length && (f.meta.description = u), f.dict && (f.dict = C(f.dict, (l, p) => l.i18n(C(s, (m) => d(m)?.[p] ?? m?.[p])))), f.list && (f.list = f.list.map((l, p) => l.i18n(C(s, (m = {}) => Array.isArray(d(m)) ? d(m)[p] : Array.isArray(m) ? m[p] : b(m))))), f.inner && (f.inner = f.inner.i18n(C(s, (l) => d(l) ? d(l) : b(l)))), f.sKey && (f.sKey = f.sKey.i18n(C(s, (l) => l?.$key))), f;
1149
- }, "i18n"), i.prototype.extra = /* @__PURE__ */ k(function(s, f) {
1149
+ }, "i18n"), i.prototype.extra = /* @__PURE__ */ v(function(s, f) {
1150
1150
  const u = i(this);
1151
1151
  return u.meta = { ...u.meta, [s]: f }, u;
1152
1152
  }, "extra");
@@ -1157,16 +1157,16 @@ var Te = class be {
1157
1157
  return f.meta = { ...f.meta, [o]: s }, f;
1158
1158
  }
1159
1159
  });
1160
- i.prototype.deprecated = /* @__PURE__ */ k(function() {
1160
+ i.prototype.deprecated = /* @__PURE__ */ v(function() {
1161
1161
  const s = i(this);
1162
1162
  return s.meta.badges ||= [], s.meta.badges.push({ text: "deprecated", type: "danger" }), s;
1163
- }, "deprecated"), i.prototype.experimental = /* @__PURE__ */ k(function() {
1163
+ }, "deprecated"), i.prototype.experimental = /* @__PURE__ */ v(function() {
1164
1164
  const s = i(this);
1165
1165
  return s.meta.badges ||= [], s.meta.badges.push({ text: "experimental", type: "warning" }), s;
1166
- }, "experimental"), i.prototype.pattern = /* @__PURE__ */ k(function(s) {
1166
+ }, "experimental"), i.prototype.pattern = /* @__PURE__ */ v(function(s) {
1167
1167
  const f = i(this), u = ae(s, ["source", "flags"]);
1168
1168
  return f.meta = { ...f.meta, pattern: u }, f;
1169
- }, "pattern"), i.prototype.simplify = /* @__PURE__ */ k(function(s) {
1169
+ }, "pattern"), i.prototype.simplify = /* @__PURE__ */ v(function(s) {
1170
1170
  if (B(s, this.meta.default, this.type === "dict")) return null;
1171
1171
  if ($(s)) return s;
1172
1172
  if (this.type === "object" || this.type === "dict") {
@@ -1194,9 +1194,9 @@ var Te = class be {
1194
1194
  } catch {
1195
1195
  }
1196
1196
  return s;
1197
- }, "simplify"), i.prototype.toString = /* @__PURE__ */ k(function(s) {
1197
+ }, "simplify"), i.prototype.toString = /* @__PURE__ */ v(function(s) {
1198
1198
  return ie[this.type]?.(this, s) ?? `Schema<${this.type}>`;
1199
- }, "toString"), i.prototype.role = /* @__PURE__ */ k(function(o, s) {
1199
+ }, "toString"), i.prototype.role = /* @__PURE__ */ v(function(o, s) {
1200
1200
  const f = i(this);
1201
1201
  return f.meta = { ...f.meta, role: o, extra: s }, f;
1202
1202
  }, "role");
@@ -1208,9 +1208,9 @@ var Te = class be {
1208
1208
  }
1209
1209
  });
1210
1210
  var j = {};
1211
- i.extend = /* @__PURE__ */ k(function(s, f) {
1211
+ i.extend = /* @__PURE__ */ v(function(s, f) {
1212
1212
  j[s] = f;
1213
- }, "extend"), i.resolve = /* @__PURE__ */ k(function(s, f, u = {}, l = !1) {
1213
+ }, "extend"), i.resolve = /* @__PURE__ */ v(function(s, f, u = {}, l = !1) {
1214
1214
  if (!f) return [s];
1215
1215
  if (u.ignore?.(s, f)) return [s];
1216
1216
  if ($(s) && f.type !== "lazy") {
@@ -1229,7 +1229,7 @@ var Te = class be {
1229
1229
  if (!f.meta.loose) throw m;
1230
1230
  return [f.meta.default];
1231
1231
  }
1232
- }, "resolve"), i.from = /* @__PURE__ */ k(function(s) {
1232
+ }, "resolve"), i.from = /* @__PURE__ */ v(function(s) {
1233
1233
  if ($(s))
1234
1234
  return i.any();
1235
1235
  if (["string", "number", "boolean"].includes(typeof s))
@@ -1251,14 +1251,14 @@ var Te = class be {
1251
1251
  }
1252
1252
  else
1253
1253
  throw new TypeError(`cannot infer schema from ${s}`);
1254
- }, "from"), i.lazy = /* @__PURE__ */ k(function(s) {
1255
- const f = /* @__PURE__ */ k(() => (u.inner[r] || (u.inner = u.builder(), u.inner.meta = { ...u.meta, ...u.inner.meta }), u.inner.toJSON()), "toJSON"), u = new i({ type: "lazy", builder: s, inner: { toJSON: f } });
1254
+ }, "from"), i.lazy = /* @__PURE__ */ v(function(s) {
1255
+ const f = /* @__PURE__ */ v(() => (u.inner[r] || (u.inner = u.builder(), u.inner.meta = { ...u.meta, ...u.inner.meta }), u.inner.toJSON()), "toJSON"), u = new i({ type: "lazy", builder: s, inner: { toJSON: f } });
1256
1256
  return u;
1257
- }, "lazy"), i.natural = /* @__PURE__ */ k(function() {
1257
+ }, "lazy"), i.natural = /* @__PURE__ */ v(function() {
1258
1258
  return i.number().step(1).min(0);
1259
- }, "natural"), i.percent = /* @__PURE__ */ k(function() {
1259
+ }, "natural"), i.percent = /* @__PURE__ */ v(function() {
1260
1260
  return i.number().step(0.01).min(0).max(1).role("slider");
1261
- }, "percent"), i.date = /* @__PURE__ */ k(function() {
1261
+ }, "percent"), i.date = /* @__PURE__ */ v(function() {
1262
1262
  return i.union([
1263
1263
  i.is(Date),
1264
1264
  i.transform(i.string().role("datetime"), (s, f) => {
@@ -1267,7 +1267,7 @@ var Te = class be {
1267
1267
  return u;
1268
1268
  }, !0)
1269
1269
  ]);
1270
- }, "date"), i.regExp = /* @__PURE__ */ k(function(s = "") {
1270
+ }, "date"), i.regExp = /* @__PURE__ */ v(function(s = "") {
1271
1271
  return i.union([
1272
1272
  i.is(RegExp),
1273
1273
  i.transform(i.string().role("regexp", { flag: s }), (f, u) => {
@@ -1278,7 +1278,7 @@ var Te = class be {
1278
1278
  }
1279
1279
  }, !0)
1280
1280
  ]);
1281
- }, "regExp"), i.arrayBuffer = /* @__PURE__ */ k(function(s) {
1281
+ }, "regExp"), i.arrayBuffer = /* @__PURE__ */ v(function(s) {
1282
1282
  return i.union([
1283
1283
  i.is(ArrayBuffer),
1284
1284
  i.is(SharedArrayBuffer),
@@ -1305,7 +1305,7 @@ var Te = class be {
1305
1305
  if (o > p) throw new c(`expected ${f} <= ${p} but got ${o}`, u);
1306
1306
  if (o < m && !l) throw new c(`expected ${f} >= ${m} but got ${o}`, u);
1307
1307
  }
1308
- k(O, "checkWithinRange"), i.extend("string", (o, { meta: s }, f) => {
1308
+ v(O, "checkWithinRange"), i.extend("string", (o, { meta: s }, f) => {
1309
1309
  if (typeof o != "string") throw new c(`expected string but got ${o}`, f);
1310
1310
  if (s.pattern) {
1311
1311
  const u = new RegExp(s.pattern.source, s.pattern.flags);
@@ -1321,14 +1321,14 @@ var Te = class be {
1321
1321
  const l = f.slice(u + 1), p = f.slice(0, u);
1322
1322
  return l.length <= s ? +(p + l.padEnd(s, "0")) : +(p + l.slice(0, s) + "." + l.slice(s));
1323
1323
  }
1324
- k(R, "decimalShift");
1324
+ v(R, "decimalShift");
1325
1325
  function x(o, s, f) {
1326
1326
  if (f = Math.abs(f), !/^\d+\.\d+$/.test(f.toString()))
1327
1327
  return (o - s) % f === 0;
1328
1328
  const u = f.toString().indexOf("."), l = f.toString().slice(u + 1).length;
1329
1329
  return Math.abs(R(o, l) - R(s, l)) % R(f, l) === 0;
1330
1330
  }
1331
- k(x, "isMultipleOf"), i.extend("number", (o, { meta: s }, f) => {
1331
+ v(x, "isMultipleOf"), i.extend("number", (o, { meta: s }, f) => {
1332
1332
  if (typeof o != "number") throw new c(`expected number but got ${o}`, f);
1333
1333
  O(o, s, "number", f);
1334
1334
  const { step: u } = s;
@@ -1371,7 +1371,7 @@ var Te = class be {
1371
1371
  throw new c(`expected ${s} but got ${o}`, f);
1372
1372
  }
1373
1373
  });
1374
- function v(o, s, f, u) {
1374
+ function k(o, s, f, u) {
1375
1375
  try {
1376
1376
  const [l, p] = i.resolve(o[s], f, {
1377
1377
  ...u,
@@ -1383,9 +1383,9 @@ var Te = class be {
1383
1383
  return delete o[s], f.meta.default;
1384
1384
  }
1385
1385
  }
1386
- k(v, "property"), i.extend("array", (o, { inner: s, meta: f }, u) => {
1386
+ v(k, "property"), i.extend("array", (o, { inner: s, meta: f }, u) => {
1387
1387
  if (!Array.isArray(o)) throw new c(`expected array but got ${o}`, u);
1388
- return O(o.length, f, "array length", u, !$(s.meta.default)), [o.map((l, p) => v(o, p, s, u))];
1388
+ return O(o.length, f, "array length", u, !$(s.meta.default)), [o.map((l, p) => k(o, p, s, u))];
1389
1389
  }), i.extend("dict", (o, { inner: s, sKey: f }, u, l) => {
1390
1390
  if (!J(o)) throw new c(`expected object but got ${o}`, u);
1391
1391
  const p = {};
@@ -1393,30 +1393,30 @@ var Te = class be {
1393
1393
  let S;
1394
1394
  try {
1395
1395
  S = i.resolve(m, f, u)[0];
1396
- } catch (we) {
1396
+ } catch (xe) {
1397
1397
  if (l) continue;
1398
- throw we;
1398
+ throw xe;
1399
1399
  }
1400
- p[S] = v(o, m, s, u), o[S] = o[m], m !== S && delete o[m];
1400
+ p[S] = k(o, m, s, u), o[S] = o[m], m !== S && delete o[m];
1401
1401
  }
1402
1402
  return [p];
1403
1403
  }), i.extend("tuple", (o, { list: s }, f, u) => {
1404
1404
  if (!Array.isArray(o)) throw new c(`expected array but got ${o}`, f);
1405
- const l = s.map((p, m) => v(o, m, p, f));
1405
+ const l = s.map((p, m) => k(o, m, p, f));
1406
1406
  return u ? [l] : (l.push(...o.slice(s.length)), [l]);
1407
1407
  });
1408
- function U(o, s) {
1408
+ function F(o, s) {
1409
1409
  for (const f in s)
1410
1410
  f in o || (o[f] = s[f]);
1411
1411
  }
1412
- k(U, "merge"), i.extend("object", (o, { dict: s }, f, u) => {
1412
+ v(F, "merge"), i.extend("object", (o, { dict: s }, f, u) => {
1413
1413
  if (!J(o)) throw new c(`expected object but got ${o}`, f);
1414
1414
  const l = {};
1415
1415
  for (const p in s) {
1416
- const m = v(o, p, s[p], f);
1416
+ const m = k(o, p, s[p], f);
1417
1417
  (!$(m) || p in o) && (l[p] = m);
1418
1418
  }
1419
- return u || U(l, o), [l];
1419
+ return u || F(l, o), [l];
1420
1420
  }), i.extend("union", (o, { list: s, toString: f }, u, l) => {
1421
1421
  for (const p of s)
1422
1422
  try {
@@ -1436,12 +1436,12 @@ var Te = class be {
1436
1436
  if (typeof p != typeof S)
1437
1437
  throw new c(`expected ${f()} but got ${JSON.stringify(o)}`, u);
1438
1438
  if (typeof S == "object")
1439
- U(p ??= {}, S);
1439
+ F(p ??= {}, S);
1440
1440
  else if (p !== S)
1441
1441
  throw new c(`expected ${f()} but got ${JSON.stringify(o)}`, u);
1442
1442
  }
1443
1443
  }
1444
- return !l && J(o) && U(p, o), [p];
1444
+ return !l && J(o) && F(p, o), [p];
1445
1445
  }), i.extend("transform", (o, { inner: s, callback: f, preserve: u }, l) => {
1446
1446
  const [p, m = o] = i.resolve(o, s, l, !0);
1447
1447
  return u ? [f(p)] : [f(p), f(m)];
@@ -1488,44 +1488,52 @@ var Te = class be {
1488
1488
  }
1489
1489
  });
1490
1490
  }
1491
- k(_, "defineMethod"), _("is", ["constructor"], ({ constructor: o }) => typeof o == "function" ? o.name : o), _("any", [], () => "any"), _("never", [], () => "never"), _("const", ["value"], ({ value: o }) => typeof o == "string" ? JSON.stringify(o) : o), _("string", [], () => "string"), _("number", [], () => "number"), _("boolean", [], () => "boolean"), _("bitset", ["bits"], () => "bitset"), _("function", [], () => "function"), _("array", ["inner"], ({ inner: o }) => `${o.toString(!0)}[]`), _("dict", ["inner", "sKey"], ({ inner: o, sKey: s }) => `{ [key: ${s.toString()}]: ${o.toString()} }`), _("tuple", ["list"], ({ list: o }) => `[${o.map((s) => s.toString()).join(", ")}]`), _("object", ["dict"], ({ dict: o }) => Object.keys(o).length === 0 ? "{}" : `{ ${Object.entries(o).map(([s, f]) => `${s}${f.meta.required ? "" : "?"}: ${f.toString()}`).join(", ")} }`), _("union", ["list"], ({ list: o }, s) => {
1491
+ v(_, "defineMethod"), _("is", ["constructor"], ({ constructor: o }) => typeof o == "function" ? o.name : o), _("any", [], () => "any"), _("never", [], () => "never"), _("const", ["value"], ({ value: o }) => typeof o == "string" ? JSON.stringify(o) : o), _("string", [], () => "string"), _("number", [], () => "number"), _("boolean", [], () => "boolean"), _("bitset", ["bits"], () => "bitset"), _("function", [], () => "function"), _("array", ["inner"], ({ inner: o }) => `${o.toString(!0)}[]`), _("dict", ["inner", "sKey"], ({ inner: o, sKey: s }) => `{ [key: ${s.toString()}]: ${o.toString()} }`), _("tuple", ["list"], ({ list: o }) => `[${o.map((s) => s.toString()).join(", ")}]`), _("object", ["dict"], ({ dict: o }) => Object.keys(o).length === 0 ? "{}" : `{ ${Object.entries(o).map(([s, f]) => `${s}${f.meta.required ? "" : "?"}: ${f.toString()}`).join(", ")} }`), _("union", ["list"], ({ list: o }, s) => {
1492
1492
  const f = o.map(({ toString: u }) => u()).join(" | ");
1493
1493
  return s ? `(${f})` : f;
1494
1494
  }), _("intersect", ["list"], ({ list: o }) => `${o.map((s) => s.toString(!0)).join(" & ")}`), _("transform", ["inner", "callback", "preserve"], ({ inner: o }, s) => o.toString(s)), t.exports = i;
1495
1495
  }
1496
1496
  });
1497
- const Xe = Qe();
1498
- var Ze = /* @__PURE__ */ ((e) => (e.ANALYTICS_API_BASE = "https://analytics.ipe.wiki/api/v6", e.ANALYTICS_DASH_URL = "https://analytics.ipe.wiki", e.GITHUB_URL = "https://github.com/inpageedit/inpageedit-next", e.GITHUB_OWNER = "inpageedit", e.GITHUB_REPO = "inpageedit-next", e.HOME_URL = "https://www.ipe.wiki/", e.UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/", e.PLUGIN_REGISTRY_URL = "https://registry.ipe.wiki/registry.v1.json", e.I18N_INDEX_URL = "https://registry.ipe.wiki/i18n/index.json", e.QQ_GROUP_ID = "1026023666", e))(Ze || {});
1499
- function ge(e) {
1497
+ const et = Ze(), ge = (e) => typeof e == "function";
1498
+ async function tt(e) {
1499
+ return ge(e) ? await e() : e;
1500
+ }
1501
+ function rt(e) {
1502
+ return ge(e) ? e() : e;
1503
+ }
1504
+ var Te = /* @__PURE__ */ ((e) => (e.ANALYTICS_API_BASE = "https://analytics.ipe.wiki/api/v6", e.ANALYTICS_DASH_URL = "https://analytics.ipe.wiki", e.GITHUB_URL = "https://github.com/inpageedit/inpageedit-next", e.GITHUB_OWNER = "inpageedit", e.GITHUB_REPO = "inpageedit-next", e.HOME_URL = "https://www.ipe.wiki/", e.UPDATE_LOGS_URL = "https://www.ipe.wiki/changelogs/", e.PLUGIN_REGISTRY_URL = "https://registry.ipe.wiki/registry.v1.json", e.I18N_INDEX_URL = "https://registry.ipe.wiki/i18n/index.json", e.QQ_GROUP_ID = "1026023666", e))(Te || {});
1505
+ function we(e) {
1500
1506
  return e.charAt(0).toLowerCase() + e.slice(1);
1501
1507
  }
1502
- function et(e) {
1503
- return ge(e).replace(/_/g, "-").replace(/.[A-Z]+/g, (t) => t[0] + "-" + t.slice(1).toLowerCase());
1508
+ function nt(e) {
1509
+ return we(e).replace(/_/g, "-").replace(/.[A-Z]+/g, (t) => t[0] + "-" + t.slice(1).toLowerCase());
1504
1510
  }
1505
- function tt(e) {
1506
- return ge(e).replace(/-/g, "_").replace(/.[A-Z]+/g, (t) => t[0] + "_" + t.slice(1).toLowerCase());
1511
+ function it(e) {
1512
+ return we(e).replace(/-/g, "_").replace(/.[A-Z]+/g, (t) => t[0] + "_" + t.slice(1).toLowerCase());
1507
1513
  }
1508
- function rt(e) {
1514
+ function st(e) {
1509
1515
  return function(t) {
1510
1516
  return t.PreferencesSchema = e, t;
1511
1517
  };
1512
1518
  }
1513
1519
  export {
1514
1520
  T as C,
1515
- Ze as E,
1516
- Ve as F,
1521
+ Te as E,
1522
+ He as F,
1517
1523
  K as I,
1518
1524
  ce as M,
1519
- rt as R,
1520
- Xe as S,
1525
+ st as R,
1526
+ et as S,
1521
1527
  de as a,
1522
- Je as b,
1523
- Te as c,
1524
- xe as d,
1525
- qe as e,
1526
- tt as f,
1527
- P as g,
1528
- et as p,
1528
+ Ve as b,
1529
+ Xe as c,
1530
+ ke as d,
1531
+ Je as e,
1532
+ it as f,
1533
+ rt as g,
1534
+ tt as h,
1535
+ P as i,
1536
+ nt as p,
1529
1537
  h as s
1530
1538
  };
1531
- //# sourceMappingURL=Preferences-85Q9FAmb.js.map
1539
+ //# sourceMappingURL=Preferences-BF2fcXrn.js.map