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