gp-designer 1.0.10 → 1.0.11

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.
@@ -191,7 +191,7 @@ function ei(e) {
191
191
  function at(e) {
192
192
  return e.type === j.Root;
193
193
  }
194
- function Ee(e) {
194
+ function me(e) {
195
195
  return Object.prototype.hasOwnProperty.call(e, "children");
196
196
  }
197
197
  function zt(e, t = !1) {
@@ -350,26 +350,26 @@ function tr(e) {
350
350
  var t;
351
351
  return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = er.get(e)) !== null && t !== void 0 ? t : e;
352
352
  }
353
- var fe;
353
+ var Ee;
354
354
  (function(e) {
355
355
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
356
- })(fe || (fe = {}));
356
+ })(Ee || (Ee = {}));
357
357
  const ar = 32;
358
358
  var Ze;
359
359
  (function(e) {
360
360
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
361
361
  })(Ze || (Ze = {}));
362
362
  function ai(e) {
363
- return e >= fe.ZERO && e <= fe.NINE;
363
+ return e >= Ee.ZERO && e <= Ee.NINE;
364
364
  }
365
365
  function ir(e) {
366
- return e >= fe.UPPER_A && e <= fe.UPPER_F || e >= fe.LOWER_A && e <= fe.LOWER_F;
366
+ return e >= Ee.UPPER_A && e <= Ee.UPPER_F || e >= Ee.LOWER_A && e <= Ee.LOWER_F;
367
367
  }
368
368
  function sr(e) {
369
- return e >= fe.UPPER_A && e <= fe.UPPER_Z || e >= fe.LOWER_A && e <= fe.LOWER_Z || ai(e);
369
+ return e >= Ee.UPPER_A && e <= Ee.UPPER_Z || e >= Ee.LOWER_A && e <= Ee.LOWER_Z || ai(e);
370
370
  }
371
371
  function nr(e) {
372
- return e === fe.EQUALS || sr(e);
372
+ return e === Ee.EQUALS || sr(e);
373
373
  }
374
374
  var he;
375
375
  (function(e) {
@@ -401,7 +401,7 @@ class Ri {
401
401
  write(t, a) {
402
402
  switch (this.state) {
403
403
  case he.EntityStart:
404
- return t.charCodeAt(a) === fe.NUM ? (this.state = he.NumericStart, this.consumed += 1, this.stateNumericStart(t, a + 1)) : (this.state = he.NamedEntity, this.stateNamedEntity(t, a));
404
+ return t.charCodeAt(a) === Ee.NUM ? (this.state = he.NumericStart, this.consumed += 1, this.stateNumericStart(t, a + 1)) : (this.state = he.NamedEntity, this.stateNamedEntity(t, a));
405
405
  case he.NumericStart:
406
406
  return this.stateNumericStart(t, a);
407
407
  case he.NumericDecimal:
@@ -422,7 +422,7 @@ class Ri {
422
422
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
423
423
  */
424
424
  stateNumericStart(t, a) {
425
- return a >= t.length ? -1 : (t.charCodeAt(a) | ar) === fe.LOWER_X ? (this.state = he.NumericHex, this.consumed += 1, this.stateNumericHex(t, a + 1)) : (this.state = he.NumericDecimal, this.stateNumericDecimal(t, a));
425
+ return a >= t.length ? -1 : (t.charCodeAt(a) | ar) === Ee.LOWER_X ? (this.state = he.NumericHex, this.consumed += 1, this.stateNumericHex(t, a + 1)) : (this.state = he.NumericDecimal, this.stateNumericDecimal(t, a));
426
426
  }
427
427
  addToNumericResult(t, a, i, s) {
428
428
  if (a !== i) {
@@ -487,11 +487,11 @@ class Ri {
487
487
  var i;
488
488
  if (this.consumed <= a)
489
489
  return (i = this.errors) === null || i === void 0 || i.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
490
- if (t === fe.SEMI)
490
+ if (t === Ee.SEMI)
491
491
  this.consumed += 1;
492
492
  else if (this.decodeMode === Pe.Strict)
493
493
  return 0;
494
- return this.emitCodePoint(tr(this.result), this.consumed), this.errors && (t !== fe.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
494
+ return this.emitCodePoint(tr(this.result), this.consumed), this.errors && (t !== Ee.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
495
495
  }
496
496
  /**
497
497
  * Parses a named entity.
@@ -513,7 +513,7 @@ class Ri {
513
513
  (u === 0 || // And there should be no invalid characters.
514
514
  nr(r)) ? 0 : this.emitNotTerminatedNamedEntity();
515
515
  if (s = i[this.treeIndex], u = (s & Ze.VALUE_LENGTH) >> 14, u !== 0) {
516
- if (r === fe.SEMI)
516
+ if (r === Ee.SEMI)
517
517
  return this.emitNamedEntityData(this.treeIndex, u, this.consumed + this.excess);
518
518
  this.decodeMode !== Pe.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
519
519
  }
@@ -859,20 +859,20 @@ function rn(e, t) {
859
859
  return Ra(e, t);
860
860
  }
861
861
  function Nr(e, t) {
862
- return Ee(e) ? e.children.map((a) => rn(a, t)).join("") : "";
862
+ return me(e) ? e.children.map((a) => rn(a, t)).join("") : "";
863
863
  }
864
864
  function Ea(e) {
865
865
  return Array.isArray(e) ? e.map(Ea).join("") : k(e) ? e.name === "br" ? `
866
866
  ` : Ea(e.children) : Da(e) ? Ea(e.children) : He(e) ? e.data : "";
867
867
  }
868
868
  function Ot(e) {
869
- return Array.isArray(e) ? e.map(Ot).join("") : Ee(e) && !La(e) ? Ot(e.children) : He(e) ? e.data : "";
869
+ return Array.isArray(e) ? e.map(Ot).join("") : me(e) && !La(e) ? Ot(e.children) : He(e) ? e.data : "";
870
870
  }
871
871
  function Ta(e) {
872
- return Array.isArray(e) ? e.map(Ta).join("") : Ee(e) && (e.type === j.Tag || Da(e)) ? Ta(e.children) : He(e) ? e.data : "";
872
+ return Array.isArray(e) ? e.map(Ta).join("") : me(e) && (e.type === j.Tag || Da(e)) ? Ta(e.children) : He(e) ? e.data : "";
873
873
  }
874
874
  function va(e) {
875
- return Ee(e) ? e.children : [];
875
+ return me(e) ? e.children : [];
876
876
  }
877
877
  function on(e) {
878
878
  return e.parent || null;
@@ -977,7 +977,7 @@ function Mi(e, t, a, i) {
977
977
  const o = u[0][r[0]++];
978
978
  if (e(o) && (s.push(o), --i <= 0))
979
979
  return s;
980
- a && Ee(o) && o.children.length > 0 && (r.unshift(0), u.unshift(o.children));
980
+ a && me(o) && o.children.length > 0 && (r.unshift(0), u.unshift(o.children));
981
981
  }
982
982
  }
983
983
  function vr(e, t) {
@@ -1074,10 +1074,10 @@ function fn(e, t) {
1074
1074
  const a = [], i = [];
1075
1075
  if (e === t)
1076
1076
  return 0;
1077
- let s = Ee(e) ? e : e.parent;
1077
+ let s = me(e) ? e : e.parent;
1078
1078
  for (; s; )
1079
1079
  a.unshift(s), s = s.parent;
1080
- for (s = Ee(t) ? t : t.parent; s; )
1080
+ for (s = me(t) ? t : t.parent; s; )
1081
1081
  i.unshift(s), s = s.parent;
1082
1082
  const u = Math.min(a.length, i.length);
1083
1083
  let r = 0;
@@ -1200,7 +1200,7 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1200
1200
  getSiblings: cn,
1201
1201
  getText: Ea,
1202
1202
  hasAttrib: Ir,
1203
- hasChildren: Ee,
1203
+ hasChildren: me,
1204
1204
  innerText: Ta,
1205
1205
  isCDATA: Da,
1206
1206
  isComment: La,
@@ -1315,7 +1315,7 @@ function eo(e) {
1315
1315
  function to(e) {
1316
1316
  return e.replace(/[A-Z]/g, "-$&").toLowerCase();
1317
1317
  }
1318
- function se(e, t) {
1318
+ function ne(e, t) {
1319
1319
  const a = e.length;
1320
1320
  for (let i = 0; i < a; i++)
1321
1321
  t(e[i], i);
@@ -1354,11 +1354,11 @@ function io(e, t) {
1354
1354
  if (typeof t == "function") {
1355
1355
  if (typeof e != "string")
1356
1356
  throw new Error("Bad combination of arguments.");
1357
- return se(this, (a, i) => {
1357
+ return ne(this, (a, i) => {
1358
1358
  k(a) && Nt(a, e, t.call(a, i, a.attribs[e]));
1359
1359
  });
1360
1360
  }
1361
- return se(this, (a) => {
1361
+ return ne(this, (a) => {
1362
1362
  if (k(a))
1363
1363
  if (typeof e == "object")
1364
1364
  for (const i of Object.keys(e)) {
@@ -1417,11 +1417,11 @@ function so(e, t) {
1417
1417
  if (typeof t == "function") {
1418
1418
  if (typeof e == "object")
1419
1419
  throw new TypeError("Bad combination of arguments.");
1420
- return se(this, (i, s) => {
1420
+ return ne(this, (i, s) => {
1421
1421
  k(i) && Va(i, e, t.call(i, s, ss(i, e, this.options.xmlMode)), this.options.xmlMode);
1422
1422
  });
1423
1423
  }
1424
- return se(this, (i) => {
1424
+ return ne(this, (i) => {
1425
1425
  if (k(i))
1426
1426
  if (typeof e == "object")
1427
1427
  for (const s of Object.keys(e)) {
@@ -1476,7 +1476,7 @@ function ro(e, t) {
1476
1476
  if (!i || !k(i))
1477
1477
  return;
1478
1478
  const s = i;
1479
- return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? no(s) : typeof e == "object" || t !== void 0 ? (se(this, (u) => {
1479
+ return (a = s.data) !== null && a !== void 0 || (s.data = {}), e == null ? no(s) : typeof e == "object" || t !== void 0 ? (ne(this, (u) => {
1480
1480
  k(u) && (typeof e == "object" ? ns(u, e) : ns(u, e, t));
1481
1481
  }), this) : uo(s, e);
1482
1482
  }
@@ -1514,7 +1514,7 @@ function _a(e) {
1514
1514
  function co(e) {
1515
1515
  const t = _a(e);
1516
1516
  for (const a of t)
1517
- se(this, (i) => {
1517
+ ne(this, (i) => {
1518
1518
  k(i) && bn(i, a);
1519
1519
  });
1520
1520
  return this;
@@ -1534,7 +1534,7 @@ function lo(e) {
1534
1534
  }
1535
1535
  function gn(e) {
1536
1536
  if (typeof e == "function")
1537
- return se(this, (i, s) => {
1537
+ return ne(this, (i, s) => {
1538
1538
  if (k(i)) {
1539
1539
  const u = i.attribs.class || "";
1540
1540
  gn.call([i], e.call(i, s, u));
@@ -1562,11 +1562,11 @@ function gn(e) {
1562
1562
  }
1563
1563
  function _n(e) {
1564
1564
  if (typeof e == "function")
1565
- return se(this, (s, u) => {
1565
+ return ne(this, (s, u) => {
1566
1566
  k(s) && _n.call([s], e.call(s, u, s.attribs.class || ""));
1567
1567
  });
1568
1568
  const t = _a(e), a = t.length, i = arguments.length === 0;
1569
- return se(this, (s) => {
1569
+ return ne(this, (s) => {
1570
1570
  if (k(s))
1571
1571
  if (i)
1572
1572
  s.attribs.class = "";
@@ -1583,7 +1583,7 @@ function _n(e) {
1583
1583
  }
1584
1584
  function An(e, t) {
1585
1585
  if (typeof e == "function")
1586
- return se(this, (r, o) => {
1586
+ return ne(this, (r, o) => {
1587
1587
  k(r) && An.call([r], e.call(r, o, r.attribs.class || "", t), t);
1588
1588
  });
1589
1589
  if (!e || typeof e != "string")
@@ -1797,8 +1797,8 @@ function Nn(e, t, a) {
1797
1797
  X = Mt(t.slice(P, a));
1798
1798
  }
1799
1799
  u(0);
1800
- const Y = t.charCodeAt(a) | 32;
1801
- Y === 115 ? (U = !1, u(1)) : Y === 105 && (U = !0, u(1));
1800
+ const F = t.charCodeAt(a) | 32;
1801
+ F === 115 ? (U = !1, u(1)) : F === 105 && (U = !0, u(1));
1802
1802
  }
1803
1803
  if (t.charCodeAt(a) !== 93)
1804
1804
  throw new Error("Attribute selector didn't terminate");
@@ -1883,7 +1883,7 @@ var Aa = {
1883
1883
  return !1;
1884
1884
  }
1885
1885
  };
1886
- const q = /* @__PURE__ */ bo(Aa), Cn = /* @__PURE__ */ new Map([
1886
+ const Y = /* @__PURE__ */ bo(Aa), Cn = /* @__PURE__ */ new Map([
1887
1887
  [R.Universal, 50],
1888
1888
  [R.Tag, 30],
1889
1889
  [R.Attribute, 1],
@@ -1995,7 +1995,7 @@ const Co = {
1995
1995
  element(e, t, a) {
1996
1996
  const { adapter: i } = a, { name: s, value: u } = t;
1997
1997
  if (/\s/.test(u))
1998
- return q.falseFunc;
1998
+ return Y.falseFunc;
1999
1999
  const r = new RegExp(`(?:^|\\s)${os(u)}(?:$|\\s)`, nt(t, a) ? "i" : "");
2000
2000
  return function(c) {
2001
2001
  const h = i.getAttributeValue(c, s);
@@ -2009,7 +2009,7 @@ const Co = {
2009
2009
  const { adapter: i } = a, { name: s } = t;
2010
2010
  let { value: u } = t;
2011
2011
  const r = u.length;
2012
- return r === 0 ? q.falseFunc : nt(t, a) ? (u = u.toLowerCase(), (o) => {
2012
+ return r === 0 ? Y.falseFunc : nt(t, a) ? (u = u.toLowerCase(), (o) => {
2013
2013
  const c = i.getAttributeValue(o, s);
2014
2014
  return c != null && c.length >= r && c.substr(0, r).toLowerCase() === u && e(o);
2015
2015
  }) : (o) => {
@@ -2021,7 +2021,7 @@ const Co = {
2021
2021
  const { adapter: i } = a, { name: s } = t;
2022
2022
  let { value: u } = t;
2023
2023
  const r = -u.length;
2024
- return r === 0 ? q.falseFunc : nt(t, a) ? (u = u.toLowerCase(), (o) => {
2024
+ return r === 0 ? Y.falseFunc : nt(t, a) ? (u = u.toLowerCase(), (o) => {
2025
2025
  var c;
2026
2026
  return ((c = i.getAttributeValue(o, s)) === null || c === void 0 ? void 0 : c.substr(r).toLowerCase()) === u && e(o);
2027
2027
  }) : (o) => {
@@ -2032,7 +2032,7 @@ const Co = {
2032
2032
  any(e, t, a) {
2033
2033
  const { adapter: i } = a, { name: s, value: u } = t;
2034
2034
  if (u === "")
2035
- return q.falseFunc;
2035
+ return Y.falseFunc;
2036
2036
  if (nt(t, a)) {
2037
2037
  const r = new RegExp(os(u), "i");
2038
2038
  return function(c) {
@@ -2081,13 +2081,13 @@ function xo(e) {
2081
2081
  function Oo(e) {
2082
2082
  const t = e[0], a = e[1] - 1;
2083
2083
  if (a < 0 && t <= 0)
2084
- return q.falseFunc;
2084
+ return Y.falseFunc;
2085
2085
  if (t === -1)
2086
2086
  return (u) => u <= a;
2087
2087
  if (t === 0)
2088
2088
  return (u) => u === a;
2089
2089
  if (t === 1)
2090
- return a < 0 ? q.trueFunc : (u) => u >= a;
2090
+ return a < 0 ? Y.trueFunc : (u) => u >= a;
2091
2091
  const i = Math.abs(t), s = (a % i + i) % i;
2092
2092
  return t > 1 ? (u) => u >= a && u % i === s : (u) => u <= a && u % i === s;
2093
2093
  }
@@ -2115,7 +2115,7 @@ const ui = {
2115
2115
  // Location specific methods
2116
2116
  "nth-child"(e, t, { adapter: a, equals: i }) {
2117
2117
  const s = ra(t);
2118
- return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
2118
+ return s === Y.falseFunc ? Y.falseFunc : s === Y.trueFunc ? oa(e, a) : function(r) {
2119
2119
  const o = a.getSiblings(r);
2120
2120
  let c = 0;
2121
2121
  for (let h = 0; h < o.length && !i(r, o[h]); h++)
@@ -2125,7 +2125,7 @@ const ui = {
2125
2125
  },
2126
2126
  "nth-last-child"(e, t, { adapter: a, equals: i }) {
2127
2127
  const s = ra(t);
2128
- return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
2128
+ return s === Y.falseFunc ? Y.falseFunc : s === Y.trueFunc ? oa(e, a) : function(r) {
2129
2129
  const o = a.getSiblings(r);
2130
2130
  let c = 0;
2131
2131
  for (let h = o.length - 1; h >= 0 && !i(r, o[h]); h--)
@@ -2135,7 +2135,7 @@ const ui = {
2135
2135
  },
2136
2136
  "nth-of-type"(e, t, { adapter: a, equals: i }) {
2137
2137
  const s = ra(t);
2138
- return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
2138
+ return s === Y.falseFunc ? Y.falseFunc : s === Y.trueFunc ? oa(e, a) : function(r) {
2139
2139
  const o = a.getSiblings(r);
2140
2140
  let c = 0;
2141
2141
  for (let h = 0; h < o.length; h++) {
@@ -2149,7 +2149,7 @@ const ui = {
2149
2149
  },
2150
2150
  "nth-last-of-type"(e, t, { adapter: a, equals: i }) {
2151
2151
  const s = ra(t);
2152
- return s === q.falseFunc ? q.falseFunc : s === q.trueFunc ? oa(e, a) : function(r) {
2152
+ return s === Y.falseFunc ? Y.falseFunc : s === Y.trueFunc ? oa(e, a) : function(r) {
2153
2153
  const o = a.getSiblings(r);
2154
2154
  let c = 0;
2155
2155
  for (let h = o.length - 1; h >= 0; h--) {
@@ -2179,7 +2179,7 @@ const ui = {
2179
2179
  function $a(e) {
2180
2180
  return function(a, i, { adapter: s }) {
2181
2181
  const u = s[e];
2182
- return typeof u != "function" ? q.falseFunc : function(o) {
2182
+ return typeof u != "function" ? Y.falseFunc : function(o) {
2183
2183
  return u(o) && a(o);
2184
2184
  };
2185
2185
  };
@@ -2276,7 +2276,7 @@ const Do = {
2276
2276
  text: "input:is(:not([type!='']), [type=text])"
2277
2277
  }, Sn = {};
2278
2278
  function Lo(e, t) {
2279
- return e === q.falseFunc ? q.falseFunc : (a) => t.isTag(a) && e(a);
2279
+ return e === Y.falseFunc ? Y.falseFunc : (a) => t.isTag(a) && e(a);
2280
2280
  }
2281
2281
  function xn(e, t) {
2282
2282
  const a = t.getSiblings(e);
@@ -2299,7 +2299,7 @@ function ri(e) {
2299
2299
  }
2300
2300
  const Xa = (e, t, a, i, s) => {
2301
2301
  const u = s(t, ri(a), i);
2302
- return u === q.trueFunc ? e : u === q.falseFunc ? q.falseFunc : (r) => u(r) && e(r);
2302
+ return u === Y.trueFunc ? e : u === Y.falseFunc ? Y.falseFunc : (r) => u(r) && e(r);
2303
2303
  }, Ga = {
2304
2304
  is: Xa,
2305
2305
  /**
@@ -2309,7 +2309,7 @@ const Xa = (e, t, a, i, s) => {
2309
2309
  where: Xa,
2310
2310
  not(e, t, a, i, s) {
2311
2311
  const u = s(t, ri(a), i);
2312
- return u === q.falseFunc ? e : u === q.trueFunc ? q.falseFunc : (r) => !u(r) && e(r);
2312
+ return u === Y.falseFunc ? e : u === Y.trueFunc ? Y.falseFunc : (r) => !u(r) && e(r);
2313
2313
  },
2314
2314
  has(e, t, a, i, s) {
2315
2315
  const { adapter: u } = a, r = ri(a);
@@ -2318,10 +2318,10 @@ const Xa = (e, t, a, i, s) => {
2318
2318
  // Used as a placeholder. Will be replaced with the actual element.
2319
2319
  [Sn]
2320
2320
  ) : void 0, c = s(t, r, o);
2321
- if (c === q.falseFunc)
2322
- return q.falseFunc;
2321
+ if (c === Y.falseFunc)
2322
+ return Y.falseFunc;
2323
2323
  const h = Lo(c, u);
2324
- if (o && c !== q.trueFunc) {
2324
+ if (o && c !== Y.trueFunc) {
2325
2325
  const { shouldTestNextSiblings: f = !1 } = c;
2326
2326
  return (m) => {
2327
2327
  if (!e(m))
@@ -2496,15 +2496,15 @@ function Dn(e, t, a) {
2496
2496
  h.type !== R.Pseudo || h.name !== "scope" || (s && f.type === R.Descendant ? c[1] = Mo : (f.type === R.Adjacent || f.type === R.Sibling) && (r = !0));
2497
2497
  }
2498
2498
  return wo(c, t, u);
2499
- }).reduce(Bo, q.falseFunc);
2499
+ }).reduce(Bo, Y.falseFunc);
2500
2500
  return o.shouldTestNextSiblings = r, o;
2501
2501
  }
2502
2502
  function wo(e, t, a) {
2503
2503
  var i;
2504
- return e.reduce((s, u) => s === q.falseFunc ? q.falseFunc : vo(s, u, t, a, Dn), (i = t.rootFunc) !== null && i !== void 0 ? i : q.trueFunc);
2504
+ return e.reduce((s, u) => s === Y.falseFunc ? Y.falseFunc : vo(s, u, t, a, Dn), (i = t.rootFunc) !== null && i !== void 0 ? i : Y.trueFunc);
2505
2505
  }
2506
2506
  function Bo(e, t) {
2507
- return t === q.falseFunc || e === q.trueFunc ? e : e === q.falseFunc || t === q.trueFunc ? t : function(i) {
2507
+ return t === Y.falseFunc || e === Y.trueFunc ? e : e === Y.falseFunc || t === Y.trueFunc ? t : function(i) {
2508
2508
  return e(i) || t(i);
2509
2509
  };
2510
2510
  }
@@ -2770,7 +2770,7 @@ function Yi(e, ...t) {
2770
2770
  let a = null;
2771
2771
  const i = Fi((s, u) => {
2772
2772
  const r = [];
2773
- return se(u, (o) => {
2773
+ return ne(u, (o) => {
2774
2774
  for (let c; (c = s(o)) && !(a != null && a(c, r.length)); o = c)
2775
2775
  r.push(c);
2776
2776
  }), r;
@@ -2799,7 +2799,7 @@ function tc(e) {
2799
2799
  xmlMode: this.options.xmlMode,
2800
2800
  root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
2801
2801
  }, s = typeof e == "string" ? (u) => vn(u, e, i) : sa(e);
2802
- return se(this, (u) => {
2802
+ return ne(this, (u) => {
2803
2803
  for (u && !at(u) && !k(u) && (u = u.parent); u && k(u); ) {
2804
2804
  if (s(u, 0)) {
2805
2805
  a.includes(u) || a.push(u);
@@ -2821,7 +2821,7 @@ const ac = Hi((e) => vi(e)), ic = ia((e) => {
2821
2821
  return t;
2822
2822
  }, vt), rc = Yi((e) => yi(e), vt), oc = ia((e) => cn(e).filter((t) => k(t) && t !== e), Rt), cc = ia((e) => va(e).filter(k), vt);
2823
2823
  function lc() {
2824
- const e = this.toArray().reduce((t, a) => Ee(a) ? t.concat(a.children) : t, []);
2824
+ const e = this.toArray().reduce((t, a) => me(a) ? t.concat(a.children) : t, []);
2825
2825
  return this._make(e);
2826
2826
  }
2827
2827
  function hc(e) {
@@ -2989,8 +2989,8 @@ function Lc(e, t) {
2989
2989
  function Bn(e) {
2990
2990
  return function(...t) {
2991
2991
  const a = this.length - 1;
2992
- return se(this, (i, s) => {
2993
- if (!Ee(i))
2992
+ return ne(this, (i, s) => {
2993
+ if (!me(i))
2994
2994
  return;
2995
2995
  const u = typeof t[0] == "function" ? t[0].call(i, s, this._render(i.children)) : t, r = this._makeDomArray(u, s < a);
2996
2996
  e(r, i.children, i);
@@ -3030,7 +3030,7 @@ function Un(e) {
3030
3030
  const a = this.length - 1, i = this.parents().last();
3031
3031
  for (let s = 0; s < this.length; s++) {
3032
3032
  const u = this[s], r = typeof t == "function" ? t.call(u, s, u) : typeof t == "string" && !si(t) ? i.find(t).clone() : t, [o] = this._makeDomArray(r, s < a);
3033
- if (!o || !Ee(o))
3033
+ if (!o || !me(o))
3034
3034
  continue;
3035
3035
  let c = o, h = 0;
3036
3036
  for (; h < c.children.length; ) {
@@ -3049,7 +3049,7 @@ const Pc = Un((e, t, a) => {
3049
3049
  const s = i.children, u = s.indexOf(e);
3050
3050
  ft([e], t), it(s, u, 0, a, i);
3051
3051
  }), kc = Un((e, t, a) => {
3052
- Ee(e) && (ft(e.children, t), ft(a, e));
3052
+ me(e) && (ft(e.children, t), ft(a, e));
3053
3053
  });
3054
3054
  function wc(e) {
3055
3055
  return this.parent(e).not("body").each((t, a) => {
@@ -3074,8 +3074,8 @@ function Bc(e) {
3074
3074
  }
3075
3075
  function Uc(...e) {
3076
3076
  const t = this.length - 1;
3077
- return se(this, (a, i) => {
3078
- if (!Ee(a) || !a.parent)
3077
+ return ne(this, (a, i) => {
3078
+ if (!me(a) || !a.parent)
3079
3079
  return;
3080
3080
  const s = a.parent.children, u = s.indexOf(a);
3081
3081
  if (u < 0)
@@ -3098,8 +3098,8 @@ function Fc(e) {
3098
3098
  }
3099
3099
  function Hc(...e) {
3100
3100
  const t = this.length - 1;
3101
- return se(this, (a, i) => {
3102
- if (!Ee(a) || !a.parent)
3101
+ return ne(this, (a, i) => {
3102
+ if (!me(a) || !a.parent)
3103
3103
  return;
3104
3104
  const s = a.parent.children, u = s.indexOf(a);
3105
3105
  if (u < 0)
@@ -3112,7 +3112,7 @@ function Yc(e) {
3112
3112
  const t = this._make(e);
3113
3113
  this.remove();
3114
3114
  const a = [];
3115
- return se(t, (i) => {
3115
+ return ne(t, (i) => {
3116
3116
  const s = this.clone().toArray(), { parent: u } = i;
3117
3117
  if (!u)
3118
3118
  return;
@@ -3122,12 +3122,12 @@ function Yc(e) {
3122
3122
  }
3123
3123
  function qc(e) {
3124
3124
  const t = e ? this.filter(e) : this;
3125
- return se(t, (a) => {
3125
+ return ne(t, (a) => {
3126
3126
  mt(a), a.prev = a.next = a.parent = null;
3127
3127
  }), this;
3128
3128
  }
3129
3129
  function Vc(e) {
3130
- return se(this, (t, a) => {
3130
+ return ne(this, (t, a) => {
3131
3131
  const { parent: i } = t;
3132
3132
  if (!i)
3133
3133
  return;
@@ -3138,8 +3138,8 @@ function Vc(e) {
3138
3138
  });
3139
3139
  }
3140
3140
  function Wc() {
3141
- return se(this, (e) => {
3142
- if (Ee(e)) {
3141
+ return ne(this, (e) => {
3142
+ if (me(e)) {
3143
3143
  for (const t of e.children)
3144
3144
  t.next = t.prev = t.parent = null;
3145
3145
  e.children.length = 0;
@@ -3149,10 +3149,10 @@ function Wc() {
3149
3149
  function $c(e) {
3150
3150
  if (e === void 0) {
3151
3151
  const t = this[0];
3152
- return !t || !Ee(t) ? null : this._render(t.children);
3152
+ return !t || !me(t) ? null : this._render(t.children);
3153
3153
  }
3154
- return se(this, (t) => {
3155
- if (!Ee(t))
3154
+ return ne(this, (t) => {
3155
+ if (!me(t))
3156
3156
  return;
3157
3157
  for (const i of t.children)
3158
3158
  i.next = i.prev = i.parent = null;
@@ -3164,8 +3164,8 @@ function Xc() {
3164
3164
  return this._render(this);
3165
3165
  }
3166
3166
  function Gc(e) {
3167
- return e === void 0 ? Kt(this) : typeof e == "function" ? se(this, (t, a) => this._make(t).text(e.call(t, a, Kt([t])))) : se(this, (t) => {
3168
- if (!Ee(t))
3167
+ return e === void 0 ? Kt(this) : typeof e == "function" ? ne(this, (t, a) => this._make(t).text(e.call(t, a, Kt([t])))) : ne(this, (t) => {
3168
+ if (!me(t))
3169
3169
  return;
3170
3170
  for (const i of t.children)
3171
3171
  i.next = i.prev = i.parent = null;
@@ -3205,7 +3205,7 @@ const jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3205
3205
  function zc(e, t) {
3206
3206
  if (e != null && t != null || // When `prop` is a "plain" object
3207
3207
  typeof e == "object" && !Array.isArray(e))
3208
- return se(this, (a, i) => {
3208
+ return ne(this, (a, i) => {
3209
3209
  k(a) && Fn(a, e, t, i);
3210
3210
  });
3211
3211
  if (this.length !== 0)
@@ -3372,7 +3372,7 @@ function rl(e, t) {
3372
3372
  if (typeof f != "string")
3373
3373
  throw new TypeError("Unexpected type of selector");
3374
3374
  let $ = f;
3375
- const Y = m ? (
3375
+ const F = m ? (
3376
3376
  // If we don't have a context, maybe we have a root, from loading
3377
3377
  typeof m == "string" ? si(m) ? (
3378
3378
  // $('li', '<ul>...</ul>')
@@ -3388,7 +3388,7 @@ function rl(e, t) {
3388
3388
  new c(Array.isArray(m) ? m : [m], M, C)
3389
3389
  )
3390
3390
  ) : M;
3391
- return Y ? Y.find($) : U;
3391
+ return F ? F.find($) : U;
3392
3392
  }
3393
3393
  return Object.assign(h, Jr, {
3394
3394
  load: a,
@@ -3440,7 +3440,7 @@ const cl = /* @__PURE__ */ new Set([
3440
3440
  1048575,
3441
3441
  1114110,
3442
3442
  1114111
3443
- ]), J = "�";
3443
+ ]), ee = "�";
3444
3444
  var l;
3445
3445
  (function(e) {
3446
3446
  e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z";
@@ -4407,7 +4407,7 @@ let Al = class {
4407
4407
  break;
4408
4408
  }
4409
4409
  case l.NULL: {
4410
- this._err(b.unexpectedNullCharacter), this._emitChars(J);
4410
+ this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4411
4411
  break;
4412
4412
  }
4413
4413
  case l.EOF: {
@@ -4427,7 +4427,7 @@ let Al = class {
4427
4427
  break;
4428
4428
  }
4429
4429
  case l.NULL: {
4430
- this._err(b.unexpectedNullCharacter), this._emitChars(J);
4430
+ this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4431
4431
  break;
4432
4432
  }
4433
4433
  case l.EOF: {
@@ -4447,7 +4447,7 @@ let Al = class {
4447
4447
  break;
4448
4448
  }
4449
4449
  case l.NULL: {
4450
- this._err(b.unexpectedNullCharacter), this._emitChars(J);
4450
+ this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4451
4451
  break;
4452
4452
  }
4453
4453
  case l.EOF: {
@@ -4463,7 +4463,7 @@ let Al = class {
4463
4463
  _statePlaintext(t) {
4464
4464
  switch (t) {
4465
4465
  case l.NULL: {
4466
- this._err(b.unexpectedNullCharacter), this._emitChars(J);
4466
+ this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4467
4467
  break;
4468
4468
  }
4469
4469
  case l.EOF: {
@@ -4541,7 +4541,7 @@ let Al = class {
4541
4541
  break;
4542
4542
  }
4543
4543
  case l.NULL: {
4544
- this._err(b.unexpectedNullCharacter), a.tagName += J;
4544
+ this._err(b.unexpectedNullCharacter), a.tagName += ee;
4545
4545
  break;
4546
4546
  }
4547
4547
  case l.EOF: {
@@ -4650,7 +4650,7 @@ let Al = class {
4650
4650
  break;
4651
4651
  }
4652
4652
  case l.NULL: {
4653
- this._err(b.unexpectedNullCharacter), this._emitChars(J);
4653
+ this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4654
4654
  break;
4655
4655
  }
4656
4656
  case l.EOF: {
@@ -4674,7 +4674,7 @@ let Al = class {
4674
4674
  break;
4675
4675
  }
4676
4676
  case l.NULL: {
4677
- this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(J);
4677
+ this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(ee);
4678
4678
  break;
4679
4679
  }
4680
4680
  case l.EOF: {
@@ -4702,7 +4702,7 @@ let Al = class {
4702
4702
  break;
4703
4703
  }
4704
4704
  case l.NULL: {
4705
- this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(J);
4705
+ this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_ESCAPED, this._emitChars(ee);
4706
4706
  break;
4707
4707
  }
4708
4708
  case l.EOF: {
@@ -4751,7 +4751,7 @@ let Al = class {
4751
4751
  break;
4752
4752
  }
4753
4753
  case l.NULL: {
4754
- this._err(b.unexpectedNullCharacter), this._emitChars(J);
4754
+ this._err(b.unexpectedNullCharacter), this._emitChars(ee);
4755
4755
  break;
4756
4756
  }
4757
4757
  case l.EOF: {
@@ -4775,7 +4775,7 @@ let Al = class {
4775
4775
  break;
4776
4776
  }
4777
4777
  case l.NULL: {
4778
- this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(J);
4778
+ this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(ee);
4779
4779
  break;
4780
4780
  }
4781
4781
  case l.EOF: {
@@ -4803,7 +4803,7 @@ let Al = class {
4803
4803
  break;
4804
4804
  }
4805
4805
  case l.NULL: {
4806
- this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(J);
4806
+ this._err(b.unexpectedNullCharacter), this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(ee);
4807
4807
  break;
4808
4808
  }
4809
4809
  case l.EOF: {
@@ -4877,7 +4877,7 @@ let Al = class {
4877
4877
  break;
4878
4878
  }
4879
4879
  case l.NULL: {
4880
- this._err(b.unexpectedNullCharacter), this.currentAttr.name += J;
4880
+ this._err(b.unexpectedNullCharacter), this.currentAttr.name += ee;
4881
4881
  break;
4882
4882
  }
4883
4883
  default:
@@ -4951,7 +4951,7 @@ let Al = class {
4951
4951
  break;
4952
4952
  }
4953
4953
  case l.NULL: {
4954
- this._err(b.unexpectedNullCharacter), this.currentAttr.value += J;
4954
+ this._err(b.unexpectedNullCharacter), this.currentAttr.value += ee;
4955
4955
  break;
4956
4956
  }
4957
4957
  case l.EOF: {
@@ -4975,7 +4975,7 @@ let Al = class {
4975
4975
  break;
4976
4976
  }
4977
4977
  case l.NULL: {
4978
- this._err(b.unexpectedNullCharacter), this.currentAttr.value += J;
4978
+ this._err(b.unexpectedNullCharacter), this.currentAttr.value += ee;
4979
4979
  break;
4980
4980
  }
4981
4981
  case l.EOF: {
@@ -5006,7 +5006,7 @@ let Al = class {
5006
5006
  break;
5007
5007
  }
5008
5008
  case l.NULL: {
5009
- this._err(b.unexpectedNullCharacter), this.currentAttr.value += J;
5009
+ this._err(b.unexpectedNullCharacter), this.currentAttr.value += ee;
5010
5010
  break;
5011
5011
  }
5012
5012
  case l.QUOTATION_MARK:
@@ -5083,7 +5083,7 @@ let Al = class {
5083
5083
  break;
5084
5084
  }
5085
5085
  case l.NULL: {
5086
- this._err(b.unexpectedNullCharacter), a.data += J;
5086
+ this._err(b.unexpectedNullCharacter), a.data += ee;
5087
5087
  break;
5088
5088
  }
5089
5089
  default:
@@ -5148,7 +5148,7 @@ let Al = class {
5148
5148
  break;
5149
5149
  }
5150
5150
  case l.NULL: {
5151
- this._err(b.unexpectedNullCharacter), a.data += J;
5151
+ this._err(b.unexpectedNullCharacter), a.data += ee;
5152
5152
  break;
5153
5153
  }
5154
5154
  case l.EOF: {
@@ -5292,7 +5292,7 @@ let Al = class {
5292
5292
  case l.FORM_FEED:
5293
5293
  break;
5294
5294
  case l.NULL: {
5295
- this._err(b.unexpectedNullCharacter), this._createDoctypeToken(J), this.state = d.DOCTYPE_NAME;
5295
+ this._err(b.unexpectedNullCharacter), this._createDoctypeToken(ee), this.state = d.DOCTYPE_NAME;
5296
5296
  break;
5297
5297
  }
5298
5298
  case l.GREATER_THAN_SIGN: {
@@ -5328,7 +5328,7 @@ let Al = class {
5328
5328
  break;
5329
5329
  }
5330
5330
  case l.NULL: {
5331
- this._err(b.unexpectedNullCharacter), a.name += J;
5331
+ this._err(b.unexpectedNullCharacter), a.name += ee;
5332
5332
  break;
5333
5333
  }
5334
5334
  case l.EOF: {
@@ -5433,7 +5433,7 @@ let Al = class {
5433
5433
  break;
5434
5434
  }
5435
5435
  case l.NULL: {
5436
- this._err(b.unexpectedNullCharacter), a.publicId += J;
5436
+ this._err(b.unexpectedNullCharacter), a.publicId += ee;
5437
5437
  break;
5438
5438
  }
5439
5439
  case l.GREATER_THAN_SIGN: {
@@ -5458,7 +5458,7 @@ let Al = class {
5458
5458
  break;
5459
5459
  }
5460
5460
  case l.NULL: {
5461
- this._err(b.unexpectedNullCharacter), a.publicId += J;
5461
+ this._err(b.unexpectedNullCharacter), a.publicId += ee;
5462
5462
  break;
5463
5463
  }
5464
5464
  case l.GREATER_THAN_SIGN: {
@@ -5607,7 +5607,7 @@ let Al = class {
5607
5607
  break;
5608
5608
  }
5609
5609
  case l.NULL: {
5610
- this._err(b.unexpectedNullCharacter), a.systemId += J;
5610
+ this._err(b.unexpectedNullCharacter), a.systemId += ee;
5611
5611
  break;
5612
5612
  }
5613
5613
  case l.GREATER_THAN_SIGN: {
@@ -5632,7 +5632,7 @@ let Al = class {
5632
5632
  break;
5633
5633
  }
5634
5634
  case l.NULL: {
5635
- this._err(b.unexpectedNullCharacter), a.systemId += J;
5635
+ this._err(b.unexpectedNullCharacter), a.systemId += ee;
5636
5636
  break;
5637
5637
  }
5638
5638
  case l.GREATER_THAN_SIGN: {
@@ -8732,7 +8732,7 @@ function Sh(e, t) {
8732
8732
  }
8733
8733
  }
8734
8734
  function xh(e, t) {
8735
- t.chars = J, e._insertCharacters(t);
8735
+ t.chars = ee, e._insertCharacters(t);
8736
8736
  }
8737
8737
  function Oh(e, t) {
8738
8738
  e._insertCharacters(t), e.framesetOk = !1;
@@ -9031,7 +9031,7 @@ var Fe;
9031
9031
  (function(e) {
9032
9032
  e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
9033
9033
  })(Fe || (Fe = {}));
9034
- const me = {
9034
+ const Te = {
9035
9035
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
9036
9036
  // CDATA[
9037
9037
  CdataEnd: new Uint8Array([93, 93, 62]),
@@ -9110,10 +9110,10 @@ class Gh {
9110
9110
  }
9111
9111
  this.sequenceIndex = 0;
9112
9112
  }
9113
- (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === me.TitleEnd ? this.decodeEntities && t === v.Amp && this.startEntity() : this.fastForwardTo(v.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === v.Lt);
9113
+ (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === Te.TitleEnd ? this.decodeEntities && t === v.Amp && this.startEntity() : this.fastForwardTo(v.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === v.Lt);
9114
9114
  }
9115
9115
  stateCDATASequence(t) {
9116
- t === me.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === me.Cdata.length && (this.state = N.InCommentLike, this.currentSequence = me.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = N.InDeclaration, this.stateInDeclaration(t));
9116
+ t === Te.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === Te.Cdata.length && (this.state = N.InCommentLike, this.currentSequence = Te.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = N.InDeclaration, this.stateInDeclaration(t));
9117
9117
  }
9118
9118
  /**
9119
9119
  * When we wait for one specific character, we can speed things up
@@ -9136,7 +9136,7 @@ class Gh {
9136
9136
  * - All characters but the start character of the sequence can be skipped.
9137
9137
  */
9138
9138
  stateInCommentLike(t) {
9139
- t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === me.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = N.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
9139
+ t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === Te.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = N.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
9140
9140
  }
9141
9141
  /**
9142
9142
  * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
@@ -9157,7 +9157,7 @@ class Gh {
9157
9157
  this.state = N.InProcessingInstruction, this.sectionStart = this.index + 1;
9158
9158
  else if (this.isTagStartChar(t)) {
9159
9159
  const a = t | 32;
9160
- this.sectionStart = this.index, this.xmlMode ? this.state = N.InTagName : a === me.ScriptEnd[2] ? this.state = N.BeforeSpecialS : a === me.TitleEnd[2] ? this.state = N.BeforeSpecialT : this.state = N.InTagName;
9160
+ this.sectionStart = this.index, this.xmlMode ? this.state = N.InTagName : a === Te.ScriptEnd[2] ? this.state = N.BeforeSpecialS : a === Te.TitleEnd[2] ? this.state = N.BeforeSpecialT : this.state = N.InTagName;
9161
9161
  } else t === v.Slash ? this.state = N.BeforeClosingTagName : (this.state = N.Text, this.stateText(t));
9162
9162
  }
9163
9163
  stateInTagName(t) {
@@ -9209,18 +9209,18 @@ class Gh {
9209
9209
  (t === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = N.Text, this.sectionStart = this.index + 1);
9210
9210
  }
9211
9211
  stateBeforeComment(t) {
9212
- t === v.Dash ? (this.state = N.InCommentLike, this.currentSequence = me.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = N.InDeclaration;
9212
+ t === v.Dash ? (this.state = N.InCommentLike, this.currentSequence = Te.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = N.InDeclaration;
9213
9213
  }
9214
9214
  stateInSpecialComment(t) {
9215
9215
  (t === v.Gt || this.fastForwardTo(v.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = N.Text, this.sectionStart = this.index + 1);
9216
9216
  }
9217
9217
  stateBeforeSpecialS(t) {
9218
9218
  const a = t | 32;
9219
- a === me.ScriptEnd[3] ? this.startSpecial(me.ScriptEnd, 4) : a === me.StyleEnd[3] ? this.startSpecial(me.StyleEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9219
+ a === Te.ScriptEnd[3] ? this.startSpecial(Te.ScriptEnd, 4) : a === Te.StyleEnd[3] ? this.startSpecial(Te.StyleEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9220
9220
  }
9221
9221
  stateBeforeSpecialT(t) {
9222
9222
  const a = t | 32;
9223
- a === me.TitleEnd[3] ? this.startSpecial(me.TitleEnd, 4) : a === me.TextareaEnd[3] ? this.startSpecial(me.TextareaEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9223
+ a === Te.TitleEnd[3] ? this.startSpecial(Te.TitleEnd, 4) : a === Te.TextareaEnd[3] ? this.startSpecial(Te.TextareaEnd, 4) : (this.state = N.InTagName, this.stateInTagName(t));
9224
9224
  }
9225
9225
  startEntity() {
9226
9226
  this.baseState = this.state, this.state = N.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? Pe.Strict : this.baseState === N.Text || this.baseState === N.InSpecialTag ? Pe.Legacy : Pe.Attribute);
@@ -9362,7 +9362,7 @@ class Gh {
9362
9362
  /** Handle any trailing data. */
9363
9363
  handleTrailingData() {
9364
9364
  const t = this.buffer.length + this.offset;
9365
- this.sectionStart >= t || (this.state === N.InCommentLike ? this.currentSequence === me.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === N.InTagName || this.state === N.BeforeAttributeName || this.state === N.BeforeAttributeValue || this.state === N.AfterAttributeName || this.state === N.InAttributeName || this.state === N.InAttributeValueSq || this.state === N.InAttributeValueDq || this.state === N.InAttributeValueNq || this.state === N.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
9365
+ this.sectionStart >= t || (this.state === N.InCommentLike ? this.currentSequence === Te.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === N.InTagName || this.state === N.BeforeAttributeName || this.state === N.BeforeAttributeValue || this.state === N.AfterAttributeName || this.state === N.InAttributeName || this.state === N.InAttributeValueSq || this.state === N.InAttributeValueDq || this.state === N.InAttributeValueNq || this.state === N.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
9366
9366
  }
9367
9367
  emitCodePoint(t, a) {
9368
9368
  this.baseState !== N.Text && this.baseState !== N.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + a, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + a, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
@@ -9688,7 +9688,7 @@ function Zh(e, t) {
9688
9688
  return new Kh(a, t).end(e), a.root;
9689
9689
  }
9690
9690
  const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), vs = rl(Jh, (e, t) => t._useHtmlParser2 ? Ra(e, t) : $h(e));
9691
- var Te = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Image = 2] = "Image", e[e.Video = 3] = "Video", e[e.Icon = 4] = "Icon", e[e.Link = 5] = "Link", e[e.Block = 10] = "Block", e))(Te || {});
9691
+ var fe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Image = 2] = "Image", e[e.Video = 3] = "Video", e[e.Icon = 4] = "Icon", e[e.Link = 5] = "Link", e[e.Block = 10] = "Block", e))(fe || {});
9692
9692
  const ed = Ge({
9693
9693
  name: "CustomIcon",
9694
9694
  props: {
@@ -9717,7 +9717,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
9717
9717
  key: 0,
9718
9718
  contenteditable: "false",
9719
9719
  class: /* @__PURE__ */ Ci(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])
9720
- }, sd = { class: "flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden" }, nd = { class: "flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]" }, ud = { class: "p-8 items-center justify-center flex flex-wrap h-[500px] overflow-y-auto" }, rd = /* @__PURE__ */ Ge({
9720
+ }, sd = { class: "flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden" }, nd = { class: "flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]" }, ud = { class: "p-8 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, rd = /* @__PURE__ */ Ge({
9721
9721
  __name: "IconModal",
9722
9722
  props: {
9723
9723
  // 图标库
@@ -9929,7 +9929,7 @@ function Td() {
9929
9929
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
9930
9930
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
9931
9931
  }
9932
- var Ha = typeof window < "u" && typeof window.document < "u", qe = Ha ? window : {}, Gi = Ha && qe.document.documentElement ? "ontouchstart" in qe.document.documentElement : !1, Qi = Ha ? "PointerEvent" in qe : !1, ee = "cropper", ji = "all", gu = "crop", _u = "move", Au = "zoom", ut = "e", rt = "w", gt = "s", Qe = "n", wt = "ne", Bt = "nw", Ut = "se", Ft = "sw", mi = "".concat(ee, "-crop"), ks = "".concat(ee, "-disabled"), xe = "".concat(ee, "-hidden"), ws = "".concat(ee, "-hide"), pd = "".concat(ee, "-invisible"), Oa = "".concat(ee, "-modal"), Ti = "".concat(ee, "-move"), ta = "".concat(ee, "Action"), ha = "".concat(ee, "Preview"), zi = "crop", Nu = "move", Cu = "none", pi = "crop", bi = "cropend", gi = "cropmove", _i = "cropstart", Bs = "dblclick", bd = Gi ? "touchstart" : "mousedown", gd = Gi ? "touchmove" : "mousemove", _d = Gi ? "touchend touchcancel" : "mouseup", Us = Qi ? "pointerdown" : bd, Fs = Qi ? "pointermove" : gd, Hs = Qi ? "pointerup pointercancel" : _d, Ys = "ready", qs = "resize", Vs = "wheel", Ai = "zoom", Ws = "image/jpeg", Ad = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Nd = /^data:/, Cd = /^data:image\/jpeg;base64,/, Id = /^img|canvas$/i, Iu = 200, Su = 100, $s = {
9932
+ var Ha = typeof window < "u" && typeof window.document < "u", qe = Ha ? window : {}, Gi = Ha && qe.document.documentElement ? "ontouchstart" in qe.document.documentElement : !1, Qi = Ha ? "PointerEvent" in qe : !1, te = "cropper", ji = "all", gu = "crop", _u = "move", Au = "zoom", ut = "e", rt = "w", gt = "s", Qe = "n", wt = "ne", Bt = "nw", Ut = "se", Ft = "sw", mi = "".concat(te, "-crop"), ks = "".concat(te, "-disabled"), xe = "".concat(te, "-hidden"), ws = "".concat(te, "-hide"), pd = "".concat(te, "-invisible"), Oa = "".concat(te, "-modal"), Ti = "".concat(te, "-move"), ta = "".concat(te, "Action"), ha = "".concat(te, "Preview"), zi = "crop", Nu = "move", Cu = "none", pi = "crop", bi = "cropend", gi = "cropmove", _i = "cropstart", Bs = "dblclick", bd = Gi ? "touchstart" : "mousedown", gd = Gi ? "touchmove" : "mousemove", _d = Gi ? "touchend touchcancel" : "mouseup", Us = Qi ? "pointerdown" : bd, Fs = Qi ? "pointermove" : gd, Hs = Qi ? "pointerup pointercancel" : _d, Ys = "ready", qs = "resize", Vs = "wheel", Ai = "zoom", Ws = "image/jpeg", Ad = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Nd = /^data:/, Cd = /^data:image\/jpeg;base64,/, Id = /^img|canvas$/i, Iu = 200, Su = 100, $s = {
9933
9933
  // Define the view mode of the cropper
9934
9934
  viewMode: 0,
9935
9935
  // 0, 1, 2, 3
@@ -10038,7 +10038,7 @@ function oe(e, t) {
10038
10038
  t.call(e, e[a], a, e);
10039
10039
  })), e;
10040
10040
  }
10041
- var te = Object.assign || function(t) {
10041
+ var ae = Object.assign || function(t) {
10042
10042
  for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
10043
10043
  i[s - 1] = arguments[s];
10044
10044
  return Et(t) && i.length > 0 && i.forEach(function(u) {
@@ -10266,7 +10266,7 @@ function Bd(e) {
10266
10266
  };
10267
10267
  }
10268
10268
  function Ud(e, t, a, i) {
10269
- var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, Y = i.imageSmoothingQuality, P = Y === void 0 ? "low" : Y, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, ce = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Ne = be === void 0 ? 0 : be, Re = i.minHeight, ge = Re === void 0 ? 0 : Re, _e = document.createElement("canvas"), ae = _e.getContext("2d"), ve = tt({
10269
+ var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, C = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = i.imageSmoothingQuality, P = F === void 0 ? "low" : F, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, ce = Q === void 0 ? 1 / 0 : Q, be = i.minWidth, Ne = be === void 0 ? 0 : be, Re = i.minHeight, ge = Re === void 0 ? 0 : Re, _e = document.createElement("canvas"), ie = _e.getContext("2d"), ve = tt({
10270
10270
  aspectRatio: A,
10271
10271
  width: w,
10272
10272
  height: ce
@@ -10274,18 +10274,18 @@ function Ud(e, t, a, i) {
10274
10274
  aspectRatio: A,
10275
10275
  width: Ne,
10276
10276
  height: ge
10277
- }, "cover"), y = Math.min(ve.width, Math.max(x.width, C)), D = Math.min(ve.height, Math.max(x.height, L)), O = tt({
10277
+ }, "cover"), y = Math.min(ve.width, Math.max(x.width, C)), O = Math.min(ve.height, Math.max(x.height, L)), D = tt({
10278
10278
  aspectRatio: s,
10279
10279
  width: w,
10280
10280
  height: ce
10281
- }), F = tt({
10281
+ }), H = tt({
10282
10282
  aspectRatio: s,
10283
10283
  width: Ne,
10284
10284
  height: ge
10285
- }, "cover"), H = Math.min(O.width, Math.max(F.width, u)), ie = Math.min(O.height, Math.max(F.height, r)), ne = [-H / 2, -ie / 2, H, ie];
10286
- return _e.width = Ct(y), _e.height = Ct(D), ae.fillStyle = X, ae.fillRect(0, 0, y, D), ae.save(), ae.translate(y / 2, D / 2), ae.rotate(c * Math.PI / 180), ae.scale(f, T), ae.imageSmoothingEnabled = $, ae.imageSmoothingQuality = P, ae.drawImage.apply(ae, [e].concat(bu(ne.map(function(ue) {
10285
+ }, "cover"), q = Math.min(D.width, Math.max(H.width, u)), J = Math.min(D.height, Math.max(H.height, r)), se = [-q / 2, -J / 2, q, J];
10286
+ return _e.width = Ct(y), _e.height = Ct(O), ie.fillStyle = X, ie.fillRect(0, 0, y, O), ie.save(), ie.translate(y / 2, O / 2), ie.rotate(c * Math.PI / 180), ie.scale(f, T), ie.imageSmoothingEnabled = $, ie.imageSmoothingQuality = P, ie.drawImage.apply(ie, [e].concat(bu(se.map(function(ue) {
10287
10287
  return Math.floor(Ct(ue));
10288
- })))), ae.restore(), _e;
10288
+ })))), ie.restore(), _e;
10289
10289
  }
10290
10290
  var Ru = String.fromCharCode;
10291
10291
  function Fd(e, t, a) {
@@ -10400,7 +10400,7 @@ var $d = {
10400
10400
  width: c,
10401
10401
  height: h
10402
10402
  };
10403
- this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = te({}, f);
10403
+ this.canvasData = f, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), f.width = Math.min(Math.max(f.width, f.minWidth), f.maxWidth), f.height = Math.min(Math.max(f.height, f.minHeight), f.maxHeight), f.left = (t.width - f.width) / 2, f.top = (t.height - f.height) / 2, f.oldLeft = f.left, f.oldTop = f.top, this.initialCanvasData = ae({}, f);
10404
10404
  },
10405
10405
  limitCanvas: function(t, a) {
10406
10406
  var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = i.viewMode, c = u.aspectRatio, h = this.cropped && r;
@@ -10431,7 +10431,7 @@ var $d = {
10431
10431
  }), r = u.width, o = u.height, c = i.width * (r / i.naturalWidth), h = i.height * (o / i.naturalHeight);
10432
10432
  i.left -= (c - i.width) / 2, i.top -= (h - i.height) / 2, i.width = c, i.height = h, i.aspectRatio = r / o, i.naturalWidth = r, i.naturalHeight = o, this.limitCanvas(!0, !1);
10433
10433
  }
10434
- (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, et(this.canvas, te({
10434
+ (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, et(this.canvas, ae({
10435
10435
  width: i.width,
10436
10436
  height: i.height
10437
10437
  }, Qt({
@@ -10441,15 +10441,15 @@ var $d = {
10441
10441
  },
10442
10442
  renderImage: function(t) {
10443
10443
  var a = this.canvasData, i = this.imageData, s = i.naturalWidth * (a.width / a.naturalWidth), u = i.naturalHeight * (a.height / a.naturalHeight);
10444
- te(i, {
10444
+ ae(i, {
10445
10445
  width: s,
10446
10446
  height: u,
10447
10447
  left: (a.width - s) / 2,
10448
10448
  top: (a.height - u) / 2
10449
- }), et(this.image, te({
10449
+ }), et(this.image, ae({
10450
10450
  width: i.width,
10451
10451
  height: i.height
10452
- }, Qt(te({
10452
+ }, Qt(ae({
10453
10453
  translateX: i.left,
10454
10454
  translateY: i.top
10455
10455
  }, i)))), t && this.output();
@@ -10459,7 +10459,7 @@ var $d = {
10459
10459
  width: a.width,
10460
10460
  height: a.height
10461
10461
  };
10462
- i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = te({}, u);
10462
+ i && (a.height * i > a.width ? u.height = u.width / i : u.width = u.height * i), this.cropBoxData = u, this.limitCropBox(!0, !0), u.width = Math.min(Math.max(u.width, u.minWidth), u.maxWidth), u.height = Math.min(Math.max(u.height, u.minHeight), u.maxHeight), u.width = Math.max(u.minWidth, u.width * s), u.height = Math.max(u.minHeight, u.height * s), u.left = a.left + (a.width - u.width) / 2, u.top = a.top + (a.height - u.height) / 2, u.oldLeft = u.left, u.oldTop = u.top, this.initialCropBoxData = ae({}, u);
10463
10463
  },
10464
10464
  limitCropBox: function(t, a) {
10465
10465
  var i = this.options, s = this.containerData, u = this.canvasData, r = this.cropBoxData, o = this.limited, c = i.aspectRatio;
@@ -10471,7 +10471,7 @@ var $d = {
10471
10471
  },
10472
10472
  renderCropBox: function() {
10473
10473
  var t = this.options, a = this.containerData, i = this.cropBoxData;
10474
- (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && aa(this.face, ta, i.width >= a.width && i.height >= a.height ? _u : ji), et(this.cropBox, te({
10474
+ (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && aa(this.face, ta, i.width >= a.width && i.height >= a.height ? _u : ji), et(this.cropBox, ae({
10475
10475
  width: i.width,
10476
10476
  height: i.height
10477
10477
  }, Qt({
@@ -10508,10 +10508,10 @@ var $d = {
10508
10508
  },
10509
10509
  preview: function() {
10510
10510
  var t = this.imageData, a = this.canvasData, i = this.cropBoxData, s = i.width, u = i.height, r = t.width, o = t.height, c = i.left - a.left - t.left, h = i.top - a.top - t.top;
10511
- !this.cropped || this.disabled || (et(this.viewBoxImage, te({
10511
+ !this.cropped || this.disabled || (et(this.viewBoxImage, ae({
10512
10512
  width: r,
10513
10513
  height: o
10514
- }, Qt(te({
10514
+ }, Qt(ae({
10515
10515
  translateX: -c,
10516
10516
  translateY: -h
10517
10517
  }, t)))), oe(this.previews, function(f) {
@@ -10519,10 +10519,10 @@ var $d = {
10519
10519
  s && (M = T / s, L = u * M), u && L > A && (M = A / u, C = s * M, L = A), et(f, {
10520
10520
  width: C,
10521
10521
  height: L
10522
- }), et(f.getElementsByTagName("img")[0], te({
10522
+ }), et(f.getElementsByTagName("img")[0], ae({
10523
10523
  width: r * M,
10524
10524
  height: o * M
10525
- }, Qt(te({
10525
+ }, Qt(ae({
10526
10526
  translateX: -c * M,
10527
10527
  translateY: -h * M
10528
10528
  }, t))));
@@ -10587,8 +10587,8 @@ var $d = {
10587
10587
  originalEvent: t,
10588
10588
  action: a
10589
10589
  }) !== !1 && (t.changedTouches ? oe(t.changedTouches, function(s) {
10590
- te(i[s.identifier] || {}, da(s, !0));
10591
- }) : te(i[t.pointerId || 0] || {}, da(t, !0)), this.change(t));
10590
+ ae(i[s.identifier] || {}, da(s, !0));
10591
+ }) : ae(i[t.pointerId || 0] || {}, da(t, !0)), this.change(t));
10592
10592
  }
10593
10593
  },
10594
10594
  cropEnd: function(t) {
@@ -10604,7 +10604,7 @@ var $d = {
10604
10604
  }
10605
10605
  }, jd = {
10606
10606
  change: function(t) {
10607
- var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, h = u.left, f = u.top, m = u.width, T = u.height, A = h + m, C = f + T, L = 0, M = 0, X = s.width, U = s.height, $ = !0, Y;
10607
+ var a = this.options, i = this.canvasData, s = this.containerData, u = this.cropBoxData, r = this.pointers, o = this.action, c = a.aspectRatio, h = u.left, f = u.top, m = u.width, T = u.height, A = h + m, C = f + T, L = 0, M = 0, X = s.width, U = s.height, $ = !0, F;
10608
10608
  !c && t.shiftKey && (c = m && T ? m / T : 1), this.limited && (L = u.minLeft, M = u.minTop, X = L + Math.min(s.width, i.width, i.left + i.width), U = M + Math.min(s.height, i.height, i.top + i.height));
10609
10609
  var P = r[Object.keys(r)[0]], g = {
10610
10610
  x: P.endX - P.startX,
@@ -10712,7 +10712,7 @@ var $d = {
10712
10712
  $ = !1;
10713
10713
  break;
10714
10714
  }
10715
- Y = Lu(this.cropper), h = P.startX - Y.left, f = P.startY - Y.top, m = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Ut : wt : g.x < 0 && (h -= m, o = g.y > 0 ? Ft : Bt), g.y < 0 && (f -= T), this.cropped || (Ye(this.cropBox, xe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
10715
+ F = Lu(this.cropper), h = P.startX - F.left, f = P.startY - F.top, m = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Ut : wt : g.x < 0 && (h -= m, o = g.y > 0 ? Ft : Bt), g.y < 0 && (f -= T), this.cropped || (Ye(this.cropBox, xe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
10716
10716
  break;
10717
10717
  }
10718
10718
  $ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()), oe(r, function(Q) {
@@ -10726,11 +10726,11 @@ var $d = {
10726
10726
  },
10727
10727
  // Reset the image and crop box to their initial states
10728
10728
  reset: function() {
10729
- return this.ready && !this.disabled && (this.imageData = te({}, this.initialImageData), this.canvasData = te({}, this.initialCanvasData), this.cropBoxData = te({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
10729
+ return this.ready && !this.disabled && (this.imageData = ae({}, this.initialImageData), this.canvasData = ae({}, this.initialCanvasData), this.cropBoxData = ae({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
10730
10730
  },
10731
10731
  // Clear the crop box
10732
10732
  clear: function() {
10733
- return this.cropped && !this.disabled && (te(this.cropBoxData, {
10733
+ return this.cropped && !this.disabled && (ae(this.cropBoxData, {
10734
10734
  left: 0,
10735
10735
  top: 0,
10736
10736
  width: 0,
@@ -10763,7 +10763,7 @@ var $d = {
10763
10763
  */
10764
10764
  destroy: function() {
10765
10765
  var t = this.element;
10766
- return t[ee] ? (t[ee] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
10766
+ return t[te] ? (t[te] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
10767
10767
  },
10768
10768
  /**
10769
10769
  * Move the canvas with relative offsets
@@ -10917,14 +10917,14 @@ var $d = {
10917
10917
  * @returns {Object} The result container data.
10918
10918
  */
10919
10919
  getContainerData: function() {
10920
- return this.ready ? te({}, this.containerData) : {};
10920
+ return this.ready ? ae({}, this.containerData) : {};
10921
10921
  },
10922
10922
  /**
10923
10923
  * Get the image position and size data.
10924
10924
  * @returns {Object} The result image data.
10925
10925
  */
10926
10926
  getImageData: function() {
10927
- return this.sized ? te({}, this.imageData) : {};
10927
+ return this.sized ? ae({}, this.imageData) : {};
10928
10928
  },
10929
10929
  /**
10930
10930
  * Get the canvas position and size data.
@@ -10997,16 +10997,16 @@ var $d = {
10997
10997
  C = Math.min(m.width, Math.max(T.width, C)), L = Math.min(m.height, Math.max(T.height, L));
10998
10998
  var M = document.createElement("canvas"), X = M.getContext("2d");
10999
10999
  M.width = Ct(C), M.height = Ct(L), X.fillStyle = t.fillColor || "transparent", X.fillRect(0, 0, C, L);
11000
- var U = t.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, Y = t.imageSmoothingQuality;
11001
- X.imageSmoothingEnabled = $, Y && (X.imageSmoothingQuality = Y);
11000
+ var U = t.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = t.imageSmoothingQuality;
11001
+ X.imageSmoothingEnabled = $, F && (X.imageSmoothingQuality = F);
11002
11002
  var P = i.width, g = i.height, w = u, Q = r, ce, be, Ne, Re, ge, _e;
11003
11003
  w <= -o || w > P ? (w = 0, ce = 0, Ne = 0, ge = 0) : w <= 0 ? (Ne = -w, w = 0, ce = Math.min(P, o + w), ge = ce) : w <= P && (Ne = 0, ce = Math.min(o, P - w), ge = ce), ce <= 0 || Q <= -c || Q > g ? (Q = 0, be = 0, Re = 0, _e = 0) : Q <= 0 ? (Re = -Q, Q = 0, be = Math.min(g, c + Q), _e = be) : Q <= g && (Re = 0, be = Math.min(c, g - Q), _e = be);
11004
- var ae = [w, Q, ce, be];
11004
+ var ie = [w, Q, ce, be];
11005
11005
  if (ge > 0 && _e > 0) {
11006
11006
  var ve = C / o;
11007
- ae.push(Ne * ve, Re * ve, ge * ve, _e * ve);
11007
+ ie.push(Ne * ve, Re * ve, ge * ve, _e * ve);
11008
11008
  }
11009
- return X.drawImage.apply(X, [i].concat(bu(ae.map(function(x) {
11009
+ return X.drawImage.apply(X, [i].concat(bu(ie.map(function(x) {
11010
11010
  return Math.floor(Ct(x));
11011
11011
  })))), M;
11012
11012
  },
@@ -11037,14 +11037,14 @@ var $d = {
11037
11037
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
11038
11038
  if (ld(this, e), !t || !Id.test(t.tagName))
11039
11039
  throw new Error("The first argument is required and must be an <img> or <canvas> element.");
11040
- this.element = t, this.options = te({}, $s, _t(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
11040
+ this.element = t, this.options = ae({}, $s, _t(a) && a), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
11041
11041
  }
11042
11042
  return hd(e, [{
11043
11043
  key: "init",
11044
11044
  value: function() {
11045
11045
  var a = this.element, i = a.tagName.toLowerCase(), s;
11046
- if (!a[ee]) {
11047
- if (a[ee] = this, i === "img") {
11046
+ if (!a[te]) {
11047
+ if (a[te] = this, i === "img") {
11048
11048
  if (this.isImg = !0, s = a.getAttribute("src") || "", this.originalUrl = s, !s)
11049
11049
  return;
11050
11050
  s = a.src;
@@ -11102,11 +11102,11 @@ var $d = {
11102
11102
  var a = this, i = this.image;
11103
11103
  i.onload = null, i.onerror = null, this.sizing = !0;
11104
11104
  var s = qe.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(qe.navigator.userAgent), u = function(h, f) {
11105
- te(a.imageData, {
11105
+ ae(a.imageData, {
11106
11106
  naturalWidth: h,
11107
11107
  naturalHeight: f,
11108
11108
  aspectRatio: h / f
11109
- }), a.initialImageData = te({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
11109
+ }), a.initialImageData = ae({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
11110
11110
  };
11111
11111
  if (i.naturalWidth && !s) {
11112
11112
  u(i.naturalWidth, i.naturalHeight);
@@ -11129,8 +11129,8 @@ var $d = {
11129
11129
  if (!(!this.sized || this.ready)) {
11130
11130
  var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
11131
11131
  r.innerHTML = Sd;
11132
- var o = r.querySelector(".".concat(ee, "-container")), c = o.querySelector(".".concat(ee, "-canvas")), h = o.querySelector(".".concat(ee, "-drag-box")), f = o.querySelector(".".concat(ee, "-crop-box")), m = f.querySelector(".".concat(ee, "-face"));
11133
- this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ee, "-view-box")), this.face = m, c.appendChild(s), de(a, xe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, de(f, xe), i.guides || de(f.getElementsByClassName("".concat(ee, "-dashed")), xe), i.center || de(f.getElementsByClassName("".concat(ee, "-center")), xe), i.background && de(o, "".concat(ee, "-bg")), i.highlight || de(m, pd), i.cropBoxMovable && (de(m, Ti), aa(m, ta, ji)), i.cropBoxResizable || (de(f.getElementsByClassName("".concat(ee, "-line")), xe), de(f.getElementsByClassName("".concat(ee, "-point")), xe)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), Ie(i.ready) && ye(a, Ys, i.ready, {
11132
+ var o = r.querySelector(".".concat(te, "-container")), c = o.querySelector(".".concat(te, "-canvas")), h = o.querySelector(".".concat(te, "-drag-box")), f = o.querySelector(".".concat(te, "-crop-box")), m = f.querySelector(".".concat(te, "-face"));
11133
+ this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(te, "-view-box")), this.face = m, c.appendChild(s), de(a, xe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, de(f, xe), i.guides || de(f.getElementsByClassName("".concat(te, "-dashed")), xe), i.center || de(f.getElementsByClassName("".concat(te, "-center")), xe), i.background && de(o, "".concat(te, "-bg")), i.highlight || de(m, pd), i.cropBoxMovable && (de(m, Ti), aa(m, ta, ji)), i.cropBoxResizable || (de(f.getElementsByClassName("".concat(te, "-line")), xe), de(f.getElementsByClassName("".concat(te, "-point")), xe)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), Ie(i.ready) && ye(a, Ys, i.ready, {
11134
11134
  once: !0
11135
11135
  }), It(a, Ys);
11136
11136
  }
@@ -11165,11 +11165,11 @@ var $d = {
11165
11165
  }, {
11166
11166
  key: "setDefaults",
11167
11167
  value: function(a) {
11168
- te($s, _t(a) && a);
11168
+ ae($s, _t(a) && a);
11169
11169
  }
11170
11170
  }]);
11171
11171
  }();
11172
- te(vu.prototype, $d, Xd, Gd, Qd, jd, zd);
11172
+ ae(vu.prototype, $d, Xd, Gd, Qd, jd, zd);
11173
11173
  function Zd(e, t) {
11174
11174
  const a = e.split(",") || [], i = a[0].match(/:(.*?);/)[1], s = a[1] && atob(a[1]);
11175
11175
  let u = s && s.length;
@@ -11245,9 +11245,9 @@ const Jd = {
11245
11245
  // 裁剪前的图片
11246
11246
  image: null,
11247
11247
  myCropper: null
11248
- }), h = z("image/jpeg"), f = (Y) => {
11249
- console.log(Y);
11250
- const P = Y.target.files[0];
11248
+ }), h = z("image/jpeg"), f = (F) => {
11249
+ console.log(F);
11250
+ const P = F.target.files[0];
11251
11251
  if (P) {
11252
11252
  P.name && (s.value.inputValue = P.name);
11253
11253
  const g = new FileReader();
@@ -11257,25 +11257,25 @@ const Jd = {
11257
11257
  }, g.readAsDataURL(P);
11258
11258
  }
11259
11259
  };
11260
- async function m(Y) {
11261
- if (!Y)
11260
+ async function m(F) {
11261
+ if (!F)
11262
11262
  return;
11263
11263
  await $();
11264
- const P = Y;
11264
+ const P = F;
11265
11265
  c.value.image = P, c.value.image && T();
11266
11266
  }
11267
11267
  function T() {
11268
- const Y = document.querySelector("#imgId");
11269
- Y && Y.addEventListener("load", () => {
11268
+ const F = document.querySelector("#imgId");
11269
+ F && F.addEventListener("load", () => {
11270
11270
  U(), c.value.myCropper = new vu(
11271
- Y,
11271
+ F,
11272
11272
  r.value
11273
11273
  );
11274
11274
  });
11275
11275
  }
11276
11276
  const A = z(!1);
11277
- function C(Y, P, g) {
11278
- u.value = Y, Y && Y.aspectRatio && (r.value.aspectRatio = Y.aspectRatio), g && (s.value.inputValue = g), A.value = !0, P && m(P);
11277
+ function C(F, P, g) {
11278
+ u.value = F, F && F.aspectRatio && (r.value.aspectRatio = F.aspectRatio), g && (s.value.inputValue = g), A.value = !0, P && m(P);
11279
11279
  }
11280
11280
  function L() {
11281
11281
  A.value = !1;
@@ -11292,11 +11292,11 @@ const Jd = {
11292
11292
  width: (g = u.value) == null ? void 0 : g.width
11293
11293
  // 输出图片的宽
11294
11294
  }).toDataURL(h.value);
11295
- const Y = Zd(
11295
+ const F = Zd(
11296
11296
  c.value.afterImg,
11297
11297
  s.value.inputValue
11298
11298
  );
11299
- i("ok", Y), o.value = !1, $(), U(), L();
11299
+ i("ok", F), o.value = !1, $(), U(), L();
11300
11300
  };
11301
11301
  function X() {
11302
11302
  $(), U(), L(), i("cancel");
@@ -11307,7 +11307,7 @@ const Jd = {
11307
11307
  function $() {
11308
11308
  c.value.image = "";
11309
11309
  }
11310
- return t({ handleCloseCropper: L, handleOpenCropper: C }), (Y, P) => {
11310
+ return t({ handleCloseCropper: L, handleOpenCropper: C }), (F, P) => {
11311
11311
  var g, w, Q;
11312
11312
  return A.value ? (B(), V("div", Jd, [
11313
11313
  S("div", ef, [
@@ -11406,51 +11406,51 @@ const Jd = {
11406
11406
  emits: ["selectElement", "hoverElement", "updateText", "contentUpdated", "blockAction", "addIcon", "upload"],
11407
11407
  setup(e, { emit: t }) {
11408
11408
  const a = e, i = t, s = Ke(() => a.selectedElement === a.element), u = Ke(() => a.hoveredElement === a.element), r = z(!1), o = z(!1), c = z(""), h = Ke(() => a.element.rule.minText || 0), f = Ke(() => a.element.rule.maxText || 1 / 0), m = z();
11409
- function T(D) {
11410
- D.xpath != "/div[1]" && (r.value = !0, i("selectElement", D));
11409
+ function T(O) {
11410
+ O.xpath != "/div[1]" && (i("selectElement", O), !O.rule.isReadOnly && O.type === fe.Text && (r.value = !0));
11411
11411
  }
11412
- function A(D) {
11413
- i("selectElement", D);
11412
+ function A(O) {
11413
+ i("selectElement", O);
11414
11414
  }
11415
- function C(D, O) {
11416
- i("hoverElement", D, O);
11415
+ function C(O, D) {
11416
+ i("hoverElement", O, D);
11417
11417
  }
11418
- function L(D) {
11419
- i("hoverElement", D);
11418
+ function L(O) {
11419
+ i("hoverElement", O);
11420
11420
  }
11421
- function M(D) {
11422
- D.currentTarget.contains(D.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
11421
+ function M(O) {
11422
+ O.currentTarget.contains(O.relatedTarget) ? i("hoverElement", null) : a.hoveredElement ? i("hoverElement", null, a.hoveredElement.parentxpath) : i("hoverElement", null);
11423
11423
  }
11424
11424
  function X() {
11425
11425
  r.value = !1, i("contentUpdated", U());
11426
11426
  }
11427
11427
  function U() {
11428
- function D(O) {
11429
- const F = Object.entries(O.attrs || {}).map(([ue, Ve]) => `${ue}="${Ve}"`).join(" "), H = `<${O.tag}${F ? " " + F : ""}>`, ie = `</${O.tag}>`, ne = (O.children || []).map((ue) => D(ue)).join("");
11430
- return `${H}${O.editText || O.text || ""}${ne}${ie}`;
11428
+ function O(D) {
11429
+ const H = Object.entries(D.attrs || {}).map(([ue, Ve]) => `${ue}="${Ve}"`).join(" "), q = `<${D.tag}${H ? " " + H : ""}>`, J = `</${D.tag}>`, se = (D.children || []).map((ue) => O(ue)).join("");
11430
+ return `${q}${D.editText || D.text || ""}${se}${J}`;
11431
11431
  }
11432
- return D(a.element);
11432
+ return O(a.element);
11433
11433
  }
11434
- function $(D) {
11435
- var H;
11436
- D.stopPropagation();
11437
- const O = D.target, F = ((H = O.firstChild) == null ? void 0 : H.nodeType) === Node.TEXT_NODE && O.firstChild.nodeValue || "";
11438
- if (F.length < h.value) {
11434
+ function $(O) {
11435
+ var q;
11436
+ O.stopPropagation();
11437
+ const D = O.target, H = ((q = D.firstChild) == null ? void 0 : q.nodeType) === Node.TEXT_NODE && D.firstChild.nodeValue || "";
11438
+ if (H.length < h.value) {
11439
11439
  o.value = !0, c.value = `最少输入 ${h.value} 个字符`;
11440
11440
  return;
11441
- } else if (F.length > f.value) {
11441
+ } else if (H.length > f.value) {
11442
11442
  o.value = !0, c.value = `最多输入 ${f.value} 个字符`;
11443
11443
  return;
11444
11444
  } else
11445
11445
  o.value = !1, c.value = "";
11446
- a.element.editText = F, i("updateText", { element: a.element, newText: F }), i("contentUpdated", U());
11446
+ a.element.editText = H, i("updateText", { element: a.element, newText: H }), i("contentUpdated", U());
11447
11447
  }
11448
- function Y(D) {
11449
- i("updateText", D), i("contentUpdated", U());
11448
+ function F(O) {
11449
+ i("updateText", O), i("contentUpdated", U());
11450
11450
  }
11451
11451
  function P() {
11452
- const D = { ...a.element };
11453
- i("blockAction", { action: "add", element: a.element, newBlock: D });
11452
+ const O = { ...a.element };
11453
+ i("blockAction", { action: "add", element: a.element, newBlock: O });
11454
11454
  }
11455
11455
  function g() {
11456
11456
  i("blockAction", { action: "moveUp", element: a.element });
@@ -11461,47 +11461,47 @@ const Jd = {
11461
11461
  function Q() {
11462
11462
  i("blockAction", { action: "delete", element: a.element });
11463
11463
  }
11464
- function ce(D) {
11465
- i("blockAction", D), i("contentUpdated", U());
11464
+ function ce(O) {
11465
+ i("blockAction", O), i("contentUpdated", U());
11466
11466
  }
11467
11467
  function be() {
11468
11468
  m.value.openModal();
11469
11469
  }
11470
- function Ne(D) {
11471
- i("addIcon", D, a.element), i("contentUpdated", U());
11470
+ function Ne(O) {
11471
+ i("addIcon", O, a.element), i("contentUpdated", U());
11472
11472
  }
11473
- function Re(D, O) {
11474
- i("addIcon", D, O), i("contentUpdated", U());
11473
+ function Re(O, D) {
11474
+ i("addIcon", O, D), i("contentUpdated", U());
11475
11475
  }
11476
11476
  let ge;
11477
- const _e = z(), ae = z({});
11478
- function ve(D, O) {
11479
- if (O.rule.minImageWidth && O.rule.maxImageHeight ? (ae.value.width = O.rule.minImageWidth, ae.value.height = O.rule.maxImageHeight, ae.value.aspectRatio = O.rule.minImageWidth / O.rule.maxImageHeight) : ae.value = {}, D) {
11480
- D.name;
11481
- const F = new FileReader();
11482
- F.onload = (H) => {
11483
- var ie;
11484
- ge = (ie = H == null ? void 0 : H.target) == null ? void 0 : ie.result, _e.value.handleOpenCropper(ae.value, ge, D.name);
11485
- }, F.readAsDataURL(D);
11486
- }
11487
- }
11488
- function x(D, O) {
11489
- if (console.log(typeof D == "object", D), D)
11490
- if (typeof D == "object") {
11491
- O.attrs.alt = D.name;
11492
- const F = new FileReader();
11493
- F.onload = (H) => {
11494
- var ne;
11495
- let ie = (ne = H == null ? void 0 : H.target) == null ? void 0 : ne.result;
11496
- O.attrs.src = ie, i("upload", ie, O), i("contentUpdated", U());
11497
- }, F.readAsDataURL(D);
11477
+ const _e = z(), ie = z({});
11478
+ function ve(O, D) {
11479
+ if (D.rule.minImageWidth && D.rule.maxImageHeight ? (ie.value.width = D.rule.minImageWidth, ie.value.height = D.rule.maxImageHeight, ie.value.aspectRatio = D.rule.minImageWidth / D.rule.maxImageHeight) : ie.value = {}, O) {
11480
+ O.name;
11481
+ const H = new FileReader();
11482
+ H.onload = (q) => {
11483
+ var J;
11484
+ ge = (J = q == null ? void 0 : q.target) == null ? void 0 : J.result, _e.value.handleOpenCropper(ie.value, ge, O.name);
11485
+ }, H.readAsDataURL(O);
11486
+ }
11487
+ }
11488
+ function x(O, D) {
11489
+ if (console.log(typeof O == "object", O), O)
11490
+ if (typeof O == "object") {
11491
+ D.attrs.alt = O.name;
11492
+ const H = new FileReader();
11493
+ H.onload = (q) => {
11494
+ var se;
11495
+ let J = (se = q == null ? void 0 : q.target) == null ? void 0 : se.result;
11496
+ D.attrs.src = J, i("upload", J, D), i("contentUpdated", U());
11497
+ }, H.readAsDataURL(O);
11498
11498
  } else
11499
- O.attrs.src = D, i("upload", D, O), i("contentUpdated", U());
11499
+ D.attrs.src = O, i("upload", O, D), i("contentUpdated", U());
11500
11500
  }
11501
- const y = async (D) => {
11501
+ const y = async (O) => {
11502
11502
  };
11503
- return (D, O) => {
11504
- const F = Pu("ElementRenderer", !0);
11503
+ return (O, D) => {
11504
+ const H = Pu("ElementRenderer", !0);
11505
11505
  return B(), V(Ht, null, [
11506
11506
  (B(), xt(ku(a.element.tag), zs({
11507
11507
  class: [
@@ -11510,13 +11510,15 @@ const Jd = {
11510
11510
  s.value ? "border-dashed border-[1px] border-green-500 z-10" : "",
11511
11511
  o.value ? "border-dashed border-[1px] border-red-500" : "",
11512
11512
  // 超出文字限制时显示红色边框
11513
- (!u.value && !s.value && !o.value, "")
11513
+ (!u.value && !s.value && !o.value, ""),
11514
11514
  // 鼠标悬停、选中或超出文字限制时显示手型
11515
+ a.element.rule && a.element.rule.isReadOnly ? "cursor-not-allowed" : ""
11516
+ // 只读
11515
11517
  ]
11516
11518
  }, a.element.attrs, {
11517
11519
  contenteditable: r.value,
11518
- onClick: O[1] || (O[1] = re(() => T(a.element), ["stop"])),
11519
- onMouseenter: O[2] || (O[2] = () => L(a.element)),
11520
+ onClick: D[1] || (D[1] = re(() => T(a.element), ["stop"])),
11521
+ onMouseenter: D[2] || (D[2] = () => L(a.element)),
11520
11522
  onMouseleave: M,
11521
11523
  onBlur: X,
11522
11524
  onInput: $
@@ -11524,7 +11526,7 @@ const Jd = {
11524
11526
  default: Ks(() => [
11525
11527
  wu(we(a.element.editText || a.element.text), 1),
11526
11528
  a.element.children && a.element.children.length ? (B(), V(Ht, { key: 0 }, [
11527
- a.element.type === Ae(Te).Block ? (B(), V("div", _f, [
11529
+ a.element.type === Ae(fe).Block ? (B(), V("div", _f, [
11528
11530
  S("span", Af, we(a.element.editText || a.element.text), 1),
11529
11531
  S("div", Nf, [
11530
11532
  S("span", {
@@ -11538,20 +11540,20 @@ const Jd = {
11538
11540
  }, "删除")
11539
11541
  ])
11540
11542
  ])) : K("", !0),
11541
- (B(!0), V(Ht, null, js(a.element.children, (H, ie) => (B(), xt(F, {
11543
+ (B(!0), V(Ht, null, js(a.element.children, (q, J) => (B(), xt(H, {
11542
11544
  icons: e.icons,
11543
- key: ie,
11544
- element: H,
11545
+ key: J,
11546
+ element: q,
11545
11547
  selectedElement: a.selectedElement,
11546
11548
  hoveredElement: a.hoveredElement,
11547
11549
  onSelectElement: A,
11548
11550
  onHoverElement: C,
11549
- onUpdateText: Y,
11551
+ onUpdateText: F,
11550
11552
  onBlockAction: ce,
11551
11553
  onAddIcon: Re,
11552
11554
  onUpload: x
11553
11555
  }, null, 8, ["icons", "element", "selectedElement", "hoveredElement"]))), 128)),
11554
- a.element.type === Ae(Te).Block ? (B(), V(Ht, { key: 1 }, [
11556
+ a.element.type === Ae(fe).Block ? (B(), V(Ht, { key: 1 }, [
11555
11557
  S("span", {
11556
11558
  class: "iconfont icon-a-tianjiaxian icon_gray_add",
11557
11559
  onClick: re(P, ["stop"]),
@@ -11561,14 +11563,14 @@ const Jd = {
11561
11563
  class: "add_modules",
11562
11564
  onClick: re(P, ["stop"]),
11563
11565
  contenteditable: "false"
11564
- }, O[7] || (O[7] = [
11566
+ }, D[7] || (D[7] = [
11565
11567
  S("span", { class: "iconfont icon-a-tianjiamian" }, null, -1),
11566
11568
  S("span", null, "添加模块", -1)
11567
11569
  ])),
11568
11570
  S("div", {
11569
11571
  class: "cont_aidition",
11570
11572
  contenteditable: "false",
11571
- onClick: O[0] || (O[0] = re(() => {
11573
+ onClick: D[0] || (D[0] = re(() => {
11572
11574
  }, ["stop"]))
11573
11575
  }, [
11574
11576
  S("span", {
@@ -11593,32 +11595,32 @@ const Jd = {
11593
11595
  ]),
11594
11596
  _: 1
11595
11597
  }, 16, ["class", "contenteditable"])),
11596
- a.element.type == Ae(Te).Text && o.value ? (B(), V("div", Cf, we(c.value), 1)) : K("", !0),
11597
- a.element.type === Ae(Te).Image ? (B(), V("div", {
11598
+ a.element.type == Ae(fe).Text && o.value ? (B(), V("div", Cf, we(c.value), 1)) : K("", !0),
11599
+ a.element.type === Ae(fe).Image ? (B(), V("div", {
11598
11600
  key: 1,
11599
11601
  class: "absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",
11600
- onClick: O[3] || (O[3] = re(() => {
11602
+ onClick: D[3] || (D[3] = re(() => {
11601
11603
  }, ["stop"]))
11602
11604
  }, [
11603
- O[8] || (O[8] = S("span", {
11605
+ D[8] || (D[8] = S("span", {
11604
11606
  contenteditable: "false",
11605
11607
  class: "cursor-pointer"
11606
11608
  }, "上传图片", -1)),
11607
11609
  lt(od, {
11608
- customUpload: (H) => ve(H, a.element),
11610
+ customUpload: (q) => ve(q, a.element),
11609
11611
  height: a.element.rule.maxImageHeight,
11610
11612
  width: a.element.rule.minImageWidth,
11611
11613
  uploadByImage: y
11612
11614
  }, null, 8, ["customUpload", "height", "width"])
11613
11615
  ])) : K("", !0),
11614
- a.element.type === Ae(Te).Icon ? (B(), V("div", {
11616
+ a.element.type === Ae(fe).Icon ? (B(), V("div", {
11615
11617
  key: 2,
11616
11618
  class: "absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",
11617
- onClick: O[5] || (O[5] = re(() => {
11619
+ onClick: D[5] || (D[5] = re(() => {
11618
11620
  }, ["stop"]))
11619
11621
  }, [
11620
11622
  S("span", {
11621
- onClick: O[4] || (O[4] = re((H) => be(), ["stop"])),
11623
+ onClick: D[4] || (D[4] = re((q) => be(), ["stop"])),
11622
11624
  contenteditable: "false",
11623
11625
  class: "cursor-pointer"
11624
11626
  }, "选择图标")
@@ -11632,12 +11634,12 @@ const Jd = {
11632
11634
  lt(gf, {
11633
11635
  ref_key: "cropperRef",
11634
11636
  ref: _e,
11635
- onOk: O[6] || (O[6] = (H) => x(H, a.element))
11637
+ onOk: D[6] || (D[6] = (q) => x(q, a.element))
11636
11638
  }, null, 512)
11637
11639
  ], 64);
11638
11640
  };
11639
11641
  }
11640
- }), Sf = /* @__PURE__ */ yt(If, [["__scopeId", "data-v-f26b78b2"]]), xf = Ge({
11642
+ }), Sf = /* @__PURE__ */ yt(If, [["__scopeId", "data-v-45fda71e"]]), xf = Ge({
11641
11643
  name: "GpCheckbox",
11642
11644
  props: {
11643
11645
  modelValue: {
@@ -11897,7 +11899,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11897
11899
  [Yu, s.value.type]
11898
11900
  ])
11899
11901
  ]),
11900
- s.value.type == Ae(Te).Text ? (B(), V("div", Qf, [
11902
+ s.value.type == Ae(fe).Text ? (B(), V("div", Qf, [
11901
11903
  o[15] || (o[15] = S("label", { class: "block mt-4" }, "最小文本长度", -1)),
11902
11904
  st(S("input", {
11903
11905
  "onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
@@ -11906,7 +11908,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11906
11908
  [pt, s.value.rule.minText]
11907
11909
  ])
11908
11910
  ])) : K("", !0),
11909
- s.value.type == Ae(Te).Text ? (B(), V("div", jf, [
11911
+ s.value.type == Ae(fe).Text ? (B(), V("div", jf, [
11910
11912
  o[16] || (o[16] = S("label", { class: "block mt-4" }, "最大文本长度", -1)),
11911
11913
  st(S("input", {
11912
11914
  "onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
@@ -11915,7 +11917,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11915
11917
  [pt, s.value.rule.maxText]
11916
11918
  ])
11917
11919
  ])) : K("", !0),
11918
- s.value.type == Ae(Te).Image ? (B(), V("div", zf, [
11920
+ s.value.type == Ae(fe).Image ? (B(), V("div", zf, [
11919
11921
  o[17] || (o[17] = S("label", { class: "block mt-4" }, "是否裁剪", -1)),
11920
11922
  lt(fa, {
11921
11923
  class: "py-2",
@@ -11924,7 +11926,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11924
11926
  label: "是"
11925
11927
  }, null, 8, ["modelValue"])
11926
11928
  ])) : K("", !0),
11927
- s.value.type == Ae(Te).Image ? (B(), V("div", Kf, [
11929
+ s.value.type == Ae(fe).Image ? (B(), V("div", Kf, [
11928
11930
  o[18] || (o[18] = S("label", { class: "block mt-4" }, "图片宽度", -1)),
11929
11931
  st(S("input", {
11930
11932
  "onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
@@ -11933,7 +11935,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11933
11935
  [pt, s.value.rule.minImageWidth]
11934
11936
  ])
11935
11937
  ])) : K("", !0),
11936
- s.value.type == Ae(Te).Image ? (B(), V("div", Zf, [
11938
+ s.value.type == Ae(fe).Image ? (B(), V("div", Zf, [
11937
11939
  o[19] || (o[19] = S("label", { class: "block mt-4" }, "图片高度", -1)),
11938
11940
  st(S("input", {
11939
11941
  "onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
@@ -11942,7 +11944,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11942
11944
  [pt, s.value.rule.maxImageHeight]
11943
11945
  ])
11944
11946
  ])) : K("", !0),
11945
- s.value.type == Ae(Te).Block ? (B(), V("div", Jf, [
11947
+ s.value.type == Ae(fe).Block ? (B(), V("div", Jf, [
11946
11948
  o[20] || (o[20] = S("label", { class: "block mt-4" }, "块最小数量", -1)),
11947
11949
  st(S("input", {
11948
11950
  "onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
@@ -11951,7 +11953,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11951
11953
  [pt, s.value.rule.minBlock]
11952
11954
  ])
11953
11955
  ])) : K("", !0),
11954
- s.value.type == Ae(Te).Block ? (B(), V("div", e1, [
11956
+ s.value.type == Ae(fe).Block ? (B(), V("div", e1, [
11955
11957
  o[21] || (o[21] = S("label", { class: "block mt-4" }, "块最大数量", -1)),
11956
11958
  st(S("input", {
11957
11959
  "onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
@@ -11960,7 +11962,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
11960
11962
  [pt, s.value.rule.maxBlock]
11961
11963
  ])
11962
11964
  ])) : K("", !0),
11963
- s.value.type == Ae(Te).Text || s.value.type == Ae(Te).Icon ? (B(), V("div", t1, [
11965
+ s.value.type == Ae(fe).Text || s.value.type == Ae(fe).Icon ? (B(), V("div", t1, [
11964
11966
  o[22] || (o[22] = S("label", { class: "block mt-4" }, "主题色", -1)),
11965
11967
  lt(fa, {
11966
11968
  class: "py-2",
@@ -12022,8 +12024,8 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12022
12024
  x.forEach((y) => {
12023
12025
  if (document.querySelector(`link[href="${y}"]`))
12024
12026
  return;
12025
- const D = document.createElement("link");
12026
- D.rel = "stylesheet", D.href = y, document.head.appendChild(D);
12027
+ const O = document.createElement("link");
12028
+ O.rel = "stylesheet", O.href = y, document.head.appendChild(O);
12027
12029
  });
12028
12030
  }, { immediate: !0 });
12029
12031
  const u = z(a.mode), r = z();
@@ -12041,8 +12043,8 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12041
12043
  }
12042
12044
  function A(x, y = "") {
12043
12045
  if (y) {
12044
- const D = C(r.value, y);
12045
- D ? f.value = D : f.value = x;
12046
+ const O = C(r.value, y);
12047
+ O ? f.value = O : f.value = x;
12046
12048
  } else
12047
12049
  f.value = x;
12048
12050
  }
@@ -12050,54 +12052,54 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12050
12052
  if (x.xpath === y)
12051
12053
  return x;
12052
12054
  if (x.children && x.children.length)
12053
- for (const D of x.children) {
12054
- const O = C(D, y);
12055
- if (O)
12056
- return O;
12055
+ for (const O of x.children) {
12056
+ const D = C(O, y);
12057
+ if (D)
12058
+ return D;
12057
12059
  }
12058
12060
  }
12059
12061
  function L(x) {
12060
- var y, D, O;
12062
+ var y, O, D, H;
12061
12063
  if (console.log(x, h.value), h.value)
12062
- if (h.value.rule = x.rule, h.value.type = x.type, (y = x.rule) != null && y.isThemeColor ? (x.attrs.class += " ys_tit_color", x.attrs.style && (x.attrs.style = void 0)) : ((D = x.attrs.class) != null && D.includes(" ys_tit_color") && (x.attrs.class = x.attrs.class.replace(" ys_tit_color", " ")), x.rule.color && (x.attrs.style = { color: x.rule.color })), h.value.type === Te.Block) {
12063
- const F = C(r.value, h.value.parentxpath || "");
12064
- F && F.children && F.children.forEach((H) => {
12065
- var ie;
12066
- H.tag === h.value.tag && (H.rule = x.rule, H.type = x.type, (ie = H.attrs.class) != null && ie.includes(" mb40") || (H.attrs.class += " mb40"));
12064
+ if (h.value.rule = x.rule, h.value.type = x.type, (y = x.rule) != null && y.isThemeColor ? (x.attrs.class += "theme_color", x.attrs.style && (x.attrs.style = void 0)) : (console.log("e111", (O = x.attrs.class) == null ? void 0 : O.includes("theme_color")), (D = x.attrs.class) != null && D.includes("theme_color") && (x.attrs.class = x.attrs.class.replace("theme_color", " "))), h.value.type === fe.Block) {
12065
+ const q = C(r.value, h.value.parentxpath || "");
12066
+ q && q.children && q.children.forEach((J) => {
12067
+ var se;
12068
+ J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (se = J.attrs.class) != null && se.includes(" mb40") || (J.attrs.class += " mb40"));
12067
12069
  });
12068
12070
  } else
12069
- (O = h.value.attrs.class) != null && O.includes(" mb40") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40", " "));
12071
+ (H = h.value.attrs.class) != null && H.includes(" mb40") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40", " "));
12070
12072
  }
12071
12073
  function M(x) {
12072
12074
  o.value = x;
12073
12075
  }
12074
12076
  function X(x) {
12075
12077
  c = vs(x);
12076
- const y = c("body").children().toArray().map((D) => U(c(D)));
12078
+ const y = c("body").children().toArray().map((O) => U(c(O)));
12077
12079
  return o.value = c("body").html() || "", y[0];
12078
12080
  }
12079
12081
  function U(x, y = "") {
12080
- var ie;
12081
- function D(ne) {
12082
- if (!ne || !ne[0]) return "";
12082
+ var J;
12083
+ function O(se) {
12084
+ if (!se || !se[0]) return "";
12083
12085
  const ue = [];
12084
- let Ve = ne;
12086
+ let Ve = se;
12085
12087
  for (; Ve.length && Ve[0].tagName !== "html"; ) {
12086
12088
  const Zi = Ve[0].tagName, Mu = Ve.parent().children(Zi).index(Ve) + 1;
12087
12089
  ue.unshift(`${Zi}[${Mu}]`), Ve = Ve.parent();
12088
12090
  }
12089
12091
  return "/html/" + ue.join("/");
12090
12092
  }
12091
- const O = D(x).replace("/html/body[1]", ""), F = x.children().toArray().map((ne) => U(c(ne), O)), H = (ie = a.rules) == null ? void 0 : ie.find((ne) => ne.xpath === O);
12093
+ const D = O(x).replace("/html/body[1]", ""), H = x.children().toArray().map((se) => U(c(se), D)), q = (J = a.rules) == null ? void 0 : J.find((se) => se.xpath === D);
12092
12094
  return {
12093
12095
  tag: x[0].tagName,
12094
12096
  text: x.contents().not(x.children()).text().trim(),
12095
12097
  attrs: x[0].attribs,
12096
- children: F,
12097
- xpath: O,
12098
+ children: H,
12099
+ xpath: D,
12098
12100
  parentxpath: y,
12099
- type: (H == null ? void 0 : H.type) || Te.None,
12100
- rule: (H == null ? void 0 : H.rule) || {}
12101
+ type: (q == null ? void 0 : q.type) || fe.None,
12102
+ rule: (q == null ? void 0 : q.rule) || {}
12101
12103
  };
12102
12104
  }
12103
12105
  function $(x) {
@@ -12105,63 +12107,63 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12105
12107
  const y = C(r.value, x.element.xpath);
12106
12108
  y && (y.editText = x.newText);
12107
12109
  }
12108
- function Y(x, y = "") {
12109
- function D(O, F) {
12110
- var ne;
12111
- const ie = (F ? ((ne = C(r.value, F)) == null ? void 0 : ne.children) || [] : [r.value]).filter((ue) => ue.tag === O.tag).indexOf(O) + 1;
12112
- return `${F}/${O.tag}[${ie}]`;
12113
- }
12114
- x.xpath = D(x, y), x.parentxpath = y, (x.children || []).forEach((O) => Y(O, x.xpath));
12115
- }
12116
- function P({ action: x, element: y, newBlock: D }) {
12117
- console.log("块操作", x, y, D);
12118
- const O = C(r.value, y.parentxpath || "");
12119
- if (!O || !O.children) return;
12120
- const F = O.children.findIndex((ue) => ue === y);
12121
- if (F === -1) return;
12122
- const H = O.children.length, { minBlock: ie, maxBlock: ne } = y.rule;
12123
- if ((x === "add" || x === "copy") && H >= (ne || 1 / 0)) {
12124
- m.value = `无法添加更多块。最大块数量为 ${ne}`;
12110
+ function F(x, y = "") {
12111
+ function O(D, H) {
12112
+ var se;
12113
+ const J = (H ? ((se = C(r.value, H)) == null ? void 0 : se.children) || [] : [r.value]).filter((ue) => ue.tag === D.tag).indexOf(D) + 1;
12114
+ return `${H}/${D.tag}[${J}]`;
12115
+ }
12116
+ x.xpath = O(x, y), x.parentxpath = y, (x.children || []).forEach((D) => F(D, x.xpath));
12117
+ }
12118
+ function P({ action: x, element: y, newBlock: O }) {
12119
+ console.log("块操作", x, y, O);
12120
+ const D = C(r.value, y.parentxpath || "");
12121
+ if (!D || !D.children) return;
12122
+ const H = D.children.findIndex((ue) => ue === y);
12123
+ if (H === -1) return;
12124
+ const q = D.children.length, { minBlock: J, maxBlock: se } = y.rule;
12125
+ if ((x === "add" || x === "copy") && q >= (se || 1 / 0)) {
12126
+ m.value = `无法添加更多块。最大块数量为 ${se}`;
12125
12127
  return;
12126
12128
  }
12127
12129
  switch (x) {
12128
12130
  case "add":
12129
- if (D) {
12130
- const ue = { ...D, xpath: "", children: JSON.parse(JSON.stringify(D.children)) };
12131
- O.children.splice(F + 1, 0, ue);
12131
+ if (O) {
12132
+ const ue = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
12133
+ D.children.splice(H + 1, 0, ue);
12132
12134
  }
12133
12135
  break;
12134
12136
  case "copy":
12135
- if (D) {
12136
- const ue = { ...D, xpath: "", children: JSON.parse(JSON.stringify(D.children)) };
12137
- O.children.splice(F + 1, 0, ue);
12137
+ if (O) {
12138
+ const ue = { ...O, xpath: "", children: JSON.parse(JSON.stringify(O.children)) };
12139
+ D.children.splice(H + 1, 0, ue);
12138
12140
  }
12139
12141
  break;
12140
12142
  case "moveUp":
12141
- if (F > 0) {
12142
- const [ue] = O.children.splice(F, 1);
12143
- O.children.splice(F - 1, 0, ue);
12143
+ if (H > 0) {
12144
+ const [ue] = D.children.splice(H, 1);
12145
+ D.children.splice(H - 1, 0, ue);
12144
12146
  }
12145
12147
  break;
12146
12148
  case "moveDown":
12147
- if (F < O.children.length - 1) {
12148
- const [ue] = O.children.splice(F, 1);
12149
- O.children.splice(F + 1, 0, ue);
12149
+ if (H < D.children.length - 1) {
12150
+ const [ue] = D.children.splice(H, 1);
12151
+ D.children.splice(H + 1, 0, ue);
12150
12152
  }
12151
12153
  break;
12152
12154
  case "delete":
12153
- if (H <= (ie || 0)) {
12154
- m.value = `无法删除更多块。最小块数量为 ${ie}`;
12155
+ if (q <= (J || 0)) {
12156
+ m.value = `无法删除更多块。最小块数量为 ${J}`;
12155
12157
  return;
12156
12158
  }
12157
- O.children.splice(F, 1);
12159
+ D.children.splice(H, 1);
12158
12160
  break;
12159
12161
  }
12160
- m.value = "", Y(r.value);
12162
+ m.value = "", F(r.value);
12161
12163
  }
12162
12164
  function g(x, y) {
12163
- let D = y.attrs.class.replace(/icon-\S+/g, `icon-${x}`);
12164
- y.attrs.class = D;
12165
+ let O = y.attrs.class.replace(/icon-\S+/g, `icon-${x}`);
12166
+ y.attrs.class = O;
12165
12167
  }
12166
12168
  function w(x, y) {
12167
12169
  y.attrs.src = x;
@@ -12169,15 +12171,15 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12169
12171
  const Q = z(a.previewWidth), ce = z(375);
12170
12172
  let be = z(!1), Ne = z(""), Re = 0, ge = 0;
12171
12173
  function _e(x) {
12172
- Ne.value = x, be.value = !0, Re = event.clientX, ge = Q.value, window.addEventListener("mousemove", ae), window.addEventListener("mouseup", ve);
12174
+ Ne.value = x, be.value = !0, Re = event.clientX, ge = Q.value, window.addEventListener("mousemove", ie), window.addEventListener("mouseup", ve);
12173
12175
  }
12174
- function ae(x) {
12176
+ function ie(x) {
12175
12177
  if (!be.value) return;
12176
12178
  const y = x.clientX - Re;
12177
12179
  Ne.value === "preview" ? Q.value = Math.max(200, ge + y) : Ne.value === "structure" && (ce.value = Math.max(200, ge - y));
12178
12180
  }
12179
12181
  function ve() {
12180
- be.value = !1, Ne.value = "", window.removeEventListener("mousemove", ae), window.removeEventListener("mouseup", ve);
12182
+ be.value = !1, Ne.value = "", window.removeEventListener("mousemove", ie), window.removeEventListener("mouseup", ve);
12181
12183
  }
12182
12184
  return (x, y) => (B(), V("div", s1, [
12183
12185
  S("div", {
@@ -12197,7 +12199,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12197
12199
  ], 4),
12198
12200
  S("div", {
12199
12201
  class: "resizer",
12200
- onMousedown: y[0] || (y[0] = (D) => _e("preview"))
12202
+ onMousedown: y[0] || (y[0] = (O) => _e("preview"))
12201
12203
  }, null, 32),
12202
12204
  S("div", o1, [
12203
12205
  S("div", c1, [
@@ -12233,7 +12235,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
12233
12235
  ])) : K("", !0)
12234
12236
  ]));
12235
12237
  }
12236
- }), E1 = /* @__PURE__ */ yt(f1, [["__scopeId", "data-v-4815fdbe"]]), _1 = {
12238
+ }), E1 = /* @__PURE__ */ yt(f1, [["__scopeId", "data-v-199dde04"]]), _1 = {
12237
12239
  install(e) {
12238
12240
  e.component("Designer", E1);
12239
12241
  }