mokkun 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/dist/example.html +2 -2
- package/dist/mokkun.css +1 -1
- package/dist/mokkun.esm.js +494 -488
- package/dist/mokkun.esm.js.map +1 -1
- package/dist/mokkun.js +79 -79
- package/dist/mokkun.js.map +1 -1
- package/dist/types/parser/yaml-parser.d.ts +0 -1
- package/dist/types/types/schema.d.ts +3 -1
- package/package.json +1 -1
package/dist/mokkun.esm.js
CHANGED
|
@@ -41,15 +41,15 @@ function St(t, e) {
|
|
|
41
41
|
|
|
42
42
|
` + t.mark.snippet), s + " " + i) : s;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function re(t, e) {
|
|
45
45
|
Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = St(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
re.prototype = Object.create(Error.prototype);
|
|
48
|
+
re.prototype.constructor = re;
|
|
49
|
+
re.prototype.toString = function(e) {
|
|
50
50
|
return this.name + ": " + St(this, e);
|
|
51
51
|
};
|
|
52
|
-
var
|
|
52
|
+
var D = re;
|
|
53
53
|
function Se(t, e, i, s, n) {
|
|
54
54
|
var a = "", r = "", o = Math.floor(n / 2) - 1;
|
|
55
55
|
return s - e > o && (a = " ... ", e = s - o + a.length), i - s > o && (r = " ...", i = s + o - r.length), {
|
|
@@ -117,13 +117,13 @@ function Qi(t) {
|
|
|
117
117
|
function Ji(t, e) {
|
|
118
118
|
if (e = e || {}, Object.keys(e).forEach(function(i) {
|
|
119
119
|
if (Zi.indexOf(i) === -1)
|
|
120
|
-
throw new
|
|
120
|
+
throw new D('Unknown option "' + i + '" is met in definition of "' + t + '" YAML type.');
|
|
121
121
|
}), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() {
|
|
122
122
|
return !0;
|
|
123
123
|
}, this.construct = e.construct || function(i) {
|
|
124
124
|
return i;
|
|
125
125
|
}, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = Qi(e.styleAliases || null), Ki.indexOf(this.kind) === -1)
|
|
126
|
-
throw new
|
|
126
|
+
throw new D('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.');
|
|
127
127
|
}
|
|
128
128
|
var $ = Ji;
|
|
129
129
|
function et(t, e) {
|
|
@@ -167,17 +167,17 @@ Oe.prototype.extend = function(e) {
|
|
|
167
167
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
168
168
|
e.implicit && (i = i.concat(e.implicit)), e.explicit && (s = s.concat(e.explicit));
|
|
169
169
|
else
|
|
170
|
-
throw new
|
|
170
|
+
throw new D("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
171
171
|
i.forEach(function(a) {
|
|
172
172
|
if (!(a instanceof $))
|
|
173
|
-
throw new
|
|
173
|
+
throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
174
174
|
if (a.loadKind && a.loadKind !== "scalar")
|
|
175
|
-
throw new
|
|
175
|
+
throw new D("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
176
176
|
if (a.multi)
|
|
177
|
-
throw new
|
|
177
|
+
throw new D("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
178
178
|
}), s.forEach(function(a) {
|
|
179
179
|
if (!(a instanceof $))
|
|
180
|
-
throw new
|
|
180
|
+
throw new D("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
181
181
|
});
|
|
182
182
|
var n = Object.create(Oe.prototype);
|
|
183
183
|
return n.implicit = (this.implicit || []).concat(i), n.explicit = (this.explicit || []).concat(s), n.compiledImplicit = et(n, "implicit"), n.compiledExplicit = et(n, "explicit"), n.compiledTypeMap = Xi(n.compiledImplicit, n.compiledExplicit), n;
|
|
@@ -561,7 +561,7 @@ var Wt = new $("tag:yaml.org,2002:set", {
|
|
|
561
561
|
qt,
|
|
562
562
|
Wt
|
|
563
563
|
]
|
|
564
|
-
}), U = Object.prototype.hasOwnProperty,
|
|
564
|
+
}), U = Object.prototype.hasOwnProperty, me = 1, Yt = 2, Gt = 3, ge = 4, $e = 1, Os = 2, tt = 3, Hs = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, zs = /[\x85\u2028\u2029]/, Bs = /[,\[\]\{\}]/, Zt = /^(?:!|!!|![a-z\-]+!)$/i, Kt = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
565
565
|
function it(t) {
|
|
566
566
|
return Object.prototype.toString.call(t);
|
|
567
567
|
}
|
|
@@ -620,18 +620,18 @@ function ei(t, e) {
|
|
|
620
620
|
line: t.line,
|
|
621
621
|
column: t.position - t.lineStart
|
|
622
622
|
};
|
|
623
|
-
return i.snippet = Gi(i), new
|
|
623
|
+
return i.snippet = Gi(i), new D(e, i);
|
|
624
624
|
}
|
|
625
625
|
function v(t, e) {
|
|
626
626
|
throw ei(t, e);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function be(t, e) {
|
|
629
629
|
t.onWarning && t.onWarning.call(null, ei(t, e));
|
|
630
630
|
}
|
|
631
631
|
var nt = {
|
|
632
632
|
YAML: function(e, i, s) {
|
|
633
633
|
var n, a, r;
|
|
634
|
-
e.version !== null && v(e, "duplication of %YAML directive"), s.length !== 1 && v(e, "YAML directive accepts exactly one argument"), n = /^([0-9]+)\.([0-9]+)$/.exec(s[0]), n === null && v(e, "ill-formed argument of the YAML directive"), a = parseInt(n[1], 10), r = parseInt(n[2], 10), a !== 1 && v(e, "unacceptable YAML version of the document"), e.version = s[0], e.checkLineBreaks = r < 2, r !== 1 && r !== 2 &&
|
|
634
|
+
e.version !== null && v(e, "duplication of %YAML directive"), s.length !== 1 && v(e, "YAML directive accepts exactly one argument"), n = /^([0-9]+)\.([0-9]+)$/.exec(s[0]), n === null && v(e, "ill-formed argument of the YAML directive"), a = parseInt(n[1], 10), r = parseInt(n[2], 10), a !== 1 && v(e, "unacceptable YAML version of the document"), e.version = s[0], e.checkLineBreaks = r < 2, r !== 1 && r !== 2 && be(e, "unsupported YAML version of the document");
|
|
635
635
|
},
|
|
636
636
|
TAG: function(e, i, s) {
|
|
637
637
|
var n, a;
|
|
@@ -692,7 +692,7 @@ function I(t, e, i) {
|
|
|
692
692
|
else
|
|
693
693
|
break;
|
|
694
694
|
}
|
|
695
|
-
return i !== -1 && s !== 0 && t.lineIndent < i &&
|
|
695
|
+
return i !== -1 && s !== 0 && t.lineIndent < i && be(t, "deficient indentation"), s;
|
|
696
696
|
}
|
|
697
697
|
function we(t) {
|
|
698
698
|
var e = t.position, i;
|
|
@@ -776,7 +776,7 @@ function Gs(t, e) {
|
|
|
776
776
|
for (t.anchor !== null && (t.anchorMap[t.anchor] = o), b = t.input.charCodeAt(++t.position); b !== 0; ) {
|
|
777
777
|
if (I(t, !0, e), b = t.input.charCodeAt(t.position), b === p)
|
|
778
778
|
return t.position++, t.tag = r, t.anchor = l, t.kind = g ? "mapping" : "sequence", t.result = o, !0;
|
|
779
|
-
i ? b === 44 && v(t, "expected the node content, but found ','") : v(t, "missed comma between flow collection entries"), w = C = F = null, u = f = !1, b === 63 && (d = t.input.charCodeAt(t.position + 1), O(d) && (u = f = !0, t.position++, I(t, !0, e))), s = t.line, n = t.lineStart, a = t.position, J(t, e,
|
|
779
|
+
i ? b === 44 && v(t, "expected the node content, but found ','") : v(t, "missed comma between flow collection entries"), w = C = F = null, u = f = !1, b === 63 && (d = t.input.charCodeAt(t.position + 1), O(d) && (u = f = !0, t.position++, I(t, !0, e))), s = t.line, n = t.lineStart, a = t.position, J(t, e, me, !1, !0), w = t.tag, C = t.result, I(t, !0, e), b = t.input.charCodeAt(t.position), (f || t.line === s) && b === 58 && (u = !0, b = t.input.charCodeAt(++t.position), I(t, !0, e), J(t, e, me, !1, !0), F = t.result), g ? K(t, o, x, w, C, F, s, n, a) : u ? o.push(K(t, null, x, w, C, F, s, n, a)) : o.push(C), I(t, !0, e), b = t.input.charCodeAt(t.position), b === 44 ? (i = !0, b = t.input.charCodeAt(++t.position)) : i = !1;
|
|
780
780
|
}
|
|
781
781
|
v(t, "unexpected end of the stream within a flow collection");
|
|
782
782
|
}
|
|
@@ -865,7 +865,7 @@ function Ks(t, e, i) {
|
|
|
865
865
|
else
|
|
866
866
|
return t.tag = d, t.anchor = p, !0;
|
|
867
867
|
}
|
|
868
|
-
if ((t.line === a || t.lineIndent > e) && (w && (r = t.line, o = t.lineStart, l = t.position), J(t, e,
|
|
868
|
+
if ((t.line === a || t.lineIndent > e) && (w && (r = t.line, o = t.lineStart, l = t.position), J(t, e, ge, !0, n) && (w ? x = t.result : C = t.result), w || (K(t, u, f, g, x, C, r, o, l), g = x = C = null), I(t, !0, -1), b = t.input.charCodeAt(t.position)), (t.line === a || t.lineIndent > e) && b !== 0)
|
|
869
869
|
v(t, "bad indentation of a mapping entry");
|
|
870
870
|
else if (t.lineIndent < e)
|
|
871
871
|
break;
|
|
@@ -909,10 +909,10 @@ function Xs(t) {
|
|
|
909
909
|
}
|
|
910
910
|
function J(t, e, i, s, n) {
|
|
911
911
|
var a, r, o, l = 1, d = !1, p = !1, u, f, g, x, C, w;
|
|
912
|
-
if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, a = r = o =
|
|
912
|
+
if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, a = r = o = ge === i || Gt === i, s && I(t, !0, -1) && (d = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1)
|
|
913
913
|
for (; Qs(t) || Js(t); )
|
|
914
914
|
I(t, !0, -1) ? (d = !0, o = a, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)) : o = !1;
|
|
915
|
-
if (o && (o = d || n), (l === 1 ||
|
|
915
|
+
if (o && (o = d || n), (l === 1 || ge === i) && (me === i || Yt === i ? C = e : C = e + 1, w = t.position - t.lineStart, l === 1 ? o && (rt(t, w) || Ks(t, w, C)) || Gs(t, C) ? p = !0 : (r && Zs(t, C) || Ws(t, C) || Ys(t, C) ? p = !0 : Xs(t) ? (p = !0, (t.tag !== null || t.anchor !== null) && v(t, "alias node should not have any properties")) : qs(t, C, me === i) && (p = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (p = o && rt(t, w))), t.tag === null)
|
|
916
916
|
t.anchor !== null && (t.anchorMap[t.anchor] = t.result);
|
|
917
917
|
else if (t.tag === "?") {
|
|
918
918
|
for (t.result !== null && t.kind !== "scalar" && v(t, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + t.kind + '"'), u = 0, f = t.implicitTypes.length; u < f; u += 1)
|
|
@@ -952,9 +952,9 @@ function en(t) {
|
|
|
952
952
|
r = t.input.charCodeAt(++t.position);
|
|
953
953
|
n.push(t.input.slice(i, t.position));
|
|
954
954
|
}
|
|
955
|
-
r !== 0 && Ue(t), U.call(nt, s) ? nt[s](t, s, n) :
|
|
955
|
+
r !== 0 && Ue(t), U.call(nt, s) ? nt[s](t, s, n) : be(t, 'unknown document directive "' + s + '"');
|
|
956
956
|
}
|
|
957
|
-
if (I(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, I(t, !0, -1)) : a && v(t, "directives end mark is expected"), J(t, t.lineIndent - 1,
|
|
957
|
+
if (I(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, I(t, !0, -1)) : a && v(t, "directives end mark is expected"), J(t, t.lineIndent - 1, ge, !1, !0), I(t, !0, -1), t.checkLineBreaks && zs.test(t.input.slice(e, t.position)) && be(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && we(t)) {
|
|
958
958
|
t.input.charCodeAt(t.position) === 46 && (t.position += 3, I(t, !0, -1));
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
@@ -986,28 +986,28 @@ function sn(t, e) {
|
|
|
986
986
|
if (i.length !== 0) {
|
|
987
987
|
if (i.length === 1)
|
|
988
988
|
return i[0];
|
|
989
|
-
throw new
|
|
989
|
+
throw new D("expected a single document in the stream, but found more");
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
var nn = tn, an = sn, ii = {
|
|
993
993
|
loadAll: nn,
|
|
994
994
|
load: an
|
|
995
|
-
}, si = Object.prototype.toString, ni = Object.prototype.hasOwnProperty, We = 65279, rn = 9,
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
995
|
+
}, si = Object.prototype.toString, ni = Object.prototype.hasOwnProperty, We = 65279, rn = 9, oe = 10, on = 13, ln = 32, cn = 33, dn = 34, He = 35, hn = 37, un = 38, pn = 39, fn = 42, ai = 44, mn = 45, ve = 58, gn = 61, bn = 62, vn = 63, xn = 64, ri = 91, oi = 93, yn = 96, li = 123, Cn = 124, ci = 125, N = {};
|
|
996
|
+
N[0] = "\\0";
|
|
997
|
+
N[7] = "\\a";
|
|
998
|
+
N[8] = "\\b";
|
|
999
|
+
N[9] = "\\t";
|
|
1000
|
+
N[10] = "\\n";
|
|
1001
|
+
N[11] = "\\v";
|
|
1002
|
+
N[12] = "\\f";
|
|
1003
|
+
N[13] = "\\r";
|
|
1004
|
+
N[27] = "\\e";
|
|
1005
|
+
N[34] = '\\"';
|
|
1006
|
+
N[92] = "\\\\";
|
|
1007
|
+
N[133] = "\\N";
|
|
1008
|
+
N[160] = "\\_";
|
|
1009
|
+
N[8232] = "\\L";
|
|
1010
|
+
N[8233] = "\\P";
|
|
1011
1011
|
var kn = [
|
|
1012
1012
|
"y",
|
|
1013
1013
|
"Y",
|
|
@@ -1042,12 +1042,12 @@ function An(t) {
|
|
|
1042
1042
|
else if (t <= 4294967295)
|
|
1043
1043
|
i = "U", s = 8;
|
|
1044
1044
|
else
|
|
1045
|
-
throw new
|
|
1045
|
+
throw new D("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1046
1046
|
return "\\" + i + L.repeat("0", s - e.length) + e;
|
|
1047
1047
|
}
|
|
1048
|
-
var In = 1,
|
|
1048
|
+
var In = 1, le = 2;
|
|
1049
1049
|
function Sn(t) {
|
|
1050
|
-
this.schema = t.schema || je, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = L.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = En(this.schema, t.styles || null), this.sortKeys = t.sortKeys || !1, this.lineWidth = t.lineWidth || 80, this.noRefs = t.noRefs || !1, this.noCompatMode = t.noCompatMode || !1, this.condenseFlow = t.condenseFlow || !1, this.quotingType = t.quotingType === '"' ?
|
|
1050
|
+
this.schema = t.schema || je, this.indent = Math.max(1, t.indent || 2), this.noArrayIndent = t.noArrayIndent || !1, this.skipInvalid = t.skipInvalid || !1, this.flowLevel = L.isNothing(t.flowLevel) ? -1 : t.flowLevel, this.styleMap = En(this.schema, t.styles || null), this.sortKeys = t.sortKeys || !1, this.lineWidth = t.lineWidth || 80, this.noRefs = t.noRefs || !1, this.noCompatMode = t.noCompatMode || !1, this.condenseFlow = t.condenseFlow || !1, this.quotingType = t.quotingType === '"' ? le : In, this.forceQuotes = t.forceQuotes || !1, this.replacer = typeof t.replacer == "function" ? t.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
1051
1051
|
}
|
|
1052
1052
|
function ot(t, e) {
|
|
1053
1053
|
for (var i = L.repeat(" ", e), s = 0, n = -1, a = "", r, o = t.length; s < o; )
|
|
@@ -1067,32 +1067,32 @@ function Ln(t, e) {
|
|
|
1067
1067
|
return !0;
|
|
1068
1068
|
return !1;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function xe(t) {
|
|
1071
1071
|
return t === ln || t === rn;
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function ce(t) {
|
|
1074
1074
|
return 32 <= t && t <= 126 || 161 <= t && t <= 55295 && t !== 8232 && t !== 8233 || 57344 <= t && t <= 65533 && t !== We || 65536 <= t && t <= 1114111;
|
|
1075
1075
|
}
|
|
1076
1076
|
function lt(t) {
|
|
1077
|
-
return
|
|
1077
|
+
return ce(t) && t !== We && t !== on && t !== oe;
|
|
1078
1078
|
}
|
|
1079
1079
|
function ct(t, e, i) {
|
|
1080
|
-
var s = lt(t), n = s && !
|
|
1080
|
+
var s = lt(t), n = s && !xe(t);
|
|
1081
1081
|
return (
|
|
1082
1082
|
// ns-plain-safe
|
|
1083
1083
|
(i ? (
|
|
1084
1084
|
// c = flow-in
|
|
1085
1085
|
s
|
|
1086
|
-
) : s && t !== ai && t !== ri && t !== oi && t !== li && t !== ci) && t !== He && !(e ===
|
|
1086
|
+
) : s && t !== ai && t !== ri && t !== oi && t !== li && t !== ci) && t !== He && !(e === ve && !n) || lt(e) && !xe(e) && t === He || e === ve && n
|
|
1087
1087
|
);
|
|
1088
1088
|
}
|
|
1089
1089
|
function $n(t) {
|
|
1090
|
-
return
|
|
1090
|
+
return ce(t) && t !== We && !xe(t) && t !== mn && t !== vn && t !== ve && t !== ai && t !== ri && t !== oi && t !== li && t !== ci && t !== He && t !== un && t !== fn && t !== cn && t !== Cn && t !== gn && t !== bn && t !== pn && t !== dn && t !== hn && t !== xn && t !== yn;
|
|
1091
1091
|
}
|
|
1092
1092
|
function _n(t) {
|
|
1093
|
-
return !
|
|
1093
|
+
return !xe(t) && t !== ve;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function ae(t, e) {
|
|
1096
1096
|
var i = t.charCodeAt(e), s;
|
|
1097
1097
|
return i >= 55296 && i <= 56319 && e + 1 < t.length && (s = t.charCodeAt(e + 1), s >= 56320 && s <= 57343) ? (i - 55296) * 1024 + s - 56320 + 65536 : i;
|
|
1098
1098
|
}
|
|
@@ -1102,32 +1102,32 @@ function di(t) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
var hi = 1, Be = 2, ui = 3, pi = 4, G = 5;
|
|
1104
1104
|
function Nn(t, e, i, s, n, a, r, o) {
|
|
1105
|
-
var l, d = 0, p = null, u = !1, f = !1, g = s !== -1, x = -1, C = $n(
|
|
1105
|
+
var l, d = 0, p = null, u = !1, f = !1, g = s !== -1, x = -1, C = $n(ae(t, 0)) && _n(ae(t, t.length - 1));
|
|
1106
1106
|
if (e || r)
|
|
1107
1107
|
for (l = 0; l < t.length; d >= 65536 ? l += 2 : l++) {
|
|
1108
|
-
if (d =
|
|
1108
|
+
if (d = ae(t, l), !ce(d))
|
|
1109
1109
|
return G;
|
|
1110
1110
|
C = C && ct(d, p, o), p = d;
|
|
1111
1111
|
}
|
|
1112
1112
|
else {
|
|
1113
1113
|
for (l = 0; l < t.length; d >= 65536 ? l += 2 : l++) {
|
|
1114
|
-
if (d =
|
|
1114
|
+
if (d = ae(t, l), d === oe)
|
|
1115
1115
|
u = !0, g && (f = f || // Foldable line = too long, and not more-indented.
|
|
1116
1116
|
l - x - 1 > s && t[x + 1] !== " ", x = l);
|
|
1117
|
-
else if (!
|
|
1117
|
+
else if (!ce(d))
|
|
1118
1118
|
return G;
|
|
1119
1119
|
C = C && ct(d, p, o), p = d;
|
|
1120
1120
|
}
|
|
1121
1121
|
f = f || g && l - x - 1 > s && t[x + 1] !== " ";
|
|
1122
1122
|
}
|
|
1123
|
-
return !u && !f ? C && !r && !n(t) ? hi : a ===
|
|
1123
|
+
return !u && !f ? C && !r && !n(t) ? hi : a === le ? G : Be : i > 9 && di(t) ? G : r ? a === le ? G : Be : f ? pi : ui;
|
|
1124
1124
|
}
|
|
1125
1125
|
function Tn(t, e, i, s, n) {
|
|
1126
1126
|
t.dump = (function() {
|
|
1127
1127
|
if (e.length === 0)
|
|
1128
|
-
return t.quotingType ===
|
|
1128
|
+
return t.quotingType === le ? '""' : "''";
|
|
1129
1129
|
if (!t.noCompatMode && (kn.indexOf(e) !== -1 || wn.test(e)))
|
|
1130
|
-
return t.quotingType ===
|
|
1130
|
+
return t.quotingType === le ? '"' + e + '"' : "'" + e + "'";
|
|
1131
1131
|
var a = t.indent * Math.max(1, i), r = t.lineWidth === -1 ? -1 : Math.max(Math.min(t.lineWidth, 40), t.lineWidth - a), o = s || t.flowLevel > -1 && i >= t.flowLevel;
|
|
1132
1132
|
function l(d) {
|
|
1133
1133
|
return Ln(t, d);
|
|
@@ -1153,7 +1153,7 @@ function Tn(t, e, i, s, n) {
|
|
|
1153
1153
|
case G:
|
|
1154
1154
|
return '"' + Dn(e) + '"';
|
|
1155
1155
|
default:
|
|
1156
|
-
throw new
|
|
1156
|
+
throw new D("impossible error: invalid scalar style");
|
|
1157
1157
|
}
|
|
1158
1158
|
})();
|
|
1159
1159
|
}
|
|
@@ -1193,7 +1193,7 @@ function ut(t, e) {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
function Dn(t) {
|
|
1195
1195
|
for (var e = "", i = 0, s, n = 0; n < t.length; i >= 65536 ? n += 2 : n++)
|
|
1196
|
-
i =
|
|
1196
|
+
i = ae(t, n), s = N[i], !s && ce(i) ? (e += t[n], i >= 65536 && (e += t[n + 1])) : e += s || An(i);
|
|
1197
1197
|
return e;
|
|
1198
1198
|
}
|
|
1199
1199
|
function Fn(t, e, i) {
|
|
@@ -1205,7 +1205,7 @@ function Fn(t, e, i) {
|
|
|
1205
1205
|
function pt(t, e, i, s) {
|
|
1206
1206
|
var n = "", a = t.tag, r, o, l;
|
|
1207
1207
|
for (r = 0, o = i.length; r < o; r += 1)
|
|
1208
|
-
l = i[r], t.replacer && (l = t.replacer.call(i, String(r), l)), (V(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && V(t, e + 1, null, !0, !0, !1, !0)) && ((!s || n !== "") && (n += ze(t, e)), t.dump &&
|
|
1208
|
+
l = i[r], t.replacer && (l = t.replacer.call(i, String(r), l)), (V(t, e + 1, l, !0, !0, !1, !0) || typeof l > "u" && V(t, e + 1, null, !0, !0, !1, !0)) && ((!s || n !== "") && (n += ze(t, e)), t.dump && oe === t.dump.charCodeAt(0) ? n += "-" : n += "- ", n += t.dump);
|
|
1209
1209
|
t.tag = a, t.dump = n || "[]";
|
|
1210
1210
|
}
|
|
1211
1211
|
function On(t, e, i) {
|
|
@@ -1221,9 +1221,9 @@ function Hn(t, e, i, s) {
|
|
|
1221
1221
|
else if (typeof t.sortKeys == "function")
|
|
1222
1222
|
r.sort(t.sortKeys);
|
|
1223
1223
|
else if (t.sortKeys)
|
|
1224
|
-
throw new
|
|
1224
|
+
throw new D("sortKeys must be a boolean or a function");
|
|
1225
1225
|
for (o = 0, l = r.length; o < l; o += 1)
|
|
1226
|
-
f = "", (!s || n !== "") && (f += ze(t, e)), d = r[o], p = i[d], t.replacer && (p = t.replacer.call(i, d, p)), V(t, e + 1, d, !0, !0, !0) && (u = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, u && (t.dump &&
|
|
1226
|
+
f = "", (!s || n !== "") && (f += ze(t, e)), d = r[o], p = i[d], t.replacer && (p = t.replacer.call(i, d, p)), V(t, e + 1, d, !0, !0, !0) && (u = t.tag !== null && t.tag !== "?" || t.dump && t.dump.length > 1024, u && (t.dump && oe === t.dump.charCodeAt(0) ? f += "?" : f += "? "), f += t.dump, u && (f += ze(t, e)), V(t, e + 1, p, !0, u) && (t.dump && oe === t.dump.charCodeAt(0) ? f += ":" : f += ": ", f += t.dump, n += f));
|
|
1227
1227
|
t.tag = a, t.dump = n || "{}";
|
|
1228
1228
|
}
|
|
1229
1229
|
function ft(t, e, i) {
|
|
@@ -1236,7 +1236,7 @@ function ft(t, e, i) {
|
|
|
1236
1236
|
else if (ni.call(o.represent, l))
|
|
1237
1237
|
s = o.represent[l](e, l);
|
|
1238
1238
|
else
|
|
1239
|
-
throw new
|
|
1239
|
+
throw new D("!<" + o.tag + '> tag resolver accepts not "' + l + '" style');
|
|
1240
1240
|
t.dump = s;
|
|
1241
1241
|
}
|
|
1242
1242
|
return !0;
|
|
@@ -1261,7 +1261,7 @@ function V(t, e, i, s, n, a, r) {
|
|
|
1261
1261
|
if (o === "[object Undefined]")
|
|
1262
1262
|
return !1;
|
|
1263
1263
|
if (t.skipInvalid) return !1;
|
|
1264
|
-
throw new
|
|
1264
|
+
throw new D("unacceptable kind of an object to dump " + o);
|
|
1265
1265
|
}
|
|
1266
1266
|
t.tag !== null && t.tag !== "?" && (d = encodeURI(
|
|
1267
1267
|
t.tag[0] === "!" ? t.tag.slice(1) : t.tag
|
|
@@ -1303,7 +1303,7 @@ function Ye(t, e) {
|
|
|
1303
1303
|
throw new Error("Function yaml." + t + " is removed in js-yaml 4. Use yaml." + e + " instead, which is now safe by default.");
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
var Vn = $, jn = Lt, Un = Tt, qn = Ht, Wn = zt, Yn = je, fi = ii.load, Gn = ii.loadAll, Zn = Pn.dump, Kn =
|
|
1306
|
+
var Vn = $, jn = Lt, Un = Tt, qn = Ht, Wn = zt, Yn = je, fi = ii.load, Gn = ii.loadAll, Zn = Pn.dump, Kn = D, Qn = {
|
|
1307
1307
|
binary: jt,
|
|
1308
1308
|
float: Ot,
|
|
1309
1309
|
map: Nt,
|
|
@@ -1333,50 +1333,61 @@ var Vn = $, jn = Lt, Un = Tt, qn = Ht, Wn = zt, Yn = je, fi = ii.load, Gn = ii.l
|
|
|
1333
1333
|
safeLoadAll: Xn,
|
|
1334
1334
|
safeDump: ea
|
|
1335
1335
|
};
|
|
1336
|
-
const
|
|
1337
|
-
// All placeholder types have been implemented
|
|
1338
|
-
], gt = ["submit", "navigate", "custom", "reset"], bt = ["field_group", "action_group", "layout", "template"];
|
|
1336
|
+
const gt = ["submit", "navigate", "custom", "reset"], bt = ["field_group", "action_group", "layout", "template"];
|
|
1339
1337
|
function k(t) {
|
|
1340
1338
|
return t != null;
|
|
1341
1339
|
}
|
|
1342
|
-
function
|
|
1340
|
+
function _(t) {
|
|
1343
1341
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
1344
1342
|
}
|
|
1345
1343
|
function S(t) {
|
|
1346
1344
|
return Array.isArray(t);
|
|
1347
1345
|
}
|
|
1348
|
-
function
|
|
1346
|
+
function X(t) {
|
|
1349
1347
|
return typeof t == "string";
|
|
1350
1348
|
}
|
|
1349
|
+
const ta = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
1351
1350
|
function Ee(t) {
|
|
1352
|
-
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1351
|
+
const e = t.toLowerCase().replace(/[()()]/g, "").replace(/[・]/g, "_").replace(/\s+/g, "_").replace(/[^a-z0-9_\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf]/g, "");
|
|
1352
|
+
return e ? ta.has(e) ? `_${e}` : e : "_unnamed";
|
|
1353
|
+
}
|
|
1354
|
+
function ia() {
|
|
1355
|
+
let t = 0;
|
|
1356
|
+
return () => (t++, `__auto_field_${t}`);
|
|
1357
|
+
}
|
|
1358
|
+
function ee(t, e) {
|
|
1359
|
+
var o, l;
|
|
1360
|
+
const i = t.id ?? t.field_name ?? e(), s = t.label ?? t.field_name ?? i;
|
|
1361
|
+
let n;
|
|
1362
|
+
t.options && (S(t.options) && t.options.length > 0 ? n = t.options.map((d) => {
|
|
1363
|
+
if (X(d))
|
|
1364
|
+
return { value: d, label: d };
|
|
1365
|
+
if (_(d) && k(d.value))
|
|
1366
|
+
return {
|
|
1367
|
+
...d,
|
|
1368
|
+
label: d.label ?? d.value
|
|
1369
|
+
};
|
|
1370
|
+
const p = String(d);
|
|
1371
|
+
return { value: p, label: p };
|
|
1372
|
+
}) : X(t.options) && (n = t.options));
|
|
1373
|
+
const a = {
|
|
1374
|
+
id: i,
|
|
1375
|
+
label: s,
|
|
1365
1376
|
description: t.description,
|
|
1366
1377
|
required: t.required,
|
|
1367
1378
|
placeholder: t.placeholder,
|
|
1368
1379
|
...t.visible_when ? { visible_when: t.visible_when } : {}
|
|
1369
|
-
},
|
|
1370
|
-
switch (
|
|
1380
|
+
}, r = t.type;
|
|
1381
|
+
switch (r) {
|
|
1371
1382
|
case "text":
|
|
1372
1383
|
return {
|
|
1373
|
-
...
|
|
1384
|
+
...a,
|
|
1374
1385
|
type: "text",
|
|
1375
1386
|
input_type: t.input_type
|
|
1376
1387
|
};
|
|
1377
1388
|
case "number":
|
|
1378
1389
|
return {
|
|
1379
|
-
...
|
|
1390
|
+
...a,
|
|
1380
1391
|
type: "number",
|
|
1381
1392
|
min: t.min,
|
|
1382
1393
|
max: t.max,
|
|
@@ -1384,76 +1395,76 @@ function le(t) {
|
|
|
1384
1395
|
};
|
|
1385
1396
|
case "textarea":
|
|
1386
1397
|
return {
|
|
1387
|
-
...
|
|
1398
|
+
...a,
|
|
1388
1399
|
type: "textarea",
|
|
1389
1400
|
rows: t.rows
|
|
1390
1401
|
};
|
|
1391
1402
|
case "select":
|
|
1392
1403
|
return {
|
|
1393
|
-
...
|
|
1404
|
+
...a,
|
|
1394
1405
|
type: "select",
|
|
1395
|
-
options:
|
|
1406
|
+
options: n ?? []
|
|
1396
1407
|
};
|
|
1397
1408
|
case "multi_select":
|
|
1398
1409
|
return {
|
|
1399
|
-
...
|
|
1410
|
+
...a,
|
|
1400
1411
|
type: "multi_select",
|
|
1401
|
-
options:
|
|
1412
|
+
options: n ?? []
|
|
1402
1413
|
};
|
|
1403
1414
|
case "radio_group":
|
|
1404
1415
|
return {
|
|
1405
|
-
...
|
|
1416
|
+
...a,
|
|
1406
1417
|
type: "radio_group",
|
|
1407
|
-
options:
|
|
1418
|
+
options: n ?? []
|
|
1408
1419
|
};
|
|
1409
1420
|
case "checkbox_group":
|
|
1410
1421
|
return {
|
|
1411
|
-
...
|
|
1422
|
+
...a,
|
|
1412
1423
|
type: "checkbox_group",
|
|
1413
|
-
options:
|
|
1424
|
+
options: n ?? []
|
|
1414
1425
|
};
|
|
1415
1426
|
case "date_picker":
|
|
1416
1427
|
return {
|
|
1417
|
-
...
|
|
1428
|
+
...a,
|
|
1418
1429
|
type: "date_picker"
|
|
1419
1430
|
};
|
|
1420
1431
|
case "time_picker":
|
|
1421
1432
|
return {
|
|
1422
|
-
...
|
|
1433
|
+
...a,
|
|
1423
1434
|
type: "time_picker"
|
|
1424
1435
|
};
|
|
1425
1436
|
case "duration_picker":
|
|
1426
1437
|
return {
|
|
1427
|
-
...
|
|
1438
|
+
...a,
|
|
1428
1439
|
type: "duration_picker",
|
|
1429
1440
|
units: t.units
|
|
1430
1441
|
};
|
|
1431
1442
|
case "duration_input":
|
|
1432
1443
|
return {
|
|
1433
|
-
...
|
|
1444
|
+
...a,
|
|
1434
1445
|
type: "duration_input",
|
|
1435
1446
|
display_unit: t.unit
|
|
1436
1447
|
};
|
|
1437
1448
|
case "file_upload":
|
|
1438
1449
|
return {
|
|
1439
|
-
...
|
|
1450
|
+
...a,
|
|
1440
1451
|
type: "file_upload",
|
|
1441
|
-
accept: ((
|
|
1452
|
+
accept: ((o = t.accepted_types) == null ? void 0 : o.split(",").map((d) => d.trim())) ?? t.accept,
|
|
1442
1453
|
multiple: t.multiple
|
|
1443
1454
|
};
|
|
1444
1455
|
case "repeater":
|
|
1445
1456
|
return {
|
|
1446
|
-
...
|
|
1457
|
+
...a,
|
|
1447
1458
|
type: "repeater",
|
|
1448
|
-
item_fields: ((
|
|
1459
|
+
item_fields: ((l = t.item_fields) == null ? void 0 : l.map((d) => ee(d, e))) ?? []
|
|
1449
1460
|
};
|
|
1450
1461
|
case "data_table": {
|
|
1451
|
-
const
|
|
1462
|
+
const d = t.data, p = d == null ? void 0 : d.map((u, f) => k(u.id) ? u : { ...u, id: `row-${f}` });
|
|
1452
1463
|
return {
|
|
1453
|
-
...
|
|
1464
|
+
...a,
|
|
1454
1465
|
type: "data_table",
|
|
1455
1466
|
columns: t.columns ?? [],
|
|
1456
|
-
data:
|
|
1467
|
+
data: p,
|
|
1457
1468
|
selection: t.selection,
|
|
1458
1469
|
row_actions: t.row_actions,
|
|
1459
1470
|
default_sort: t.default_sort,
|
|
@@ -1470,7 +1481,7 @@ function le(t) {
|
|
|
1470
1481
|
}
|
|
1471
1482
|
case "google_map_embed":
|
|
1472
1483
|
return {
|
|
1473
|
-
...
|
|
1484
|
+
...a,
|
|
1474
1485
|
type: "google_map_embed",
|
|
1475
1486
|
height: t.height,
|
|
1476
1487
|
width: t.width,
|
|
@@ -1479,7 +1490,7 @@ function le(t) {
|
|
|
1479
1490
|
};
|
|
1480
1491
|
case "photo_manager":
|
|
1481
1492
|
return {
|
|
1482
|
-
...
|
|
1493
|
+
...a,
|
|
1483
1494
|
type: "photo_manager",
|
|
1484
1495
|
photos: t.photos,
|
|
1485
1496
|
max_photos: t.max_photos,
|
|
@@ -1489,7 +1500,7 @@ function le(t) {
|
|
|
1489
1500
|
};
|
|
1490
1501
|
case "image_uploader":
|
|
1491
1502
|
return {
|
|
1492
|
-
...
|
|
1503
|
+
...a,
|
|
1493
1504
|
type: "image_uploader",
|
|
1494
1505
|
accepted_formats: t.accepted_formats,
|
|
1495
1506
|
max_file_size: t.max_file_size,
|
|
@@ -1498,29 +1509,29 @@ function le(t) {
|
|
|
1498
1509
|
};
|
|
1499
1510
|
case "browser":
|
|
1500
1511
|
return {
|
|
1501
|
-
...
|
|
1512
|
+
...a,
|
|
1502
1513
|
type: "browser",
|
|
1503
|
-
items: t.items ?? [],
|
|
1504
|
-
default: t.default,
|
|
1514
|
+
items: t.browser_items ?? t.items ?? [],
|
|
1515
|
+
default: t.default_value ?? t.default,
|
|
1505
1516
|
maxColumns: t.max_columns,
|
|
1506
1517
|
height: t.height
|
|
1507
1518
|
};
|
|
1508
1519
|
case "calendar":
|
|
1509
1520
|
return {
|
|
1510
|
-
...
|
|
1521
|
+
...a,
|
|
1511
1522
|
type: "calendar",
|
|
1512
1523
|
default: t.default,
|
|
1513
|
-
from: t.from,
|
|
1514
|
-
to: t.to,
|
|
1524
|
+
from: t.calendar_from ?? t.from,
|
|
1525
|
+
to: t.calendar_to ?? t.to,
|
|
1515
1526
|
weekStartsOn: t.week_starts_on,
|
|
1516
1527
|
locale: t.locale
|
|
1517
1528
|
};
|
|
1518
1529
|
case "combobox":
|
|
1519
1530
|
return {
|
|
1520
|
-
...
|
|
1531
|
+
...a,
|
|
1521
1532
|
type: "combobox",
|
|
1522
1533
|
mode: t.mode,
|
|
1523
|
-
options:
|
|
1534
|
+
options: n,
|
|
1524
1535
|
searchable: t.searchable,
|
|
1525
1536
|
async_loader: t.async_loader,
|
|
1526
1537
|
min_search_length: t.min_search_length,
|
|
@@ -1530,7 +1541,7 @@ function le(t) {
|
|
|
1530
1541
|
};
|
|
1531
1542
|
case "checkbox":
|
|
1532
1543
|
return {
|
|
1533
|
-
...
|
|
1544
|
+
...a,
|
|
1534
1545
|
type: "checkbox",
|
|
1535
1546
|
checked_label: t.checked_label,
|
|
1536
1547
|
unchecked_label: t.unchecked_label,
|
|
@@ -1540,7 +1551,7 @@ function le(t) {
|
|
|
1540
1551
|
};
|
|
1541
1552
|
case "toggle":
|
|
1542
1553
|
return {
|
|
1543
|
-
...
|
|
1554
|
+
...a,
|
|
1544
1555
|
type: "toggle",
|
|
1545
1556
|
checked_label: t.checked_label,
|
|
1546
1557
|
unchecked_label: t.unchecked_label,
|
|
@@ -1550,7 +1561,7 @@ function le(t) {
|
|
|
1550
1561
|
};
|
|
1551
1562
|
case "badge":
|
|
1552
1563
|
return {
|
|
1553
|
-
...
|
|
1564
|
+
...a,
|
|
1554
1565
|
type: "badge",
|
|
1555
1566
|
color: t.color,
|
|
1556
1567
|
size: t.size,
|
|
@@ -1561,7 +1572,7 @@ function le(t) {
|
|
|
1561
1572
|
};
|
|
1562
1573
|
case "heading":
|
|
1563
1574
|
return {
|
|
1564
|
-
...
|
|
1575
|
+
...a,
|
|
1565
1576
|
type: "heading",
|
|
1566
1577
|
level: t.level ?? 2,
|
|
1567
1578
|
text: t.label ?? t.text ?? "",
|
|
@@ -1572,7 +1583,7 @@ function le(t) {
|
|
|
1572
1583
|
};
|
|
1573
1584
|
case "tooltip":
|
|
1574
1585
|
return {
|
|
1575
|
-
...
|
|
1586
|
+
...a,
|
|
1576
1587
|
type: "tooltip",
|
|
1577
1588
|
content: t.content ?? "",
|
|
1578
1589
|
position: t.position,
|
|
@@ -1583,7 +1594,7 @@ function le(t) {
|
|
|
1583
1594
|
};
|
|
1584
1595
|
case "pagination":
|
|
1585
1596
|
return {
|
|
1586
|
-
...
|
|
1597
|
+
...a,
|
|
1587
1598
|
type: "pagination",
|
|
1588
1599
|
total_items: t.total_items ?? 0,
|
|
1589
1600
|
current_page: t.current_page,
|
|
@@ -1598,7 +1609,7 @@ function le(t) {
|
|
|
1598
1609
|
};
|
|
1599
1610
|
case "float_area":
|
|
1600
1611
|
return {
|
|
1601
|
-
...
|
|
1612
|
+
...a,
|
|
1602
1613
|
type: "float_area",
|
|
1603
1614
|
position: t.position,
|
|
1604
1615
|
show_shadow: t.show_shadow,
|
|
@@ -1613,7 +1624,7 @@ function le(t) {
|
|
|
1613
1624
|
};
|
|
1614
1625
|
case "loader":
|
|
1615
1626
|
return {
|
|
1616
|
-
...
|
|
1627
|
+
...a,
|
|
1617
1628
|
type: "loader",
|
|
1618
1629
|
size: t.loader_size ?? t.size,
|
|
1619
1630
|
loaderType: t.loader_type ?? t.loaderType,
|
|
@@ -1623,19 +1634,11 @@ function le(t) {
|
|
|
1623
1634
|
};
|
|
1624
1635
|
default:
|
|
1625
1636
|
return {
|
|
1626
|
-
...
|
|
1627
|
-
type:
|
|
1637
|
+
...a,
|
|
1638
|
+
type: r
|
|
1628
1639
|
};
|
|
1629
1640
|
}
|
|
1630
1641
|
}
|
|
1631
|
-
function ia(t) {
|
|
1632
|
-
const e = [];
|
|
1633
|
-
for (const i of t)
|
|
1634
|
-
if (i.input_fields)
|
|
1635
|
-
for (const s of i.input_fields)
|
|
1636
|
-
e.push(le(s));
|
|
1637
|
-
return e;
|
|
1638
|
-
}
|
|
1639
1642
|
function sa(t, e, i) {
|
|
1640
1643
|
const s = t.map((r, o) => ({
|
|
1641
1644
|
id: `col_${o}`,
|
|
@@ -1677,13 +1680,11 @@ function sa(t, e, i) {
|
|
|
1677
1680
|
striped: !0
|
|
1678
1681
|
};
|
|
1679
1682
|
}
|
|
1680
|
-
function na(t) {
|
|
1681
|
-
var
|
|
1683
|
+
function na(t, e) {
|
|
1684
|
+
var i;
|
|
1682
1685
|
return {
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
publish_toggle: t.publish_toggle,
|
|
1686
|
-
input_fields: (e = t.input_fields) == null ? void 0 : e.map(le)
|
|
1686
|
+
...t,
|
|
1687
|
+
input_fields: (i = t.input_fields) == null ? void 0 : i.map((s) => ee(s, e))
|
|
1687
1688
|
};
|
|
1688
1689
|
}
|
|
1689
1690
|
function aa(t) {
|
|
@@ -1754,138 +1755,139 @@ function ra(t) {
|
|
|
1754
1755
|
items: e
|
|
1755
1756
|
};
|
|
1756
1757
|
}
|
|
1757
|
-
function
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1758
|
+
function oa(t, e) {
|
|
1759
|
+
return {
|
|
1760
|
+
...t,
|
|
1761
|
+
steps: t.steps.map((i) => ({
|
|
1762
|
+
...i,
|
|
1763
|
+
fields: (i.fields ?? []).map((s) => ee(s, e))
|
|
1764
|
+
}))
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
function vt(t, e) {
|
|
1768
|
+
const i = t.title ?? t.name ?? "Untitled";
|
|
1769
|
+
let s, n;
|
|
1770
|
+
if (t.sections && t.sections.length > 0) {
|
|
1771
|
+
s = t.sections.map((r) => na(r, e)), n = [];
|
|
1772
|
+
for (const r of s)
|
|
1773
|
+
if (r.input_fields)
|
|
1774
|
+
for (const o of r.input_fields)
|
|
1775
|
+
n.push(o);
|
|
1776
|
+
} else t.fields ? n = t.fields.map((r) => ee(r, e)) : t.display_fields && S(t.display_fields) && (n = [sa(
|
|
1761
1777
|
t.display_fields,
|
|
1762
1778
|
t.filters,
|
|
1763
1779
|
t.name
|
|
1764
|
-
)])
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1780
|
+
)]);
|
|
1781
|
+
!n && t.input_fields && S(t.input_fields) && (n = t.input_fields.map((r) => ee(r, e)));
|
|
1782
|
+
let a = t.actions;
|
|
1783
|
+
return a && S(a) && (a = a.map((r, o) => X(r) ? {
|
|
1784
|
+
id: `action_${o}`,
|
|
1768
1785
|
type: "submit",
|
|
1769
|
-
label:
|
|
1770
|
-
style:
|
|
1771
|
-
} :
|
|
1772
|
-
title:
|
|
1786
|
+
label: r,
|
|
1787
|
+
style: o === 0 ? "primary" : "secondary"
|
|
1788
|
+
} : r)), {
|
|
1789
|
+
title: i,
|
|
1773
1790
|
description: t.description ?? t.purpose,
|
|
1774
1791
|
app_header: aa(t.app_header),
|
|
1775
1792
|
app_navi: ra(t.app_navi),
|
|
1776
|
-
sections:
|
|
1777
|
-
fields:
|
|
1778
|
-
actions:
|
|
1779
|
-
wizard: t.wizard,
|
|
1793
|
+
sections: s,
|
|
1794
|
+
fields: n,
|
|
1795
|
+
actions: a,
|
|
1796
|
+
wizard: t.wizard ? oa(t.wizard, e) : void 0,
|
|
1780
1797
|
layout: t.layout
|
|
1781
1798
|
};
|
|
1782
1799
|
}
|
|
1783
|
-
function
|
|
1800
|
+
function la(t, e) {
|
|
1784
1801
|
if (S(t)) {
|
|
1785
|
-
const
|
|
1786
|
-
for (const
|
|
1787
|
-
const
|
|
1788
|
-
|
|
1802
|
+
const s = {};
|
|
1803
|
+
for (const n of t) {
|
|
1804
|
+
const a = n.name ? Ee(n.name) : `screen_${Object.keys(s).length}`;
|
|
1805
|
+
s[a] = vt(n, e);
|
|
1789
1806
|
}
|
|
1790
|
-
return
|
|
1807
|
+
return s;
|
|
1791
1808
|
}
|
|
1792
|
-
const
|
|
1793
|
-
for (const [
|
|
1794
|
-
|
|
1795
|
-
return
|
|
1809
|
+
const i = {};
|
|
1810
|
+
for (const [s, n] of Object.entries(t))
|
|
1811
|
+
i[s] = vt(n, e);
|
|
1812
|
+
return i;
|
|
1796
1813
|
}
|
|
1797
|
-
function
|
|
1798
|
-
if (t)
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
}
|
|
1810
|
-
return e;
|
|
1814
|
+
function ca(t, e) {
|
|
1815
|
+
if (!t) return;
|
|
1816
|
+
if (S(t)) {
|
|
1817
|
+
const s = {};
|
|
1818
|
+
for (const n of t) {
|
|
1819
|
+
const a = n.component_name ?? n.name, r = Ee(a);
|
|
1820
|
+
s[r] = {
|
|
1821
|
+
name: a,
|
|
1822
|
+
description: n.description,
|
|
1823
|
+
type: "field_group"
|
|
1824
|
+
// デフォルト
|
|
1825
|
+
};
|
|
1811
1826
|
}
|
|
1812
|
-
return
|
|
1827
|
+
return s;
|
|
1813
1828
|
}
|
|
1829
|
+
const i = {};
|
|
1830
|
+
for (const [s, n] of Object.entries(t))
|
|
1831
|
+
i[s] = {
|
|
1832
|
+
...n,
|
|
1833
|
+
fields: n.fields ? n.fields.map((a) => ee(a, e)) : void 0
|
|
1834
|
+
};
|
|
1835
|
+
return i;
|
|
1814
1836
|
}
|
|
1815
|
-
function
|
|
1816
|
-
if (t)
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
}
|
|
1829
|
-
return e;
|
|
1837
|
+
function da(t) {
|
|
1838
|
+
if (!t) return;
|
|
1839
|
+
if (S(t)) {
|
|
1840
|
+
const i = {};
|
|
1841
|
+
for (const s of t) {
|
|
1842
|
+
const n = Ee(s.field);
|
|
1843
|
+
i[n] = {
|
|
1844
|
+
name: s.field,
|
|
1845
|
+
rules: {
|
|
1846
|
+
message: s.rule
|
|
1847
|
+
},
|
|
1848
|
+
message: s.rule
|
|
1849
|
+
};
|
|
1830
1850
|
}
|
|
1831
|
-
return
|
|
1851
|
+
return i;
|
|
1832
1852
|
}
|
|
1853
|
+
const e = {};
|
|
1854
|
+
for (const [i, s] of Object.entries(t))
|
|
1855
|
+
e[i] = {
|
|
1856
|
+
...s,
|
|
1857
|
+
name: s.name ?? i
|
|
1858
|
+
};
|
|
1859
|
+
return e;
|
|
1833
1860
|
}
|
|
1834
|
-
function
|
|
1861
|
+
function ha(t) {
|
|
1862
|
+
const e = ia();
|
|
1835
1863
|
return {
|
|
1836
|
-
view:
|
|
1837
|
-
common_components:
|
|
1838
|
-
validations:
|
|
1864
|
+
view: la(t.view, e),
|
|
1865
|
+
common_components: ca(t.common_components, e),
|
|
1866
|
+
validations: da(t.validations)
|
|
1839
1867
|
};
|
|
1840
1868
|
}
|
|
1841
1869
|
function Ae(t, e) {
|
|
1842
1870
|
const i = [];
|
|
1843
|
-
|
|
1844
|
-
return i.push({
|
|
1845
|
-
type: "INVALID_VALUE",
|
|
1846
|
-
message: "Field must be an object",
|
|
1847
|
-
path: e
|
|
1848
|
-
}), i;
|
|
1849
|
-
const s = t.type, n = ta.includes(s), a = [
|
|
1850
|
-
"heading",
|
|
1851
|
-
"notification_bar",
|
|
1852
|
-
"response_message",
|
|
1853
|
-
"timeline",
|
|
1854
|
-
"chip",
|
|
1855
|
-
"status_label",
|
|
1856
|
-
"loader",
|
|
1857
|
-
"stepper",
|
|
1858
|
-
"section_nav",
|
|
1859
|
-
"tabs",
|
|
1860
|
-
"disclosure",
|
|
1861
|
-
"accordion_panel",
|
|
1862
|
-
"information_panel",
|
|
1863
|
-
"float_area"
|
|
1864
|
-
].includes(s);
|
|
1865
|
-
return !k(t.id) && !a && !n && i.push({
|
|
1866
|
-
type: "MISSING_REQUIRED_FIELD",
|
|
1867
|
-
message: 'Field must have an "id"',
|
|
1868
|
-
path: e
|
|
1869
|
-
}), k(t.type) || i.push({
|
|
1871
|
+
return _(t) ? (k(t.type) || i.push({
|
|
1870
1872
|
type: "MISSING_REQUIRED_FIELD",
|
|
1871
1873
|
message: 'Field must have a "type"',
|
|
1872
1874
|
path: e
|
|
1873
|
-
}),
|
|
1875
|
+
}), ["badge", "pagination", "float_area"].includes(t.type) && !k(t.label) && i.push({
|
|
1874
1876
|
type: "MISSING_REQUIRED_FIELD",
|
|
1875
|
-
message:
|
|
1877
|
+
message: `Field type "${t.type}" requires a "label"`,
|
|
1876
1878
|
path: e
|
|
1877
|
-
}), ["select", "multi_select", "radio_group", "checkbox_group"].includes(t.type) && (k(t.options) ? !S(t.options) && !
|
|
1879
|
+
}), ["select", "multi_select", "radio_group", "checkbox_group"].includes(t.type) && (k(t.options) ? !S(t.options) && !X(t.options) ? i.push({
|
|
1878
1880
|
type: "INVALID_VALUE",
|
|
1879
1881
|
message: "Options must be an array or a reference string",
|
|
1880
1882
|
path: `${e}.options`
|
|
1881
|
-
}) : S(t.options) && t.options.forEach((
|
|
1882
|
-
i.push(...
|
|
1883
|
+
}) : S(t.options) && t.options.forEach((a, r) => {
|
|
1884
|
+
i.push(...ua(a, `${e}.options[${r}]`));
|
|
1883
1885
|
}) : i.push({
|
|
1884
1886
|
type: "MISSING_REQUIRED_FIELD",
|
|
1885
1887
|
message: `Field type "${t.type}" requires "options"`,
|
|
1886
1888
|
path: e
|
|
1887
|
-
})), t.type === "repeater" && (k(t.item_fields) ? S(t.item_fields) ? t.item_fields.forEach((
|
|
1888
|
-
i.push(...Ae(
|
|
1889
|
+
})), t.type === "repeater" && (k(t.item_fields) ? S(t.item_fields) ? t.item_fields.forEach((a, r) => {
|
|
1890
|
+
i.push(...Ae(a, `${e}.item_fields[${r}]`));
|
|
1889
1891
|
}) : i.push({
|
|
1890
1892
|
type: "INVALID_VALUE",
|
|
1891
1893
|
message: "item_fields must be an array",
|
|
@@ -1894,11 +1896,15 @@ function Ae(t, e) {
|
|
|
1894
1896
|
type: "MISSING_REQUIRED_FIELD",
|
|
1895
1897
|
message: 'Repeater field must have "item_fields"',
|
|
1896
1898
|
path: e
|
|
1897
|
-
})), i
|
|
1899
|
+
})), i) : (i.push({
|
|
1900
|
+
type: "INVALID_VALUE",
|
|
1901
|
+
message: "Field must be an object",
|
|
1902
|
+
path: e
|
|
1903
|
+
}), i);
|
|
1898
1904
|
}
|
|
1899
|
-
function
|
|
1905
|
+
function ua(t, e) {
|
|
1900
1906
|
const i = [];
|
|
1901
|
-
return
|
|
1907
|
+
return X(t) ? i : _(t) ? (k(t.value) || i.push({
|
|
1902
1908
|
type: "MISSING_REQUIRED_FIELD",
|
|
1903
1909
|
message: 'Option must have a "value"',
|
|
1904
1910
|
path: e
|
|
@@ -1908,42 +1914,46 @@ function ha(t, e) {
|
|
|
1908
1914
|
path: e
|
|
1909
1915
|
}), i) : (i.push({
|
|
1910
1916
|
type: "INVALID_VALUE",
|
|
1911
|
-
message: "Option must be an object",
|
|
1917
|
+
message: "Option must be an object or string",
|
|
1912
1918
|
path: e
|
|
1913
1919
|
}), i);
|
|
1914
1920
|
}
|
|
1915
|
-
function mi(t, e) {
|
|
1916
|
-
const i = [];
|
|
1917
|
-
return
|
|
1921
|
+
function mi(t, e, i = {}) {
|
|
1922
|
+
const s = i.allowString ?? !0, n = [];
|
|
1923
|
+
return X(t) ? (s || n.push({
|
|
1924
|
+
type: "INVALID_VALUE",
|
|
1925
|
+
message: "Action must be an object",
|
|
1926
|
+
path: e
|
|
1927
|
+
}), n) : _(t) ? (k(t.id) || n.push({
|
|
1918
1928
|
type: "MISSING_REQUIRED_FIELD",
|
|
1919
1929
|
message: 'Action must have an "id"',
|
|
1920
1930
|
path: e
|
|
1921
|
-
}), k(t.type) ? gt.includes(t.type) ||
|
|
1931
|
+
}), k(t.type) ? gt.includes(t.type) || n.push({
|
|
1922
1932
|
type: "INVALID_FIELD_TYPE",
|
|
1923
1933
|
message: `Invalid action type: "${t.type}". Valid types are: ${gt.join(", ")}`,
|
|
1924
1934
|
path: `${e}.type`
|
|
1925
|
-
}) :
|
|
1935
|
+
}) : n.push({
|
|
1926
1936
|
type: "MISSING_REQUIRED_FIELD",
|
|
1927
1937
|
message: 'Action must have a "type"',
|
|
1928
1938
|
path: e
|
|
1929
|
-
}), k(t.label) ||
|
|
1939
|
+
}), k(t.label) || n.push({
|
|
1930
1940
|
type: "MISSING_REQUIRED_FIELD",
|
|
1931
1941
|
message: 'Action must have a "label"',
|
|
1932
1942
|
path: e
|
|
1933
|
-
}), t.type === "navigate" && !k(t.to) &&
|
|
1943
|
+
}), t.type === "navigate" && !k(t.to) && n.push({
|
|
1934
1944
|
type: "MISSING_REQUIRED_FIELD",
|
|
1935
1945
|
message: 'Navigate action must have a "to" destination',
|
|
1936
1946
|
path: e
|
|
1937
|
-
}),
|
|
1947
|
+
}), n) : (n.push({
|
|
1938
1948
|
type: "INVALID_VALUE",
|
|
1939
|
-
message: "Action must be an object",
|
|
1949
|
+
message: "Action must be an object or string",
|
|
1940
1950
|
path: e
|
|
1941
|
-
}),
|
|
1951
|
+
}), n);
|
|
1942
1952
|
}
|
|
1943
|
-
function
|
|
1953
|
+
function pa(t, e) {
|
|
1944
1954
|
const i = [];
|
|
1945
|
-
return
|
|
1946
|
-
i.push(...
|
|
1955
|
+
return _(t) ? k(t.steps) ? S(t.steps) ? (t.steps.forEach((s, n) => {
|
|
1956
|
+
i.push(...fa(s, `${e}.steps[${n}]`));
|
|
1947
1957
|
}), i) : (i.push({
|
|
1948
1958
|
type: "INVALID_VALUE",
|
|
1949
1959
|
message: "Wizard steps must be an array",
|
|
@@ -1958,9 +1968,9 @@ function ua(t, e) {
|
|
|
1958
1968
|
path: e
|
|
1959
1969
|
}), i);
|
|
1960
1970
|
}
|
|
1961
|
-
function
|
|
1971
|
+
function fa(t, e) {
|
|
1962
1972
|
const i = [];
|
|
1963
|
-
return
|
|
1973
|
+
return _(t) ? (k(t.id) || i.push({
|
|
1964
1974
|
type: "MISSING_REQUIRED_FIELD",
|
|
1965
1975
|
message: 'Wizard step must have an "id"',
|
|
1966
1976
|
path: e
|
|
@@ -1984,13 +1994,13 @@ function pa(t, e) {
|
|
|
1984
1994
|
path: e
|
|
1985
1995
|
}), i);
|
|
1986
1996
|
}
|
|
1987
|
-
function
|
|
1997
|
+
function ma(t, e) {
|
|
1988
1998
|
const i = [];
|
|
1989
|
-
return
|
|
1999
|
+
return _(t) ? (k(t.title) || i.push({
|
|
1990
2000
|
type: "MISSING_REQUIRED_FIELD",
|
|
1991
2001
|
message: 'Screen must have a "title"',
|
|
1992
2002
|
path: e
|
|
1993
|
-
}), k(t.wizard) && i.push(...
|
|
2003
|
+
}), k(t.wizard) && i.push(...pa(t.wizard, `${e}.wizard`)), k(t.fields) && (S(t.fields) ? t.fields.forEach((s, n) => {
|
|
1994
2004
|
i.push(...Ae(s, `${e}.fields[${n}]`));
|
|
1995
2005
|
}) : i.push({
|
|
1996
2006
|
type: "INVALID_VALUE",
|
|
@@ -2008,9 +2018,9 @@ function fa(t, e) {
|
|
|
2008
2018
|
path: e
|
|
2009
2019
|
}), i);
|
|
2010
2020
|
}
|
|
2011
|
-
function
|
|
2021
|
+
function ga(t, e) {
|
|
2012
2022
|
const i = [];
|
|
2013
|
-
return
|
|
2023
|
+
return _(t) ? (k(t.name) || i.push({
|
|
2014
2024
|
type: "MISSING_REQUIRED_FIELD",
|
|
2015
2025
|
message: 'Common component must have a "name"',
|
|
2016
2026
|
path: e
|
|
@@ -2029,7 +2039,7 @@ function ma(t, e) {
|
|
|
2029
2039
|
message: "Component fields must be an array",
|
|
2030
2040
|
path: `${e}.fields`
|
|
2031
2041
|
})), t.type === "action_group" && k(t.actions) && (S(t.actions) ? t.actions.forEach((s, n) => {
|
|
2032
|
-
i.push(...mi(s, `${e}.actions[${n}]
|
|
2042
|
+
i.push(...mi(s, `${e}.actions[${n}]`, { allowString: !1 }));
|
|
2033
2043
|
}) : i.push({
|
|
2034
2044
|
type: "INVALID_VALUE",
|
|
2035
2045
|
message: "Component actions must be an array",
|
|
@@ -2040,13 +2050,9 @@ function ma(t, e) {
|
|
|
2040
2050
|
path: e
|
|
2041
2051
|
}), i);
|
|
2042
2052
|
}
|
|
2043
|
-
function
|
|
2053
|
+
function ba(t, e) {
|
|
2044
2054
|
const i = [];
|
|
2045
|
-
return
|
|
2046
|
-
type: "MISSING_REQUIRED_FIELD",
|
|
2047
|
-
message: 'Validation rule must have a "name"',
|
|
2048
|
-
path: e
|
|
2049
|
-
}), k(t.rules) || i.push({
|
|
2055
|
+
return _(t) ? (k(t.rules) || i.push({
|
|
2050
2056
|
type: "MISSING_REQUIRED_FIELD",
|
|
2051
2057
|
message: 'Validation rule must have "rules"',
|
|
2052
2058
|
path: e
|
|
@@ -2056,9 +2062,9 @@ function ga(t, e) {
|
|
|
2056
2062
|
path: e
|
|
2057
2063
|
}), i);
|
|
2058
2064
|
}
|
|
2059
|
-
function
|
|
2065
|
+
function va(t, e) {
|
|
2060
2066
|
const i = [];
|
|
2061
|
-
return
|
|
2067
|
+
return _(t) ? (!k(t.name) && !k(t.title) && i.push({
|
|
2062
2068
|
type: "MISSING_REQUIRED_FIELD",
|
|
2063
2069
|
message: 'Screen must have a "name" or "title"',
|
|
2064
2070
|
path: e
|
|
@@ -2072,11 +2078,11 @@ function ba(t, e) {
|
|
|
2072
2078
|
path: e
|
|
2073
2079
|
}), i);
|
|
2074
2080
|
}
|
|
2075
|
-
function
|
|
2081
|
+
function xa(t, e) {
|
|
2076
2082
|
const i = [];
|
|
2077
|
-
return
|
|
2083
|
+
return _(t) ? (!k(t.component_name) && !k(t.name) && i.push({
|
|
2078
2084
|
type: "MISSING_REQUIRED_FIELD",
|
|
2079
|
-
message: 'Common component must have a "component_name"',
|
|
2085
|
+
message: 'Common component must have a "component_name" or "name"',
|
|
2080
2086
|
path: e
|
|
2081
2087
|
}), i) : (i.push({
|
|
2082
2088
|
type: "INVALID_VALUE",
|
|
@@ -2084,9 +2090,9 @@ function va(t, e) {
|
|
|
2084
2090
|
path: e
|
|
2085
2091
|
}), i);
|
|
2086
2092
|
}
|
|
2087
|
-
function
|
|
2093
|
+
function ya(t, e) {
|
|
2088
2094
|
const i = [];
|
|
2089
|
-
return
|
|
2095
|
+
return _(t) ? (k(t.field) || i.push({
|
|
2090
2096
|
type: "MISSING_REQUIRED_FIELD",
|
|
2091
2097
|
message: 'Validation rule must have a "field"',
|
|
2092
2098
|
path: e
|
|
@@ -2100,9 +2106,9 @@ function xa(t, e) {
|
|
|
2100
2106
|
path: e
|
|
2101
2107
|
}), i);
|
|
2102
2108
|
}
|
|
2103
|
-
function
|
|
2109
|
+
function Ca(t) {
|
|
2104
2110
|
const e = [];
|
|
2105
|
-
if (!
|
|
2111
|
+
if (!_(t))
|
|
2106
2112
|
return e.push({
|
|
2107
2113
|
type: "SCHEMA_VALIDATION_ERROR",
|
|
2108
2114
|
message: "Root must be an object",
|
|
@@ -2116,11 +2122,11 @@ function ya(t) {
|
|
|
2116
2122
|
});
|
|
2117
2123
|
else if (S(t.view))
|
|
2118
2124
|
t.view.forEach((i, s) => {
|
|
2119
|
-
e.push(...
|
|
2125
|
+
e.push(...va(i, `view[${s}]`));
|
|
2120
2126
|
});
|
|
2121
|
-
else if (
|
|
2127
|
+
else if (_(t.view))
|
|
2122
2128
|
for (const [i, s] of Object.entries(t.view))
|
|
2123
|
-
e.push(...
|
|
2129
|
+
e.push(...ma(s, `view.${i}`));
|
|
2124
2130
|
else
|
|
2125
2131
|
e.push({
|
|
2126
2132
|
type: "INVALID_VALUE",
|
|
@@ -2130,11 +2136,11 @@ function ya(t) {
|
|
|
2130
2136
|
if (k(t.common_components))
|
|
2131
2137
|
if (S(t.common_components))
|
|
2132
2138
|
t.common_components.forEach((i, s) => {
|
|
2133
|
-
e.push(...
|
|
2139
|
+
e.push(...xa(i, `common_components[${s}]`));
|
|
2134
2140
|
});
|
|
2135
|
-
else if (
|
|
2141
|
+
else if (_(t.common_components))
|
|
2136
2142
|
for (const [i, s] of Object.entries(t.common_components))
|
|
2137
|
-
e.push(...
|
|
2143
|
+
e.push(...ga(s, `common_components.${i}`));
|
|
2138
2144
|
else
|
|
2139
2145
|
e.push({
|
|
2140
2146
|
type: "INVALID_VALUE",
|
|
@@ -2144,11 +2150,11 @@ function ya(t) {
|
|
|
2144
2150
|
if (k(t.validations))
|
|
2145
2151
|
if (S(t.validations))
|
|
2146
2152
|
t.validations.forEach((i, s) => {
|
|
2147
|
-
e.push(...
|
|
2153
|
+
e.push(...ya(i, `validations[${s}]`));
|
|
2148
2154
|
});
|
|
2149
|
-
else if (
|
|
2155
|
+
else if (_(t.validations))
|
|
2150
2156
|
for (const [i, s] of Object.entries(t.validations))
|
|
2151
|
-
e.push(...
|
|
2157
|
+
e.push(...ba(s, `validations.${i}`));
|
|
2152
2158
|
else
|
|
2153
2159
|
e.push({
|
|
2154
2160
|
type: "INVALID_VALUE",
|
|
@@ -2160,8 +2166,8 @@ function ya(t) {
|
|
|
2160
2166
|
function Ge(t) {
|
|
2161
2167
|
var e, i;
|
|
2162
2168
|
try {
|
|
2163
|
-
const s = mt.load(t), n =
|
|
2164
|
-
return n.length > 0 ? { success: !1, errors: n } : { success: !0, data:
|
|
2169
|
+
const s = mt.load(t), n = Ca(s);
|
|
2170
|
+
return n.length > 0 ? { success: !1, errors: n } : { success: !0, data: ha(s) };
|
|
2165
2171
|
} catch (s) {
|
|
2166
2172
|
return s instanceof mt.YAMLException ? {
|
|
2167
2173
|
success: !1,
|
|
@@ -2184,7 +2190,7 @@ function Ge(t) {
|
|
|
2184
2190
|
};
|
|
2185
2191
|
}
|
|
2186
2192
|
}
|
|
2187
|
-
function
|
|
2193
|
+
function ka(t) {
|
|
2188
2194
|
return t.map((e) => {
|
|
2189
2195
|
let i = "";
|
|
2190
2196
|
return e.path && (i = ` at "${e.path}"`), e.line !== void 0 && (i += ` (line ${e.line + 1}`, e.column !== void 0 && (i += `, column ${e.column + 1}`), i += ")"), `[${e.type}]${i}: ${e.message}`;
|
|
@@ -2224,7 +2230,7 @@ function H(t) {
|
|
|
2224
2230
|
function E(t = "mokkun") {
|
|
2225
2231
|
return `${t}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
2226
2232
|
}
|
|
2227
|
-
function
|
|
2233
|
+
function wa(t) {
|
|
2228
2234
|
const e = document.createElement("div");
|
|
2229
2235
|
return e.textContent = t, e.innerHTML;
|
|
2230
2236
|
}
|
|
@@ -2253,13 +2259,13 @@ function R(t) {
|
|
|
2253
2259
|
];
|
|
2254
2260
|
return t.required && e.push("required"), t.disabled && e.push("disabled"), t.readonly && e.push("readonly"), "placeholder" in t && t.placeholder && e.push(`placeholder="${m(t.placeholder)}"`), e.join(" ");
|
|
2255
2261
|
}
|
|
2256
|
-
function
|
|
2262
|
+
function de(t) {
|
|
2257
2263
|
return typeof t == "string" ? [] : t;
|
|
2258
2264
|
}
|
|
2259
|
-
function
|
|
2265
|
+
function Ea(t) {
|
|
2260
2266
|
return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
|
|
2261
2267
|
}
|
|
2262
|
-
function
|
|
2268
|
+
function Aa(t) {
|
|
2263
2269
|
return {
|
|
2264
2270
|
"image/jpeg": "JPEG",
|
|
2265
2271
|
"image/png": "PNG",
|
|
@@ -2849,11 +2855,11 @@ class vi {
|
|
|
2849
2855
|
return y(e, a);
|
|
2850
2856
|
}
|
|
2851
2857
|
}
|
|
2852
|
-
function
|
|
2858
|
+
function no(t, e = {}, i = {}) {
|
|
2853
2859
|
const s = new vi(t, e, i);
|
|
2854
2860
|
return s.render(), s;
|
|
2855
2861
|
}
|
|
2856
|
-
function
|
|
2862
|
+
function Ia(t) {
|
|
2857
2863
|
return "options" in t && Array.isArray(t.options);
|
|
2858
2864
|
}
|
|
2859
2865
|
class Ce {
|
|
@@ -2984,7 +2990,7 @@ class Ce {
|
|
|
2984
2990
|
*/
|
|
2985
2991
|
appendOptions(e, i) {
|
|
2986
2992
|
for (const s of i)
|
|
2987
|
-
if (
|
|
2993
|
+
if (Ia(s)) {
|
|
2988
2994
|
const n = this.createOptgroup(s);
|
|
2989
2995
|
e.appendChild(n);
|
|
2990
2996
|
} else {
|
|
@@ -3031,7 +3037,7 @@ class Ce {
|
|
|
3031
3037
|
* @internal renderFieldから呼び出される内部メソッド
|
|
3032
3038
|
*/
|
|
3033
3039
|
static renderSelectField(e) {
|
|
3034
|
-
const i = [R(e)], s = e.size ? `select-${e.size}` : "select-default", n =
|
|
3040
|
+
const i = [R(e)], s = e.size ? `select-${e.size}` : "select-default", n = de(e.options), a = /* @__PURE__ */ new Map(), r = [];
|
|
3035
3041
|
for (const g of n)
|
|
3036
3042
|
g.group ? (a.has(g.group) || a.set(g.group, []), a.get(g.group).push(g)) : r.push(g);
|
|
3037
3043
|
const o = (g) => {
|
|
@@ -3054,7 +3060,7 @@ class Ce {
|
|
|
3054
3060
|
* @internal renderFieldから呼び出される内部メソッド
|
|
3055
3061
|
*/
|
|
3056
3062
|
static renderMultiSelectField(e) {
|
|
3057
|
-
const i = [R(e), "multiple"], s =
|
|
3063
|
+
const i = [R(e), "multiple"], s = de(e.options), n = Array.isArray(e.default) ? e.default : [], a = s.map((o) => {
|
|
3058
3064
|
const l = n.includes(o.value) ? "selected" : "", d = o.disabled ? "disabled" : "";
|
|
3059
3065
|
return `<option value="${m(String(o.value))}" ${l} ${d}>${m(o.label)}</option>`;
|
|
3060
3066
|
}).join(""), r = `
|
|
@@ -3065,7 +3071,7 @@ class Ce {
|
|
|
3065
3071
|
return y(e, r);
|
|
3066
3072
|
}
|
|
3067
3073
|
}
|
|
3068
|
-
class
|
|
3074
|
+
class Sa {
|
|
3069
3075
|
constructor(e, i = {}, s = {}) {
|
|
3070
3076
|
h(this, "config");
|
|
3071
3077
|
h(this, "state");
|
|
@@ -3231,7 +3237,7 @@ class Ia {
|
|
|
3231
3237
|
* @returns 生成されたHTML文字列
|
|
3232
3238
|
*/
|
|
3233
3239
|
static renderField(e) {
|
|
3234
|
-
const i =
|
|
3240
|
+
const i = de(e.options), s = e.direction ?? "vertical", n = i.map((r) => {
|
|
3235
3241
|
const o = e.default === r.value ? "checked" : "", l = r.disabled || e.disabled ? "disabled" : "", d = `${e.id}-${r.value}`, p = r.description ? `<span class="radio-option-description">${m(r.description)}</span>` : "";
|
|
3236
3242
|
return `
|
|
3237
3243
|
<label class="radio-option" for="${m(d)}">
|
|
@@ -3462,7 +3468,7 @@ class ke {
|
|
|
3462
3468
|
* チェックボックスグループをレンダリング
|
|
3463
3469
|
*/
|
|
3464
3470
|
static renderCheckboxGroup(e) {
|
|
3465
|
-
const i =
|
|
3471
|
+
const i = de(e.options), s = e.direction ?? "vertical", n = Array.isArray(e.default) ? e.default : [], a = i.map((o) => {
|
|
3466
3472
|
const l = n.includes(o.value) ? "checked" : "", d = o.disabled || e.disabled ? "disabled" : "", p = `${e.id}-${o.value}`;
|
|
3467
3473
|
return `
|
|
3468
3474
|
<label class="checkbox-option" for="${m(p)}">
|
|
@@ -3481,7 +3487,7 @@ class ke {
|
|
|
3481
3487
|
return y(e, r);
|
|
3482
3488
|
}
|
|
3483
3489
|
}
|
|
3484
|
-
class
|
|
3490
|
+
class La {
|
|
3485
3491
|
constructor(e, i, s = {}, n = []) {
|
|
3486
3492
|
h(this, "config");
|
|
3487
3493
|
h(this, "state");
|
|
@@ -3979,7 +3985,7 @@ class Sa {
|
|
|
3979
3985
|
'aria-expanded="false"'
|
|
3980
3986
|
];
|
|
3981
3987
|
e.required && i.push("required"), e.disabled && i.push("disabled"), e.placeholder && i.push(`placeholder="${m(e.placeholder)}"`);
|
|
3982
|
-
const s =
|
|
3988
|
+
const s = de(e.options ?? []), n = `${e.id}-listbox`;
|
|
3983
3989
|
i.push(`aria-controls="${n}"`);
|
|
3984
3990
|
const a = s.map((o, l) => {
|
|
3985
3991
|
const d = o.disabled ? 'aria-disabled="true"' : "";
|
|
@@ -4007,7 +4013,7 @@ class Sa {
|
|
|
4007
4013
|
return y(e, r);
|
|
4008
4014
|
}
|
|
4009
4015
|
}
|
|
4010
|
-
class
|
|
4016
|
+
class $a {
|
|
4011
4017
|
constructor(e, i, s = {}) {
|
|
4012
4018
|
h(this, "config");
|
|
4013
4019
|
h(this, "state");
|
|
@@ -4165,7 +4171,7 @@ class La {
|
|
|
4165
4171
|
`;
|
|
4166
4172
|
}
|
|
4167
4173
|
}
|
|
4168
|
-
class
|
|
4174
|
+
class _a {
|
|
4169
4175
|
constructor(e, i, s = {}) {
|
|
4170
4176
|
h(this, "config");
|
|
4171
4177
|
h(this, "state");
|
|
@@ -4340,7 +4346,7 @@ class $a {
|
|
|
4340
4346
|
return y(e, a);
|
|
4341
4347
|
}
|
|
4342
4348
|
}
|
|
4343
|
-
class
|
|
4349
|
+
class Na {
|
|
4344
4350
|
constructor(e, i = {}, s = {}) {
|
|
4345
4351
|
h(this, "config");
|
|
4346
4352
|
h(this, "state");
|
|
@@ -4546,7 +4552,7 @@ class _a {
|
|
|
4546
4552
|
return y(e, n);
|
|
4547
4553
|
}
|
|
4548
4554
|
}
|
|
4549
|
-
class
|
|
4555
|
+
class Ta {
|
|
4550
4556
|
constructor(e, i, s = {}) {
|
|
4551
4557
|
h(this, "config");
|
|
4552
4558
|
h(this, "state");
|
|
@@ -4858,7 +4864,7 @@ class Na {
|
|
|
4858
4864
|
return y(e, d);
|
|
4859
4865
|
}
|
|
4860
4866
|
}
|
|
4861
|
-
class
|
|
4867
|
+
class Ma {
|
|
4862
4868
|
constructor(e, i = {}, s = {}) {
|
|
4863
4869
|
h(this, "config");
|
|
4864
4870
|
h(this, "state");
|
|
@@ -5031,7 +5037,7 @@ class Ta {
|
|
|
5031
5037
|
return y(e, l);
|
|
5032
5038
|
}
|
|
5033
5039
|
}
|
|
5034
|
-
class
|
|
5040
|
+
class Da {
|
|
5035
5041
|
constructor(e, i = {}, s = {}) {
|
|
5036
5042
|
h(this, "config");
|
|
5037
5043
|
h(this, "state");
|
|
@@ -5209,7 +5215,7 @@ class Ma {
|
|
|
5209
5215
|
return y(e, a);
|
|
5210
5216
|
}
|
|
5211
5217
|
}
|
|
5212
|
-
class
|
|
5218
|
+
class Fa {
|
|
5213
5219
|
constructor(e, i, s = {}) {
|
|
5214
5220
|
h(this, "config");
|
|
5215
5221
|
h(this, "state");
|
|
@@ -5492,7 +5498,7 @@ class Da {
|
|
|
5492
5498
|
`);
|
|
5493
5499
|
}
|
|
5494
5500
|
}
|
|
5495
|
-
class
|
|
5501
|
+
class Oa {
|
|
5496
5502
|
constructor(e, i = {}, s) {
|
|
5497
5503
|
h(this, "config");
|
|
5498
5504
|
h(this, "state");
|
|
@@ -6190,7 +6196,7 @@ class xi {
|
|
|
6190
6196
|
return y(e, a);
|
|
6191
6197
|
}
|
|
6192
6198
|
}
|
|
6193
|
-
class
|
|
6199
|
+
class Ha {
|
|
6194
6200
|
constructor(e, i, s = {}) {
|
|
6195
6201
|
h(this, "config");
|
|
6196
6202
|
h(this, "state");
|
|
@@ -6429,7 +6435,7 @@ class Oa {
|
|
|
6429
6435
|
`);
|
|
6430
6436
|
}
|
|
6431
6437
|
}
|
|
6432
|
-
class
|
|
6438
|
+
class za {
|
|
6433
6439
|
constructor(e, i = {}, s = {}) {
|
|
6434
6440
|
h(this, "config");
|
|
6435
6441
|
h(this, "state");
|
|
@@ -6650,14 +6656,14 @@ class Ha {
|
|
|
6650
6656
|
return y(e, a);
|
|
6651
6657
|
}
|
|
6652
6658
|
}
|
|
6653
|
-
const
|
|
6659
|
+
const Ba = {
|
|
6654
6660
|
info: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>',
|
|
6655
6661
|
success: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.151-.043l4.25-5.5Z" clip-rule="evenodd" /></svg>',
|
|
6656
6662
|
warning: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M6.701 2.25c.577-1 2.02-1 2.598 0l5.196 9a1.5 1.5 0 0 1-1.299 2.25H2.804a1.5 1.5 0 0 1-1.3-2.25l5.197-9ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>',
|
|
6657
6663
|
error: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>',
|
|
6658
6664
|
sync: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M13.836 2.477a.75.75 0 0 1 .75.75v3.182a.75.75 0 0 1-.75.75h-3.182a.75.75 0 0 1 0-1.5h1.37l-.84-.841a4.5 4.5 0 0 0-7.08.681.75.75 0 0 1-1.264-.808 6 6 0 0 1 9.44-.908l.97.969V3.227a.75.75 0 0 1 .75-.75Zm-1.09 7.595a6 6 0 0 1-9.44.908l-.97-.969v1.637a.75.75 0 0 1-1.5 0V8.466a.75.75 0 0 1 .75-.75h3.182a.75.75 0 0 1 0 1.5h-1.37l.84.841a4.5 4.5 0 0 0 7.08-.681.75.75 0 0 1 1.264.808Z" clip-rule="evenodd" /></svg>'
|
|
6659
|
-
},
|
|
6660
|
-
class
|
|
6665
|
+
}, Ra = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z" /></svg>';
|
|
6666
|
+
class Pa {
|
|
6661
6667
|
constructor(e, i, s = {}) {
|
|
6662
6668
|
h(this, "config");
|
|
6663
6669
|
h(this, "state");
|
|
@@ -6795,7 +6801,7 @@ class Ra {
|
|
|
6795
6801
|
"aria-hidden": "true"
|
|
6796
6802
|
}
|
|
6797
6803
|
});
|
|
6798
|
-
s.innerHTML =
|
|
6804
|
+
s.innerHTML = Ba[i], e.appendChild(s);
|
|
6799
6805
|
const n = c("span", {
|
|
6800
6806
|
className: "notification-bar-message",
|
|
6801
6807
|
textContent: this.state.message
|
|
@@ -6826,7 +6832,7 @@ class Ra {
|
|
|
6826
6832
|
"aria-label": "閉じる"
|
|
6827
6833
|
}
|
|
6828
6834
|
});
|
|
6829
|
-
return e.innerHTML =
|
|
6835
|
+
return e.innerHTML = Ra, this.closeHandler = this.handleClose.bind(this), e.addEventListener("click", this.closeHandler), e;
|
|
6830
6836
|
}
|
|
6831
6837
|
/**
|
|
6832
6838
|
* アクションボタンクリックハンドラー
|
|
@@ -6881,8 +6887,8 @@ const yt = {
|
|
|
6881
6887
|
error: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>',
|
|
6882
6888
|
warning: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>',
|
|
6883
6889
|
info: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd" /></svg>'
|
|
6884
|
-
},
|
|
6885
|
-
class
|
|
6890
|
+
}, Va = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M4.22 6.22a.75.75 0 011.06 0L8 8.94l2.72-2.72a.75.75 0 111.06 1.06l-3.25 3.25a.75.75 0 01-1.06 0L4.22 7.28a.75.75 0 010-1.06z" clip-rule="evenodd" /></svg>', ja = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" /></svg>', Ct = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 3a5 5 0 104.546 2.914.75.75 0 011.364-.628A6.5 6.5 0 118 1.5v-.75a.75.75 0 011.28-.53l2 2a.75.75 0 010 1.06l-2 2a.75.75 0 01-1.28-.53V3z" clip-rule="evenodd" /></svg>', kt = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="response-message-spinner"><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="2" opacity="0.25" /><path d="M14 8a6 6 0 00-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" /></svg>', Ua = 200;
|
|
6891
|
+
class qa {
|
|
6886
6892
|
constructor(e, i, s = {}) {
|
|
6887
6893
|
h(this, "config");
|
|
6888
6894
|
h(this, "state");
|
|
@@ -7115,7 +7121,7 @@ class Ua {
|
|
|
7115
7121
|
const n = c("span", {
|
|
7116
7122
|
className: "response-message-details-chevron"
|
|
7117
7123
|
});
|
|
7118
|
-
return n.innerHTML =
|
|
7124
|
+
return n.innerHTML = Va, i.appendChild(n), this.detailsToggleHandler = () => {
|
|
7119
7125
|
this.toggleDetails();
|
|
7120
7126
|
}, i.addEventListener("click", this.detailsToggleHandler), i;
|
|
7121
7127
|
}
|
|
@@ -7188,7 +7194,7 @@ class Ua {
|
|
|
7188
7194
|
"aria-label": "閉じる"
|
|
7189
7195
|
}
|
|
7190
7196
|
});
|
|
7191
|
-
return e.innerHTML =
|
|
7197
|
+
return e.innerHTML = ja, this.closeHandler = () => {
|
|
7192
7198
|
this.hide();
|
|
7193
7199
|
}, e.addEventListener("click", this.closeHandler), e;
|
|
7194
7200
|
}
|
|
@@ -7199,7 +7205,7 @@ class Ua {
|
|
|
7199
7205
|
const e = this.container.querySelector(".response-message-details-toggle"), i = this.container.querySelector(".response-message-details-wrapper"), s = this.container.querySelector(".response-message-details");
|
|
7200
7206
|
e && (e.setAttribute("aria-expanded", String(this.state.detailsExpanded)), this.state.detailsExpanded ? e.classList.add("is-expanded") : e.classList.remove("is-expanded")), i && (this.state.detailsExpanded ? i.classList.add("is-expanded") : i.classList.remove("is-expanded")), s && (this.state.detailsExpanded ? s.removeAttribute("hidden") : setTimeout(() => {
|
|
7201
7207
|
this.state.detailsExpanded || s.setAttribute("hidden", "");
|
|
7202
|
-
},
|
|
7208
|
+
}, Ua));
|
|
7203
7209
|
}
|
|
7204
7210
|
updateRetryButtonState() {
|
|
7205
7211
|
const e = this.container.querySelector(".response-message-retry"), i = this.container.querySelector(".response-message-retry-icon");
|
|
@@ -7289,14 +7295,14 @@ const _e = {
|
|
|
7289
7295
|
user: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12.735 14c.618 0 1.093-.561.872-1.139a6.002 6.002 0 0 0-11.215 0c-.22.578.254 1.139.872 1.139h9.47Z" /></svg>',
|
|
7290
7296
|
message: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 8.74c0 .983.713 1.825 1.69 1.943.764.092 1.534.164 2.31.216v2.351a.75.75 0 0 0 1.28.53l2.51-2.51c.182-.181.427-.283.684-.287A23.109 23.109 0 0 0 14 10.67c.7-.123 1-.87 1-1.63v-4.6c0-.76-.3-1.51-1-1.63A23.056 23.056 0 0 0 8 2.25c-2.154 0-4.254.147-6 .56-.7.12-1 .87-1 1.63v4.3Z" clip-rule="evenodd" /></svg>'
|
|
7291
7297
|
};
|
|
7292
|
-
function
|
|
7298
|
+
function Wa(t) {
|
|
7293
7299
|
return t instanceof Date ? t : new Date(t);
|
|
7294
7300
|
}
|
|
7295
|
-
function
|
|
7301
|
+
function Ya(t) {
|
|
7296
7302
|
const e = t.getFullYear(), i = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
|
|
7297
7303
|
return `${e}/${i}/${s}`;
|
|
7298
7304
|
}
|
|
7299
|
-
function
|
|
7305
|
+
function Ga(t, e) {
|
|
7300
7306
|
if (e === "none")
|
|
7301
7307
|
return "";
|
|
7302
7308
|
const i = String(t.getHours()).padStart(2, "0"), s = String(t.getMinutes()).padStart(2, "0");
|
|
@@ -7412,7 +7418,7 @@ function Ne(t) {
|
|
|
7412
7418
|
}
|
|
7413
7419
|
}), i.body.innerHTML;
|
|
7414
7420
|
}
|
|
7415
|
-
function
|
|
7421
|
+
function Za(t) {
|
|
7416
7422
|
const e = t.trim();
|
|
7417
7423
|
if (!e.toLowerCase().startsWith("<svg") || !e.toLowerCase().endsWith("</svg>"))
|
|
7418
7424
|
return null;
|
|
@@ -7456,7 +7462,7 @@ function Ga(t) {
|
|
|
7456
7462
|
p && p.toLowerCase().startsWith("javascript:") && (d.removeAttribute("href"), d.removeAttribute("xlink:href"));
|
|
7457
7463
|
}), a.outerHTML;
|
|
7458
7464
|
}
|
|
7459
|
-
class
|
|
7465
|
+
class Ka {
|
|
7460
7466
|
constructor(e, i, s = {}) {
|
|
7461
7467
|
h(this, "config");
|
|
7462
7468
|
h(this, "container");
|
|
@@ -7627,7 +7633,7 @@ class Za {
|
|
|
7627
7633
|
className: "timeline-header"
|
|
7628
7634
|
}), s = c("div", {
|
|
7629
7635
|
className: "timeline-date-area"
|
|
7630
|
-
}), n =
|
|
7636
|
+
}), n = Wa(e.datetime), a = e.dateLabel ?? Ya(n), r = c("time", {
|
|
7631
7637
|
className: [
|
|
7632
7638
|
"timeline-date",
|
|
7633
7639
|
e.current ? "is-current" : ""
|
|
@@ -7637,7 +7643,7 @@ class Za {
|
|
|
7637
7643
|
r.setAttribute("datetime", n.toISOString()), s.appendChild(r);
|
|
7638
7644
|
const o = e.timeFormat ?? "HH:mm";
|
|
7639
7645
|
if (o !== "none") {
|
|
7640
|
-
const l =
|
|
7646
|
+
const l = Ga(n, o);
|
|
7641
7647
|
if (l) {
|
|
7642
7648
|
const d = c("span", {
|
|
7643
7649
|
className: "timeline-time",
|
|
@@ -7667,7 +7673,7 @@ class Za {
|
|
|
7667
7673
|
if (!e)
|
|
7668
7674
|
return _e.dot;
|
|
7669
7675
|
const i = _e[e];
|
|
7670
|
-
return i || (
|
|
7676
|
+
return i || (Za(e) ?? _e.dot);
|
|
7671
7677
|
}
|
|
7672
7678
|
// ===========================================================================
|
|
7673
7679
|
// Static Field Renderer
|
|
@@ -7700,7 +7706,7 @@ class Za {
|
|
|
7700
7706
|
`);
|
|
7701
7707
|
}
|
|
7702
7708
|
}
|
|
7703
|
-
class
|
|
7709
|
+
class Qa {
|
|
7704
7710
|
constructor(e, i, s = {}) {
|
|
7705
7711
|
h(this, "config");
|
|
7706
7712
|
h(this, "state");
|
|
@@ -7863,7 +7869,7 @@ class Ka {
|
|
|
7863
7869
|
return y(e, a);
|
|
7864
7870
|
}
|
|
7865
7871
|
}
|
|
7866
|
-
const
|
|
7872
|
+
const Ja = {
|
|
7867
7873
|
check: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.739a.75.75 0 0 1 1.04-.208Z" clip-rule="evenodd" /></svg>',
|
|
7868
7874
|
warning: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M6.701 2.25c.577-1 2.02-1 2.598 0l5.196 9a1.5 1.5 0 0 1-1.299 2.25H2.804a1.5 1.5 0 0 1-1.3-2.25l5.197-9ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>',
|
|
7869
7875
|
error: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>',
|
|
@@ -7872,7 +7878,7 @@ const Qa = {
|
|
|
7872
7878
|
circle: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="8" cy="8" r="6" /></svg>',
|
|
7873
7879
|
dot: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="8" cy="8" r="4" /></svg>'
|
|
7874
7880
|
};
|
|
7875
|
-
class
|
|
7881
|
+
class Xa {
|
|
7876
7882
|
constructor(e, i, s = {}) {
|
|
7877
7883
|
h(this, "config");
|
|
7878
7884
|
h(this, "state");
|
|
@@ -7998,7 +8004,7 @@ class Ja {
|
|
|
7998
8004
|
attributes: {
|
|
7999
8005
|
"aria-hidden": "true"
|
|
8000
8006
|
}
|
|
8001
|
-
}), i =
|
|
8007
|
+
}), i = Ja[this.config.icon];
|
|
8002
8008
|
if (i)
|
|
8003
8009
|
e.innerHTML = i;
|
|
8004
8010
|
else {
|
|
@@ -8081,7 +8087,7 @@ class Ja {
|
|
|
8081
8087
|
return y(e, n);
|
|
8082
8088
|
}
|
|
8083
8089
|
}
|
|
8084
|
-
class
|
|
8090
|
+
class er {
|
|
8085
8091
|
constructor(e, i, s = {}) {
|
|
8086
8092
|
h(this, "config");
|
|
8087
8093
|
h(this, "state");
|
|
@@ -8321,7 +8327,7 @@ class Xa {
|
|
|
8321
8327
|
return y(e, a);
|
|
8322
8328
|
}
|
|
8323
8329
|
}
|
|
8324
|
-
class
|
|
8330
|
+
class tr {
|
|
8325
8331
|
constructor(e, i, s = {}) {
|
|
8326
8332
|
h(this, "config");
|
|
8327
8333
|
h(this, "state");
|
|
@@ -8755,7 +8761,7 @@ function wt(t) {
|
|
|
8755
8761
|
function Te(t) {
|
|
8756
8762
|
return Number.isInteger(t) && t >= 1 && t <= 6;
|
|
8757
8763
|
}
|
|
8758
|
-
class
|
|
8764
|
+
class ir {
|
|
8759
8765
|
constructor(e, i, s = {}) {
|
|
8760
8766
|
h(this, "config");
|
|
8761
8767
|
h(this, "state");
|
|
@@ -8967,7 +8973,7 @@ class tr {
|
|
|
8967
8973
|
*/
|
|
8968
8974
|
initializeTooltip() {
|
|
8969
8975
|
this.tooltip && (this.tooltip.destroy(), this.tooltip = null), !(!this.config.showTooltip || !this.element) && this.state.clamped && (this.tooltip = new xi(this.element, {
|
|
8970
|
-
content: this.config.isHtml ? wt(this.config.text) :
|
|
8976
|
+
content: this.config.isHtml ? wt(this.config.text) : wa(this.config.text),
|
|
8971
8977
|
isHtml: this.config.isHtml,
|
|
8972
8978
|
position: this.config.tooltipPosition,
|
|
8973
8979
|
delay: this.config.tooltipDelay,
|
|
@@ -8997,7 +9003,7 @@ class tr {
|
|
|
8997
9003
|
return y(e, n);
|
|
8998
9004
|
}
|
|
8999
9005
|
}
|
|
9000
|
-
class
|
|
9006
|
+
class sr {
|
|
9001
9007
|
constructor(e, i, s = {}) {
|
|
9002
9008
|
h(this, "config");
|
|
9003
9009
|
h(this, "state");
|
|
@@ -9165,7 +9171,7 @@ class ir {
|
|
|
9165
9171
|
return y(e, i);
|
|
9166
9172
|
}
|
|
9167
9173
|
}
|
|
9168
|
-
class
|
|
9174
|
+
class nr {
|
|
9169
9175
|
constructor(e, i, s = {}) {
|
|
9170
9176
|
h(this, "config");
|
|
9171
9177
|
h(this, "state");
|
|
@@ -9462,7 +9468,7 @@ class sr {
|
|
|
9462
9468
|
return y(e, i);
|
|
9463
9469
|
}
|
|
9464
9470
|
}
|
|
9465
|
-
const
|
|
9471
|
+
const ar = 80, rr = 1e3, or = "-20% 0px -60% 0px";
|
|
9466
9472
|
class yi {
|
|
9467
9473
|
constructor(e, i, s = {}) {
|
|
9468
9474
|
h(this, "config");
|
|
@@ -9505,7 +9511,7 @@ class yi {
|
|
|
9505
9511
|
if (!s)
|
|
9506
9512
|
return;
|
|
9507
9513
|
this.isScrolling = !0;
|
|
9508
|
-
const n = this.config.scrollOffset ??
|
|
9514
|
+
const n = this.config.scrollOffset ?? ar, a = this.config.scrollBehavior ?? "smooth", r = s.getBoundingClientRect().top + window.scrollY - n;
|
|
9509
9515
|
window.scrollTo({
|
|
9510
9516
|
top: r,
|
|
9511
9517
|
behavior: a
|
|
@@ -9514,7 +9520,7 @@ class yi {
|
|
|
9514
9520
|
activeSectionId: e
|
|
9515
9521
|
}, this.updateActiveStyles(), (l = (o = this.callbacks).onSectionChange) == null || l.call(o, e, this.getState()), this.scrollTimeout !== null && window.clearTimeout(this.scrollTimeout), this.scrollTimeout = window.setTimeout(() => {
|
|
9516
9522
|
this.isScrolling = !1;
|
|
9517
|
-
},
|
|
9523
|
+
}, rr);
|
|
9518
9524
|
}
|
|
9519
9525
|
/**
|
|
9520
9526
|
* アクティブセクションを設定(スクロールなし)
|
|
@@ -9748,7 +9754,7 @@ class yi {
|
|
|
9748
9754
|
*/
|
|
9749
9755
|
setupIntersectionObserver() {
|
|
9750
9756
|
this.observer && this.observer.disconnect();
|
|
9751
|
-
const e = this.config.rootMargin ??
|
|
9757
|
+
const e = this.config.rootMargin ?? or, i = this.config.threshold ?? 0;
|
|
9752
9758
|
this.observer = new IntersectionObserver(
|
|
9753
9759
|
(s) => this.handleIntersection(s),
|
|
9754
9760
|
{ rootMargin: e, threshold: i }
|
|
@@ -9814,7 +9820,7 @@ class yi {
|
|
|
9814
9820
|
return y(e, i);
|
|
9815
9821
|
}
|
|
9816
9822
|
}
|
|
9817
|
-
class
|
|
9823
|
+
class lr {
|
|
9818
9824
|
constructor(e, i = {}, s = {}) {
|
|
9819
9825
|
h(this, "config");
|
|
9820
9826
|
h(this, "state");
|
|
@@ -10037,26 +10043,26 @@ class or {
|
|
|
10037
10043
|
return y(e, s);
|
|
10038
10044
|
}
|
|
10039
10045
|
}
|
|
10040
|
-
function
|
|
10046
|
+
function fe(t) {
|
|
10041
10047
|
if (t)
|
|
10042
10048
|
return typeof t == "string" ? t : t.type;
|
|
10043
10049
|
}
|
|
10044
|
-
function
|
|
10050
|
+
function cr(t) {
|
|
10045
10051
|
return t ? typeof t == "string" ? t === "completed" ? "完了" : "中断" : t.text || (t.type === "completed" ? "完了" : "中断") : "";
|
|
10046
10052
|
}
|
|
10047
|
-
function
|
|
10053
|
+
function dr() {
|
|
10048
10054
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
10049
10055
|
t.setAttribute("viewBox", "0 0 512 512"), t.setAttribute("width", "1em"), t.setAttribute("height", "1em"), t.setAttribute("fill", "currentColor"), t.setAttribute("aria-hidden", "true"), t.classList.add("stepper-icon", "stepper-icon-check");
|
|
10050
10056
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
10051
10057
|
return e.setAttribute("d", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"), t.appendChild(e), t;
|
|
10052
10058
|
}
|
|
10053
|
-
function
|
|
10059
|
+
function hr() {
|
|
10054
10060
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
10055
10061
|
t.setAttribute("viewBox", "0 0 512 512"), t.setAttribute("width", "1em"), t.setAttribute("height", "1em"), t.setAttribute("fill", "currentColor"), t.setAttribute("aria-hidden", "true"), t.classList.add("stepper-icon", "stepper-icon-close");
|
|
10056
10062
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
10057
10063
|
return e.setAttribute("d", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"), t.appendChild(e), t;
|
|
10058
10064
|
}
|
|
10059
|
-
class
|
|
10065
|
+
class ur {
|
|
10060
10066
|
constructor(e, i, s = {}) {
|
|
10061
10067
|
h(this, "config");
|
|
10062
10068
|
h(this, "container");
|
|
@@ -10109,7 +10115,7 @@ class hr {
|
|
|
10109
10115
|
* 水平ステップアイテムをレンダリング
|
|
10110
10116
|
*/
|
|
10111
10117
|
renderHorizontalStep(e, i) {
|
|
10112
|
-
const s = i === this.state.activeIndex, n = i < this.state.activeIndex, a =
|
|
10118
|
+
const s = i === this.state.activeIndex, n = i < this.state.activeIndex, a = fe(e.status), r = a === "completed" || n && !a, o = a === "closed", l = i > 0 && (fe(this.config.steps[i - 1].status) === "completed" || i - 1 < this.state.activeIndex), d = c("li", {
|
|
10113
10119
|
className: [
|
|
10114
10120
|
"stepper-item",
|
|
10115
10121
|
"stepper-item-horizontal",
|
|
@@ -10165,7 +10171,7 @@ class hr {
|
|
|
10165
10171
|
* 垂直ステップアイテムをレンダリング
|
|
10166
10172
|
*/
|
|
10167
10173
|
renderVerticalStep(e, i) {
|
|
10168
|
-
const s = i === this.state.activeIndex, n = i < this.state.activeIndex, a =
|
|
10174
|
+
const s = i === this.state.activeIndex, n = i < this.state.activeIndex, a = fe(e.status), r = a === "completed" || n && !a, o = a === "closed", l = i === this.config.steps.length - 1, d = c("li", {
|
|
10169
10175
|
className: [
|
|
10170
10176
|
"stepper-item",
|
|
10171
10177
|
"stepper-item-vertical",
|
|
@@ -10196,7 +10202,7 @@ class hr {
|
|
|
10196
10202
|
* ステップカウンターをレンダリング
|
|
10197
10203
|
*/
|
|
10198
10204
|
renderStepCounter(e, i, s) {
|
|
10199
|
-
const n =
|
|
10205
|
+
const n = fe(s), a = n === "completed" || n === "closed", r = c("span", {
|
|
10200
10206
|
className: [
|
|
10201
10207
|
"stepper-counter",
|
|
10202
10208
|
i ? "is-current" : "",
|
|
@@ -10211,7 +10217,7 @@ class hr {
|
|
|
10211
10217
|
const l = c("span", {
|
|
10212
10218
|
className: "stepper-status-icon"
|
|
10213
10219
|
});
|
|
10214
|
-
l.setAttribute("role", "img"), l.setAttribute("aria-label",
|
|
10220
|
+
l.setAttribute("role", "img"), l.setAttribute("aria-label", cr(s)), n === "completed" ? l.appendChild(dr()) : n === "closed" && l.appendChild(hr()), r.appendChild(l);
|
|
10215
10221
|
}
|
|
10216
10222
|
return r;
|
|
10217
10223
|
}
|
|
@@ -10245,14 +10251,14 @@ class hr {
|
|
|
10245
10251
|
`);
|
|
10246
10252
|
}
|
|
10247
10253
|
}
|
|
10248
|
-
const
|
|
10254
|
+
const pr = {
|
|
10249
10255
|
info: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>',
|
|
10250
10256
|
success: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.151-.043l4.25-5.5Z" clip-rule="evenodd" /></svg>',
|
|
10251
10257
|
warning: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M6.701 2.25c.577-1 2.02-1 2.598 0l5.196 9a1.5 1.5 0 0 1-1.299 2.25H2.804a1.5 1.5 0 0 1-1.3-2.25l5.197-9ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>',
|
|
10252
10258
|
error: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>',
|
|
10253
10259
|
sync: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M13.836 2.477a.75.75 0 0 1 .75.75v3.182a.75.75 0 0 1-.75.75h-3.182a.75.75 0 0 1 0-1.5h1.37l-.84-.841a4.5 4.5 0 0 0-7.08.681.75.75 0 0 1-1.264-.808 6 6 0 0 1 9.44-.908l.84.84v-1.646a.75.75 0 0 1 .75-.75Zm-1.672 9.046a.75.75 0 0 1 1.264.808 6 6 0 0 1-9.44.908l-.84-.84v1.646a.75.75 0 0 1-1.5 0V10.82a.75.75 0 0 1 .75-.75h3.182a.75.75 0 0 1 0 1.5h-1.37l.84.841a4.5 4.5 0 0 0 7.08-.681Z" clip-rule="evenodd" /></svg>'
|
|
10254
10260
|
};
|
|
10255
|
-
class
|
|
10261
|
+
class fr {
|
|
10256
10262
|
constructor(e, i, s = {}) {
|
|
10257
10263
|
h(this, "config");
|
|
10258
10264
|
h(this, "state");
|
|
@@ -10407,7 +10413,7 @@ class pr {
|
|
|
10407
10413
|
"aria-hidden": "true"
|
|
10408
10414
|
}
|
|
10409
10415
|
});
|
|
10410
|
-
return i.innerHTML =
|
|
10416
|
+
return i.innerHTML = pr[e], i;
|
|
10411
10417
|
}
|
|
10412
10418
|
renderTitle() {
|
|
10413
10419
|
const e = this.config.bold ?? !1, i = this.config.toggleable ?? !1, s = c("span", {
|
|
@@ -10529,7 +10535,7 @@ class pr {
|
|
|
10529
10535
|
return y(e, n);
|
|
10530
10536
|
}
|
|
10531
10537
|
}
|
|
10532
|
-
class
|
|
10538
|
+
class mr {
|
|
10533
10539
|
constructor(e, i, s = {}) {
|
|
10534
10540
|
h(this, "config");
|
|
10535
10541
|
h(this, "state");
|
|
@@ -11241,11 +11247,11 @@ class Ci {
|
|
|
11241
11247
|
return y(e, l);
|
|
11242
11248
|
}
|
|
11243
11249
|
}
|
|
11244
|
-
function
|
|
11250
|
+
function gr() {
|
|
11245
11251
|
return typeof window < "u" && window.faker ? window.faker : null;
|
|
11246
11252
|
}
|
|
11247
|
-
function
|
|
11248
|
-
const i =
|
|
11253
|
+
function br(t, e) {
|
|
11254
|
+
const i = gr(), s = t.toLowerCase();
|
|
11249
11255
|
if (i) {
|
|
11250
11256
|
try {
|
|
11251
11257
|
i.locale = "ja";
|
|
@@ -11293,28 +11299,28 @@ function gr(t, e) {
|
|
|
11293
11299
|
}
|
|
11294
11300
|
return `${t} ${e + 1}`;
|
|
11295
11301
|
}
|
|
11296
|
-
function
|
|
11302
|
+
function vr(t, e) {
|
|
11297
11303
|
const i = {
|
|
11298
11304
|
id: e + 1
|
|
11299
11305
|
};
|
|
11300
11306
|
for (const s of t)
|
|
11301
|
-
i[s.id] =
|
|
11307
|
+
i[s.id] = br(s.label, e);
|
|
11302
11308
|
return i;
|
|
11303
11309
|
}
|
|
11304
|
-
function
|
|
11310
|
+
function xr(t, e = 10) {
|
|
11305
11311
|
const i = [];
|
|
11306
11312
|
for (let s = 0; s < e; s++)
|
|
11307
|
-
i.push(
|
|
11313
|
+
i.push(vr(t, s));
|
|
11308
11314
|
return i;
|
|
11309
11315
|
}
|
|
11310
11316
|
function A(t) {
|
|
11311
11317
|
const e = document.createElement("div");
|
|
11312
11318
|
return e.textContent = t, e.innerHTML;
|
|
11313
11319
|
}
|
|
11314
|
-
function
|
|
11320
|
+
function yr(t) {
|
|
11315
11321
|
return `${t}-${Math.random().toString(36).substring(2, 11)}`;
|
|
11316
11322
|
}
|
|
11317
|
-
function
|
|
11323
|
+
function Cr(t, e) {
|
|
11318
11324
|
var i, s;
|
|
11319
11325
|
if (t == null)
|
|
11320
11326
|
return "-";
|
|
@@ -11345,26 +11351,26 @@ function yr(t, e) {
|
|
|
11345
11351
|
return String(t);
|
|
11346
11352
|
}
|
|
11347
11353
|
}
|
|
11348
|
-
function
|
|
11354
|
+
function kr(t, e) {
|
|
11349
11355
|
if (e.format !== "status" || !e.status_map)
|
|
11350
11356
|
return "";
|
|
11351
11357
|
const i = e.status_map[String(t)];
|
|
11352
11358
|
return i ? `status-badge status-${i.color}` : "status-badge status-default";
|
|
11353
11359
|
}
|
|
11354
|
-
function
|
|
11360
|
+
function wr(t) {
|
|
11355
11361
|
return typeof t.fixed_header == "boolean" ? { enabled: t.fixed_header, offset: 0 } : t.fixed_header ? {
|
|
11356
11362
|
enabled: t.fixed_header.enabled !== !1,
|
|
11357
11363
|
offset: t.fixed_header.offset ?? 0
|
|
11358
11364
|
} : { enabled: !1, offset: 0 };
|
|
11359
11365
|
}
|
|
11360
|
-
function
|
|
11366
|
+
function Er(t) {
|
|
11361
11367
|
return typeof t.column_resize == "boolean" ? { enabled: t.column_resize, minWidth: 50, maxWidth: 500 } : t.column_resize ? {
|
|
11362
11368
|
enabled: t.column_resize.enabled !== !1,
|
|
11363
11369
|
minWidth: t.column_resize.min_width ?? 50,
|
|
11364
11370
|
maxWidth: t.column_resize.max_width ?? 500
|
|
11365
11371
|
} : { enabled: !1, minWidth: 50, maxWidth: 500 };
|
|
11366
11372
|
}
|
|
11367
|
-
function
|
|
11373
|
+
function Ar(t, e) {
|
|
11368
11374
|
return t.map((i) => {
|
|
11369
11375
|
const s = i.style ? `btn-${i.style}` : "btn-link", n = i.icon ? `<span class="action-icon">${A(i.icon)}</span>` : "";
|
|
11370
11376
|
return `
|
|
@@ -11381,66 +11387,66 @@ function Er(t, e) {
|
|
|
11381
11387
|
`;
|
|
11382
11388
|
}).join("");
|
|
11383
11389
|
}
|
|
11384
|
-
function
|
|
11390
|
+
function Ir(t) {
|
|
11385
11391
|
var w, F;
|
|
11386
11392
|
const e = ["mokkun-data-table"];
|
|
11387
11393
|
t.striped && e.push("striped"), t.hoverable !== !1 && e.push("hoverable"), t.bordered && e.push("bordered"), t.compact && e.push("compact"), t.responsive !== !1 && e.push("responsive");
|
|
11388
|
-
const i =
|
|
11394
|
+
const i = wr(t);
|
|
11389
11395
|
i.enabled && e.push("fixed-header");
|
|
11390
|
-
const s =
|
|
11396
|
+
const s = Er(t);
|
|
11391
11397
|
s.enabled && e.push("resizable-columns"), (w = t.grouping) != null && w.enabled && e.push("grouped"), t.layout === "fixed" && e.push("layout-fixed");
|
|
11392
|
-
const n =
|
|
11398
|
+
const n = yr("data-table");
|
|
11393
11399
|
let a = t.data ?? [];
|
|
11394
11400
|
if (a.length === 0 && t.columns.length > 0) {
|
|
11395
11401
|
const b = ((F = t.pagination) == null ? void 0 : F.page_size) ?? 10;
|
|
11396
|
-
a =
|
|
11402
|
+
a = xr(t.columns, b);
|
|
11397
11403
|
}
|
|
11398
11404
|
const r = t.height ? `max-height: ${t.height};` : "", o = t.columns.map((b) => {
|
|
11399
|
-
const
|
|
11405
|
+
const te = b.sortable !== !1 ? "sortable" : "", W = b.align ? `align-${b.align}` : "", ie = b.fixed ? `fixed-${b.fixed}` : "", T = b.width ? `width: ${b.width};` : "", he = s.enabled && b.resizable !== !1 ? `<span class="column-resize-handle" data-column-id="${A(b.id)}"></span>` : "", ue = b.colspan && Number.isInteger(b.colspan) && b.colspan > 0 ? `colspan="${b.colspan}"` : "", pe = b.rowspan && Number.isInteger(b.rowspan) && b.rowspan > 0 ? `rowspan="${b.rowspan}"` : "";
|
|
11400
11406
|
return `
|
|
11401
|
-
<th class="data-table-th ${
|
|
11407
|
+
<th class="data-table-th ${te} ${W} ${ie}" data-column-id="${A(b.id)}" style="${T}" ${ue} ${pe}>
|
|
11402
11408
|
<span class="th-content">${A(b.label)}</span>
|
|
11403
|
-
${
|
|
11409
|
+
${he}
|
|
11404
11410
|
</th>
|
|
11405
11411
|
`;
|
|
11406
11412
|
}).join(""), l = t.selection === "multiple" ? '<th class="data-table-th selection-header"><input type="checkbox" class="select-all-checkbox" /></th>' : t.selection === "single" ? '<th class="data-table-th selection-header"></th>' : "", d = t.row_actions && t.row_actions.length > 0 ? '<th class="data-table-th actions-header">操作</th>' : "";
|
|
11407
11413
|
let p;
|
|
11408
11414
|
if (a.length === 0) {
|
|
11409
|
-
const b = t.empty_state ?? {},
|
|
11410
|
-
let
|
|
11411
|
-
t.selection && t.selection !== "none" &&
|
|
11412
|
-
const
|
|
11415
|
+
const b = t.empty_state ?? {}, te = b.title ?? "データがありません", W = b.description ?? "", ie = b.icon ?? "📭";
|
|
11416
|
+
let T = t.columns.length;
|
|
11417
|
+
t.selection && t.selection !== "none" && T++, t.row_actions && t.row_actions.length > 0 && T++;
|
|
11418
|
+
const se = b.action ? `<button type="button" class="btn btn-primary empty-state-action" data-handler="${A(b.action.handler)}">${A(b.action.label)}</button>` : "";
|
|
11413
11419
|
p = `
|
|
11414
11420
|
<tr class="empty-state-row">
|
|
11415
|
-
<td colspan="${
|
|
11421
|
+
<td colspan="${T}" class="empty-state-cell">
|
|
11416
11422
|
<div class="empty-state">
|
|
11417
11423
|
<div class="empty-state-icon-wrapper">
|
|
11418
|
-
<span class="empty-state-icon">${A(
|
|
11424
|
+
<span class="empty-state-icon">${A(ie)}</span>
|
|
11419
11425
|
</div>
|
|
11420
11426
|
<div class="empty-state-content">
|
|
11421
|
-
<h4 class="empty-state-title">${A(
|
|
11427
|
+
<h4 class="empty-state-title">${A(te)}</h4>
|
|
11422
11428
|
${W ? `<p class="empty-state-description">${A(W)}</p>` : ""}
|
|
11423
11429
|
</div>
|
|
11424
|
-
${
|
|
11430
|
+
${se ? `<div class="empty-state-actions">${se}</div>` : ""}
|
|
11425
11431
|
</div>
|
|
11426
11432
|
</td>
|
|
11427
11433
|
</tr>
|
|
11428
11434
|
`;
|
|
11429
11435
|
} else
|
|
11430
11436
|
p = a.map((b) => {
|
|
11431
|
-
const
|
|
11437
|
+
const te = t.columns.map((T) => {
|
|
11432
11438
|
var Xe;
|
|
11433
|
-
const
|
|
11434
|
-
if (
|
|
11439
|
+
const se = T.field ?? T.id, he = b[se], ue = Cr(he, T), pe = kr(he, T), $i = T.align ? `align-${T.align}` : "", _i = T.fixed ? `fixed-${T.fixed}` : "", M = (Xe = b._cellMerge) == null ? void 0 : Xe[T.id];
|
|
11440
|
+
if (M != null && M.hidden)
|
|
11435
11441
|
return "";
|
|
11436
|
-
const Ni =
|
|
11442
|
+
const Ni = M != null && M.colspan && Number.isInteger(M.colspan) && M.colspan > 0 ? `colspan="${M.colspan}"` : "", Ti = M != null && M.rowspan && Number.isInteger(M.rowspan) && M.rowspan > 0 ? `rowspan="${M.rowspan}"` : "", Mi = pe ? `<span class="${pe}">${A(ue)}</span>` : A(ue);
|
|
11437
11443
|
return `<td class="data-table-td ${$i} ${_i}" ${Ni} ${Ti}>${Mi}</td>`;
|
|
11438
|
-
}).join(""), W = t.selection === "multiple" ? `<td class="data-table-td selection-cell"><input type="checkbox" class="row-checkbox" data-row-id="${A(String(b.id))}" /></td>` : t.selection === "single" ? `<td class="data-table-td selection-cell"><input type="radio" name="${n}-selection" class="row-radio" data-row-id="${A(String(b.id))}" /></td>` : "",
|
|
11444
|
+
}).join(""), W = t.selection === "multiple" ? `<td class="data-table-td selection-cell"><input type="checkbox" class="row-checkbox" data-row-id="${A(String(b.id))}" /></td>` : t.selection === "single" ? `<td class="data-table-td selection-cell"><input type="radio" name="${n}-selection" class="row-radio" data-row-id="${A(String(b.id))}" /></td>` : "", ie = t.row_actions && t.row_actions.length > 0 ? `<td class="data-table-td actions-cell">${Ar(t.row_actions, b)}</td>` : "";
|
|
11439
11445
|
return `
|
|
11440
11446
|
<tr class="data-table-tr" data-row-id="${A(String(b.id))}">
|
|
11441
11447
|
${W}
|
|
11442
|
-
${
|
|
11443
|
-
${
|
|
11448
|
+
${te}
|
|
11449
|
+
${ie}
|
|
11444
11450
|
</tr>
|
|
11445
11451
|
`;
|
|
11446
11452
|
}).join("");
|
|
@@ -11468,15 +11474,15 @@ function Ar(t) {
|
|
|
11468
11474
|
</div>
|
|
11469
11475
|
`;
|
|
11470
11476
|
}
|
|
11471
|
-
function
|
|
11477
|
+
function Sr(t) {
|
|
11472
11478
|
return `${t}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
11473
11479
|
}
|
|
11474
|
-
function
|
|
11480
|
+
function ne(t) {
|
|
11475
11481
|
const e = document.createElement("div");
|
|
11476
11482
|
return e.textContent = t, e.innerHTML;
|
|
11477
11483
|
}
|
|
11478
|
-
function
|
|
11479
|
-
const e =
|
|
11484
|
+
function Lr(t) {
|
|
11485
|
+
const e = Sr("photo-manager"), i = t.photos ?? [], s = t.max_photos ?? 20, n = t.max_file_size ?? 10, a = t.accepted_formats ?? ["JPG", "PNG"], r = t.columns ?? 4, o = `
|
|
11480
11486
|
<div class="photo-upload-area" data-manager-id="${e}">
|
|
11481
11487
|
<div class="upload-icon">📷</div>
|
|
11482
11488
|
<div class="upload-text">ここにファイルをドラッグ&ドロップ<br>または</div>
|
|
@@ -11497,8 +11503,8 @@ function Sr(t) {
|
|
|
11497
11503
|
${i.map((u, f) => {
|
|
11498
11504
|
const g = u.is_main ?? f === 0;
|
|
11499
11505
|
return `
|
|
11500
|
-
<div class="photo-item" data-photo-id="${
|
|
11501
|
-
<img src="${
|
|
11506
|
+
<div class="photo-item" data-photo-id="${ne(u.id)}" data-index="${f}" draggable="true">
|
|
11507
|
+
<img src="${ne(u.src)}" alt="${ne(u.alt ?? `写真${f + 1}`)}" loading="lazy" />
|
|
11502
11508
|
${g ? '<span class="photo-main-badge">メイン</span>' : ""}
|
|
11503
11509
|
<span class="photo-order-badge">${f + 1}</span>
|
|
11504
11510
|
<div class="photo-overlay">
|
|
@@ -11516,8 +11522,8 @@ function Sr(t) {
|
|
|
11516
11522
|
`;
|
|
11517
11523
|
return `
|
|
11518
11524
|
<div class="field-wrapper field-type-photo_manager">
|
|
11519
|
-
${t.label ? `<label class="field-label">${
|
|
11520
|
-
${t.description ? `<p class="field-description">${
|
|
11525
|
+
${t.label ? `<label class="field-label">${ne(t.label)}</label>` : ""}
|
|
11526
|
+
${t.description ? `<p class="field-description">${ne(t.description)}</p>` : ""}
|
|
11521
11527
|
<div
|
|
11522
11528
|
class="photo-manager"
|
|
11523
11529
|
id="${e}"
|
|
@@ -11533,7 +11539,7 @@ function Sr(t) {
|
|
|
11533
11539
|
</div>
|
|
11534
11540
|
`;
|
|
11535
11541
|
}
|
|
11536
|
-
function
|
|
11542
|
+
function $r(t) {
|
|
11537
11543
|
const e = [R(t)];
|
|
11538
11544
|
t.accept && t.accept.length > 0 && e.push(`accept="${t.accept.join(",")}"`), t.multiple && e.push("multiple");
|
|
11539
11545
|
const i = t.drag_drop ? "with-dropzone" : "";
|
|
@@ -11551,7 +11557,7 @@ function Lr(t) {
|
|
|
11551
11557
|
}
|
|
11552
11558
|
return y(t, s);
|
|
11553
11559
|
}
|
|
11554
|
-
function
|
|
11560
|
+
function _r(t) {
|
|
11555
11561
|
const e = t.height ?? "300", i = t.width ?? "100%", s = t.show_open_link !== !1, n = `
|
|
11556
11562
|
<div class="google-map-embed-container" data-field-id="${m(t.id)}">
|
|
11557
11563
|
<div class="google-map-embed-input-wrapper">
|
|
@@ -11585,8 +11591,8 @@ function $r(t) {
|
|
|
11585
11591
|
`;
|
|
11586
11592
|
return y(t, n);
|
|
11587
11593
|
}
|
|
11588
|
-
function
|
|
11589
|
-
const e = t.accepted_formats ?? ["image/jpeg", "image/png", "image/webp"], i = t.max_file_size ?? 5 * 1024 * 1024, s = t.max_files ?? 10, n = e.map(
|
|
11594
|
+
function Nr(t) {
|
|
11595
|
+
const e = t.accepted_formats ?? ["image/jpeg", "image/png", "image/webp"], i = t.max_file_size ?? 5 * 1024 * 1024, s = t.max_files ?? 10, n = e.map(Aa).join(", "), a = Ea(i), r = `
|
|
11590
11596
|
<div class="image-uploader-container"
|
|
11591
11597
|
data-field-id="${m(t.id)}"
|
|
11592
11598
|
data-accepted-formats="${m(e.join(","))}"
|
|
@@ -11621,7 +11627,7 @@ function _r(t) {
|
|
|
11621
11627
|
`;
|
|
11622
11628
|
return y(t, r);
|
|
11623
11629
|
}
|
|
11624
|
-
function
|
|
11630
|
+
function Tr(t) {
|
|
11625
11631
|
const e = t.item_fields ?? [], i = t.max_items, s = m(t.add_button_label ?? "Add Item"), n = e.map((l) => ki(l)).join(""), a = i ? `1 / ${i}` : "1 items", o = `
|
|
11626
11632
|
<div class="mokkun-repeater ${t.sortable ? "sortable" : ""}">
|
|
11627
11633
|
<div class="repeater-wrapper">
|
|
@@ -11661,76 +11667,76 @@ function ki(t) {
|
|
|
11661
11667
|
case "multi_select":
|
|
11662
11668
|
return Ce.renderField(t);
|
|
11663
11669
|
case "combobox":
|
|
11664
|
-
return
|
|
11670
|
+
return La.renderField(t);
|
|
11665
11671
|
case "radio_group":
|
|
11666
|
-
return
|
|
11672
|
+
return Sa.renderField(t);
|
|
11667
11673
|
case "checkbox":
|
|
11668
11674
|
case "checkbox_group":
|
|
11669
11675
|
return ke.renderField(t);
|
|
11670
11676
|
case "duration_picker":
|
|
11671
|
-
return $a.renderField(t);
|
|
11672
|
-
case "duration_input":
|
|
11673
11677
|
return _a.renderField(t);
|
|
11678
|
+
case "duration_input":
|
|
11679
|
+
return Na.renderField(t);
|
|
11674
11680
|
case "file_upload":
|
|
11675
|
-
return
|
|
11681
|
+
return $r(t);
|
|
11676
11682
|
case "image_uploader":
|
|
11677
|
-
return _r(t);
|
|
11678
|
-
case "repeater":
|
|
11679
11683
|
return Nr(t);
|
|
11684
|
+
case "repeater":
|
|
11685
|
+
return Tr(t);
|
|
11680
11686
|
case "data_table":
|
|
11681
|
-
return
|
|
11687
|
+
return Ir(t);
|
|
11682
11688
|
case "google_map_embed":
|
|
11683
|
-
return
|
|
11689
|
+
return _r(t);
|
|
11684
11690
|
case "photo_manager":
|
|
11685
|
-
return
|
|
11691
|
+
return Lr(t);
|
|
11686
11692
|
case "heading":
|
|
11687
|
-
return
|
|
11693
|
+
return $a.renderField(t);
|
|
11688
11694
|
case "pagination":
|
|
11689
|
-
return Na.renderField(t);
|
|
11690
|
-
case "toggle":
|
|
11691
11695
|
return Ta.renderField(t);
|
|
11692
|
-
case "
|
|
11696
|
+
case "toggle":
|
|
11693
11697
|
return Ma.renderField(t);
|
|
11694
|
-
case "
|
|
11698
|
+
case "badge":
|
|
11695
11699
|
return Da.renderField(t);
|
|
11696
|
-
case "
|
|
11700
|
+
case "browser":
|
|
11697
11701
|
return Fa.renderField(t);
|
|
11702
|
+
case "calendar":
|
|
11703
|
+
return Oa.renderField(t);
|
|
11698
11704
|
case "tooltip":
|
|
11699
11705
|
return xi.renderField(t);
|
|
11700
11706
|
case "float_area":
|
|
11701
|
-
return Oa.renderField(t);
|
|
11702
|
-
case "loader":
|
|
11703
11707
|
return Ha.renderField(t);
|
|
11708
|
+
case "loader":
|
|
11709
|
+
return za.renderField(t);
|
|
11704
11710
|
case "notification_bar":
|
|
11705
|
-
return
|
|
11711
|
+
return Pa.renderField(t);
|
|
11706
11712
|
case "response_message":
|
|
11707
|
-
return
|
|
11713
|
+
return qa.renderField(t);
|
|
11708
11714
|
case "timeline":
|
|
11709
|
-
return Za.renderField(t);
|
|
11710
|
-
case "chip":
|
|
11711
11715
|
return Ka.renderField(t);
|
|
11716
|
+
case "chip":
|
|
11717
|
+
return Qa.renderField(t);
|
|
11712
11718
|
case "status_label":
|
|
11713
|
-
return Ja.renderField(t);
|
|
11714
|
-
case "segmented_control":
|
|
11715
11719
|
return Xa.renderField(t);
|
|
11716
|
-
case "
|
|
11720
|
+
case "segmented_control":
|
|
11717
11721
|
return er.renderField(t);
|
|
11718
|
-
case "
|
|
11722
|
+
case "tabs":
|
|
11719
11723
|
return tr.renderField(t);
|
|
11720
|
-
case "
|
|
11724
|
+
case "line_clamp":
|
|
11721
11725
|
return ir.renderField(t);
|
|
11722
|
-
case "
|
|
11726
|
+
case "disclosure":
|
|
11723
11727
|
return sr.renderField(t);
|
|
11728
|
+
case "accordion_panel":
|
|
11729
|
+
return nr.renderField(t);
|
|
11724
11730
|
case "section_nav":
|
|
11725
11731
|
return yi.renderField(t);
|
|
11726
11732
|
case "definition_list":
|
|
11727
|
-
return
|
|
11733
|
+
return lr.renderField(t);
|
|
11728
11734
|
case "stepper":
|
|
11729
|
-
return
|
|
11735
|
+
return ur.renderField(t);
|
|
11730
11736
|
case "information_panel":
|
|
11731
|
-
return pr.renderField(t);
|
|
11732
|
-
case "dropdown":
|
|
11733
11737
|
return fr.renderField(t);
|
|
11738
|
+
case "dropdown":
|
|
11739
|
+
return mr.renderField(t);
|
|
11734
11740
|
case "delete_confirm_dialog":
|
|
11735
11741
|
return Ci.renderField(t);
|
|
11736
11742
|
default:
|
|
@@ -11744,7 +11750,7 @@ function z(t) {
|
|
|
11744
11750
|
const e = document.createElement("div");
|
|
11745
11751
|
return e.textContent = t, e.innerHTML;
|
|
11746
11752
|
}
|
|
11747
|
-
function
|
|
11753
|
+
function Mr(t) {
|
|
11748
11754
|
switch (t) {
|
|
11749
11755
|
case "primary":
|
|
11750
11756
|
return "btn btn-primary";
|
|
@@ -11758,8 +11764,8 @@ function Tr(t) {
|
|
|
11758
11764
|
return "btn btn-secondary";
|
|
11759
11765
|
}
|
|
11760
11766
|
}
|
|
11761
|
-
function
|
|
11762
|
-
const e =
|
|
11767
|
+
function Dr(t) {
|
|
11768
|
+
const e = Mr(t.style), i = t.icon ? `<span class="btn-icon">${z(t.icon)}</span>` : "", s = [
|
|
11763
11769
|
`data-action-id="${z(t.id)}"`,
|
|
11764
11770
|
`data-action-type="${z(t.type)}"`
|
|
11765
11771
|
];
|
|
@@ -11774,14 +11780,14 @@ function Mr(t) {
|
|
|
11774
11780
|
</button>
|
|
11775
11781
|
`;
|
|
11776
11782
|
}
|
|
11777
|
-
function
|
|
11778
|
-
return t.length === 0 ? "" : `<div class="actions">${t.map(
|
|
11783
|
+
function Fr(t) {
|
|
11784
|
+
return t.length === 0 ? "" : `<div class="actions">${t.map(Dr).join("")}</div>`;
|
|
11779
11785
|
}
|
|
11780
11786
|
function P(t) {
|
|
11781
11787
|
const e = document.createElement("div");
|
|
11782
11788
|
return e.textContent = t, e.innerHTML;
|
|
11783
11789
|
}
|
|
11784
|
-
function
|
|
11790
|
+
function Or(t) {
|
|
11785
11791
|
if (!t)
|
|
11786
11792
|
return "";
|
|
11787
11793
|
const e = [];
|
|
@@ -11796,10 +11802,10 @@ function Ke(t) {
|
|
|
11796
11802
|
</header>
|
|
11797
11803
|
`;
|
|
11798
11804
|
}
|
|
11799
|
-
function
|
|
11805
|
+
function Hr(t) {
|
|
11800
11806
|
if (!t.fields || t.fields.length === 0)
|
|
11801
11807
|
return "";
|
|
11802
|
-
const e =
|
|
11808
|
+
const e = Or(t.layout), i = Ze(t.fields);
|
|
11803
11809
|
return `
|
|
11804
11810
|
<div class="fields-section" ${e}>
|
|
11805
11811
|
${i}
|
|
@@ -11809,11 +11815,11 @@ function Or(t) {
|
|
|
11809
11815
|
function wi(t) {
|
|
11810
11816
|
return !t.actions || t.actions.length === 0 ? "" : `
|
|
11811
11817
|
<div class="actions-section">
|
|
11812
|
-
${
|
|
11818
|
+
${Fr(t.actions)}
|
|
11813
11819
|
</div>
|
|
11814
11820
|
`;
|
|
11815
11821
|
}
|
|
11816
|
-
function
|
|
11822
|
+
function zr(t, e) {
|
|
11817
11823
|
return !t.wizard || !t.wizard.show_progress ? "" : `
|
|
11818
11824
|
<div class="wizard-progress">
|
|
11819
11825
|
${t.wizard.steps.map((n, a) => {
|
|
@@ -11828,7 +11834,7 @@ function Hr(t, e) {
|
|
|
11828
11834
|
</div>
|
|
11829
11835
|
`;
|
|
11830
11836
|
}
|
|
11831
|
-
function
|
|
11837
|
+
function Br(t, e) {
|
|
11832
11838
|
if (!t.wizard)
|
|
11833
11839
|
return "";
|
|
11834
11840
|
const i = t.wizard.steps[e];
|
|
@@ -11853,7 +11859,7 @@ function zr(t, e) {
|
|
|
11853
11859
|
function Ei(t, e = 0) {
|
|
11854
11860
|
if (!t.wizard)
|
|
11855
11861
|
return Qe(t);
|
|
11856
|
-
const i =
|
|
11862
|
+
const i = zr(t, e), s = Br(t, e);
|
|
11857
11863
|
return `
|
|
11858
11864
|
<div class="screen wizard-screen">
|
|
11859
11865
|
${Ke(t)}
|
|
@@ -11867,7 +11873,7 @@ function Ei(t, e = 0) {
|
|
|
11867
11873
|
function Ai(t, e) {
|
|
11868
11874
|
return `section-${t.toLowerCase().replace(/[^a-z0-9\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf]/g, "_").replace(/_+/g, "_").replace(/^_|_$/g, "") || e}`;
|
|
11869
11875
|
}
|
|
11870
|
-
function
|
|
11876
|
+
function Rr(t) {
|
|
11871
11877
|
if (!t.sections || t.sections.length === 0)
|
|
11872
11878
|
return Qe(t);
|
|
11873
11879
|
const e = Ii(t), i = Ke(t), s = wi(t), n = t.sections.map((a, r) => {
|
|
@@ -11910,8 +11916,8 @@ function Qe(t) {
|
|
|
11910
11916
|
if (t.wizard)
|
|
11911
11917
|
return Ei(t, 0);
|
|
11912
11918
|
if (t.sections && t.sections.length > 0)
|
|
11913
|
-
return
|
|
11914
|
-
const e = Ii(t), i = Ke(t), s =
|
|
11919
|
+
return Rr(t);
|
|
11920
|
+
const e = Ii(t), i = Ke(t), s = Hr(t), n = wi(t);
|
|
11915
11921
|
return `
|
|
11916
11922
|
<div class="screen">
|
|
11917
11923
|
${e}
|
|
@@ -11923,7 +11929,7 @@ function Qe(t) {
|
|
|
11923
11929
|
</div>
|
|
11924
11930
|
`;
|
|
11925
11931
|
}
|
|
11926
|
-
function
|
|
11932
|
+
function Pr(t, e) {
|
|
11927
11933
|
if (!e.sections || e.sections.length === 0)
|
|
11928
11934
|
return null;
|
|
11929
11935
|
const i = t.querySelector("#section-nav-container");
|
|
@@ -11950,7 +11956,7 @@ function Rr(t, e) {
|
|
|
11950
11956
|
destroy: () => n.destroy()
|
|
11951
11957
|
};
|
|
11952
11958
|
}
|
|
11953
|
-
function
|
|
11959
|
+
function Vr(t, e, i = 0) {
|
|
11954
11960
|
let s = i;
|
|
11955
11961
|
function n() {
|
|
11956
11962
|
t.innerHTML = Ei(e, s), a();
|
|
@@ -11979,7 +11985,7 @@ function Pr(t, e, i = 0) {
|
|
|
11979
11985
|
}
|
|
11980
11986
|
};
|
|
11981
11987
|
}
|
|
11982
|
-
class
|
|
11988
|
+
class jr {
|
|
11983
11989
|
constructor(e, i = {}, s = /* @__PURE__ */ new Map()) {
|
|
11984
11990
|
h(this, "container");
|
|
11985
11991
|
h(this, "callbacks");
|
|
@@ -12080,23 +12086,23 @@ class Vr {
|
|
|
12080
12086
|
}
|
|
12081
12087
|
}
|
|
12082
12088
|
}
|
|
12083
|
-
function
|
|
12084
|
-
const s = new
|
|
12089
|
+
function Ur(t, e = {}, i) {
|
|
12090
|
+
const s = new jr(t, e, i);
|
|
12085
12091
|
return s.attach(), s;
|
|
12086
12092
|
}
|
|
12087
12093
|
const Si = [".yaml", ".yml"], Et = ["https:", "http:"];
|
|
12088
|
-
function
|
|
12094
|
+
function qr(t) {
|
|
12089
12095
|
const e = t.toLowerCase();
|
|
12090
12096
|
return Si.some((i) => e.endsWith(i));
|
|
12091
12097
|
}
|
|
12092
|
-
function
|
|
12098
|
+
function Wr(t) {
|
|
12093
12099
|
return {
|
|
12094
12100
|
type: "INVALID_FILE_TYPE",
|
|
12095
12101
|
message: `無効なファイル形式: ${t}`,
|
|
12096
12102
|
details: `YAMLファイル(${Si.join(", ")})のみ対応しています`
|
|
12097
12103
|
};
|
|
12098
12104
|
}
|
|
12099
|
-
function
|
|
12105
|
+
function Yr(t, e, i) {
|
|
12100
12106
|
const s = Ge(t);
|
|
12101
12107
|
return s.success ? {
|
|
12102
12108
|
success: !0,
|
|
@@ -12108,12 +12114,12 @@ function Wr(t, e, i) {
|
|
|
12108
12114
|
error: {
|
|
12109
12115
|
type: "YAML_PARSE_ERROR",
|
|
12110
12116
|
message: "YAMLのパースに失敗しました",
|
|
12111
|
-
details:
|
|
12117
|
+
details: ka(s.errors),
|
|
12112
12118
|
parseErrors: s.errors
|
|
12113
12119
|
}
|
|
12114
12120
|
};
|
|
12115
12121
|
}
|
|
12116
|
-
async function
|
|
12122
|
+
async function Gr(t) {
|
|
12117
12123
|
const e = new URL(t, window.location.href), i = e.pathname.split("/"), s = i[i.length - 1] || "unknown.yaml";
|
|
12118
12124
|
if (!Et.includes(e.protocol))
|
|
12119
12125
|
return {
|
|
@@ -12124,10 +12130,10 @@ async function Yr(t) {
|
|
|
12124
12130
|
details: `許可されているプロトコル: ${Et.join(", ")}`
|
|
12125
12131
|
}
|
|
12126
12132
|
};
|
|
12127
|
-
if (!
|
|
12133
|
+
if (!qr(s))
|
|
12128
12134
|
return {
|
|
12129
12135
|
success: !1,
|
|
12130
|
-
error:
|
|
12136
|
+
error: Wr(s)
|
|
12131
12137
|
};
|
|
12132
12138
|
try {
|
|
12133
12139
|
const n = await fetch(t);
|
|
@@ -12141,7 +12147,7 @@ async function Yr(t) {
|
|
|
12141
12147
|
}
|
|
12142
12148
|
};
|
|
12143
12149
|
const a = await n.text();
|
|
12144
|
-
return
|
|
12150
|
+
return Yr(a, s, "url");
|
|
12145
12151
|
} catch (n) {
|
|
12146
12152
|
const a = n instanceof Error ? n.message : String(n);
|
|
12147
12153
|
return {
|
|
@@ -12154,7 +12160,7 @@ async function Yr(t) {
|
|
|
12154
12160
|
};
|
|
12155
12161
|
}
|
|
12156
12162
|
}
|
|
12157
|
-
const Me = "mokkun-theme", At = "data-theme", De = "mokkun-theme-change",
|
|
12163
|
+
const Me = "mokkun-theme", At = "data-theme", De = "mokkun-theme-change", Zr = [
|
|
12158
12164
|
{
|
|
12159
12165
|
id: "lofi",
|
|
12160
12166
|
name: "ローファイ",
|
|
@@ -12174,13 +12180,13 @@ const Me = "mokkun-theme", At = "data-theme", De = "mokkun-theme-change", Gr = [
|
|
|
12174
12180
|
isBuiltIn: !0
|
|
12175
12181
|
}
|
|
12176
12182
|
], Fe = "lofi";
|
|
12177
|
-
class
|
|
12183
|
+
class Kr {
|
|
12178
12184
|
constructor() {
|
|
12179
12185
|
h(this, "themes");
|
|
12180
12186
|
h(this, "currentThemeId");
|
|
12181
12187
|
h(this, "config");
|
|
12182
12188
|
h(this, "customStyleElement");
|
|
12183
|
-
this.themes = /* @__PURE__ */ new Map(), this.currentThemeId = null, this.config = null, this.customStyleElement = null,
|
|
12189
|
+
this.themes = /* @__PURE__ */ new Map(), this.currentThemeId = null, this.config = null, this.customStyleElement = null, Zr.forEach((e) => {
|
|
12184
12190
|
this.themes.set(e.id, e);
|
|
12185
12191
|
});
|
|
12186
12192
|
}
|
|
@@ -12368,13 +12374,13 @@ ${i}
|
|
|
12368
12374
|
};
|
|
12369
12375
|
}
|
|
12370
12376
|
}
|
|
12371
|
-
const Ie = new
|
|
12372
|
-
function
|
|
12377
|
+
const Ie = new Kr(), Qr = () => Ie.initialize(), Je = (t) => Ie.applyTheme(t), Jr = () => Ie.getAvailableThemes(), Li = () => Ie.getCurrentTheme();
|
|
12378
|
+
function Xr(t) {
|
|
12373
12379
|
const e = () => {
|
|
12374
12380
|
if (!t.schema || !t.currentScreenName) return;
|
|
12375
12381
|
const s = Pe(t.schema, t.currentScreenName);
|
|
12376
12382
|
if (!s) return;
|
|
12377
|
-
t.sectionNavController && (t.sectionNavController.destroy(), t.sectionNavController = null), t.actionHandler && (t.actionHandler.detach(), t.actionHandler = null), t.wizardController = null, s.wizard ? t.wizardController =
|
|
12383
|
+
t.sectionNavController && (t.sectionNavController.destroy(), t.sectionNavController = null), t.actionHandler && (t.actionHandler.detach(), t.actionHandler = null), t.wizardController = null, s.wizard ? t.wizardController = Vr(t.container, s, 0) : (t.container.innerHTML = Qe(s), s.sections && s.sections.length > 0 && (t.sectionNavController = Pr(t.container, s)));
|
|
12378
12384
|
const n = {
|
|
12379
12385
|
onNavigate: (a, r) => {
|
|
12380
12386
|
var l, d;
|
|
@@ -12395,7 +12401,7 @@ function Jr(t) {
|
|
|
12395
12401
|
onCustom: () => {
|
|
12396
12402
|
}
|
|
12397
12403
|
};
|
|
12398
|
-
t.actionHandler =
|
|
12404
|
+
t.actionHandler = Ur(t.container, n);
|
|
12399
12405
|
}, i = {
|
|
12400
12406
|
get schema() {
|
|
12401
12407
|
return t.schema;
|
|
@@ -12434,14 +12440,14 @@ function Jr(t) {
|
|
|
12434
12440
|
};
|
|
12435
12441
|
return i;
|
|
12436
12442
|
}
|
|
12437
|
-
async function
|
|
12443
|
+
async function eo(t) {
|
|
12438
12444
|
var s, n, a;
|
|
12439
12445
|
const e = typeof t.container == "string" ? document.querySelector(t.container) : t.container;
|
|
12440
12446
|
if (!e) {
|
|
12441
12447
|
const r = new Error(`[Mokkun] Container not found: ${t.container}`);
|
|
12442
12448
|
throw (s = t.onError) == null || s.call(t, r), r;
|
|
12443
12449
|
}
|
|
12444
|
-
t.theme ? Je(t.theme) :
|
|
12450
|
+
t.theme ? Je(t.theme) : Qr();
|
|
12445
12451
|
const i = {
|
|
12446
12452
|
container: e,
|
|
12447
12453
|
schema: null,
|
|
@@ -12460,24 +12466,24 @@ async function Xr(t) {
|
|
|
12460
12466
|
);
|
|
12461
12467
|
i.schema = d.data;
|
|
12462
12468
|
} else if (t.yamlUrl) {
|
|
12463
|
-
const d = await
|
|
12469
|
+
const d = await Gr(t.yamlUrl);
|
|
12464
12470
|
if (!d.success)
|
|
12465
12471
|
throw new Error(`[Mokkun] Failed to load YAML: ${d.error.message}`);
|
|
12466
12472
|
i.schema = d.schema;
|
|
12467
12473
|
} else
|
|
12468
12474
|
throw new Error("[Mokkun] Either yamlUrl or yamlContent must be provided");
|
|
12469
|
-
const r =
|
|
12475
|
+
const r = Xr(i), o = r.getScreenNames(), l = t.initialScreen && o.includes(t.initialScreen) ? t.initialScreen : o[0];
|
|
12470
12476
|
return l && r.showScreen(l), (n = t.onReady) == null || n.call(t, r), r;
|
|
12471
12477
|
} catch (r) {
|
|
12472
12478
|
const o = r instanceof Error ? r : new Error(String(r));
|
|
12473
12479
|
throw (a = t.onError) == null || a.call(t, o), o;
|
|
12474
12480
|
}
|
|
12475
12481
|
}
|
|
12476
|
-
const
|
|
12482
|
+
const to = "0.1.4", io = {
|
|
12477
12483
|
/** Initialize Mokkun */
|
|
12478
|
-
init:
|
|
12484
|
+
init: eo,
|
|
12479
12485
|
/** Library version */
|
|
12480
|
-
VERSION:
|
|
12486
|
+
VERSION: to,
|
|
12481
12487
|
/** Utility functions */
|
|
12482
12488
|
utils: {
|
|
12483
12489
|
parseYaml: Ge,
|
|
@@ -12489,14 +12495,14 @@ const eo = "0.1.3", to = {
|
|
|
12489
12495
|
theme: {
|
|
12490
12496
|
apply: Je,
|
|
12491
12497
|
getCurrent: Li,
|
|
12492
|
-
getAvailable:
|
|
12498
|
+
getAvailable: Jr
|
|
12493
12499
|
}
|
|
12494
12500
|
};
|
|
12495
|
-
typeof window < "u" && (window.Mokkun =
|
|
12501
|
+
typeof window < "u" && (window.Mokkun = io);
|
|
12496
12502
|
export {
|
|
12497
|
-
|
|
12498
|
-
|
|
12503
|
+
La as Combobox,
|
|
12504
|
+
io as Mokkun,
|
|
12499
12505
|
vi as Textarea,
|
|
12500
|
-
|
|
12506
|
+
no as createTextarea
|
|
12501
12507
|
};
|
|
12502
12508
|
//# sourceMappingURL=mokkun.esm.js.map
|