@squirrel-cloud/ui-vue 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as S, openBlock as m, createElementVNode as F, createStaticVNode as tu, defineComponent as O, computed as
|
|
1
|
+
import { createElementBlock as S, openBlock as m, createElementVNode as F, createStaticVNode as tu, defineComponent as O, computed as w, createBlock as L, unref as b, normalizeClass as K, withCtx as Z, createCommentVNode as U, createTextVNode as iu, resolveDynamicComponent as me, toDisplayString as se, h as Ju, ref as R, watch as ie, normalizeStyle as ee, onMounted as be, onBeforeUnmount as Ue, Transition as Re, withDirectives as fe, renderSlot as j, vShow as He, useSlots as hu, createVNode as T, inject as _e, provide as nu, toRef as re, mergeModels as ue, useModel as ae, vModelCheckbox as Kt, toRaw as Xe, Fragment as xe, renderList as je, Teleport as Qt, mergeProps as qe, shallowRef as de, withModifiers as Me, nextTick as Ku, vModelDynamic as t0, vModelText as n0, render as _t, cloneVNode as o0, Text as r0, Comment as s0, vModelRadio as en } from "vue";
|
|
2
2
|
const X = (e, u) => {
|
|
3
3
|
const t = e.__vccOpts || e;
|
|
4
4
|
for (const [n, o] of u)
|
|
@@ -453,16 +453,16 @@ const ur = /* @__PURE__ */ X(Ko, [["render", er]]), st = {
|
|
|
453
453
|
text: {}
|
|
454
454
|
},
|
|
455
455
|
setup(e) {
|
|
456
|
-
const u = e, t =
|
|
456
|
+
const u = e, t = w(() => {
|
|
457
457
|
const o = [];
|
|
458
458
|
return u.type && o.push(`is-${u.type}`), o;
|
|
459
|
-
}), n =
|
|
459
|
+
}), n = w(() => u.icon ? u.icon : u.showIcon && u.type ? st[u.type] : void 0);
|
|
460
460
|
return (o, r) => (m(), L(b(Oe), {
|
|
461
461
|
class: K(["sq-alert", t.value])
|
|
462
462
|
}, {
|
|
463
463
|
default: Z(() => [
|
|
464
464
|
n.value ? (m(), L(me(n.value), { key: 0 })) : U("", !0),
|
|
465
|
-
iu(" " +
|
|
465
|
+
iu(" " + se(u.text), 1)
|
|
466
466
|
]),
|
|
467
467
|
_: 1
|
|
468
468
|
}, 8, ["class"]));
|
|
@@ -746,15 +746,15 @@ yu.prototype.parse = function(e, u) {
|
|
|
746
746
|
const p = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
747
747
|
if (!p) {
|
|
748
748
|
const f = this.hostname.split(/\./);
|
|
749
|
-
for (let g = 0,
|
|
750
|
-
const
|
|
751
|
-
if (
|
|
752
|
-
let
|
|
753
|
-
for (let
|
|
754
|
-
|
|
755
|
-
if (!
|
|
756
|
-
const
|
|
757
|
-
$ && (
|
|
749
|
+
for (let g = 0, _ = f.length; g < _; g++) {
|
|
750
|
+
const k = f[g];
|
|
751
|
+
if (k && !k.match(Ft)) {
|
|
752
|
+
let v = "";
|
|
753
|
+
for (let D = 0, C = k.length; D < C; D++)
|
|
754
|
+
k.charCodeAt(D) > 127 ? v += "x" : v += k[D];
|
|
755
|
+
if (!v.match(Ft)) {
|
|
756
|
+
const D = f.slice(0, g), C = f.slice(g + 1), $ = k.match(br);
|
|
757
|
+
$ && (D.push($[1]), C.unshift($[2])), C.length && (r = C.join(".") + r), this.hostname = D.join(".");
|
|
758
758
|
break;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
@@ -834,42 +834,42 @@ function wr(e) {
|
|
|
834
834
|
var u;
|
|
835
835
|
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u = kr.get(e)) !== null && u !== void 0 ? u : e;
|
|
836
836
|
}
|
|
837
|
-
var
|
|
837
|
+
var oe;
|
|
838
838
|
(function(e) {
|
|
839
839
|
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";
|
|
840
|
-
})(
|
|
840
|
+
})(oe || (oe = {}));
|
|
841
841
|
const Cr = 32;
|
|
842
842
|
var ze;
|
|
843
843
|
(function(e) {
|
|
844
844
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
845
845
|
})(ze || (ze = {}));
|
|
846
846
|
function Qu(e) {
|
|
847
|
-
return e >=
|
|
847
|
+
return e >= oe.ZERO && e <= oe.NINE;
|
|
848
848
|
}
|
|
849
849
|
function Dr(e) {
|
|
850
|
-
return e >=
|
|
850
|
+
return e >= oe.UPPER_A && e <= oe.UPPER_F || e >= oe.LOWER_A && e <= oe.LOWER_F;
|
|
851
851
|
}
|
|
852
852
|
function Er(e) {
|
|
853
|
-
return e >=
|
|
853
|
+
return e >= oe.UPPER_A && e <= oe.UPPER_Z || e >= oe.LOWER_A && e <= oe.LOWER_Z || Qu(e);
|
|
854
854
|
}
|
|
855
855
|
function Ar(e) {
|
|
856
|
-
return e ===
|
|
856
|
+
return e === oe.EQUALS || Er(e);
|
|
857
857
|
}
|
|
858
|
-
var
|
|
858
|
+
var ne;
|
|
859
859
|
(function(e) {
|
|
860
860
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
861
|
-
})(
|
|
861
|
+
})(ne || (ne = {}));
|
|
862
862
|
var Be;
|
|
863
863
|
(function(e) {
|
|
864
864
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
865
865
|
})(Be || (Be = {}));
|
|
866
866
|
class Fr {
|
|
867
867
|
constructor(u, t, n) {
|
|
868
|
-
this.decodeTree = u, this.emitCodePoint = t, this.errors = n, this.state =
|
|
868
|
+
this.decodeTree = u, this.emitCodePoint = t, this.errors = n, this.state = ne.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = Be.Strict;
|
|
869
869
|
}
|
|
870
870
|
/** Resets the instance to make it reusable. */
|
|
871
871
|
startEntity(u) {
|
|
872
|
-
this.decodeMode = u, this.state =
|
|
872
|
+
this.decodeMode = u, this.state = ne.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
873
873
|
}
|
|
874
874
|
/**
|
|
875
875
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -884,15 +884,15 @@ class Fr {
|
|
|
884
884
|
*/
|
|
885
885
|
write(u, t) {
|
|
886
886
|
switch (this.state) {
|
|
887
|
-
case
|
|
888
|
-
return u.charCodeAt(t) ===
|
|
889
|
-
case
|
|
887
|
+
case ne.EntityStart:
|
|
888
|
+
return u.charCodeAt(t) === oe.NUM ? (this.state = ne.NumericStart, this.consumed += 1, this.stateNumericStart(u, t + 1)) : (this.state = ne.NamedEntity, this.stateNamedEntity(u, t));
|
|
889
|
+
case ne.NumericStart:
|
|
890
890
|
return this.stateNumericStart(u, t);
|
|
891
|
-
case
|
|
891
|
+
case ne.NumericDecimal:
|
|
892
892
|
return this.stateNumericDecimal(u, t);
|
|
893
|
-
case
|
|
893
|
+
case ne.NumericHex:
|
|
894
894
|
return this.stateNumericHex(u, t);
|
|
895
|
-
case
|
|
895
|
+
case ne.NamedEntity:
|
|
896
896
|
return this.stateNamedEntity(u, t);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
@@ -906,7 +906,7 @@ class Fr {
|
|
|
906
906
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
907
907
|
*/
|
|
908
908
|
stateNumericStart(u, t) {
|
|
909
|
-
return t >= u.length ? -1 : (u.charCodeAt(t) | Cr) ===
|
|
909
|
+
return t >= u.length ? -1 : (u.charCodeAt(t) | Cr) === oe.LOWER_X ? (this.state = ne.NumericHex, this.consumed += 1, this.stateNumericHex(u, t + 1)) : (this.state = ne.NumericDecimal, this.stateNumericDecimal(u, t));
|
|
910
910
|
}
|
|
911
911
|
addToNumericResult(u, t, n, o) {
|
|
912
912
|
if (t !== n) {
|
|
@@ -971,11 +971,11 @@ class Fr {
|
|
|
971
971
|
var n;
|
|
972
972
|
if (this.consumed <= t)
|
|
973
973
|
return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
974
|
-
if (u ===
|
|
974
|
+
if (u === oe.SEMI)
|
|
975
975
|
this.consumed += 1;
|
|
976
976
|
else if (this.decodeMode === Be.Strict)
|
|
977
977
|
return 0;
|
|
978
|
-
return this.emitCodePoint(wr(this.result), this.consumed), this.errors && (u !==
|
|
978
|
+
return this.emitCodePoint(wr(this.result), this.consumed), this.errors && (u !== oe.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
979
979
|
}
|
|
980
980
|
/**
|
|
981
981
|
* Parses a named entity.
|
|
@@ -997,7 +997,7 @@ class Fr {
|
|
|
997
997
|
(r === 0 || // And there should be no invalid characters.
|
|
998
998
|
Ar(s)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
999
999
|
if (o = n[this.treeIndex], r = (o & ze.VALUE_LENGTH) >> 14, r !== 0) {
|
|
1000
|
-
if (s ===
|
|
1000
|
+
if (s === oe.SEMI)
|
|
1001
1001
|
return this.emitNamedEntityData(this.treeIndex, r, this.consumed + this.excess);
|
|
1002
1002
|
this.decodeMode !== Be.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1003
1003
|
}
|
|
@@ -1037,16 +1037,16 @@ class Fr {
|
|
|
1037
1037
|
end() {
|
|
1038
1038
|
var u;
|
|
1039
1039
|
switch (this.state) {
|
|
1040
|
-
case
|
|
1040
|
+
case ne.NamedEntity:
|
|
1041
1041
|
return this.result !== 0 && (this.decodeMode !== Be.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1042
1042
|
// Otherwise, emit a numeric entity if we have one.
|
|
1043
|
-
case
|
|
1043
|
+
case ne.NumericDecimal:
|
|
1044
1044
|
return this.emitNumericEntity(0, 2);
|
|
1045
|
-
case
|
|
1045
|
+
case ne.NumericHex:
|
|
1046
1046
|
return this.emitNumericEntity(0, 3);
|
|
1047
|
-
case
|
|
1047
|
+
case ne.NumericStart:
|
|
1048
1048
|
return (u = this.errors) === null || u === void 0 || u.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1049
|
-
case
|
|
1049
|
+
case ne.EntityStart:
|
|
1050
1050
|
return 0;
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
@@ -1624,19 +1624,19 @@ function os(e) {
|
|
|
1624
1624
|
const f = a[p].url, g = e.md.normalizeLink(f);
|
|
1625
1625
|
if (!e.md.validateLink(g))
|
|
1626
1626
|
continue;
|
|
1627
|
-
let
|
|
1628
|
-
a[p].schema ? a[p].schema === "mailto:" && !/^mailto:/i.test(
|
|
1629
|
-
const
|
|
1630
|
-
if (
|
|
1627
|
+
let _ = a[p].text;
|
|
1628
|
+
a[p].schema ? a[p].schema === "mailto:" && !/^mailto:/i.test(_) ? _ = e.md.normalizeLinkText("mailto:" + _).replace(/^mailto:/, "") : _ = e.md.normalizeLinkText(_) : _ = e.md.normalizeLinkText("http://" + _).replace(/^http:\/\//, "");
|
|
1629
|
+
const k = a[p].index;
|
|
1630
|
+
if (k > h) {
|
|
1631
1631
|
const $ = new e.Token("text", "", 0);
|
|
1632
|
-
$.content = i.slice(h,
|
|
1632
|
+
$.content = i.slice(h, k), $.level = d, l.push($);
|
|
1633
1633
|
}
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1634
|
+
const v = new e.Token("link_open", "a", 1);
|
|
1635
|
+
v.attrs = [["href", g]], v.level = d++, v.markup = "linkify", v.info = "auto", l.push(v);
|
|
1636
|
+
const D = new e.Token("text", "", 0);
|
|
1637
|
+
D.content = _, D.level = d, l.push(D);
|
|
1638
|
+
const C = new e.Token("link_close", "a", -1);
|
|
1639
|
+
C.level = --d, C.markup = "linkify", C.info = "auto", l.push(C), h = a[p].lastIndex;
|
|
1640
1640
|
}
|
|
1641
1641
|
if (h < i.length) {
|
|
1642
1642
|
const p = new e.Token("text", "", 0);
|
|
@@ -1716,24 +1716,24 @@ function ps(e, u) {
|
|
|
1716
1716
|
g = e[t].content.charCodeAt(0);
|
|
1717
1717
|
break;
|
|
1718
1718
|
}
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1719
|
+
const _ = du(f) || lu(String.fromCharCode(f)), k = du(g) || lu(String.fromCharCode(g)), v = au(f), D = au(g);
|
|
1720
|
+
if (D ? d = !1 : k && (v || _ || (d = !1)), v ? h = !1 : _ && (D || k || (h = !1)), g === 34 && l[0] === '"' && f >= 48 && f <= 57 && (h = d = !1), d && h && (d = _, h = k), !d && !h) {
|
|
1721
1721
|
p && (r.content = vu(r.content, l.index, Bt));
|
|
1722
1722
|
continue;
|
|
1723
1723
|
}
|
|
1724
1724
|
if (h)
|
|
1725
1725
|
for (t = n.length - 1; t >= 0; t--) {
|
|
1726
|
-
let
|
|
1726
|
+
let C = n[t];
|
|
1727
1727
|
if (n[t].level < s)
|
|
1728
1728
|
break;
|
|
1729
|
-
if (
|
|
1730
|
-
|
|
1729
|
+
if (C.single === p && n[t].level === s) {
|
|
1730
|
+
C = n[t];
|
|
1731
1731
|
let $, M;
|
|
1732
|
-
p ? ($ = u.md.options.quotes[2], M = u.md.options.quotes[3]) : ($ = u.md.options.quotes[0], M = u.md.options.quotes[1]), r.content = vu(r.content, l.index, M), e[
|
|
1733
|
-
e[
|
|
1734
|
-
|
|
1732
|
+
p ? ($ = u.md.options.quotes[2], M = u.md.options.quotes[3]) : ($ = u.md.options.quotes[0], M = u.md.options.quotes[1]), r.content = vu(r.content, l.index, M), e[C.token].content = vu(
|
|
1733
|
+
e[C.token].content,
|
|
1734
|
+
C.pos,
|
|
1735
1735
|
$
|
|
1736
|
-
), i += M.length - 1,
|
|
1736
|
+
), i += M.length - 1, C.token === o && (i += $.length - 1), c = r.content, a = c.length, n.length = t;
|
|
1737
1737
|
continue e;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
@@ -1893,17 +1893,17 @@ function xs(e, u, t, n) {
|
|
|
1893
1893
|
if (c !== 124 && c !== 45 && c !== 58 && !J(c) || s === 45 && J(c))
|
|
1894
1894
|
return !1;
|
|
1895
1895
|
for (; r < e.eMarks[o]; ) {
|
|
1896
|
-
const
|
|
1897
|
-
if (
|
|
1896
|
+
const C = e.src.charCodeAt(r);
|
|
1897
|
+
if (C !== 124 && C !== 45 && C !== 58 && !J(C))
|
|
1898
1898
|
return !1;
|
|
1899
1899
|
r++;
|
|
1900
1900
|
}
|
|
1901
1901
|
let i = Vu(e, u + 1), a = i.split("|");
|
|
1902
1902
|
const l = [];
|
|
1903
|
-
for (let
|
|
1904
|
-
const $ = a[
|
|
1903
|
+
for (let C = 0; C < a.length; C++) {
|
|
1904
|
+
const $ = a[C].trim();
|
|
1905
1905
|
if (!$) {
|
|
1906
|
-
if (
|
|
1906
|
+
if (C === 0 || C === a.length - 1)
|
|
1907
1907
|
continue;
|
|
1908
1908
|
return !1;
|
|
1909
1909
|
}
|
|
@@ -1923,30 +1923,30 @@ function xs(e, u, t, n) {
|
|
|
1923
1923
|
e.parentType = "table";
|
|
1924
1924
|
const p = e.md.block.ruler.getRules("blockquote"), f = e.push("table_open", "table", 1), g = [u, 0];
|
|
1925
1925
|
f.map = g;
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1928
|
-
const
|
|
1929
|
-
|
|
1930
|
-
for (let
|
|
1926
|
+
const _ = e.push("thead_open", "thead", 1);
|
|
1927
|
+
_.map = [u, u + 1];
|
|
1928
|
+
const k = e.push("tr_open", "tr", 1);
|
|
1929
|
+
k.map = [u, u + 1];
|
|
1930
|
+
for (let C = 0; C < a.length; C++) {
|
|
1931
1931
|
const $ = e.push("th_open", "th", 1);
|
|
1932
|
-
l[
|
|
1932
|
+
l[C] && ($.attrs = [["style", "text-align:" + l[C]]]);
|
|
1933
1933
|
const M = e.push("inline", "", 0);
|
|
1934
|
-
M.content = a[
|
|
1934
|
+
M.content = a[C].trim(), M.children = [], e.push("th_close", "th", -1);
|
|
1935
1935
|
}
|
|
1936
1936
|
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
1937
|
-
let
|
|
1937
|
+
let v, D = 0;
|
|
1938
1938
|
for (o = u + 2; o < t && !(e.sCount[o] < e.blkIndent); o++) {
|
|
1939
|
-
let
|
|
1939
|
+
let C = !1;
|
|
1940
1940
|
for (let M = 0, V = p.length; M < V; M++)
|
|
1941
1941
|
if (p[M](e, o, t, !0)) {
|
|
1942
|
-
|
|
1942
|
+
C = !0;
|
|
1943
1943
|
break;
|
|
1944
1944
|
}
|
|
1945
|
-
if (
|
|
1945
|
+
if (C || (i = Vu(e, o).trim(), !i) || e.sCount[o] - e.blkIndent >= 4 || (a = Mt(i), a.length && a[0] === "" && a.shift(), a.length && a[a.length - 1] === "" && a.pop(), D += d - a.length, D > ms))
|
|
1946
1946
|
break;
|
|
1947
1947
|
if (o === u + 2) {
|
|
1948
1948
|
const M = e.push("tbody_open", "tbody", 1);
|
|
1949
|
-
M.map =
|
|
1949
|
+
M.map = v = [u + 2, 0];
|
|
1950
1950
|
}
|
|
1951
1951
|
const $ = e.push("tr_open", "tr", 1);
|
|
1952
1952
|
$.map = [o, o + 1];
|
|
@@ -1958,7 +1958,7 @@ function xs(e, u, t, n) {
|
|
|
1958
1958
|
}
|
|
1959
1959
|
e.push("tr_close", "tr", -1);
|
|
1960
1960
|
}
|
|
1961
|
-
return
|
|
1961
|
+
return v && (e.push("tbody_close", "tbody", -1), v[1] = o), e.push("table_close", "table", -1), g[1] = o, e.parentType = h, e.line = o, !0;
|
|
1962
1962
|
}
|
|
1963
1963
|
function gs(e, u, t) {
|
|
1964
1964
|
if (e.sCount[u] - e.blkIndent < 4)
|
|
@@ -2018,10 +2018,10 @@ function _s(e, u, t, n) {
|
|
|
2018
2018
|
e.parentType = "blockquote";
|
|
2019
2019
|
let p = !1, f;
|
|
2020
2020
|
for (f = u; f < t; f++) {
|
|
2021
|
-
const
|
|
2021
|
+
const D = e.sCount[f] < e.blkIndent;
|
|
2022
2022
|
if (o = e.bMarks[f] + e.tShift[f], r = e.eMarks[f], o >= r)
|
|
2023
2023
|
break;
|
|
2024
|
-
if (e.src.charCodeAt(o++) === 62 && !
|
|
2024
|
+
if (e.src.charCodeAt(o++) === 62 && !D) {
|
|
2025
2025
|
let $ = e.sCount[f] + 1, M, V;
|
|
2026
2026
|
e.src.charCodeAt(o) === 32 ? (o++, $++, V = !1, M = !0) : e.src.charCodeAt(o) === 9 ? (M = !0, (e.bsCount[f] + $) % 4 === 3 ? (o++, $++, V = !1) : V = !0) : M = !1;
|
|
2027
2027
|
let H = $;
|
|
@@ -2038,13 +2038,13 @@ function _s(e, u, t, n) {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
if (p)
|
|
2040
2040
|
break;
|
|
2041
|
-
let
|
|
2041
|
+
let C = !1;
|
|
2042
2042
|
for (let $ = 0, M = d.length; $ < M; $++)
|
|
2043
2043
|
if (d[$](e, f, t, !0)) {
|
|
2044
|
-
|
|
2044
|
+
C = !0;
|
|
2045
2045
|
break;
|
|
2046
2046
|
}
|
|
2047
|
-
if (
|
|
2047
|
+
if (C) {
|
|
2048
2048
|
e.lineMax = f, e.blkIndent !== 0 && (c.push(e.bMarks[f]), i.push(e.bsCount[f]), l.push(e.tShift[f]), a.push(e.sCount[f]), e.sCount[f] -= e.blkIndent);
|
|
2049
2049
|
break;
|
|
2050
2050
|
}
|
|
@@ -2052,14 +2052,14 @@ function _s(e, u, t, n) {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
const g = e.blkIndent;
|
|
2054
2054
|
e.blkIndent = 0;
|
|
2055
|
-
const
|
|
2056
|
-
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2061
|
-
for (let
|
|
2062
|
-
e.bMarks[
|
|
2055
|
+
const _ = e.push("blockquote_open", "blockquote", 1);
|
|
2056
|
+
_.markup = ">";
|
|
2057
|
+
const k = [u, 0];
|
|
2058
|
+
_.map = k, e.md.block.tokenize(e, u, f);
|
|
2059
|
+
const v = e.push("blockquote_close", "blockquote", -1);
|
|
2060
|
+
v.markup = ">", e.lineMax = s, e.parentType = h, k[1] = e.line;
|
|
2061
|
+
for (let D = 0; D < l.length; D++)
|
|
2062
|
+
e.bMarks[D + u] = c[D], e.tShift[D + u] = l[D], e.sCount[D + u] = a[D], e.bsCount[D + u] = i[D];
|
|
2063
2063
|
return e.blkIndent = g, !0;
|
|
2064
2064
|
}
|
|
2065
2065
|
function ks(e, u, t, n) {
|
|
@@ -2144,14 +2144,14 @@ function ws(e, u, t, n) {
|
|
|
2144
2144
|
return !0;
|
|
2145
2145
|
const f = e.src.charCodeAt(p - 1), g = e.tokens.length;
|
|
2146
2146
|
d ? (c = e.push("ordered_list_open", "ol", 1), h !== 1 && (c.attrs = [["start", h]])) : c = e.push("bullet_list_open", "ul", 1);
|
|
2147
|
-
const
|
|
2148
|
-
c.map =
|
|
2149
|
-
let
|
|
2150
|
-
const
|
|
2147
|
+
const _ = [i, 0];
|
|
2148
|
+
c.map = _, c.markup = String.fromCharCode(f);
|
|
2149
|
+
let k = !1;
|
|
2150
|
+
const v = e.md.block.ruler.getRules("list"), D = e.parentType;
|
|
2151
2151
|
for (e.parentType = "list"; i < t; ) {
|
|
2152
2152
|
r = p, o = e.eMarks[i];
|
|
2153
|
-
const
|
|
2154
|
-
let $ =
|
|
2153
|
+
const C = e.sCount[i] + p - (e.bMarks[i] + e.tShift[i]);
|
|
2154
|
+
let $ = C;
|
|
2155
2155
|
for (; r < o; ) {
|
|
2156
2156
|
const W = e.src.charCodeAt(r);
|
|
2157
2157
|
if (W === 9)
|
|
@@ -2164,17 +2164,17 @@ function ws(e, u, t, n) {
|
|
|
2164
2164
|
}
|
|
2165
2165
|
const M = r;
|
|
2166
2166
|
let V;
|
|
2167
|
-
M >= o ? V = 1 : V = $ -
|
|
2168
|
-
const H =
|
|
2167
|
+
M >= o ? V = 1 : V = $ - C, V > 4 && (V = 1);
|
|
2168
|
+
const H = C + V;
|
|
2169
2169
|
c = e.push("list_item_open", "li", 1), c.markup = String.fromCharCode(f);
|
|
2170
2170
|
const q = [i, 0];
|
|
2171
2171
|
c.map = q, d && (c.info = e.src.slice(s, p - 1));
|
|
2172
|
-
const
|
|
2173
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = H, e.tight = !0, e.tShift[i] = M - e.bMarks[i], e.sCount[i] = $, M >= o && e.isEmpty(i + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, i, t, !0), (!e.tight ||
|
|
2172
|
+
const y = e.tight, x = e.tShift[i], A = e.sCount[i], E = e.listIndent;
|
|
2173
|
+
if (e.listIndent = e.blkIndent, e.blkIndent = H, e.tight = !0, e.tShift[i] = M - e.bMarks[i], e.sCount[i] = $, M >= o && e.isEmpty(i + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, i, t, !0), (!e.tight || k) && (a = !1), k = e.line - i > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = E, e.tShift[i] = x, e.sCount[i] = A, e.tight = y, c = e.push("list_item_close", "li", -1), c.markup = String.fromCharCode(f), i = e.line, q[1] = i, i >= t || e.sCount[i] < e.blkIndent || e.sCount[i] - e.blkIndent >= 4)
|
|
2174
2174
|
break;
|
|
2175
2175
|
let z = !1;
|
|
2176
|
-
for (let W = 0, G =
|
|
2177
|
-
if (
|
|
2176
|
+
for (let W = 0, G = v.length; W < G; W++)
|
|
2177
|
+
if (v[W](e, i, t, !0)) {
|
|
2178
2178
|
z = !0;
|
|
2179
2179
|
break;
|
|
2180
2180
|
}
|
|
@@ -2189,58 +2189,58 @@ function ws(e, u, t, n) {
|
|
|
2189
2189
|
if (f !== e.src.charCodeAt(p - 1))
|
|
2190
2190
|
break;
|
|
2191
2191
|
}
|
|
2192
|
-
return d ? c = e.push("ordered_list_close", "ol", -1) : c = e.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(f),
|
|
2192
|
+
return d ? c = e.push("ordered_list_close", "ol", -1) : c = e.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(f), _[1] = i, e.line = i, e.parentType = D, a && ys(e, g), !0;
|
|
2193
2193
|
}
|
|
2194
2194
|
function Cs(e, u, t, n) {
|
|
2195
2195
|
let o = e.bMarks[u] + e.tShift[u], r = e.eMarks[u], s = u + 1;
|
|
2196
2196
|
if (e.sCount[u] - e.blkIndent >= 4 || e.src.charCodeAt(o) !== 91)
|
|
2197
2197
|
return !1;
|
|
2198
|
-
function c(
|
|
2199
|
-
const
|
|
2200
|
-
if (
|
|
2198
|
+
function c(v) {
|
|
2199
|
+
const D = e.lineMax;
|
|
2200
|
+
if (v >= D || e.isEmpty(v))
|
|
2201
2201
|
return null;
|
|
2202
|
-
let
|
|
2203
|
-
if (e.sCount[
|
|
2202
|
+
let C = !1;
|
|
2203
|
+
if (e.sCount[v] - e.blkIndent > 3 && (C = !0), e.sCount[v] < 0 && (C = !0), !C) {
|
|
2204
2204
|
const V = e.md.block.ruler.getRules("reference"), H = e.parentType;
|
|
2205
2205
|
e.parentType = "reference";
|
|
2206
2206
|
let q = !1;
|
|
2207
|
-
for (let
|
|
2208
|
-
if (V[
|
|
2207
|
+
for (let y = 0, x = V.length; y < x; y++)
|
|
2208
|
+
if (V[y](e, v, D, !0)) {
|
|
2209
2209
|
q = !0;
|
|
2210
2210
|
break;
|
|
2211
2211
|
}
|
|
2212
2212
|
if (e.parentType = H, q)
|
|
2213
2213
|
return null;
|
|
2214
2214
|
}
|
|
2215
|
-
const $ = e.bMarks[
|
|
2215
|
+
const $ = e.bMarks[v] + e.tShift[v], M = e.eMarks[v];
|
|
2216
2216
|
return e.src.slice($, M + 1);
|
|
2217
2217
|
}
|
|
2218
2218
|
let i = e.src.slice(o, r + 1);
|
|
2219
2219
|
r = i.length;
|
|
2220
2220
|
let a = -1;
|
|
2221
2221
|
for (o = 1; o < r; o++) {
|
|
2222
|
-
const
|
|
2223
|
-
if (
|
|
2222
|
+
const v = i.charCodeAt(o);
|
|
2223
|
+
if (v === 91)
|
|
2224
2224
|
return !1;
|
|
2225
|
-
if (
|
|
2225
|
+
if (v === 93) {
|
|
2226
2226
|
a = o;
|
|
2227
2227
|
break;
|
|
2228
|
-
} else if (
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2231
|
-
} else if (
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2228
|
+
} else if (v === 10) {
|
|
2229
|
+
const D = c(s);
|
|
2230
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2231
|
+
} else if (v === 92 && (o++, o < r && i.charCodeAt(o) === 10)) {
|
|
2232
|
+
const D = c(s);
|
|
2233
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2234
2234
|
}
|
|
2235
2235
|
}
|
|
2236
2236
|
if (a < 0 || i.charCodeAt(a + 1) !== 58)
|
|
2237
2237
|
return !1;
|
|
2238
2238
|
for (o = a + 2; o < r; o++) {
|
|
2239
|
-
const
|
|
2240
|
-
if (
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2243
|
-
} else if (!J(
|
|
2239
|
+
const v = i.charCodeAt(o);
|
|
2240
|
+
if (v === 10) {
|
|
2241
|
+
const D = c(s);
|
|
2242
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2243
|
+
} else if (!J(v)) break;
|
|
2244
2244
|
}
|
|
2245
2245
|
const l = e.md.helpers.parseLinkDestination(i, o, r);
|
|
2246
2246
|
if (!l.ok)
|
|
@@ -2251,36 +2251,36 @@ function Cs(e, u, t, n) {
|
|
|
2251
2251
|
o = l.pos;
|
|
2252
2252
|
const h = o, p = s, f = o;
|
|
2253
2253
|
for (; o < r; o++) {
|
|
2254
|
-
const
|
|
2255
|
-
if (
|
|
2256
|
-
const
|
|
2257
|
-
|
|
2258
|
-
} else if (!J(
|
|
2254
|
+
const v = i.charCodeAt(o);
|
|
2255
|
+
if (v === 10) {
|
|
2256
|
+
const D = c(s);
|
|
2257
|
+
D !== null && (i += D, r = i.length, s++);
|
|
2258
|
+
} else if (!J(v)) break;
|
|
2259
2259
|
}
|
|
2260
2260
|
let g = e.md.helpers.parseLinkTitle(i, o, r);
|
|
2261
2261
|
for (; g.can_continue; ) {
|
|
2262
|
-
const
|
|
2263
|
-
if (
|
|
2264
|
-
i +=
|
|
2265
|
-
}
|
|
2266
|
-
let
|
|
2267
|
-
for (o < r && f !== o && g.ok ? (
|
|
2268
|
-
const
|
|
2269
|
-
if (!J(
|
|
2262
|
+
const v = c(s);
|
|
2263
|
+
if (v === null) break;
|
|
2264
|
+
i += v, o = r, r = i.length, s++, g = e.md.helpers.parseLinkTitle(i, o, r, g);
|
|
2265
|
+
}
|
|
2266
|
+
let _;
|
|
2267
|
+
for (o < r && f !== o && g.ok ? (_ = g.str, o = g.pos) : (_ = "", o = h, s = p); o < r; ) {
|
|
2268
|
+
const v = i.charCodeAt(o);
|
|
2269
|
+
if (!J(v))
|
|
2270
2270
|
break;
|
|
2271
2271
|
o++;
|
|
2272
2272
|
}
|
|
2273
|
-
if (o < r && i.charCodeAt(o) !== 10 &&
|
|
2274
|
-
for (
|
|
2275
|
-
const
|
|
2276
|
-
if (!J(
|
|
2273
|
+
if (o < r && i.charCodeAt(o) !== 10 && _)
|
|
2274
|
+
for (_ = "", o = h, s = p; o < r; ) {
|
|
2275
|
+
const v = i.charCodeAt(o);
|
|
2276
|
+
if (!J(v))
|
|
2277
2277
|
break;
|
|
2278
2278
|
o++;
|
|
2279
2279
|
}
|
|
2280
2280
|
if (o < r && i.charCodeAt(o) !== 10)
|
|
2281
2281
|
return !1;
|
|
2282
|
-
const
|
|
2283
|
-
return
|
|
2282
|
+
const k = Bu(i.slice(1, a));
|
|
2283
|
+
return k ? (n || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[k] > "u" && (e.env.references[k] = { title: _, href: d }), e.line = s), !0) : !1;
|
|
2284
2284
|
}
|
|
2285
2285
|
const Ds = [
|
|
2286
2286
|
"address",
|
|
@@ -2804,8 +2804,8 @@ function Qs(e, u) {
|
|
|
2804
2804
|
}
|
|
2805
2805
|
if (!u) {
|
|
2806
2806
|
e.pos = h, e.posMax = p;
|
|
2807
|
-
const g = e.push("link_open", "a", 1),
|
|
2808
|
-
g.attrs =
|
|
2807
|
+
const g = e.push("link_open", "a", 1), _ = [["href", s]];
|
|
2808
|
+
g.attrs = _, c && _.push(["title", c]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
|
|
2809
2809
|
}
|
|
2810
2810
|
return e.pos = f, e.posMax = d, !0;
|
|
2811
2811
|
}
|
|
@@ -2848,8 +2848,8 @@ function ec(e, u) {
|
|
|
2848
2848
|
e.env,
|
|
2849
2849
|
g
|
|
2850
2850
|
);
|
|
2851
|
-
const
|
|
2852
|
-
|
|
2851
|
+
const _ = e.push("image", "img", 0), k = [["src", l], ["alt", ""]];
|
|
2852
|
+
_.attrs = k, _.children = g, _.content = n, i && k.push(["title", i]);
|
|
2853
2853
|
}
|
|
2854
2854
|
return e.pos = r, e.posMax = h, !0;
|
|
2855
2855
|
}
|
|
@@ -3682,7 +3682,7 @@ function Hc() {
|
|
|
3682
3682
|
const s = [], c = { children: [] };
|
|
3683
3683
|
let i = c;
|
|
3684
3684
|
return o.forEach((a) => {
|
|
3685
|
-
var
|
|
3685
|
+
var _, k, v, D, C, $, M, V, H, q, y;
|
|
3686
3686
|
const { type: l, children: d, content: h, attrs: p, tag: f, hidden: g } = a;
|
|
3687
3687
|
switch (l) {
|
|
3688
3688
|
case "heading_open":
|
|
@@ -3708,8 +3708,8 @@ function Hc() {
|
|
|
3708
3708
|
attrs: p ? Object.fromEntries(p) : {}
|
|
3709
3709
|
};
|
|
3710
3710
|
if (l === "link_open") {
|
|
3711
|
-
const A = a.attrGet("href") ?? "",
|
|
3712
|
-
A != null && A.startsWith("http") && !A.includes(
|
|
3711
|
+
const A = a.attrGet("href") ?? "", E = document.location.origin;
|
|
3712
|
+
A != null && A.startsWith("http") && !A.includes(E) && (x.attrs.target = "_blank", x.attrs.rel = "noopener noreferrer", x.attrs.dataOuter = "", (_ = x.children) == null || _.push({ tag: yo }));
|
|
3713
3713
|
}
|
|
3714
3714
|
if (l === "table_open") {
|
|
3715
3715
|
const A = {
|
|
@@ -3717,9 +3717,9 @@ function Hc() {
|
|
|
3717
3717
|
children: [],
|
|
3718
3718
|
attrs: { class: "sq-article-table" }
|
|
3719
3719
|
};
|
|
3720
|
-
(
|
|
3720
|
+
(k = i.children) == null || k.push(A), s.push(i), i = A;
|
|
3721
3721
|
}
|
|
3722
|
-
(
|
|
3722
|
+
(v = i.children) == null || v.push(x), s.push(i), i = x;
|
|
3723
3723
|
break;
|
|
3724
3724
|
}
|
|
3725
3725
|
case "heading_close":
|
|
@@ -3743,7 +3743,7 @@ function Hc() {
|
|
|
3743
3743
|
break;
|
|
3744
3744
|
}
|
|
3745
3745
|
case "code_inline": {
|
|
3746
|
-
(
|
|
3746
|
+
(D = i.children) == null || D.push({
|
|
3747
3747
|
tag: (r == null ? void 0 : r[f]) ?? f,
|
|
3748
3748
|
children: [h],
|
|
3749
3749
|
attrs: p ? Object.fromEntries(p) : {}
|
|
@@ -3753,7 +3753,7 @@ function Hc() {
|
|
|
3753
3753
|
case "inline": {
|
|
3754
3754
|
if (d) {
|
|
3755
3755
|
const x = n(d, r);
|
|
3756
|
-
(
|
|
3756
|
+
(C = i.children) == null || C.push(...x ?? []);
|
|
3757
3757
|
} else
|
|
3758
3758
|
($ = i.children) == null || $.push(h);
|
|
3759
3759
|
break;
|
|
@@ -3777,8 +3777,8 @@ function Hc() {
|
|
|
3777
3777
|
break;
|
|
3778
3778
|
}
|
|
3779
3779
|
case "input": {
|
|
3780
|
-
const x = p ? Object.fromEntries(p) : {}, A = x.type ?? "text",
|
|
3781
|
-
tag: (r == null ? void 0 : r[
|
|
3780
|
+
const x = p ? Object.fromEntries(p) : {}, A = x.type ?? "text", E = `${f}-${A}`, z = {
|
|
3781
|
+
tag: (r == null ? void 0 : r[E]) ?? f,
|
|
3782
3782
|
children: [],
|
|
3783
3783
|
attrs: x
|
|
3784
3784
|
};
|
|
@@ -3793,7 +3793,7 @@ function Hc() {
|
|
|
3793
3793
|
tag: (r == null ? void 0 : r[x]) ?? x,
|
|
3794
3794
|
children: []
|
|
3795
3795
|
};
|
|
3796
|
-
(
|
|
3796
|
+
(y = i.children) == null || y.push(A), s.push(i), i = A;
|
|
3797
3797
|
}
|
|
3798
3798
|
break;
|
|
3799
3799
|
}
|
|
@@ -3853,7 +3853,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3853
3853
|
}
|
|
3854
3854
|
},
|
|
3855
3855
|
setup(e) {
|
|
3856
|
-
const u =
|
|
3856
|
+
const u = w(() => ({
|
|
3857
3857
|
hr: Je,
|
|
3858
3858
|
blur: ri,
|
|
3859
3859
|
img: la,
|
|
@@ -3881,16 +3881,16 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3881
3881
|
size: { default: "md" }
|
|
3882
3882
|
},
|
|
3883
3883
|
setup(e) {
|
|
3884
|
-
const u = e, t = R(!0), n =
|
|
3884
|
+
const u = e, t = R(!0), n = w(() => {
|
|
3885
3885
|
const c = [];
|
|
3886
3886
|
return u.size !== "md" && c.push(`sq-avatar--${u.size}`), u.round && c.push("is-round"), c;
|
|
3887
|
-
}), o =
|
|
3887
|
+
}), o = w(() => {
|
|
3888
3888
|
if (!u.randomColor) return;
|
|
3889
3889
|
const { getRandomColor: c } = nr();
|
|
3890
3890
|
return {
|
|
3891
3891
|
"--avatar-bg-color": c()
|
|
3892
3892
|
};
|
|
3893
|
-
}), r =
|
|
3893
|
+
}), r = w(() => u.alt.charAt(0).toUpperCase());
|
|
3894
3894
|
ie(
|
|
3895
3895
|
() => u.img,
|
|
3896
3896
|
() => {
|
|
@@ -3911,7 +3911,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3911
3911
|
onError: s
|
|
3912
3912
|
}, null, 40, Jc)) : (m(), S("span", {
|
|
3913
3913
|
key: 1,
|
|
3914
|
-
textContent:
|
|
3914
|
+
textContent: se(r.value)
|
|
3915
3915
|
}, null, 8, Kc))
|
|
3916
3916
|
], 6));
|
|
3917
3917
|
}
|
|
@@ -3927,7 +3927,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3927
3927
|
progressProps: {}
|
|
3928
3928
|
},
|
|
3929
3929
|
setup(e) {
|
|
3930
|
-
const { throttle: u } = jc(), t = u(i), n = new ResizeObserver(a), o = e, r = R(100), s = R(0), c =
|
|
3930
|
+
const { throttle: u } = jc(), t = u(i), n = new ResizeObserver(a), o = e, r = R(100), s = R(0), c = w(() => s.value > o.visibilityHeight);
|
|
3931
3931
|
be(() => {
|
|
3932
3932
|
var h;
|
|
3933
3933
|
a(), t(), window.addEventListener("scroll", t);
|
|
@@ -3993,10 +3993,10 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
3993
3993
|
dot: { type: Boolean }
|
|
3994
3994
|
},
|
|
3995
3995
|
setup(e) {
|
|
3996
|
-
const u = hu(), t = e, n =
|
|
3996
|
+
const u = hu(), t = e, n = w(() => {
|
|
3997
3997
|
const c = [];
|
|
3998
3998
|
return t.dot && c.push("is-dot"), c.push(`is-${t.type}`), c;
|
|
3999
|
-
}), o =
|
|
3999
|
+
}), o = w(() => u.default ? "sup" : "div"), r = w(() => !t.dot && t.text || t.showZero ? !0 : t.count > 0), s = w(() => t.dot ? "" : t.text ? t.text : t.max && t.count > t.max ? `${t.max}+` : `${t.count}`);
|
|
4000
4000
|
return (c, i) => (m(), L(Re, { name: "sq-zoom" }, {
|
|
4001
4001
|
default: Z(() => [
|
|
4002
4002
|
b(u).default || r.value ? (m(), S("span", {
|
|
@@ -4014,7 +4014,7 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
4014
4014
|
r.value ? (m(), S("span", {
|
|
4015
4015
|
key: 0,
|
|
4016
4016
|
class: "sq-badge-label-inner",
|
|
4017
|
-
textContent:
|
|
4017
|
+
textContent: se(s.value)
|
|
4018
4018
|
}, null, 8, ti)) : U("", !0)
|
|
4019
4019
|
]),
|
|
4020
4020
|
_: 1
|
|
@@ -4040,9 +4040,9 @@ const { md2tokens: Wc, tokens2vueh: Gc } = Hc(), Xc = "sq-article", Yc = O({
|
|
|
4040
4040
|
}
|
|
4041
4041
|
});
|
|
4042
4042
|
function si(e) {
|
|
4043
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Tn, void 0), o =
|
|
4043
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Tn, void 0), o = w(
|
|
4044
4044
|
() => b(n) ? void 0 : e.text
|
|
4045
|
-
), r =
|
|
4045
|
+
), r = w(
|
|
4046
4046
|
() => {
|
|
4047
4047
|
var a, l;
|
|
4048
4048
|
return u(
|
|
@@ -4052,12 +4052,12 @@ function si(e) {
|
|
|
4052
4052
|
"md"
|
|
4053
4053
|
);
|
|
4054
4054
|
}
|
|
4055
|
-
), s =
|
|
4055
|
+
), s = w(
|
|
4056
4056
|
() => {
|
|
4057
4057
|
var a;
|
|
4058
4058
|
return u((a = b(n)) == null ? void 0 : a.type, e.type);
|
|
4059
4059
|
}
|
|
4060
|
-
), c =
|
|
4060
|
+
), c = w(
|
|
4061
4061
|
() => {
|
|
4062
4062
|
var a, l;
|
|
4063
4063
|
return u(
|
|
@@ -4066,7 +4066,7 @@ function si(e) {
|
|
|
4066
4066
|
(l = b(t)) == null ? void 0 : l.round
|
|
4067
4067
|
);
|
|
4068
4068
|
}
|
|
4069
|
-
), i =
|
|
4069
|
+
), i = w(
|
|
4070
4070
|
() => {
|
|
4071
4071
|
var a, l, d;
|
|
4072
4072
|
return u(
|
|
@@ -4080,7 +4080,7 @@ function si(e) {
|
|
|
4080
4080
|
return { btnTextType: o, btnSize: r, btnType: s, btnRound: c, btnDisabled: i };
|
|
4081
4081
|
}
|
|
4082
4082
|
function ci(e) {
|
|
4083
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Ln, void 0), o =
|
|
4083
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Ln, void 0), o = w(
|
|
4084
4084
|
() => {
|
|
4085
4085
|
var a, l;
|
|
4086
4086
|
return u(
|
|
@@ -4090,22 +4090,22 @@ function ci(e) {
|
|
|
4090
4090
|
"md"
|
|
4091
4091
|
);
|
|
4092
4092
|
}
|
|
4093
|
-
), r =
|
|
4093
|
+
), r = w(
|
|
4094
4094
|
() => {
|
|
4095
4095
|
var a;
|
|
4096
4096
|
return u((a = b(n)) == null ? void 0 : a.form, e.form);
|
|
4097
4097
|
}
|
|
4098
|
-
), s =
|
|
4098
|
+
), s = w(
|
|
4099
4099
|
() => {
|
|
4100
4100
|
var a;
|
|
4101
4101
|
return u((a = b(n)) == null ? void 0 : a.name, e.name);
|
|
4102
4102
|
}
|
|
4103
|
-
), c =
|
|
4103
|
+
), c = w(
|
|
4104
4104
|
() => {
|
|
4105
4105
|
var a;
|
|
4106
4106
|
return u((a = b(n)) == null ? void 0 : a.variant, e.variant);
|
|
4107
4107
|
}
|
|
4108
|
-
), i =
|
|
4108
|
+
), i = w(
|
|
4109
4109
|
() => {
|
|
4110
4110
|
var a, l, d;
|
|
4111
4111
|
return u(
|
|
@@ -4126,22 +4126,22 @@ function ci(e) {
|
|
|
4126
4126
|
};
|
|
4127
4127
|
}
|
|
4128
4128
|
function ii(e) {
|
|
4129
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o =
|
|
4129
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o = w(
|
|
4130
4130
|
() => {
|
|
4131
4131
|
var i;
|
|
4132
4132
|
return u(e.size, (i = b(t)) == null ? void 0 : i.size, "md");
|
|
4133
4133
|
}
|
|
4134
|
-
), r =
|
|
4134
|
+
), r = w(
|
|
4135
4135
|
() => {
|
|
4136
4136
|
var i;
|
|
4137
4137
|
return u(e.round, (i = b(t)) == null ? void 0 : i.round);
|
|
4138
4138
|
}
|
|
4139
|
-
), s =
|
|
4139
|
+
), s = w(
|
|
4140
4140
|
() => {
|
|
4141
4141
|
var i;
|
|
4142
4142
|
return u((i = b(t)) == null ? void 0 : i.disabled, e.disabled);
|
|
4143
4143
|
}
|
|
4144
|
-
), c =
|
|
4144
|
+
), c = w(
|
|
4145
4145
|
() => {
|
|
4146
4146
|
var i;
|
|
4147
4147
|
return u((i = b(t)) == null ? void 0 : i.readonly, e.readonly);
|
|
@@ -4150,7 +4150,7 @@ function ii(e) {
|
|
|
4150
4150
|
return { inputSize: o, inputRound: r, inputDisabled: s, inputReadonly: c, id: n };
|
|
4151
4151
|
}
|
|
4152
4152
|
function ai(e) {
|
|
4153
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Qn, void 0), o =
|
|
4153
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(Qn, void 0), o = w(
|
|
4154
4154
|
() => {
|
|
4155
4155
|
var a, l;
|
|
4156
4156
|
return u(
|
|
@@ -4160,22 +4160,22 @@ function ai(e) {
|
|
|
4160
4160
|
"md"
|
|
4161
4161
|
);
|
|
4162
4162
|
}
|
|
4163
|
-
), r =
|
|
4163
|
+
), r = w(
|
|
4164
4164
|
() => {
|
|
4165
4165
|
var a;
|
|
4166
4166
|
return u((a = b(n)) == null ? void 0 : a.form, e.form);
|
|
4167
4167
|
}
|
|
4168
|
-
), s =
|
|
4168
|
+
), s = w(
|
|
4169
4169
|
() => {
|
|
4170
4170
|
var a;
|
|
4171
4171
|
return u((a = b(n)) == null ? void 0 : a.name, e.name);
|
|
4172
4172
|
}
|
|
4173
|
-
), c =
|
|
4173
|
+
), c = w(
|
|
4174
4174
|
() => {
|
|
4175
4175
|
var a;
|
|
4176
4176
|
return u((a = b(n)) == null ? void 0 : a.variant, e.variant);
|
|
4177
4177
|
}
|
|
4178
|
-
), i =
|
|
4178
|
+
), i = w(
|
|
4179
4179
|
() => {
|
|
4180
4180
|
var a, l, d;
|
|
4181
4181
|
return u(
|
|
@@ -4198,7 +4198,7 @@ function ai(e) {
|
|
|
4198
4198
|
function li(e) {
|
|
4199
4199
|
const { getOption: u } = ou(), t = _e(e0, void 0);
|
|
4200
4200
|
return {
|
|
4201
|
-
segmentedDisabled:
|
|
4201
|
+
segmentedDisabled: w(
|
|
4202
4202
|
() => {
|
|
4203
4203
|
var o;
|
|
4204
4204
|
return u((o = b(t)) == null ? void 0 : o.disabled, e.disabled);
|
|
@@ -4208,12 +4208,12 @@ function li(e) {
|
|
|
4208
4208
|
};
|
|
4209
4209
|
}
|
|
4210
4210
|
function di(e) {
|
|
4211
|
-
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o =
|
|
4211
|
+
const { getOption: u } = ou(), t = _e(su, void 0), n = _e(mt, void 0), o = w(
|
|
4212
4212
|
() => {
|
|
4213
4213
|
var s;
|
|
4214
4214
|
return u(e.size, (s = b(t)) == null ? void 0 : s.size, "md");
|
|
4215
4215
|
}
|
|
4216
|
-
), r =
|
|
4216
|
+
), r = w(
|
|
4217
4217
|
() => {
|
|
4218
4218
|
var s, c;
|
|
4219
4219
|
return u(
|
|
@@ -4242,10 +4242,10 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4242
4242
|
},
|
|
4243
4243
|
emits: ["click"],
|
|
4244
4244
|
setup(e, { emit: u }) {
|
|
4245
|
-
const t = u, n = e, { btnTextType: o, btnSize: r, btnType: s, btnRound: c, btnDisabled: i } = si(n), a =
|
|
4246
|
-
const h = [], p = b(r), f = b(s), g = b(c),
|
|
4247
|
-
return p !== "md" && h.push(`sq-button--${p}`), f && h.push(`is-${f}`), g && h.push("is-round"),
|
|
4248
|
-
}), l =
|
|
4245
|
+
const t = u, n = e, { btnTextType: o, btnSize: r, btnType: s, btnRound: c, btnDisabled: i } = si(n), a = w(() => {
|
|
4246
|
+
const h = [], p = b(r), f = b(s), g = b(c), _ = b(o);
|
|
4247
|
+
return p !== "md" && h.push(`sq-button--${p}`), f && h.push(`is-${f}`), g && h.push("is-round"), _ && h.push("is-text"), _ && n.bg && h.push("has-bg"), h;
|
|
4248
|
+
}), l = w(() => n.loading ? Su : n.icon), d = w(() => n.loading || b(i));
|
|
4249
4249
|
return (h, p) => (m(), S("button", {
|
|
4250
4250
|
class: K(["sq-button", a.value]),
|
|
4251
4251
|
disabled: d.value,
|
|
@@ -4278,10 +4278,10 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4278
4278
|
return nu(
|
|
4279
4279
|
Tn,
|
|
4280
4280
|
R({
|
|
4281
|
-
size:
|
|
4282
|
-
type:
|
|
4283
|
-
round:
|
|
4284
|
-
disabled:
|
|
4281
|
+
size: re(u, "size"),
|
|
4282
|
+
type: re(u, "type"),
|
|
4283
|
+
round: re(u, "round"),
|
|
4284
|
+
disabled: re(u, "disabled")
|
|
4285
4285
|
})
|
|
4286
4286
|
), (t, n) => (m(), S("div", hi, [
|
|
4287
4287
|
j(t.$slots, "default")
|
|
@@ -4306,7 +4306,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4306
4306
|
t.title || b(u).title ? (m(), S("div", xi, [
|
|
4307
4307
|
F("h2", {
|
|
4308
4308
|
class: K({ "has-decorative": t.decorative }),
|
|
4309
|
-
textContent:
|
|
4309
|
+
textContent: se(t.title)
|
|
4310
4310
|
}, null, 10, gi),
|
|
4311
4311
|
j(n.$slots, "title")
|
|
4312
4312
|
])) : U("", !0),
|
|
@@ -4319,7 +4319,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4319
4319
|
}), ki = ["autofocus", "name", "form", "value", "disabled"], yi = ["textContent"], wi = "sq-checkbox", Rn = /* @__PURE__ */ O({
|
|
4320
4320
|
name: wi,
|
|
4321
4321
|
__name: "checkbox",
|
|
4322
|
-
props: /* @__PURE__ */
|
|
4322
|
+
props: /* @__PURE__ */ ue({
|
|
4323
4323
|
form: {},
|
|
4324
4324
|
name: {},
|
|
4325
4325
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -4333,7 +4333,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4333
4333
|
checked: { type: Boolean, default: !1 },
|
|
4334
4334
|
checkedModifiers: {}
|
|
4335
4335
|
}),
|
|
4336
|
-
emits: /* @__PURE__ */
|
|
4336
|
+
emits: /* @__PURE__ */ ue(["change"], ["update:checked"]),
|
|
4337
4337
|
setup(e, { emit: u }) {
|
|
4338
4338
|
const t = u, n = e, {
|
|
4339
4339
|
checkboxSize: o,
|
|
@@ -4342,10 +4342,10 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4342
4342
|
checkboxName: c,
|
|
4343
4343
|
checkboxVariant: i,
|
|
4344
4344
|
groupContext: a
|
|
4345
|
-
} = ci(n), l = ae(e, "checked"), d =
|
|
4346
|
-
const p = [], f = b(o), g = b(r),
|
|
4347
|
-
return f !== "md" && p.push(`sq-selection--${f}`), h.value && p.push("is-checked"), g && p.push("is-disabled"),
|
|
4348
|
-
}), h =
|
|
4345
|
+
} = ci(n), l = ae(e, "checked"), d = w(() => {
|
|
4346
|
+
const p = [], f = b(o), g = b(r), _ = b(i);
|
|
4347
|
+
return f !== "md" && p.push(`sq-selection--${f}`), h.value && p.push("is-checked"), g && p.push("is-disabled"), _ && p.push(`is-${_}`), p;
|
|
4348
|
+
}), h = w(() => a ? b(a).list.includes(n.value) : l.value);
|
|
4349
4349
|
return ie(h, (p) => {
|
|
4350
4350
|
if (l.value !== p) {
|
|
4351
4351
|
l.value = p;
|
|
@@ -4382,7 +4382,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4382
4382
|
n.label ? (m(), S("span", {
|
|
4383
4383
|
key: 1,
|
|
4384
4384
|
class: "sq-selection-label",
|
|
4385
|
-
textContent:
|
|
4385
|
+
textContent: se(n.label)
|
|
4386
4386
|
}, null, 8, yi)) : U("", !0)
|
|
4387
4387
|
], 2));
|
|
4388
4388
|
}
|
|
@@ -4400,15 +4400,15 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4400
4400
|
},
|
|
4401
4401
|
emits: ["change", "update:value"],
|
|
4402
4402
|
setup(e, { emit: u }) {
|
|
4403
|
-
const { nextId: t } = qu(), n = u, o = e, r = R(o.value ?? []), s =
|
|
4403
|
+
const { nextId: t } = qu(), n = u, o = e, r = R(o.value ?? []), s = w(() => o.name ?? `sq-checkbox-${t()}`);
|
|
4404
4404
|
nu(
|
|
4405
4405
|
Ln,
|
|
4406
4406
|
R({
|
|
4407
|
-
form:
|
|
4407
|
+
form: re(o, "form"),
|
|
4408
4408
|
name: s,
|
|
4409
|
-
disabled:
|
|
4410
|
-
size:
|
|
4411
|
-
variant:
|
|
4409
|
+
disabled: re(o, "disabled"),
|
|
4410
|
+
size: re(o, "size"),
|
|
4411
|
+
variant: re(o, "variant"),
|
|
4412
4412
|
list: r,
|
|
4413
4413
|
toggleItem: c
|
|
4414
4414
|
})
|
|
@@ -4436,53 +4436,59 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4436
4436
|
name: Ai,
|
|
4437
4437
|
inheritAttrs: !1,
|
|
4438
4438
|
__name: "mask",
|
|
4439
|
-
props: /* @__PURE__ */
|
|
4439
|
+
props: /* @__PURE__ */ ue({
|
|
4440
4440
|
keyboard: { type: Boolean, default: !0 },
|
|
4441
4441
|
maskCloseable: { type: Boolean },
|
|
4442
|
-
|
|
4442
|
+
beforeClose: {}
|
|
4443
4443
|
}, {
|
|
4444
4444
|
visible: { type: Boolean, default: !1 },
|
|
4445
4445
|
visibleModifiers: {}
|
|
4446
4446
|
}),
|
|
4447
|
-
emits: ["update:visible"],
|
|
4448
|
-
setup(e) {
|
|
4449
|
-
const { nextZIndex:
|
|
4450
|
-
let
|
|
4451
|
-
const
|
|
4452
|
-
|
|
4453
|
-
const
|
|
4454
|
-
|
|
4447
|
+
emits: /* @__PURE__ */ ue(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
4448
|
+
setup(e, { emit: u }) {
|
|
4449
|
+
const { nextZIndex: t } = ct();
|
|
4450
|
+
let n;
|
|
4451
|
+
const o = u, r = e, s = R(0), c = R(!1), i = ae(e, "visible");
|
|
4452
|
+
c.value = i.value, ie(i, (h) => {
|
|
4453
|
+
const p = document.scrollingElement;
|
|
4454
|
+
h ? (n = p.style.overflow, p.style.overflow = "hidden", s.value = t(), c.value = !0, document.addEventListener("keydown", a)) : (p.style.overflow = n, document.removeEventListener("keydown", a));
|
|
4455
4455
|
}), Ue(() => {
|
|
4456
|
-
document.removeEventListener("keydown",
|
|
4456
|
+
document.removeEventListener("keydown", a);
|
|
4457
4457
|
});
|
|
4458
|
-
function
|
|
4459
|
-
|
|
4458
|
+
function a(h) {
|
|
4459
|
+
h.key === "Escape" && r.keyboard && d();
|
|
4460
4460
|
}
|
|
4461
|
-
function
|
|
4462
|
-
|
|
4461
|
+
function l() {
|
|
4462
|
+
r.maskCloseable && d();
|
|
4463
4463
|
}
|
|
4464
|
-
function
|
|
4465
|
-
if (typeof
|
|
4466
|
-
|
|
4464
|
+
function d() {
|
|
4465
|
+
if (typeof r.beforeClose != "function") {
|
|
4466
|
+
i.value = !1;
|
|
4467
4467
|
return;
|
|
4468
4468
|
}
|
|
4469
|
-
const
|
|
4470
|
-
|
|
4471
|
-
|
|
4469
|
+
const h = r.beforeClose();
|
|
4470
|
+
h instanceof Promise ? h.then((p) => {
|
|
4471
|
+
p && (i.value = !1);
|
|
4472
4472
|
}).catch(() => {
|
|
4473
|
-
}) :
|
|
4474
|
-
}
|
|
4475
|
-
return (
|
|
4476
|
-
T(Re, {
|
|
4473
|
+
}) : h && (i.value = !1);
|
|
4474
|
+
}
|
|
4475
|
+
return (h, p) => (m(), L(Qt, { to: "body" }, [
|
|
4476
|
+
T(Re, {
|
|
4477
|
+
name: "sq-fade",
|
|
4478
|
+
onBeforeEnter: p[0] || (p[0] = (f) => o("open")),
|
|
4479
|
+
onAfterEnter: p[1] || (p[1] = (f) => o("opened")),
|
|
4480
|
+
onBeforeLeave: p[2] || (p[2] = (f) => o("close")),
|
|
4481
|
+
onAfterLeave: p[3] || (p[3] = (f) => o("closed"))
|
|
4482
|
+
}, {
|
|
4477
4483
|
default: Z(() => [
|
|
4478
|
-
|
|
4484
|
+
c.value ? fe((m(), S("div", qe({
|
|
4479
4485
|
key: 0,
|
|
4480
4486
|
class: "sq-mask",
|
|
4481
|
-
style: { zIndex:
|
|
4482
|
-
},
|
|
4483
|
-
j(
|
|
4487
|
+
style: { zIndex: s.value }
|
|
4488
|
+
}, h.$attrs, { onClick: l }), [
|
|
4489
|
+
j(h.$slots, "default")
|
|
4484
4490
|
], 16)), [
|
|
4485
|
-
[He,
|
|
4491
|
+
[He, i.value]
|
|
4486
4492
|
]) : U("", !0)
|
|
4487
4493
|
]),
|
|
4488
4494
|
_: 3
|
|
@@ -4499,7 +4505,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4499
4505
|
name: Bi,
|
|
4500
4506
|
inheritAttrs: !1,
|
|
4501
4507
|
__name: "dialog",
|
|
4502
|
-
props: /* @__PURE__ */
|
|
4508
|
+
props: /* @__PURE__ */ ue({
|
|
4503
4509
|
type: {},
|
|
4504
4510
|
title: {},
|
|
4505
4511
|
okText: { default: "确认" },
|
|
@@ -4511,82 +4517,86 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4511
4517
|
onOk: {},
|
|
4512
4518
|
keyboard: { type: Boolean, default: void 0 },
|
|
4513
4519
|
maskCloseable: { type: Boolean, default: void 0 },
|
|
4514
|
-
|
|
4520
|
+
beforeClose: {}
|
|
4515
4521
|
}, {
|
|
4516
4522
|
visible: { type: Boolean, default: !1 },
|
|
4517
4523
|
visibleModifiers: {}
|
|
4518
4524
|
}),
|
|
4519
|
-
emits: ["update:visible"],
|
|
4520
|
-
setup(e) {
|
|
4521
|
-
const
|
|
4522
|
-
const
|
|
4523
|
-
return
|
|
4524
|
-
}),
|
|
4525
|
-
type:
|
|
4526
|
-
loading:
|
|
4527
|
-
disabled:
|
|
4528
|
-
...
|
|
4529
|
-
})),
|
|
4525
|
+
emits: /* @__PURE__ */ ue(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
4526
|
+
setup(e, { emit: u }) {
|
|
4527
|
+
const t = hu(), n = u, o = e, r = R(!1), s = R(!1), c = ae(e, "visible"), i = w(() => !!o.title || !!t.header), a = w(() => {
|
|
4528
|
+
const k = [];
|
|
4529
|
+
return o.type && k.push(`is-${o.type}`), i.value && k.push("has-header"), k;
|
|
4530
|
+
}), l = w(() => o.type ? st[o.type] : void 0), d = w(() => ({
|
|
4531
|
+
type: o.type ?? "primary",
|
|
4532
|
+
loading: r.value && s.value,
|
|
4533
|
+
disabled: r.value && !s.value,
|
|
4534
|
+
...o.okButtonProps
|
|
4535
|
+
})), h = w(() => ({
|
|
4530
4536
|
text: !0,
|
|
4531
4537
|
bg: !0,
|
|
4532
|
-
loading:
|
|
4533
|
-
disabled:
|
|
4534
|
-
...
|
|
4535
|
-
})),
|
|
4536
|
-
() =>
|
|
4538
|
+
loading: r.value && !s.value,
|
|
4539
|
+
disabled: r.value && s.value,
|
|
4540
|
+
...o.cancelButtonProps
|
|
4541
|
+
})), p = w(
|
|
4542
|
+
() => d.value.loading || h.value.loading || !c.value
|
|
4537
4543
|
);
|
|
4538
|
-
function
|
|
4539
|
-
if (
|
|
4540
|
-
if (typeof
|
|
4541
|
-
const v =
|
|
4542
|
-
return v instanceof Promise ? (
|
|
4543
|
-
|
|
4544
|
+
function f(k) {
|
|
4545
|
+
if (p.value) return !1;
|
|
4546
|
+
if (typeof k != "function") return !0;
|
|
4547
|
+
const v = k();
|
|
4548
|
+
return v instanceof Promise ? (r.value = !0, v.finally(() => {
|
|
4549
|
+
r.value = !1;
|
|
4544
4550
|
})) : v;
|
|
4545
4551
|
}
|
|
4546
|
-
async function
|
|
4547
|
-
if (
|
|
4548
|
-
|
|
4549
|
-
}
|
|
4550
|
-
async function
|
|
4551
|
-
|
|
4552
|
-
}
|
|
4553
|
-
return (
|
|
4554
|
-
visible:
|
|
4555
|
-
"onUpdate:visible": v[0] || (v[0] = (
|
|
4556
|
-
|
|
4552
|
+
async function g() {
|
|
4553
|
+
if (p.value) return !1;
|
|
4554
|
+
s.value = !1, await f(o.beforeClose) && (c.value = !1);
|
|
4555
|
+
}
|
|
4556
|
+
async function _() {
|
|
4557
|
+
s.value = !0, await f(o.onOk) && (c.value = !1);
|
|
4558
|
+
}
|
|
4559
|
+
return (k, v) => (m(), L(b(In), {
|
|
4560
|
+
visible: c.value,
|
|
4561
|
+
"onUpdate:visible": v[0] || (v[0] = (D) => c.value = D),
|
|
4562
|
+
"before-close": () => f(o.beforeClose),
|
|
4563
|
+
onOpen: v[1] || (v[1] = (D) => n("open")),
|
|
4564
|
+
onOpened: v[2] || (v[2] = (D) => n("opened")),
|
|
4565
|
+
onClose: v[3] || (v[3] = (D) => n("close")),
|
|
4566
|
+
onClosed: v[4] || (v[4] = (D) => n("closed"))
|
|
4557
4567
|
}, {
|
|
4558
4568
|
default: Z(() => [
|
|
4559
|
-
F("div", qe({ class: "sq-dialog" },
|
|
4560
|
-
|
|
4561
|
-
|
|
4569
|
+
F("div", qe({ class: "sq-dialog" }, k.$attrs, { class: a.value }), [
|
|
4570
|
+
i.value ? (m(), S("div", Fi, [
|
|
4571
|
+
l.value ? (m(), L(me(l.value), {
|
|
4562
4572
|
key: 0,
|
|
4563
4573
|
class: "sq-dialog-header-icon"
|
|
4564
4574
|
})) : U("", !0),
|
|
4565
|
-
j(
|
|
4575
|
+
j(k.$slots, "header", {}, () => [
|
|
4566
4576
|
F("span", {
|
|
4567
4577
|
class: "sq-dialog-header-title",
|
|
4568
|
-
textContent:
|
|
4578
|
+
textContent: se(o.title)
|
|
4569
4579
|
}, null, 8, Si)
|
|
4570
4580
|
]),
|
|
4571
4581
|
T(b(rt), {
|
|
4572
4582
|
class: "sq-dialog-close",
|
|
4573
|
-
onClick:
|
|
4583
|
+
onClick: g
|
|
4574
4584
|
})
|
|
4575
4585
|
])) : U("", !0),
|
|
4576
4586
|
F("div", qi, [
|
|
4577
|
-
j(
|
|
4587
|
+
j(k.$slots, "default")
|
|
4578
4588
|
]),
|
|
4579
|
-
|
|
4580
|
-
j(
|
|
4581
|
-
T(b(Q), qe(
|
|
4589
|
+
o.footer ? (m(), S("div", $i, [
|
|
4590
|
+
j(k.$slots, "footer", {}, () => [
|
|
4591
|
+
T(b(Q), qe(h.value, { onClick: g }), {
|
|
4582
4592
|
default: Z(() => [
|
|
4583
|
-
iu(
|
|
4593
|
+
iu(se(o.cancelText), 1)
|
|
4584
4594
|
]),
|
|
4585
4595
|
_: 1
|
|
4586
4596
|
}, 16),
|
|
4587
|
-
T(b(Q), qe(
|
|
4597
|
+
T(b(Q), qe(d.value, { onClick: _ }), {
|
|
4588
4598
|
default: Z(() => [
|
|
4589
|
-
iu(
|
|
4599
|
+
iu(se(o.okText), 1)
|
|
4590
4600
|
]),
|
|
4591
4601
|
_: 1
|
|
4592
4602
|
}, 16)
|
|
@@ -4595,7 +4605,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4595
4605
|
], 16)
|
|
4596
4606
|
]),
|
|
4597
4607
|
_: 3
|
|
4598
|
-
}, 8, ["visible"]));
|
|
4608
|
+
}, 8, ["visible", "before-close"]));
|
|
4599
4609
|
}
|
|
4600
4610
|
}), Mi = "sq-divider", Je = /* @__PURE__ */ O({
|
|
4601
4611
|
name: Mi,
|
|
@@ -4608,7 +4618,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4608
4618
|
size: {}
|
|
4609
4619
|
},
|
|
4610
4620
|
setup(e) {
|
|
4611
|
-
const u = hu(), t = e, n =
|
|
4621
|
+
const u = hu(), t = e, n = w(() => {
|
|
4612
4622
|
const o = [];
|
|
4613
4623
|
return ["none", "solid", "dotted", "dashed"].includes(t.variant) && o.push("is-thin"), u.default && t.direction !== "vertical" && o.push(`text-${t.orientation}`), o.push(`sq-divider--${t.direction}`), o;
|
|
4614
4624
|
});
|
|
@@ -4910,13 +4920,13 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4910
4920
|
let h = 1;
|
|
4911
4921
|
if (r(l)) {
|
|
4912
4922
|
d && s(d) && (h = parseInt(c(d)) + 1);
|
|
4913
|
-
const g = `${h}. `,
|
|
4914
|
-
a[i] = l.replace("- ", g), t("updateText", a,
|
|
4923
|
+
const g = `${h}. `, _ = g.length - 2;
|
|
4924
|
+
a[i] = l.replace("- ", g), t("updateText", a, _, _);
|
|
4915
4925
|
return;
|
|
4916
4926
|
}
|
|
4917
4927
|
if (s(l)) {
|
|
4918
|
-
const g = c(l),
|
|
4919
|
-
a[i] = l.replace(g, ""), t("updateText", a,
|
|
4928
|
+
const g = c(l), _ = -g.length;
|
|
4929
|
+
a[i] = l.replace(g, ""), t("updateText", a, _, _);
|
|
4920
4930
|
return;
|
|
4921
4931
|
}
|
|
4922
4932
|
d && s(d) && (h = parseInt(c(d)) + 1);
|
|
@@ -4950,7 +4960,7 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4950
4960
|
}), Gi = { class: "sq-editor-body" }, Xi = { class: "sq-editor-toolbar" }, Yi = { class: "sq-editor-control" }, Ji = "sq-editor", D1 = /* @__PURE__ */ O({
|
|
4951
4961
|
name: Ji,
|
|
4952
4962
|
__name: "editor",
|
|
4953
|
-
props: /* @__PURE__ */
|
|
4963
|
+
props: /* @__PURE__ */ ue({
|
|
4954
4964
|
round: { type: Boolean },
|
|
4955
4965
|
disabled: { type: Boolean },
|
|
4956
4966
|
placeholder: {},
|
|
@@ -4977,15 +4987,15 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4977
4987
|
let t;
|
|
4978
4988
|
const n = e, o = R("edit"), r = R([]), s = R(!1), c = R(""), i = R(), a = R({}), l = de(null), d = de(null), h = de(null), p = de(
|
|
4979
4989
|
null
|
|
4980
|
-
), f = ae(e, "value"), g =
|
|
4990
|
+
), f = ae(e, "value"), g = w(() => {
|
|
4981
4991
|
const A = [];
|
|
4982
4992
|
return n.size !== "md" && A.push(`sq-editor--${n.size}`), n.round && A.push("is-round"), A;
|
|
4983
|
-
}),
|
|
4993
|
+
}), _ = w(
|
|
4984
4994
|
() => c.value.length && !c.value.includes(`
|
|
4985
4995
|
`) && c.value !== " " && !n.disabled
|
|
4986
|
-
),
|
|
4996
|
+
), k = w(
|
|
4987
4997
|
() => i.value !== void 0 && !c.value.length && !n.disabled
|
|
4988
|
-
),
|
|
4998
|
+
), v = w(
|
|
4989
4999
|
() => typeof n.beforePreview == "function" ? n.beforePreview(f.value) : f.value
|
|
4990
5000
|
);
|
|
4991
5001
|
be(() => {
|
|
@@ -4993,18 +5003,18 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
4993
5003
|
}), Ue(() => {
|
|
4994
5004
|
document.removeEventListener("selectionchange", $), document.removeEventListener("click", M);
|
|
4995
5005
|
});
|
|
4996
|
-
function
|
|
5006
|
+
function D(A) {
|
|
4997
5007
|
A === "edit" && Ku(() => {
|
|
4998
|
-
var
|
|
4999
|
-
(
|
|
5008
|
+
var E;
|
|
5009
|
+
(E = l.value) == null || E.focus();
|
|
5000
5010
|
});
|
|
5001
5011
|
}
|
|
5002
|
-
function
|
|
5012
|
+
function C(A) {
|
|
5003
5013
|
var W, G, I;
|
|
5004
|
-
const
|
|
5014
|
+
const E = r.value[i.value], z = (E == null ? void 0 : E.replace(" ", "")) ?? "";
|
|
5005
5015
|
if (A.key === "Tab") {
|
|
5006
5016
|
A.preventDefault();
|
|
5007
|
-
const P =
|
|
5017
|
+
const P = E.substring(0, a.value.startOfRow), B = E.substring(a.value.endOfRow);
|
|
5008
5018
|
r.value[i.value] = `${P} ${B}`, x(r.value, 1, 1);
|
|
5009
5019
|
return;
|
|
5010
5020
|
}
|
|
@@ -5021,38 +5031,38 @@ const fi = ["disabled", "form", "type"], pi = "sq-button", Q = /* @__PURE__ */ O
|
|
|
5021
5031
|
return;
|
|
5022
5032
|
}
|
|
5023
5033
|
if (A.key === "Enter") {
|
|
5024
|
-
if (q(
|
|
5034
|
+
if (q(E)) {
|
|
5025
5035
|
A.preventDefault();
|
|
5026
|
-
const P =
|
|
5036
|
+
const P = E.substring(0, E.indexOf("- "));
|
|
5027
5037
|
if (z !== "- ") {
|
|
5028
5038
|
const N = 3 + P.length;
|
|
5029
|
-
r.value[i.value] = `${
|
|
5039
|
+
r.value[i.value] = `${E}
|
|
5030
5040
|
${P}- `, V(A.target), x(r.value, N, N);
|
|
5031
5041
|
return;
|
|
5032
5042
|
}
|
|
5033
5043
|
const B = 2 + P.length;
|
|
5034
|
-
r.value[i.value] =
|
|
5044
|
+
r.value[i.value] = E.substring(B), x(r.value, -B, -B);
|
|
5035
5045
|
return;
|
|
5036
5046
|
}
|
|
5037
|
-
if (
|
|
5047
|
+
if (y(E)) {
|
|
5038
5048
|
A.preventDefault();
|
|
5039
|
-
const P = z.match(/^\d+\.\s/)[0], N = `${parseInt(P) + 1}. `, Y =
|
|
5049
|
+
const P = z.match(/^\d+\.\s/)[0], N = `${parseInt(P) + 1}. `, Y = E.substring(0, E.indexOf(P));
|
|
5040
5050
|
if (z !== P) {
|
|
5041
5051
|
const Pe = N.length + Y.length + 1;
|
|
5042
|
-
r.value[i.value] = `${
|
|
5052
|
+
r.value[i.value] = `${E}
|
|
5043
5053
|
${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
5044
5054
|
return;
|
|
5045
5055
|
}
|
|
5046
|
-
const
|
|
5047
|
-
r.value[i.value] =
|
|
5056
|
+
const te = P.length + Y.length;
|
|
5057
|
+
r.value[i.value] = E.substring(te), x(r.value, -te, -te);
|
|
5048
5058
|
return;
|
|
5049
5059
|
}
|
|
5050
5060
|
}
|
|
5051
5061
|
}
|
|
5052
5062
|
function $(A) {
|
|
5053
5063
|
var z;
|
|
5054
|
-
const
|
|
5055
|
-
(
|
|
5064
|
+
const E = window.getSelection();
|
|
5065
|
+
(E == null ? void 0 : E.focusNode) === ((z = l.value) == null ? void 0 : z.$el) && (t = A.target, !((t == null ? void 0 : t.selectionStart) === void 0 || (t == null ? void 0 : t.selectionEnd) === void 0) && (a.value.start = (t == null ? void 0 : t.selectionStart) ?? 0, a.value.end = (t == null ? void 0 : t.selectionEnd) ?? 0, c.value = f.value.substring(
|
|
5056
5066
|
a.value.start,
|
|
5057
5067
|
a.value.end
|
|
5058
5068
|
), H()));
|
|
@@ -5061,17 +5071,17 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5061
5071
|
c.value = "", i.value = void 0;
|
|
5062
5072
|
}
|
|
5063
5073
|
function V(A) {
|
|
5064
|
-
const
|
|
5074
|
+
const E = A.selectionStart, W = f.value.substring(0, E ?? 0).split(`
|
|
5065
5075
|
`).length + 1, G = A.scrollTop, I = window.getComputedStyle(A), P = parseFloat(I.lineHeight), B = parseFloat(I.height), Y = parseFloat(I.paddingBlockStart) + P * W;
|
|
5066
5076
|
B + G > Y || requestAnimationFrame(() => {
|
|
5067
5077
|
A.scrollTo({ top: Y - B });
|
|
5068
5078
|
});
|
|
5069
5079
|
}
|
|
5070
5080
|
function H() {
|
|
5071
|
-
const A = t.selectionStart,
|
|
5072
|
-
i.value =
|
|
5081
|
+
const A = t.selectionStart, E = f.value.substring(0, A ?? 0);
|
|
5082
|
+
i.value = E.split(`
|
|
5073
5083
|
`).length - 1;
|
|
5074
|
-
const z = Math.max(
|
|
5084
|
+
const z = Math.max(E.lastIndexOf(`
|
|
5075
5085
|
`) + 1, 0);
|
|
5076
5086
|
a.value.startOfRow = a.value.start - z, a.value.endOfRow = a.value.startOfRow + c.value.length, r.value = f.value.split(`
|
|
5077
5087
|
`);
|
|
@@ -5079,20 +5089,20 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5079
5089
|
function q(A) {
|
|
5080
5090
|
return A.replace(" ", "").startsWith("- ");
|
|
5081
5091
|
}
|
|
5082
|
-
function
|
|
5092
|
+
function y(A) {
|
|
5083
5093
|
return /^\d+\.\s+/.test(A.replace(" ", ""));
|
|
5084
5094
|
}
|
|
5085
|
-
function x(A,
|
|
5095
|
+
function x(A, E = 0, z = 0) {
|
|
5086
5096
|
s.value || (r.value = [...A], f.value = r.value.join(`
|
|
5087
|
-
`), a.value.start +=
|
|
5097
|
+
`), a.value.start += E, a.value.end += z, a.value.startOfRow += E, a.value.endOfRow += z, t == null || t.focus(), s.value = !0, Ku(() => {
|
|
5088
5098
|
t == null || t.setSelectionRange(a.value.start, a.value.end), setTimeout(() => {
|
|
5089
5099
|
s.value = !1;
|
|
5090
5100
|
}, 100);
|
|
5091
5101
|
}));
|
|
5092
5102
|
}
|
|
5093
|
-
return (A,
|
|
5103
|
+
return (A, E) => (m(), S("div", {
|
|
5094
5104
|
class: K(["sq-editor", g.value]),
|
|
5095
|
-
onClick:
|
|
5105
|
+
onClick: E[2] || (E[2] = Me(() => {
|
|
5096
5106
|
}, ["stop"]))
|
|
5097
5107
|
}, [
|
|
5098
5108
|
fe(F("div", Gi, [
|
|
@@ -5100,7 +5110,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5100
5110
|
T(Ti, {
|
|
5101
5111
|
ref_key: "boldRef",
|
|
5102
5112
|
ref: d,
|
|
5103
|
-
disabled: !
|
|
5113
|
+
disabled: !_.value,
|
|
5104
5114
|
rows: r.value,
|
|
5105
5115
|
"selected-val": c.value,
|
|
5106
5116
|
"selected-row": i.value,
|
|
@@ -5110,7 +5120,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5110
5120
|
T(Li, {
|
|
5111
5121
|
ref_key: "italicRef",
|
|
5112
5122
|
ref: h,
|
|
5113
|
-
disabled: !
|
|
5123
|
+
disabled: !_.value,
|
|
5114
5124
|
rows: r.value,
|
|
5115
5125
|
"selected-val": c.value,
|
|
5116
5126
|
"selected-row": i.value,
|
|
@@ -5120,7 +5130,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5120
5130
|
T(Oi, {
|
|
5121
5131
|
ref_key: "underlineRef",
|
|
5122
5132
|
ref: p,
|
|
5123
|
-
disabled: !
|
|
5133
|
+
disabled: !_.value,
|
|
5124
5134
|
rows: r.value,
|
|
5125
5135
|
"selected-val": c.value,
|
|
5126
5136
|
"selected-row": i.value,
|
|
@@ -5128,7 +5138,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5128
5138
|
onUpdateText: x
|
|
5129
5139
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5130
5140
|
T(Ni, {
|
|
5131
|
-
disabled: !
|
|
5141
|
+
disabled: !_.value,
|
|
5132
5142
|
rows: r.value,
|
|
5133
5143
|
"selected-val": c.value,
|
|
5134
5144
|
"selected-row": i.value,
|
|
@@ -5136,7 +5146,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5136
5146
|
onUpdateText: x
|
|
5137
5147
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5138
5148
|
T(Vi, {
|
|
5139
|
-
disabled: !
|
|
5149
|
+
disabled: !_.value,
|
|
5140
5150
|
rows: r.value,
|
|
5141
5151
|
"selected-val": c.value,
|
|
5142
5152
|
"selected-row": i.value,
|
|
@@ -5145,7 +5155,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5145
5155
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5146
5156
|
T(b(Je), { direction: "vertical" }),
|
|
5147
5157
|
T(Hi, {
|
|
5148
|
-
disabled: !
|
|
5158
|
+
disabled: !k.value,
|
|
5149
5159
|
rows: r.value,
|
|
5150
5160
|
"selected-val": c.value,
|
|
5151
5161
|
"selected-row": i.value,
|
|
@@ -5153,7 +5163,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5153
5163
|
onUpdateText: x
|
|
5154
5164
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
5155
5165
|
T(Wi, {
|
|
5156
|
-
disabled: !
|
|
5166
|
+
disabled: !k.value,
|
|
5157
5167
|
rows: r.value,
|
|
5158
5168
|
"selected-val": c.value,
|
|
5159
5169
|
"selected-row": i.value,
|
|
@@ -5174,15 +5184,15 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5174
5184
|
maxlength: n.maxlength,
|
|
5175
5185
|
minlength: n.minlength,
|
|
5176
5186
|
value: f.value,
|
|
5177
|
-
"onUpdate:value":
|
|
5178
|
-
onKeydown:
|
|
5187
|
+
"onUpdate:value": E[0] || (E[0] = (z) => f.value = z),
|
|
5188
|
+
onKeydown: C
|
|
5179
5189
|
}, null, 8, ["size", "round", "disabled", "placeholder", "maxlength", "minlength", "value"])
|
|
5180
5190
|
], 512), [
|
|
5181
5191
|
[He, o.value === "edit"]
|
|
5182
5192
|
]),
|
|
5183
5193
|
o.value === "preview" ? (m(), L(b(Yc), {
|
|
5184
5194
|
key: 0,
|
|
5185
|
-
text:
|
|
5195
|
+
text: v.value
|
|
5186
5196
|
}, null, 8, ["text"])) : U("", !0),
|
|
5187
5197
|
F("div", Yi, [
|
|
5188
5198
|
T(b(Gl), {
|
|
@@ -5191,8 +5201,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5191
5201
|
disabled: n.disabled,
|
|
5192
5202
|
items: u,
|
|
5193
5203
|
value: o.value,
|
|
5194
|
-
"onUpdate:value":
|
|
5195
|
-
onChange:
|
|
5204
|
+
"onUpdate:value": E[1] || (E[1] = (z) => o.value = z),
|
|
5205
|
+
onChange: D
|
|
5196
5206
|
}, null, 8, ["size", "round", "disabled", "value"]),
|
|
5197
5207
|
j(A.$slots, "control")
|
|
5198
5208
|
])
|
|
@@ -5212,10 +5222,10 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5212
5222
|
setup(e) {
|
|
5213
5223
|
const { nextId: u } = qu(), t = e, n = R(""), o = R("");
|
|
5214
5224
|
nu(mt, n);
|
|
5215
|
-
const r =
|
|
5225
|
+
const r = w(() => {
|
|
5216
5226
|
const i = [];
|
|
5217
5227
|
return t.isRequired && i.push("is-required"), i;
|
|
5218
|
-
}), s =
|
|
5228
|
+
}), s = w(() => ["input", "switch"].includes(t.type));
|
|
5219
5229
|
ie(
|
|
5220
5230
|
() => t.errorMsg,
|
|
5221
5231
|
(i) => {
|
|
@@ -5234,7 +5244,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5234
5244
|
t.label || t.showLabel ? (m(), S("label", {
|
|
5235
5245
|
key: 0,
|
|
5236
5246
|
class: K(["sq-form-item-label", r.value]),
|
|
5237
|
-
textContent:
|
|
5247
|
+
textContent: se(t.label),
|
|
5238
5248
|
for: t.type !== "custom" ? n.value : void 0
|
|
5239
5249
|
}, null, 10, Ki)) : U("", !0),
|
|
5240
5250
|
F("div", Qi, [
|
|
@@ -5247,7 +5257,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5247
5257
|
default: Z(() => [
|
|
5248
5258
|
fe(F("span", {
|
|
5249
5259
|
class: "sq-form-item-check",
|
|
5250
|
-
textContent:
|
|
5260
|
+
textContent: se(o.value)
|
|
5251
5261
|
}, null, 8, ea), [
|
|
5252
5262
|
[He, t.errorMsg]
|
|
5253
5263
|
])
|
|
@@ -5282,27 +5292,27 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5282
5292
|
nu(
|
|
5283
5293
|
su,
|
|
5284
5294
|
R({
|
|
5285
|
-
size:
|
|
5286
|
-
round:
|
|
5287
|
-
disabled:
|
|
5288
|
-
readonly:
|
|
5295
|
+
size: re(r, "size"),
|
|
5296
|
+
round: re(r, "round"),
|
|
5297
|
+
disabled: re(r, "disabled"),
|
|
5298
|
+
readonly: re(r, "readonly")
|
|
5289
5299
|
})
|
|
5290
5300
|
);
|
|
5291
|
-
const s = R({}), c = R([]), i = R({}), a =
|
|
5301
|
+
const s = R({}), c = R([]), i = R({}), a = w(() => {
|
|
5292
5302
|
const q = [];
|
|
5293
5303
|
return r.size !== "md" && q.push(`sq-form--${r.size}`), r.requiredMark !== "hidden" && q.push(`required-${r.requiredMark}`), q.push(`is-${r.layout}`), q;
|
|
5294
|
-
}), l =
|
|
5304
|
+
}), l = w(() => ({
|
|
5295
5305
|
"--form-label-width": r.labelWidth
|
|
5296
|
-
})), d =
|
|
5306
|
+
})), d = w(() => {
|
|
5297
5307
|
const q = r.step;
|
|
5298
|
-
return q === void 0 ? r.items : r.items.filter((
|
|
5308
|
+
return q === void 0 ? r.items : r.items.filter((y) => y.step === void 0 ? y : Array.isArray(y.step) ? y.step.includes(q) : y.step === q);
|
|
5299
5309
|
});
|
|
5300
5310
|
be(() => {
|
|
5301
5311
|
n = structuredClone(Xe(r.formData));
|
|
5302
5312
|
});
|
|
5303
5313
|
function h(q) {
|
|
5304
|
-
var
|
|
5305
|
-
return (
|
|
5314
|
+
var y;
|
|
5315
|
+
return (y = q.rule) == null ? void 0 : y.required;
|
|
5306
5316
|
}
|
|
5307
5317
|
function p(q) {
|
|
5308
5318
|
if (i.value[q]) return Su;
|
|
@@ -5310,48 +5320,48 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5310
5320
|
if (s.value[q])
|
|
5311
5321
|
return r.invalidStatus === "error" ? on : cn;
|
|
5312
5322
|
}
|
|
5313
|
-
async function f(q,
|
|
5323
|
+
async function f(q, y, x, A = !0) {
|
|
5314
5324
|
if (!x) return;
|
|
5315
|
-
const
|
|
5316
|
-
if (
|
|
5317
|
-
if (z === "array" && !
|
|
5318
|
-
if (z === "string" &&
|
|
5325
|
+
const E = x.trigger ?? "change", z = Array.isArray(E) ? "array" : "string";
|
|
5326
|
+
if (y) {
|
|
5327
|
+
if (z === "array" && !E.includes(y)) return;
|
|
5328
|
+
if (z === "string" && E !== y) return;
|
|
5319
5329
|
}
|
|
5320
5330
|
c.value = c.value.filter((P) => P !== q), M(q), i.value[q] = new AbortController(), await Ku();
|
|
5321
5331
|
const W = r.formData[q];
|
|
5322
5332
|
let G = !1;
|
|
5323
5333
|
const I = x.validateType ?? "string";
|
|
5324
|
-
return x.validateFunc ? G = await
|
|
5334
|
+
return x.validateFunc ? G = await _(q, W, x, y) : I === "string" ? G = k(q, W, x) : I === "boolean" ? G = v(q, W, x) : I === "list" && (G = D(q, W, x)), A && o("validate", q, G, Xe(c.value)), i.value[q].signal.aborted || M(q), G;
|
|
5325
5335
|
}
|
|
5326
5336
|
function g(q) {
|
|
5327
5337
|
if (s.value[q]) return r.invalidStatus;
|
|
5328
5338
|
}
|
|
5329
|
-
async function
|
|
5330
|
-
const
|
|
5339
|
+
async function _(q, y, x, A) {
|
|
5340
|
+
const E = i.value[q].signal, z = await x.validateFunc(y, E, A);
|
|
5331
5341
|
if (z === void 0) {
|
|
5332
5342
|
c.value = c.value.filter((W) => W !== q), delete s.value[q];
|
|
5333
5343
|
return;
|
|
5334
5344
|
}
|
|
5335
|
-
return z === !0 ? $(q) : z === !1 ?
|
|
5345
|
+
return z === !0 ? $(q) : z === !1 ? C(q, "字段验证失败") : z ? C(q, z) : $(q), z === !0 || typeof z == "string" && !z;
|
|
5336
5346
|
}
|
|
5337
|
-
function
|
|
5338
|
-
return x.required && !
|
|
5347
|
+
function k(q, y, x) {
|
|
5348
|
+
return x.required && !y ? (C(q, x.requiredText ?? "字段必填"), !1) : x.pattern && y && !x.pattern.test(y) ? (C(q, x.patternText ?? "字段验证失败"), !1) : ($(q), !0);
|
|
5339
5349
|
}
|
|
5340
|
-
function
|
|
5341
|
-
return x.required &&
|
|
5350
|
+
function v(q, y, x) {
|
|
5351
|
+
return x.required && y === void 0 ? (C(q, x.requiredText ?? "字段必填"), !1) : ($(q), !0);
|
|
5342
5352
|
}
|
|
5343
|
-
function
|
|
5344
|
-
return x.required && (!
|
|
5353
|
+
function D(q, y, x) {
|
|
5354
|
+
return x.required && (!y || !y.length) ? (C(q, x.requiredText ?? "字段必填"), !1) : x.pattern && y && y.map((z) => z.toString()).map((z) => x.pattern.test(z)).includes(!1) ? (C(q, x.patternText ?? "字段验证失败"), !1) : ($(q), !0);
|
|
5345
5355
|
}
|
|
5346
|
-
function
|
|
5347
|
-
c.value = c.value.filter((x) => x !== q), s.value[q] =
|
|
5356
|
+
function C(q, y) {
|
|
5357
|
+
c.value = c.value.filter((x) => x !== q), s.value[q] = y;
|
|
5348
5358
|
}
|
|
5349
5359
|
function $(q) {
|
|
5350
5360
|
c.value.push(q), delete s.value[q];
|
|
5351
5361
|
}
|
|
5352
5362
|
function M(q) {
|
|
5353
|
-
var
|
|
5354
|
-
(
|
|
5363
|
+
var y;
|
|
5364
|
+
(y = i.value[q]) == null || y.abort(), delete i.value[q];
|
|
5355
5365
|
}
|
|
5356
5366
|
function V() {
|
|
5357
5367
|
o("update:formData", structuredClone(n)), s.value = {}, c.value = [], o("validate", "SQFORM", !1, Xe(c.value));
|
|
@@ -5360,15 +5370,15 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5360
5370
|
const x = (q ? r.items : d.value).filter(
|
|
5361
5371
|
(A) => A.type !== "custom" && A.rule && !c.value.includes(A.binding)
|
|
5362
5372
|
).map((A) => {
|
|
5363
|
-
const
|
|
5364
|
-
return f(
|
|
5373
|
+
const E = A;
|
|
5374
|
+
return f(E.binding, void 0, E.rule, !1);
|
|
5365
5375
|
});
|
|
5366
5376
|
return Promise.all(x).then((A) => (o("validate", "SQFORM", !A.includes(!1), Xe(c.value)), A));
|
|
5367
5377
|
}
|
|
5368
|
-
return u({ resetFields: V, validate: H }), (q,
|
|
5378
|
+
return u({ resetFields: V, validate: H }), (q, y) => (m(), S("form", {
|
|
5369
5379
|
class: K(["sq-form", a.value]),
|
|
5370
5380
|
style: ee(l.value),
|
|
5371
|
-
onSubmit:
|
|
5381
|
+
onSubmit: y[0] || (y[0] = Me(() => {
|
|
5372
5382
|
}, ["prevent"]))
|
|
5373
5383
|
}, [
|
|
5374
5384
|
(m(!0), S(xe, null, je(d.value, (x, A) => (m(), L(ta, {
|
|
@@ -5390,26 +5400,26 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5390
5400
|
status: g(x.binding),
|
|
5391
5401
|
"suffix-icon": p(x.binding),
|
|
5392
5402
|
value: r.formData[x.binding],
|
|
5393
|
-
"onUpdate:value": (
|
|
5394
|
-
onChange: (
|
|
5395
|
-
onInput: (
|
|
5396
|
-
onBlur: (
|
|
5403
|
+
"onUpdate:value": (E) => r.formData[x.binding] = E,
|
|
5404
|
+
onChange: (E) => f(x.binding, "change", x.rule),
|
|
5405
|
+
onInput: (E) => f(x.binding, "input", x.rule),
|
|
5406
|
+
onBlur: (E) => f(x.binding, "blur", x.rule)
|
|
5397
5407
|
}), null, 16, ["name", "status", "suffix-icon", "value", "onUpdate:value", "onChange", "onInput", "onBlur"])) : x.type === "checkbox" ? (m(), L(b(Ei), qe({
|
|
5398
5408
|
key: 1,
|
|
5399
5409
|
ref_for: !0
|
|
5400
5410
|
}, x.props, {
|
|
5401
5411
|
name: x.name,
|
|
5402
5412
|
value: r.formData[x.binding],
|
|
5403
|
-
"onUpdate:value": (
|
|
5404
|
-
onChange: (
|
|
5413
|
+
"onUpdate:value": (E) => r.formData[x.binding] = E,
|
|
5414
|
+
onChange: (E) => f(x.binding, "change", x.rule)
|
|
5405
5415
|
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : x.type === "radio" ? (m(), L(b(jl), qe({
|
|
5406
5416
|
key: 2,
|
|
5407
5417
|
ref_for: !0
|
|
5408
5418
|
}, x.props, {
|
|
5409
5419
|
name: x.name,
|
|
5410
5420
|
value: r.formData[x.binding],
|
|
5411
|
-
"onUpdate:value": (
|
|
5412
|
-
onChange: (
|
|
5421
|
+
"onUpdate:value": (E) => r.formData[x.binding] = E,
|
|
5422
|
+
onChange: (E) => f(x.binding, "change", x.rule)
|
|
5413
5423
|
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : x.type === "switch" ? (m(), L(b(t1), qe({
|
|
5414
5424
|
key: 3,
|
|
5415
5425
|
ref_for: !0
|
|
@@ -5417,8 +5427,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5417
5427
|
name: x.name,
|
|
5418
5428
|
loading: i.value[x.binding] !== void 0,
|
|
5419
5429
|
checked: r.formData[x.binding],
|
|
5420
|
-
"onUpdate:checked": (
|
|
5421
|
-
onChange: (
|
|
5430
|
+
"onUpdate:checked": (E) => r.formData[x.binding] = E,
|
|
5431
|
+
onChange: (E) => f(x.binding, "change", x.rule)
|
|
5422
5432
|
}), null, 16, ["name", "loading", "checked", "onUpdate:checked", "onChange"])) : j(q.$slots, x.slot, { key: 4 })
|
|
5423
5433
|
]),
|
|
5424
5434
|
_: 2
|
|
@@ -5450,7 +5460,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5450
5460
|
},
|
|
5451
5461
|
emits: ["load", "error"],
|
|
5452
5462
|
setup(e, { emit: u }) {
|
|
5453
|
-
const t = new IntersectionObserver(g), n = u, o = e, r = R(!1), s = R(o.src), c = R(!1), i = R(!1), a = R(!1), l = de(null), d =
|
|
5463
|
+
const t = new IntersectionObserver(g), n = u, o = e, r = R(!1), s = R(o.src), c = R(!1), i = R(!1), a = R(!1), l = de(null), d = w(() => r.value && !c.value), h = w(() => ({
|
|
5454
5464
|
height: d.value ? void 0 : "var(--image-placeholder-height)",
|
|
5455
5465
|
aspectRatio: d.value ? void 0 : o.aspectRatio
|
|
5456
5466
|
}));
|
|
@@ -5459,23 +5469,23 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5459
5469
|
}), Ue(() => {
|
|
5460
5470
|
t.disconnect();
|
|
5461
5471
|
});
|
|
5462
|
-
function p(
|
|
5463
|
-
r.value = !0, n("load",
|
|
5472
|
+
function p(k) {
|
|
5473
|
+
r.value = !0, n("load", k);
|
|
5464
5474
|
}
|
|
5465
|
-
function f(
|
|
5475
|
+
function f(k) {
|
|
5466
5476
|
if (s.value !== o.fallback && o.fallback) {
|
|
5467
5477
|
s.value = o.fallback;
|
|
5468
5478
|
return;
|
|
5469
5479
|
}
|
|
5470
|
-
c.value = !0, r.value = !0, n("error",
|
|
5480
|
+
c.value = !0, r.value = !0, n("error", k);
|
|
5471
5481
|
}
|
|
5472
|
-
function g(
|
|
5473
|
-
|
|
5482
|
+
function g(k) {
|
|
5483
|
+
k[0].isIntersecting && (i.value = !0, t.disconnect());
|
|
5474
5484
|
}
|
|
5475
|
-
function
|
|
5485
|
+
function _() {
|
|
5476
5486
|
a.value = !0;
|
|
5477
5487
|
}
|
|
5478
|
-
return (
|
|
5488
|
+
return (k, v) => (m(), S("div", {
|
|
5479
5489
|
class: "sq-image",
|
|
5480
5490
|
style: ee(h.value),
|
|
5481
5491
|
ref_key: "imgRef",
|
|
@@ -5488,11 +5498,11 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5488
5498
|
_: 1
|
|
5489
5499
|
}),
|
|
5490
5500
|
!c.value && i.value ? (m(), S("picture", ra, [
|
|
5491
|
-
(m(!0), S(xe, null, je(o.source, (
|
|
5492
|
-
key:
|
|
5493
|
-
srcset:
|
|
5494
|
-
media:
|
|
5495
|
-
type:
|
|
5501
|
+
(m(!0), S(xe, null, je(o.source, (D, C) => (m(), S("source", {
|
|
5502
|
+
key: C,
|
|
5503
|
+
srcset: D.src,
|
|
5504
|
+
media: D.media,
|
|
5505
|
+
type: D.type
|
|
5496
5506
|
}, null, 8, sa))), 128)),
|
|
5497
5507
|
F("img", {
|
|
5498
5508
|
style: ee({ objectFit: o.objectFit }),
|
|
@@ -5506,27 +5516,27 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5506
5516
|
!c.value && i.value && o.preview ? (m(), S("div", {
|
|
5507
5517
|
key: 1,
|
|
5508
5518
|
class: "sq-image-control",
|
|
5509
|
-
onClick:
|
|
5519
|
+
onClick: _
|
|
5510
5520
|
}, [
|
|
5511
5521
|
T(b(sn))
|
|
5512
5522
|
])) : U("", !0),
|
|
5513
5523
|
c.value ? (m(), S("div", ia, [
|
|
5514
|
-
j(
|
|
5515
|
-
|
|
5524
|
+
j(k.$slots, "error", {}, () => [
|
|
5525
|
+
v[1] || (v[1] = F("span", null, "图片加载失败", -1))
|
|
5516
5526
|
])
|
|
5517
5527
|
])) : U("", !0),
|
|
5518
5528
|
o.preview ? (m(), L(b(pa), {
|
|
5519
5529
|
key: 3,
|
|
5520
5530
|
"src-list": [s.value],
|
|
5521
5531
|
visible: a.value,
|
|
5522
|
-
"onUpdate:visible":
|
|
5532
|
+
"onUpdate:visible": v[0] || (v[0] = (D) => a.value = D)
|
|
5523
5533
|
}, null, 8, ["src-list", "visible"])) : U("", !0)
|
|
5524
5534
|
], 4));
|
|
5525
5535
|
}
|
|
5526
5536
|
}), da = ["src"], fa = "sq-image-viewer", pa = /* @__PURE__ */ O({
|
|
5527
5537
|
name: fa,
|
|
5528
5538
|
__name: "image-viewer",
|
|
5529
|
-
props: /* @__PURE__ */
|
|
5539
|
+
props: /* @__PURE__ */ ue({
|
|
5530
5540
|
srcList: {},
|
|
5531
5541
|
toolbar: { type: Boolean, default: !0 },
|
|
5532
5542
|
minScale: { default: 0.5 },
|
|
@@ -5534,7 +5544,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5534
5544
|
scaleStep: { default: 0.5 },
|
|
5535
5545
|
moveable: { type: Boolean, default: !0 },
|
|
5536
5546
|
keyboard: { type: Boolean, default: void 0 },
|
|
5537
|
-
maskCloseable: { type: Boolean, default: void 0 }
|
|
5547
|
+
maskCloseable: { type: Boolean, default: void 0 },
|
|
5548
|
+
beforeClose: {}
|
|
5538
5549
|
}, {
|
|
5539
5550
|
visible: { type: Boolean, default: !1 },
|
|
5540
5551
|
visibleModifiers: {}
|
|
@@ -5543,7 +5554,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5543
5554
|
setup(e) {
|
|
5544
5555
|
const u = {}, t = {};
|
|
5545
5556
|
let n = !1, o;
|
|
5546
|
-
const r = e, s = R(1), c = R(!1), i = R(!1), a = R(0), l = R(0), d = R(!0), h = R({ x: 0, y: 0 }), p = ae(e, "visible"), f =
|
|
5557
|
+
const r = e, s = R(1), c = R(!1), i = R(!1), a = R(0), l = R(0), d = R(!0), h = R({ x: 0, y: 0 }), p = ae(e, "visible"), f = w(() => r.srcList[l.value]), g = w(() => {
|
|
5547
5558
|
const B = c.value ? -1 : 1, N = i.value ? -1 : 1;
|
|
5548
5559
|
return {
|
|
5549
5560
|
transform: [
|
|
@@ -5555,24 +5566,21 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5555
5566
|
transition: d.value ? void 0 : "none"
|
|
5556
5567
|
};
|
|
5557
5568
|
});
|
|
5558
|
-
|
|
5559
|
-
B
|
|
5560
|
-
});
|
|
5561
|
-
function v(B) {
|
|
5562
|
-
B.deltaY < 0 ? _() : x();
|
|
5569
|
+
function _(B) {
|
|
5570
|
+
B.deltaY < 0 ? y() : x();
|
|
5563
5571
|
}
|
|
5564
|
-
function
|
|
5572
|
+
function k(B) {
|
|
5565
5573
|
n = !0, u.x = B.x, u.y = B.y;
|
|
5566
5574
|
}
|
|
5567
|
-
function
|
|
5575
|
+
function v() {
|
|
5568
5576
|
n = !1;
|
|
5569
5577
|
}
|
|
5570
|
-
function
|
|
5578
|
+
function D(B) {
|
|
5571
5579
|
if (!n || !r.moveable) return;
|
|
5572
5580
|
const N = B.x - u.x, Y = B.y - u.y;
|
|
5573
5581
|
h.value.x += N * 2, h.value.y += Y * 2, u.x = B.x, u.y = B.y;
|
|
5574
5582
|
}
|
|
5575
|
-
function
|
|
5583
|
+
function C(B) {
|
|
5576
5584
|
B.touches.length === 1 ? (n = !0, u.x = B.touches[0].screenX, u.y = B.touches[0].screenY) : B.touches.length === 2 && (o = q(B.touches[0], B.touches[1]));
|
|
5577
5585
|
}
|
|
5578
5586
|
function $() {
|
|
@@ -5581,14 +5589,14 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5581
5589
|
function M(B) {
|
|
5582
5590
|
if (B.touches.length === 1) {
|
|
5583
5591
|
if (!n || !r.moveable) return;
|
|
5584
|
-
const N = B.touches[0], Y = N.screenX - u.x,
|
|
5585
|
-
h.value.x += Y * 2, h.value.y +=
|
|
5592
|
+
const N = B.touches[0], Y = N.screenX - u.x, te = N.screenY - u.y;
|
|
5593
|
+
h.value.x += Y * 2, h.value.y += te * 2, u.x = N.screenX, u.y = N.screenY;
|
|
5586
5594
|
} else if (B.touches.length === 2) {
|
|
5587
5595
|
if (!o) return;
|
|
5588
5596
|
d.value = !1;
|
|
5589
5597
|
const N = q(B.touches[0], B.touches[1]), Y = N / o;
|
|
5590
|
-
let
|
|
5591
|
-
|
|
5598
|
+
let te = s.value * Y;
|
|
5599
|
+
te = Math.min(r.maxScale, te), te = Math.max(r.minScale, te), s.value = te, o = N;
|
|
5592
5600
|
}
|
|
5593
5601
|
}
|
|
5594
5602
|
function V() {
|
|
@@ -5598,10 +5606,10 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5598
5606
|
l.value += B;
|
|
5599
5607
|
}
|
|
5600
5608
|
function q(B, N) {
|
|
5601
|
-
const Y = N.clientX - B.clientX,
|
|
5602
|
-
return Math.sqrt(Y * Y +
|
|
5609
|
+
const Y = N.clientX - B.clientX, te = N.clientY - B.clientY;
|
|
5610
|
+
return Math.sqrt(Y * Y + te * te);
|
|
5603
5611
|
}
|
|
5604
|
-
function
|
|
5612
|
+
function y() {
|
|
5605
5613
|
s.value >= r.maxScale || (s.value = Math.min(r.maxScale, s.value * (1 + r.scaleStep)));
|
|
5606
5614
|
}
|
|
5607
5615
|
function x() {
|
|
@@ -5610,7 +5618,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5610
5618
|
function A() {
|
|
5611
5619
|
s.value = Math.min(t.x, t.y), h.value = { x: 0, y: 0 };
|
|
5612
5620
|
}
|
|
5613
|
-
function
|
|
5621
|
+
function E() {
|
|
5614
5622
|
s.value = 1, h.value = { x: 0, y: 0 };
|
|
5615
5623
|
}
|
|
5616
5624
|
function z() {
|
|
@@ -5626,8 +5634,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5626
5634
|
p.value = !1;
|
|
5627
5635
|
}
|
|
5628
5636
|
function P(B) {
|
|
5629
|
-
const Y = B.target.getBoundingClientRect(),
|
|
5630
|
-
t.x =
|
|
5637
|
+
const Y = B.target.getBoundingClientRect(), te = window.innerWidth, Pe = window.innerHeight;
|
|
5638
|
+
t.x = te / Y.width, t.y = Pe / Y.height, s.value = Math.min(t.x, t.y, 1);
|
|
5631
5639
|
}
|
|
5632
5640
|
return (B, N) => (m(), L(b(In), {
|
|
5633
5641
|
class: "sq-image-viewer-mask",
|
|
@@ -5635,11 +5643,12 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5635
5643
|
"onUpdate:visible": N[6] || (N[6] = (Y) => p.value = Y),
|
|
5636
5644
|
keyboard: r.keyboard,
|
|
5637
5645
|
"mask-closeable": r.maskCloseable,
|
|
5638
|
-
onWheelPassive:
|
|
5639
|
-
onMousemove:
|
|
5640
|
-
onMouseup:
|
|
5646
|
+
onWheelPassive: _,
|
|
5647
|
+
onMousemove: D,
|
|
5648
|
+
onMouseup: v,
|
|
5641
5649
|
onTouchmovePassive: M,
|
|
5642
|
-
onTouchend:
|
|
5650
|
+
onTouchend: $,
|
|
5651
|
+
onClosed: V
|
|
5643
5652
|
}, {
|
|
5644
5653
|
default: Z(() => [
|
|
5645
5654
|
F("img", {
|
|
@@ -5648,8 +5657,8 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5648
5657
|
onClick: N[0] || (N[0] = Me(() => {
|
|
5649
5658
|
}, ["stop"])),
|
|
5650
5659
|
onLoad: P,
|
|
5651
|
-
onMousedown: Me(
|
|
5652
|
-
onTouchstartPassive:
|
|
5660
|
+
onMousedown: Me(k, ["prevent"]),
|
|
5661
|
+
onTouchstartPassive: C
|
|
5653
5662
|
}, null, 44, da),
|
|
5654
5663
|
T(b(Q), {
|
|
5655
5664
|
class: "sq-image-viewer-close",
|
|
@@ -5685,7 +5694,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5685
5694
|
text: "",
|
|
5686
5695
|
icon: b(Jo),
|
|
5687
5696
|
disabled: s.value >= r.maxScale,
|
|
5688
|
-
onClick:
|
|
5697
|
+
onClick: y
|
|
5689
5698
|
}, null, 8, ["icon", "disabled"])
|
|
5690
5699
|
]),
|
|
5691
5700
|
_: 1
|
|
@@ -5749,7 +5758,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5749
5758
|
T(b(Q), {
|
|
5750
5759
|
text: "",
|
|
5751
5760
|
icon: b(X0),
|
|
5752
|
-
onClick:
|
|
5761
|
+
onClick: E
|
|
5753
5762
|
}, null, 8, ["icon"])
|
|
5754
5763
|
]),
|
|
5755
5764
|
_: 1
|
|
@@ -5779,58 +5788,59 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5779
5788
|
setup(e, { expose: u }) {
|
|
5780
5789
|
const t = {};
|
|
5781
5790
|
let n = 0, o, r = !1, s;
|
|
5782
|
-
const c = e, i = R(1), a = R({ x: 0, y: 0 }), l = de(null), d = de(null), h =
|
|
5791
|
+
const c = e, i = R(1), a = R({ x: 0, y: 0 }), l = de(null), d = de(null), h = w(() => ({
|
|
5783
5792
|
transform: `scale(${i.value})`,
|
|
5784
5793
|
marginInlineStart: `${a.value.x}px`,
|
|
5785
5794
|
marginBlockStart: `${a.value.y}px`
|
|
5786
5795
|
}));
|
|
5787
5796
|
be(() => {
|
|
5788
|
-
document.addEventListener("mousemove",
|
|
5797
|
+
document.addEventListener("mousemove", k), document.addEventListener("mouseup", _);
|
|
5789
5798
|
}), Ue(() => {
|
|
5790
|
-
document.removeEventListener("mousemove",
|
|
5799
|
+
document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", _);
|
|
5791
5800
|
});
|
|
5792
|
-
function p(
|
|
5801
|
+
function p(y) {
|
|
5793
5802
|
a.value = { x: 0, y: 0 }, o = l.value.getBoundingClientRect();
|
|
5794
|
-
const x =
|
|
5803
|
+
const x = y.target, A = x.naturalWidth, E = x.naturalHeight, z = o.width / A, W = o.height / E;
|
|
5795
5804
|
n = Math.max(z, W), i.value = n;
|
|
5796
5805
|
}
|
|
5797
|
-
function f(
|
|
5798
|
-
|
|
5806
|
+
function f(y) {
|
|
5807
|
+
y.deltaY < 0 ? M() : V();
|
|
5799
5808
|
}
|
|
5800
|
-
function g(
|
|
5801
|
-
r = !0, t.x =
|
|
5809
|
+
function g(y) {
|
|
5810
|
+
r = !0, t.x = y.x, t.y = y.y;
|
|
5802
5811
|
}
|
|
5803
|
-
function
|
|
5812
|
+
function _() {
|
|
5804
5813
|
r = !1;
|
|
5805
5814
|
}
|
|
5806
|
-
function
|
|
5815
|
+
function k(y) {
|
|
5807
5816
|
if (!r) return;
|
|
5808
|
-
const x =
|
|
5809
|
-
t.x =
|
|
5810
|
-
const
|
|
5811
|
-
a.value.x =
|
|
5817
|
+
const x = y.x - t.x, A = y.y - t.y;
|
|
5818
|
+
t.x = y.x, t.y = y.y;
|
|
5819
|
+
const E = a.value.x + x * 2, z = a.value.y + A * 2;
|
|
5820
|
+
a.value.x = E, a.value.y = z, H();
|
|
5812
5821
|
}
|
|
5813
|
-
function
|
|
5814
|
-
|
|
5822
|
+
function v(y) {
|
|
5823
|
+
y.touches.length === 1 ? (r = !0, t.x = y.touches[0].screenX, t.y = y.touches[0].screenY) : y.touches.length === 2 && (s = $(y.touches[0], y.touches[1]));
|
|
5815
5824
|
}
|
|
5816
|
-
function
|
|
5825
|
+
function D() {
|
|
5817
5826
|
r = !1, s = void 0;
|
|
5818
5827
|
}
|
|
5819
|
-
function y
|
|
5820
|
-
if (
|
|
5828
|
+
function C(y) {
|
|
5829
|
+
if (y.touches.length === 1) {
|
|
5821
5830
|
if (!r) return;
|
|
5822
|
-
const x =
|
|
5823
|
-
a.value.x += A * 2, a.value.y +=
|
|
5824
|
-
} else if (
|
|
5831
|
+
const x = y.touches[0], A = x.screenX - t.x, E = x.screenY - t.y;
|
|
5832
|
+
a.value.x += A * 2, a.value.y += E * 2, t.x = x.screenX, t.y = x.screenY;
|
|
5833
|
+
} else if (y.touches.length === 2) {
|
|
5825
5834
|
if (!s) return;
|
|
5826
|
-
const x = $(
|
|
5827
|
-
let
|
|
5828
|
-
|
|
5835
|
+
const x = $(y.touches[0], y.touches[1]), A = x / s;
|
|
5836
|
+
let E = i.value * A;
|
|
5837
|
+
E = Math.min(Gu, E), E = Math.max(n, E), i.value = E, s = x;
|
|
5829
5838
|
}
|
|
5839
|
+
H();
|
|
5830
5840
|
}
|
|
5831
|
-
function $(
|
|
5832
|
-
const A = x.clientX -
|
|
5833
|
-
return Math.sqrt(A * A +
|
|
5841
|
+
function $(y, x) {
|
|
5842
|
+
const A = x.clientX - y.clientX, E = x.clientY - y.clientY;
|
|
5843
|
+
return Math.sqrt(A * A + E * E);
|
|
5834
5844
|
}
|
|
5835
5845
|
function M() {
|
|
5836
5846
|
i.value >= Gu || (i.value = Math.min(Gu, i.value * (1 + 0.1)));
|
|
@@ -5840,42 +5850,42 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5840
5850
|
}
|
|
5841
5851
|
function H() {
|
|
5842
5852
|
requestAnimationFrame(() => {
|
|
5843
|
-
const
|
|
5844
|
-
x ? a.value.x -= (
|
|
5845
|
-
const
|
|
5846
|
-
|
|
5853
|
+
const y = d.value.getBoundingClientRect(), x = y.left >= o.left, A = y.right <= o.right;
|
|
5854
|
+
x ? a.value.x -= (y.left - o.left) * 2 : A && (a.value.x += (o.right - y.right) * 2);
|
|
5855
|
+
const E = y.top >= o.top, z = y.bottom <= o.bottom;
|
|
5856
|
+
E ? a.value.y -= (y.top - o.top) * 2 : z && (a.value.y += (o.bottom - y.bottom) * 2);
|
|
5847
5857
|
});
|
|
5848
5858
|
}
|
|
5849
|
-
async function q(
|
|
5859
|
+
async function q(y = "base64") {
|
|
5850
5860
|
if (!c.src) return;
|
|
5851
|
-
const x = d.value.naturalWidth, A = d.value.naturalHeight,
|
|
5861
|
+
const x = d.value.naturalWidth, A = d.value.naturalHeight, E = x / A, W = x > A && E < c.aspectRatio || x < A && E > c.aspectRatio ? x / A : 1, G = i.value / n / W;
|
|
5852
5862
|
let I = document.createElement("canvas");
|
|
5853
5863
|
const P = Math.min(x, A);
|
|
5854
5864
|
I.width = P, I.height = P / c.aspectRatio;
|
|
5855
5865
|
let B = I.getContext("2d");
|
|
5856
|
-
const N = d.value.getBoundingClientRect(), Y = (N.left - o.left) / i.value,
|
|
5866
|
+
const N = d.value.getBoundingClientRect(), Y = (N.left - o.left) / i.value, te = (N.top - o.top) / i.value;
|
|
5857
5867
|
return B == null || B.drawImage(
|
|
5858
5868
|
d.value,
|
|
5859
5869
|
Y * G,
|
|
5860
|
-
|
|
5870
|
+
te * G,
|
|
5861
5871
|
x * G,
|
|
5862
5872
|
A * G
|
|
5863
5873
|
), new Promise((Pe) => {
|
|
5864
|
-
|
|
5874
|
+
y === "base64" ? Pe(I.toDataURL("image/png")) : I == null || I.toBlob((u0) => {
|
|
5865
5875
|
Pe(u0 ?? void 0);
|
|
5866
5876
|
}, "image/png");
|
|
5867
5877
|
}).finally(() => {
|
|
5868
5878
|
B = void 0, I = void 0;
|
|
5869
5879
|
});
|
|
5870
5880
|
}
|
|
5871
|
-
return u({ cropImageAsync: q }), (
|
|
5881
|
+
return u({ cropImageAsync: q }), (y, x) => (m(), S("div", {
|
|
5872
5882
|
class: "sq-image-crop",
|
|
5873
5883
|
style: ee({ "--image-crop-ratio": c.aspectRatio }),
|
|
5874
5884
|
onWheelPassive: f,
|
|
5875
5885
|
onMousedown: Me(g, ["prevent"]),
|
|
5876
|
-
onTouchstartPassive:
|
|
5877
|
-
onTouchmovePassive:
|
|
5878
|
-
onTouchend:
|
|
5886
|
+
onTouchstartPassive: v,
|
|
5887
|
+
onTouchmovePassive: C,
|
|
5888
|
+
onTouchend: D
|
|
5879
5889
|
}, [
|
|
5880
5890
|
F("div", {
|
|
5881
5891
|
class: "sq-image-crop-cropper",
|
|
@@ -5899,7 +5909,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5899
5909
|
}, xa = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode"], ga = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode", "rows", "cols"], va = { class: "sq-input-suffix" }, _a = "sq-input", On = /* @__PURE__ */ O({
|
|
5900
5910
|
name: _a,
|
|
5901
5911
|
__name: "input",
|
|
5902
|
-
props: /* @__PURE__ */
|
|
5912
|
+
props: /* @__PURE__ */ ue({
|
|
5903
5913
|
status: {},
|
|
5904
5914
|
round: { type: Boolean, default: void 0 },
|
|
5905
5915
|
prefixIcon: {},
|
|
@@ -5925,20 +5935,20 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5925
5935
|
value: { default: "" },
|
|
5926
5936
|
valueModifiers: {}
|
|
5927
5937
|
}),
|
|
5928
|
-
emits: /* @__PURE__ */
|
|
5938
|
+
emits: /* @__PURE__ */ ue(["focus", "blur", "input", "change"], ["update:value"]),
|
|
5929
5939
|
setup(e, { expose: u, emit: t }) {
|
|
5930
|
-
const n = hu(), o = t, r = e, { inputSize: s, inputRound: c, inputDisabled: i, inputReadonly: a, id: l } = ii(r), d = ae(e, "value"), h = R(!1), p = R(!1), f = de(null), g =
|
|
5940
|
+
const n = hu(), o = t, r = e, { inputSize: s, inputRound: c, inputDisabled: i, inputReadonly: a, id: l } = ii(r), d = ae(e, "value"), h = R(!1), p = R(!1), f = de(null), g = w(() => {
|
|
5931
5941
|
const I = [], P = b(s), B = b(c), N = b(H);
|
|
5932
5942
|
return P !== "md" && I.push(`sq-input--${P}`), r.status && I.push(`is-${r.status}`), B && I.push("is-round"), N && I.push("is-disabled"), I;
|
|
5933
|
-
}),
|
|
5934
|
-
() => r.type === "password" && b(
|
|
5935
|
-
), $ =
|
|
5936
|
-
() => b(
|
|
5937
|
-
), H =
|
|
5943
|
+
}), _ = w(() => b(p) ? rn : sn), k = w(() => b(p) ? "text" : r.type), v = w(() => n.prefix || r.prefixIcon), D = w(() => b(h) && b(d).length), C = w(
|
|
5944
|
+
() => r.type === "password" && b(D)
|
|
5945
|
+
), $ = w(() => r.clearable && b(D)), M = w(() => r.loading ? Su : r.suffixIcon), V = w(
|
|
5946
|
+
() => b(C) || b($) || b(M) || n.suffix
|
|
5947
|
+
), H = w(() => r.loading || b(i)), q = w(() => {
|
|
5938
5948
|
if (r.type === "textarea")
|
|
5939
5949
|
return b(H) || b(a) ? "none" : r.resize;
|
|
5940
5950
|
});
|
|
5941
|
-
function
|
|
5951
|
+
function y(I) {
|
|
5942
5952
|
o("focus", I), !b(a) && (h.value = !0);
|
|
5943
5953
|
}
|
|
5944
5954
|
function x(I) {
|
|
@@ -5947,7 +5957,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5947
5957
|
function A() {
|
|
5948
5958
|
setTimeout(W);
|
|
5949
5959
|
}
|
|
5950
|
-
function
|
|
5960
|
+
function E() {
|
|
5951
5961
|
d.value = "";
|
|
5952
5962
|
}
|
|
5953
5963
|
function z() {
|
|
@@ -5965,7 +5975,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5965
5975
|
class: K(["sq-input", g.value]),
|
|
5966
5976
|
onMousedown: A
|
|
5967
5977
|
}, [
|
|
5968
|
-
|
|
5978
|
+
v.value ? (m(), S("span", ma, [
|
|
5969
5979
|
j(I.$slots, "prefix", {}, () => [
|
|
5970
5980
|
(m(), L(me(r.prefixIcon)))
|
|
5971
5981
|
])
|
|
@@ -5978,7 +5988,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5978
5988
|
disabled: H.value,
|
|
5979
5989
|
readonly: b(a),
|
|
5980
5990
|
placeholder: r.placeholder,
|
|
5981
|
-
type:
|
|
5991
|
+
type: k.value,
|
|
5982
5992
|
maxlength: r.maxlength,
|
|
5983
5993
|
minlength: r.minlength,
|
|
5984
5994
|
autocomplete: r.autocomplete,
|
|
@@ -5988,7 +5998,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
5988
5998
|
inputmode: r.inputmode,
|
|
5989
5999
|
ref_key: "inputRef",
|
|
5990
6000
|
ref: f,
|
|
5991
|
-
onFocus:
|
|
6001
|
+
onFocus: y,
|
|
5992
6002
|
onBlur: x,
|
|
5993
6003
|
onInput: P[1] || (P[1] = (B) => o("input", B)),
|
|
5994
6004
|
onChange: P[2] || (P[2] = (B) => o("change", B))
|
|
@@ -6003,7 +6013,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6003
6013
|
disabled: H.value,
|
|
6004
6014
|
readonly: b(a),
|
|
6005
6015
|
placeholder: r.placeholder,
|
|
6006
|
-
type:
|
|
6016
|
+
type: k.value,
|
|
6007
6017
|
maxlength: r.maxlength,
|
|
6008
6018
|
minlength: r.minlength,
|
|
6009
6019
|
autocomplete: r.autocomplete,
|
|
@@ -6015,7 +6025,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6015
6025
|
cols: r.cols,
|
|
6016
6026
|
ref_key: "inputRef",
|
|
6017
6027
|
ref: f,
|
|
6018
|
-
onFocus:
|
|
6028
|
+
onFocus: y,
|
|
6019
6029
|
onBlur: x,
|
|
6020
6030
|
onInput: P[4] || (P[4] = (B) => o("input", B)),
|
|
6021
6031
|
onChange: P[5] || (P[5] = (B) => o("change", B))
|
|
@@ -6023,7 +6033,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6023
6033
|
[n0, d.value]
|
|
6024
6034
|
]),
|
|
6025
6035
|
fe(F("span", va, [
|
|
6026
|
-
|
|
6036
|
+
C.value ? (m(), L(me(_.value), {
|
|
6027
6037
|
key: 0,
|
|
6028
6038
|
class: "sq-input-suffix-pwd",
|
|
6029
6039
|
onMousedown: z
|
|
@@ -6031,7 +6041,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6031
6041
|
$.value ? (m(), L(b(rt), {
|
|
6032
6042
|
key: 1,
|
|
6033
6043
|
class: "sq-input-suffix-clear",
|
|
6034
|
-
onMousedown:
|
|
6044
|
+
onMousedown: E
|
|
6035
6045
|
})) : U("", !0),
|
|
6036
6046
|
j(I.$slots, "suffix", {}, () => [
|
|
6037
6047
|
M.value ? (m(), L(me(M.value), { key: 0 })) : U("", !0)
|
|
@@ -6054,7 +6064,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6054
6064
|
id: {}
|
|
6055
6065
|
},
|
|
6056
6066
|
setup(e, { expose: u }) {
|
|
6057
|
-
const t = e, n = R(!0), o =
|
|
6067
|
+
const t = e, n = R(!0), o = w(() => t.type ? st[t.type] : void 0);
|
|
6058
6068
|
be(() => {
|
|
6059
6069
|
setTimeout(r, t.closeAfter);
|
|
6060
6070
|
});
|
|
@@ -6081,7 +6091,7 @@ ${Y}${N}`, V(A.target), x(r.value, Pe, Pe);
|
|
|
6081
6091
|
})) : U("", !0),
|
|
6082
6092
|
F("div", {
|
|
6083
6093
|
class: "sq-message-content",
|
|
6084
|
-
textContent:
|
|
6094
|
+
textContent: se(t.message)
|
|
6085
6095
|
}, null, 8, ya)
|
|
6086
6096
|
]),
|
|
6087
6097
|
_: 1
|
|
@@ -6144,7 +6154,7 @@ Aa.forEach((e) => {
|
|
|
6144
6154
|
const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
6145
6155
|
name: Sa,
|
|
6146
6156
|
__name: "pagination-prev",
|
|
6147
|
-
props: /* @__PURE__ */
|
|
6157
|
+
props: /* @__PURE__ */ ue({
|
|
6148
6158
|
disabled: { type: Boolean },
|
|
6149
6159
|
size: {},
|
|
6150
6160
|
maxPage: {}
|
|
@@ -6167,7 +6177,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6167
6177
|
}), $a = "sq-pagination-next", Ba = /* @__PURE__ */ O({
|
|
6168
6178
|
name: $a,
|
|
6169
6179
|
__name: "pagination-next",
|
|
6170
|
-
props: /* @__PURE__ */
|
|
6180
|
+
props: /* @__PURE__ */ ue({
|
|
6171
6181
|
disabled: { type: Boolean },
|
|
6172
6182
|
size: {},
|
|
6173
6183
|
maxPage: {}
|
|
@@ -6190,7 +6200,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6190
6200
|
}), Ma = { class: "sq-pagination-pager" }, za = "sq-pagination-pager", Ta = /* @__PURE__ */ O({
|
|
6191
6201
|
name: za,
|
|
6192
6202
|
__name: "pagination-pager",
|
|
6193
|
-
props: /* @__PURE__ */
|
|
6203
|
+
props: /* @__PURE__ */ ue({
|
|
6194
6204
|
disabled: { type: Boolean },
|
|
6195
6205
|
size: {},
|
|
6196
6206
|
list: {}
|
|
@@ -6213,7 +6223,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6213
6223
|
onClick: (c) => n(s)
|
|
6214
6224
|
}, {
|
|
6215
6225
|
default: Z(() => [
|
|
6216
|
-
iu(
|
|
6226
|
+
iu(se(s), 1)
|
|
6217
6227
|
]),
|
|
6218
6228
|
_: 2
|
|
6219
6229
|
}, 1032, ["type", "size", "disabled", "onClick"])) : (m(), L(b(Q), {
|
|
@@ -6228,7 +6238,7 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6228
6238
|
}), Ra = { class: "sq-pagination" }, La = "sq-pagination", S1 = /* @__PURE__ */ O({
|
|
6229
6239
|
name: La,
|
|
6230
6240
|
__name: "pagination",
|
|
6231
|
-
props: /* @__PURE__ */
|
|
6241
|
+
props: /* @__PURE__ */ ue({
|
|
6232
6242
|
total: { default: 0 },
|
|
6233
6243
|
disabled: { type: Boolean, default: !1 },
|
|
6234
6244
|
size: {},
|
|
@@ -6242,14 +6252,14 @@ const F1 = tt, Sa = "sq-pagination-prev", qa = /* @__PURE__ */ O({
|
|
|
6242
6252
|
}),
|
|
6243
6253
|
emits: ["update:current", "update:pageSize"],
|
|
6244
6254
|
setup(e) {
|
|
6245
|
-
const u = e, t = ae(e, "current"), n = ae(e, "pageSize"), o =
|
|
6255
|
+
const u = e, t = ae(e, "current"), n = ae(e, "pageSize"), o = w(() => Math.ceil(u.total / n.value) || 1), r = w(() => {
|
|
6246
6256
|
const c = [], i = Math.floor(u.pagerCount / 2) - 1;
|
|
6247
6257
|
let a = t.value - i, l = t.value + i;
|
|
6248
6258
|
a < 2 && (a = 2, l = a + i * 2), l > o.value - 1 && (l = o.value - 1, a = l - i * 2);
|
|
6249
6259
|
for (let d = 1; d <= o.value; d++)
|
|
6250
6260
|
d === 1 || d === o.value || d >= a && d <= l ? c.push(d) : (d === a - 1 || d === l + 1) && c.push(0);
|
|
6251
6261
|
return c;
|
|
6252
|
-
}), s =
|
|
6262
|
+
}), s = w(() => {
|
|
6253
6263
|
const c = u.layout ?? ["prev", "pager", "next"], i = [];
|
|
6254
6264
|
for (const a of c)
|
|
6255
6265
|
switch (a) {
|
|
@@ -6484,14 +6494,14 @@ const Ja = async (e, u, t) => {
|
|
|
6484
6494
|
} = Wt(a, n, i), h = n, p = {}, f = 0;
|
|
6485
6495
|
for (let g = 0; g < c.length; g++) {
|
|
6486
6496
|
const {
|
|
6487
|
-
name:
|
|
6488
|
-
fn:
|
|
6497
|
+
name: _,
|
|
6498
|
+
fn: k
|
|
6489
6499
|
} = c[g], {
|
|
6490
|
-
x:
|
|
6491
|
-
y:
|
|
6492
|
-
data:
|
|
6500
|
+
x: v,
|
|
6501
|
+
y: D,
|
|
6502
|
+
data: C,
|
|
6493
6503
|
reset: $
|
|
6494
|
-
} = await
|
|
6504
|
+
} = await k({
|
|
6495
6505
|
x: l,
|
|
6496
6506
|
y: d,
|
|
6497
6507
|
initialPlacement: n,
|
|
@@ -6505,11 +6515,11 @@ const Ja = async (e, u, t) => {
|
|
|
6505
6515
|
floating: u
|
|
6506
6516
|
}
|
|
6507
6517
|
});
|
|
6508
|
-
l =
|
|
6518
|
+
l = v ?? l, d = D ?? d, p = {
|
|
6509
6519
|
...p,
|
|
6510
|
-
[
|
|
6511
|
-
...p[
|
|
6512
|
-
...
|
|
6520
|
+
[_]: {
|
|
6521
|
+
...p[_],
|
|
6522
|
+
...C
|
|
6513
6523
|
}
|
|
6514
6524
|
}, $ && f <= 50 && (f++, typeof $ == "object" && ($.placement && (h = $.placement), $.rects && (a = $.rects === !0 ? await s.getElementRects({
|
|
6515
6525
|
reference: e,
|
|
@@ -6544,17 +6554,17 @@ async function Un(e, u) {
|
|
|
6544
6554
|
elementContext: d = "floating",
|
|
6545
6555
|
altBoundary: h = !1,
|
|
6546
6556
|
padding: p = 0
|
|
6547
|
-
} = Tu(u, e), f = Ya(p),
|
|
6548
|
-
element: (t = await (r.isElement == null ? void 0 : r.isElement(
|
|
6557
|
+
} = Tu(u, e), f = Ya(p), _ = c[h ? d === "floating" ? "reference" : "floating" : d], k = Fu(await r.getClippingRect({
|
|
6558
|
+
element: (t = await (r.isElement == null ? void 0 : r.isElement(_))) == null || t ? _ : _.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
6549
6559
|
boundary: a,
|
|
6550
6560
|
rootBoundary: l,
|
|
6551
6561
|
strategy: i
|
|
6552
|
-
})),
|
|
6562
|
+
})), v = d === "floating" ? {
|
|
6553
6563
|
x: n,
|
|
6554
6564
|
y: o,
|
|
6555
6565
|
width: s.floating.width,
|
|
6556
6566
|
height: s.floating.height
|
|
6557
|
-
} : s.reference,
|
|
6567
|
+
} : s.reference, D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), C = await (r.isElement == null ? void 0 : r.isElement(D)) ? await (r.getScale == null ? void 0 : r.getScale(D)) || {
|
|
6558
6568
|
x: 1,
|
|
6559
6569
|
y: 1
|
|
6560
6570
|
} : {
|
|
@@ -6562,15 +6572,15 @@ async function Un(e, u) {
|
|
|
6562
6572
|
y: 1
|
|
6563
6573
|
}, $ = Fu(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
6564
6574
|
elements: c,
|
|
6565
|
-
rect:
|
|
6566
|
-
offsetParent:
|
|
6575
|
+
rect: v,
|
|
6576
|
+
offsetParent: D,
|
|
6567
6577
|
strategy: i
|
|
6568
|
-
}) :
|
|
6578
|
+
}) : v);
|
|
6569
6579
|
return {
|
|
6570
|
-
top: (
|
|
6571
|
-
bottom: ($.bottom -
|
|
6572
|
-
left: (
|
|
6573
|
-
right: ($.right -
|
|
6580
|
+
top: (k.top - $.top + f.top) / C.y,
|
|
6581
|
+
bottom: ($.bottom - k.bottom + f.bottom) / C.y,
|
|
6582
|
+
left: (k.left - $.left + f.left) / C.x,
|
|
6583
|
+
right: ($.right - k.right + f.right) / C.x
|
|
6574
6584
|
};
|
|
6575
6585
|
}
|
|
6576
6586
|
const Ka = function(e) {
|
|
@@ -6593,50 +6603,50 @@ const Ka = function(e) {
|
|
|
6593
6603
|
fallbackStrategy: p = "bestFit",
|
|
6594
6604
|
fallbackAxisSideDirection: f = "none",
|
|
6595
6605
|
flipAlignment: g = !0,
|
|
6596
|
-
...
|
|
6606
|
+
..._
|
|
6597
6607
|
} = Tu(e, u);
|
|
6598
6608
|
if ((t = r.arrow) != null && t.alignmentOffset)
|
|
6599
6609
|
return {};
|
|
6600
|
-
const
|
|
6601
|
-
!h && M && $.push(...Ga(c, g, f,
|
|
6602
|
-
const V = [c, ...$], H = await Un(u,
|
|
6603
|
-
let
|
|
6604
|
-
if (l && q.push(H[
|
|
6605
|
-
const z = Va(o, s,
|
|
6610
|
+
const k = Ze(o), v = Te(c), D = Ze(c) === c, C = await (i.isRTL == null ? void 0 : i.isRTL(a.floating)), $ = h || (D || !g ? [Au(c)] : Ua(c)), M = f !== "none";
|
|
6611
|
+
!h && M && $.push(...Ga(c, g, f, C));
|
|
6612
|
+
const V = [c, ...$], H = await Un(u, _), q = [];
|
|
6613
|
+
let y = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
6614
|
+
if (l && q.push(H[k]), d) {
|
|
6615
|
+
const z = Va(o, s, C);
|
|
6606
6616
|
q.push(H[z[0]], H[z[1]]);
|
|
6607
6617
|
}
|
|
6608
|
-
if (
|
|
6618
|
+
if (y = [...y, {
|
|
6609
6619
|
placement: o,
|
|
6610
6620
|
overflows: q
|
|
6611
6621
|
}], !q.every((z) => z <= 0)) {
|
|
6612
6622
|
var x, A;
|
|
6613
6623
|
const z = (((x = r.flip) == null ? void 0 : x.index) || 0) + 1, W = V[z];
|
|
6614
|
-
if (W && (!(d === "alignment" ?
|
|
6624
|
+
if (W && (!(d === "alignment" ? v !== Te(W) : !1) || // We leave the current main axis only if every placement on that axis
|
|
6615
6625
|
// overflows the main axis.
|
|
6616
|
-
|
|
6626
|
+
y.every((P) => Te(P.placement) === v ? P.overflows[0] > 0 : !0)))
|
|
6617
6627
|
return {
|
|
6618
6628
|
data: {
|
|
6619
6629
|
index: z,
|
|
6620
|
-
overflows:
|
|
6630
|
+
overflows: y
|
|
6621
6631
|
},
|
|
6622
6632
|
reset: {
|
|
6623
6633
|
placement: W
|
|
6624
6634
|
}
|
|
6625
6635
|
};
|
|
6626
|
-
let G = (A =
|
|
6636
|
+
let G = (A = y.filter((I) => I.overflows[0] <= 0).sort((I, P) => I.overflows[1] - P.overflows[1])[0]) == null ? void 0 : A.placement;
|
|
6627
6637
|
if (!G)
|
|
6628
6638
|
switch (p) {
|
|
6629
6639
|
case "bestFit": {
|
|
6630
|
-
var
|
|
6631
|
-
const I = (
|
|
6640
|
+
var E;
|
|
6641
|
+
const I = (E = y.filter((P) => {
|
|
6632
6642
|
if (M) {
|
|
6633
6643
|
const B = Te(P.placement);
|
|
6634
|
-
return B ===
|
|
6644
|
+
return B === v || // Create a bias to the `y` side axis due to horizontal
|
|
6635
6645
|
// reading directions favoring greater width.
|
|
6636
6646
|
B === "y";
|
|
6637
6647
|
}
|
|
6638
6648
|
return !0;
|
|
6639
|
-
}).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, N) => B + N, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 :
|
|
6649
|
+
}).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, N) => B + N, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 : E[0];
|
|
6640
6650
|
I && (G = I);
|
|
6641
6651
|
break;
|
|
6642
6652
|
}
|
|
@@ -6717,14 +6727,14 @@ const ul = function(e) {
|
|
|
6717
6727
|
mainAxis: r = !0,
|
|
6718
6728
|
crossAxis: s = !1,
|
|
6719
6729
|
limiter: c = {
|
|
6720
|
-
fn: (
|
|
6730
|
+
fn: (_) => {
|
|
6721
6731
|
let {
|
|
6722
|
-
x:
|
|
6723
|
-
y:
|
|
6724
|
-
} =
|
|
6732
|
+
x: k,
|
|
6733
|
+
y: v
|
|
6734
|
+
} = _;
|
|
6725
6735
|
return {
|
|
6726
|
-
x:
|
|
6727
|
-
y:
|
|
6736
|
+
x: k,
|
|
6737
|
+
y: v
|
|
6728
6738
|
};
|
|
6729
6739
|
}
|
|
6730
6740
|
},
|
|
@@ -6735,12 +6745,12 @@ const ul = function(e) {
|
|
|
6735
6745
|
}, l = await Un(u, i), d = Te(Ze(o)), h = Nn(d);
|
|
6736
6746
|
let p = a[h], f = a[d];
|
|
6737
6747
|
if (r) {
|
|
6738
|
-
const
|
|
6739
|
-
p = Ut(
|
|
6748
|
+
const _ = h === "y" ? "top" : "left", k = h === "y" ? "bottom" : "right", v = p + l[_], D = p - l[k];
|
|
6749
|
+
p = Ut(v, p, D);
|
|
6740
6750
|
}
|
|
6741
6751
|
if (s) {
|
|
6742
|
-
const
|
|
6743
|
-
f = Ut(
|
|
6752
|
+
const _ = d === "y" ? "top" : "left", k = d === "y" ? "bottom" : "right", v = f + l[_], D = f - l[k];
|
|
6753
|
+
f = Ut(v, f, D);
|
|
6744
6754
|
}
|
|
6745
6755
|
const g = c.fn({
|
|
6746
6756
|
...u,
|
|
@@ -6925,8 +6935,8 @@ function Ve(e, u, t, n) {
|
|
|
6925
6935
|
const h = pe(r), p = n && ke(n) ? pe(n) : n;
|
|
6926
6936
|
let f = h, g = ot(f);
|
|
6927
6937
|
for (; g && n && p !== f; ) {
|
|
6928
|
-
const
|
|
6929
|
-
i *=
|
|
6938
|
+
const _ = Ke(g), k = g.getBoundingClientRect(), v = ye(g), D = k.left + (g.clientLeft + parseFloat(v.paddingLeft)) * _.x, C = k.top + (g.clientTop + parseFloat(v.paddingTop)) * _.y;
|
|
6939
|
+
i *= _.x, a *= _.y, l *= _.x, d *= _.y, i += D, a += C, f = pe(g), g = ot(f);
|
|
6930
6940
|
}
|
|
6931
6941
|
}
|
|
6932
6942
|
return Fu({
|
|
@@ -7183,30 +7193,30 @@ function Al(e, u) {
|
|
|
7183
7193
|
} = a;
|
|
7184
7194
|
if (c || u(), !h || !p)
|
|
7185
7195
|
return;
|
|
7186
|
-
const f = ku(d), g = ku(o.clientWidth - (l + h)),
|
|
7187
|
-
rootMargin: -f + "px " + -g + "px " + -
|
|
7196
|
+
const f = ku(d), g = ku(o.clientWidth - (l + h)), _ = ku(o.clientHeight - (d + p)), k = ku(l), D = {
|
|
7197
|
+
rootMargin: -f + "px " + -g + "px " + -_ + "px " + -k + "px",
|
|
7188
7198
|
threshold: Ne(0, Du(1, i)) || 1
|
|
7189
7199
|
};
|
|
7190
|
-
let
|
|
7200
|
+
let C = !0;
|
|
7191
7201
|
function $(M) {
|
|
7192
7202
|
const V = M[0].intersectionRatio;
|
|
7193
7203
|
if (V !== i) {
|
|
7194
|
-
if (!
|
|
7204
|
+
if (!C)
|
|
7195
7205
|
return s();
|
|
7196
7206
|
V ? s(!1, V) : n = setTimeout(() => {
|
|
7197
7207
|
s(!1, 1e-7);
|
|
7198
7208
|
}, 1e3);
|
|
7199
7209
|
}
|
|
7200
|
-
V === 1 && !Kn(a, e.getBoundingClientRect()) && s(),
|
|
7210
|
+
V === 1 && !Kn(a, e.getBoundingClientRect()) && s(), C = !1;
|
|
7201
7211
|
}
|
|
7202
7212
|
try {
|
|
7203
7213
|
t = new IntersectionObserver($, {
|
|
7204
|
-
...
|
|
7214
|
+
...D,
|
|
7205
7215
|
// Handle <iframe>s
|
|
7206
7216
|
root: o.ownerDocument
|
|
7207
7217
|
});
|
|
7208
7218
|
} catch {
|
|
7209
|
-
t = new IntersectionObserver($,
|
|
7219
|
+
t = new IntersectionObserver($, D);
|
|
7210
7220
|
}
|
|
7211
7221
|
t.observe(e);
|
|
7212
7222
|
}
|
|
@@ -7221,31 +7231,31 @@ function Fl(e, u, t, n) {
|
|
|
7221
7231
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
7222
7232
|
animationFrame: i = !1
|
|
7223
7233
|
} = n, a = vt(e), l = o || r ? [...a ? pu(a) : [], ...pu(u)] : [];
|
|
7224
|
-
l.forEach((
|
|
7225
|
-
o &&
|
|
7234
|
+
l.forEach((k) => {
|
|
7235
|
+
o && k.addEventListener("scroll", t, {
|
|
7226
7236
|
passive: !0
|
|
7227
|
-
}), r &&
|
|
7237
|
+
}), r && k.addEventListener("resize", t);
|
|
7228
7238
|
});
|
|
7229
7239
|
const d = a && c ? Al(a, t) : null;
|
|
7230
7240
|
let h = -1, p = null;
|
|
7231
|
-
s && (p = new ResizeObserver((
|
|
7232
|
-
let [
|
|
7233
|
-
|
|
7234
|
-
var
|
|
7235
|
-
(
|
|
7241
|
+
s && (p = new ResizeObserver((k) => {
|
|
7242
|
+
let [v] = k;
|
|
7243
|
+
v && v.target === a && p && (p.unobserve(u), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
7244
|
+
var D;
|
|
7245
|
+
(D = p) == null || D.observe(u);
|
|
7236
7246
|
})), t();
|
|
7237
7247
|
}), a && !i && p.observe(a), p.observe(u));
|
|
7238
7248
|
let f, g = i ? Ve(e) : null;
|
|
7239
|
-
i &&
|
|
7240
|
-
function
|
|
7241
|
-
const
|
|
7242
|
-
g && !Kn(g,
|
|
7249
|
+
i && _();
|
|
7250
|
+
function _() {
|
|
7251
|
+
const k = Ve(e);
|
|
7252
|
+
g && !Kn(g, k) && t(), g = k, f = requestAnimationFrame(_);
|
|
7243
7253
|
}
|
|
7244
7254
|
return t(), () => {
|
|
7245
|
-
var
|
|
7246
|
-
l.forEach((
|
|
7247
|
-
o &&
|
|
7248
|
-
}), d == null || d(), (
|
|
7255
|
+
var k;
|
|
7256
|
+
l.forEach((v) => {
|
|
7257
|
+
o && v.removeEventListener("scroll", t), r && v.removeEventListener("resize", t);
|
|
7258
|
+
}), d == null || d(), (k = p) == null || k.disconnect(), p = null, i && cancelAnimationFrame(f);
|
|
7249
7259
|
};
|
|
7250
7260
|
}
|
|
7251
7261
|
const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
@@ -7263,7 +7273,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7263
7273
|
}, Ml = "sq-popover", zl = /* @__PURE__ */ O({
|
|
7264
7274
|
name: Ml,
|
|
7265
7275
|
__name: "popover",
|
|
7266
|
-
props: /* @__PURE__ */
|
|
7276
|
+
props: /* @__PURE__ */ ue({
|
|
7267
7277
|
placement: { default: "top" },
|
|
7268
7278
|
offset: {},
|
|
7269
7279
|
teleported: { type: Boolean, default: !0 },
|
|
@@ -7282,40 +7292,40 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7282
7292
|
const { getCssVar: u } = an(), { nextZIndex: t } = ct(), n = parseInt(u("--sq-padding-sm")), o = parseInt(u("--sq-padding-md"));
|
|
7283
7293
|
let r, s;
|
|
7284
7294
|
const c = e, i = ae(e, "visible"), a = R(0), l = R({}), d = de(null), h = de(null);
|
|
7285
|
-
ie(i, (
|
|
7286
|
-
|
|
7295
|
+
ie(i, (C) => {
|
|
7296
|
+
C ? (a.value = t(), v(), s = Fl(
|
|
7287
7297
|
d.value.$el,
|
|
7288
7298
|
h.value,
|
|
7289
|
-
|
|
7299
|
+
v
|
|
7290
7300
|
)) : s == null || s();
|
|
7291
7301
|
}), be(() => {
|
|
7292
|
-
|
|
7302
|
+
v();
|
|
7293
7303
|
}), Ue(() => {
|
|
7294
|
-
|
|
7304
|
+
D(), document.removeEventListener("click", k);
|
|
7295
7305
|
});
|
|
7296
7306
|
function p() {
|
|
7297
|
-
c.trigger !== "hover" || c.disabled || (
|
|
7298
|
-
|
|
7307
|
+
c.trigger !== "hover" || c.disabled || (D(), r = setTimeout(() => {
|
|
7308
|
+
_(!1);
|
|
7299
7309
|
}, c.showAfter));
|
|
7300
7310
|
}
|
|
7301
7311
|
function f() {
|
|
7302
|
-
c.trigger === "hover" && (
|
|
7303
|
-
|
|
7312
|
+
c.trigger === "hover" && (D(), r = setTimeout(() => {
|
|
7313
|
+
k();
|
|
7304
7314
|
}, c.hideAfter));
|
|
7305
7315
|
}
|
|
7306
|
-
function g(
|
|
7307
|
-
c.trigger === "click" && !c.disabled && !i.value && (
|
|
7316
|
+
function g(C) {
|
|
7317
|
+
c.trigger === "click" && !c.disabled && !i.value && (C.stopPropagation(), _());
|
|
7308
7318
|
}
|
|
7309
|
-
function
|
|
7310
|
-
i.value = !0,
|
|
7319
|
+
function _(C = !0) {
|
|
7320
|
+
i.value = !0, C && document.addEventListener("click", k);
|
|
7311
7321
|
}
|
|
7312
|
-
function
|
|
7313
|
-
i.value = !1, document.removeEventListener("click",
|
|
7322
|
+
function k() {
|
|
7323
|
+
i.value = !1, document.removeEventListener("click", k);
|
|
7314
7324
|
}
|
|
7315
|
-
async function
|
|
7316
|
-
var q,
|
|
7317
|
-
const
|
|
7318
|
-
if (
|
|
7325
|
+
async function v() {
|
|
7326
|
+
var q, y;
|
|
7327
|
+
const C = typeof ((q = d.value) == null ? void 0 : q.$el.getBoundingClientRect), $ = typeof ((y = h.value) == null ? void 0 : y.getBoundingClientRect);
|
|
7328
|
+
if (C !== "function" || $ !== "function") return;
|
|
7319
7329
|
const M = await Bl(d.value.$el, h.value, {
|
|
7320
7330
|
placement: c.placement,
|
|
7321
7331
|
middleware: [
|
|
@@ -7329,13 +7339,13 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7329
7339
|
top: `${H}px`
|
|
7330
7340
|
};
|
|
7331
7341
|
}
|
|
7332
|
-
function
|
|
7342
|
+
function D() {
|
|
7333
7343
|
r && (clearTimeout(r), r = void 0);
|
|
7334
7344
|
}
|
|
7335
|
-
return (
|
|
7345
|
+
return (C, $) => (m(), S(xe, null, [
|
|
7336
7346
|
T(b(Oa), {
|
|
7337
|
-
class: K(["sq-popover-trigger",
|
|
7338
|
-
style: ee(
|
|
7347
|
+
class: K(["sq-popover-trigger", C.$attrs.class]),
|
|
7348
|
+
style: ee(C.$attrs.style),
|
|
7339
7349
|
ref_key: "triggerRef",
|
|
7340
7350
|
ref: d,
|
|
7341
7351
|
onMouseenter: p,
|
|
@@ -7343,7 +7353,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7343
7353
|
onClick: g
|
|
7344
7354
|
}, {
|
|
7345
7355
|
default: Z(() => [
|
|
7346
|
-
j(
|
|
7356
|
+
j(C.$slots, "reference")
|
|
7347
7357
|
]),
|
|
7348
7358
|
_: 3
|
|
7349
7359
|
}, 8, ["class", "style"]),
|
|
@@ -7356,14 +7366,14 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7356
7366
|
}, {
|
|
7357
7367
|
default: Z(() => [
|
|
7358
7368
|
fe(F("div", {
|
|
7359
|
-
class: K(["sq-popover",
|
|
7369
|
+
class: K(["sq-popover", C.popoverClass]),
|
|
7360
7370
|
style: ee({ ...l.value, zIndex: a.value }),
|
|
7361
7371
|
ref_key: "popverRef",
|
|
7362
7372
|
ref: h,
|
|
7363
7373
|
onClick: $[0] || ($[0] = Me(() => {
|
|
7364
7374
|
}, ["stop"]))
|
|
7365
7375
|
}, [
|
|
7366
|
-
j(
|
|
7376
|
+
j(C.$slots, "default")
|
|
7367
7377
|
], 6), [
|
|
7368
7378
|
[He, i.value]
|
|
7369
7379
|
])
|
|
@@ -7390,13 +7400,13 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7390
7400
|
label: { type: Boolean, default: !0 }
|
|
7391
7401
|
},
|
|
7392
7402
|
setup(e) {
|
|
7393
|
-
const u = new ResizeObserver(a), t = e, n = R(100), o = de(null), r =
|
|
7403
|
+
const u = new ResizeObserver(a), t = e, n = R(100), o = de(null), r = w(() => {
|
|
7394
7404
|
const l = [];
|
|
7395
7405
|
return t.color || l.push(`is-${t.type}`), t.variant && l.push(`is-${t.variant}`), l;
|
|
7396
|
-
}), s =
|
|
7406
|
+
}), s = w(() => {
|
|
7397
7407
|
const l = t.max - t.min;
|
|
7398
7408
|
return (t.value - t.min) * 100 / l;
|
|
7399
|
-
}), c =
|
|
7409
|
+
}), c = w(() => `${Math.round(s.value * 10) / 10} %`), i = w(() => {
|
|
7400
7410
|
const l = {};
|
|
7401
7411
|
if (l["--progress-stroke"] = `${t.stroke}px`, !t.variant)
|
|
7402
7412
|
l["--progress-value"] = `${s.value}%`;
|
|
@@ -7444,7 +7454,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7444
7454
|
t.label ? (m(), S("div", Tl, [
|
|
7445
7455
|
j(l.$slots, "default", { percentage: s.value }, () => [
|
|
7446
7456
|
F("span", {
|
|
7447
|
-
textContent:
|
|
7457
|
+
textContent: se(c.value)
|
|
7448
7458
|
}, null, 8, Rl)
|
|
7449
7459
|
])
|
|
7450
7460
|
])) : U("", !0)
|
|
@@ -7457,7 +7467,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7457
7467
|
}, Nl = ["textContent"], Zl = "sq-radio", Vl = /* @__PURE__ */ O({
|
|
7458
7468
|
name: Zl,
|
|
7459
7469
|
__name: "radio",
|
|
7460
|
-
props: /* @__PURE__ */
|
|
7470
|
+
props: /* @__PURE__ */ ue({
|
|
7461
7471
|
form: {},
|
|
7462
7472
|
name: {},
|
|
7463
7473
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -7470,7 +7480,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7470
7480
|
checked: { type: Boolean, default: !1 },
|
|
7471
7481
|
checkedModifiers: {}
|
|
7472
7482
|
}),
|
|
7473
|
-
emits: /* @__PURE__ */
|
|
7483
|
+
emits: /* @__PURE__ */ ue(["change"], ["update:checked"]),
|
|
7474
7484
|
setup(e, { emit: u }) {
|
|
7475
7485
|
const t = u, n = e, {
|
|
7476
7486
|
radioSize: o,
|
|
@@ -7479,10 +7489,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7479
7489
|
radioName: c,
|
|
7480
7490
|
radioVariant: i,
|
|
7481
7491
|
groupContext: a
|
|
7482
|
-
} = ai(n), l = R(), d = ae(e, "checked"), h =
|
|
7483
|
-
const f = [], g = b(o),
|
|
7484
|
-
return g !== "md" && f.push(`sq-selection--${g}`), p.value && f.push("is-checked"),
|
|
7485
|
-
}), p =
|
|
7492
|
+
} = ai(n), l = R(), d = ae(e, "checked"), h = w(() => {
|
|
7493
|
+
const f = [], g = b(o), _ = b(r), k = b(i);
|
|
7494
|
+
return g !== "md" && f.push(`sq-selection--${g}`), p.value && f.push("is-checked"), _ && f.push("is-disabled"), k && f.push(`is-${k}`), f;
|
|
7495
|
+
}), p = w(() => a ? b(a).checked === n.value : d.value);
|
|
7486
7496
|
return ie(l, (f) => {
|
|
7487
7497
|
d.value = f === n.value;
|
|
7488
7498
|
}), ie(p, (f) => {
|
|
@@ -7504,8 +7514,8 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7504
7514
|
form: b(s),
|
|
7505
7515
|
value: n.value,
|
|
7506
7516
|
disabled: b(r),
|
|
7507
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
7508
|
-
onChange: g[1] || (g[1] = (
|
|
7517
|
+
"onUpdate:modelValue": g[0] || (g[0] = (_) => l.value = _),
|
|
7518
|
+
onChange: g[1] || (g[1] = (_) => t("change", p.value))
|
|
7509
7519
|
}, null, 40, Ol), [
|
|
7510
7520
|
[en, l.value]
|
|
7511
7521
|
]),
|
|
@@ -7513,7 +7523,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7513
7523
|
n.label ? (m(), S("span", {
|
|
7514
7524
|
key: 1,
|
|
7515
7525
|
class: "sq-selection-label",
|
|
7516
|
-
textContent:
|
|
7526
|
+
textContent: se(n.label)
|
|
7517
7527
|
}, null, 8, Nl)) : U("", !0)
|
|
7518
7528
|
], 2));
|
|
7519
7529
|
}
|
|
@@ -7531,15 +7541,15 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7531
7541
|
},
|
|
7532
7542
|
emits: ["change", "update:value"],
|
|
7533
7543
|
setup(e, { emit: u }) {
|
|
7534
|
-
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s =
|
|
7544
|
+
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s = w(() => o.name ?? `sq-radio-${t()}`);
|
|
7535
7545
|
nu(
|
|
7536
7546
|
Qn,
|
|
7537
7547
|
R({
|
|
7538
|
-
form:
|
|
7548
|
+
form: re(o, "form"),
|
|
7539
7549
|
name: s,
|
|
7540
|
-
disabled:
|
|
7541
|
-
size:
|
|
7542
|
-
variant:
|
|
7550
|
+
disabled: re(o, "disabled"),
|
|
7551
|
+
size: re(o, "size"),
|
|
7552
|
+
variant: re(o, "variant"),
|
|
7543
7553
|
checked: r,
|
|
7544
7554
|
toggleItem: c
|
|
7545
7555
|
})
|
|
@@ -7575,22 +7585,22 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7575
7585
|
},
|
|
7576
7586
|
emits: ["change", "update:value"],
|
|
7577
7587
|
setup(e, { emit: u }) {
|
|
7578
|
-
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s = R(), c = R(), i =
|
|
7588
|
+
const { nextId: t } = qu(), n = u, o = e, r = R(o.value), s = R(), c = R(), i = w(() => o.items.length && typeof o.items[0] == "string" ? o.items.map((f) => ({
|
|
7579
7589
|
text: f,
|
|
7580
7590
|
value: f
|
|
7581
|
-
})) : o.items), a =
|
|
7591
|
+
})) : o.items), a = w(() => {
|
|
7582
7592
|
const f = [];
|
|
7583
7593
|
return o.size !== "md" && f.push(`sq-segmented--${o.size}`), o.round && f.push("is-round"), f;
|
|
7584
|
-
}), l =
|
|
7594
|
+
}), l = w(() => {
|
|
7585
7595
|
const f = {};
|
|
7586
7596
|
return s.value && (f.width = `${s.value}px`), c.value && (f.left = `${c.value}px`), f;
|
|
7587
|
-
}), d =
|
|
7597
|
+
}), d = w(() => o.name ?? `sq-segmented-${t()}`);
|
|
7588
7598
|
nu(
|
|
7589
7599
|
e0,
|
|
7590
7600
|
R({
|
|
7591
7601
|
name: d,
|
|
7592
|
-
disabled:
|
|
7593
|
-
size:
|
|
7602
|
+
disabled: re(o, "disabled"),
|
|
7603
|
+
size: re(o, "size"),
|
|
7594
7604
|
active: r,
|
|
7595
7605
|
toggleItem: h,
|
|
7596
7606
|
updateThumb: p
|
|
@@ -7620,9 +7630,9 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7620
7630
|
style: ee(l.value)
|
|
7621
7631
|
}, null, 4),
|
|
7622
7632
|
j(f.$slots, "default", {}, () => [
|
|
7623
|
-
(m(!0), S(xe, null, je(i.value, (
|
|
7624
|
-
key:
|
|
7625
|
-
}, { ref_for: !0 },
|
|
7633
|
+
(m(!0), S(xe, null, je(i.value, (_) => (m(), L(b(Jl), qe({
|
|
7634
|
+
key: _.text
|
|
7635
|
+
}, { ref_for: !0 }, _), null, 16))), 128))
|
|
7626
7636
|
])
|
|
7627
7637
|
], 2));
|
|
7628
7638
|
}
|
|
@@ -7636,10 +7646,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7636
7646
|
value: {}
|
|
7637
7647
|
},
|
|
7638
7648
|
setup(e) {
|
|
7639
|
-
const u = e, { segmentedDisabled: t, parentContext: n } = li(u), o = R(), r = de(null), s =
|
|
7649
|
+
const u = e, { segmentedDisabled: t, parentContext: n } = li(u), o = R(), r = de(null), s = w(() => {
|
|
7640
7650
|
const l = [], d = b(t);
|
|
7641
7651
|
return c.value && l.push("is-active"), d && l.push("is-disabled"), l;
|
|
7642
|
-
}), c =
|
|
7652
|
+
}), c = w(() => b(n).active === u.value), i = w(() => b(n).size !== "sm" ? "md" : "sm");
|
|
7643
7653
|
ie(c, (l) => {
|
|
7644
7654
|
if (l) {
|
|
7645
7655
|
if (o.value = u.value ?? "on", !n) return;
|
|
@@ -7672,7 +7682,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7672
7682
|
T(b(Oe), { size: i.value }, {
|
|
7673
7683
|
default: Z(() => [
|
|
7674
7684
|
u.icon ? (m(), L(me(u.icon), { key: 0 })) : U("", !0),
|
|
7675
|
-
iu(" " +
|
|
7685
|
+
iu(" " + se(u.text), 1)
|
|
7676
7686
|
]),
|
|
7677
7687
|
_: 1
|
|
7678
7688
|
}, 8, ["size"])
|
|
@@ -7685,7 +7695,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7685
7695
|
), Kl = ["id", "autofocus", "name", "form", "disabled"], Ql = { class: "sq-switch-track" }, e1 = { class: "sq-switch-thumb" }, u1 = "sq-switch", t1 = /* @__PURE__ */ O({
|
|
7686
7696
|
name: u1,
|
|
7687
7697
|
__name: "switch",
|
|
7688
|
-
props: /* @__PURE__ */
|
|
7698
|
+
props: /* @__PURE__ */ ue({
|
|
7689
7699
|
form: {},
|
|
7690
7700
|
name: {},
|
|
7691
7701
|
disabled: { type: Boolean },
|
|
@@ -7697,9 +7707,9 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7697
7707
|
checked: { type: Boolean, default: !1 },
|
|
7698
7708
|
checkedModifiers: {}
|
|
7699
7709
|
}),
|
|
7700
|
-
emits: /* @__PURE__ */
|
|
7710
|
+
emits: /* @__PURE__ */ ue(["change", "click"], ["update:checked"]),
|
|
7701
7711
|
setup(e, { emit: u }) {
|
|
7702
|
-
const t = u, n = e, { switchSize: o, switchDisabled: r, id: s } = di(n), c = ae(e, "checked"), i =
|
|
7712
|
+
const t = u, n = e, { switchSize: o, switchDisabled: r, id: s } = di(n), c = ae(e, "checked"), i = w(() => {
|
|
7703
7713
|
const a = [], l = b(o), d = b(r);
|
|
7704
7714
|
return l !== "md" && a.push(`sq-switch--${l}`), c.value && a.push("is-checked"), (d || n.loading) && a.push("is-disabled"), n.variant && a.push(`is-${n.variant}`), a;
|
|
7705
7715
|
});
|
|
@@ -7736,10 +7746,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7736
7746
|
size: { default: "md" }
|
|
7737
7747
|
},
|
|
7738
7748
|
setup(e) {
|
|
7739
|
-
const u = e, t =
|
|
7749
|
+
const u = e, t = w(() => {
|
|
7740
7750
|
const o = [];
|
|
7741
7751
|
return u.size !== "md" && o.push(`sq-tag--${u.size}`), u.variant && u.type && o.push(`is-${u.variant}`), u.type && o.push(`is-${u.type}`), u.round && o.push("is-round"), o;
|
|
7742
|
-
}), n =
|
|
7752
|
+
}), n = w(() => u.size === "lg" ? "md" : "sm");
|
|
7743
7753
|
return (o, r) => (m(), L(b(Oe), {
|
|
7744
7754
|
class: K(["sq-tag", t.value]),
|
|
7745
7755
|
size: n.value
|
|
@@ -7761,10 +7771,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7761
7771
|
},
|
|
7762
7772
|
emits: ["change"],
|
|
7763
7773
|
setup(e, { emit: u }) {
|
|
7764
|
-
const t = u, n = e, o =
|
|
7774
|
+
const t = u, n = e, o = w(() => {
|
|
7765
7775
|
const s = [];
|
|
7766
7776
|
return n.size !== "md" && s.push(`sq-tag--${n.size}`), n.type && s.push(`is-${n.type}`), n.round && s.push("is-round"), n.checked && s.push("is-checked"), s;
|
|
7767
|
-
}), r =
|
|
7777
|
+
}), r = w(() => n.size === "lg" ? "md" : "sm");
|
|
7768
7778
|
return (s, c) => (m(), L(b(Oe), {
|
|
7769
7779
|
class: K(["sq-check-tag", o.value]),
|
|
7770
7780
|
size: r.value,
|
|
@@ -7784,10 +7794,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7784
7794
|
size: { default: "md" }
|
|
7785
7795
|
},
|
|
7786
7796
|
setup(e) {
|
|
7787
|
-
const u = e, t =
|
|
7797
|
+
const u = e, t = w(() => {
|
|
7788
7798
|
const r = [];
|
|
7789
7799
|
return u.size !== "md" && r.push(`sq-text--${u.size}`), u.ellipsis !== void 0 && u.ellipsis !== !1 && r.push(n.value > 1 ? "multi-line" : "single-line"), r;
|
|
7790
|
-
}), n =
|
|
7800
|
+
}), n = w(() => typeof u.ellipsis == "number" ? Number(Math.max(u.ellipsis, 1).toFixed(0)) : 1), o = w(
|
|
7791
7801
|
() => u.ellipsis ? `--row-num: ${n.value}` : ""
|
|
7792
7802
|
);
|
|
7793
7803
|
return (r, s) => (m(), S("span", {
|
|
@@ -7805,7 +7815,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7805
7815
|
variant: {}
|
|
7806
7816
|
},
|
|
7807
7817
|
setup(e) {
|
|
7808
|
-
const u = e, t =
|
|
7818
|
+
const u = e, t = w(() => {
|
|
7809
7819
|
const n = [];
|
|
7810
7820
|
return u.variant && n.push(`is-${u.variant}`), n.push(`align-${u.align}`), n;
|
|
7811
7821
|
});
|
|
@@ -7827,10 +7837,10 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7827
7837
|
title: {}
|
|
7828
7838
|
},
|
|
7829
7839
|
setup(e) {
|
|
7830
|
-
const u = e, t =
|
|
7840
|
+
const u = e, t = w(() => {
|
|
7831
7841
|
const o = [];
|
|
7832
7842
|
return u.type && o.push(`is-${u.type}`), u.hollow && o.push("is-hollow"), o;
|
|
7833
|
-
}), n =
|
|
7843
|
+
}), n = w(() => {
|
|
7834
7844
|
const o = {};
|
|
7835
7845
|
return u.color && (o["--timeline-dot-color"] = u.color), o;
|
|
7836
7846
|
});
|
|
@@ -7845,12 +7855,12 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7845
7855
|
u.title ? (m(), S("h2", {
|
|
7846
7856
|
key: 0,
|
|
7847
7857
|
class: "content-title",
|
|
7848
|
-
textContent:
|
|
7858
|
+
textContent: se(u.title)
|
|
7849
7859
|
}, null, 8, a1)) : U("", !0),
|
|
7850
7860
|
u.timestamp ? (m(), S("span", {
|
|
7851
7861
|
key: 1,
|
|
7852
7862
|
class: "content-time",
|
|
7853
|
-
textContent:
|
|
7863
|
+
textContent: se(u.timestamp)
|
|
7854
7864
|
}, null, 8, l1)) : U("", !0),
|
|
7855
7865
|
F("div", d1, [
|
|
7856
7866
|
j(o.$slots, "default")
|
|
@@ -7870,7 +7880,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7870
7880
|
popoverClass: {}
|
|
7871
7881
|
},
|
|
7872
7882
|
setup(e) {
|
|
7873
|
-
const u = e, t =
|
|
7883
|
+
const u = e, t = w(() => {
|
|
7874
7884
|
const n = ["sq-tooltip"], o = u.popoverClass;
|
|
7875
7885
|
return Array.isArray(o) ? n.push(...o) : typeof o == "string" && n.push(o), n;
|
|
7876
7886
|
});
|
|
@@ -7888,7 +7898,7 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7888
7898
|
]),
|
|
7889
7899
|
default: Z(() => [
|
|
7890
7900
|
F("span", {
|
|
7891
|
-
textContent:
|
|
7901
|
+
textContent: se(u.tip)
|
|
7892
7902
|
}, null, 8, p1)
|
|
7893
7903
|
]),
|
|
7894
7904
|
_: 3
|
|
@@ -7926,9 +7936,9 @@ const Sl = ul, ql = tl, $l = Ka, Bl = (e, u, t) => {
|
|
|
7926
7936
|
}
|
|
7927
7937
|
function l(h) {
|
|
7928
7938
|
const p = h ?? new FileList(), f = [], g = o.max ? Math.min(p.length, o.max) : p.length;
|
|
7929
|
-
for (let
|
|
7930
|
-
const
|
|
7931
|
-
f.push(
|
|
7939
|
+
for (let _ = 0; _ < g; _++) {
|
|
7940
|
+
const k = p[_];
|
|
7941
|
+
f.push(k);
|
|
7932
7942
|
}
|
|
7933
7943
|
n("change", f);
|
|
7934
7944
|
}
|