@bygga.dev/editor 1.9.3 → 1.9.4

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.
@@ -41,18 +41,18 @@ function Pe(e) {
41
41
  function Fe(e, t) {
42
42
  return Me.test(e) && Ne(t) ? "about:blank" : Ae(e.toLowerCase() === "style" ? Pe(t) : t);
43
43
  }
44
- function k(e) {
44
+ function Ie(e) {
45
45
  return e = e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g, (e, t, n) => `${t}="${Fe(t, n)}"`), e = e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g, (e, t, n) => `${t}='${Fe(t, n)}'`), /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e) && (e = e.replace(/(\s+)(on)(\w+\s*=)/gi, "$1&#111;n$3")), e = e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi, (e, t, n) => Ne(n) ? `${t}about:blank` : e), e;
46
46
  }
47
- var Ie = Object.prototype.hasOwnProperty;
48
- function Le(e, t) {
49
- return Ie.call(e, t);
47
+ var Le = Object.prototype.hasOwnProperty;
48
+ function Re(e, t) {
49
+ return Le.call(e, t);
50
50
  }
51
- var Re = Array.isArray, A = (e) => typeof e == "function", j = (e) => typeof e == "string", M = (e) => typeof e == "boolean", N = (e) => typeof e == "object" && !!e, ze = (e) => N(e) && A(e.then) && A(e.catch), Be = Object.prototype.toString, Ve = (e) => Be.call(e), P = (e) => Ve(e) === "[object Object]", He = (e) => e == null ? "" : Re(e) || P(e) && e.toString === Be ? JSON.stringify(e, null, 2) : String(e);
51
+ var k = Array.isArray, A = (e) => typeof e == "function", j = (e) => typeof e == "string", M = (e) => typeof e == "boolean", N = (e) => typeof e == "object" && !!e, ze = (e) => N(e) && A(e.then) && A(e.catch), Be = Object.prototype.toString, Ve = (e) => Be.call(e), P = (e) => Ve(e) === "[object Object]", He = (e) => e == null ? "" : k(e) || P(e) && e.toString === Be ? JSON.stringify(e, null, 2) : String(e);
52
52
  function Ue(e, t = "") {
53
53
  return e.reduce((e, n, r) => r === 0 ? e + n : e + t + n, "");
54
54
  }
55
- var We = (e) => !N(e) || Re(e);
55
+ var We = (e) => !N(e) || k(e);
56
56
  function Ge(e, t) {
57
57
  if (We(e) || We(t)) throw Error("Invalid value");
58
58
  let n = [{
@@ -820,7 +820,7 @@ function Ot() {
820
820
  typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Oe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
821
821
  }
822
822
  function kt(e) {
823
- return N(e) && zt(e) === 0 && (Le(e, "b") || Le(e, "body"));
823
+ return N(e) && zt(e) === 0 && (Re(e, "b") || Re(e, "body"));
824
824
  }
825
825
  var At = ["b", "body"];
826
826
  function jt(e) {
@@ -861,7 +861,7 @@ function Gt(e) {
861
861
  function Kt(e, t, n) {
862
862
  for (let n = 0; n < t.length; n++) {
863
863
  let r = t[n];
864
- if (Le(e, r) && e[r] != null) return e[r];
864
+ if (Re(e, r) && e[r] != null) return e[r];
865
865
  }
866
866
  return n;
867
867
  }
@@ -904,14 +904,14 @@ function Qt(e, t) {
904
904
  case 9: return Vt(t, n);
905
905
  case 4: {
906
906
  let r = t;
907
- if (Le(r, "k") && r.k) return e.interpolate(e.named(r.k));
908
- if (Le(r, "key") && r.key) return e.interpolate(e.named(r.key));
907
+ if (Re(r, "k") && r.k) return e.interpolate(e.named(r.k));
908
+ if (Re(r, "key") && r.key) return e.interpolate(e.named(r.key));
909
909
  throw Jt(n);
910
910
  }
911
911
  case 5: {
912
912
  let r = t;
913
- if (Le(r, "i") && D(r.i)) return e.interpolate(e.list(r.i));
914
- if (Le(r, "index") && D(r.index)) return e.interpolate(e.list(r.index));
913
+ if (Re(r, "i") && D(r.i)) return e.interpolate(e.list(r.i));
914
+ if (Re(r, "index") && D(r.index)) return e.interpolate(e.list(r.index));
915
915
  throw Jt(n);
916
916
  }
917
917
  case 6: {
@@ -979,7 +979,7 @@ function cn(e) {
979
979
  } else throw an(rn.NOT_SUPPORT_LOCALE_TYPE);
980
980
  }
981
981
  function ln(e, t, n) {
982
- return [.../* @__PURE__ */ new Set([n, ...Re(t) ? t : N(t) ? Object.keys(t) : j(t) ? [t] : [n]])];
982
+ return [.../* @__PURE__ */ new Set([n, ...k(t) ? t : N(t) ? Object.keys(t) : j(t) ? [t] : [n]])];
983
983
  }
984
984
  function un(e, t, n) {
985
985
  let r = j(n) ? n : En, i = e;
@@ -988,9 +988,9 @@ function un(e, t, n) {
988
988
  if (!a) {
989
989
  a = [];
990
990
  let e = [n];
991
- for (; Re(e);) e = dn(a, e, t);
992
- let o = Re(t) || !P(t) ? t : t.default ? t.default : null;
993
- e = j(o) ? [o] : o, Re(e) && dn(a, e, !1), i.__localeChainCache.set(r, a);
991
+ for (; k(e);) e = dn(a, e, t);
992
+ let o = k(t) || !P(t) ? t : t.default ? t.default : null;
993
+ e = j(o) ? [o] : o, k(e) && dn(a, e, !1), i.__localeChainCache.set(r, a);
994
994
  }
995
995
  return a;
996
996
  }
@@ -1014,7 +1014,7 @@ function pn(e, t, n) {
1014
1014
  if (!e.includes(t) && (r = !0, t)) {
1015
1015
  r = t[t.length - 1] !== "!";
1016
1016
  let i = t.replace(/!/g, "");
1017
- e.push(i), (Re(n) || P(n)) && n[i] && (r = n[i]);
1017
+ e.push(i), (k(n) || P(n)) && n[i] && (r = n[i]);
1018
1018
  }
1019
1019
  return r;
1020
1020
  }
@@ -1124,7 +1124,7 @@ function Cn(e, t) {
1124
1124
  let r = n.length, i = e, a = 0;
1125
1125
  for (; a < r;) {
1126
1126
  let e = n[a];
1127
- if (qt.includes(e) && kt(i) || !N(i) || !Le(i, e)) return null;
1127
+ if (qt.includes(e) && kt(i) || !N(i) || !Re(i, e)) return null;
1128
1128
  let t = i[e];
1129
1129
  if (t === void 0 || A(i)) return null;
1130
1130
  i = t, a++;
@@ -1167,7 +1167,7 @@ var Fn = null, In = (e) => {
1167
1167
  Fn = e;
1168
1168
  }, Ln = () => Fn, Rn = 0;
1169
1169
  function zn(e = {}) {
1170
- let t = A(e.onWarn) ? e.onWarn : _e, n = j(e.version) ? e.version : Tn, r = j(e.locale) || A(e.locale) ? e.locale : En, i = A(r) ? En : r, a = Re(e.fallbackLocale) || P(e.fallbackLocale) || j(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : i, o = P(e.messages) ? e.messages : Bn(i), s = P(e.datetimeFormats) ? e.datetimeFormats : Bn(i), c = P(e.numberFormats) ? e.numberFormats : Bn(i), l = Te(O(), e.modifiers, On()), u = e.pluralRules || O(), d = A(e.missing) ? e.missing : null, f = M(e.missingWarn) || Ce(e.missingWarn) ? e.missingWarn : !0, p = M(e.fallbackWarn) || Ce(e.fallbackWarn) ? e.fallbackWarn : !0, m = !!e.fallbackFormat, h = !!e.unresolving, g = A(e.postTranslation) ? e.postTranslation : null, _ = P(e.processor) ? e.processor : null, v = M(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, y = !!e.escapeParameter, b = A(e.messageCompiler) ? e.messageCompiler : kn, x = A(e.messageResolver) ? e.messageResolver : jn || Sn, ee = A(e.localeFallbacker) ? e.localeFallbacker : Nn || ln, S = N(e.fallbackContext) ? e.fallbackContext : void 0, C = e, w = N(C.__datetimeFormatters) ? C.__datetimeFormatters : /* @__PURE__ */ new Map(), T = N(C.__numberFormatters) ? C.__numberFormatters : /* @__PURE__ */ new Map(), te = N(C.__meta) ? C.__meta : {};
1170
+ let t = A(e.onWarn) ? e.onWarn : _e, n = j(e.version) ? e.version : Tn, r = j(e.locale) || A(e.locale) ? e.locale : En, i = A(r) ? En : r, a = k(e.fallbackLocale) || P(e.fallbackLocale) || j(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : i, o = P(e.messages) ? e.messages : Bn(i), s = P(e.datetimeFormats) ? e.datetimeFormats : Bn(i), c = P(e.numberFormats) ? e.numberFormats : Bn(i), l = Te(O(), e.modifiers, On()), u = e.pluralRules || O(), d = A(e.missing) ? e.missing : null, f = M(e.missingWarn) || Ce(e.missingWarn) ? e.missingWarn : !0, p = M(e.fallbackWarn) || Ce(e.fallbackWarn) ? e.fallbackWarn : !0, m = !!e.fallbackFormat, h = !!e.unresolving, g = A(e.postTranslation) ? e.postTranslation : null, _ = P(e.processor) ? e.processor : null, v = M(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, y = !!e.escapeParameter, b = A(e.messageCompiler) ? e.messageCompiler : kn, x = A(e.messageResolver) ? e.messageResolver : jn || Sn, ee = A(e.localeFallbacker) ? e.localeFallbacker : Nn || ln, S = N(e.fallbackContext) ? e.fallbackContext : void 0, C = e, w = N(C.__datetimeFormatters) ? C.__datetimeFormatters : /* @__PURE__ */ new Map(), T = N(C.__numberFormatters) ? C.__numberFormatters : /* @__PURE__ */ new Map(), te = N(C.__meta) ? C.__meta : {};
1171
1171
  Rn++;
1172
1172
  let ne = {
1173
1173
  version: n,
@@ -1373,7 +1373,7 @@ function sr(e = {}) {
1373
1373
  linked: (e, ...t) => {
1374
1374
  let [n, r] = t, i = "text", a = "";
1375
1375
  t.length === 1 ? N(n) ? (a = n.modifier || a, i = n.type || i) : j(n) && (a = n || a) : t.length === 2 && (j(n) && (a = n || a), j(r) && (i = r || i));
1376
- let o = u(e, !0)(m), s = o === "" || o === void 0 ? e : o, c = i === "vnode" && Re(s) && a ? s[0] : s;
1376
+ let o = u(e, !0)(m), s = o === "" || o === void 0 ? e : o, c = i === "vnode" && k(s) && a ? s[0] : s;
1377
1377
  return a ? d(a)(c, i) : c;
1378
1378
  },
1379
1379
  message: u,
@@ -1399,10 +1399,10 @@ function ur(e, ...t) {
1399
1399
  });
1400
1400
  if (ee) return b;
1401
1401
  let C = mr(e, S, sr(_r(e, v, y, l))), w = r ? r(C, c) : C;
1402
- return f && j(w) && (w = k(w)), w;
1402
+ return f && j(w) && (w = Ie(w)), w;
1403
1403
  }
1404
1404
  function dr(e) {
1405
- Re(e.list) ? e.list = e.list.map((e) => j(e) ? ke(e) : e) : N(e.named) && Object.keys(e.named).forEach((t) => {
1405
+ k(e.list) ? e.list = e.list.map((e) => j(e) ? ke(e) : e) : N(e.named) && Object.keys(e.named).forEach((t) => {
1406
1406
  j(e.named[t]) && (e.named[t] = ke(e.named[t]));
1407
1407
  });
1408
1408
  }
@@ -1438,7 +1438,7 @@ function hr(...e) {
1438
1438
  let [t, n, r] = e, i = O();
1439
1439
  if (!j(t) && !D(t) && !lr(t) && !kt(t)) throw an(rn.INVALID_ARGUMENT);
1440
1440
  let a = D(t) ? String(t) : (lr(t), t);
1441
- return D(n) ? i.plural = n : j(n) ? i.default = n : P(n) && !we(n) ? i.named = n : Re(n) && (i.list = n), D(r) ? i.plural = r : j(r) ? i.default = r : P(r) && Te(i, r), [a, i];
1441
+ return D(n) ? i.plural = n : j(n) ? i.default = n : P(n) && !we(n) ? i.named = n : k(n) && (i.list = n), D(r) ? i.plural = r : j(r) ? i.default = r : P(r) && Te(i, r), [a, i];
1442
1442
  }
1443
1443
  function gr(e, t, n, r, i, a) {
1444
1444
  return {
@@ -1510,7 +1510,7 @@ var Tr = /* #__PURE__*/ ye("__injectWithOption"), Er = /* #__PURE__*/ ye("__disp
1510
1510
  Dr.FALLBACK_TO_ROOT, Dr.NOT_FOUND_PARENT_SCOPE, Dr.IGNORE_OBJ_FLATTEN, Dr.DEPRECATE_LEGACY_MODE, Dr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE, Dr.DUPLICATE_USE_I18N_CALLING;
1511
1511
  function Or(e) {
1512
1512
  if (!N(e) || kt(e)) return e;
1513
- for (let t in e) if (Le(e, t)) if (!t.includes(".")) N(e[t]) && Or(e[t]);
1513
+ for (let t in e) if (Re(e, t)) if (!t.includes(".")) N(e[t]) && Or(e[t]);
1514
1514
  else {
1515
1515
  let n = t.split("."), r = n.length - 1, i = e, a = !1;
1516
1516
  for (let e = 0; e < r; e++) {
@@ -1529,13 +1529,13 @@ function Or(e) {
1529
1529
  return e;
1530
1530
  }
1531
1531
  function kr(e, t) {
1532
- let { messages: n, __i18n: r, messageResolver: i, flatJson: a } = t, o = P(n) ? n : Re(r) ? O() : { [e]: O() };
1533
- if (Re(r) && r.forEach((e) => {
1532
+ let { messages: n, __i18n: r, messageResolver: i, flatJson: a } = t, o = P(n) ? n : k(r) ? O() : { [e]: O() };
1533
+ if (k(r) && r.forEach((e) => {
1534
1534
  if ("locale" in e && "resource" in e) {
1535
1535
  let { locale: t, resource: n } = e;
1536
1536
  t ? (o[t] = o[t] || O(), Ge(n, o[t])) : Ge(n, o);
1537
1537
  } else j(e) && Ge(JSON.parse(e), o);
1538
- }), i == null && a) for (let e in o) Le(o, e) && Or(o[e]);
1538
+ }), i == null && a) for (let e in o) Re(o, e) && Or(o[e]);
1539
1539
  return o;
1540
1540
  }
1541
1541
  function Ar(e) {
@@ -1575,7 +1575,7 @@ function Lr(e) {
1575
1575
  return ((t, n, r, i) => e(n, r, Nr() || void 0, i));
1576
1576
  }
1577
1577
  function Rr(e = {}) {
1578
- let { __root: t, __injectWithOption: n } = e, r = t === void 0, i = e.flatJson, a = ve ? oe : pe, o = M(e.inheritLocale) ? e.inheritLocale : !0, s = a(t && o ? t.locale.value : j(e.locale) ? e.locale : En), c = a(t && o ? t.fallbackLocale.value : j(e.fallbackLocale) || Re(e.fallbackLocale) || P(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s.value), l = a(kr(s.value, e)), u = a(P(e.datetimeFormats) ? e.datetimeFormats : { [s.value]: {} }), d = a(P(e.numberFormats) ? e.numberFormats : { [s.value]: {} }), f = t ? t.missingWarn : M(e.missingWarn) || Ce(e.missingWarn) ? e.missingWarn : !0, p = t ? t.fallbackWarn : M(e.fallbackWarn) || Ce(e.fallbackWarn) ? e.fallbackWarn : !0, m = t ? t.fallbackRoot : M(e.fallbackRoot) ? e.fallbackRoot : !0, h = !!e.fallbackFormat, _ = A(e.missing) ? e.missing : null, v = A(e.missing) ? Lr(e.missing) : null, y = A(e.postTranslation) ? e.postTranslation : null, b = t ? t.warnHtmlMessage : M(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, x = !!e.escapeParameter, S = t ? t.modifiers : P(e.modifiers) ? e.modifiers : {}, C = e.pluralRules || t && t.pluralRules, w;
1578
+ let { __root: t, __injectWithOption: n } = e, r = t === void 0, i = e.flatJson, a = ve ? oe : pe, o = M(e.inheritLocale) ? e.inheritLocale : !0, s = a(t && o ? t.locale.value : j(e.locale) ? e.locale : En), c = a(t && o ? t.fallbackLocale.value : j(e.fallbackLocale) || k(e.fallbackLocale) || P(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : s.value), l = a(kr(s.value, e)), u = a(P(e.datetimeFormats) ? e.datetimeFormats : { [s.value]: {} }), d = a(P(e.numberFormats) ? e.numberFormats : { [s.value]: {} }), f = t ? t.missingWarn : M(e.missingWarn) || Ce(e.missingWarn) ? e.missingWarn : !0, p = t ? t.fallbackWarn : M(e.fallbackWarn) || Ce(e.fallbackWarn) ? e.fallbackWarn : !0, m = t ? t.fallbackRoot : M(e.fallbackRoot) ? e.fallbackRoot : !0, h = !!e.fallbackFormat, _ = A(e.missing) ? e.missing : null, v = A(e.missing) ? Lr(e.missing) : null, y = A(e.postTranslation) ? e.postTranslation : null, b = t ? t.warnHtmlMessage : M(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, x = !!e.escapeParameter, S = t ? t.modifiers : P(e.modifiers) ? e.modifiers : {}, C = e.pluralRules || t && t.pluralRules, w;
1579
1579
  w = (() => {
1580
1580
  r && In(null);
1581
1581
  let t = {
@@ -1658,10 +1658,10 @@ function Rr(e = {}) {
1658
1658
  return de(t, n, Te({ resolvedMessage: !0 }, r || {}));
1659
1659
  }
1660
1660
  function me(...e) {
1661
- return ue((t) => Reflect.apply(Kn, null, [t, ...e]), () => Jn(...e), "datetime format", (t) => Reflect.apply(t.d, t, [...e]), () => "", (e) => j(e) || Re(e));
1661
+ return ue((t) => Reflect.apply(Kn, null, [t, ...e]), () => Jn(...e), "datetime format", (t) => Reflect.apply(t.d, t, [...e]), () => "", (e) => j(e) || k(e));
1662
1662
  }
1663
1663
  function he(...e) {
1664
- return ue((t) => Reflect.apply(Xn, null, [t, ...e]), () => Qn(...e), "number format", (t) => Reflect.apply(t.n, t, [...e]), () => "", (e) => j(e) || Re(e));
1664
+ return ue((t) => Reflect.apply(Xn, null, [t, ...e]), () => Qn(...e), "number format", (t) => Reflect.apply(t.n, t, [...e]), () => "", (e) => j(e) || k(e));
1665
1665
  }
1666
1666
  function ge(e) {
1667
1667
  return e.map((e) => j(e) || D(e) || M(e) ? Mr(String(e)) : e);
@@ -1680,13 +1680,13 @@ function Rr(e = {}) {
1680
1680
  r.processor = null;
1681
1681
  }
1682
1682
  return n;
1683
- }, () => hr(...e), "translate", (t) => t[xr](...e), (e) => [Mr(e)], (e) => Re(e));
1683
+ }, () => hr(...e), "translate", (t) => t[xr](...e), (e) => [Mr(e)], (e) => k(e));
1684
1684
  }
1685
1685
  function be(...e) {
1686
- return ue((t) => Reflect.apply(Xn, null, [t, ...e]), () => Qn(...e), "number format", (t) => t[Cr](...e), Pr, (e) => j(e) || Re(e));
1686
+ return ue((t) => Reflect.apply(Xn, null, [t, ...e]), () => Qn(...e), "number format", (t) => t[Cr](...e), Pr, (e) => j(e) || k(e));
1687
1687
  }
1688
1688
  function xe(...e) {
1689
- return ue((t) => Reflect.apply(Kn, null, [t, ...e]), () => Jn(...e), "datetime format", (t) => t[Sr](...e), Pr, (e) => j(e) || Re(e));
1689
+ return ue((t) => Reflect.apply(Kn, null, [t, ...e]), () => Jn(...e), "datetime format", (t) => t[Sr](...e), Pr, (e) => j(e) || k(e));
1690
1690
  }
1691
1691
  function Se(e) {
1692
1692
  C = e, w.pluralRules = C;
@@ -1722,7 +1722,7 @@ function Rr(e = {}) {
1722
1722
  function Oe(e, t) {
1723
1723
  if (i) {
1724
1724
  let n = { [e]: t };
1725
- for (let e in n) Le(n, e) && Or(n[e]);
1725
+ for (let e in n) Re(n, e) && Or(n[e]);
1726
1726
  t = n[e];
1727
1727
  }
1728
1728
  l.value[e] = t, w.messages = l.value;
@@ -1730,7 +1730,7 @@ function Rr(e = {}) {
1730
1730
  function ke(e, t) {
1731
1731
  l.value[e] = l.value[e] || {};
1732
1732
  let n = { [e]: t };
1733
- if (i) for (let e in n) Le(n, e) && Or(n[e]);
1733
+ if (i) for (let e in n) Re(n, e) && Or(n[e]);
1734
1734
  t = n[e], Ge(t, l.value[e]), w.messages = l.value;
1735
1735
  }
1736
1736
  function Ae(e) {
@@ -1756,7 +1756,7 @@ function Rr(e = {}) {
1756
1756
  }), ee(t.fallbackLocale, (e) => {
1757
1757
  o && (c.value = e, w.fallbackLocale = e, Hn(w, s.value, c.value));
1758
1758
  }));
1759
- let k = {
1759
+ let Ie = {
1760
1760
  id: Ir,
1761
1761
  locale: te,
1762
1762
  fallbackLocale: ne,
@@ -1825,7 +1825,7 @@ function Rr(e = {}) {
1825
1825
  setMissingHandler: le,
1826
1826
  [wr]: Se
1827
1827
  };
1828
- return k.datetimeFormats = ie, k.numberFormats = ae, k.rt = fe, k.te = we, k.tm = O, k.d = me, k.n = he, k.getDateTimeFormat = Ae, k.setDateTimeFormat = je, k.mergeDateTimeFormat = Me, k.getNumberFormat = Ne, k.setNumberFormat = Pe, k.mergeNumberFormat = Fe, k[Tr] = n, k[xr] = ye, k[Sr] = xe, k[Cr] = be, k;
1828
+ return Ie.datetimeFormats = ie, Ie.numberFormats = ae, Ie.rt = fe, Ie.te = we, Ie.tm = O, Ie.d = me, Ie.n = he, Ie.getDateTimeFormat = Ae, Ie.setDateTimeFormat = je, Ie.mergeDateTimeFormat = Me, Ie.getNumberFormat = Ne, Ie.setNumberFormat = Pe, Ie.mergeNumberFormat = Fe, Ie[Tr] = n, Ie[xr] = ye, Ie[Sr] = xe, Ie[Cr] = be, Ie;
1829
1829
  }
1830
1830
  var zr = {
1831
1831
  tag: { type: [String, Object] },
@@ -17314,17 +17314,17 @@ var jE = { class: "checkbox-option" }, ME = {
17314
17314
  ], UE = {
17315
17315
  key: 0,
17316
17316
  class: "value"
17317
- }, WE = ["id", "aria-label"], GE = ["aria-label"], KE = [
17317
+ }, WE = ["id", "aria-label"], GE = ["id"], KE = ["aria-label", "aria-labelledby"], qE = [
17318
17318
  "aria-checked",
17319
17319
  "aria-label",
17320
17320
  "tabindex",
17321
17321
  "onClick",
17322
17322
  "onKeydown"
17323
- ], qE = [
17323
+ ], JE = [
17324
17324
  "aria-label",
17325
17325
  "aria-valuenow",
17326
17326
  "aria-valuetext"
17327
- ], JE = ["aria-label", "aria-valuenow"], YE = /*#__PURE__*/ Bw(/* @__PURE__ */ d({
17327
+ ], YE = ["aria-label", "aria-valuenow"], XE = /*#__PURE__*/ Bw(/* @__PURE__ */ d({
17328
17328
  __name: "ColorPicker",
17329
17329
  props: /*@__PURE__*/ u({
17330
17330
  label: { type: String },
@@ -17342,14 +17342,27 @@ var jE = { class: "checkbox-option" }, ME = {
17342
17342
  }),
17343
17343
  emits: ["update:modelValue"],
17344
17344
  setup(e) {
17345
- let t = x(e, "modelValue"), { t: o } = bE(), l = s(CE, void 0), u = g(() => l?.value.colors ?? []), d = g(() => u.value.length > 0), p = c(), m = oe(!1), v = oe(0), y = oe(0), S = oe(0), C = oe({
17345
+ let t = x(e, "modelValue"), { t: o } = bE(), l = s(CE, void 0), u = g(() => {
17346
+ let e = l?.value;
17347
+ return [{
17348
+ key: "global",
17349
+ label: e?.colorsLabel ?? o("colorPicker.palette"),
17350
+ named: e?.colorsLabel !== void 0,
17351
+ colors: e?.colors ?? []
17352
+ }, {
17353
+ key: "local",
17354
+ label: e?.localColorsLabel ?? o("colorPicker.localPalette"),
17355
+ named: e?.localColorsLabel !== void 0,
17356
+ colors: e?.localColors ?? []
17357
+ }].filter((e) => e.colors.length > 0);
17358
+ }), d = g(() => u.value.flatMap((e) => e.colors)), p = g(() => u.value.length > 1 || u.value.some((e) => e.named)), m = g(() => u.value.length > 0 && !l?.value.anyColor), v = c(), y = oe(!1), S = oe(0), C = oe(0), w = oe(0), te = oe({
17346
17359
  r: 0,
17347
17360
  g: 0,
17348
17361
  b: 0
17349
- }), w = oe(_i(C.value)), te = oe(!1), ie = b("trigger"), ae = b("popover"), se = b("svArea");
17362
+ }), ie = oe(_i(te.value)), ae = oe(!1), se = b("trigger"), ce = b("popover"), le = b("svArea");
17350
17363
  ee(t, (e) => {
17351
17364
  if (e.type === "transparent") {
17352
- te.value || (w.value = _i(C.value));
17365
+ ae.value || (ie.value = _i(te.value));
17353
17366
  return;
17354
17367
  }
17355
17368
  let t = {
@@ -17357,65 +17370,65 @@ var jE = { class: "checkbox-option" }, ME = {
17357
17370
  g: e.g,
17358
17371
  b: e.b
17359
17372
  };
17360
- C.value = t, te.value || (w.value = _i(t));
17373
+ te.value = t, ae.value || (ie.value = _i(t));
17361
17374
  let n = hi({
17362
- h: v.value,
17363
- s: y.value,
17364
- v: S.value
17375
+ h: S.value,
17376
+ s: C.value,
17377
+ v: w.value
17365
17378
  });
17366
17379
  if (n.r === t.r && n.g === t.g && n.b === t.b) return;
17367
17380
  let r = mi(t);
17368
- y.value = r.s, S.value = r.v, r.s > 0 && (v.value = r.h);
17381
+ C.value = r.s, w.value = r.v, r.s > 0 && (S.value = r.h);
17369
17382
  }, { immediate: !0 });
17370
- function ce() {
17383
+ function de() {
17371
17384
  t.value = {
17372
17385
  type: "color",
17373
17386
  ...hi({
17374
- h: v.value,
17375
- s: y.value,
17376
- v: S.value
17387
+ h: S.value,
17388
+ s: C.value,
17389
+ v: w.value
17377
17390
  })
17378
17391
  };
17379
17392
  }
17380
- let le = g(() => t.value.type === "transparent"), de = g(() => bi(t.value)), fe = g(() => le.value ? o("colorPicker.transparent") : xi(t.value) ?? ""), pe = g(() => le.value ? o("colorPicker.transparentValue") : o("colorPicker.colorValue", { value: xi(t.value) ?? "" })), me = g(() => e.label ? `${e.label}: ${pe.value}` : pe.value), he = g(() => `hsl(${v.value}, 100%, 50%)`), ge = g(() => _i(hi({
17381
- h: v.value,
17382
- s: y.value,
17383
- v: S.value
17384
- }))), _e = g(() => o("colorPicker.svValue", {
17385
- s: Math.round(y.value * 100),
17386
- v: Math.round(S.value * 100),
17387
- hex: ge.value
17388
- })), ve = null, ye = null;
17389
- function be() {
17390
- ve && window.removeEventListener("pointermove", ve), ye && (window.removeEventListener("pointerup", ye), window.removeEventListener("pointercancel", ye)), ve = null, ye = null;
17391
- }
17392
- function xe(e) {
17393
- be();
17393
+ let fe = g(() => t.value.type === "transparent"), pe = g(() => bi(t.value)), me = g(() => fe.value ? o("colorPicker.transparent") : xi(t.value) ?? ""), he = g(() => fe.value ? o("colorPicker.transparentValue") : o("colorPicker.colorValue", { value: xi(t.value) ?? "" })), ge = g(() => e.label ? `${e.label}: ${he.value}` : he.value), _e = g(() => `hsl(${S.value}, 100%, 50%)`), ve = g(() => _i(hi({
17394
+ h: S.value,
17395
+ s: C.value,
17396
+ v: w.value
17397
+ }))), ye = g(() => o("colorPicker.svValue", {
17398
+ s: Math.round(C.value * 100),
17399
+ v: Math.round(w.value * 100),
17400
+ hex: ve.value
17401
+ })), be = null, xe = null;
17402
+ function D() {
17403
+ be && window.removeEventListener("pointermove", be), xe && (window.removeEventListener("pointerup", xe), window.removeEventListener("pointercancel", xe)), be = null, xe = null;
17404
+ }
17405
+ function Se(e) {
17406
+ D();
17394
17407
  let t = (t) => e(t);
17395
- ve = t, ye = be, window.addEventListener("pointermove", t), window.addEventListener("pointerup", be), window.addEventListener("pointercancel", be);
17408
+ be = t, xe = D, window.addEventListener("pointermove", t), window.addEventListener("pointerup", D), window.addEventListener("pointercancel", D);
17396
17409
  }
17397
- function D(e) {
17410
+ function Ce(e) {
17398
17411
  e.preventDefault();
17399
- let t = se.value;
17412
+ let t = le.value;
17400
17413
  if (!t) return;
17401
17414
  let n = (e) => {
17402
17415
  let n = t.getBoundingClientRect();
17403
- y.value = fi((e.clientX - n.left) / n.width), S.value = 1 - fi((e.clientY - n.top) / n.height), ce();
17416
+ C.value = fi((e.clientX - n.left) / n.width), w.value = 1 - fi((e.clientY - n.top) / n.height), de();
17404
17417
  };
17405
- n(e), xe(n);
17418
+ n(e), Se(n);
17406
17419
  }
17407
- function Se(e) {
17420
+ function we(e) {
17408
17421
  e.preventDefault();
17409
17422
  let t = e.currentTarget;
17410
17423
  if (!(t instanceof HTMLElement)) return;
17411
17424
  let n = (e) => {
17412
17425
  let n = t.getBoundingClientRect();
17413
- v.value = fi((e.clientX - n.left) / n.width) * 360, ce();
17426
+ S.value = fi((e.clientX - n.left) / n.width) * 360, de();
17414
17427
  };
17415
- n(e), xe(n);
17428
+ n(e), Se(n);
17416
17429
  }
17417
- function Ce(e) {
17418
- let t = e.shiftKey ? .1 : .02, n = y.value, r = S.value;
17430
+ function Te(e) {
17431
+ let t = e.shiftKey ? .1 : .02, n = C.value, r = w.value;
17419
17432
  switch (e.key) {
17420
17433
  case "ArrowLeft":
17421
17434
  n -= t;
@@ -17443,10 +17456,10 @@ var jE = { class: "checkbox-option" }, ME = {
17443
17456
  break;
17444
17457
  default: return;
17445
17458
  }
17446
- e.preventDefault(), y.value = fi(n), S.value = fi(r), ce();
17459
+ e.preventDefault(), C.value = fi(n), w.value = fi(r), de();
17447
17460
  }
17448
- function we(e) {
17449
- let t = e.shiftKey ? 10 : 1, n = v.value;
17461
+ function Ee(e) {
17462
+ let t = e.shiftKey ? 10 : 1, n = S.value;
17450
17463
  switch (e.key) {
17451
17464
  case "ArrowLeft":
17452
17465
  case "ArrowDown":
@@ -17470,193 +17483,213 @@ var jE = { class: "checkbox-option" }, ME = {
17470
17483
  break;
17471
17484
  default: return;
17472
17485
  }
17473
- e.preventDefault(), v.value = Math.max(0, Math.min(360, n)), ce();
17486
+ e.preventDefault(), S.value = Math.max(0, Math.min(360, n)), de();
17474
17487
  }
17475
- function Te() {
17476
- let e = vi(w.value);
17488
+ function O() {
17489
+ let e = vi(ie.value);
17477
17490
  e && (t.value = {
17478
17491
  type: "color",
17479
17492
  ...e
17480
17493
  });
17481
17494
  }
17482
- function Ee() {
17483
- te.value = !1, w.value = _i(C.value);
17495
+ function De() {
17496
+ ae.value = !1, ie.value = _i(te.value);
17484
17497
  }
17485
- let O = g(() => t.value.type === "transparent" ? void 0 : _i(t.value)), De = g(() => {
17486
- let e = O.value;
17487
- return e && !u.value.includes(e) ? e : void 0;
17488
- }), Oe = g(() => {
17489
- let e = De.value;
17490
- return e ? [...u.value, e] : u.value;
17491
- });
17492
- function ke(e) {
17498
+ let Oe = g(() => t.value.type === "transparent" ? void 0 : _i(t.value)), ke = g(() => {
17499
+ let e = Oe.value;
17500
+ return m.value && e && !d.value.includes(e) ? e : void 0;
17501
+ }), Ae = g(() => u.value.map((e, t) => {
17502
+ let n = ke.value;
17503
+ return t === 0 && n ? [...e.colors, n] : [...e.colors];
17504
+ }));
17505
+ function je(e) {
17493
17506
  let n = vi(e);
17494
17507
  n && (t.value = {
17495
17508
  type: "color",
17496
17509
  ...n
17497
17510
  });
17498
17511
  }
17499
- function Ae(e, t) {
17500
- let n = Oe.value, r = t;
17512
+ function Me(e, t, n) {
17513
+ let r = Ae.value[t] ?? [], i = n;
17501
17514
  switch (e.key) {
17502
17515
  case "ArrowLeft":
17503
17516
  case "ArrowUp":
17504
- r = t - 1;
17517
+ i = n - 1;
17505
17518
  break;
17506
17519
  case "ArrowRight":
17507
17520
  case "ArrowDown":
17508
- r = t + 1;
17521
+ i = n + 1;
17509
17522
  break;
17510
17523
  case "Home":
17511
- r = 0;
17524
+ i = 0;
17512
17525
  break;
17513
17526
  case "End":
17514
- r = n.length - 1;
17527
+ i = r.length - 1;
17515
17528
  break;
17516
17529
  default: return;
17517
17530
  }
17518
17531
  e.preventDefault();
17519
- let i = n[(r + n.length) % n.length];
17520
- i && (ke(i), je.value[n.indexOf(i)]?.focus());
17532
+ let a = r[(i + r.length) % r.length];
17533
+ a && (je(a), Ne.value[t]?.[r.indexOf(a)]?.focus());
17534
+ }
17535
+ let Ne = oe([]);
17536
+ function Pe(e, t, n) {
17537
+ if (e instanceof HTMLElement) {
17538
+ let r = Ne.value[t] ?? [];
17539
+ r[n] = e, Ne.value[t] = r;
17540
+ }
17521
17541
  }
17522
- let je = oe([]);
17523
- function Me(e, t) {
17524
- e instanceof HTMLElement && (je.value[t] = e);
17542
+ function Fe(e, t, n) {
17543
+ let r = Ae.value[e] ?? [], i = Oe.value;
17544
+ return (i !== void 0 && r.includes(i) ? t === i : n === 0) ? 0 : -1;
17525
17545
  }
17526
- function Ne(e) {
17546
+ function Ie(e) {
17527
17547
  t.value = e ? { type: "transparent" } : {
17528
17548
  type: "color",
17529
- ...C.value
17549
+ ...te.value
17530
17550
  };
17531
17551
  }
17532
- function Pe(e) {
17552
+ function Le(e) {
17533
17553
  if (e.newState !== "open") return;
17534
- let t = ie.value, n = ae.value;
17554
+ let t = se.value, n = ce.value;
17535
17555
  if (!(t && n)) return;
17536
17556
  let r = t.getBoundingClientRect(), i = AE(r, window.innerHeight);
17537
17557
  n.style.left = `${r.left}px`, n.style.top = i.side === "below" ? `${i.offset}px` : "auto", n.style.bottom = i.side === "above" ? `${i.offset}px` : "auto", n.style.maxHeight = `${i.maxHeight}px`;
17538
17558
  }
17539
- function Fe(e) {
17540
- if (m.value = e.newState === "open", e.newState !== "open") return;
17541
- if (!d.value) {
17542
- se.value?.focus();
17559
+ function Re(e) {
17560
+ if (y.value = e.newState === "open", e.newState !== "open") return;
17561
+ let t = Oe.value, n = t ? Ae.value.findIndex((e) => e.includes(t)) : -1;
17562
+ if (t && n !== -1) {
17563
+ let e = Ae.value[n]?.indexOf(t) ?? 0;
17564
+ Ne.value[n]?.[e]?.focus();
17565
+ return;
17566
+ }
17567
+ if (!m.value) {
17568
+ le.value?.focus();
17543
17569
  return;
17544
17570
  }
17545
- let t = O.value ? Oe.value.indexOf(O.value) : -1;
17546
- je.value[t === -1 ? 0 : t]?.focus();
17571
+ Ne.value[0]?.[0]?.focus();
17547
17572
  }
17548
17573
  function k(e) {
17549
17574
  let t = e.relatedTarget;
17550
- t instanceof Node && ae.value?.contains(t) || ae.value?.matches(":popover-open") && ae.value.hidePopover();
17575
+ t instanceof Node && ce.value?.contains(t) || ce.value?.matches(":popover-open") && ce.value.hidePopover();
17551
17576
  }
17552
- return n(be), (t, n) => (_(), E("div", { class: ue(["color-picker", { "has-label": e.label && !e.compact }]) }, [
17577
+ return n(D), (t, n) => (_(), E("div", { class: ue(["color-picker", { "has-label": e.label && !e.compact }]) }, [
17553
17578
  e.label && !e.compact ? (_(), E("span", VE, ne(e.label), 1)) : f("", !0),
17554
17579
  i("button", {
17555
17580
  ref_key: "trigger",
17556
- ref: ie,
17581
+ ref: se,
17557
17582
  type: "button",
17558
17583
  class: ue(["trigger", { compact: e.compact }]),
17559
- popovertarget: T(p),
17584
+ popovertarget: T(v),
17560
17585
  "aria-haspopup": "dialog",
17561
- "aria-expanded": m.value,
17562
- "aria-label": me.value
17586
+ "aria-expanded": y.value,
17587
+ "aria-label": ge.value
17563
17588
  }, [i("span", {
17564
- class: ue(["swatch", { checker: le.value }]),
17565
- style: re(le.value ? {} : { backgroundColor: de.value })
17566
- }, null, 6), e.compact ? f("", !0) : (_(), E("span", UE, ne(fe.value), 1))], 10, HE),
17589
+ class: ue(["swatch", { checker: fe.value }]),
17590
+ style: re(fe.value ? {} : { backgroundColor: pe.value })
17591
+ }, null, 6), e.compact ? f("", !0) : (_(), E("span", UE, ne(me.value), 1))], 10, HE),
17567
17592
  i("div", {
17568
- id: T(p),
17593
+ id: T(v),
17569
17594
  ref_key: "popover",
17570
- ref: ae,
17595
+ ref: ce,
17571
17596
  popover: "",
17572
17597
  class: "popover",
17573
17598
  role: "dialog",
17574
17599
  tabindex: "-1",
17575
17600
  "aria-label": e.label ?? T(o)("colorPicker.open"),
17576
- onBeforetoggle: Pe,
17577
- onToggle: Fe,
17601
+ onBeforetoggle: Le,
17602
+ onToggle: Re,
17578
17603
  onFocusout: k
17579
17604
  }, [
17580
- d.value ? (_(), E("div", {
17605
+ (_(!0), E(h, null, a(u.value, (e, t) => (_(), E("div", {
17606
+ key: e.key,
17607
+ class: "palette-section"
17608
+ }, [p.value ? (_(), E("span", {
17581
17609
  key: 0,
17610
+ id: `${T(v)}-${e.key}`,
17611
+ class: "palette-heading"
17612
+ }, ne(e.label), 9, GE)) : f("", !0), i("div", {
17582
17613
  class: "palette",
17583
17614
  role: "radiogroup",
17584
- "aria-label": T(o)("colorPicker.palette")
17585
- }, [(_(!0), E(h, null, a(Oe.value, (e, t) => (_(), E("button", {
17615
+ "aria-label": p.value ? void 0 : e.label,
17616
+ "aria-labelledby": p.value ? `${T(v)}-${e.key}` : void 0
17617
+ }, [(_(!0), E(h, null, a(Ae.value[t], (e, n) => (_(), E("button", {
17586
17618
  key: e,
17587
17619
  ref_for: !0,
17588
- ref: (e) => Me(e, t),
17620
+ ref: (e) => Pe(e, t, n),
17589
17621
  type: "button",
17590
17622
  role: "radio",
17591
- class: ue(["palette-swatch", { "off-brand": e === De.value }]),
17592
- "aria-checked": e === O.value,
17593
- "aria-label": e === De.value ? T(o)("colorPicker.offBrandValue", { value: e }) : T(o)("colorPicker.colorValue", { value: e }),
17594
- tabindex: e === O.value || !O.value && t === 0 ? 0 : -1,
17623
+ class: ue(["palette-swatch", { "off-brand": e === ke.value }]),
17624
+ "aria-checked": e === Oe.value,
17625
+ "aria-label": e === ke.value ? T(o)("colorPicker.offBrandValue", { value: e }) : T(o)("colorPicker.colorValue", { value: e }),
17626
+ tabindex: Fe(t, e, n),
17595
17627
  style: re({ backgroundColor: e }),
17596
- onClick: (t) => ke(e),
17597
- onKeydown: (e) => Ae(e, t)
17598
- }, null, 46, KE))), 128))], 8, GE)) : (_(), E(h, { key: 1 }, [i("div", {
17628
+ onClick: (t) => je(e),
17629
+ onKeydown: (e) => Me(e, t, n)
17630
+ }, null, 46, qE))), 128))], 8, KE)]))), 128)),
17631
+ m.value ? f("", !0) : (_(), E(h, { key: 0 }, [i("div", {
17599
17632
  ref_key: "svArea",
17600
- ref: se,
17633
+ ref: le,
17601
17634
  class: "sv-area",
17602
17635
  role: "slider",
17603
17636
  tabindex: "0",
17604
17637
  "aria-label": T(o)("colorPicker.saturationValue"),
17605
17638
  "aria-valuemin": "0",
17606
17639
  "aria-valuemax": "100",
17607
- "aria-valuenow": Math.round(S.value * 100),
17608
- "aria-valuetext": _e.value,
17609
- style: re({ backgroundColor: he.value }),
17610
- onPointerdown: D,
17611
- onKeydown: Ce
17640
+ "aria-valuenow": Math.round(w.value * 100),
17641
+ "aria-valuetext": ye.value,
17642
+ style: re({ backgroundColor: _e.value }),
17643
+ onPointerdown: Ce,
17644
+ onKeydown: Te
17612
17645
  }, [i("div", {
17613
17646
  class: "sv-thumb",
17614
17647
  style: re({
17615
- left: `${y.value * 100}%`,
17616
- top: `${(1 - S.value) * 100}%`,
17617
- backgroundColor: ge.value
17648
+ left: `${C.value * 100}%`,
17649
+ top: `${(1 - w.value) * 100}%`,
17650
+ backgroundColor: ve.value
17618
17651
  })
17619
- }, null, 4)], 44, qE), i("div", {
17652
+ }, null, 4)], 44, JE), i("div", {
17620
17653
  class: "hue-track",
17621
17654
  role: "slider",
17622
17655
  tabindex: "0",
17623
17656
  "aria-label": T(o)("colorPicker.hue"),
17624
17657
  "aria-valuemin": "0",
17625
17658
  "aria-valuemax": "360",
17626
- "aria-valuenow": Math.round(v.value),
17627
- onPointerdown: Se,
17628
- onKeydown: we
17659
+ "aria-valuenow": Math.round(S.value),
17660
+ onPointerdown: we,
17661
+ onKeydown: Ee
17629
17662
  }, [i("div", {
17630
17663
  class: "hue-thumb",
17631
- style: re({ left: `${v.value / 360 * 100}%` })
17632
- }, null, 4)], 40, JE)], 64)),
17633
- d.value ? f("", !0) : (_(), r(BE, {
17634
- key: 2,
17635
- modelValue: w.value,
17636
- "onUpdate:modelValue": n[0] ||= (e) => w.value = e,
17664
+ style: re({ left: `${S.value / 360 * 100}%` })
17665
+ }, null, 4)], 40, YE)], 64)),
17666
+ m.value ? f("", !0) : (_(), r(BE, {
17667
+ key: 1,
17668
+ modelValue: ie.value,
17669
+ "onUpdate:modelValue": n[0] ||= (e) => ie.value = e,
17637
17670
  spellcheck: "false",
17638
17671
  autocomplete: "off",
17639
17672
  "aria-label": T(o)("colorPicker.hex"),
17640
- "aria-invalid": !T(vi)(w.value),
17641
- onFocus: n[1] ||= (e) => te.value = !0,
17642
- onInput: Te,
17643
- onBlur: Ee
17673
+ "aria-invalid": !T(vi)(ie.value),
17674
+ onFocus: n[1] ||= (e) => ae.value = !0,
17675
+ onInput: O,
17676
+ onBlur: De
17644
17677
  }, null, 8, [
17645
17678
  "modelValue",
17646
17679
  "aria-label",
17647
17680
  "aria-invalid"
17648
17681
  ])),
17649
17682
  e.allowTransparent ? (_(), r(PE, {
17650
- key: 3,
17683
+ key: 2,
17651
17684
  class: "transparent-toggle",
17652
17685
  label: T(o)("colorPicker.transparent"),
17653
- "model-value": le.value,
17654
- "onUpdate:modelValue": Ne
17686
+ "model-value": fe.value,
17687
+ "onUpdate:modelValue": Ie
17655
17688
  }, null, 8, ["label", "model-value"])) : f("", !0)
17656
17689
  ], 40, WE)
17657
17690
  ], 2));
17658
17691
  }
17659
- }), [["styles", [".color-picker[data-v-5291d465]{flex-direction:column;gap:.5em;display:flex}.picker-label[data-v-5291d465]{background:var(--bygga-color-surface);color:var(--bygga-color-text-muted);pointer-events:none;z-index:1;padding:0 4px;font-size:12px;line-height:1;position:absolute;top:0;left:12px;transform:translateY(-50%)}.color-picker.has-label[data-v-5291d465]{position:relative}.color-picker.has-label:has(.trigger:focus-visible) .picker-label[data-v-5291d465]{color:var(--bygga-color-accent)}.trigger[data-v-5291d465]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);box-sizing:border-box;cursor:pointer;align-items:center;gap:8px;min-height:40px;padding:0 12px;display:inline-flex}.trigger[data-v-5291d465]:hover,.trigger[data-v-5291d465]:focus-visible{border-color:var(--bygga-color-accent)}.trigger.compact[data-v-5291d465]{border-color:#0000;border-radius:4px;justify-content:center;width:30px;height:30px;min-height:0;padding:0}.trigger.compact .swatch[data-v-5291d465]{border-color:var(--bygga-color-border-subtle)}.trigger.compact[data-v-5291d465]:hover,.trigger.compact[data-v-5291d465]:focus-visible{background:color-mix(in srgb, var(--bygga-color-text) 10%, transparent);border-color:#0000}.swatch[data-v-5291d465]{border:1px solid var(--bygga-color-border);border-radius:4px;flex-shrink:0;width:20px;height:20px}.value[data-v-5291d465]{color:var(--bygga-color-text-muted);font-variant-numeric:tabular-nums}.checker[data-v-5291d465]{background-color:#fff;background-image:linear-gradient(45deg,#ccc 25%,#0000 25%),linear-gradient(-45deg,#ccc 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#ccc 75%),linear-gradient(-45deg,#0000 75%,#ccc 75%);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px}.popover[data-v-5291d465]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-md);box-shadow:var(--bygga-shadow-card);box-sizing:border-box;flex-direction:column;gap:12px;width:224px;max-height:calc(100vh - 16px);margin:0;padding:12px;position:fixed;inset:auto;overflow-y:auto}.popover[data-v-5291d465]:popover-open{display:flex}.sv-area[data-v-5291d465]{border-radius:var(--bygga-radius-sm);cursor:crosshair;touch-action:none;background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#fff0);width:100%;height:160px;position:relative}.sv-area[data-v-5291d465]:focus-visible{outline:2px solid var(--bygga-color-accent);outline-offset:2px}.sv-thumb[data-v-5291d465]{box-sizing:border-box;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;margin:-7px 0 0 -7px;position:absolute;box-shadow:0 0 0 1px #0000004d}.hue-track[data-v-5291d465]{cursor:pointer;touch-action:none;background:linear-gradient(90deg,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);border-radius:999px;width:100%;height:12px;position:relative}.hue-track[data-v-5291d465]:focus-visible{outline:2px solid var(--bygga-color-accent);outline-offset:2px}.hue-thumb[data-v-5291d465]{border:1px solid var(--bygga-color-border);box-shadow:var(--bygga-shadow-raised);box-sizing:border-box;pointer-events:none;background:#fff;border-radius:50%;width:16px;height:16px;margin-left:-8px;position:absolute;top:50%;transform:translateY(-50%)}.palette[data-v-5291d465]{grid-template-columns:repeat(auto-fill,minmax(32px,1fr));gap:8px;display:grid}.palette-swatch[data-v-5291d465]{aspect-ratio:1;border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);cursor:pointer;width:100%;padding:0}.palette-swatch[data-v-5291d465]:hover,.palette-swatch[data-v-5291d465]:focus-visible{outline:2px solid var(--bygga-color-accent);outline-offset:2px}.palette-swatch[aria-checked=true][data-v-5291d465]{box-shadow:inset 0 0 0 2px var(--bygga-color-surface), inset 0 0 0 4px var(--bygga-color-accent,currentcolor)}.palette-swatch.off-brand[data-v-5291d465]{border-style:dashed;border-width:2px}.transparent-toggle[data-v-5291d465]{align-self:flex-start}.swatch[data-v-5291d465],.checker[data-v-5291d465],.sv-area[data-v-5291d465],.sv-thumb[data-v-5291d465],.hue-track[data-v-5291d465],.hue-thumb[data-v-5291d465],.palette-swatch[data-v-5291d465]{forced-color-adjust:none}"]], ["__scopeId", "data-v-5291d465"]]), XE = { class: "select-wrap" }, ZE = ["id", "disabled"], QE = /*#__PURE__*/ Bw(/* @__PURE__ */ d({
17692
+ }), [["styles", [".color-picker[data-v-0017a56c]{flex-direction:column;gap:.5em;display:flex}.picker-label[data-v-0017a56c]{background:var(--bygga-color-surface);color:var(--bygga-color-text-muted);pointer-events:none;z-index:1;padding:0 4px;font-size:12px;line-height:1;position:absolute;top:0;left:12px;transform:translateY(-50%)}.color-picker.has-label[data-v-0017a56c]{position:relative}.color-picker.has-label:has(.trigger:focus-visible) .picker-label[data-v-0017a56c]{color:var(--bygga-color-accent)}.trigger[data-v-0017a56c]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);box-sizing:border-box;cursor:pointer;align-items:center;gap:8px;min-height:40px;padding:0 12px;display:inline-flex}.trigger[data-v-0017a56c]:hover,.trigger[data-v-0017a56c]:focus-visible{border-color:var(--bygga-color-accent)}.trigger.compact[data-v-0017a56c]{border-color:#0000;border-radius:4px;justify-content:center;width:30px;height:30px;min-height:0;padding:0}.trigger.compact .swatch[data-v-0017a56c]{border-color:var(--bygga-color-border-subtle)}.trigger.compact[data-v-0017a56c]:hover,.trigger.compact[data-v-0017a56c]:focus-visible{background:color-mix(in srgb, var(--bygga-color-text) 10%, transparent);border-color:#0000}.swatch[data-v-0017a56c]{border:1px solid var(--bygga-color-border);border-radius:4px;flex-shrink:0;width:20px;height:20px}.value[data-v-0017a56c]{color:var(--bygga-color-text-muted);font-variant-numeric:tabular-nums}.checker[data-v-0017a56c]{background-color:#fff;background-image:linear-gradient(45deg,#ccc 25%,#0000 25%),linear-gradient(-45deg,#ccc 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#ccc 75%),linear-gradient(-45deg,#0000 75%,#ccc 75%);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px}.popover[data-v-0017a56c]{background:var(--bygga-color-surface);border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-md);box-shadow:var(--bygga-shadow-card);box-sizing:border-box;flex-direction:column;gap:12px;width:224px;max-height:calc(100vh - 16px);margin:0;padding:12px;position:fixed;inset:auto;overflow-y:auto}.popover[data-v-0017a56c]:popover-open{display:flex}.sv-area[data-v-0017a56c]{border-radius:var(--bygga-radius-sm);cursor:crosshair;touch-action:none;background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#fff0);width:100%;height:160px;position:relative}.sv-area[data-v-0017a56c]:focus-visible{outline:2px solid var(--bygga-color-accent);outline-offset:2px}.sv-thumb[data-v-0017a56c]{box-sizing:border-box;pointer-events:none;border:2px solid #fff;border-radius:50%;width:14px;height:14px;margin:-7px 0 0 -7px;position:absolute;box-shadow:0 0 0 1px #0000004d}.hue-track[data-v-0017a56c]{cursor:pointer;touch-action:none;background:linear-gradient(90deg,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);border-radius:999px;width:100%;height:12px;position:relative}.hue-track[data-v-0017a56c]:focus-visible{outline:2px solid var(--bygga-color-accent);outline-offset:2px}.hue-thumb[data-v-0017a56c]{border:1px solid var(--bygga-color-border);box-shadow:var(--bygga-shadow-raised);box-sizing:border-box;pointer-events:none;background:#fff;border-radius:50%;width:16px;height:16px;margin-left:-8px;position:absolute;top:50%;transform:translateY(-50%)}.palette-section[data-v-0017a56c]{flex-direction:column;gap:6px;display:flex}.palette-heading[data-v-0017a56c]{color:var(--bygga-color-text-muted);font-size:12px;font-weight:500;line-height:16px}.palette[data-v-0017a56c]{grid-template-columns:repeat(auto-fill,minmax(32px,1fr));gap:8px;display:grid}.palette-swatch[data-v-0017a56c]{aspect-ratio:1;border:1px solid var(--bygga-color-border);border-radius:var(--bygga-radius-sm);cursor:pointer;width:100%;padding:0}.palette-swatch[data-v-0017a56c]:hover,.palette-swatch[data-v-0017a56c]:focus-visible{outline:2px solid var(--bygga-color-accent);outline-offset:2px}.palette-swatch[aria-checked=true][data-v-0017a56c]{box-shadow:inset 0 0 0 2px var(--bygga-color-surface), inset 0 0 0 4px var(--bygga-color-accent,currentcolor)}.palette-swatch.off-brand[data-v-0017a56c]{border-style:dashed;border-width:2px}.transparent-toggle[data-v-0017a56c]{align-self:flex-start}.swatch[data-v-0017a56c],.checker[data-v-0017a56c],.sv-area[data-v-0017a56c],.sv-thumb[data-v-0017a56c],.hue-track[data-v-0017a56c],.hue-thumb[data-v-0017a56c],.palette-swatch[data-v-0017a56c]{forced-color-adjust:none}"]], ["__scopeId", "data-v-0017a56c"]]), ZE = { class: "select-wrap" }, QE = ["id", "disabled"], $E = /*#__PURE__*/ Bw(/* @__PURE__ */ d({
17660
17693
  inheritAttrs: !1,
17661
17694
  __name: "SelectInput",
17662
17695
  props: /*@__PURE__*/ u({
@@ -17686,14 +17719,14 @@ var jE = { class: "checkbox-option" }, ME = {
17686
17719
  label: r.label,
17687
17720
  "label-for": T(a)
17688
17721
  }, {
17689
- default: e(() => [i("span", XE, [w(i("select", m({
17722
+ default: e(() => [i("span", ZE, [w(i("select", m({
17690
17723
  id: T(a),
17691
17724
  ref_key: "select",
17692
17725
  ref: s,
17693
17726
  "onUpdate:modelValue": u[0] ||= (e) => n.value = e,
17694
17727
  class: "field-select",
17695
17728
  disabled: t.disabled
17696
- }, c.$attrs), [l(c.$slots, "default", {}, void 0, !0)], 16, ZE), [[S, n.value]]), ae(gE, {
17729
+ }, c.$attrs), [l(c.$slots, "default", {}, void 0, !0)], 16, QE), [[S, n.value]]), ae(gE, {
17697
17730
  class: "chevron",
17698
17731
  name: "chevron-down",
17699
17732
  size: 12
@@ -17708,13 +17741,13 @@ var jE = { class: "checkbox-option" }, ME = {
17708
17741
  }), [["styles", [".select-input[data-v-bc9ef2fc]{width:100%;position:relative}.select-wrap[data-v-bc9ef2fc]{flex:1 1 0;min-width:0;display:flex;position:relative}.field-select[data-v-bc9ef2fc]{appearance:none;color:inherit;cursor:pointer;font:inherit;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:none;outline:none;width:100%;min-width:0;padding:0 20px 0 0}.field-select[data-v-bc9ef2fc]:disabled{cursor:not-allowed}.select-input.is-empty .field-select[data-v-bc9ef2fc]{color:var(--bygga-color-text-muted)}.chevron[data-v-bc9ef2fc]{color:var(--bygga-color-text-muted);pointer-events:none;position:absolute;top:50%;right:0;transform:translateY(-50%)}"]], ["__scopeId", "data-v-bc9ef2fc"]]);
17709
17742
  //#endregion
17710
17743
  //#region src/composables/useBrandCustomFonts.ts
17711
- function $E() {
17744
+ function eD() {
17712
17745
  let e = s(CE, void 0);
17713
17746
  return g(() => Vw(e?.value.customFonts ?? []));
17714
17747
  }
17715
17748
  //#endregion
17716
17749
  //#region src/composables/useBrandFonts.ts
17717
- function eD(e) {
17750
+ function tD(e) {
17718
17751
  let t = s(CE, void 0);
17719
17752
  return g(() => {
17720
17753
  let n = t?.value.fonts ?? [];
@@ -17729,25 +17762,25 @@ function eD(e) {
17729
17762
  }
17730
17763
  //#endregion
17731
17764
  //#region src/i18n/locales.ts
17732
- var tD = ["en", "sv"], nD = "sv";
17733
- function rD(e) {
17734
- return tD.includes(e);
17765
+ var nD = ["en", "sv"], rD = "sv";
17766
+ function iD(e) {
17767
+ return nD.includes(e);
17735
17768
  }
17736
17769
  //#endregion
17737
17770
  //#region src/mergeTags.ts
17738
- function iD(e) {
17771
+ function aD(e) {
17739
17772
  return Object.keys(e).filter((t) => !e[t]?.conditionOnly);
17740
17773
  }
17741
- function aD(e, t, n) {
17774
+ function oD(e, t, n) {
17742
17775
  let r = e[t];
17743
17776
  return r ? r[n] ?? r.sv ?? t : t;
17744
17777
  }
17745
17778
  //#endregion
17746
17779
  //#region src/urls.ts
17747
- var oD = /^[a-z][a-z0-9+.-]*:/i, sD = /^(?:https?|ftps?|mailto|tel|callto|sms|cid|xmpp):/i, cD = /^[/#?]/;
17748
- function lD(e) {
17780
+ var sD = /^[a-z][a-z0-9+.-]*:/i, cD = /^(?:https?|ftps?|mailto|tel|callto|sms|cid|xmpp):/i, lD = /^[/#?]/;
17781
+ function uD(e) {
17749
17782
  let t = e.trim();
17750
- return oD.test(t) ? sD.test(t) ? t : "" : t === "" || cD.test(t) ? t : `https://${t}`;
17783
+ return sD.test(t) ? cD.test(t) ? t : "" : t === "" || lD.test(t) ? t : `https://${t}`;
17751
17784
  }
17752
17785
  //#endregion
17753
- export { mw as $, Ca as $t, Rw as A, vi as An, Nc as At, ww as B, ua as Bt, vE as C, Ti as Cn, hg as Ct, Vw as D, oi as Dn, cp as Dt, Uw as E, ai as En, ap as Et, yw as F, $r as Fn, R as Ft, Mw as G, Xi as Gt, sw as H, Wi as Ht, xw as I, ti as In, B as It, kw as J, sa as Jt, Nw as K, na as Kt, Tw as L, ei as Ln, Bi as Lt, Lw as M, ni as Mn, H as Mt, iw as N, ri as Nn, cs as Nt, Zw as O, xi as On, U as Ot, tw as P, ii as Pn, Ws as Pt, hw as Q, va as Qt, Dw as R, Br as Rn, ca as Rt, bE as S, ki as Sn, mg as St, gE as T, si as Tn, cm as Tt, ew as U, Qi as Ut, cw as V, da as Vt, Fw as W, Zi as Wt, Sw as X, Vi as Xt, Aw as Y, Ki as Yt, Cw as Z, qi as Zt, xE as _, ia as _n, K as _t, tD as a, ea as an, fw as at, TE as b, Fi as bn, Jg as bt, $E as c, ta as cn, QC as ct, BE as d, Hi as dn, sC as dt, ya as en, vw as et, RE as f, Sa as fn, rC as ft, CE as g, aa as gn, I_ as gt, wE as h, Yi as hn, eb as ht, nD as i, Ta as in, Ow as it, Iw as j, _i as jn, V as jt, Bw as k, yi as kn, Ac as kt, QE as l, ra as ln, $C as lt, DE as m, wa as mn, tb as mt, iD as n, ga as nn, pw as nt, rD as o, Gi as on, kC as ot, PE as p, oa as pn, oC as pt, jw as q, Ui as qt, aD as r, _a as rn, bw as rt, eD as s, $i as sn, cC as st, lD as t, xa as tn, gw as tt, YE as u, ba as un, nC as ut, OE as v, Pi as vn, B_ as vt, yE as w, Ei as wn, gg as wt, EE as x, wi as xn, W as xt, SE as y, Ri as yn, G as yt, Ew as z, Vr as zn, la as zt };
17786
+ export { mw as $, Ca as $t, Rw as A, vi as An, Nc as At, ww as B, ua as Bt, vE as C, Ti as Cn, hg as Ct, Vw as D, oi as Dn, cp as Dt, Uw as E, ai as En, ap as Et, yw as F, $r as Fn, R as Ft, Mw as G, Xi as Gt, sw as H, Wi as Ht, xw as I, ti as In, B as It, kw as J, sa as Jt, Nw as K, na as Kt, Tw as L, ei as Ln, Bi as Lt, Lw as M, ni as Mn, H as Mt, iw as N, ri as Nn, cs as Nt, Zw as O, xi as On, U as Ot, tw as P, ii as Pn, Ws as Pt, hw as Q, va as Qt, Dw as R, Br as Rn, ca as Rt, bE as S, ki as Sn, mg as St, gE as T, si as Tn, cm as Tt, ew as U, Qi as Ut, cw as V, da as Vt, Fw as W, Zi as Wt, Sw as X, Vi as Xt, Aw as Y, Ki as Yt, Cw as Z, qi as Zt, xE as _, ia as _n, K as _t, nD as a, ea as an, fw as at, TE as b, Fi as bn, Jg as bt, eD as c, ta as cn, QC as ct, BE as d, Hi as dn, sC as dt, ya as en, vw as et, RE as f, Sa as fn, rC as ft, CE as g, aa as gn, I_ as gt, wE as h, Yi as hn, eb as ht, rD as i, Ta as in, Ow as it, Iw as j, _i as jn, V as jt, Bw as k, yi as kn, Ac as kt, $E as l, ra as ln, $C as lt, DE as m, wa as mn, tb as mt, aD as n, ga as nn, pw as nt, iD as o, Gi as on, kC as ot, PE as p, oa as pn, oC as pt, jw as q, Ui as qt, oD as r, _a as rn, bw as rt, tD as s, $i as sn, cC as st, uD as t, xa as tn, gw as tt, XE as u, ba as un, nC as ut, OE as v, Pi as vn, B_ as vt, yE as w, Ei as wn, gg as wt, EE as x, wi as xn, W as xt, SE as y, Ri as yn, G as yt, Ew as z, Vr as zn, la as zt };