@arach/arc-iso 0.4.5 → 0.6.0
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/dist/arc-iso-slim.es.js +1104 -440
- package/dist/arc-iso-slim.umd.js +7 -7
- package/dist/arc-iso.es.js +1992 -1328
- package/dist/arc-iso.umd.js +37 -37
- package/dist/index.d.ts +79 -8
- package/package.json +1 -1
package/dist/arc-iso.es.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import jr, { useId as Qe, useMemo as Fr, useState as Le, useEffect as Lr } from "react";
|
|
2
|
+
const Rn = 30 * (Math.PI / 180), Rr = Math.cos(Rn), Ir = Math.sin(Rn);
|
|
3
|
+
function E(e, n, r = 0) {
|
|
4
4
|
return {
|
|
5
|
-
screenX: (e -
|
|
6
|
-
screenY: -(e +
|
|
5
|
+
screenX: (e - n) * Rr,
|
|
6
|
+
screenY: -(e + n) * Ir - r
|
|
7
7
|
// Negated so +X,+Y go UP on screen
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
10
|
+
function he(e, n, r, t = 0, i = 0, l = 0) {
|
|
11
|
+
const o = {
|
|
12
12
|
// Bottom face
|
|
13
|
-
frontBottom:
|
|
14
|
-
rightBottom:
|
|
15
|
-
backBottom:
|
|
16
|
-
leftBottom:
|
|
13
|
+
frontBottom: E(e, 0, 0),
|
|
14
|
+
rightBottom: E(e, n, 0),
|
|
15
|
+
backBottom: E(0, n, 0),
|
|
16
|
+
leftBottom: E(0, 0, 0),
|
|
17
17
|
// Top face
|
|
18
|
-
frontTop:
|
|
19
|
-
rightTop:
|
|
20
|
-
backTop:
|
|
21
|
-
leftTop:
|
|
22
|
-
}, a = (
|
|
23
|
-
x:
|
|
24
|
-
y:
|
|
18
|
+
frontTop: E(e, 0, r),
|
|
19
|
+
rightTop: E(e, n, r),
|
|
20
|
+
backTop: E(0, n, r),
|
|
21
|
+
leftTop: E(0, 0, r)
|
|
22
|
+
}, a = (w) => ({
|
|
23
|
+
x: w.screenX + t,
|
|
24
|
+
y: w.screenY + i
|
|
25
25
|
}), c = Object.fromEntries(
|
|
26
|
-
Object.entries(
|
|
27
|
-
), s = (
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
return `M ${
|
|
26
|
+
Object.entries(o).map(([w, j]) => [w, a(j)])
|
|
27
|
+
), s = (w, j, I, $) => {
|
|
28
|
+
if ($ <= 0) {
|
|
29
|
+
const J = E(0, 0, I), q = E(w, 0, I), T = E(w, j, I), W = E(0, j, I);
|
|
30
|
+
return `M ${J.screenX + t},${J.screenY + i} L ${q.screenX + t},${q.screenY + i} L ${T.screenX + t},${T.screenY + i} L ${W.screenX + t},${W.screenY + i} Z`;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
for (let
|
|
34
|
-
const
|
|
35
|
-
|
|
32
|
+
const B = Math.min(w, j) / 2, N = Math.min($, B), R = 8, M = [], ne = (J, q, T, W) => {
|
|
33
|
+
for (let Q = 0; Q <= R; Q++) {
|
|
34
|
+
const O = T + (W - T) * (Q / R), S = J + N * Math.cos(O), h = q + N * Math.sin(O), k = E(S, h, I);
|
|
35
|
+
M.push(`${k.screenX + t},${k.screenY + i}`);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
return
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
-
for (let
|
|
42
|
-
const
|
|
43
|
-
|
|
38
|
+
return ne(N, N, Math.PI, Math.PI * 1.5), ne(w - N, N, Math.PI * 1.5, Math.PI * 2), ne(w - N, j - N, 0, Math.PI * 0.5), ne(N, j - N, Math.PI * 0.5, Math.PI), `M ${M[0]} L ${M.slice(1).join(" L ")} Z`;
|
|
39
|
+
}, u = (w) => `M ${w.map((j) => `${j.x},${j.y}`).join(" L ")} Z`, x = (w, j, I, $, B, N) => {
|
|
40
|
+
const M = [];
|
|
41
|
+
for (let T = 0; T < 6; T++) {
|
|
42
|
+
const W = B + (N - B) * (T / 6), Q = B + (N - B) * ((T + 1) / 6), O = (W + Q) / 2, S = Math.cos(O), h = Math.sin(O), F = S * -0.577 + h * -0.577 + 0 * 0.577, ce = 0.3 + Math.max(0, F + 0.4) * 0.5, se = E(w + I * Math.cos(W), j + I * Math.sin(W), 0), P = E(w + I * Math.cos(Q), j + I * Math.sin(Q), 0), ie = E(w + I * Math.cos(W), j + I * Math.sin(W), $), le = E(w + I * Math.cos(Q), j + I * Math.sin(Q), $), ke = `M ${se.screenX + t},${se.screenY + i} L ${P.screenX + t},${P.screenY + i} L ${le.screenX + t},${le.screenY + i} L ${ie.screenX + t},${ie.screenY + i} Z`;
|
|
43
|
+
M.push({ path: ke, intensity: ce });
|
|
44
44
|
}
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
let m,
|
|
48
|
-
if (
|
|
49
|
-
const
|
|
50
|
-
{ x:
|
|
51
|
-
{ x:
|
|
52
|
-
{ x:
|
|
53
|
-
{ x:
|
|
45
|
+
return M;
|
|
46
|
+
}, p = Math.min(l, Math.min(e, n) / 2), f = s(e, n, r, p);
|
|
47
|
+
let m, y, A, v, b, D;
|
|
48
|
+
if (p > 0) {
|
|
49
|
+
const w = [
|
|
50
|
+
{ x: E(0, p, 0).screenX + t, y: E(0, p, 0).screenY + i },
|
|
51
|
+
{ x: E(0, n - p, 0).screenX + t, y: E(0, n - p, 0).screenY + i },
|
|
52
|
+
{ x: E(0, n - p, r).screenX + t, y: E(0, n - p, r).screenY + i },
|
|
53
|
+
{ x: E(0, p, r).screenX + t, y: E(0, p, r).screenY + i }
|
|
54
54
|
];
|
|
55
|
-
m =
|
|
56
|
-
const
|
|
57
|
-
{ x:
|
|
58
|
-
{ x:
|
|
59
|
-
{ x:
|
|
60
|
-
{ x:
|
|
55
|
+
m = u(w);
|
|
56
|
+
const j = [
|
|
57
|
+
{ x: E(p, 0, 0).screenX + t, y: E(p, 0, 0).screenY + i },
|
|
58
|
+
{ x: E(e - p, 0, 0).screenX + t, y: E(e - p, 0, 0).screenY + i },
|
|
59
|
+
{ x: E(e - p, 0, r).screenX + t, y: E(e - p, 0, r).screenY + i },
|
|
60
|
+
{ x: E(p, 0, r).screenX + t, y: E(p, 0, r).screenY + i }
|
|
61
61
|
];
|
|
62
|
-
|
|
62
|
+
y = u(j), A = x(p, p, p, r, Math.PI, Math.PI * 1.5), v = x(e - p, p, p, r, Math.PI * 1.5, Math.PI * 2), b = x(p, n - p, p, r, Math.PI * 0.5, Math.PI), D = x(e - p, n - p, p, r, 0, Math.PI * 0.5);
|
|
63
63
|
} else {
|
|
64
|
-
const
|
|
65
|
-
m =
|
|
64
|
+
const w = [c.leftBottom, c.backBottom, c.backTop, c.leftTop], j = [c.leftBottom, c.frontBottom, c.frontTop, c.leftTop];
|
|
65
|
+
m = u(w), y = u(j), A = [], v = [], b = [], D = [];
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const L = `M ${c.leftBottom.x},${c.leftBottom.y} L ${c.frontBottom.x},${c.frontBottom.y} L ${c.rightBottom.x},${c.rightBottom.y} L ${c.backBottom.x},${c.backBottom.y} Z`;
|
|
68
68
|
return {
|
|
69
69
|
top: f,
|
|
70
70
|
left: m,
|
|
71
|
-
right:
|
|
72
|
-
cornerFrontLeft:
|
|
73
|
-
cornerFrontRight:
|
|
74
|
-
cornerBackLeft:
|
|
75
|
-
cornerBackRight:
|
|
76
|
-
outline:
|
|
71
|
+
right: y,
|
|
72
|
+
cornerFrontLeft: A,
|
|
73
|
+
cornerFrontRight: v,
|
|
74
|
+
cornerBackLeft: b,
|
|
75
|
+
cornerBackRight: D,
|
|
76
|
+
outline: L
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Mr(e, n = 60, r = 50) {
|
|
80
80
|
return {
|
|
81
|
-
top: `hsl(${e}, ${
|
|
82
|
-
right: `hsl(${e}, ${
|
|
83
|
-
left: `hsl(${e}, ${
|
|
81
|
+
top: `hsl(${e}, ${n}%, ${Math.min(r + 15, 95)}%)`,
|
|
82
|
+
right: `hsl(${e}, ${n}%, ${r}%)`,
|
|
83
|
+
left: `hsl(${e}, ${n}%, ${Math.max(r - 15, 15)}%)`
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
const
|
|
86
|
+
const un = {
|
|
87
87
|
violet: { hue: 270, saturation: 60, lightness: 55 },
|
|
88
88
|
blue: { hue: 220, saturation: 70, lightness: 50 },
|
|
89
89
|
cyan: { hue: 190, saturation: 80, lightness: 45 },
|
|
@@ -93,271 +93,844 @@ const Ze = {
|
|
|
93
93
|
slate: { hue: 220, saturation: 15, lightness: 50 },
|
|
94
94
|
zinc: { hue: 240, saturation: 5, lightness: 50 }
|
|
95
95
|
};
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
99
|
-
}
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
function
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"),
|
|
106
|
-
function
|
|
107
|
-
var
|
|
108
|
-
if (l !== void 0 && (
|
|
96
|
+
function Po(e) {
|
|
97
|
+
const n = un[e] || un.slate;
|
|
98
|
+
return Mr(n.hue, n.saturation, n.lightness);
|
|
99
|
+
}
|
|
100
|
+
var Re = { exports: {} }, Se = {};
|
|
101
|
+
var pn;
|
|
102
|
+
function Nr() {
|
|
103
|
+
if (pn) return Se;
|
|
104
|
+
pn = 1;
|
|
105
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
106
|
+
function r(t, i, l) {
|
|
107
|
+
var o = null;
|
|
108
|
+
if (l !== void 0 && (o = "" + l), i.key !== void 0 && (o = "" + i.key), "key" in i) {
|
|
109
109
|
l = {};
|
|
110
110
|
for (var a in i)
|
|
111
111
|
a !== "key" && (l[a] = i[a]);
|
|
112
112
|
} else l = i;
|
|
113
113
|
return i = l.ref, {
|
|
114
114
|
$$typeof: e,
|
|
115
|
-
type:
|
|
116
|
-
key:
|
|
115
|
+
type: t,
|
|
116
|
+
key: o,
|
|
117
117
|
ref: i !== void 0 ? i : null,
|
|
118
118
|
props: l
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
return
|
|
122
|
-
}
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
return
|
|
127
|
-
function e(
|
|
128
|
-
if (
|
|
129
|
-
if (typeof
|
|
130
|
-
return
|
|
131
|
-
if (typeof
|
|
132
|
-
switch (
|
|
133
|
-
case
|
|
121
|
+
return Se.Fragment = n, Se.jsx = r, Se.jsxs = r, Se;
|
|
122
|
+
}
|
|
123
|
+
var Ee = {};
|
|
124
|
+
var dn;
|
|
125
|
+
function Pr() {
|
|
126
|
+
return dn || (dn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
127
|
+
function e(h) {
|
|
128
|
+
if (h == null) return null;
|
|
129
|
+
if (typeof h == "function")
|
|
130
|
+
return h.$$typeof === R ? null : h.displayName || h.name || null;
|
|
131
|
+
if (typeof h == "string") return h;
|
|
132
|
+
switch (h) {
|
|
133
|
+
case A:
|
|
134
134
|
return "Fragment";
|
|
135
|
-
case
|
|
135
|
+
case b:
|
|
136
136
|
return "Profiler";
|
|
137
|
-
case
|
|
137
|
+
case v:
|
|
138
138
|
return "StrictMode";
|
|
139
|
-
case F:
|
|
140
|
-
return "Suspense";
|
|
141
139
|
case j:
|
|
140
|
+
return "Suspense";
|
|
141
|
+
case I:
|
|
142
142
|
return "SuspenseList";
|
|
143
|
-
case
|
|
143
|
+
case N:
|
|
144
144
|
return "Activity";
|
|
145
145
|
}
|
|
146
|
-
if (typeof
|
|
147
|
-
switch (typeof
|
|
146
|
+
if (typeof h == "object")
|
|
147
|
+
switch (typeof h.tag == "number" && console.error(
|
|
148
148
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
149
|
-
),
|
|
150
|
-
case
|
|
149
|
+
), h.$$typeof) {
|
|
150
|
+
case y:
|
|
151
151
|
return "Portal";
|
|
152
|
-
case
|
|
153
|
-
return
|
|
154
|
-
case
|
|
155
|
-
return (
|
|
152
|
+
case L:
|
|
153
|
+
return h.displayName || "Context";
|
|
154
|
+
case D:
|
|
155
|
+
return (h._context.displayName || "Context") + ".Consumer";
|
|
156
|
+
case w:
|
|
157
|
+
var k = h.render;
|
|
158
|
+
return h = h.displayName, h || (h = k.displayName || k.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
|
|
156
159
|
case $:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return _ = p.displayName || null, _ !== null ? _ : e(p.type) || "Memo";
|
|
161
|
-
case H:
|
|
162
|
-
_ = p._payload, p = p._init;
|
|
160
|
+
return k = h.displayName || null, k !== null ? k : e(h.type) || "Memo";
|
|
161
|
+
case B:
|
|
162
|
+
k = h._payload, h = h._init;
|
|
163
163
|
try {
|
|
164
|
-
return e(
|
|
164
|
+
return e(h(k));
|
|
165
165
|
} catch {
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
return "" +
|
|
170
|
+
function n(h) {
|
|
171
|
+
return "" + h;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function r(h) {
|
|
174
174
|
try {
|
|
175
|
-
|
|
176
|
-
var
|
|
175
|
+
n(h);
|
|
176
|
+
var k = !1;
|
|
177
177
|
} catch {
|
|
178
|
-
|
|
178
|
+
k = !0;
|
|
179
179
|
}
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
var
|
|
183
|
-
return
|
|
184
|
-
|
|
180
|
+
if (k) {
|
|
181
|
+
k = console;
|
|
182
|
+
var F = k.error, Y = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
183
|
+
return F.call(
|
|
184
|
+
k,
|
|
185
185
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
186
|
-
|
|
187
|
-
),
|
|
186
|
+
Y
|
|
187
|
+
), n(h);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
if (
|
|
192
|
-
if (typeof
|
|
190
|
+
function t(h) {
|
|
191
|
+
if (h === A) return "<>";
|
|
192
|
+
if (typeof h == "object" && h !== null && h.$$typeof === B)
|
|
193
193
|
return "<...>";
|
|
194
194
|
try {
|
|
195
|
-
var
|
|
196
|
-
return
|
|
195
|
+
var k = e(h);
|
|
196
|
+
return k ? "<" + k + ">" : "<...>";
|
|
197
197
|
} catch {
|
|
198
198
|
return "<...>";
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
function i() {
|
|
202
|
-
var
|
|
203
|
-
return
|
|
202
|
+
var h = M.A;
|
|
203
|
+
return h === null ? null : h.getOwner();
|
|
204
204
|
}
|
|
205
205
|
function l() {
|
|
206
206
|
return Error("react-stack-top-frame");
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
if (
|
|
210
|
-
var
|
|
211
|
-
if (
|
|
208
|
+
function o(h) {
|
|
209
|
+
if (ne.call(h, "key")) {
|
|
210
|
+
var k = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
211
|
+
if (k && k.isReactWarning) return !1;
|
|
212
212
|
}
|
|
213
|
-
return
|
|
213
|
+
return h.key !== void 0;
|
|
214
214
|
}
|
|
215
|
-
function a(
|
|
216
|
-
function
|
|
217
|
-
|
|
215
|
+
function a(h, k) {
|
|
216
|
+
function F() {
|
|
217
|
+
T || (T = !0, console.error(
|
|
218
218
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
219
|
-
|
|
219
|
+
k
|
|
220
220
|
));
|
|
221
221
|
}
|
|
222
|
-
|
|
223
|
-
get:
|
|
222
|
+
F.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
223
|
+
get: F,
|
|
224
224
|
configurable: !0
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
function c() {
|
|
228
|
-
var
|
|
229
|
-
return
|
|
228
|
+
var h = e(this.type);
|
|
229
|
+
return W[h] || (W[h] = !0, console.error(
|
|
230
230
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
231
|
-
)),
|
|
231
|
+
)), h = this.props.ref, h !== void 0 ? h : null;
|
|
232
232
|
}
|
|
233
|
-
function s(
|
|
234
|
-
var
|
|
235
|
-
return
|
|
233
|
+
function s(h, k, F, Y, ce, se) {
|
|
234
|
+
var P = F.ref;
|
|
235
|
+
return h = {
|
|
236
236
|
$$typeof: m,
|
|
237
|
-
type:
|
|
238
|
-
key:
|
|
239
|
-
props:
|
|
240
|
-
_owner:
|
|
241
|
-
}, (
|
|
237
|
+
type: h,
|
|
238
|
+
key: k,
|
|
239
|
+
props: F,
|
|
240
|
+
_owner: Y
|
|
241
|
+
}, (P !== void 0 ? P : null) !== null ? Object.defineProperty(h, "ref", {
|
|
242
242
|
enumerable: !1,
|
|
243
243
|
get: c
|
|
244
|
-
}) : Object.defineProperty(
|
|
244
|
+
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
245
245
|
configurable: !1,
|
|
246
246
|
enumerable: !1,
|
|
247
247
|
writable: !0,
|
|
248
248
|
value: 0
|
|
249
|
-
}), Object.defineProperty(
|
|
249
|
+
}), Object.defineProperty(h, "_debugInfo", {
|
|
250
250
|
configurable: !1,
|
|
251
251
|
enumerable: !1,
|
|
252
252
|
writable: !0,
|
|
253
253
|
value: null
|
|
254
|
-
}), Object.defineProperty(
|
|
254
|
+
}), Object.defineProperty(h, "_debugStack", {
|
|
255
255
|
configurable: !1,
|
|
256
256
|
enumerable: !1,
|
|
257
257
|
writable: !0,
|
|
258
|
-
value:
|
|
259
|
-
}), Object.defineProperty(
|
|
258
|
+
value: ce
|
|
259
|
+
}), Object.defineProperty(h, "_debugTask", {
|
|
260
260
|
configurable: !1,
|
|
261
261
|
enumerable: !1,
|
|
262
262
|
writable: !0,
|
|
263
|
-
value:
|
|
264
|
-
}), Object.freeze && (Object.freeze(
|
|
263
|
+
value: se
|
|
264
|
+
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
265
265
|
}
|
|
266
|
-
function h
|
|
267
|
-
var
|
|
268
|
-
if (
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
271
|
-
for (
|
|
272
|
-
|
|
273
|
-
Object.freeze && Object.freeze(
|
|
266
|
+
function u(h, k, F, Y, ce, se) {
|
|
267
|
+
var P = k.children;
|
|
268
|
+
if (P !== void 0)
|
|
269
|
+
if (Y)
|
|
270
|
+
if (J(P)) {
|
|
271
|
+
for (Y = 0; Y < P.length; Y++)
|
|
272
|
+
x(P[Y]);
|
|
273
|
+
Object.freeze && Object.freeze(P);
|
|
274
274
|
} else
|
|
275
275
|
console.error(
|
|
276
276
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
277
277
|
);
|
|
278
|
-
else
|
|
279
|
-
if (
|
|
280
|
-
|
|
281
|
-
var
|
|
282
|
-
return
|
|
278
|
+
else x(P);
|
|
279
|
+
if (ne.call(k, "key")) {
|
|
280
|
+
P = e(h);
|
|
281
|
+
var ie = Object.keys(k).filter(function(ke) {
|
|
282
|
+
return ke !== "key";
|
|
283
283
|
});
|
|
284
|
-
|
|
284
|
+
Y = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", S[P + Y] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
285
285
|
`A props object containing a "key" prop is being spread into JSX:
|
|
286
286
|
let props = %s;
|
|
287
287
|
<%s {...props} />
|
|
288
288
|
React keys must be passed directly to JSX without using spread:
|
|
289
289
|
let props = %s;
|
|
290
290
|
<%s key={someKey} {...props} />`,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
),
|
|
291
|
+
Y,
|
|
292
|
+
P,
|
|
293
|
+
ie,
|
|
294
|
+
P
|
|
295
|
+
), S[P + Y] = !0);
|
|
296
296
|
}
|
|
297
|
-
if (
|
|
298
|
-
|
|
299
|
-
for (var
|
|
300
|
-
|
|
301
|
-
} else
|
|
302
|
-
return
|
|
303
|
-
|
|
304
|
-
typeof
|
|
297
|
+
if (P = null, F !== void 0 && (r(F), P = "" + F), o(k) && (r(k.key), P = "" + k.key), "key" in k) {
|
|
298
|
+
F = {};
|
|
299
|
+
for (var le in k)
|
|
300
|
+
le !== "key" && (F[le] = k[le]);
|
|
301
|
+
} else F = k;
|
|
302
|
+
return P && a(
|
|
303
|
+
F,
|
|
304
|
+
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
305
305
|
), s(
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
h,
|
|
307
|
+
P,
|
|
308
|
+
F,
|
|
309
309
|
i(),
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
ce,
|
|
311
|
+
se
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
|
|
314
|
+
function x(h) {
|
|
315
|
+
p(h) ? h._store && (h._store.validated = 1) : typeof h == "object" && h !== null && h.$$typeof === B && (h._payload.status === "fulfilled" ? p(h._payload.value) && h._payload.value._store && (h._payload.value._store.validated = 1) : h._store && (h._store.validated = 1));
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
return typeof
|
|
317
|
+
function p(h) {
|
|
318
|
+
return typeof h == "object" && h !== null && h.$$typeof === m;
|
|
319
319
|
}
|
|
320
|
-
var f =
|
|
320
|
+
var f = jr, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), b = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), L = /* @__PURE__ */ Symbol.for("react.context"), w = /* @__PURE__ */ Symbol.for("react.forward_ref"), j = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), B = /* @__PURE__ */ Symbol.for("react.lazy"), N = /* @__PURE__ */ Symbol.for("react.activity"), R = /* @__PURE__ */ Symbol.for("react.client.reference"), M = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ne = Object.prototype.hasOwnProperty, J = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
321
321
|
return null;
|
|
322
322
|
};
|
|
323
323
|
f = {
|
|
324
|
-
react_stack_bottom_frame: function(
|
|
325
|
-
return
|
|
324
|
+
react_stack_bottom_frame: function(h) {
|
|
325
|
+
return h();
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
|
-
var
|
|
328
|
+
var T, W = {}, Q = f.react_stack_bottom_frame.bind(
|
|
329
329
|
f,
|
|
330
330
|
l
|
|
331
|
-
)(),
|
|
332
|
-
|
|
333
|
-
var
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
331
|
+
)(), O = q(t(l)), S = {};
|
|
332
|
+
Ee.Fragment = A, Ee.jsx = function(h, k, F) {
|
|
333
|
+
var Y = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
334
|
+
return u(
|
|
335
|
+
h,
|
|
336
|
+
k,
|
|
337
|
+
F,
|
|
338
338
|
!1,
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
Y ? Error("react-stack-top-frame") : Q,
|
|
340
|
+
Y ? q(t(h)) : O
|
|
341
341
|
);
|
|
342
|
-
},
|
|
343
|
-
var
|
|
344
|
-
return
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
}, Ee.jsxs = function(h, k, F) {
|
|
343
|
+
var Y = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
344
|
+
return u(
|
|
345
|
+
h,
|
|
346
|
+
k,
|
|
347
|
+
F,
|
|
348
348
|
!0,
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
Y ? Error("react-stack-top-frame") : Q,
|
|
350
|
+
Y ? q(t(h)) : O
|
|
351
351
|
);
|
|
352
352
|
};
|
|
353
|
-
})()),
|
|
353
|
+
})()), Ee;
|
|
354
|
+
}
|
|
355
|
+
var hn;
|
|
356
|
+
function Dr() {
|
|
357
|
+
return hn || (hn = 1, process.env.NODE_ENV === "production" ? Re.exports = Nr() : Re.exports = Pr()), Re.exports;
|
|
358
|
+
}
|
|
359
|
+
var d = Dr();
|
|
360
|
+
const Yr = ["solid", "blueprint", "cyanotype"], en = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace', Br = 0.78, g = (e) => Math.round(e * Br * 10) / 10, In = {
|
|
361
|
+
id: "solid",
|
|
362
|
+
name: "Solid",
|
|
363
|
+
description: "Shaded isometric boxes",
|
|
364
|
+
technical: !1,
|
|
365
|
+
paper: { from: "transparent", to: "transparent", edge: "transparent", grid: "transparent", grain: 0 },
|
|
366
|
+
ink: {
|
|
367
|
+
line: "rgba(0,0,0,0.3)",
|
|
368
|
+
hidden: "rgba(0,0,0,0.2)",
|
|
369
|
+
hatch: "transparent",
|
|
370
|
+
text: "#ffffff",
|
|
371
|
+
muted: "rgba(255,255,255,0.6)",
|
|
372
|
+
accent: "#3b82f6"
|
|
373
|
+
},
|
|
374
|
+
face: { top: "transparent", right: "transparent", left: "transparent" },
|
|
375
|
+
hatchOpacity: { top: 0, right: 0, left: 0 },
|
|
376
|
+
font: en,
|
|
377
|
+
strokeWidth: 0.5
|
|
378
|
+
}, Wr = {
|
|
379
|
+
id: "blueprint",
|
|
380
|
+
name: "Blueprint",
|
|
381
|
+
description: "Sepia engineering plate on parchment",
|
|
382
|
+
technical: !0,
|
|
383
|
+
paper: { from: "#f0e6d0", to: "#ddceac", edge: "#b09a74", grid: "#c6b48f", grain: 0.055 },
|
|
384
|
+
ink: {
|
|
385
|
+
line: "#4a3826",
|
|
386
|
+
hidden: "#96805f",
|
|
387
|
+
hatch: "#6d563c",
|
|
388
|
+
text: "#3b2c1d",
|
|
389
|
+
muted: "#8a7455",
|
|
390
|
+
accent: "#a8412a"
|
|
391
|
+
},
|
|
392
|
+
face: { top: "#f4ebd7", right: "#e6dabb", left: "#d6c6a2" },
|
|
393
|
+
hatchOpacity: { top: 0.3, right: 0.55, left: 0.85 },
|
|
394
|
+
font: en,
|
|
395
|
+
strokeWidth: 1
|
|
396
|
+
}, Hr = {
|
|
397
|
+
id: "cyanotype",
|
|
398
|
+
name: "Cyanotype",
|
|
399
|
+
description: "White linework on classic blueprint blue",
|
|
400
|
+
technical: !0,
|
|
401
|
+
paper: { from: "#123256", to: "#0b1f3a", edge: "#3f6d9f", grid: "#27507f", grain: 0.07 },
|
|
402
|
+
ink: {
|
|
403
|
+
line: "#e6f0fb",
|
|
404
|
+
hidden: "#78a2cc",
|
|
405
|
+
hatch: "#a6c6e5",
|
|
406
|
+
text: "#f2f8ff",
|
|
407
|
+
muted: "#8fb2d6",
|
|
408
|
+
accent: "#ffc857"
|
|
409
|
+
},
|
|
410
|
+
face: { top: "#1b4675", right: "#153a61", left: "#0f2b49" },
|
|
411
|
+
hatchOpacity: { top: 0.28, right: 0.5, left: 0.78 },
|
|
412
|
+
font: en,
|
|
413
|
+
strokeWidth: 1
|
|
414
|
+
}, Mn = { solid: In, blueprint: Wr, cyanotype: Hr };
|
|
415
|
+
function Ur(e) {
|
|
416
|
+
return Mn[e] || In;
|
|
417
|
+
}
|
|
418
|
+
const Xr = Yr.filter((e) => Mn[e].technical);
|
|
419
|
+
Xr[0];
|
|
420
|
+
const Gr = {
|
|
421
|
+
violet: "cross",
|
|
422
|
+
blue: "lines",
|
|
423
|
+
sky: "lines",
|
|
424
|
+
cyan: "dashes",
|
|
425
|
+
emerald: "dots",
|
|
426
|
+
amber: "dense",
|
|
427
|
+
orange: "dense",
|
|
428
|
+
rose: "cross",
|
|
429
|
+
zinc: "plain",
|
|
430
|
+
slate: "plain"
|
|
431
|
+
};
|
|
432
|
+
function Nn(e) {
|
|
433
|
+
return Gr[e || "zinc"] || "lines";
|
|
434
|
+
}
|
|
435
|
+
const zr = {
|
|
436
|
+
plain: "PLAIN",
|
|
437
|
+
lines: "HATCH-A",
|
|
438
|
+
cross: "HATCH-X",
|
|
439
|
+
dense: "HATCH-D",
|
|
440
|
+
dots: "STIPPLE",
|
|
441
|
+
dashes: "BROKEN"
|
|
442
|
+
};
|
|
443
|
+
function xn(e, n, r, t = 0, i = 0) {
|
|
444
|
+
const l = (v, b, D) => {
|
|
445
|
+
const L = E(v, b, D);
|
|
446
|
+
return { x: L.screenX + t, y: L.screenY + i };
|
|
447
|
+
}, o = l(0, 0, 0), a = l(e, 0, 0), c = l(e, n, 0), s = l(0, n, 0), u = l(0, 0, r), x = l(e, 0, r), p = l(e, n, r), f = l(0, n, r), m = (v) => `M ${v.map((b) => `${b.x},${b.y}`).join(" L ")} Z`, y = (v, b) => `M ${v.x},${v.y} L ${b.x},${b.y}`, A = [o, a, c, s, u, x, p, f];
|
|
448
|
+
return {
|
|
449
|
+
top: m([u, x, p, f]),
|
|
450
|
+
right: m([o, a, x, u]),
|
|
451
|
+
left: m([o, s, f, u]),
|
|
452
|
+
visible: [
|
|
453
|
+
// silhouette
|
|
454
|
+
m([o, a, x, p, f, s]),
|
|
455
|
+
// interior creases radiating from the near top corner
|
|
456
|
+
y(u, x),
|
|
457
|
+
y(u, f),
|
|
458
|
+
y(u, o)
|
|
459
|
+
].join(" "),
|
|
460
|
+
hidden: [y(c, a), y(c, s), y(c, p)].join(" "),
|
|
461
|
+
topCenter: { x: (u.x + p.x) / 2, y: (u.y + p.y) / 2 },
|
|
462
|
+
topApex: { x: p.x, y: p.y },
|
|
463
|
+
minX: Math.min(...A.map((v) => v.x)),
|
|
464
|
+
minY: Math.min(...A.map((v) => v.y)),
|
|
465
|
+
maxX: Math.max(...A.map((v) => v.x)),
|
|
466
|
+
maxY: Math.max(...A.map((v) => v.y))
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
function Pe(e) {
|
|
470
|
+
return String(e).padStart(2, "0");
|
|
471
|
+
}
|
|
472
|
+
const qr = {
|
|
473
|
+
top: ["n30", "p30"],
|
|
474
|
+
right: ["n30", "v"],
|
|
475
|
+
left: ["p30", "v"]
|
|
476
|
+
}, Kr = { n30: -30, p30: 30, v: 90 }, Vr = [
|
|
477
|
+
{ key: "line", spacing: 6.2, strokeWidth: 0.55 },
|
|
478
|
+
{ key: "dense", spacing: 3.1, strokeWidth: 0.45 },
|
|
479
|
+
{ key: "dash", spacing: 6.2, strokeWidth: 0.55, dash: "2.6 2.6" }
|
|
480
|
+
], we = 22;
|
|
481
|
+
function Pn(e, n, r) {
|
|
482
|
+
const [t, i] = qr[r];
|
|
483
|
+
switch (n) {
|
|
484
|
+
case "plain":
|
|
485
|
+
return [];
|
|
486
|
+
case "lines":
|
|
487
|
+
return [`${e}-line-${t}`];
|
|
488
|
+
case "cross":
|
|
489
|
+
return [`${e}-line-${t}`, `${e}-line-${i}`];
|
|
490
|
+
case "dense":
|
|
491
|
+
return [`${e}-dense-${t}`];
|
|
492
|
+
case "dashes":
|
|
493
|
+
return [`${e}-dash-${t}`];
|
|
494
|
+
case "dots":
|
|
495
|
+
return [`${e}-dot`];
|
|
496
|
+
default:
|
|
497
|
+
return [`${e}-line-${t}`];
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
const Dn = (e) => `${e}-paper`, Yn = (e) => `${e}-grain`, Zr = (e, n = "line") => `${e}-arrow-${n}`, Jr = (e) => [`${e}-grid-n30`, `${e}-grid-p30`];
|
|
501
|
+
function nn({
|
|
502
|
+
uid: e,
|
|
503
|
+
style: n,
|
|
504
|
+
/** Extra transform applied to the graph-paper grid, so it can be pinned to
|
|
505
|
+
* panned/zoomed content while the paper itself fills the viewport. */
|
|
506
|
+
gridTransform: r = ""
|
|
507
|
+
}) {
|
|
508
|
+
return /* @__PURE__ */ d.jsxs("defs", { children: [
|
|
509
|
+
Vr.flatMap(
|
|
510
|
+
(t) => Object.entries(Kr).map(([i, l]) => /* @__PURE__ */ d.jsx(
|
|
511
|
+
"pattern",
|
|
512
|
+
{
|
|
513
|
+
id: `${e}-${t.key}-${i}`,
|
|
514
|
+
width: t.spacing,
|
|
515
|
+
height: t.spacing,
|
|
516
|
+
patternUnits: "userSpaceOnUse",
|
|
517
|
+
patternTransform: `rotate(${l})`,
|
|
518
|
+
children: /* @__PURE__ */ d.jsx(
|
|
519
|
+
"line",
|
|
520
|
+
{
|
|
521
|
+
x1: -1,
|
|
522
|
+
y1: t.spacing / 2,
|
|
523
|
+
x2: t.spacing + 1,
|
|
524
|
+
y2: t.spacing / 2,
|
|
525
|
+
stroke: n.ink.hatch,
|
|
526
|
+
strokeWidth: t.strokeWidth,
|
|
527
|
+
strokeDasharray: t.dash
|
|
528
|
+
}
|
|
529
|
+
)
|
|
530
|
+
},
|
|
531
|
+
`${t.key}-${i}`
|
|
532
|
+
))
|
|
533
|
+
),
|
|
534
|
+
/* @__PURE__ */ d.jsx("pattern", { id: `${e}-dot`, width: 4.5, height: 4.5, patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ d.jsx("circle", { cx: 2.25, cy: 2.25, r: 0.55, fill: n.ink.hatch }) }),
|
|
535
|
+
[
|
|
536
|
+
{ id: `${e}-grid-n30`, angle: -30 },
|
|
537
|
+
{ id: `${e}-grid-p30`, angle: 30 }
|
|
538
|
+
].map(({ id: t, angle: i }) => /* @__PURE__ */ d.jsx(
|
|
539
|
+
"pattern",
|
|
540
|
+
{
|
|
541
|
+
id: t,
|
|
542
|
+
width: we,
|
|
543
|
+
height: we,
|
|
544
|
+
patternUnits: "userSpaceOnUse",
|
|
545
|
+
patternTransform: `${r} rotate(${i})`.trim(),
|
|
546
|
+
children: /* @__PURE__ */ d.jsx(
|
|
547
|
+
"line",
|
|
548
|
+
{
|
|
549
|
+
x1: -1,
|
|
550
|
+
y1: we / 2,
|
|
551
|
+
x2: we + 1,
|
|
552
|
+
y2: we / 2,
|
|
553
|
+
stroke: n.paper.grid,
|
|
554
|
+
strokeWidth: 0.5
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
},
|
|
558
|
+
t
|
|
559
|
+
)),
|
|
560
|
+
/* @__PURE__ */ d.jsxs("linearGradient", { id: Dn(e), x1: "0", y1: "0", x2: "0.35", y2: "1", children: [
|
|
561
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "0%", stopColor: n.paper.from }),
|
|
562
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "100%", stopColor: n.paper.to })
|
|
563
|
+
] }),
|
|
564
|
+
/* @__PURE__ */ d.jsxs("filter", { id: Yn(e), x: "0%", y: "0%", width: "100%", height: "100%", children: [
|
|
565
|
+
/* @__PURE__ */ d.jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.85", numOctaves: 3, stitchTiles: "stitch" }),
|
|
566
|
+
/* @__PURE__ */ d.jsx("feColorMatrix", { type: "saturate", values: "0" })
|
|
567
|
+
] }),
|
|
568
|
+
["line", "accent"].map((t) => /* @__PURE__ */ d.jsx(
|
|
569
|
+
"marker",
|
|
570
|
+
{
|
|
571
|
+
id: Zr(e, t),
|
|
572
|
+
markerWidth: "10",
|
|
573
|
+
markerHeight: "10",
|
|
574
|
+
refX: "8",
|
|
575
|
+
refY: "4",
|
|
576
|
+
orient: "auto",
|
|
577
|
+
markerUnits: "userSpaceOnUse",
|
|
578
|
+
children: /* @__PURE__ */ d.jsx(
|
|
579
|
+
"path",
|
|
580
|
+
{
|
|
581
|
+
d: "M 1 1 L 8 4 L 1 7",
|
|
582
|
+
fill: "none",
|
|
583
|
+
stroke: t === "accent" ? n.ink.accent : n.ink.line,
|
|
584
|
+
strokeWidth: 1,
|
|
585
|
+
strokeLinecap: "round",
|
|
586
|
+
strokeLinejoin: "round"
|
|
587
|
+
}
|
|
588
|
+
)
|
|
589
|
+
},
|
|
590
|
+
t
|
|
591
|
+
))
|
|
592
|
+
] });
|
|
593
|
+
}
|
|
594
|
+
function Qr({
|
|
595
|
+
style: e,
|
|
596
|
+
rect: n,
|
|
597
|
+
pan: r,
|
|
598
|
+
zoom: t = 1,
|
|
599
|
+
className: i = "absolute inset-0 w-full h-full pointer-events-none"
|
|
600
|
+
}) {
|
|
601
|
+
const l = Qe().replace(/:/g, ""), o = r ? `translate(${r.x} ${r.y}) scale(${t})` : t !== 1 ? `scale(${t})` : "", a = n ? { x: n.x, y: n.y, width: n.width, height: n.height } : { x: 0, y: 0, width: "100%", height: "100%" };
|
|
602
|
+
return /* @__PURE__ */ d.jsxs("svg", { className: i, "aria-hidden": "true", children: [
|
|
603
|
+
/* @__PURE__ */ d.jsx(nn, { uid: l, style: e, gridTransform: o }),
|
|
604
|
+
/* @__PURE__ */ d.jsx("rect", { ...a, fill: `url(#${Dn(l)})` }),
|
|
605
|
+
Jr(l).map((c) => /* @__PURE__ */ d.jsx("rect", { ...a, fill: `url(#${c})`, opacity: 0.6 }, c)),
|
|
606
|
+
e.paper.grain > 0 && /* @__PURE__ */ d.jsx("rect", { ...a, filter: `url(#${Yn(l)})`, opacity: e.paper.grain })
|
|
607
|
+
] });
|
|
608
|
+
}
|
|
609
|
+
const Ie = g(10), ei = 9, mn = (e, n) => e.length > n ? `${e.slice(0, n - 1)}…` : e;
|
|
610
|
+
function ni({
|
|
611
|
+
style: e,
|
|
612
|
+
plate: n,
|
|
613
|
+
rows: r,
|
|
614
|
+
title: t,
|
|
615
|
+
tally: i,
|
|
616
|
+
className: l = "absolute inset-0 w-full h-full pointer-events-none"
|
|
617
|
+
}) {
|
|
618
|
+
const o = Qe().replace(/:/g, ""), a = r.slice(0, ei), c = r.length - a.length, s = {
|
|
619
|
+
x: n.minX + Ie,
|
|
620
|
+
y: n.minY + Ie,
|
|
621
|
+
width: n.maxX - n.minX - Ie * 2,
|
|
622
|
+
height: n.maxY - n.minY - Ie * 2
|
|
623
|
+
}, u = {
|
|
624
|
+
fontFamily: e.font,
|
|
625
|
+
letterSpacing: "0.08em"
|
|
626
|
+
}, x = g(236), p = g(13), f = g(16), m = f + Math.max(a.length, 1) * p + (c > 0 ? p : 0), y = s.x + g(14), A = s.y + g(14), v = g(264), b = g(74), D = g(126), L = s.x + s.width - v - g(14), w = s.y + s.height - b - g(14);
|
|
627
|
+
return /* @__PURE__ */ d.jsxs("svg", { className: l, style: { overflow: "visible" }, "aria-hidden": "true", children: [
|
|
628
|
+
/* @__PURE__ */ d.jsx(nn, { uid: o, style: e }),
|
|
629
|
+
/* @__PURE__ */ d.jsx(
|
|
630
|
+
"rect",
|
|
631
|
+
{
|
|
632
|
+
x: n.minX,
|
|
633
|
+
y: n.minY,
|
|
634
|
+
width: n.maxX - n.minX,
|
|
635
|
+
height: n.maxY - n.minY,
|
|
636
|
+
fill: "none",
|
|
637
|
+
stroke: e.paper.edge,
|
|
638
|
+
strokeWidth: 1.4
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
/* @__PURE__ */ d.jsx(
|
|
642
|
+
"rect",
|
|
643
|
+
{
|
|
644
|
+
x: s.x,
|
|
645
|
+
y: s.y,
|
|
646
|
+
width: s.width,
|
|
647
|
+
height: s.height,
|
|
648
|
+
fill: "none",
|
|
649
|
+
stroke: e.paper.edge,
|
|
650
|
+
strokeWidth: 0.6,
|
|
651
|
+
opacity: 0.75
|
|
652
|
+
}
|
|
653
|
+
),
|
|
654
|
+
[
|
|
655
|
+
[s.x, s.y, 1, 1],
|
|
656
|
+
[s.x + s.width, s.y, -1, 1],
|
|
657
|
+
[s.x, s.y + s.height, 1, -1],
|
|
658
|
+
[s.x + s.width, s.y + s.height, -1, -1]
|
|
659
|
+
].map(([j, I, $, B], N) => /* @__PURE__ */ d.jsx(
|
|
660
|
+
"path",
|
|
661
|
+
{
|
|
662
|
+
d: `M ${j + $ * g(16)} ${I} L ${j} ${I} L ${j} ${I + B * g(16)}`,
|
|
663
|
+
fill: "none",
|
|
664
|
+
stroke: e.ink.line,
|
|
665
|
+
strokeWidth: 1.2
|
|
666
|
+
},
|
|
667
|
+
N
|
|
668
|
+
)),
|
|
669
|
+
a.length > 0 && /* @__PURE__ */ d.jsxs("g", { children: [
|
|
670
|
+
/* @__PURE__ */ d.jsx(
|
|
671
|
+
"rect",
|
|
672
|
+
{
|
|
673
|
+
x: y,
|
|
674
|
+
y: A,
|
|
675
|
+
width: x,
|
|
676
|
+
height: m,
|
|
677
|
+
fill: e.paper.from,
|
|
678
|
+
fillOpacity: 0.55,
|
|
679
|
+
stroke: e.ink.line,
|
|
680
|
+
strokeWidth: 0.8
|
|
681
|
+
}
|
|
682
|
+
),
|
|
683
|
+
/* @__PURE__ */ d.jsx(
|
|
684
|
+
"line",
|
|
685
|
+
{
|
|
686
|
+
x1: y,
|
|
687
|
+
y1: A + f,
|
|
688
|
+
x2: y + x,
|
|
689
|
+
y2: A + f,
|
|
690
|
+
stroke: e.ink.line,
|
|
691
|
+
strokeWidth: 0.8
|
|
692
|
+
}
|
|
693
|
+
),
|
|
694
|
+
/* @__PURE__ */ d.jsx("text", { x: y + g(8), y: A + g(11), fill: e.ink.text, fontSize: g(8), fontWeight: 600, style: u, children: "COMPONENT INDEX" }),
|
|
695
|
+
/* @__PURE__ */ d.jsxs(
|
|
696
|
+
"text",
|
|
697
|
+
{
|
|
698
|
+
x: y + x - g(8),
|
|
699
|
+
y: A + g(11),
|
|
700
|
+
textAnchor: "end",
|
|
701
|
+
fill: e.ink.muted,
|
|
702
|
+
fontSize: g(8),
|
|
703
|
+
style: u,
|
|
704
|
+
children: [
|
|
705
|
+
Pe(r.length),
|
|
706
|
+
" ITEMS"
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
),
|
|
710
|
+
a.map((j, I) => {
|
|
711
|
+
const $ = A + f + I * p, B = Nn(j.color), N = Pn(o, B, "top");
|
|
712
|
+
return /* @__PURE__ */ d.jsxs("g", { children: [
|
|
713
|
+
/* @__PURE__ */ d.jsx("text", { x: y + g(8), y: $ + g(9.5), fill: e.ink.muted, fontSize: g(7.5), style: u, children: Pe(j.n) }),
|
|
714
|
+
/* @__PURE__ */ d.jsx(
|
|
715
|
+
"rect",
|
|
716
|
+
{
|
|
717
|
+
x: y + g(28),
|
|
718
|
+
y: $ + g(3),
|
|
719
|
+
width: g(14),
|
|
720
|
+
height: g(7),
|
|
721
|
+
fill: e.face.right,
|
|
722
|
+
stroke: e.ink.line,
|
|
723
|
+
strokeWidth: 0.4
|
|
724
|
+
}
|
|
725
|
+
),
|
|
726
|
+
N.map((R) => /* @__PURE__ */ d.jsx(
|
|
727
|
+
"rect",
|
|
728
|
+
{
|
|
729
|
+
x: y + g(28),
|
|
730
|
+
y: $ + g(3),
|
|
731
|
+
width: g(14),
|
|
732
|
+
height: g(7),
|
|
733
|
+
fill: `url(#${R})`,
|
|
734
|
+
opacity: 0.85
|
|
735
|
+
},
|
|
736
|
+
R
|
|
737
|
+
)),
|
|
738
|
+
/* @__PURE__ */ d.jsx("text", { x: y + g(50), y: $ + g(9.5), fill: e.ink.text, fontSize: g(7.5), style: u, children: mn((j.name || "").toUpperCase(), 18) }),
|
|
739
|
+
/* @__PURE__ */ d.jsx(
|
|
740
|
+
"text",
|
|
741
|
+
{
|
|
742
|
+
x: y + x - g(8),
|
|
743
|
+
y: $ + g(9.5),
|
|
744
|
+
textAnchor: "end",
|
|
745
|
+
fill: e.ink.muted,
|
|
746
|
+
fontSize: g(7),
|
|
747
|
+
style: u,
|
|
748
|
+
children: zr[B]
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
] }, j.n);
|
|
752
|
+
}),
|
|
753
|
+
c > 0 && /* @__PURE__ */ d.jsx(
|
|
754
|
+
"text",
|
|
755
|
+
{
|
|
756
|
+
x: y + g(8),
|
|
757
|
+
y: A + f + a.length * p + g(9.5),
|
|
758
|
+
fill: e.ink.muted,
|
|
759
|
+
fontSize: g(7.5),
|
|
760
|
+
style: u,
|
|
761
|
+
children: `+ ${c} NOT LISTED`
|
|
762
|
+
}
|
|
763
|
+
)
|
|
764
|
+
] }),
|
|
765
|
+
/* @__PURE__ */ d.jsxs("g", { children: [
|
|
766
|
+
/* @__PURE__ */ d.jsx(
|
|
767
|
+
"rect",
|
|
768
|
+
{
|
|
769
|
+
x: L,
|
|
770
|
+
y: w,
|
|
771
|
+
width: v,
|
|
772
|
+
height: b,
|
|
773
|
+
fill: e.paper.from,
|
|
774
|
+
fillOpacity: 0.55,
|
|
775
|
+
stroke: e.ink.line,
|
|
776
|
+
strokeWidth: 0.8
|
|
777
|
+
}
|
|
778
|
+
),
|
|
779
|
+
/* @__PURE__ */ d.jsx("line", { x1: L, y1: w + g(30), x2: L + v, y2: w + g(30), stroke: e.ink.line, strokeWidth: 0.8 }),
|
|
780
|
+
/* @__PURE__ */ d.jsx("line", { x1: L, y1: w + g(52), x2: L + v, y2: w + g(52), stroke: e.ink.line, strokeWidth: 0.5 }),
|
|
781
|
+
/* @__PURE__ */ d.jsx("line", { x1: L + D, y1: w + g(30), x2: L + D, y2: w + b, stroke: e.ink.line, strokeWidth: 0.5 }),
|
|
782
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(12), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "DRAWING TITLE" }),
|
|
783
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(24), fill: e.ink.text, fontSize: g(10), fontWeight: 600, style: u, children: mn((t || "UNTITLED ASSEMBLY").toUpperCase(), 26) }),
|
|
784
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(43), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "PROJECTION" }),
|
|
785
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D - g(9), y: w + g(43), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: "ISOMETRIC 30°" }),
|
|
786
|
+
/* @__PURE__ */ d.jsx("text", { x: L + g(9), y: w + g(65), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "SCALE" }),
|
|
787
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D - g(9), y: w + g(65), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: "1:1" }),
|
|
788
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D + g(9), y: w + g(43), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "QTY" }),
|
|
789
|
+
/* @__PURE__ */ d.jsx("text", { x: L + v - g(9), y: w + g(43), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: i || `${Pe(r.length)} CMP` }),
|
|
790
|
+
/* @__PURE__ */ d.jsx("text", { x: L + D + g(9), y: w + g(65), fill: e.ink.muted, fontSize: g(6.5), style: u, children: "SHEET" }),
|
|
791
|
+
/* @__PURE__ */ d.jsx("text", { x: L + v - g(9), y: w + g(65), textAnchor: "end", fill: e.ink.text, fontSize: g(7), style: u, children: "1 OF 1" })
|
|
792
|
+
] })
|
|
793
|
+
] });
|
|
354
794
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
795
|
+
function ri({
|
|
796
|
+
uid: e,
|
|
797
|
+
style: n,
|
|
798
|
+
box: r,
|
|
799
|
+
color: t,
|
|
800
|
+
tag: i,
|
|
801
|
+
selected: l = !1,
|
|
802
|
+
opacity: o,
|
|
803
|
+
onClick: a,
|
|
804
|
+
onPointerDown: c
|
|
805
|
+
}) {
|
|
806
|
+
const s = Nn(t), u = l ? n.ink.accent : n.ink.line, x = l ? n.ink.accent : n.ink.text, p = [
|
|
807
|
+
{ face: "left", path: r.left },
|
|
808
|
+
{ face: "right", path: r.right },
|
|
809
|
+
{ face: "top", path: r.top }
|
|
810
|
+
];
|
|
811
|
+
return /* @__PURE__ */ d.jsxs(
|
|
812
|
+
"g",
|
|
813
|
+
{
|
|
814
|
+
className: a || c ? "cursor-pointer" : void 0,
|
|
815
|
+
opacity: o,
|
|
816
|
+
onClick: a,
|
|
817
|
+
onPointerDown: c,
|
|
818
|
+
children: [
|
|
819
|
+
p.map(({ face: f, path: m }) => /* @__PURE__ */ d.jsxs("g", { children: [
|
|
820
|
+
/* @__PURE__ */ d.jsx("path", { d: m, fill: n.face[f] }),
|
|
821
|
+
Pn(e, s, f).map((y) => /* @__PURE__ */ d.jsx("path", { d: m, fill: `url(#${y})`, opacity: n.hatchOpacity[f] }, y))
|
|
822
|
+
] }, f)),
|
|
823
|
+
/* @__PURE__ */ d.jsx(
|
|
824
|
+
"path",
|
|
825
|
+
{
|
|
826
|
+
d: r.hidden,
|
|
827
|
+
fill: "none",
|
|
828
|
+
stroke: n.ink.hidden,
|
|
829
|
+
strokeWidth: n.strokeWidth * 0.55,
|
|
830
|
+
strokeDasharray: "3.5 3",
|
|
831
|
+
opacity: 0.85
|
|
832
|
+
}
|
|
833
|
+
),
|
|
834
|
+
/* @__PURE__ */ d.jsx(
|
|
835
|
+
"path",
|
|
836
|
+
{
|
|
837
|
+
d: r.visible,
|
|
838
|
+
fill: "none",
|
|
839
|
+
stroke: u,
|
|
840
|
+
strokeWidth: l ? n.strokeWidth * 1.7 : n.strokeWidth,
|
|
841
|
+
strokeLinejoin: "round",
|
|
842
|
+
strokeLinecap: "round"
|
|
843
|
+
}
|
|
844
|
+
),
|
|
845
|
+
i != null && /* @__PURE__ */ d.jsx(
|
|
846
|
+
"text",
|
|
847
|
+
{
|
|
848
|
+
x: r.topCenter.x,
|
|
849
|
+
y: r.topCenter.y + g(3),
|
|
850
|
+
textAnchor: "middle",
|
|
851
|
+
fill: x,
|
|
852
|
+
fontSize: g(8),
|
|
853
|
+
fontWeight: 600,
|
|
854
|
+
fontFamily: n.font,
|
|
855
|
+
style: { letterSpacing: "0.1em" },
|
|
856
|
+
pointerEvents: "none",
|
|
857
|
+
children: Pe(i)
|
|
858
|
+
}
|
|
859
|
+
)
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
}
|
|
864
|
+
function ii({
|
|
865
|
+
style: e,
|
|
866
|
+
box: n,
|
|
867
|
+
name: r,
|
|
868
|
+
subtitle: t,
|
|
869
|
+
selected: i = !1,
|
|
870
|
+
opacity: l
|
|
871
|
+
}) {
|
|
872
|
+
const o = i ? e.ink.accent : e.ink.line, a = i ? e.ink.accent : e.ink.text, c = (r || "").toUpperCase(), s = (t || "").toUpperCase(), u = n.minY - g(11), x = u - g(4), p = s ? u - g(15) : u - g(4), f = Math.max(c.length * g(5.6), s.length * g(4.4), g(24));
|
|
873
|
+
return /* @__PURE__ */ d.jsxs("g", { pointerEvents: "none", opacity: l, children: [
|
|
874
|
+
/* @__PURE__ */ d.jsx(
|
|
875
|
+
"line",
|
|
876
|
+
{
|
|
877
|
+
x1: n.topCenter.x,
|
|
878
|
+
y1: n.topCenter.y - g(6),
|
|
879
|
+
x2: n.topCenter.x,
|
|
880
|
+
y2: u,
|
|
881
|
+
stroke: o,
|
|
882
|
+
strokeWidth: e.strokeWidth * 0.6
|
|
883
|
+
}
|
|
884
|
+
),
|
|
885
|
+
/* @__PURE__ */ d.jsx(
|
|
886
|
+
"line",
|
|
887
|
+
{
|
|
888
|
+
x1: n.topCenter.x - f / 2,
|
|
889
|
+
y1: u,
|
|
890
|
+
x2: n.topCenter.x + f / 2,
|
|
891
|
+
y2: u,
|
|
892
|
+
stroke: o,
|
|
893
|
+
strokeWidth: e.strokeWidth * 0.6
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
/* @__PURE__ */ d.jsx(
|
|
897
|
+
"text",
|
|
898
|
+
{
|
|
899
|
+
x: n.topCenter.x,
|
|
900
|
+
y: p,
|
|
901
|
+
textAnchor: "middle",
|
|
902
|
+
fill: a,
|
|
903
|
+
fontSize: g(9.5),
|
|
904
|
+
fontWeight: 600,
|
|
905
|
+
fontFamily: e.font,
|
|
906
|
+
stroke: e.paper.from,
|
|
907
|
+
strokeWidth: g(3),
|
|
908
|
+
paintOrder: "stroke",
|
|
909
|
+
strokeLinejoin: "round",
|
|
910
|
+
style: { letterSpacing: "0.12em" },
|
|
911
|
+
children: c
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
s && /* @__PURE__ */ d.jsx(
|
|
915
|
+
"text",
|
|
916
|
+
{
|
|
917
|
+
x: n.topCenter.x,
|
|
918
|
+
y: x,
|
|
919
|
+
textAnchor: "middle",
|
|
920
|
+
fill: e.ink.muted,
|
|
921
|
+
fontSize: g(7.5),
|
|
922
|
+
fontFamily: e.font,
|
|
923
|
+
stroke: e.paper.from,
|
|
924
|
+
strokeWidth: g(2.5),
|
|
925
|
+
paintOrder: "stroke",
|
|
926
|
+
strokeLinejoin: "round",
|
|
927
|
+
style: { letterSpacing: "0.1em" },
|
|
928
|
+
children: s
|
|
929
|
+
}
|
|
930
|
+
)
|
|
931
|
+
] });
|
|
358
932
|
}
|
|
359
|
-
|
|
360
|
-
const vr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', vn = {
|
|
933
|
+
const Bn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', ti = {
|
|
361
934
|
blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
|
|
362
935
|
violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
|
|
363
936
|
cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
|
|
@@ -365,7 +938,7 @@ const vr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', vn =
|
|
|
365
938
|
amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
|
|
366
939
|
rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
|
|
367
940
|
slate: { top: "#475569", side: "#334155", front: "#1e293b" }
|
|
368
|
-
},
|
|
941
|
+
}, oi = {
|
|
369
942
|
blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
|
|
370
943
|
violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
|
|
371
944
|
cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
|
|
@@ -374,20 +947,20 @@ const vr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', vn =
|
|
|
374
947
|
rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
|
|
375
948
|
slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
|
|
376
949
|
};
|
|
377
|
-
function
|
|
378
|
-
const
|
|
379
|
-
const
|
|
950
|
+
function Me(e, n, r) {
|
|
951
|
+
const t = (s) => {
|
|
952
|
+
const u = s.replace("#", "");
|
|
380
953
|
return {
|
|
381
|
-
r: parseInt(
|
|
382
|
-
g: parseInt(
|
|
383
|
-
b: parseInt(
|
|
954
|
+
r: parseInt(u.substring(0, 2), 16),
|
|
955
|
+
g: parseInt(u.substring(2, 4), 16),
|
|
956
|
+
b: parseInt(u.substring(4, 6), 16)
|
|
384
957
|
};
|
|
385
|
-
}, i =
|
|
386
|
-
return `rgb(${
|
|
958
|
+
}, i = t(e), l = t(n), o = Math.round(i.r + (l.r - i.r) * r), a = Math.round(i.g + (l.g - i.g) * r), c = Math.round(i.b + (l.b - i.b) * r);
|
|
959
|
+
return `rgb(${o},${a},${c})`;
|
|
387
960
|
}
|
|
388
|
-
function
|
|
389
|
-
const a =
|
|
390
|
-
return /* @__PURE__ */
|
|
961
|
+
function li({ x: e, y: n, z: r, children: t, fontSize: i = 8, color: l = "#1e293b", shadow: o }) {
|
|
962
|
+
const a = E(e, n, r);
|
|
963
|
+
return /* @__PURE__ */ d.jsx("g", { transform: `translate(${a.screenX}, ${a.screenY})`, filter: o, children: /* @__PURE__ */ d.jsx("g", { transform: "matrix(0.866, -0.5, 0.866, 0.5, 0, 0)", children: /* @__PURE__ */ d.jsx(
|
|
391
964
|
"text",
|
|
392
965
|
{
|
|
393
966
|
x: 0,
|
|
@@ -396,227 +969,318 @@ function An({ x: e, y: r, z: n, children: o, fontSize: i = 8, color: l = "#1e293
|
|
|
396
969
|
fill: l,
|
|
397
970
|
fontSize: i,
|
|
398
971
|
fontWeight: 600,
|
|
399
|
-
fontFamily:
|
|
972
|
+
fontFamily: Bn,
|
|
400
973
|
style: { textTransform: "uppercase", letterSpacing: "0.06em" },
|
|
401
|
-
children:
|
|
974
|
+
children: t
|
|
402
975
|
}
|
|
403
976
|
) }) });
|
|
404
977
|
}
|
|
405
|
-
function
|
|
406
|
-
const s =
|
|
407
|
-
return /* @__PURE__ */
|
|
408
|
-
a && /* @__PURE__ */
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
a && /* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
978
|
+
function ai({ width: e, depth: n, elevation: r, color: t, opacity: i, borderColor: l, theme: o, isGround: a }) {
|
|
979
|
+
const s = he(e, n, a ? 8 : 2, 0, 0), u = E(0, 0, r);
|
|
980
|
+
return /* @__PURE__ */ d.jsxs("g", { transform: `translate(${u.screenX}, ${u.screenY})`, children: [
|
|
981
|
+
a && /* @__PURE__ */ d.jsx("g", { transform: "translate(4, 4)", opacity: 0.2, children: /* @__PURE__ */ d.jsx("path", { d: s.top, fill: "#000" }) }),
|
|
982
|
+
/* @__PURE__ */ d.jsx("path", { d: s.top, fill: t, opacity: i }),
|
|
983
|
+
a && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
984
|
+
/* @__PURE__ */ d.jsx("path", { d: s.left, fill: o === "dark" ? "#0f172a" : "#cbd5e1", opacity: 0.8 }),
|
|
985
|
+
/* @__PURE__ */ d.jsx("path", { d: s.right, fill: o === "dark" ? "#1e293b" : "#94a3b8", opacity: 0.8 })
|
|
413
986
|
] }),
|
|
414
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ d.jsx(
|
|
415
988
|
"path",
|
|
416
989
|
{
|
|
417
990
|
d: s.top,
|
|
418
991
|
fill: "none",
|
|
419
|
-
stroke: l || (
|
|
992
|
+
stroke: l || (o === "dark" ? "#475569" : "#94a3b8"),
|
|
420
993
|
strokeWidth: a ? 1.5 : 0.75,
|
|
421
994
|
opacity: a ? 1 : 0.6
|
|
422
995
|
}
|
|
423
996
|
)
|
|
424
997
|
] });
|
|
425
998
|
}
|
|
426
|
-
function
|
|
427
|
-
const { interactive:
|
|
428
|
-
|
|
429
|
-
|
|
999
|
+
function Do({ config: e, options: n = {}, className: r, style: t, onNodeClick: i, onLayerClick: l }) {
|
|
1000
|
+
const { interactive: o = !0, animate: a = !0, showLabels: c = !0, expandOnHover: s = !0 } = n, { theme: u, canvas: x, origin: p, tiers: f, floorSize: m, nodes: y, cornerRadius: A = 0 } = e, v = Ur(e.style), b = v.technical, D = Qe().replace(/:/g, ""), L = u === "dark" ? ti : oi, w = b ? v.paper.to : u === "dark" ? "#0f172a" : "#fafafa", j = b ? v.ink.text : u === "dark" ? "#e2e8f0" : "#1e293b", I = b ? v.ink.muted : u === "dark" ? "#64748b" : "#94a3b8", $ = Fr(() => {
|
|
1001
|
+
const O = y.map((h, k) => ({ node: h, i: k })).sort((h, k) => h.node.tier - k.node.tier || h.node.y - k.node.y || h.node.x - k.node.x), S = /* @__PURE__ */ new Map();
|
|
1002
|
+
return O.forEach(({ i: h }, k) => S.set(h, k + 1)), S;
|
|
1003
|
+
}, [y]), B = { minX: 16, minY: 16, maxX: x.width - 16, maxY: x.height - 16 }, [N, R] = Le(/* @__PURE__ */ new Set());
|
|
1004
|
+
Lr(() => {
|
|
1005
|
+
a ? (R(/* @__PURE__ */ new Set()), f.forEach((O, S) => {
|
|
430
1006
|
setTimeout(() => {
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
})) :
|
|
1007
|
+
R((h) => /* @__PURE__ */ new Set([...h, S]));
|
|
1008
|
+
}, S * 150 + 100);
|
|
1009
|
+
})) : R(new Set(f.map((O, S) => S)));
|
|
434
1010
|
}, [e.id, a, f.length]);
|
|
435
|
-
const [
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
const
|
|
439
|
-
return
|
|
1011
|
+
const [M, ne] = Le(null), [J, q] = Le(null), [T, W] = Le(null), Q = [...y].sort((O, S) => {
|
|
1012
|
+
const h = f[O.tier]?.elevation || 0, k = f[S.tier]?.elevation || 0;
|
|
1013
|
+
if (h !== k) return h - k;
|
|
1014
|
+
const F = O.x + O.width + (O.y + O.depth);
|
|
1015
|
+
return S.x + S.width + (S.y + S.depth) - F;
|
|
440
1016
|
});
|
|
441
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ d.jsx("div", { className: r, style: { display: "inline-block", ...t }, children: /* @__PURE__ */ d.jsxs(
|
|
442
1018
|
"svg",
|
|
443
1019
|
{
|
|
444
|
-
width:
|
|
445
|
-
height:
|
|
1020
|
+
width: x.width,
|
|
1021
|
+
height: x.height,
|
|
446
1022
|
style: { backgroundColor: w },
|
|
447
1023
|
onClick: () => {
|
|
448
|
-
|
|
1024
|
+
o && (W(null), q(null));
|
|
449
1025
|
},
|
|
450
1026
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ d.jsxs("defs", { children: [
|
|
1028
|
+
/* @__PURE__ */ d.jsx("pattern", { id: `grid-${e.id}`, width: "24", height: "24", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ d.jsx("circle", { cx: "12", cy: "12", r: "0.5", fill: u === "dark" ? "#1e293b" : "#e2e8f0" }) }),
|
|
1029
|
+
/* @__PURE__ */ d.jsx("filter", { id: `glow-${e.id}`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ d.jsx(
|
|
454
1030
|
"feDropShadow",
|
|
455
1031
|
{
|
|
456
1032
|
dx: "0",
|
|
457
1033
|
dy: "4",
|
|
458
1034
|
stdDeviation: "8",
|
|
459
|
-
floodColor:
|
|
1035
|
+
floodColor: u === "dark" ? "#60a5fa" : "#3b82f6",
|
|
460
1036
|
floodOpacity: "0.3"
|
|
461
1037
|
}
|
|
462
1038
|
) }),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ d.jsxs("radialGradient", { id: `bg-${e.id}`, cx: "48%", cy: "34%", r: "82%", children: [
|
|
1040
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "0%", stopColor: u === "dark" ? "#16203a" : "#ffffff" }),
|
|
1041
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "55%", stopColor: u === "dark" ? "#0e1526" : "#f2f5f9" }),
|
|
1042
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "100%", stopColor: u === "dark" ? "#080d18" : "#e7ecf2" })
|
|
467
1043
|
] }),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ d.jsx("filter", { id: `contact-${e.id}`, x: "-60%", y: "-60%", width: "220%", height: "220%", children: /* @__PURE__ */ d.jsx("feGaussianBlur", { stdDeviation: "5" }) }),
|
|
1045
|
+
/* @__PURE__ */ d.jsxs("linearGradient", { id: `sheen-${e.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1046
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "0%", stopColor: "#ffffff", stopOpacity: "0.18" }),
|
|
1047
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "55%", stopColor: "#ffffff", stopOpacity: "0.04" }),
|
|
1048
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "100%", stopColor: "#ffffff", stopOpacity: "0" })
|
|
473
1049
|
] }),
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ d.jsxs("linearGradient", { id: `shade-${e.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1051
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "0%", stopColor: "#000000", stopOpacity: "0" }),
|
|
1052
|
+
/* @__PURE__ */ d.jsx("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0.24" })
|
|
477
1053
|
] }),
|
|
478
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ d.jsx("filter", { id: `label-${e.id}`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ d.jsx("feDropShadow", { dx: "0", dy: "0.5", stdDeviation: "0.7", floodColor: "#000000", floodOpacity: "0.7" }) })
|
|
479
1055
|
] }),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
1056
|
+
b ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1057
|
+
/* @__PURE__ */ d.jsx(nn, { uid: D, style: v }),
|
|
1058
|
+
/* @__PURE__ */ d.jsx(
|
|
1059
|
+
Qr,
|
|
1060
|
+
{
|
|
1061
|
+
style: v,
|
|
1062
|
+
rect: { x: 0, y: 0, width: x.width, height: x.height },
|
|
1063
|
+
className: ""
|
|
1064
|
+
}
|
|
1065
|
+
)
|
|
1066
|
+
] }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1067
|
+
/* @__PURE__ */ d.jsx("rect", { width: "100%", height: "100%", fill: `url(#bg-${e.id})` }),
|
|
1068
|
+
/* @__PURE__ */ d.jsx("rect", { width: "100%", height: "100%", fill: `url(#grid-${e.id})`, opacity: "0.5" })
|
|
1069
|
+
] }),
|
|
1070
|
+
/* @__PURE__ */ d.jsx("g", { transform: `translate(${p.x}, ${p.y})`, children: f.map((O, S) => {
|
|
1071
|
+
const h = Q.filter((_) => _.tier === S), k = N.has(S), F = o && (J === S || J === null && T === null && M === S), Y = o && (J !== null || M !== null || T !== null), ce = T?.tier === S, se = Y && !F && !ce, P = k ? 0 : 60, ie = k ? 1 : 0, le = F && s ? { x: 10, y: -34 } : { x: 0, y: 0 }, ke = F ? 1.03 : 1, Fe = E(m.width / 2, m.depth / 2, O.elevation), sn = O.offset || { x: 0, y: 0 };
|
|
1072
|
+
return /* @__PURE__ */ d.jsxs(
|
|
485
1073
|
"g",
|
|
486
1074
|
{
|
|
487
|
-
"data-tier":
|
|
488
|
-
onMouseEnter: () =>
|
|
489
|
-
onMouseLeave: () =>
|
|
490
|
-
onClick: (
|
|
491
|
-
|
|
1075
|
+
"data-tier": S,
|
|
1076
|
+
onMouseEnter: () => o && ne(S),
|
|
1077
|
+
onMouseLeave: () => o && ne(null),
|
|
1078
|
+
onClick: (_) => {
|
|
1079
|
+
o && (_.stopPropagation(), W(null), q((X) => X === S ? null : S), l?.(S));
|
|
492
1080
|
},
|
|
493
1081
|
style: {
|
|
494
|
-
transform: `translate(${
|
|
1082
|
+
transform: `translate(${sn.x + le.x}px, ${sn.y + le.y}px) translate(${Fe.screenX}px, ${Fe.screenY + P}px) scale(${ke}) translate(${-Fe.screenX}px, ${-Fe.screenY}px)`,
|
|
495
1083
|
transition: "transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",
|
|
496
|
-
opacity:
|
|
497
|
-
filter:
|
|
498
|
-
cursor:
|
|
1084
|
+
opacity: ie * (se ? 0.35 : 1),
|
|
1085
|
+
filter: F ? `url(#glow-${e.id})` : "none",
|
|
1086
|
+
cursor: o ? "pointer" : "default"
|
|
499
1087
|
},
|
|
500
1088
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
|
|
1089
|
+
b ? /* @__PURE__ */ d.jsx(
|
|
1090
|
+
ci,
|
|
1091
|
+
{
|
|
1092
|
+
width: m.width,
|
|
1093
|
+
depth: m.depth,
|
|
1094
|
+
elevation: S === 0 ? -2 : O.elevation,
|
|
1095
|
+
ink: S === 0 ? v.ink.line : v.ink.hidden,
|
|
1096
|
+
isGround: S === 0
|
|
1097
|
+
}
|
|
1098
|
+
) : /* @__PURE__ */ d.jsx(
|
|
1099
|
+
ai,
|
|
503
1100
|
{
|
|
504
1101
|
width: m.width,
|
|
505
1102
|
depth: m.depth,
|
|
506
|
-
elevation:
|
|
507
|
-
color:
|
|
508
|
-
opacity:
|
|
509
|
-
borderColor:
|
|
510
|
-
theme:
|
|
511
|
-
isGround:
|
|
1103
|
+
elevation: S === 0 ? -2 : O.elevation,
|
|
1104
|
+
color: O.floorColor || (u === "dark" ? "#0f172a" : "#f8fafc"),
|
|
1105
|
+
opacity: O.floorOpacity || (S === 0 ? 0.95 : 0.5),
|
|
1106
|
+
borderColor: O.borderColor,
|
|
1107
|
+
theme: u,
|
|
1108
|
+
isGround: S === 0
|
|
512
1109
|
}
|
|
513
1110
|
),
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
return /* @__PURE__ */
|
|
1111
|
+
b && h.map((_, X) => {
|
|
1112
|
+
const me = O.elevation + 5, fe = E(_.x, _.y, me), V = xn(_.width, _.depth, _.height, fe.screenX, fe.screenY), G = T?.tier === S && T?.index === X, de = o && T !== null && !G;
|
|
1113
|
+
return /* @__PURE__ */ d.jsx(
|
|
1114
|
+
ri,
|
|
1115
|
+
{
|
|
1116
|
+
uid: D,
|
|
1117
|
+
style: v,
|
|
1118
|
+
box: V,
|
|
1119
|
+
color: _.color,
|
|
1120
|
+
tag: $.get(y.indexOf(_)),
|
|
1121
|
+
selected: G,
|
|
1122
|
+
opacity: (_.opacity ?? 1) * (de ? 0.3 : 1),
|
|
1123
|
+
onClick: o ? () => {
|
|
1124
|
+
if (q(null), W((Ce) => Ce && Ce.tier === S && Ce.index === X ? null : { tier: S, index: X }), i?.(_, { tier: S, index: X }), _.link)
|
|
1125
|
+
try {
|
|
1126
|
+
window.open(_.link, "_blank");
|
|
1127
|
+
} catch {
|
|
1128
|
+
}
|
|
1129
|
+
} : void 0
|
|
1130
|
+
},
|
|
1131
|
+
`tech-${X}`
|
|
1132
|
+
);
|
|
1133
|
+
}),
|
|
1134
|
+
b && c && h.map((_, X) => {
|
|
1135
|
+
const me = O.elevation + 5, fe = E(_.x, _.y, me), V = xn(_.width, _.depth, _.height, fe.screenX, fe.screenY), G = T?.tier === S && T?.index === X, de = o && T !== null && !G;
|
|
1136
|
+
return /* @__PURE__ */ d.jsx(
|
|
1137
|
+
ii,
|
|
1138
|
+
{
|
|
1139
|
+
style: v,
|
|
1140
|
+
box: V,
|
|
1141
|
+
name: _.label,
|
|
1142
|
+
selected: G,
|
|
1143
|
+
opacity: de ? 0.3 : 1
|
|
1144
|
+
},
|
|
1145
|
+
`tech-label-${X}`
|
|
1146
|
+
);
|
|
1147
|
+
}),
|
|
1148
|
+
!b && h.map((_, X) => {
|
|
1149
|
+
const me = O.elevation + 5, fe = E(_.x, _.y, me), V = he(_.width, _.depth, _.height, fe.screenX, fe.screenY, A), G = L[_.color] || L.slate, de = T?.tier === S && T?.index === X, Ce = o && T !== null && !de, fn = E(_.x - 3, _.y - 3, O.elevation), Or = he(_.width + 6, _.depth + 6, 0, fn.screenX, fn.screenY, A).top;
|
|
1150
|
+
return /* @__PURE__ */ d.jsxs(
|
|
517
1151
|
"g",
|
|
518
1152
|
{
|
|
519
|
-
"data-node": `${
|
|
520
|
-
opacity: (
|
|
521
|
-
onClick:
|
|
522
|
-
if (
|
|
1153
|
+
"data-node": `${S}-${X}`,
|
|
1154
|
+
opacity: (_.opacity ?? 1) * (Ce ? 0.3 : 1),
|
|
1155
|
+
onClick: o ? (re) => {
|
|
1156
|
+
if (re.stopPropagation(), q(null), W((te) => te && te.tier === S && te.index === X ? null : { tier: S, index: X }), i?.(_, { tier: S, index: X }), _.link)
|
|
523
1157
|
try {
|
|
524
|
-
window.open(
|
|
1158
|
+
window.open(_.link, "_blank");
|
|
525
1159
|
} catch {
|
|
526
1160
|
}
|
|
527
1161
|
} : void 0,
|
|
528
|
-
style: { cursor:
|
|
1162
|
+
style: { cursor: o ? "pointer" : "default", transition: "opacity 0.3s ease-out" },
|
|
529
1163
|
children: [
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
|
|
1164
|
+
/* @__PURE__ */ d.jsx("path", { d: Or, fill: "#000000", opacity: 0.3, filter: `url(#contact-${e.id})` }),
|
|
1165
|
+
V.cornerBackRight?.map((re, te) => /* @__PURE__ */ d.jsx(
|
|
532
1166
|
"path",
|
|
533
1167
|
{
|
|
534
|
-
d:
|
|
535
|
-
fill:
|
|
1168
|
+
d: re.path,
|
|
1169
|
+
fill: Me(G.front, G.side, re.intensity)
|
|
536
1170
|
},
|
|
537
|
-
`cbr-${
|
|
1171
|
+
`cbr-${te}`
|
|
538
1172
|
)),
|
|
539
|
-
|
|
1173
|
+
V.cornerBackLeft?.map((re, te) => /* @__PURE__ */ d.jsx(
|
|
540
1174
|
"path",
|
|
541
1175
|
{
|
|
542
|
-
d:
|
|
543
|
-
fill:
|
|
1176
|
+
d: re.path,
|
|
1177
|
+
fill: Me(G.side, G.front, re.intensity)
|
|
544
1178
|
},
|
|
545
|
-
`cbl-${
|
|
1179
|
+
`cbl-${te}`
|
|
546
1180
|
)),
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
|
|
1181
|
+
/* @__PURE__ */ d.jsx("path", { d: V.left, fill: G.side }),
|
|
1182
|
+
/* @__PURE__ */ d.jsx("path", { d: V.left, fill: `url(#shade-${e.id})` }),
|
|
1183
|
+
/* @__PURE__ */ d.jsx("path", { d: V.right, fill: G.front }),
|
|
1184
|
+
/* @__PURE__ */ d.jsx("path", { d: V.right, fill: `url(#shade-${e.id})` }),
|
|
1185
|
+
V.cornerFrontRight?.map((re, te) => /* @__PURE__ */ d.jsx(
|
|
552
1186
|
"path",
|
|
553
1187
|
{
|
|
554
|
-
d:
|
|
555
|
-
fill:
|
|
1188
|
+
d: re.path,
|
|
1189
|
+
fill: Me(G.front, G.side, re.intensity)
|
|
556
1190
|
},
|
|
557
|
-
`cfr-${
|
|
1191
|
+
`cfr-${te}`
|
|
558
1192
|
)),
|
|
559
|
-
|
|
1193
|
+
V.cornerFrontLeft?.map((re, te) => /* @__PURE__ */ d.jsx(
|
|
560
1194
|
"path",
|
|
561
1195
|
{
|
|
562
|
-
d:
|
|
563
|
-
fill:
|
|
1196
|
+
d: re.path,
|
|
1197
|
+
fill: Me(G.front, G.side, re.intensity)
|
|
564
1198
|
},
|
|
565
|
-
`cfl-${
|
|
1199
|
+
`cfl-${te}`
|
|
566
1200
|
)),
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ d.jsx("path", { d: V.top, fill: G.top }),
|
|
1202
|
+
/* @__PURE__ */ d.jsx("path", { d: V.top, fill: `url(#sheen-${e.id})` }),
|
|
1203
|
+
/* @__PURE__ */ d.jsx(
|
|
570
1204
|
"path",
|
|
571
1205
|
{
|
|
572
|
-
d:
|
|
1206
|
+
d: V.top,
|
|
573
1207
|
fill: "none",
|
|
574
|
-
stroke:
|
|
575
|
-
strokeWidth:
|
|
1208
|
+
stroke: de ? "#ffffff" : "rgba(255,255,255,0.28)",
|
|
1209
|
+
strokeWidth: de ? 1.4 : 0.75,
|
|
576
1210
|
strokeLinejoin: "round"
|
|
577
1211
|
}
|
|
578
1212
|
),
|
|
579
|
-
c &&
|
|
580
|
-
|
|
1213
|
+
c && _.label && /* @__PURE__ */ d.jsx(
|
|
1214
|
+
li,
|
|
581
1215
|
{
|
|
582
|
-
x:
|
|
583
|
-
y:
|
|
584
|
-
z:
|
|
585
|
-
fontSize:
|
|
586
|
-
color:
|
|
1216
|
+
x: _.x + _.width / 2,
|
|
1217
|
+
y: _.y + _.depth / 2,
|
|
1218
|
+
z: me + _.height + 2,
|
|
1219
|
+
fontSize: _.width > 70 ? 9 : 8,
|
|
1220
|
+
color: j,
|
|
587
1221
|
shadow: `url(#label-${e.id})`,
|
|
588
|
-
children:
|
|
1222
|
+
children: _.label
|
|
589
1223
|
}
|
|
590
1224
|
)
|
|
591
1225
|
]
|
|
592
1226
|
},
|
|
593
|
-
|
|
1227
|
+
X
|
|
594
1228
|
);
|
|
595
1229
|
}),
|
|
596
|
-
c && /* @__PURE__ */
|
|
1230
|
+
c && /* @__PURE__ */ d.jsx(
|
|
597
1231
|
"text",
|
|
598
1232
|
{
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
601
|
-
fill:
|
|
1233
|
+
x: E(-25, m.depth / 2, O.elevation + 15).screenX - 35,
|
|
1234
|
+
y: E(-25, m.depth / 2, O.elevation + 15).screenY,
|
|
1235
|
+
fill: I,
|
|
602
1236
|
fontSize: 9,
|
|
603
1237
|
fontWeight: 500,
|
|
604
|
-
fontFamily:
|
|
605
|
-
opacity: 0.6,
|
|
606
|
-
style: { letterSpacing: "0.05em" },
|
|
607
|
-
children:
|
|
1238
|
+
fontFamily: Bn,
|
|
1239
|
+
opacity: b ? 0.9 : 0.6,
|
|
1240
|
+
style: { letterSpacing: "0.05em", textTransform: b ? "uppercase" : "none" },
|
|
1241
|
+
children: O.name
|
|
608
1242
|
}
|
|
609
1243
|
)
|
|
610
1244
|
]
|
|
611
1245
|
},
|
|
612
|
-
|
|
1246
|
+
S
|
|
613
1247
|
);
|
|
614
|
-
}) })
|
|
1248
|
+
}) }),
|
|
1249
|
+
b && /* @__PURE__ */ d.jsx(
|
|
1250
|
+
ni,
|
|
1251
|
+
{
|
|
1252
|
+
style: v,
|
|
1253
|
+
plate: B,
|
|
1254
|
+
rows: y.map((O, S) => ({
|
|
1255
|
+
n: $.get(S) || S + 1,
|
|
1256
|
+
name: O.label,
|
|
1257
|
+
subtitle: f[O.tier]?.name,
|
|
1258
|
+
color: O.color
|
|
1259
|
+
})).sort((O, S) => O.n - S.n),
|
|
1260
|
+
title: e.title,
|
|
1261
|
+
tally: `${String(y.length).padStart(2, "0")} CMP / ${String(f.length).padStart(2, "0")} TIER`,
|
|
1262
|
+
className: ""
|
|
1263
|
+
}
|
|
1264
|
+
)
|
|
615
1265
|
]
|
|
616
1266
|
}
|
|
617
1267
|
) });
|
|
618
1268
|
}
|
|
619
|
-
|
|
1269
|
+
function ci({ width: e, depth: n, elevation: r, ink: t, isGround: i }) {
|
|
1270
|
+
const l = E(0, 0, r), o = he(e, n, 0, l.screenX, l.screenY).top;
|
|
1271
|
+
return /* @__PURE__ */ d.jsx(
|
|
1272
|
+
"path",
|
|
1273
|
+
{
|
|
1274
|
+
d: o,
|
|
1275
|
+
fill: "none",
|
|
1276
|
+
stroke: t,
|
|
1277
|
+
strokeWidth: i ? 1 : 0.7,
|
|
1278
|
+
strokeDasharray: i ? void 0 : "5 4",
|
|
1279
|
+
opacity: i ? 0.9 : 0.7
|
|
1280
|
+
}
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1283
|
+
const gn = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', si = {
|
|
620
1284
|
blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
|
|
621
1285
|
violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
|
|
622
1286
|
cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
|
|
@@ -624,7 +1288,7 @@ const rr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Cn =
|
|
|
624
1288
|
amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
|
|
625
1289
|
rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
|
|
626
1290
|
slate: { top: "#475569", side: "#334155", front: "#1e293b" }
|
|
627
|
-
},
|
|
1291
|
+
}, fi = {
|
|
628
1292
|
blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
|
|
629
1293
|
violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
|
|
630
1294
|
cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
|
|
@@ -633,161 +1297,161 @@ const rr = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Cn =
|
|
|
633
1297
|
rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
|
|
634
1298
|
slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
|
|
635
1299
|
};
|
|
636
|
-
function
|
|
637
|
-
const
|
|
638
|
-
const
|
|
1300
|
+
function Ne(e, n, r) {
|
|
1301
|
+
const t = (s) => {
|
|
1302
|
+
const u = s.replace("#", "");
|
|
639
1303
|
return {
|
|
640
|
-
r: parseInt(
|
|
641
|
-
g: parseInt(
|
|
642
|
-
b: parseInt(
|
|
1304
|
+
r: parseInt(u.substring(0, 2), 16),
|
|
1305
|
+
g: parseInt(u.substring(2, 4), 16),
|
|
1306
|
+
b: parseInt(u.substring(4, 6), 16)
|
|
643
1307
|
};
|
|
644
|
-
}, i =
|
|
645
|
-
return `rgb(${
|
|
1308
|
+
}, i = t(e), l = t(n), o = Math.round(i.r + (l.r - i.r) * r), a = Math.round(i.g + (l.g - i.g) * r), c = Math.round(i.b + (l.b - i.b) * r);
|
|
1309
|
+
return `rgb(${o},${a},${c})`;
|
|
646
1310
|
}
|
|
647
|
-
function
|
|
648
|
-
const { theme:
|
|
649
|
-
const
|
|
650
|
-
return
|
|
1311
|
+
function ui(e) {
|
|
1312
|
+
const { theme: n, canvas: r, origin: t, tiers: i, floorSize: l, nodes: o, cornerRadius: a = 0 } = e, c = n === "dark" ? si : fi, s = n === "dark" ? "#0f172a" : "#fafafa", u = n === "dark" ? "#e2e8f0" : "#1e293b", x = n === "dark" ? "#64748b" : "#94a3b8", p = [...o].sort((m, y) => {
|
|
1313
|
+
const A = i[m.tier]?.elevation || 0, v = i[y.tier]?.elevation || 0;
|
|
1314
|
+
return A !== v ? A - v : y.x + y.width + (y.y + y.depth) - (m.x + m.width + (m.y + m.depth));
|
|
651
1315
|
});
|
|
652
|
-
let f = `<svg xmlns="http://www.w3.org/2000/svg" width="${
|
|
1316
|
+
let f = `<svg xmlns="http://www.w3.org/2000/svg" width="${r.width}" height="${r.height}" style="background:${s}">`;
|
|
653
1317
|
f += `<defs>
|
|
654
1318
|
<pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
|
|
655
|
-
<circle cx="12" cy="12" r="0.5" fill="${
|
|
1319
|
+
<circle cx="12" cy="12" r="0.5" fill="${n === "dark" ? "#1e293b" : "#e2e8f0"}"/>
|
|
656
1320
|
</pattern>
|
|
657
1321
|
<radialGradient id="bg" cx="48%" cy="34%" r="82%">
|
|
658
|
-
<stop offset="0%" stop-color="${
|
|
659
|
-
<stop offset="55%" stop-color="${
|
|
660
|
-
<stop offset="100%" stop-color="${
|
|
1322
|
+
<stop offset="0%" stop-color="${n === "dark" ? "#16203a" : "#ffffff"}"/>
|
|
1323
|
+
<stop offset="55%" stop-color="${n === "dark" ? "#0e1526" : "#f2f5f9"}"/>
|
|
1324
|
+
<stop offset="100%" stop-color="${n === "dark" ? "#080d18" : "#e7ecf2"}"/>
|
|
661
1325
|
</radialGradient>
|
|
662
1326
|
<filter id="contact" x="-60%" y="-60%" width="220%" height="220%"><feGaussianBlur stdDeviation="5"/></filter>
|
|
663
1327
|
<linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
|
|
664
1328
|
<linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
|
|
665
1329
|
<filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
|
|
666
|
-
</defs>`, f += '<rect width="100%" height="100%" fill="url(#bg)"/>', f += '<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>', f += `<g transform="translate(${
|
|
1330
|
+
</defs>`, f += '<rect width="100%" height="100%" fill="url(#bg)"/>', f += '<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>', f += `<g transform="translate(${t.x},${t.y})">`;
|
|
667
1331
|
for (let m = 0; m < i.length; m++) {
|
|
668
|
-
const
|
|
669
|
-
f += `<g transform="translate(${
|
|
670
|
-
const
|
|
671
|
-
f += `<g transform="translate(${
|
|
672
|
-
for (const
|
|
673
|
-
const
|
|
674
|
-
f += `<g opacity="${
|
|
675
|
-
const
|
|
676
|
-
if (f += `<path d="${
|
|
677
|
-
for (const
|
|
678
|
-
f += `<path d="${
|
|
679
|
-
if (
|
|
680
|
-
for (const
|
|
681
|
-
f += `<path d="${
|
|
682
|
-
if (f += `<path d="${
|
|
683
|
-
for (const
|
|
684
|
-
f += `<path d="${
|
|
685
|
-
if (
|
|
686
|
-
for (const
|
|
687
|
-
f += `<path d="${
|
|
688
|
-
if (f += `<path d="${
|
|
689
|
-
const
|
|
690
|
-
f += `<g transform="translate(${
|
|
1332
|
+
const y = i[m], A = p.filter(($) => $.tier === m), v = y.offset || { x: 0, y: 0 };
|
|
1333
|
+
f += `<g transform="translate(${v.x},${v.y})">`;
|
|
1334
|
+
const b = m === 0 ? 8 : 2, D = he(l.width, l.depth, b, 0, 0), L = E(0, 0, m === 0 ? -2 : y.elevation), w = y.floorColor || (n === "dark" ? "#0f172a" : "#f8fafc"), j = y.floorOpacity || (m === 0 ? 0.95 : 0.5);
|
|
1335
|
+
f += `<g transform="translate(${L.screenX},${L.screenY})">`, m === 0 && (f += `<g transform="translate(4,4)" opacity="0.2"><path d="${D.top}" fill="#000"/></g>`), f += `<path d="${D.top}" fill="${w}" opacity="${j}"/>`, m === 0 && (f += `<path d="${D.left}" fill="${n === "dark" ? "#0f172a" : "#cbd5e1"}" opacity="0.8"/>`, f += `<path d="${D.right}" fill="${n === "dark" ? "#1e293b" : "#94a3b8"}" opacity="0.8"/>`), f += `<path d="${D.top}" fill="none" stroke="${y.borderColor || (n === "dark" ? "#475569" : "#94a3b8")}" stroke-width="${m === 0 ? 1.5 : 0.75}" opacity="${m === 0 ? 1 : 0.6}"/>`, f += "</g>";
|
|
1336
|
+
for (const $ of A) {
|
|
1337
|
+
const B = y.elevation + 5, N = E($.x, $.y, B), R = he($.width, $.depth, $.height, N.screenX, N.screenY, a), M = c[$.color] || c.slate, ne = $.opacity ?? 1;
|
|
1338
|
+
f += `<g opacity="${ne}">`;
|
|
1339
|
+
const J = E($.x - 3, $.y - 3, y.elevation), q = he($.width + 6, $.depth + 6, 0, J.screenX, J.screenY, a).top;
|
|
1340
|
+
if (f += `<path d="${q}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`, R.cornerBackRight)
|
|
1341
|
+
for (const T of R.cornerBackRight)
|
|
1342
|
+
f += `<path d="${T.path}" fill="${Ne(M.front, M.side, T.intensity)}"/>`;
|
|
1343
|
+
if (R.cornerBackLeft)
|
|
1344
|
+
for (const T of R.cornerBackLeft)
|
|
1345
|
+
f += `<path d="${T.path}" fill="${Ne(M.side, M.front, T.intensity)}"/>`;
|
|
1346
|
+
if (f += `<path d="${R.left}" fill="${M.side}"/>`, f += `<path d="${R.left}" fill="url(#shade)"/>`, f += `<path d="${R.right}" fill="${M.front}"/>`, f += `<path d="${R.right}" fill="url(#shade)"/>`, R.cornerFrontRight)
|
|
1347
|
+
for (const T of R.cornerFrontRight)
|
|
1348
|
+
f += `<path d="${T.path}" fill="${Ne(M.front, M.side, T.intensity)}"/>`;
|
|
1349
|
+
if (R.cornerFrontLeft)
|
|
1350
|
+
for (const T of R.cornerFrontLeft)
|
|
1351
|
+
f += `<path d="${T.path}" fill="${Ne(M.front, M.side, T.intensity)}"/>`;
|
|
1352
|
+
if (f += `<path d="${R.top}" fill="${M.top}"/>`, f += `<path d="${R.top}" fill="url(#sheen)"/>`, f += `<path d="${R.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`, $.label) {
|
|
1353
|
+
const T = E($.x + $.width / 2, $.y + $.depth / 2, B + $.height + 2), W = $.width > 70 ? 9 : 8;
|
|
1354
|
+
f += `<g transform="translate(${T.screenX},${T.screenY})" filter="url(#labelshadow)">`, f += '<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">', f += `<text x="0" y="0" text-anchor="middle" fill="${u}" font-size="${W}" font-weight="600" font-family='${gn}' style="text-transform:uppercase;letter-spacing:0.06em">${$.label}</text>`, f += "</g></g>";
|
|
691
1355
|
}
|
|
692
1356
|
f += "</g>";
|
|
693
1357
|
}
|
|
694
|
-
const
|
|
695
|
-
f += `<text x="${
|
|
1358
|
+
const I = E(-25, l.depth / 2, y.elevation + 15);
|
|
1359
|
+
f += `<text x="${I.screenX - 35}" y="${I.screenY}" fill="${x}" font-size="9" font-weight="500" font-family='${gn}' opacity="0.6" style="letter-spacing:0.05em">${y.name}</text>`, f += "</g>";
|
|
696
1360
|
}
|
|
697
1361
|
return f += "</g></svg>", f;
|
|
698
1362
|
}
|
|
699
|
-
function
|
|
700
|
-
e.innerHTML =
|
|
1363
|
+
function Yo(e, n) {
|
|
1364
|
+
e.innerHTML = ui(n);
|
|
701
1365
|
}
|
|
702
|
-
function
|
|
1366
|
+
function Wn(e) {
|
|
703
1367
|
return typeof e > "u" || e === null;
|
|
704
1368
|
}
|
|
705
|
-
function
|
|
1369
|
+
function pi(e) {
|
|
706
1370
|
return typeof e == "object" && e !== null;
|
|
707
1371
|
}
|
|
708
|
-
function
|
|
709
|
-
return Array.isArray(e) ? e :
|
|
1372
|
+
function di(e) {
|
|
1373
|
+
return Array.isArray(e) ? e : Wn(e) ? [] : [e];
|
|
710
1374
|
}
|
|
711
|
-
function
|
|
712
|
-
var
|
|
713
|
-
if (
|
|
714
|
-
for (l = Object.keys(
|
|
715
|
-
i = l[
|
|
1375
|
+
function hi(e, n) {
|
|
1376
|
+
var r, t, i, l;
|
|
1377
|
+
if (n)
|
|
1378
|
+
for (l = Object.keys(n), r = 0, t = l.length; r < t; r += 1)
|
|
1379
|
+
i = l[r], e[i] = n[i];
|
|
716
1380
|
return e;
|
|
717
1381
|
}
|
|
718
|
-
function
|
|
719
|
-
var
|
|
720
|
-
for (
|
|
721
|
-
|
|
722
|
-
return
|
|
1382
|
+
function xi(e, n) {
|
|
1383
|
+
var r = "", t;
|
|
1384
|
+
for (t = 0; t < n; t += 1)
|
|
1385
|
+
r += e;
|
|
1386
|
+
return r;
|
|
723
1387
|
}
|
|
724
|
-
function
|
|
1388
|
+
function mi(e) {
|
|
725
1389
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
726
1390
|
}
|
|
727
|
-
var
|
|
728
|
-
isNothing:
|
|
729
|
-
isObject:
|
|
730
|
-
toArray:
|
|
731
|
-
repeat:
|
|
732
|
-
isNegativeZero:
|
|
733
|
-
extend:
|
|
1391
|
+
var gi = Wn, yi = pi, vi = di, bi = xi, Ai = mi, ki = hi, U = {
|
|
1392
|
+
isNothing: gi,
|
|
1393
|
+
isObject: yi,
|
|
1394
|
+
toArray: vi,
|
|
1395
|
+
repeat: bi,
|
|
1396
|
+
isNegativeZero: Ai,
|
|
1397
|
+
extend: ki
|
|
734
1398
|
};
|
|
735
|
-
function
|
|
736
|
-
var
|
|
737
|
-
return e.mark ? (e.mark.name && (
|
|
1399
|
+
function Hn(e, n) {
|
|
1400
|
+
var r = "", t = e.reason || "(unknown reason)";
|
|
1401
|
+
return e.mark ? (e.mark.name && (r += 'in "' + e.mark.name + '" '), r += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (r += `
|
|
738
1402
|
|
|
739
|
-
` + e.mark.snippet),
|
|
1403
|
+
` + e.mark.snippet), t + " " + r) : t;
|
|
740
1404
|
}
|
|
741
|
-
function
|
|
742
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark =
|
|
1405
|
+
function Te(e, n) {
|
|
1406
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = Hn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
743
1407
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
return this.name + ": " +
|
|
1408
|
+
Te.prototype = Object.create(Error.prototype);
|
|
1409
|
+
Te.prototype.constructor = Te;
|
|
1410
|
+
Te.prototype.toString = function(n) {
|
|
1411
|
+
return this.name + ": " + Hn(this, n);
|
|
748
1412
|
};
|
|
749
|
-
var
|
|
750
|
-
function
|
|
751
|
-
var l = "",
|
|
752
|
-
return
|
|
753
|
-
str: l + e.slice(
|
|
754
|
-
pos:
|
|
1413
|
+
var Z = Te;
|
|
1414
|
+
function Xe(e, n, r, t, i) {
|
|
1415
|
+
var l = "", o = "", a = Math.floor(i / 2) - 1;
|
|
1416
|
+
return t - n > a && (l = " ... ", n = t - a + l.length), r - t > a && (o = " ...", r = t + a - o.length), {
|
|
1417
|
+
str: l + e.slice(n, r).replace(/\t/g, "→") + o,
|
|
1418
|
+
pos: t - n + l.length
|
|
755
1419
|
// relative position
|
|
756
1420
|
};
|
|
757
1421
|
}
|
|
758
|
-
function
|
|
759
|
-
return
|
|
760
|
-
}
|
|
761
|
-
function
|
|
762
|
-
if (
|
|
763
|
-
|
|
764
|
-
for (var
|
|
765
|
-
i.push(l.index),
|
|
766
|
-
|
|
767
|
-
var a = "", c, s,
|
|
768
|
-
for (c = 1; c <=
|
|
769
|
-
s =
|
|
1422
|
+
function Ge(e, n) {
|
|
1423
|
+
return U.repeat(" ", n - e.length) + e;
|
|
1424
|
+
}
|
|
1425
|
+
function Ci(e, n) {
|
|
1426
|
+
if (n = Object.create(n || null), !e.buffer) return null;
|
|
1427
|
+
n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
|
|
1428
|
+
for (var r = /\r?\n|\r|\0/g, t = [0], i = [], l, o = -1; l = r.exec(e.buffer); )
|
|
1429
|
+
i.push(l.index), t.push(l.index + l[0].length), e.position <= l.index && o < 0 && (o = t.length - 2);
|
|
1430
|
+
o < 0 && (o = t.length - 1);
|
|
1431
|
+
var a = "", c, s, u = Math.min(e.line + n.linesAfter, i.length).toString().length, x = n.maxLength - (n.indent + u + 3);
|
|
1432
|
+
for (c = 1; c <= n.linesBefore && !(o - c < 0); c++)
|
|
1433
|
+
s = Xe(
|
|
770
1434
|
e.buffer,
|
|
771
|
-
o
|
|
772
|
-
i[
|
|
773
|
-
e.position - (o
|
|
774
|
-
|
|
775
|
-
), a =
|
|
1435
|
+
t[o - c],
|
|
1436
|
+
i[o - c],
|
|
1437
|
+
e.position - (t[o] - t[o - c]),
|
|
1438
|
+
x
|
|
1439
|
+
), a = U.repeat(" ", n.indent) + Ge((e.line - c + 1).toString(), u) + " | " + s.str + `
|
|
776
1440
|
` + a;
|
|
777
|
-
for (s =
|
|
778
|
-
`, a +=
|
|
779
|
-
`, c = 1; c <=
|
|
780
|
-
s =
|
|
1441
|
+
for (s = Xe(e.buffer, t[o], i[o], e.position, x), a += U.repeat(" ", n.indent) + Ge((e.line + 1).toString(), u) + " | " + s.str + `
|
|
1442
|
+
`, a += U.repeat("-", n.indent + u + 3 + s.pos) + `^
|
|
1443
|
+
`, c = 1; c <= n.linesAfter && !(o + c >= i.length); c++)
|
|
1444
|
+
s = Xe(
|
|
781
1445
|
e.buffer,
|
|
782
|
-
o
|
|
783
|
-
i[
|
|
784
|
-
e.position - (o
|
|
785
|
-
|
|
786
|
-
), a +=
|
|
1446
|
+
t[o + c],
|
|
1447
|
+
i[o + c],
|
|
1448
|
+
e.position - (t[o] - t[o + c]),
|
|
1449
|
+
x
|
|
1450
|
+
), a += U.repeat(" ", n.indent) + Ge((e.line + c + 1).toString(), u) + " | " + s.str + `
|
|
787
1451
|
`;
|
|
788
1452
|
return a.replace(/\n$/, "");
|
|
789
1453
|
}
|
|
790
|
-
var
|
|
1454
|
+
var Si = Ci, Ei = [
|
|
791
1455
|
"kind",
|
|
792
1456
|
"multi",
|
|
793
1457
|
"resolve",
|
|
@@ -798,41 +1462,41 @@ var Pn = Mn, Dn = [
|
|
|
798
1462
|
"representName",
|
|
799
1463
|
"defaultStyle",
|
|
800
1464
|
"styleAliases"
|
|
801
|
-
],
|
|
1465
|
+
], wi = [
|
|
802
1466
|
"scalar",
|
|
803
1467
|
"sequence",
|
|
804
1468
|
"mapping"
|
|
805
1469
|
];
|
|
806
|
-
function
|
|
807
|
-
var
|
|
808
|
-
return e !== null && Object.keys(e).forEach(function(
|
|
809
|
-
e[
|
|
810
|
-
|
|
1470
|
+
function _i(e) {
|
|
1471
|
+
var n = {};
|
|
1472
|
+
return e !== null && Object.keys(e).forEach(function(r) {
|
|
1473
|
+
e[r].forEach(function(t) {
|
|
1474
|
+
n[String(t)] = r;
|
|
811
1475
|
});
|
|
812
|
-
}),
|
|
1476
|
+
}), n;
|
|
813
1477
|
}
|
|
814
|
-
function
|
|
815
|
-
if (
|
|
816
|
-
if (
|
|
817
|
-
throw new
|
|
818
|
-
}), this.options =
|
|
1478
|
+
function Ti(e, n) {
|
|
1479
|
+
if (n = n || {}, Object.keys(n).forEach(function(r) {
|
|
1480
|
+
if (Ei.indexOf(r) === -1)
|
|
1481
|
+
throw new Z('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
|
|
1482
|
+
}), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
|
|
819
1483
|
return !0;
|
|
820
|
-
}, this.construct =
|
|
821
|
-
return
|
|
822
|
-
}, this.instanceOf =
|
|
823
|
-
throw new
|
|
824
|
-
}
|
|
825
|
-
var
|
|
826
|
-
function
|
|
827
|
-
var
|
|
828
|
-
return e[
|
|
829
|
-
var i =
|
|
830
|
-
|
|
831
|
-
l.tag ===
|
|
832
|
-
}),
|
|
833
|
-
}),
|
|
1484
|
+
}, this.construct = n.construct || function(r) {
|
|
1485
|
+
return r;
|
|
1486
|
+
}, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = _i(n.styleAliases || null), wi.indexOf(this.kind) === -1)
|
|
1487
|
+
throw new Z('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1488
|
+
}
|
|
1489
|
+
var z = Ti;
|
|
1490
|
+
function yn(e, n) {
|
|
1491
|
+
var r = [];
|
|
1492
|
+
return e[n].forEach(function(t) {
|
|
1493
|
+
var i = r.length;
|
|
1494
|
+
r.forEach(function(l, o) {
|
|
1495
|
+
l.tag === t.tag && l.kind === t.kind && l.multi === t.multi && (i = o);
|
|
1496
|
+
}), r[i] = t;
|
|
1497
|
+
}), r;
|
|
834
1498
|
}
|
|
835
|
-
function
|
|
1499
|
+
function $i() {
|
|
836
1500
|
var e = {
|
|
837
1501
|
scalar: {},
|
|
838
1502
|
sequence: {},
|
|
@@ -844,79 +1508,79 @@ function Un() {
|
|
|
844
1508
|
mapping: [],
|
|
845
1509
|
fallback: []
|
|
846
1510
|
}
|
|
847
|
-
},
|
|
848
|
-
function
|
|
1511
|
+
}, n, r;
|
|
1512
|
+
function t(i) {
|
|
849
1513
|
i.multi ? (e.multi[i.kind].push(i), e.multi.fallback.push(i)) : e[i.kind][i.tag] = e.fallback[i.tag] = i;
|
|
850
1514
|
}
|
|
851
|
-
for (
|
|
852
|
-
arguments[
|
|
1515
|
+
for (n = 0, r = arguments.length; n < r; n += 1)
|
|
1516
|
+
arguments[n].forEach(t);
|
|
853
1517
|
return e;
|
|
854
1518
|
}
|
|
855
|
-
function
|
|
1519
|
+
function qe(e) {
|
|
856
1520
|
return this.extend(e);
|
|
857
1521
|
}
|
|
858
|
-
|
|
859
|
-
var
|
|
860
|
-
if (
|
|
861
|
-
|
|
862
|
-
else if (Array.isArray(
|
|
863
|
-
|
|
864
|
-
else if (
|
|
865
|
-
|
|
1522
|
+
qe.prototype.extend = function(n) {
|
|
1523
|
+
var r = [], t = [];
|
|
1524
|
+
if (n instanceof z)
|
|
1525
|
+
t.push(n);
|
|
1526
|
+
else if (Array.isArray(n))
|
|
1527
|
+
t = t.concat(n);
|
|
1528
|
+
else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit)))
|
|
1529
|
+
n.implicit && (r = r.concat(n.implicit)), n.explicit && (t = t.concat(n.explicit));
|
|
866
1530
|
else
|
|
867
|
-
throw new
|
|
868
|
-
|
|
869
|
-
if (!(l instanceof
|
|
870
|
-
throw new
|
|
1531
|
+
throw new Z("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1532
|
+
r.forEach(function(l) {
|
|
1533
|
+
if (!(l instanceof z))
|
|
1534
|
+
throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
871
1535
|
if (l.loadKind && l.loadKind !== "scalar")
|
|
872
|
-
throw new
|
|
1536
|
+
throw new Z("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
873
1537
|
if (l.multi)
|
|
874
|
-
throw new
|
|
875
|
-
}),
|
|
876
|
-
if (!(l instanceof
|
|
877
|
-
throw new
|
|
1538
|
+
throw new Z("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1539
|
+
}), t.forEach(function(l) {
|
|
1540
|
+
if (!(l instanceof z))
|
|
1541
|
+
throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
878
1542
|
});
|
|
879
|
-
var i = Object.create(
|
|
880
|
-
return i.implicit = (this.implicit || []).concat(
|
|
1543
|
+
var i = Object.create(qe.prototype);
|
|
1544
|
+
return i.implicit = (this.implicit || []).concat(r), i.explicit = (this.explicit || []).concat(t), i.compiledImplicit = yn(i, "implicit"), i.compiledExplicit = yn(i, "explicit"), i.compiledTypeMap = $i(i.compiledImplicit, i.compiledExplicit), i;
|
|
881
1545
|
};
|
|
882
|
-
var
|
|
1546
|
+
var Un = qe, Xn = new z("tag:yaml.org,2002:str", {
|
|
883
1547
|
kind: "scalar",
|
|
884
1548
|
construct: function(e) {
|
|
885
1549
|
return e !== null ? e : "";
|
|
886
1550
|
}
|
|
887
|
-
}),
|
|
1551
|
+
}), Gn = new z("tag:yaml.org,2002:seq", {
|
|
888
1552
|
kind: "sequence",
|
|
889
1553
|
construct: function(e) {
|
|
890
1554
|
return e !== null ? e : [];
|
|
891
1555
|
}
|
|
892
|
-
}),
|
|
1556
|
+
}), zn = new z("tag:yaml.org,2002:map", {
|
|
893
1557
|
kind: "mapping",
|
|
894
1558
|
construct: function(e) {
|
|
895
1559
|
return e !== null ? e : {};
|
|
896
1560
|
}
|
|
897
|
-
}),
|
|
1561
|
+
}), qn = new Un({
|
|
898
1562
|
explicit: [
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
1563
|
+
Xn,
|
|
1564
|
+
Gn,
|
|
1565
|
+
zn
|
|
902
1566
|
]
|
|
903
1567
|
});
|
|
904
|
-
function
|
|
1568
|
+
function Oi(e) {
|
|
905
1569
|
if (e === null) return !0;
|
|
906
|
-
var
|
|
907
|
-
return
|
|
1570
|
+
var n = e.length;
|
|
1571
|
+
return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
908
1572
|
}
|
|
909
|
-
function
|
|
1573
|
+
function ji() {
|
|
910
1574
|
return null;
|
|
911
1575
|
}
|
|
912
|
-
function
|
|
1576
|
+
function Fi(e) {
|
|
913
1577
|
return e === null;
|
|
914
1578
|
}
|
|
915
|
-
var
|
|
1579
|
+
var Kn = new z("tag:yaml.org,2002:null", {
|
|
916
1580
|
kind: "scalar",
|
|
917
|
-
resolve:
|
|
918
|
-
construct:
|
|
919
|
-
predicate:
|
|
1581
|
+
resolve: Oi,
|
|
1582
|
+
construct: ji,
|
|
1583
|
+
predicate: Fi,
|
|
920
1584
|
represent: {
|
|
921
1585
|
canonical: function() {
|
|
922
1586
|
return "~";
|
|
@@ -936,22 +1600,22 @@ var Tr = new U("tag:yaml.org,2002:null", {
|
|
|
936
1600
|
},
|
|
937
1601
|
defaultStyle: "lowercase"
|
|
938
1602
|
});
|
|
939
|
-
function
|
|
1603
|
+
function Li(e) {
|
|
940
1604
|
if (e === null) return !1;
|
|
941
|
-
var
|
|
942
|
-
return
|
|
1605
|
+
var n = e.length;
|
|
1606
|
+
return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
943
1607
|
}
|
|
944
|
-
function
|
|
1608
|
+
function Ri(e) {
|
|
945
1609
|
return e === "true" || e === "True" || e === "TRUE";
|
|
946
1610
|
}
|
|
947
|
-
function
|
|
1611
|
+
function Ii(e) {
|
|
948
1612
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
949
1613
|
}
|
|
950
|
-
var
|
|
1614
|
+
var Vn = new z("tag:yaml.org,2002:bool", {
|
|
951
1615
|
kind: "scalar",
|
|
952
|
-
resolve:
|
|
953
|
-
construct:
|
|
954
|
-
predicate:
|
|
1616
|
+
resolve: Li,
|
|
1617
|
+
construct: Ri,
|
|
1618
|
+
predicate: Ii,
|
|
955
1619
|
represent: {
|
|
956
1620
|
lowercase: function(e) {
|
|
957
1621
|
return e ? "true" : "false";
|
|
@@ -965,73 +1629,73 @@ var kr = new U("tag:yaml.org,2002:bool", {
|
|
|
965
1629
|
},
|
|
966
1630
|
defaultStyle: "lowercase"
|
|
967
1631
|
});
|
|
968
|
-
function
|
|
1632
|
+
function Mi(e) {
|
|
969
1633
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
970
1634
|
}
|
|
971
|
-
function
|
|
1635
|
+
function Ni(e) {
|
|
972
1636
|
return 48 <= e && e <= 55;
|
|
973
1637
|
}
|
|
974
|
-
function
|
|
1638
|
+
function Pi(e) {
|
|
975
1639
|
return 48 <= e && e <= 57;
|
|
976
1640
|
}
|
|
977
|
-
function
|
|
1641
|
+
function Di(e) {
|
|
978
1642
|
if (e === null) return !1;
|
|
979
|
-
var
|
|
980
|
-
if (!
|
|
981
|
-
if (i = e[
|
|
982
|
-
if (
|
|
983
|
-
if (i = e[++
|
|
984
|
-
for (
|
|
985
|
-
if (i = e[
|
|
1643
|
+
var n = e.length, r = 0, t = !1, i;
|
|
1644
|
+
if (!n) return !1;
|
|
1645
|
+
if (i = e[r], (i === "-" || i === "+") && (i = e[++r]), i === "0") {
|
|
1646
|
+
if (r + 1 === n) return !0;
|
|
1647
|
+
if (i = e[++r], i === "b") {
|
|
1648
|
+
for (r++; r < n; r++)
|
|
1649
|
+
if (i = e[r], i !== "_") {
|
|
986
1650
|
if (i !== "0" && i !== "1") return !1;
|
|
987
|
-
|
|
1651
|
+
t = !0;
|
|
988
1652
|
}
|
|
989
|
-
return
|
|
1653
|
+
return t && i !== "_";
|
|
990
1654
|
}
|
|
991
1655
|
if (i === "x") {
|
|
992
|
-
for (
|
|
993
|
-
if (i = e[
|
|
994
|
-
if (!
|
|
995
|
-
|
|
1656
|
+
for (r++; r < n; r++)
|
|
1657
|
+
if (i = e[r], i !== "_") {
|
|
1658
|
+
if (!Mi(e.charCodeAt(r))) return !1;
|
|
1659
|
+
t = !0;
|
|
996
1660
|
}
|
|
997
|
-
return
|
|
1661
|
+
return t && i !== "_";
|
|
998
1662
|
}
|
|
999
1663
|
if (i === "o") {
|
|
1000
|
-
for (
|
|
1001
|
-
if (i = e[
|
|
1002
|
-
if (!
|
|
1003
|
-
|
|
1664
|
+
for (r++; r < n; r++)
|
|
1665
|
+
if (i = e[r], i !== "_") {
|
|
1666
|
+
if (!Ni(e.charCodeAt(r))) return !1;
|
|
1667
|
+
t = !0;
|
|
1004
1668
|
}
|
|
1005
|
-
return
|
|
1669
|
+
return t && i !== "_";
|
|
1006
1670
|
}
|
|
1007
1671
|
}
|
|
1008
1672
|
if (i === "_") return !1;
|
|
1009
|
-
for (;
|
|
1010
|
-
if (i = e[
|
|
1011
|
-
if (!
|
|
1673
|
+
for (; r < n; r++)
|
|
1674
|
+
if (i = e[r], i !== "_") {
|
|
1675
|
+
if (!Pi(e.charCodeAt(r)))
|
|
1012
1676
|
return !1;
|
|
1013
|
-
|
|
1677
|
+
t = !0;
|
|
1014
1678
|
}
|
|
1015
|
-
return !(!
|
|
1016
|
-
}
|
|
1017
|
-
function
|
|
1018
|
-
var
|
|
1019
|
-
if (
|
|
1020
|
-
if (
|
|
1021
|
-
if (
|
|
1022
|
-
if (
|
|
1023
|
-
if (
|
|
1679
|
+
return !(!t || i === "_");
|
|
1680
|
+
}
|
|
1681
|
+
function Yi(e) {
|
|
1682
|
+
var n = e, r = 1, t;
|
|
1683
|
+
if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), t = n[0], (t === "-" || t === "+") && (t === "-" && (r = -1), n = n.slice(1), t = n[0]), n === "0") return 0;
|
|
1684
|
+
if (t === "0") {
|
|
1685
|
+
if (n[1] === "b") return r * parseInt(n.slice(2), 2);
|
|
1686
|
+
if (n[1] === "x") return r * parseInt(n.slice(2), 16);
|
|
1687
|
+
if (n[1] === "o") return r * parseInt(n.slice(2), 8);
|
|
1024
1688
|
}
|
|
1025
|
-
return
|
|
1689
|
+
return r * parseInt(n, 10);
|
|
1026
1690
|
}
|
|
1027
|
-
function
|
|
1028
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
1691
|
+
function Bi(e) {
|
|
1692
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !U.isNegativeZero(e);
|
|
1029
1693
|
}
|
|
1030
|
-
var
|
|
1694
|
+
var Zn = new z("tag:yaml.org,2002:int", {
|
|
1031
1695
|
kind: "scalar",
|
|
1032
|
-
resolve:
|
|
1033
|
-
construct:
|
|
1034
|
-
predicate:
|
|
1696
|
+
resolve: Di,
|
|
1697
|
+
construct: Yi,
|
|
1698
|
+
predicate: Bi,
|
|
1035
1699
|
represent: {
|
|
1036
1700
|
binary: function(e) {
|
|
1037
1701
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1054,24 +1718,24 @@ var Or = new U("tag:yaml.org,2002:int", {
|
|
|
1054
1718
|
decimal: [10, "dec"],
|
|
1055
1719
|
hexadecimal: [16, "hex"]
|
|
1056
1720
|
}
|
|
1057
|
-
}),
|
|
1721
|
+
}), Wi = new RegExp(
|
|
1058
1722
|
// 2.5e4, 2.5 and integers
|
|
1059
1723
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1060
1724
|
);
|
|
1061
|
-
function
|
|
1062
|
-
return !(e === null || !
|
|
1725
|
+
function Hi(e) {
|
|
1726
|
+
return !(e === null || !Wi.test(e) || // Quick hack to not allow integers end with `_`
|
|
1063
1727
|
// Probably should update regexp & check speed
|
|
1064
1728
|
e[e.length - 1] === "_");
|
|
1065
1729
|
}
|
|
1066
|
-
function
|
|
1067
|
-
var
|
|
1068
|
-
return
|
|
1730
|
+
function Ui(e) {
|
|
1731
|
+
var n, r;
|
|
1732
|
+
return n = e.replace(/_/g, "").toLowerCase(), r = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : r * parseFloat(n, 10);
|
|
1069
1733
|
}
|
|
1070
|
-
var
|
|
1071
|
-
function
|
|
1072
|
-
var
|
|
1734
|
+
var Xi = /^[-+]?[0-9]+e/;
|
|
1735
|
+
function Gi(e, n) {
|
|
1736
|
+
var r;
|
|
1073
1737
|
if (isNaN(e))
|
|
1074
|
-
switch (
|
|
1738
|
+
switch (n) {
|
|
1075
1739
|
case "lowercase":
|
|
1076
1740
|
return ".nan";
|
|
1077
1741
|
case "uppercase":
|
|
@@ -1080,7 +1744,7 @@ function li(e, r) {
|
|
|
1080
1744
|
return ".NaN";
|
|
1081
1745
|
}
|
|
1082
1746
|
else if (Number.POSITIVE_INFINITY === e)
|
|
1083
|
-
switch (
|
|
1747
|
+
switch (n) {
|
|
1084
1748
|
case "lowercase":
|
|
1085
1749
|
return ".inf";
|
|
1086
1750
|
case "uppercase":
|
|
@@ -1089,7 +1753,7 @@ function li(e, r) {
|
|
|
1089
1753
|
return ".Inf";
|
|
1090
1754
|
}
|
|
1091
1755
|
else if (Number.NEGATIVE_INFINITY === e)
|
|
1092
|
-
switch (
|
|
1756
|
+
switch (n) {
|
|
1093
1757
|
case "lowercase":
|
|
1094
1758
|
return "-.inf";
|
|
1095
1759
|
case "uppercase":
|
|
@@ -1097,219 +1761,219 @@ function li(e, r) {
|
|
|
1097
1761
|
case "camelcase":
|
|
1098
1762
|
return "-.Inf";
|
|
1099
1763
|
}
|
|
1100
|
-
else if (
|
|
1764
|
+
else if (U.isNegativeZero(e))
|
|
1101
1765
|
return "-0.0";
|
|
1102
|
-
return
|
|
1766
|
+
return r = e.toString(10), Xi.test(r) ? r.replace("e", ".e") : r;
|
|
1103
1767
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
1768
|
+
function zi(e) {
|
|
1769
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || U.isNegativeZero(e));
|
|
1106
1770
|
}
|
|
1107
|
-
var
|
|
1771
|
+
var Jn = new z("tag:yaml.org,2002:float", {
|
|
1108
1772
|
kind: "scalar",
|
|
1109
|
-
resolve:
|
|
1110
|
-
construct:
|
|
1111
|
-
predicate:
|
|
1112
|
-
represent:
|
|
1773
|
+
resolve: Hi,
|
|
1774
|
+
construct: Ui,
|
|
1775
|
+
predicate: zi,
|
|
1776
|
+
represent: Gi,
|
|
1113
1777
|
defaultStyle: "lowercase"
|
|
1114
|
-
}),
|
|
1778
|
+
}), Qn = qn.extend({
|
|
1115
1779
|
implicit: [
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1780
|
+
Kn,
|
|
1781
|
+
Vn,
|
|
1782
|
+
Zn,
|
|
1783
|
+
Jn
|
|
1120
1784
|
]
|
|
1121
|
-
}),
|
|
1785
|
+
}), er = Qn, nr = new RegExp(
|
|
1122
1786
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1123
|
-
),
|
|
1787
|
+
), rr = new RegExp(
|
|
1124
1788
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1125
1789
|
);
|
|
1126
|
-
function
|
|
1127
|
-
return e === null ? !1 :
|
|
1128
|
-
}
|
|
1129
|
-
function
|
|
1130
|
-
var
|
|
1131
|
-
if (
|
|
1132
|
-
if (
|
|
1133
|
-
return new Date(Date.UTC(
|
|
1134
|
-
if (l = +
|
|
1135
|
-
for (c =
|
|
1790
|
+
function qi(e) {
|
|
1791
|
+
return e === null ? !1 : nr.exec(e) !== null || rr.exec(e) !== null;
|
|
1792
|
+
}
|
|
1793
|
+
function Ki(e) {
|
|
1794
|
+
var n, r, t, i, l, o, a, c = 0, s = null, u, x, p;
|
|
1795
|
+
if (n = nr.exec(e), n === null && (n = rr.exec(e)), n === null) throw new Error("Date resolve error");
|
|
1796
|
+
if (r = +n[1], t = +n[2] - 1, i = +n[3], !n[4])
|
|
1797
|
+
return new Date(Date.UTC(r, t, i));
|
|
1798
|
+
if (l = +n[4], o = +n[5], a = +n[6], n[7]) {
|
|
1799
|
+
for (c = n[7].slice(0, 3); c.length < 3; )
|
|
1136
1800
|
c += "0";
|
|
1137
1801
|
c = +c;
|
|
1138
1802
|
}
|
|
1139
|
-
return
|
|
1803
|
+
return n[9] && (u = +n[10], x = +(n[11] || 0), s = (u * 60 + x) * 6e4, n[9] === "-" && (s = -s)), p = new Date(Date.UTC(r, t, i, l, o, a, c)), s && p.setTime(p.getTime() - s), p;
|
|
1140
1804
|
}
|
|
1141
|
-
function
|
|
1805
|
+
function Vi(e) {
|
|
1142
1806
|
return e.toISOString();
|
|
1143
1807
|
}
|
|
1144
|
-
var
|
|
1808
|
+
var ir = new z("tag:yaml.org,2002:timestamp", {
|
|
1145
1809
|
kind: "scalar",
|
|
1146
|
-
resolve:
|
|
1147
|
-
construct:
|
|
1810
|
+
resolve: qi,
|
|
1811
|
+
construct: Ki,
|
|
1148
1812
|
instanceOf: Date,
|
|
1149
|
-
represent:
|
|
1813
|
+
represent: Vi
|
|
1150
1814
|
});
|
|
1151
|
-
function
|
|
1815
|
+
function Zi(e) {
|
|
1152
1816
|
return e === "<<" || e === null;
|
|
1153
1817
|
}
|
|
1154
|
-
var
|
|
1818
|
+
var tr = new z("tag:yaml.org,2002:merge", {
|
|
1155
1819
|
kind: "scalar",
|
|
1156
|
-
resolve:
|
|
1157
|
-
}),
|
|
1820
|
+
resolve: Zi
|
|
1821
|
+
}), rn = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1158
1822
|
\r`;
|
|
1159
|
-
function
|
|
1823
|
+
function Ji(e) {
|
|
1160
1824
|
if (e === null) return !1;
|
|
1161
|
-
var
|
|
1162
|
-
for (
|
|
1163
|
-
if (
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1825
|
+
var n, r, t = 0, i = e.length, l = rn;
|
|
1826
|
+
for (r = 0; r < i; r++)
|
|
1827
|
+
if (n = l.indexOf(e.charAt(r)), !(n > 64)) {
|
|
1828
|
+
if (n < 0) return !1;
|
|
1829
|
+
t += 6;
|
|
1166
1830
|
}
|
|
1167
|
-
return
|
|
1831
|
+
return t % 8 === 0;
|
|
1168
1832
|
}
|
|
1169
|
-
function
|
|
1170
|
-
var
|
|
1171
|
-
for (
|
|
1172
|
-
|
|
1173
|
-
return
|
|
1833
|
+
function Qi(e) {
|
|
1834
|
+
var n, r, t = e.replace(/[\r\n=]/g, ""), i = t.length, l = rn, o = 0, a = [];
|
|
1835
|
+
for (n = 0; n < i; n++)
|
|
1836
|
+
n % 4 === 0 && n && (a.push(o >> 16 & 255), a.push(o >> 8 & 255), a.push(o & 255)), o = o << 6 | l.indexOf(t.charAt(n));
|
|
1837
|
+
return r = i % 4 * 6, r === 0 ? (a.push(o >> 16 & 255), a.push(o >> 8 & 255), a.push(o & 255)) : r === 18 ? (a.push(o >> 10 & 255), a.push(o >> 2 & 255)) : r === 12 && a.push(o >> 4 & 255), new Uint8Array(a);
|
|
1174
1838
|
}
|
|
1175
|
-
function
|
|
1176
|
-
var
|
|
1177
|
-
for (
|
|
1178
|
-
|
|
1179
|
-
return i = l % 3, i === 0 ? (
|
|
1839
|
+
function et(e) {
|
|
1840
|
+
var n = "", r = 0, t, i, l = e.length, o = rn;
|
|
1841
|
+
for (t = 0; t < l; t++)
|
|
1842
|
+
t % 3 === 0 && t && (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]), r = (r << 8) + e[t];
|
|
1843
|
+
return i = l % 3, i === 0 ? (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]) : i === 2 ? (n += o[r >> 10 & 63], n += o[r >> 4 & 63], n += o[r << 2 & 63], n += o[64]) : i === 1 && (n += o[r >> 2 & 63], n += o[r << 4 & 63], n += o[64], n += o[64]), n;
|
|
1180
1844
|
}
|
|
1181
|
-
function
|
|
1845
|
+
function nt(e) {
|
|
1182
1846
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1183
1847
|
}
|
|
1184
|
-
var
|
|
1848
|
+
var or = new z("tag:yaml.org,2002:binary", {
|
|
1185
1849
|
kind: "scalar",
|
|
1186
|
-
resolve:
|
|
1187
|
-
construct:
|
|
1188
|
-
predicate:
|
|
1189
|
-
represent:
|
|
1190
|
-
}),
|
|
1191
|
-
function
|
|
1850
|
+
resolve: Ji,
|
|
1851
|
+
construct: Qi,
|
|
1852
|
+
predicate: nt,
|
|
1853
|
+
represent: et
|
|
1854
|
+
}), rt = Object.prototype.hasOwnProperty, it = Object.prototype.toString;
|
|
1855
|
+
function tt(e) {
|
|
1192
1856
|
if (e === null) return !0;
|
|
1193
|
-
var
|
|
1194
|
-
for (
|
|
1195
|
-
if (i = a[
|
|
1857
|
+
var n = [], r, t, i, l, o, a = e;
|
|
1858
|
+
for (r = 0, t = a.length; r < t; r += 1) {
|
|
1859
|
+
if (i = a[r], o = !1, it.call(i) !== "[object Object]") return !1;
|
|
1196
1860
|
for (l in i)
|
|
1197
|
-
if (
|
|
1198
|
-
if (!
|
|
1861
|
+
if (rt.call(i, l))
|
|
1862
|
+
if (!o) o = !0;
|
|
1199
1863
|
else return !1;
|
|
1200
|
-
if (!
|
|
1201
|
-
if (
|
|
1864
|
+
if (!o) return !1;
|
|
1865
|
+
if (n.indexOf(l) === -1) n.push(l);
|
|
1202
1866
|
else return !1;
|
|
1203
1867
|
}
|
|
1204
1868
|
return !0;
|
|
1205
1869
|
}
|
|
1206
|
-
function
|
|
1870
|
+
function ot(e) {
|
|
1207
1871
|
return e !== null ? e : [];
|
|
1208
1872
|
}
|
|
1209
|
-
var
|
|
1873
|
+
var lr = new z("tag:yaml.org,2002:omap", {
|
|
1210
1874
|
kind: "sequence",
|
|
1211
|
-
resolve:
|
|
1212
|
-
construct:
|
|
1213
|
-
}),
|
|
1214
|
-
function
|
|
1875
|
+
resolve: tt,
|
|
1876
|
+
construct: ot
|
|
1877
|
+
}), lt = Object.prototype.toString;
|
|
1878
|
+
function at(e) {
|
|
1215
1879
|
if (e === null) return !0;
|
|
1216
|
-
var
|
|
1217
|
-
for (l = new Array(
|
|
1218
|
-
if (
|
|
1219
|
-
l[
|
|
1880
|
+
var n, r, t, i, l, o = e;
|
|
1881
|
+
for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1) {
|
|
1882
|
+
if (t = o[n], lt.call(t) !== "[object Object]" || (i = Object.keys(t), i.length !== 1)) return !1;
|
|
1883
|
+
l[n] = [i[0], t[i[0]]];
|
|
1220
1884
|
}
|
|
1221
1885
|
return !0;
|
|
1222
1886
|
}
|
|
1223
|
-
function
|
|
1887
|
+
function ct(e) {
|
|
1224
1888
|
if (e === null) return [];
|
|
1225
|
-
var
|
|
1226
|
-
for (l = new Array(
|
|
1227
|
-
|
|
1889
|
+
var n, r, t, i, l, o = e;
|
|
1890
|
+
for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1)
|
|
1891
|
+
t = o[n], i = Object.keys(t), l[n] = [i[0], t[i[0]]];
|
|
1228
1892
|
return l;
|
|
1229
1893
|
}
|
|
1230
|
-
var
|
|
1894
|
+
var ar = new z("tag:yaml.org,2002:pairs", {
|
|
1231
1895
|
kind: "sequence",
|
|
1232
|
-
resolve:
|
|
1233
|
-
construct:
|
|
1234
|
-
}),
|
|
1235
|
-
function
|
|
1896
|
+
resolve: at,
|
|
1897
|
+
construct: ct
|
|
1898
|
+
}), st = Object.prototype.hasOwnProperty;
|
|
1899
|
+
function ft(e) {
|
|
1236
1900
|
if (e === null) return !0;
|
|
1237
|
-
var
|
|
1238
|
-
for (
|
|
1239
|
-
if (
|
|
1901
|
+
var n, r = e;
|
|
1902
|
+
for (n in r)
|
|
1903
|
+
if (st.call(r, n) && r[n] !== null)
|
|
1240
1904
|
return !1;
|
|
1241
1905
|
return !0;
|
|
1242
1906
|
}
|
|
1243
|
-
function
|
|
1907
|
+
function ut(e) {
|
|
1244
1908
|
return e !== null ? e : {};
|
|
1245
1909
|
}
|
|
1246
|
-
var
|
|
1910
|
+
var cr = new z("tag:yaml.org,2002:set", {
|
|
1247
1911
|
kind: "mapping",
|
|
1248
|
-
resolve:
|
|
1249
|
-
construct:
|
|
1250
|
-
}),
|
|
1912
|
+
resolve: ft,
|
|
1913
|
+
construct: ut
|
|
1914
|
+
}), tn = er.extend({
|
|
1251
1915
|
implicit: [
|
|
1252
|
-
|
|
1253
|
-
|
|
1916
|
+
ir,
|
|
1917
|
+
tr
|
|
1254
1918
|
],
|
|
1255
1919
|
explicit: [
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1920
|
+
or,
|
|
1921
|
+
lr,
|
|
1922
|
+
ar,
|
|
1923
|
+
cr
|
|
1260
1924
|
]
|
|
1261
|
-
}),
|
|
1262
|
-
function
|
|
1925
|
+
}), pe = Object.prototype.hasOwnProperty, De = 1, sr = 2, fr = 3, Ye = 4, ze = 1, pt = 2, vn = 3, dt = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ht = /[\x85\u2028\u2029]/, xt = /[,\[\]\{\}]/, ur = /^(?:!|!!|![a-z\-]+!)$/i, pr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1926
|
+
function bn(e) {
|
|
1263
1927
|
return Object.prototype.toString.call(e);
|
|
1264
1928
|
}
|
|
1265
|
-
function
|
|
1929
|
+
function oe(e) {
|
|
1266
1930
|
return e === 10 || e === 13;
|
|
1267
1931
|
}
|
|
1268
|
-
function
|
|
1932
|
+
function xe(e) {
|
|
1269
1933
|
return e === 9 || e === 32;
|
|
1270
1934
|
}
|
|
1271
|
-
function
|
|
1935
|
+
function ee(e) {
|
|
1272
1936
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1273
1937
|
}
|
|
1274
|
-
function
|
|
1938
|
+
function ve(e) {
|
|
1275
1939
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1276
1940
|
}
|
|
1277
|
-
function
|
|
1278
|
-
var
|
|
1279
|
-
return 48 <= e && e <= 57 ? e - 48 : (
|
|
1941
|
+
function mt(e) {
|
|
1942
|
+
var n;
|
|
1943
|
+
return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
|
|
1280
1944
|
}
|
|
1281
|
-
function
|
|
1945
|
+
function gt(e) {
|
|
1282
1946
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1283
1947
|
}
|
|
1284
|
-
function
|
|
1948
|
+
function yt(e) {
|
|
1285
1949
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1286
1950
|
}
|
|
1287
|
-
function
|
|
1951
|
+
function An(e) {
|
|
1288
1952
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1289
1953
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1290
1954
|
}
|
|
1291
|
-
function
|
|
1955
|
+
function vt(e) {
|
|
1292
1956
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1293
1957
|
(e - 65536 >> 10) + 55296,
|
|
1294
1958
|
(e - 65536 & 1023) + 56320
|
|
1295
1959
|
);
|
|
1296
1960
|
}
|
|
1297
|
-
function
|
|
1298
|
-
|
|
1961
|
+
function dr(e, n, r) {
|
|
1962
|
+
n === "__proto__" ? Object.defineProperty(e, n, {
|
|
1299
1963
|
configurable: !0,
|
|
1300
1964
|
enumerable: !0,
|
|
1301
1965
|
writable: !0,
|
|
1302
|
-
value:
|
|
1303
|
-
}) : e[
|
|
1966
|
+
value: r
|
|
1967
|
+
}) : e[n] = r;
|
|
1304
1968
|
}
|
|
1305
|
-
var
|
|
1306
|
-
for (var
|
|
1307
|
-
|
|
1308
|
-
function
|
|
1309
|
-
this.input = e, this.filename =
|
|
1969
|
+
var hr = new Array(256), xr = new Array(256);
|
|
1970
|
+
for (var ge = 0; ge < 256; ge++)
|
|
1971
|
+
hr[ge] = An(ge) ? 1 : 0, xr[ge] = An(ge);
|
|
1972
|
+
function bt(e, n) {
|
|
1973
|
+
this.input = e, this.filename = n.filename || null, this.schema = n.schema || tn, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1310
1974
|
}
|
|
1311
|
-
function
|
|
1312
|
-
var
|
|
1975
|
+
function mr(e, n) {
|
|
1976
|
+
var r = {
|
|
1313
1977
|
name: e.filename,
|
|
1314
1978
|
buffer: e.input.slice(0, -1),
|
|
1315
1979
|
// omit trailing \0
|
|
@@ -1317,395 +1981,395 @@ function Xr(e, r) {
|
|
|
1317
1981
|
line: e.line,
|
|
1318
1982
|
column: e.position - e.lineStart
|
|
1319
1983
|
};
|
|
1320
|
-
return
|
|
1984
|
+
return r.snippet = Si(r), new Z(n, r);
|
|
1321
1985
|
}
|
|
1322
|
-
function
|
|
1323
|
-
throw
|
|
1986
|
+
function C(e, n) {
|
|
1987
|
+
throw mr(e, n);
|
|
1324
1988
|
}
|
|
1325
|
-
function
|
|
1326
|
-
e.onWarning && e.onWarning.call(null,
|
|
1989
|
+
function Be(e, n) {
|
|
1990
|
+
e.onWarning && e.onWarning.call(null, mr(e, n));
|
|
1327
1991
|
}
|
|
1328
|
-
var
|
|
1329
|
-
YAML: function(
|
|
1330
|
-
var i, l,
|
|
1331
|
-
|
|
1992
|
+
var kn = {
|
|
1993
|
+
YAML: function(n, r, t) {
|
|
1994
|
+
var i, l, o;
|
|
1995
|
+
n.version !== null && C(n, "duplication of %YAML directive"), t.length !== 1 && C(n, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), i === null && C(n, "ill-formed argument of the YAML directive"), l = parseInt(i[1], 10), o = parseInt(i[2], 10), l !== 1 && C(n, "unacceptable YAML version of the document"), n.version = t[0], n.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Be(n, "unsupported YAML version of the document");
|
|
1332
1996
|
},
|
|
1333
|
-
TAG: function(
|
|
1997
|
+
TAG: function(n, r, t) {
|
|
1334
1998
|
var i, l;
|
|
1335
|
-
|
|
1999
|
+
t.length !== 2 && C(n, "TAG directive accepts exactly two arguments"), i = t[0], l = t[1], ur.test(i) || C(n, "ill-formed tag handle (first argument) of the TAG directive"), pe.call(n.tagMap, i) && C(n, 'there is a previously declared suffix for "' + i + '" tag handle'), pr.test(l) || C(n, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1336
2000
|
try {
|
|
1337
2001
|
l = decodeURIComponent(l);
|
|
1338
2002
|
} catch {
|
|
1339
|
-
|
|
2003
|
+
C(n, "tag prefix is malformed: " + l);
|
|
1340
2004
|
}
|
|
1341
|
-
|
|
2005
|
+
n.tagMap[i] = l;
|
|
1342
2006
|
}
|
|
1343
2007
|
};
|
|
1344
|
-
function
|
|
1345
|
-
var i, l,
|
|
1346
|
-
if (
|
|
1347
|
-
if (a = e.input.slice(
|
|
2008
|
+
function ue(e, n, r, t) {
|
|
2009
|
+
var i, l, o, a;
|
|
2010
|
+
if (n < r) {
|
|
2011
|
+
if (a = e.input.slice(n, r), t)
|
|
1348
2012
|
for (i = 0, l = a.length; i < l; i += 1)
|
|
1349
|
-
|
|
1350
|
-
else
|
|
2013
|
+
o = a.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || C(e, "expected valid JSON character");
|
|
2014
|
+
else dt.test(a) && C(e, "the stream contains non-printable characters");
|
|
1351
2015
|
e.result += a;
|
|
1352
2016
|
}
|
|
1353
2017
|
}
|
|
1354
|
-
function
|
|
1355
|
-
var i, l,
|
|
1356
|
-
for (
|
|
1357
|
-
l = i[
|
|
2018
|
+
function Cn(e, n, r, t) {
|
|
2019
|
+
var i, l, o, a;
|
|
2020
|
+
for (U.isObject(r) || C(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(r), o = 0, a = i.length; o < a; o += 1)
|
|
2021
|
+
l = i[o], pe.call(n, l) || (dr(n, l, r[l]), t[l] = !0);
|
|
1358
2022
|
}
|
|
1359
|
-
function
|
|
1360
|
-
var s,
|
|
2023
|
+
function be(e, n, r, t, i, l, o, a, c) {
|
|
2024
|
+
var s, u;
|
|
1361
2025
|
if (Array.isArray(i))
|
|
1362
|
-
for (i = Array.prototype.slice.call(i), s = 0,
|
|
1363
|
-
Array.isArray(i[s]) &&
|
|
1364
|
-
if (typeof i == "object" &&
|
|
2026
|
+
for (i = Array.prototype.slice.call(i), s = 0, u = i.length; s < u; s += 1)
|
|
2027
|
+
Array.isArray(i[s]) && C(e, "nested arrays are not supported inside keys"), typeof i == "object" && bn(i[s]) === "[object Object]" && (i[s] = "[object Object]");
|
|
2028
|
+
if (typeof i == "object" && bn(i) === "[object Object]" && (i = "[object Object]"), i = String(i), n === null && (n = {}), t === "tag:yaml.org,2002:merge")
|
|
1365
2029
|
if (Array.isArray(l))
|
|
1366
|
-
for (s = 0,
|
|
1367
|
-
|
|
2030
|
+
for (s = 0, u = l.length; s < u; s += 1)
|
|
2031
|
+
Cn(e, n, l[s], r);
|
|
1368
2032
|
else
|
|
1369
|
-
|
|
2033
|
+
Cn(e, n, l, r);
|
|
1370
2034
|
else
|
|
1371
|
-
!e.json && !
|
|
1372
|
-
return
|
|
2035
|
+
!e.json && !pe.call(r, i) && pe.call(n, i) && (e.line = o || e.line, e.lineStart = a || e.lineStart, e.position = c || e.position, C(e, "duplicated mapping key")), dr(n, i, l), delete r[i];
|
|
2036
|
+
return n;
|
|
1373
2037
|
}
|
|
1374
|
-
function
|
|
1375
|
-
var
|
|
1376
|
-
|
|
2038
|
+
function on(e) {
|
|
2039
|
+
var n;
|
|
2040
|
+
n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : C(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1377
2041
|
}
|
|
1378
|
-
function
|
|
1379
|
-
for (var
|
|
1380
|
-
for (;
|
|
2042
|
+
function H(e, n, r) {
|
|
2043
|
+
for (var t = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
2044
|
+
for (; xe(i); )
|
|
1381
2045
|
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1382
|
-
if (
|
|
2046
|
+
if (n && i === 35)
|
|
1383
2047
|
do
|
|
1384
2048
|
i = e.input.charCodeAt(++e.position);
|
|
1385
2049
|
while (i !== 10 && i !== 13 && i !== 0);
|
|
1386
|
-
if (
|
|
1387
|
-
for (
|
|
2050
|
+
if (oe(i))
|
|
2051
|
+
for (on(e), i = e.input.charCodeAt(e.position), t++, e.lineIndent = 0; i === 32; )
|
|
1388
2052
|
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1389
2053
|
else
|
|
1390
2054
|
break;
|
|
1391
2055
|
}
|
|
1392
|
-
return
|
|
2056
|
+
return r !== -1 && t !== 0 && e.lineIndent < r && Be(e, "deficient indentation"), t;
|
|
1393
2057
|
}
|
|
1394
|
-
function
|
|
1395
|
-
var
|
|
1396
|
-
return
|
|
2058
|
+
function Ue(e) {
|
|
2059
|
+
var n = e.position, r;
|
|
2060
|
+
return r = e.input.charCodeAt(n), !!((r === 45 || r === 46) && r === e.input.charCodeAt(n + 1) && r === e.input.charCodeAt(n + 2) && (n += 3, r = e.input.charCodeAt(n), r === 0 || ee(r)));
|
|
1397
2061
|
}
|
|
1398
|
-
function
|
|
1399
|
-
|
|
1400
|
-
`,
|
|
2062
|
+
function ln(e, n) {
|
|
2063
|
+
n === 1 ? e.result += " " : n > 1 && (e.result += U.repeat(`
|
|
2064
|
+
`, n - 1));
|
|
1401
2065
|
}
|
|
1402
|
-
function
|
|
1403
|
-
var
|
|
1404
|
-
if (f = e.input.charCodeAt(e.position),
|
|
2066
|
+
function At(e, n, r) {
|
|
2067
|
+
var t, i, l, o, a, c, s, u, x = e.kind, p = e.result, f;
|
|
2068
|
+
if (f = e.input.charCodeAt(e.position), ee(f) || ve(f) || f === 35 || f === 38 || f === 42 || f === 33 || f === 124 || f === 62 || f === 39 || f === 34 || f === 37 || f === 64 || f === 96 || (f === 63 || f === 45) && (i = e.input.charCodeAt(e.position + 1), ee(i) || r && ve(i)))
|
|
1405
2069
|
return !1;
|
|
1406
|
-
for (e.kind = "scalar", e.result = "", l =
|
|
2070
|
+
for (e.kind = "scalar", e.result = "", l = o = e.position, a = !1; f !== 0; ) {
|
|
1407
2071
|
if (f === 58) {
|
|
1408
|
-
if (i = e.input.charCodeAt(e.position + 1),
|
|
2072
|
+
if (i = e.input.charCodeAt(e.position + 1), ee(i) || r && ve(i))
|
|
1409
2073
|
break;
|
|
1410
2074
|
} else if (f === 35) {
|
|
1411
|
-
if (
|
|
2075
|
+
if (t = e.input.charCodeAt(e.position - 1), ee(t))
|
|
1412
2076
|
break;
|
|
1413
2077
|
} else {
|
|
1414
|
-
if (e.position === e.lineStart &&
|
|
2078
|
+
if (e.position === e.lineStart && Ue(e) || r && ve(f))
|
|
1415
2079
|
break;
|
|
1416
|
-
if (
|
|
1417
|
-
if (c = e.line, s = e.lineStart,
|
|
2080
|
+
if (oe(f))
|
|
2081
|
+
if (c = e.line, s = e.lineStart, u = e.lineIndent, H(e, !1, -1), e.lineIndent >= n) {
|
|
1418
2082
|
a = !0, f = e.input.charCodeAt(e.position);
|
|
1419
2083
|
continue;
|
|
1420
2084
|
} else {
|
|
1421
|
-
e.position =
|
|
2085
|
+
e.position = o, e.line = c, e.lineStart = s, e.lineIndent = u;
|
|
1422
2086
|
break;
|
|
1423
2087
|
}
|
|
1424
2088
|
}
|
|
1425
|
-
a && (
|
|
2089
|
+
a && (ue(e, l, o, !1), ln(e, e.line - c), l = o = e.position, a = !1), xe(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1426
2090
|
}
|
|
1427
|
-
return
|
|
2091
|
+
return ue(e, l, o, !1), e.result ? !0 : (e.kind = x, e.result = p, !1);
|
|
1428
2092
|
}
|
|
1429
|
-
function
|
|
1430
|
-
var
|
|
1431
|
-
if (
|
|
2093
|
+
function kt(e, n) {
|
|
2094
|
+
var r, t, i;
|
|
2095
|
+
if (r = e.input.charCodeAt(e.position), r !== 39)
|
|
1432
2096
|
return !1;
|
|
1433
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
1434
|
-
if (
|
|
1435
|
-
if (
|
|
1436
|
-
|
|
2097
|
+
for (e.kind = "scalar", e.result = "", e.position++, t = i = e.position; (r = e.input.charCodeAt(e.position)) !== 0; )
|
|
2098
|
+
if (r === 39)
|
|
2099
|
+
if (ue(e, t, e.position, !0), r = e.input.charCodeAt(++e.position), r === 39)
|
|
2100
|
+
t = e.position, e.position++, i = e.position;
|
|
1437
2101
|
else
|
|
1438
2102
|
return !0;
|
|
1439
|
-
else
|
|
1440
|
-
|
|
2103
|
+
else oe(r) ? (ue(e, t, i, !0), ln(e, H(e, !1, n)), t = i = e.position) : e.position === e.lineStart && Ue(e) ? C(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
2104
|
+
C(e, "unexpected end of the stream within a single quoted scalar");
|
|
1441
2105
|
}
|
|
1442
|
-
function
|
|
1443
|
-
var
|
|
2106
|
+
function Ct(e, n) {
|
|
2107
|
+
var r, t, i, l, o, a;
|
|
1444
2108
|
if (a = e.input.charCodeAt(e.position), a !== 34)
|
|
1445
2109
|
return !1;
|
|
1446
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
2110
|
+
for (e.kind = "scalar", e.result = "", e.position++, r = t = e.position; (a = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1447
2111
|
if (a === 34)
|
|
1448
|
-
return
|
|
2112
|
+
return ue(e, r, e.position, !0), e.position++, !0;
|
|
1449
2113
|
if (a === 92) {
|
|
1450
|
-
if (
|
|
1451
|
-
|
|
1452
|
-
else if (a < 256 &&
|
|
1453
|
-
e.result +=
|
|
1454
|
-
else if ((
|
|
1455
|
-
for (i =
|
|
1456
|
-
a = e.input.charCodeAt(++e.position), (
|
|
1457
|
-
e.result +=
|
|
2114
|
+
if (ue(e, r, e.position, !0), a = e.input.charCodeAt(++e.position), oe(a))
|
|
2115
|
+
H(e, !1, n);
|
|
2116
|
+
else if (a < 256 && hr[a])
|
|
2117
|
+
e.result += xr[a], e.position++;
|
|
2118
|
+
else if ((o = gt(a)) > 0) {
|
|
2119
|
+
for (i = o, l = 0; i > 0; i--)
|
|
2120
|
+
a = e.input.charCodeAt(++e.position), (o = mt(a)) >= 0 ? l = (l << 4) + o : C(e, "expected hexadecimal character");
|
|
2121
|
+
e.result += vt(l), e.position++;
|
|
1458
2122
|
} else
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
} else
|
|
2123
|
+
C(e, "unknown escape sequence");
|
|
2124
|
+
r = t = e.position;
|
|
2125
|
+
} else oe(a) ? (ue(e, r, t, !0), ln(e, H(e, !1, n)), r = t = e.position) : e.position === e.lineStart && Ue(e) ? C(e, "unexpected end of the document within a double quoted scalar") : (e.position++, t = e.position);
|
|
1462
2126
|
}
|
|
1463
|
-
|
|
1464
|
-
}
|
|
1465
|
-
function
|
|
1466
|
-
var
|
|
1467
|
-
if (
|
|
1468
|
-
|
|
1469
|
-
else if (
|
|
1470
|
-
|
|
2127
|
+
C(e, "unexpected end of the stream within a double quoted scalar");
|
|
2128
|
+
}
|
|
2129
|
+
function St(e, n) {
|
|
2130
|
+
var r = !0, t, i, l, o = e.tag, a, c = e.anchor, s, u, x, p, f, m = /* @__PURE__ */ Object.create(null), y, A, v, b;
|
|
2131
|
+
if (b = e.input.charCodeAt(e.position), b === 91)
|
|
2132
|
+
u = 93, f = !1, a = [];
|
|
2133
|
+
else if (b === 123)
|
|
2134
|
+
u = 125, f = !0, a = {};
|
|
1471
2135
|
else
|
|
1472
2136
|
return !1;
|
|
1473
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = a),
|
|
1474
|
-
if (
|
|
1475
|
-
return e.position++, e.tag =
|
|
1476
|
-
|
|
2137
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), b = e.input.charCodeAt(++e.position); b !== 0; ) {
|
|
2138
|
+
if (H(e, !0, n), b = e.input.charCodeAt(e.position), b === u)
|
|
2139
|
+
return e.position++, e.tag = o, e.anchor = c, e.kind = f ? "mapping" : "sequence", e.result = a, !0;
|
|
2140
|
+
r ? b === 44 && C(e, "expected the node content, but found ','") : C(e, "missed comma between flow collection entries"), A = y = v = null, x = p = !1, b === 63 && (s = e.input.charCodeAt(e.position + 1), ee(s) && (x = p = !0, e.position++, H(e, !0, n))), t = e.line, i = e.lineStart, l = e.position, Ae(e, n, De, !1, !0), A = e.tag, y = e.result, H(e, !0, n), b = e.input.charCodeAt(e.position), (p || e.line === t) && b === 58 && (x = !0, b = e.input.charCodeAt(++e.position), H(e, !0, n), Ae(e, n, De, !1, !0), v = e.result), f ? be(e, a, m, A, y, v, t, i, l) : x ? a.push(be(e, null, m, A, y, v, t, i, l)) : a.push(y), H(e, !0, n), b = e.input.charCodeAt(e.position), b === 44 ? (r = !0, b = e.input.charCodeAt(++e.position)) : r = !1;
|
|
1477
2141
|
}
|
|
1478
|
-
|
|
1479
|
-
}
|
|
1480
|
-
function
|
|
1481
|
-
var
|
|
1482
|
-
if (
|
|
1483
|
-
|
|
1484
|
-
else if (
|
|
1485
|
-
|
|
2142
|
+
C(e, "unexpected end of the stream within a flow collection");
|
|
2143
|
+
}
|
|
2144
|
+
function Et(e, n) {
|
|
2145
|
+
var r, t, i = ze, l = !1, o = !1, a = n, c = 0, s = !1, u, x;
|
|
2146
|
+
if (x = e.input.charCodeAt(e.position), x === 124)
|
|
2147
|
+
t = !1;
|
|
2148
|
+
else if (x === 62)
|
|
2149
|
+
t = !0;
|
|
1486
2150
|
else
|
|
1487
2151
|
return !1;
|
|
1488
|
-
for (e.kind = "scalar", e.result = "";
|
|
1489
|
-
if (
|
|
1490
|
-
|
|
1491
|
-
else if ((
|
|
1492
|
-
|
|
2152
|
+
for (e.kind = "scalar", e.result = ""; x !== 0; )
|
|
2153
|
+
if (x = e.input.charCodeAt(++e.position), x === 43 || x === 45)
|
|
2154
|
+
ze === i ? i = x === 43 ? vn : pt : C(e, "repeat of a chomping mode identifier");
|
|
2155
|
+
else if ((u = yt(x)) >= 0)
|
|
2156
|
+
u === 0 ? C(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? C(e, "repeat of an indentation width identifier") : (a = n + u - 1, o = !0);
|
|
1493
2157
|
else
|
|
1494
2158
|
break;
|
|
1495
|
-
if (
|
|
2159
|
+
if (xe(x)) {
|
|
1496
2160
|
do
|
|
1497
|
-
|
|
1498
|
-
while (
|
|
1499
|
-
if (
|
|
2161
|
+
x = e.input.charCodeAt(++e.position);
|
|
2162
|
+
while (xe(x));
|
|
2163
|
+
if (x === 35)
|
|
1500
2164
|
do
|
|
1501
|
-
|
|
1502
|
-
while (!
|
|
2165
|
+
x = e.input.charCodeAt(++e.position);
|
|
2166
|
+
while (!oe(x) && x !== 0);
|
|
1503
2167
|
}
|
|
1504
|
-
for (;
|
|
1505
|
-
for (
|
|
1506
|
-
e.lineIndent++,
|
|
1507
|
-
if (!
|
|
2168
|
+
for (; x !== 0; ) {
|
|
2169
|
+
for (on(e), e.lineIndent = 0, x = e.input.charCodeAt(e.position); (!o || e.lineIndent < a) && x === 32; )
|
|
2170
|
+
e.lineIndent++, x = e.input.charCodeAt(++e.position);
|
|
2171
|
+
if (!o && e.lineIndent > a && (a = e.lineIndent), oe(x)) {
|
|
1508
2172
|
c++;
|
|
1509
2173
|
continue;
|
|
1510
2174
|
}
|
|
1511
2175
|
if (e.lineIndent < a) {
|
|
1512
|
-
i ===
|
|
1513
|
-
`, l ? 1 + c : c) : i ===
|
|
2176
|
+
i === vn ? e.result += U.repeat(`
|
|
2177
|
+
`, l ? 1 + c : c) : i === ze && l && (e.result += `
|
|
1514
2178
|
`);
|
|
1515
2179
|
break;
|
|
1516
2180
|
}
|
|
1517
|
-
for (
|
|
1518
|
-
`, l ? 1 + c : c)) : s ? (s = !1, e.result +=
|
|
1519
|
-
`, c + 1)) : c === 0 ? l && (e.result += " ") : e.result +=
|
|
1520
|
-
`, c) : e.result +=
|
|
1521
|
-
`, l ? 1 + c : c), l = !0,
|
|
1522
|
-
|
|
1523
|
-
|
|
2181
|
+
for (t ? xe(x) ? (s = !0, e.result += U.repeat(`
|
|
2182
|
+
`, l ? 1 + c : c)) : s ? (s = !1, e.result += U.repeat(`
|
|
2183
|
+
`, c + 1)) : c === 0 ? l && (e.result += " ") : e.result += U.repeat(`
|
|
2184
|
+
`, c) : e.result += U.repeat(`
|
|
2185
|
+
`, l ? 1 + c : c), l = !0, o = !0, c = 0, r = e.position; !oe(x) && x !== 0; )
|
|
2186
|
+
x = e.input.charCodeAt(++e.position);
|
|
2187
|
+
ue(e, r, e.position, !1);
|
|
1524
2188
|
}
|
|
1525
2189
|
return !0;
|
|
1526
2190
|
}
|
|
1527
|
-
function
|
|
1528
|
-
var
|
|
2191
|
+
function Sn(e, n) {
|
|
2192
|
+
var r, t = e.tag, i = e.anchor, l = [], o, a = !1, c;
|
|
1529
2193
|
if (e.firstTabInLine !== -1) return !1;
|
|
1530
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1531
|
-
if (a = !0, e.position++,
|
|
2194
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), !(c !== 45 || (o = e.input.charCodeAt(e.position + 1), !ee(o)))); ) {
|
|
2195
|
+
if (a = !0, e.position++, H(e, !0, -1) && e.lineIndent <= n) {
|
|
1532
2196
|
l.push(null), c = e.input.charCodeAt(e.position);
|
|
1533
2197
|
continue;
|
|
1534
2198
|
}
|
|
1535
|
-
if (
|
|
1536
|
-
|
|
1537
|
-
else if (e.lineIndent <
|
|
2199
|
+
if (r = e.line, Ae(e, n, fr, !1, !0), l.push(e.result), H(e, !0, -1), c = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && c !== 0)
|
|
2200
|
+
C(e, "bad indentation of a sequence entry");
|
|
2201
|
+
else if (e.lineIndent < n)
|
|
1538
2202
|
break;
|
|
1539
2203
|
}
|
|
1540
|
-
return a ? (e.tag =
|
|
2204
|
+
return a ? (e.tag = t, e.anchor = i, e.kind = "sequence", e.result = l, !0) : !1;
|
|
1541
2205
|
}
|
|
1542
|
-
function
|
|
1543
|
-
var
|
|
2206
|
+
function wt(e, n, r) {
|
|
2207
|
+
var t, i, l, o, a, c, s = e.tag, u = e.anchor, x = {}, p = /* @__PURE__ */ Object.create(null), f = null, m = null, y = null, A = !1, v = !1, b;
|
|
1544
2208
|
if (e.firstTabInLine !== -1) return !1;
|
|
1545
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1546
|
-
if (!
|
|
1547
|
-
|
|
2209
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = x), b = e.input.charCodeAt(e.position); b !== 0; ) {
|
|
2210
|
+
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, C(e, "tab characters must not be used in indentation")), t = e.input.charCodeAt(e.position + 1), l = e.line, (b === 63 || b === 58) && ee(t))
|
|
2211
|
+
b === 63 ? (A && (be(e, x, p, f, m, null, o, a, c), f = m = y = null), v = !0, A = !0, i = !0) : A ? (A = !1, i = !0) : C(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, b = t;
|
|
1548
2212
|
else {
|
|
1549
|
-
if (
|
|
2213
|
+
if (o = e.line, a = e.lineStart, c = e.position, !Ae(e, r, sr, !1, !0))
|
|
1550
2214
|
break;
|
|
1551
2215
|
if (e.line === l) {
|
|
1552
|
-
for (
|
|
1553
|
-
|
|
1554
|
-
if (
|
|
1555
|
-
|
|
1556
|
-
else if (
|
|
1557
|
-
|
|
2216
|
+
for (b = e.input.charCodeAt(e.position); xe(b); )
|
|
2217
|
+
b = e.input.charCodeAt(++e.position);
|
|
2218
|
+
if (b === 58)
|
|
2219
|
+
b = e.input.charCodeAt(++e.position), ee(b) || C(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (be(e, x, p, f, m, null, o, a, c), f = m = y = null), v = !0, A = !1, i = !1, f = e.tag, m = e.result;
|
|
2220
|
+
else if (v)
|
|
2221
|
+
C(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1558
2222
|
else
|
|
1559
|
-
return e.tag = s, e.anchor =
|
|
1560
|
-
} else if (
|
|
1561
|
-
|
|
2223
|
+
return e.tag = s, e.anchor = u, !0;
|
|
2224
|
+
} else if (v)
|
|
2225
|
+
C(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1562
2226
|
else
|
|
1563
|
-
return e.tag = s, e.anchor =
|
|
2227
|
+
return e.tag = s, e.anchor = u, !0;
|
|
1564
2228
|
}
|
|
1565
|
-
if ((e.line === l || e.lineIndent >
|
|
1566
|
-
|
|
1567
|
-
else if (e.lineIndent <
|
|
2229
|
+
if ((e.line === l || e.lineIndent > n) && (A && (o = e.line, a = e.lineStart, c = e.position), Ae(e, n, Ye, !0, i) && (A ? m = e.result : y = e.result), A || (be(e, x, p, f, m, y, o, a, c), f = m = y = null), H(e, !0, -1), b = e.input.charCodeAt(e.position)), (e.line === l || e.lineIndent > n) && b !== 0)
|
|
2230
|
+
C(e, "bad indentation of a mapping entry");
|
|
2231
|
+
else if (e.lineIndent < n)
|
|
1568
2232
|
break;
|
|
1569
2233
|
}
|
|
1570
|
-
return
|
|
2234
|
+
return A && be(e, x, p, f, m, null, o, a, c), v && (e.tag = s, e.anchor = u, e.kind = "mapping", e.result = x), v;
|
|
1571
2235
|
}
|
|
1572
|
-
function
|
|
1573
|
-
var
|
|
1574
|
-
if (
|
|
1575
|
-
if (e.tag !== null &&
|
|
2236
|
+
function _t(e) {
|
|
2237
|
+
var n, r = !1, t = !1, i, l, o;
|
|
2238
|
+
if (o = e.input.charCodeAt(e.position), o !== 33) return !1;
|
|
2239
|
+
if (e.tag !== null && C(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (r = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (t = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", n = e.position, r) {
|
|
1576
2240
|
do
|
|
1577
|
-
|
|
1578
|
-
while (
|
|
1579
|
-
e.position < e.length ? (l = e.input.slice(
|
|
2241
|
+
o = e.input.charCodeAt(++e.position);
|
|
2242
|
+
while (o !== 0 && o !== 62);
|
|
2243
|
+
e.position < e.length ? (l = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) : C(e, "unexpected end of the stream within a verbatim tag");
|
|
1580
2244
|
} else {
|
|
1581
|
-
for (;
|
|
1582
|
-
|
|
1583
|
-
l = e.input.slice(
|
|
2245
|
+
for (; o !== 0 && !ee(o); )
|
|
2246
|
+
o === 33 && (t ? C(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(n - 1, e.position + 1), ur.test(i) || C(e, "named tag handle cannot contain such characters"), t = !0, n = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2247
|
+
l = e.input.slice(n, e.position), xt.test(l) && C(e, "tag suffix cannot contain flow indicator characters");
|
|
1584
2248
|
}
|
|
1585
|
-
l && !
|
|
2249
|
+
l && !pr.test(l) && C(e, "tag name cannot contain such characters: " + l);
|
|
1586
2250
|
try {
|
|
1587
2251
|
l = decodeURIComponent(l);
|
|
1588
2252
|
} catch {
|
|
1589
|
-
|
|
2253
|
+
C(e, "tag name is malformed: " + l);
|
|
1590
2254
|
}
|
|
1591
|
-
return
|
|
1592
|
-
}
|
|
1593
|
-
function
|
|
1594
|
-
var
|
|
1595
|
-
if (
|
|
1596
|
-
for (e.anchor !== null &&
|
|
1597
|
-
|
|
1598
|
-
return e.position ===
|
|
1599
|
-
}
|
|
1600
|
-
function
|
|
1601
|
-
var
|
|
1602
|
-
if (
|
|
1603
|
-
for (
|
|
1604
|
-
|
|
1605
|
-
return e.position ===
|
|
1606
|
-
}
|
|
1607
|
-
function
|
|
1608
|
-
var l,
|
|
1609
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l =
|
|
1610
|
-
for (;
|
|
1611
|
-
|
|
1612
|
-
if (a && (a = s || i), (c === 1 ||
|
|
2255
|
+
return r ? e.tag = l : pe.call(e.tagMap, i) ? e.tag = e.tagMap[i] + l : i === "!" ? e.tag = "!" + l : i === "!!" ? e.tag = "tag:yaml.org,2002:" + l : C(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
2256
|
+
}
|
|
2257
|
+
function Tt(e) {
|
|
2258
|
+
var n, r;
|
|
2259
|
+
if (r = e.input.charCodeAt(e.position), r !== 38) return !1;
|
|
2260
|
+
for (e.anchor !== null && C(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ee(r) && !ve(r); )
|
|
2261
|
+
r = e.input.charCodeAt(++e.position);
|
|
2262
|
+
return e.position === n && C(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
|
|
2263
|
+
}
|
|
2264
|
+
function $t(e) {
|
|
2265
|
+
var n, r, t;
|
|
2266
|
+
if (t = e.input.charCodeAt(e.position), t !== 42) return !1;
|
|
2267
|
+
for (t = e.input.charCodeAt(++e.position), n = e.position; t !== 0 && !ee(t) && !ve(t); )
|
|
2268
|
+
t = e.input.charCodeAt(++e.position);
|
|
2269
|
+
return e.position === n && C(e, "name of an alias node must contain at least one character"), r = e.input.slice(n, e.position), pe.call(e.anchorMap, r) || C(e, 'unidentified alias "' + r + '"'), e.result = e.anchorMap[r], H(e, !0, -1), !0;
|
|
2270
|
+
}
|
|
2271
|
+
function Ae(e, n, r, t, i) {
|
|
2272
|
+
var l, o, a, c = 1, s = !1, u = !1, x, p, f, m, y, A;
|
|
2273
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = o = a = Ye === r || fr === r, t && H(e, !0, -1) && (s = !0, e.lineIndent > n ? c = 1 : e.lineIndent === n ? c = 0 : e.lineIndent < n && (c = -1)), c === 1)
|
|
2274
|
+
for (; _t(e) || Tt(e); )
|
|
2275
|
+
H(e, !0, -1) ? (s = !0, a = l, e.lineIndent > n ? c = 1 : e.lineIndent === n ? c = 0 : e.lineIndent < n && (c = -1)) : a = !1;
|
|
2276
|
+
if (a && (a = s || i), (c === 1 || Ye === r) && (De === r || sr === r ? y = n : y = n + 1, A = e.position - e.lineStart, c === 1 ? a && (Sn(e, A) || wt(e, A, y)) || St(e, y) ? u = !0 : (o && Et(e, y) || kt(e, y) || Ct(e, y) ? u = !0 : $t(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && C(e, "alias node should not have any properties")) : At(e, y, De === r) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (u = a && Sn(e, A))), e.tag === null)
|
|
1613
2277
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1614
2278
|
else if (e.tag === "?") {
|
|
1615
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1616
|
-
if (m = e.implicitTypes[
|
|
2279
|
+
for (e.result !== null && e.kind !== "scalar" && C(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), x = 0, p = e.implicitTypes.length; x < p; x += 1)
|
|
2280
|
+
if (m = e.implicitTypes[x], m.resolve(e.result)) {
|
|
1617
2281
|
e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1618
2282
|
break;
|
|
1619
2283
|
}
|
|
1620
2284
|
} else if (e.tag !== "!") {
|
|
1621
|
-
if (
|
|
2285
|
+
if (pe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1622
2286
|
m = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1623
2287
|
else
|
|
1624
|
-
for (m = null, f = e.typeMap.multi[e.kind || "fallback"],
|
|
1625
|
-
if (e.tag.slice(0, f[
|
|
1626
|
-
m = f[
|
|
2288
|
+
for (m = null, f = e.typeMap.multi[e.kind || "fallback"], x = 0, p = f.length; x < p; x += 1)
|
|
2289
|
+
if (e.tag.slice(0, f[x].tag.length) === f[x].tag) {
|
|
2290
|
+
m = f[x];
|
|
1627
2291
|
break;
|
|
1628
2292
|
}
|
|
1629
|
-
m ||
|
|
2293
|
+
m || C(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && C(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + m.kind + '", not "' + e.kind + '"'), m.resolve(e.result, e.tag) ? (e.result = m.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : C(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1630
2294
|
}
|
|
1631
|
-
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null ||
|
|
1632
|
-
}
|
|
1633
|
-
function
|
|
1634
|
-
var
|
|
1635
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (
|
|
1636
|
-
for (l = !0,
|
|
1637
|
-
|
|
1638
|
-
for (
|
|
1639
|
-
for (;
|
|
1640
|
-
|
|
1641
|
-
if (
|
|
2295
|
+
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
|
|
2296
|
+
}
|
|
2297
|
+
function Ot(e) {
|
|
2298
|
+
var n = e.position, r, t, i, l = !1, o;
|
|
2299
|
+
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (H(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2300
|
+
for (l = !0, o = e.input.charCodeAt(++e.position), r = e.position; o !== 0 && !ee(o); )
|
|
2301
|
+
o = e.input.charCodeAt(++e.position);
|
|
2302
|
+
for (t = e.input.slice(r, e.position), i = [], t.length < 1 && C(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2303
|
+
for (; xe(o); )
|
|
2304
|
+
o = e.input.charCodeAt(++e.position);
|
|
2305
|
+
if (o === 35) {
|
|
1642
2306
|
do
|
|
1643
|
-
|
|
1644
|
-
while (
|
|
2307
|
+
o = e.input.charCodeAt(++e.position);
|
|
2308
|
+
while (o !== 0 && !oe(o));
|
|
1645
2309
|
break;
|
|
1646
2310
|
}
|
|
1647
|
-
if (
|
|
1648
|
-
for (
|
|
1649
|
-
|
|
1650
|
-
i.push(e.input.slice(
|
|
2311
|
+
if (oe(o)) break;
|
|
2312
|
+
for (r = e.position; o !== 0 && !ee(o); )
|
|
2313
|
+
o = e.input.charCodeAt(++e.position);
|
|
2314
|
+
i.push(e.input.slice(r, e.position));
|
|
1651
2315
|
}
|
|
1652
|
-
|
|
2316
|
+
o !== 0 && on(e), pe.call(kn, t) ? kn[t](e, t, i) : Be(e, 'unknown document directive "' + t + '"');
|
|
1653
2317
|
}
|
|
1654
|
-
if (
|
|
1655
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
2318
|
+
if (H(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, H(e, !0, -1)) : l && C(e, "directives end mark is expected"), Ae(e, e.lineIndent - 1, Ye, !1, !0), H(e, !0, -1), e.checkLineBreaks && ht.test(e.input.slice(n, e.position)) && Be(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ue(e)) {
|
|
2319
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, H(e, !0, -1));
|
|
1656
2320
|
return;
|
|
1657
2321
|
}
|
|
1658
2322
|
if (e.position < e.length - 1)
|
|
1659
|
-
|
|
2323
|
+
C(e, "end of the stream or a document separator is expected");
|
|
1660
2324
|
else
|
|
1661
2325
|
return;
|
|
1662
2326
|
}
|
|
1663
|
-
function
|
|
1664
|
-
e = String(e),
|
|
2327
|
+
function gr(e, n) {
|
|
2328
|
+
e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1665
2329
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1666
|
-
var
|
|
1667
|
-
for (
|
|
1668
|
-
|
|
1669
|
-
for (;
|
|
1670
|
-
|
|
1671
|
-
return
|
|
1672
|
-
}
|
|
1673
|
-
function
|
|
1674
|
-
|
|
1675
|
-
var
|
|
1676
|
-
if (typeof
|
|
1677
|
-
return
|
|
1678
|
-
for (var i = 0, l =
|
|
1679
|
-
|
|
1680
|
-
}
|
|
1681
|
-
function
|
|
1682
|
-
var
|
|
1683
|
-
if (
|
|
1684
|
-
if (
|
|
1685
|
-
return
|
|
1686
|
-
throw new
|
|
2330
|
+
var r = new bt(e, n), t = e.indexOf("\0");
|
|
2331
|
+
for (t !== -1 && (r.position = t, C(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
|
|
2332
|
+
r.lineIndent += 1, r.position += 1;
|
|
2333
|
+
for (; r.position < r.length - 1; )
|
|
2334
|
+
Ot(r);
|
|
2335
|
+
return r.documents;
|
|
2336
|
+
}
|
|
2337
|
+
function jt(e, n, r) {
|
|
2338
|
+
n !== null && typeof n == "object" && typeof r > "u" && (r = n, n = null);
|
|
2339
|
+
var t = gr(e, r);
|
|
2340
|
+
if (typeof n != "function")
|
|
2341
|
+
return t;
|
|
2342
|
+
for (var i = 0, l = t.length; i < l; i += 1)
|
|
2343
|
+
n(t[i]);
|
|
2344
|
+
}
|
|
2345
|
+
function Ft(e, n) {
|
|
2346
|
+
var r = gr(e, n);
|
|
2347
|
+
if (r.length !== 0) {
|
|
2348
|
+
if (r.length === 1)
|
|
2349
|
+
return r[0];
|
|
2350
|
+
throw new Z("expected a single document in the stream, but found more");
|
|
1687
2351
|
}
|
|
1688
2352
|
}
|
|
1689
|
-
var
|
|
1690
|
-
loadAll:
|
|
1691
|
-
load:
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
var
|
|
2353
|
+
var Lt = jt, Rt = Ft, yr = {
|
|
2354
|
+
loadAll: Lt,
|
|
2355
|
+
load: Rt
|
|
2356
|
+
}, vr = Object.prototype.toString, br = Object.prototype.hasOwnProperty, an = 65279, It = 9, $e = 10, Mt = 13, Nt = 32, Pt = 33, Dt = 34, Ke = 35, Yt = 37, Bt = 38, Wt = 39, Ht = 42, Ar = 44, Ut = 45, We = 58, Xt = 61, Gt = 62, zt = 63, qt = 64, kr = 91, Cr = 93, Kt = 96, Sr = 123, Vt = 124, Er = 125, K = {};
|
|
2357
|
+
K[0] = "\\0";
|
|
2358
|
+
K[7] = "\\a";
|
|
2359
|
+
K[8] = "\\b";
|
|
2360
|
+
K[9] = "\\t";
|
|
2361
|
+
K[10] = "\\n";
|
|
2362
|
+
K[11] = "\\v";
|
|
2363
|
+
K[12] = "\\f";
|
|
2364
|
+
K[13] = "\\r";
|
|
2365
|
+
K[27] = "\\e";
|
|
2366
|
+
K[34] = '\\"';
|
|
2367
|
+
K[92] = "\\\\";
|
|
2368
|
+
K[133] = "\\N";
|
|
2369
|
+
K[160] = "\\_";
|
|
2370
|
+
K[8232] = "\\L";
|
|
2371
|
+
K[8233] = "\\P";
|
|
2372
|
+
var Zt = [
|
|
1709
2373
|
"y",
|
|
1710
2374
|
"Y",
|
|
1711
2375
|
"yes",
|
|
@@ -1722,243 +2386,243 @@ var uo = [
|
|
|
1722
2386
|
"off",
|
|
1723
2387
|
"Off",
|
|
1724
2388
|
"OFF"
|
|
1725
|
-
],
|
|
1726
|
-
function
|
|
1727
|
-
var
|
|
1728
|
-
if (
|
|
1729
|
-
for (
|
|
1730
|
-
|
|
1731
|
-
return
|
|
2389
|
+
], Jt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2390
|
+
function Qt(e, n) {
|
|
2391
|
+
var r, t, i, l, o, a, c;
|
|
2392
|
+
if (n === null) return {};
|
|
2393
|
+
for (r = {}, t = Object.keys(n), i = 0, l = t.length; i < l; i += 1)
|
|
2394
|
+
o = t[i], a = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), c = e.compiledTypeMap.fallback[o], c && br.call(c.styleAliases, a) && (a = c.styleAliases[a]), r[o] = a;
|
|
2395
|
+
return r;
|
|
1732
2396
|
}
|
|
1733
|
-
function
|
|
1734
|
-
var
|
|
1735
|
-
if (
|
|
1736
|
-
|
|
2397
|
+
function eo(e) {
|
|
2398
|
+
var n, r, t;
|
|
2399
|
+
if (n = e.toString(16).toUpperCase(), e <= 255)
|
|
2400
|
+
r = "x", t = 2;
|
|
1737
2401
|
else if (e <= 65535)
|
|
1738
|
-
|
|
2402
|
+
r = "u", t = 4;
|
|
1739
2403
|
else if (e <= 4294967295)
|
|
1740
|
-
|
|
2404
|
+
r = "U", t = 8;
|
|
1741
2405
|
else
|
|
1742
|
-
throw new
|
|
1743
|
-
return "\\" +
|
|
2406
|
+
throw new Z("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2407
|
+
return "\\" + r + U.repeat("0", t - n.length) + n;
|
|
1744
2408
|
}
|
|
1745
|
-
var
|
|
1746
|
-
function
|
|
1747
|
-
this.schema = e.schema ||
|
|
2409
|
+
var no = 1, Oe = 2;
|
|
2410
|
+
function ro(e) {
|
|
2411
|
+
this.schema = e.schema || tn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = U.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Qt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Oe : no, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
1748
2412
|
}
|
|
1749
|
-
function
|
|
1750
|
-
for (var
|
|
2413
|
+
function En(e, n) {
|
|
2414
|
+
for (var r = U.repeat(" ", n), t = 0, i = -1, l = "", o, a = e.length; t < a; )
|
|
1751
2415
|
i = e.indexOf(`
|
|
1752
|
-
`,
|
|
1753
|
-
` && (l +=
|
|
2416
|
+
`, t), i === -1 ? (o = e.slice(t), t = a) : (o = e.slice(t, i + 1), t = i + 1), o.length && o !== `
|
|
2417
|
+
` && (l += r), l += o;
|
|
1754
2418
|
return l;
|
|
1755
2419
|
}
|
|
1756
|
-
function
|
|
2420
|
+
function Ve(e, n) {
|
|
1757
2421
|
return `
|
|
1758
|
-
` +
|
|
2422
|
+
` + U.repeat(" ", e.indent * n);
|
|
1759
2423
|
}
|
|
1760
|
-
function
|
|
1761
|
-
var
|
|
1762
|
-
for (
|
|
1763
|
-
if (i = e.implicitTypes[
|
|
2424
|
+
function io(e, n) {
|
|
2425
|
+
var r, t, i;
|
|
2426
|
+
for (r = 0, t = e.implicitTypes.length; r < t; r += 1)
|
|
2427
|
+
if (i = e.implicitTypes[r], i.resolve(n))
|
|
1764
2428
|
return !0;
|
|
1765
2429
|
return !1;
|
|
1766
2430
|
}
|
|
1767
|
-
function
|
|
1768
|
-
return e ===
|
|
2431
|
+
function He(e) {
|
|
2432
|
+
return e === Nt || e === It;
|
|
1769
2433
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
2434
|
+
function je(e) {
|
|
2435
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== an || 65536 <= e && e <= 1114111;
|
|
1772
2436
|
}
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
2437
|
+
function wn(e) {
|
|
2438
|
+
return je(e) && e !== an && e !== Mt && e !== $e;
|
|
1775
2439
|
}
|
|
1776
|
-
function
|
|
1777
|
-
var
|
|
2440
|
+
function _n(e, n, r) {
|
|
2441
|
+
var t = wn(e), i = t && !He(e);
|
|
1778
2442
|
return (
|
|
1779
2443
|
// ns-plain-safe
|
|
1780
|
-
(
|
|
2444
|
+
(r ? (
|
|
1781
2445
|
// c = flow-in
|
|
1782
|
-
|
|
1783
|
-
) :
|
|
2446
|
+
t
|
|
2447
|
+
) : t && e !== Ar && e !== kr && e !== Cr && e !== Sr && e !== Er) && e !== Ke && !(n === We && !i) || wn(n) && !He(n) && e === Ke || n === We && i
|
|
1784
2448
|
);
|
|
1785
2449
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return
|
|
2450
|
+
function to(e) {
|
|
2451
|
+
return je(e) && e !== an && !He(e) && e !== Ut && e !== zt && e !== We && e !== Ar && e !== kr && e !== Cr && e !== Sr && e !== Er && e !== Ke && e !== Bt && e !== Ht && e !== Pt && e !== Vt && e !== Xt && e !== Gt && e !== Wt && e !== Dt && e !== Yt && e !== qt && e !== Kt;
|
|
1788
2452
|
}
|
|
1789
|
-
function
|
|
1790
|
-
return !
|
|
2453
|
+
function oo(e) {
|
|
2454
|
+
return !He(e) && e !== We;
|
|
1791
2455
|
}
|
|
1792
|
-
function
|
|
1793
|
-
var
|
|
1794
|
-
return
|
|
2456
|
+
function _e(e, n) {
|
|
2457
|
+
var r = e.charCodeAt(n), t;
|
|
2458
|
+
return r >= 55296 && r <= 56319 && n + 1 < e.length && (t = e.charCodeAt(n + 1), t >= 56320 && t <= 57343) ? (r - 55296) * 1024 + t - 56320 + 65536 : r;
|
|
1795
2459
|
}
|
|
1796
|
-
function
|
|
1797
|
-
var
|
|
1798
|
-
return
|
|
2460
|
+
function wr(e) {
|
|
2461
|
+
var n = /^\n* /;
|
|
2462
|
+
return n.test(e);
|
|
1799
2463
|
}
|
|
1800
|
-
var
|
|
1801
|
-
function
|
|
1802
|
-
var c, s = 0,
|
|
1803
|
-
if (
|
|
2464
|
+
var _r = 1, Ze = 2, Tr = 3, $r = 4, ye = 5;
|
|
2465
|
+
function lo(e, n, r, t, i, l, o, a) {
|
|
2466
|
+
var c, s = 0, u = null, x = !1, p = !1, f = t !== -1, m = -1, y = to(_e(e, 0)) && oo(_e(e, e.length - 1));
|
|
2467
|
+
if (n || o)
|
|
1804
2468
|
for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
|
|
1805
|
-
if (s =
|
|
1806
|
-
return
|
|
1807
|
-
|
|
2469
|
+
if (s = _e(e, c), !je(s))
|
|
2470
|
+
return ye;
|
|
2471
|
+
y = y && _n(s, u, a), u = s;
|
|
1808
2472
|
}
|
|
1809
2473
|
else {
|
|
1810
2474
|
for (c = 0; c < e.length; s >= 65536 ? c += 2 : c++) {
|
|
1811
|
-
if (s =
|
|
1812
|
-
|
|
1813
|
-
c - m - 1 >
|
|
1814
|
-
else if (!
|
|
1815
|
-
return
|
|
1816
|
-
|
|
2475
|
+
if (s = _e(e, c), s === $e)
|
|
2476
|
+
x = !0, f && (p = p || // Foldable line = too long, and not more-indented.
|
|
2477
|
+
c - m - 1 > t && e[m + 1] !== " ", m = c);
|
|
2478
|
+
else if (!je(s))
|
|
2479
|
+
return ye;
|
|
2480
|
+
y = y && _n(s, u, a), u = s;
|
|
1817
2481
|
}
|
|
1818
|
-
|
|
2482
|
+
p = p || f && c - m - 1 > t && e[m + 1] !== " ";
|
|
1819
2483
|
}
|
|
1820
|
-
return !
|
|
2484
|
+
return !x && !p ? y && !o && !i(e) ? _r : l === Oe ? ye : Ze : r > 9 && wr(e) ? ye : o ? l === Oe ? ye : Ze : p ? $r : Tr;
|
|
1821
2485
|
}
|
|
1822
|
-
function
|
|
2486
|
+
function ao(e, n, r, t, i) {
|
|
1823
2487
|
e.dump = (function() {
|
|
1824
|
-
if (
|
|
1825
|
-
return e.quotingType ===
|
|
1826
|
-
if (!e.noCompatMode && (
|
|
1827
|
-
return e.quotingType ===
|
|
1828
|
-
var l = e.indent * Math.max(1,
|
|
2488
|
+
if (n.length === 0)
|
|
2489
|
+
return e.quotingType === Oe ? '""' : "''";
|
|
2490
|
+
if (!e.noCompatMode && (Zt.indexOf(n) !== -1 || Jt.test(n)))
|
|
2491
|
+
return e.quotingType === Oe ? '"' + n + '"' : "'" + n + "'";
|
|
2492
|
+
var l = e.indent * Math.max(1, r), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - l), a = t || e.flowLevel > -1 && r >= e.flowLevel;
|
|
1829
2493
|
function c(s) {
|
|
1830
|
-
return
|
|
2494
|
+
return io(e, s);
|
|
1831
2495
|
}
|
|
1832
|
-
switch (
|
|
1833
|
-
|
|
2496
|
+
switch (lo(
|
|
2497
|
+
n,
|
|
1834
2498
|
a,
|
|
1835
2499
|
e.indent,
|
|
1836
|
-
|
|
2500
|
+
o,
|
|
1837
2501
|
c,
|
|
1838
2502
|
e.quotingType,
|
|
1839
|
-
e.forceQuotes && !
|
|
2503
|
+
e.forceQuotes && !t,
|
|
1840
2504
|
i
|
|
1841
2505
|
)) {
|
|
1842
|
-
case
|
|
1843
|
-
return
|
|
1844
|
-
case
|
|
1845
|
-
return "'" +
|
|
1846
|
-
case
|
|
1847
|
-
return "|" +
|
|
1848
|
-
case
|
|
1849
|
-
return ">" +
|
|
1850
|
-
case
|
|
1851
|
-
return '"' +
|
|
2506
|
+
case _r:
|
|
2507
|
+
return n;
|
|
2508
|
+
case Ze:
|
|
2509
|
+
return "'" + n.replace(/'/g, "''") + "'";
|
|
2510
|
+
case Tr:
|
|
2511
|
+
return "|" + Tn(n, e.indent) + $n(En(n, l));
|
|
2512
|
+
case $r:
|
|
2513
|
+
return ">" + Tn(n, e.indent) + $n(En(co(n, o), l));
|
|
2514
|
+
case ye:
|
|
2515
|
+
return '"' + so(n) + '"';
|
|
1852
2516
|
default:
|
|
1853
|
-
throw new
|
|
2517
|
+
throw new Z("impossible error: invalid scalar style");
|
|
1854
2518
|
}
|
|
1855
2519
|
})();
|
|
1856
2520
|
}
|
|
1857
|
-
function
|
|
1858
|
-
var
|
|
1859
|
-
`, i =
|
|
2521
|
+
function Tn(e, n) {
|
|
2522
|
+
var r = wr(e) ? String(n) : "", t = e[e.length - 1] === `
|
|
2523
|
+
`, i = t && (e[e.length - 2] === `
|
|
1860
2524
|
` || e === `
|
|
1861
|
-
`), l = i ? "+" :
|
|
1862
|
-
return
|
|
2525
|
+
`), l = i ? "+" : t ? "" : "-";
|
|
2526
|
+
return r + l + `
|
|
1863
2527
|
`;
|
|
1864
2528
|
}
|
|
1865
|
-
function
|
|
2529
|
+
function $n(e) {
|
|
1866
2530
|
return e[e.length - 1] === `
|
|
1867
2531
|
` ? e.slice(0, -1) : e;
|
|
1868
2532
|
}
|
|
1869
|
-
function
|
|
1870
|
-
for (var
|
|
2533
|
+
function co(e, n) {
|
|
2534
|
+
for (var r = /(\n+)([^\n]*)/g, t = (function() {
|
|
1871
2535
|
var s = e.indexOf(`
|
|
1872
2536
|
`);
|
|
1873
|
-
return s = s !== -1 ? s : e.length,
|
|
2537
|
+
return s = s !== -1 ? s : e.length, r.lastIndex = s, On(e.slice(0, s), n);
|
|
1874
2538
|
})(), i = e[0] === `
|
|
1875
|
-
` || e[0] === " ", l,
|
|
1876
|
-
var a =
|
|
1877
|
-
l = c[0] === " ",
|
|
1878
|
-
` : "") +
|
|
2539
|
+
` || e[0] === " ", l, o; o = r.exec(e); ) {
|
|
2540
|
+
var a = o[1], c = o[2];
|
|
2541
|
+
l = c[0] === " ", t += a + (!i && !l && c !== "" ? `
|
|
2542
|
+
` : "") + On(c, n), i = l;
|
|
1879
2543
|
}
|
|
1880
|
-
return
|
|
2544
|
+
return t;
|
|
1881
2545
|
}
|
|
1882
|
-
function
|
|
2546
|
+
function On(e, n) {
|
|
1883
2547
|
if (e === "" || e[0] === " ") return e;
|
|
1884
|
-
for (var
|
|
1885
|
-
a =
|
|
1886
|
-
` + e.slice(i, l), i = l + 1),
|
|
2548
|
+
for (var r = / [^ ]/g, t, i = 0, l, o = 0, a = 0, c = ""; t = r.exec(e); )
|
|
2549
|
+
a = t.index, a - i > n && (l = o > i ? o : a, c += `
|
|
2550
|
+
` + e.slice(i, l), i = l + 1), o = a;
|
|
1887
2551
|
return c += `
|
|
1888
|
-
`, e.length - i >
|
|
1889
|
-
` + e.slice(
|
|
2552
|
+
`, e.length - i > n && o > i ? c += e.slice(i, o) + `
|
|
2553
|
+
` + e.slice(o + 1) : c += e.slice(i), c.slice(1);
|
|
1890
2554
|
}
|
|
1891
|
-
function
|
|
1892
|
-
for (var
|
|
1893
|
-
|
|
1894
|
-
return
|
|
2555
|
+
function so(e) {
|
|
2556
|
+
for (var n = "", r = 0, t, i = 0; i < e.length; r >= 65536 ? i += 2 : i++)
|
|
2557
|
+
r = _e(e, i), t = K[r], !t && je(r) ? (n += e[i], r >= 65536 && (n += e[i + 1])) : n += t || eo(r);
|
|
2558
|
+
return n;
|
|
1895
2559
|
}
|
|
1896
|
-
function
|
|
1897
|
-
var
|
|
1898
|
-
for (l = 0,
|
|
1899
|
-
a =
|
|
1900
|
-
e.tag = i, e.dump = "[" +
|
|
2560
|
+
function fo(e, n, r) {
|
|
2561
|
+
var t = "", i = e.tag, l, o, a;
|
|
2562
|
+
for (l = 0, o = r.length; l < o; l += 1)
|
|
2563
|
+
a = r[l], e.replacer && (a = e.replacer.call(r, String(l), a)), (ae(e, n, a, !1, !1) || typeof a > "u" && ae(e, n, null, !1, !1)) && (t !== "" && (t += "," + (e.condenseFlow ? "" : " ")), t += e.dump);
|
|
2564
|
+
e.tag = i, e.dump = "[" + t + "]";
|
|
1901
2565
|
}
|
|
1902
|
-
function
|
|
1903
|
-
var i = "", l = e.tag,
|
|
1904
|
-
for (
|
|
1905
|
-
c =
|
|
2566
|
+
function jn(e, n, r, t) {
|
|
2567
|
+
var i = "", l = e.tag, o, a, c;
|
|
2568
|
+
for (o = 0, a = r.length; o < a; o += 1)
|
|
2569
|
+
c = r[o], e.replacer && (c = e.replacer.call(r, String(o), c)), (ae(e, n + 1, c, !0, !0, !1, !0) || typeof c > "u" && ae(e, n + 1, null, !0, !0, !1, !0)) && ((!t || i !== "") && (i += Ve(e, n)), e.dump && $e === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
1906
2570
|
e.tag = l, e.dump = i || "[]";
|
|
1907
2571
|
}
|
|
1908
|
-
function
|
|
1909
|
-
var
|
|
1910
|
-
for (
|
|
1911
|
-
|
|
1912
|
-
e.tag = i, e.dump = "{" +
|
|
2572
|
+
function uo(e, n, r) {
|
|
2573
|
+
var t = "", i = e.tag, l = Object.keys(r), o, a, c, s, u;
|
|
2574
|
+
for (o = 0, a = l.length; o < a; o += 1)
|
|
2575
|
+
u = "", t !== "" && (u += ", "), e.condenseFlow && (u += '"'), c = l[o], s = r[c], e.replacer && (s = e.replacer.call(r, c, s)), ae(e, n, c, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ae(e, n, s, !1, !1) && (u += e.dump, t += u));
|
|
2576
|
+
e.tag = i, e.dump = "{" + t + "}";
|
|
1913
2577
|
}
|
|
1914
|
-
function
|
|
1915
|
-
var i = "", l = e.tag,
|
|
2578
|
+
function po(e, n, r, t) {
|
|
2579
|
+
var i = "", l = e.tag, o = Object.keys(r), a, c, s, u, x, p;
|
|
1916
2580
|
if (e.sortKeys === !0)
|
|
1917
|
-
|
|
2581
|
+
o.sort();
|
|
1918
2582
|
else if (typeof e.sortKeys == "function")
|
|
1919
|
-
|
|
2583
|
+
o.sort(e.sortKeys);
|
|
1920
2584
|
else if (e.sortKeys)
|
|
1921
|
-
throw new
|
|
1922
|
-
for (a = 0, c =
|
|
1923
|
-
|
|
2585
|
+
throw new Z("sortKeys must be a boolean or a function");
|
|
2586
|
+
for (a = 0, c = o.length; a < c; a += 1)
|
|
2587
|
+
p = "", (!t || i !== "") && (p += Ve(e, n)), s = o[a], u = r[s], e.replacer && (u = e.replacer.call(r, s, u)), ae(e, n + 1, s, !0, !0, !0) && (x = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, x && (e.dump && $e === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, x && (p += Ve(e, n)), ae(e, n + 1, u, !0, x) && (e.dump && $e === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, i += p));
|
|
1924
2588
|
e.tag = l, e.dump = i || "{}";
|
|
1925
2589
|
}
|
|
1926
|
-
function
|
|
1927
|
-
var
|
|
1928
|
-
for (i =
|
|
1929
|
-
if (a = i[l], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof
|
|
1930
|
-
if (
|
|
1931
|
-
if (c = e.styleMap[a.tag] || a.defaultStyle,
|
|
1932
|
-
|
|
1933
|
-
else if (
|
|
1934
|
-
|
|
2590
|
+
function Fn(e, n, r) {
|
|
2591
|
+
var t, i, l, o, a, c;
|
|
2592
|
+
for (i = r ? e.explicitTypes : e.implicitTypes, l = 0, o = i.length; l < o; l += 1)
|
|
2593
|
+
if (a = i[l], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof n == "object" && n instanceof a.instanceOf) && (!a.predicate || a.predicate(n))) {
|
|
2594
|
+
if (r ? a.multi && a.representName ? e.tag = a.representName(n) : e.tag = a.tag : e.tag = "?", a.represent) {
|
|
2595
|
+
if (c = e.styleMap[a.tag] || a.defaultStyle, vr.call(a.represent) === "[object Function]")
|
|
2596
|
+
t = a.represent(n, c);
|
|
2597
|
+
else if (br.call(a.represent, c))
|
|
2598
|
+
t = a.represent[c](n, c);
|
|
1935
2599
|
else
|
|
1936
|
-
throw new
|
|
1937
|
-
e.dump =
|
|
2600
|
+
throw new Z("!<" + a.tag + '> tag resolver accepts not "' + c + '" style');
|
|
2601
|
+
e.dump = t;
|
|
1938
2602
|
}
|
|
1939
2603
|
return !0;
|
|
1940
2604
|
}
|
|
1941
2605
|
return !1;
|
|
1942
2606
|
}
|
|
1943
|
-
function
|
|
1944
|
-
e.tag = null, e.dump =
|
|
1945
|
-
var a =
|
|
1946
|
-
|
|
1947
|
-
var
|
|
1948
|
-
if (
|
|
1949
|
-
e.dump = "*ref_" +
|
|
2607
|
+
function ae(e, n, r, t, i, l, o) {
|
|
2608
|
+
e.tag = null, e.dump = r, Fn(e, r, !1) || Fn(e, r, !0);
|
|
2609
|
+
var a = vr.call(e.dump), c = t, s;
|
|
2610
|
+
t && (t = e.flowLevel < 0 || e.flowLevel > n);
|
|
2611
|
+
var u = a === "[object Object]" || a === "[object Array]", x, p;
|
|
2612
|
+
if (u && (x = e.duplicates.indexOf(r), p = x !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && n > 0) && (i = !1), p && e.usedDuplicates[x])
|
|
2613
|
+
e.dump = "*ref_" + x;
|
|
1950
2614
|
else {
|
|
1951
|
-
if (
|
|
1952
|
-
|
|
2615
|
+
if (u && p && !e.usedDuplicates[x] && (e.usedDuplicates[x] = !0), a === "[object Object]")
|
|
2616
|
+
t && Object.keys(e.dump).length !== 0 ? (po(e, n, e.dump, i), p && (e.dump = "&ref_" + x + e.dump)) : (uo(e, n, e.dump), p && (e.dump = "&ref_" + x + " " + e.dump));
|
|
1953
2617
|
else if (a === "[object Array]")
|
|
1954
|
-
|
|
2618
|
+
t && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? jn(e, n - 1, e.dump, i) : jn(e, n, e.dump, i), p && (e.dump = "&ref_" + x + e.dump)) : (fo(e, n, e.dump), p && (e.dump = "&ref_" + x + " " + e.dump));
|
|
1955
2619
|
else if (a === "[object String]")
|
|
1956
|
-
e.tag !== "?" &&
|
|
2620
|
+
e.tag !== "?" && ao(e, e.dump, n, l, c);
|
|
1957
2621
|
else {
|
|
1958
2622
|
if (a === "[object Undefined]")
|
|
1959
2623
|
return !1;
|
|
1960
2624
|
if (e.skipInvalid) return !1;
|
|
1961
|
-
throw new
|
|
2625
|
+
throw new Z("unacceptable kind of an object to dump " + a);
|
|
1962
2626
|
}
|
|
1963
2627
|
e.tag !== null && e.tag !== "?" && (s = encodeURI(
|
|
1964
2628
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -1966,168 +2630,167 @@ function ie(e, r, n, o, i, l, t) {
|
|
|
1966
2630
|
}
|
|
1967
2631
|
return !0;
|
|
1968
2632
|
}
|
|
1969
|
-
function
|
|
1970
|
-
var
|
|
1971
|
-
for (
|
|
1972
|
-
|
|
1973
|
-
|
|
2633
|
+
function ho(e, n) {
|
|
2634
|
+
var r = [], t = [], i, l;
|
|
2635
|
+
for (Je(e, r, t), i = 0, l = t.length; i < l; i += 1)
|
|
2636
|
+
n.duplicates.push(r[t[i]]);
|
|
2637
|
+
n.usedDuplicates = new Array(l);
|
|
1974
2638
|
}
|
|
1975
|
-
function
|
|
1976
|
-
var
|
|
2639
|
+
function Je(e, n, r) {
|
|
2640
|
+
var t, i, l;
|
|
1977
2641
|
if (e !== null && typeof e == "object")
|
|
1978
|
-
if (i =
|
|
1979
|
-
|
|
1980
|
-
else if (
|
|
2642
|
+
if (i = n.indexOf(e), i !== -1)
|
|
2643
|
+
r.indexOf(i) === -1 && r.push(i);
|
|
2644
|
+
else if (n.push(e), Array.isArray(e))
|
|
1981
2645
|
for (i = 0, l = e.length; i < l; i += 1)
|
|
1982
|
-
|
|
2646
|
+
Je(e[i], n, r);
|
|
1983
2647
|
else
|
|
1984
|
-
for (
|
|
1985
|
-
|
|
1986
|
-
}
|
|
1987
|
-
function
|
|
1988
|
-
|
|
1989
|
-
var
|
|
1990
|
-
|
|
1991
|
-
var
|
|
1992
|
-
return
|
|
2648
|
+
for (t = Object.keys(e), i = 0, l = t.length; i < l; i += 1)
|
|
2649
|
+
Je(e[t[i]], n, r);
|
|
2650
|
+
}
|
|
2651
|
+
function xo(e, n) {
|
|
2652
|
+
n = n || {};
|
|
2653
|
+
var r = new ro(n);
|
|
2654
|
+
r.noRefs || ho(e, r);
|
|
2655
|
+
var t = e;
|
|
2656
|
+
return r.replacer && (t = r.replacer.call({ "": t }, "", t)), ae(r, 0, t, !0, !0) ? r.dump + `
|
|
1993
2657
|
` : "";
|
|
1994
2658
|
}
|
|
1995
|
-
var
|
|
1996
|
-
dump:
|
|
2659
|
+
var mo = xo, go = {
|
|
2660
|
+
dump: mo
|
|
1997
2661
|
};
|
|
1998
|
-
function
|
|
2662
|
+
function cn(e, n) {
|
|
1999
2663
|
return function() {
|
|
2000
|
-
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." +
|
|
2664
|
+
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
|
|
2001
2665
|
};
|
|
2002
2666
|
}
|
|
2003
|
-
var
|
|
2004
|
-
binary:
|
|
2005
|
-
float:
|
|
2006
|
-
map:
|
|
2007
|
-
null:
|
|
2008
|
-
pairs:
|
|
2009
|
-
set:
|
|
2010
|
-
timestamp:
|
|
2011
|
-
bool:
|
|
2012
|
-
int:
|
|
2013
|
-
merge:
|
|
2014
|
-
omap:
|
|
2015
|
-
seq:
|
|
2016
|
-
str:
|
|
2017
|
-
},
|
|
2018
|
-
Type:
|
|
2019
|
-
Schema:
|
|
2020
|
-
FAILSAFE_SCHEMA:
|
|
2021
|
-
JSON_SCHEMA:
|
|
2022
|
-
CORE_SCHEMA:
|
|
2023
|
-
DEFAULT_SCHEMA:
|
|
2024
|
-
load:
|
|
2025
|
-
loadAll:
|
|
2026
|
-
dump:
|
|
2027
|
-
YAMLException:
|
|
2028
|
-
types:
|
|
2029
|
-
safeLoad:
|
|
2030
|
-
safeLoadAll:
|
|
2031
|
-
safeDump:
|
|
2667
|
+
var yo = z, vo = Un, bo = qn, Ao = Qn, ko = er, Co = tn, So = yr.load, Eo = yr.loadAll, wo = go.dump, _o = Z, To = {
|
|
2668
|
+
binary: or,
|
|
2669
|
+
float: Jn,
|
|
2670
|
+
map: zn,
|
|
2671
|
+
null: Kn,
|
|
2672
|
+
pairs: ar,
|
|
2673
|
+
set: cr,
|
|
2674
|
+
timestamp: ir,
|
|
2675
|
+
bool: Vn,
|
|
2676
|
+
int: Zn,
|
|
2677
|
+
merge: tr,
|
|
2678
|
+
omap: lr,
|
|
2679
|
+
seq: Gn,
|
|
2680
|
+
str: Xn
|
|
2681
|
+
}, $o = cn("safeLoad", "load"), Oo = cn("safeLoadAll", "loadAll"), jo = cn("safeDump", "dump"), Fo = {
|
|
2682
|
+
Type: yo,
|
|
2683
|
+
Schema: vo,
|
|
2684
|
+
FAILSAFE_SCHEMA: bo,
|
|
2685
|
+
JSON_SCHEMA: Ao,
|
|
2686
|
+
CORE_SCHEMA: ko,
|
|
2687
|
+
DEFAULT_SCHEMA: Co,
|
|
2688
|
+
load: So,
|
|
2689
|
+
loadAll: Eo,
|
|
2690
|
+
dump: wo,
|
|
2691
|
+
YAMLException: _o,
|
|
2692
|
+
types: To,
|
|
2693
|
+
safeLoad: $o,
|
|
2694
|
+
safeLoadAll: Oo,
|
|
2695
|
+
safeDump: jo
|
|
2032
2696
|
};
|
|
2033
|
-
function
|
|
2034
|
-
const
|
|
2035
|
-
return
|
|
2036
|
-
width: parseInt(
|
|
2037
|
-
depth: parseInt(
|
|
2038
|
-
height: parseInt(
|
|
2697
|
+
function Lo(e) {
|
|
2698
|
+
const n = e.match(/^(\d+)x(\d+)x(\d+)$/);
|
|
2699
|
+
return n ? {
|
|
2700
|
+
width: parseInt(n[1], 10),
|
|
2701
|
+
depth: parseInt(n[2], 10),
|
|
2702
|
+
height: parseInt(n[3], 10)
|
|
2039
2703
|
} : null;
|
|
2040
2704
|
}
|
|
2041
|
-
function
|
|
2042
|
-
const
|
|
2043
|
-
return
|
|
2044
|
-
width: parseInt(
|
|
2045
|
-
height: parseInt(
|
|
2705
|
+
function Ln(e) {
|
|
2706
|
+
const n = e.match(/^(\d+)x(\d+)$/);
|
|
2707
|
+
return n ? {
|
|
2708
|
+
width: parseInt(n[1], 10),
|
|
2709
|
+
height: parseInt(n[2], 10)
|
|
2046
2710
|
} : null;
|
|
2047
2711
|
}
|
|
2048
|
-
function
|
|
2049
|
-
const
|
|
2050
|
-
return
|
|
2051
|
-
x: parseInt(
|
|
2052
|
-
y: parseInt(
|
|
2712
|
+
function Ro(e) {
|
|
2713
|
+
const n = e.match(/^(-?\d+),(-?\d+)$/);
|
|
2714
|
+
return n ? {
|
|
2715
|
+
x: parseInt(n[1], 10),
|
|
2716
|
+
y: parseInt(n[2], 10)
|
|
2053
2717
|
} : null;
|
|
2054
2718
|
}
|
|
2055
|
-
function
|
|
2056
|
-
const
|
|
2057
|
-
return
|
|
2058
|
-
name:
|
|
2059
|
-
elevation: parseInt(
|
|
2719
|
+
function Io(e) {
|
|
2720
|
+
const n = e.match(/^(.+?)\s*@\s*(\d+)$/);
|
|
2721
|
+
return n ? {
|
|
2722
|
+
name: n[1].trim(),
|
|
2723
|
+
elevation: parseInt(n[2], 10)
|
|
2060
2724
|
} : null;
|
|
2061
2725
|
}
|
|
2062
|
-
function
|
|
2063
|
-
|
|
2064
|
-
const i = e.match(/\{([^}]+)\}\s*$/);
|
|
2726
|
+
function Mo(e, n, r) {
|
|
2727
|
+
const t = {}, i = e.match(/\{([^}]+)\}\s*$/);
|
|
2065
2728
|
if (i) {
|
|
2066
2729
|
const f = i[1].split(/\s+/);
|
|
2067
2730
|
for (const m of f) {
|
|
2068
|
-
const [
|
|
2069
|
-
if (
|
|
2070
|
-
const
|
|
2071
|
-
|
|
2731
|
+
const [y, A] = m.split("=");
|
|
2732
|
+
if (y && A) {
|
|
2733
|
+
const v = parseFloat(A);
|
|
2734
|
+
t[y] = isNaN(v) ? A : v;
|
|
2072
2735
|
}
|
|
2073
2736
|
}
|
|
2074
2737
|
e = e.replace(/\{[^}]+\}\s*$/, "").trim();
|
|
2075
2738
|
}
|
|
2076
2739
|
const l = e.trim().split(/\s+/);
|
|
2077
2740
|
if (l.length < 4) return null;
|
|
2078
|
-
const
|
|
2079
|
-
if (!
|
|
2080
|
-
const
|
|
2741
|
+
const o = l[0], a = l[1], c = l[2], s = l[3], u = Ro(c), x = Lo(s);
|
|
2742
|
+
if (!u || !x) return null;
|
|
2743
|
+
const p = r[a] || a;
|
|
2081
2744
|
return {
|
|
2082
|
-
tier:
|
|
2083
|
-
label:
|
|
2084
|
-
color:
|
|
2085
|
-
x:
|
|
2086
|
-
y:
|
|
2087
|
-
width:
|
|
2088
|
-
depth:
|
|
2089
|
-
height:
|
|
2090
|
-
...
|
|
2745
|
+
tier: n,
|
|
2746
|
+
label: o,
|
|
2747
|
+
color: p,
|
|
2748
|
+
x: u.x,
|
|
2749
|
+
y: u.y,
|
|
2750
|
+
width: x.width,
|
|
2751
|
+
depth: x.depth,
|
|
2752
|
+
height: x.height,
|
|
2753
|
+
...t
|
|
2091
2754
|
};
|
|
2092
2755
|
}
|
|
2093
|
-
function
|
|
2094
|
-
const
|
|
2095
|
-
let
|
|
2096
|
-
if (typeof
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2099
|
-
} else
|
|
2100
|
-
let
|
|
2101
|
-
if (typeof
|
|
2102
|
-
const
|
|
2103
|
-
|
|
2104
|
-
} else
|
|
2105
|
-
let i = { x:
|
|
2106
|
-
|
|
2756
|
+
function Bo(e) {
|
|
2757
|
+
const n = Fo.load(e);
|
|
2758
|
+
let r = { width: 1100, height: 700 };
|
|
2759
|
+
if (typeof n.canvas == "string") {
|
|
2760
|
+
const p = Ln(n.canvas);
|
|
2761
|
+
p && (r = p);
|
|
2762
|
+
} else n.canvas && typeof n.canvas == "object" && (r = n.canvas);
|
|
2763
|
+
let t = { width: 400, depth: 280 };
|
|
2764
|
+
if (typeof n.floor == "string") {
|
|
2765
|
+
const p = Ln(n.floor);
|
|
2766
|
+
p && (t = { width: p.width, depth: p.height });
|
|
2767
|
+
} else n.floor && typeof n.floor == "object" && (t = n.floor);
|
|
2768
|
+
let i = { x: r.width / 2, y: r.height - 80 };
|
|
2769
|
+
n.origin && typeof n.origin == "object" && (i = n.origin);
|
|
2107
2770
|
const l = {};
|
|
2108
|
-
if (
|
|
2109
|
-
for (const [
|
|
2110
|
-
l[
|
|
2111
|
-
const
|
|
2771
|
+
if (n.colors && typeof n.colors == "object")
|
|
2772
|
+
for (const [p, f] of Object.entries(n.colors))
|
|
2773
|
+
l[p] = f;
|
|
2774
|
+
const o = [], a = {
|
|
2112
2775
|
dark: ["#0f172a", "#1e293b", "#334155", "#475569"],
|
|
2113
2776
|
light: ["#f1f5f9", "#e0f2fe", "#dbeafe", "#ede9fe"]
|
|
2114
2777
|
}, c = {
|
|
2115
2778
|
dark: ["#334155", "#475569", "#64748b", "#94a3b8"],
|
|
2116
2779
|
light: ["#94a3b8", "#7dd3fc", "#93c5fd", "#c4b5fd"]
|
|
2117
|
-
}, s =
|
|
2118
|
-
Array.isArray(
|
|
2119
|
-
if (typeof
|
|
2120
|
-
const m =
|
|
2121
|
-
m &&
|
|
2780
|
+
}, s = n.theme || "dark";
|
|
2781
|
+
Array.isArray(n.tiers) && n.tiers.forEach((p, f) => {
|
|
2782
|
+
if (typeof p == "string") {
|
|
2783
|
+
const m = Io(p);
|
|
2784
|
+
m && o.push({
|
|
2122
2785
|
name: m.name,
|
|
2123
2786
|
elevation: m.elevation,
|
|
2124
2787
|
floorColor: a[s][f] || a[s][0],
|
|
2125
2788
|
floorOpacity: f === 0 ? 0.95 : 0.7 - f * 0.1,
|
|
2126
2789
|
borderColor: c[s][f] || c[s][0]
|
|
2127
2790
|
});
|
|
2128
|
-
} else if (
|
|
2129
|
-
const m =
|
|
2130
|
-
|
|
2791
|
+
} else if (p && typeof p == "object") {
|
|
2792
|
+
const m = p;
|
|
2793
|
+
o.push({
|
|
2131
2794
|
name: m.name || `Tier ${f}`,
|
|
2132
2795
|
elevation: m.elevation || f * 150,
|
|
2133
2796
|
floorColor: m.floorColor || a[s][f],
|
|
@@ -2136,49 +2799,49 @@ function rt(e) {
|
|
|
2136
2799
|
});
|
|
2137
2800
|
}
|
|
2138
2801
|
});
|
|
2139
|
-
const
|
|
2140
|
-
if (
|
|
2141
|
-
const
|
|
2142
|
-
for (const [f, m] of Object.entries(
|
|
2143
|
-
const
|
|
2144
|
-
if (!(isNaN(
|
|
2145
|
-
for (const
|
|
2146
|
-
if (typeof
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2149
|
-
} else if (
|
|
2150
|
-
const
|
|
2151
|
-
|
|
2152
|
-
tier:
|
|
2153
|
-
label:
|
|
2154
|
-
color: l[
|
|
2155
|
-
x:
|
|
2156
|
-
y:
|
|
2157
|
-
width:
|
|
2158
|
-
depth:
|
|
2159
|
-
height:
|
|
2160
|
-
opacity:
|
|
2161
|
-
blur:
|
|
2162
|
-
translucent:
|
|
2802
|
+
const u = [];
|
|
2803
|
+
if (n.nodes && typeof n.nodes == "object" && !Array.isArray(n.nodes)) {
|
|
2804
|
+
const p = n.nodes;
|
|
2805
|
+
for (const [f, m] of Object.entries(p)) {
|
|
2806
|
+
const y = parseInt(f, 10);
|
|
2807
|
+
if (!(isNaN(y) || !Array.isArray(m))) {
|
|
2808
|
+
for (const A of m)
|
|
2809
|
+
if (typeof A == "string") {
|
|
2810
|
+
const v = Mo(A, y, l);
|
|
2811
|
+
v && u.push(v);
|
|
2812
|
+
} else if (A && typeof A == "object") {
|
|
2813
|
+
const v = A;
|
|
2814
|
+
u.push({
|
|
2815
|
+
tier: y,
|
|
2816
|
+
label: v.label || "",
|
|
2817
|
+
color: l[v.color] || v.color || "slate",
|
|
2818
|
+
x: v.x || 0,
|
|
2819
|
+
y: v.y || 0,
|
|
2820
|
+
width: v.width || 100,
|
|
2821
|
+
depth: v.depth || 80,
|
|
2822
|
+
height: v.height || 40,
|
|
2823
|
+
opacity: v.opacity,
|
|
2824
|
+
blur: v.blur,
|
|
2825
|
+
translucent: v.translucent
|
|
2163
2826
|
});
|
|
2164
2827
|
}
|
|
2165
2828
|
}
|
|
2166
2829
|
}
|
|
2167
2830
|
}
|
|
2168
|
-
const
|
|
2169
|
-
if (Array.isArray(
|
|
2170
|
-
for (const
|
|
2171
|
-
if (typeof
|
|
2172
|
-
const f =
|
|
2173
|
-
f &&
|
|
2831
|
+
const x = [];
|
|
2832
|
+
if (Array.isArray(n.pillars)) {
|
|
2833
|
+
for (const p of n.pillars)
|
|
2834
|
+
if (typeof p == "string") {
|
|
2835
|
+
const f = p.match(/^(-?\d+),(-?\d+)\s+(\d+)->(\d+)$/);
|
|
2836
|
+
f && x.push({
|
|
2174
2837
|
x: parseInt(f[1], 10),
|
|
2175
2838
|
y: parseInt(f[2], 10),
|
|
2176
2839
|
fromTier: parseInt(f[3], 10),
|
|
2177
2840
|
toTier: parseInt(f[4], 10)
|
|
2178
2841
|
});
|
|
2179
|
-
} else if (
|
|
2180
|
-
const f =
|
|
2181
|
-
|
|
2842
|
+
} else if (p && typeof p == "object") {
|
|
2843
|
+
const f = p;
|
|
2844
|
+
x.push({
|
|
2182
2845
|
x: f.x || 0,
|
|
2183
2846
|
y: f.y || 0,
|
|
2184
2847
|
fromTier: f.fromTier || 0,
|
|
@@ -2187,53 +2850,54 @@ function rt(e) {
|
|
|
2187
2850
|
}
|
|
2188
2851
|
}
|
|
2189
2852
|
return {
|
|
2190
|
-
title:
|
|
2191
|
-
|
|
2853
|
+
title: n.title || "Untitled",
|
|
2854
|
+
style: n.style || void 0,
|
|
2855
|
+
description: n.description || "",
|
|
2192
2856
|
theme: s,
|
|
2193
|
-
canvas:
|
|
2857
|
+
canvas: r,
|
|
2194
2858
|
origin: i,
|
|
2195
|
-
cornerRadius:
|
|
2196
|
-
tiers:
|
|
2197
|
-
floorSize:
|
|
2198
|
-
nodes:
|
|
2199
|
-
pillars:
|
|
2859
|
+
cornerRadius: n.corner ?? n.cornerRadius ?? 14,
|
|
2860
|
+
tiers: o,
|
|
2861
|
+
floorSize: t,
|
|
2862
|
+
nodes: u,
|
|
2863
|
+
pillars: x.length > 0 ? x : void 0
|
|
2200
2864
|
};
|
|
2201
2865
|
}
|
|
2202
|
-
function
|
|
2203
|
-
const
|
|
2204
|
-
|
|
2205
|
-
const
|
|
2866
|
+
function Wo(e) {
|
|
2867
|
+
const n = [];
|
|
2868
|
+
n.push(`title: ${e.title}`), e.description && n.push(`description: ${e.description}`), n.push(`theme: ${e.theme}`), e.style && e.style !== "solid" && n.push(`style: ${e.style}`), n.push(`canvas: ${e.canvas.width}x${e.canvas.height}`), n.push(`floor: ${e.floorSize.width}x${e.floorSize.depth}`), e.cornerRadius && n.push(`corner: ${e.cornerRadius}`), n.push("");
|
|
2869
|
+
const r = {};
|
|
2206
2870
|
e.nodes.forEach((i) => {
|
|
2207
|
-
|
|
2871
|
+
r[i.color] = (r[i.color] || 0) + 1;
|
|
2208
2872
|
});
|
|
2209
|
-
const
|
|
2210
|
-
return
|
|
2873
|
+
const t = Object.entries(r).filter(([, i]) => i >= 2).map(([i]) => i);
|
|
2874
|
+
return t.length > 0 && (n.push("colors:"), t.forEach((i) => {
|
|
2211
2875
|
const l = i.slice(0, 3);
|
|
2212
|
-
|
|
2213
|
-
}),
|
|
2214
|
-
|
|
2215
|
-
}),
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2876
|
+
n.push(` ${l}: &${l} ${i}`);
|
|
2877
|
+
}), n.push("")), n.push("tiers:"), e.tiers.forEach((i) => {
|
|
2878
|
+
n.push(` - ${i.name} @ ${i.elevation}`);
|
|
2879
|
+
}), n.push(""), n.push("nodes:"), e.tiers.forEach((i, l) => {
|
|
2880
|
+
const o = e.nodes.filter((a) => a.tier === l);
|
|
2881
|
+
o.length !== 0 && (n.push(` ${l}: # ${i.name}`), o.forEach((a) => {
|
|
2218
2882
|
let c = a.color;
|
|
2219
|
-
|
|
2883
|
+
t.includes(a.color) && (c = `*${a.color.slice(0, 3)}`);
|
|
2220
2884
|
const s = [];
|
|
2221
2885
|
a.opacity !== void 0 && s.push(`opacity=${a.opacity}`), a.blur !== void 0 && s.push(`blur=${a.blur}`), a.translucent && s.push("translucent=true");
|
|
2222
|
-
const
|
|
2223
|
-
|
|
2886
|
+
const u = s.length > 0 ? ` { ${s.join(" ")} }` : "", x = `${a.width}x${a.depth}x${a.height}`, p = `${a.x},${a.y}`, f = a.label.padEnd(12), m = c.padEnd(8);
|
|
2887
|
+
n.push(` - ${f} ${m} ${p.padEnd(8)} ${x}${u}`);
|
|
2224
2888
|
}));
|
|
2225
|
-
}), e.pillars && e.pillars.length > 0 && (
|
|
2226
|
-
|
|
2227
|
-
})),
|
|
2889
|
+
}), e.pillars && e.pillars.length > 0 && (n.push(""), n.push("pillars:"), e.pillars.forEach((i) => {
|
|
2890
|
+
n.push(` - ${i.x},${i.y} ${i.fromTier}->${i.toTier}`);
|
|
2891
|
+
})), n.join(`
|
|
2228
2892
|
`);
|
|
2229
2893
|
}
|
|
2230
2894
|
export {
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2895
|
+
Do as ArcDiagram,
|
|
2896
|
+
Wo as configToYaml,
|
|
2897
|
+
Po as getColorShading,
|
|
2898
|
+
he as isoBox,
|
|
2899
|
+
E as isoToScreen,
|
|
2900
|
+
Bo as parseYamlConfig,
|
|
2901
|
+
Yo as renderToElement,
|
|
2902
|
+
ui as renderToString
|
|
2239
2903
|
};
|