@processandtools/rp-article-designer 1.0.0 → 1.0.2
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/index.js
CHANGED
|
@@ -1,2571 +1 @@
|
|
|
1
|
-
var Be = Object.defineProperty;
|
|
2
|
-
var He = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var C = (e, t, r) => He(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { jsx as f, jsxs as O, Fragment as pe } from "react/jsx-runtime";
|
|
5
|
-
import { createContext as le, useState as re, useCallback as Ie, useMemo as $, useEffect as Ue, useContext as V, Fragment as Ze } from "react";
|
|
6
|
-
import { Edges as Ke, Text as Ye } from "@react-three/drei";
|
|
7
|
-
const F = le(void 0);
|
|
8
|
-
function We({ data: e, children: t, names: r }) {
|
|
9
|
-
const i = e, [n, s] = re(i), [a, o] = re(null), [l, u] = re(null), h = Ie((S) => ({
|
|
10
|
-
anglElems: n.anglelem.filter((T) => T.NAME === S),
|
|
11
|
-
anglZones: n.anglzone.filter((T) => T.NAME === S),
|
|
12
|
-
anglPrims: n.anglprim.filter((T) => T.NAME === S),
|
|
13
|
-
anglClies: n.anglclie.filter((T) => T.NAME === S),
|
|
14
|
-
anglGrtxs: n.anglgrtx.filter((T) => T.NAME === S)
|
|
15
|
-
}), [n]), { anglElems: m, anglZones: p, anglPrims: E, anglClies: y, anglGrtxs: c } = $(() => r && r.length > 0 ? {
|
|
16
|
-
anglElems: n.anglelem.filter((S) => r.includes(S.NAME)),
|
|
17
|
-
anglZones: n.anglzone.filter((S) => r.includes(S.NAME)),
|
|
18
|
-
anglPrims: n.anglprim.filter((S) => r.includes(S.NAME)),
|
|
19
|
-
anglClies: n.anglclie.filter((S) => r.includes(S.NAME)),
|
|
20
|
-
anglGrtxs: n.anglgrtx.filter((S) => r.includes(S.NAME))
|
|
21
|
-
} : {
|
|
22
|
-
anglElems: n.anglelem,
|
|
23
|
-
anglZones: n.anglzone,
|
|
24
|
-
anglPrims: n.anglprim,
|
|
25
|
-
anglClies: n.anglclie,
|
|
26
|
-
anglGrtxs: n.anglgrtx
|
|
27
|
-
}, [n, r]), D = {
|
|
28
|
-
anglElems: m,
|
|
29
|
-
anglZones: p,
|
|
30
|
-
anglPrims: E,
|
|
31
|
-
anglClies: y,
|
|
32
|
-
anglGrtxs: c,
|
|
33
|
-
selectedElem: a,
|
|
34
|
-
setSelectedElem: o,
|
|
35
|
-
hoveredElem: l,
|
|
36
|
-
setHoveredElem: u,
|
|
37
|
-
updateAnglPrim: (S, T, _) => {
|
|
38
|
-
s((k) => ({
|
|
39
|
-
...k,
|
|
40
|
-
anglprim: k.anglprim.map(
|
|
41
|
-
(w) => w.NAME === S ? { ...w, [T]: _ } : w
|
|
42
|
-
)
|
|
43
|
-
}));
|
|
44
|
-
},
|
|
45
|
-
updateAnglElem: (S, T, _, k) => {
|
|
46
|
-
s((w) => ({
|
|
47
|
-
...w,
|
|
48
|
-
anglelem: w.anglelem.map(
|
|
49
|
-
(b) => b.TREEID === T && b.NAME === S ? { ...b, [_]: k } : b
|
|
50
|
-
)
|
|
51
|
-
}));
|
|
52
|
-
},
|
|
53
|
-
updateAnglZone: (S, T, _, k) => {
|
|
54
|
-
s((w) => ({
|
|
55
|
-
...w,
|
|
56
|
-
anglzone: w.anglzone.map(
|
|
57
|
-
(b) => b.TREEID === T && b.NAME === S ? { ...b, [_]: k } : b
|
|
58
|
-
)
|
|
59
|
-
}));
|
|
60
|
-
},
|
|
61
|
-
updateAnglClie: (S, T, _, k, w) => {
|
|
62
|
-
s((b) => ({
|
|
63
|
-
...b,
|
|
64
|
-
anglclie: b.anglclie.map(
|
|
65
|
-
(L) => L.TREEID === T && L.TAGNAME === _ && L.DATATYPE === w && L.NAME === S ? {
|
|
66
|
-
...L,
|
|
67
|
-
TAGVALUE: k,
|
|
68
|
-
DATE_LASTCHANGE: (/* @__PURE__ */ new Date()).toISOString()
|
|
69
|
-
} : L
|
|
70
|
-
)
|
|
71
|
-
}));
|
|
72
|
-
},
|
|
73
|
-
updateAnglGrtx: (S, T, _, k) => {
|
|
74
|
-
s((w) => ({
|
|
75
|
-
...w,
|
|
76
|
-
anglgrtx: w.anglgrtx.map(
|
|
77
|
-
(b) => b.TREEID === T && b.NUM === _ && b.NAME === S ? {
|
|
78
|
-
...b,
|
|
79
|
-
TEXT: k,
|
|
80
|
-
DATE_LASTCHANGE: (/* @__PURE__ */ new Date()).toISOString()
|
|
81
|
-
} : b
|
|
82
|
-
)
|
|
83
|
-
}));
|
|
84
|
-
},
|
|
85
|
-
// Multi-article support
|
|
86
|
-
getArticleData: h,
|
|
87
|
-
allData: n
|
|
88
|
-
};
|
|
89
|
-
return /* @__PURE__ */ f(F.Provider, { value: D, children: t });
|
|
90
|
-
}
|
|
91
|
-
const _e = le(null);
|
|
92
|
-
function be({ children: e, articleName: t, dimensionOverrides: r }) {
|
|
93
|
-
const i = {
|
|
94
|
-
articleName: t,
|
|
95
|
-
dimensionOverrides: r
|
|
96
|
-
};
|
|
97
|
-
return /* @__PURE__ */ f(_e.Provider, { value: i, children: e });
|
|
98
|
-
}
|
|
99
|
-
const ke = le(void 0);
|
|
100
|
-
var P = /* @__PURE__ */ ((e) => (e[e.Surface = 3] = "Surface", e[e.Material = 4] = "Material", e[e.Numeric = 100] = "Numeric", e[e.Text = 120] = "Text", e))(P || {});
|
|
101
|
-
function me(e) {
|
|
102
|
-
return new Map(e.map((t) => [t.NAME, t]));
|
|
103
|
-
}
|
|
104
|
-
function ce(e, t, r = /* @__PURE__ */ new Set()) {
|
|
105
|
-
const i = t.get(e);
|
|
106
|
-
if (!i) return;
|
|
107
|
-
if (r.has(e)) {
|
|
108
|
-
console.error(`Circular dependency: ${[...r, e].join(" -> ")}`);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const n = i.WERT;
|
|
112
|
-
if (n.startsWith("$") && i.TYP != P.Text) {
|
|
113
|
-
const a = n.slice(1);
|
|
114
|
-
return r.add(e), ce(a, t, r);
|
|
115
|
-
}
|
|
116
|
-
const s = Number(n);
|
|
117
|
-
return isNaN(s) ? n : s;
|
|
118
|
-
}
|
|
119
|
-
function Ae(e, t, r) {
|
|
120
|
-
const i = r.get(e);
|
|
121
|
-
if (!i)
|
|
122
|
-
return console.warn(`Variable ${e} not found`), r;
|
|
123
|
-
const n = new Map(r);
|
|
124
|
-
return n.set(e, { ...i, WERT: String(t) }), n;
|
|
125
|
-
}
|
|
126
|
-
function de(e, t) {
|
|
127
|
-
return e.replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g, (r, i) => {
|
|
128
|
-
const n = ce(i, t);
|
|
129
|
-
return n !== void 0 ? String(n) : r;
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function ge(e) {
|
|
133
|
-
return /\$[A-Za-z_][A-Za-z0-9_]*/g.test(e);
|
|
134
|
-
}
|
|
135
|
-
function Xe(e) {
|
|
136
|
-
const t = e.matchAll(/\$([A-Za-z_][A-Za-z0-9_]*)/g);
|
|
137
|
-
return Array.from(t, (r) => r[1]);
|
|
138
|
-
}
|
|
139
|
-
const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
140
|
-
__proto__: null,
|
|
141
|
-
createVariableTree: me,
|
|
142
|
-
extractVariableNames: Xe,
|
|
143
|
-
getValue: ce,
|
|
144
|
-
hasVariables: ge,
|
|
145
|
-
resolveString: de,
|
|
146
|
-
setValue: Ae
|
|
147
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
148
|
-
function je({ children: e, imosVariables: t }) {
|
|
149
|
-
const [r, i] = re(() => me(t));
|
|
150
|
-
Ue(() => {
|
|
151
|
-
i(me(t));
|
|
152
|
-
}, [t]);
|
|
153
|
-
const n = Ie((a, o) => {
|
|
154
|
-
i((l) => Ae(a, o, l));
|
|
155
|
-
}, []), s = { tree: r, setValue: n };
|
|
156
|
-
return /* @__PURE__ */ f(ke.Provider, { value: s, children: e });
|
|
157
|
-
}
|
|
158
|
-
const De = le(null), Ne = (e) => {
|
|
159
|
-
const t = Number(e);
|
|
160
|
-
return isNaN(t) ? null : t;
|
|
161
|
-
}, Y = (e) => e == null ? "" : String(e), z = (e, t, r) => {
|
|
162
|
-
const i = Ne(e), n = Ne(t);
|
|
163
|
-
return i === null || n === null ? !1 : r(i, n);
|
|
164
|
-
}, K = (e, t, r) => e == null || t == null ? !1 : r(Y(e), Y(t)), qe = {
|
|
165
|
-
// Equality
|
|
166
|
-
"=": (e, t) => e == null || t == null ? e === t : Y(e).trim() === Y(t).trim(),
|
|
167
|
-
"!=": (e, t) => e == null || t == null ? e !== t : Y(e).trim() !== Y(t).trim(),
|
|
168
|
-
// Numeric comparisons - all use compareNumbers helper
|
|
169
|
-
">": (e, t) => z(e, t, (r, i) => r > i),
|
|
170
|
-
"<": (e, t) => z(e, t, (r, i) => r < i),
|
|
171
|
-
">=": (e, t) => z(e, t, (r, i) => r >= i),
|
|
172
|
-
"<=": (e, t) => z(e, t, (r, i) => r <= i),
|
|
173
|
-
// HTML entity versions - reuse same logic
|
|
174
|
-
">": (e, t) => z(e, t, (r, i) => r > i),
|
|
175
|
-
">=": (e, t) => z(e, t, (r, i) => r >= i),
|
|
176
|
-
"<": (e, t) => z(e, t, (r, i) => r < i),
|
|
177
|
-
"<=": (e, t) => z(e, t, (r, i) => r <= i),
|
|
178
|
-
// String operations - all use compareStrings helper
|
|
179
|
-
B: (e, t) => K(e, t, (r, i) => r.startsWith(i)),
|
|
180
|
-
"!B": (e, t) => K(e, t, (r, i) => !r.startsWith(i)),
|
|
181
|
-
E: (e, t) => K(e, t, (r, i) => r.endsWith(i)),
|
|
182
|
-
"!E": (e, t) => K(e, t, (r, i) => !r.endsWith(i)),
|
|
183
|
-
C: (e, t) => K(e, t, (r, i) => r.includes(i)),
|
|
184
|
-
"!C": (e, t) => K(e, t, (r, i) => !r.includes(i))
|
|
185
|
-
}, Je = {
|
|
186
|
-
"Zusatzfilter 3": "filter3",
|
|
187
|
-
"Zusatzfilter 4": "filter4"
|
|
188
|
-
// Add more mappings as needed
|
|
189
|
-
};
|
|
190
|
-
function we(e, t = {}) {
|
|
191
|
-
const { variableTree: r, dataType: i, silent: n = !1, allowFunctions: s = !0 } = t, a = /^(.+?)\s*(mm|cm|m|in|ft|px|pt|%|deg|rad)$/i, o = {
|
|
192
|
-
value: void 0,
|
|
193
|
-
original: e,
|
|
194
|
-
resolved: e,
|
|
195
|
-
hadVariables: !1,
|
|
196
|
-
wasEvaluated: !1
|
|
197
|
-
};
|
|
198
|
-
try {
|
|
199
|
-
let l = e.trim(), u;
|
|
200
|
-
if (a.test(l)) {
|
|
201
|
-
const h = l.match(a);
|
|
202
|
-
h && (l = h[1].trim(), u = h[2]);
|
|
203
|
-
}
|
|
204
|
-
r && ge(l) && (o.hadVariables = !0, l = de(l, r), o.resolved = l), Ce(l) ? (o.wasEvaluated = !0, o.value = Le(l, s)) : Ee(l) ? (o.wasEvaluated = !0, o.value = Se(l, s)) : o.value = et(l, i);
|
|
205
|
-
} catch (l) {
|
|
206
|
-
o.error = l instanceof Error ? l.message : String(l), n || console.error(`[ExpressionResolver] Failed to resolve: "${e}"`, l), o.value = e;
|
|
207
|
-
}
|
|
208
|
-
return o;
|
|
209
|
-
}
|
|
210
|
-
function se(e, t = {}) {
|
|
211
|
-
return we(e, t).value;
|
|
212
|
-
}
|
|
213
|
-
function Ce(e) {
|
|
214
|
-
return !e || typeof e != "string" ? !1 : /^\s*IF\s*\(/i.test(e.trim());
|
|
215
|
-
}
|
|
216
|
-
function Le(e, t = !0) {
|
|
217
|
-
const i = e.trim().match(/^IF\s*\((.*)\)\s*$/i);
|
|
218
|
-
if (!i)
|
|
219
|
-
throw new Error(`Invalid IF statement: ${e}`);
|
|
220
|
-
const n = i[1], s = Qe(n);
|
|
221
|
-
if (s.length !== 3)
|
|
222
|
-
throw new Error(`IF statement must have exactly 3 parts: IF(condition, trueValue, falseValue). Got: ${s.length} parts`);
|
|
223
|
-
const [a, o, l] = s, h = ie(a.trim(), t) ? o.trim() : l.trim();
|
|
224
|
-
if (Ce(h))
|
|
225
|
-
return Le(h, t);
|
|
226
|
-
if (Ee(h))
|
|
227
|
-
return Se(h, t);
|
|
228
|
-
{
|
|
229
|
-
const m = Number(h);
|
|
230
|
-
return isNaN(m) ? h : m;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
function Qe(e) {
|
|
234
|
-
const t = [];
|
|
235
|
-
let r = "", i = 0;
|
|
236
|
-
for (let n = 0; n < e.length; n++) {
|
|
237
|
-
const s = e[n];
|
|
238
|
-
s === "(" ? (i++, r += s) : s === ")" ? (i--, r += s) : s === "," && i === 0 ? (t.push(r), r = "") : r += s;
|
|
239
|
-
}
|
|
240
|
-
return r && t.push(r), t;
|
|
241
|
-
}
|
|
242
|
-
function ie(e, t) {
|
|
243
|
-
if (/\bAND\b/i.test(e))
|
|
244
|
-
return e.split(/\bAND\b/i).every((u) => ie(u.trim(), t));
|
|
245
|
-
if (/\bOR\b/i.test(e))
|
|
246
|
-
return e.split(/\bOR\b/i).some((u) => ie(u.trim(), t));
|
|
247
|
-
if (/^\s*NOT\s+/i.test(e)) {
|
|
248
|
-
const l = e.replace(/^\s*NOT\s+/i, "").trim();
|
|
249
|
-
return !ie(l, t);
|
|
250
|
-
}
|
|
251
|
-
const r = e.match(/(.+?)(<=|>=|!=|<>|=|<|>)(.+)/);
|
|
252
|
-
if (!r)
|
|
253
|
-
throw new Error(`Invalid condition: ${e}`);
|
|
254
|
-
const [, i, n, s] = r, a = Te(i.trim(), t), o = Te(s.trim(), t);
|
|
255
|
-
switch (n) {
|
|
256
|
-
case "=":
|
|
257
|
-
return a === o;
|
|
258
|
-
case "!=":
|
|
259
|
-
case "<>":
|
|
260
|
-
return a !== o;
|
|
261
|
-
case "<":
|
|
262
|
-
return a < o;
|
|
263
|
-
case ">":
|
|
264
|
-
return a > o;
|
|
265
|
-
case "<=":
|
|
266
|
-
return a <= o;
|
|
267
|
-
case ">=":
|
|
268
|
-
return a >= o;
|
|
269
|
-
default:
|
|
270
|
-
throw new Error(`Unknown operator: ${n}`);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
function Te(e, t) {
|
|
274
|
-
if (e.startsWith('"') && e.endsWith('"') || e.startsWith("'") && e.endsWith("'"))
|
|
275
|
-
return e.slice(1, -1);
|
|
276
|
-
if (Ee(e))
|
|
277
|
-
return Se(e, t);
|
|
278
|
-
const r = Number(e);
|
|
279
|
-
return isNaN(r) ? e : r;
|
|
280
|
-
}
|
|
281
|
-
function Ee(e) {
|
|
282
|
-
if (!e || typeof e != "string") return !1;
|
|
283
|
-
const t = e.trim();
|
|
284
|
-
return /[+\-*/()]/.test(t) ? /^[\d\s+\-*/().,a-z]+$/i.test(t) : !1;
|
|
285
|
-
}
|
|
286
|
-
const he = /* @__PURE__ */ new Map();
|
|
287
|
-
function Se(e, t = !0) {
|
|
288
|
-
const r = e.trim(), i = `${r}:${t}`;
|
|
289
|
-
if (he.has(i))
|
|
290
|
-
return he.get(i);
|
|
291
|
-
let n = r.replace(/\s+/g, "");
|
|
292
|
-
if (t && (n = n.replace(/round\(/g, "Math.round(").replace(/floor\(/g, "Math.floor(").replace(/ceil\(/g, "Math.ceil(").replace(/abs\(/g, "Math.abs(").replace(/min\(/g, "Math.min(").replace(/max\(/g, "Math.max(").replace(/pow\(/g, "Math.pow(").replace(/sqrt\(/g, "Math.sqrt(")), !(t ? /^[\d+\-*/().,a-zA-Z]+$/ : /^[\d+\-*/().]+$/).test(n))
|
|
293
|
-
throw new Error(`Expression contains invalid characters: ${e}`);
|
|
294
|
-
if (!n)
|
|
295
|
-
throw new Error("Empty expression");
|
|
296
|
-
try {
|
|
297
|
-
const a = Function(`'use strict'; return (${n})`)();
|
|
298
|
-
if (typeof a != "number" || isNaN(a))
|
|
299
|
-
throw new Error(`Expression did not evaluate to a number: ${e}`);
|
|
300
|
-
return he.set(i, a), a;
|
|
301
|
-
} catch (a) {
|
|
302
|
-
throw new Error(`Failed to evaluate expression: ${e} - ${a}`);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
function et(e, t) {
|
|
306
|
-
if (!t) {
|
|
307
|
-
const r = Number(e);
|
|
308
|
-
return isNaN(r) ? e : r;
|
|
309
|
-
}
|
|
310
|
-
switch (t.toUpperCase()) {
|
|
311
|
-
case "FL":
|
|
312
|
-
return parseFloat(e);
|
|
313
|
-
case "IN":
|
|
314
|
-
return parseInt(e, 10);
|
|
315
|
-
case "CI":
|
|
316
|
-
case "CS":
|
|
317
|
-
case "ST":
|
|
318
|
-
return e;
|
|
319
|
-
case "DA":
|
|
320
|
-
return new Date(e).toISOString();
|
|
321
|
-
default:
|
|
322
|
-
const r = Number(e);
|
|
323
|
-
return isNaN(r) ? e : r;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
const tt = (e) => Je[e] || e, W = class W {
|
|
327
|
-
};
|
|
328
|
-
C(W, "evaluateTree", (t, r, i) => t ? t.roots.every((n) => W.evaluateNode(n, r, i)) : !1), C(W, "evaluateNode", (t, r, i) => {
|
|
329
|
-
if (!t) return !1;
|
|
330
|
-
if (t.kind === "comparison") {
|
|
331
|
-
let n = t.data.LEFTVALUE;
|
|
332
|
-
const s = tt(t.data.LEFTVALUE);
|
|
333
|
-
r[s] !== void 0 ? n = r[s] : n = se(t.data.LEFTVALUE, { variableTree: i, dataType: t.data.DATATYPE, silent: !0 });
|
|
334
|
-
const a = se(t.data.RIGHTVALUE, { variableTree: i, dataType: t.data.DATATYPE, silent: !0 });
|
|
335
|
-
return qe[t.data.COMPARISONTYPE](n, a);
|
|
336
|
-
}
|
|
337
|
-
if (t.kind === "operation") {
|
|
338
|
-
const n = t.children.map((s) => W.evaluateNode(s, r, i));
|
|
339
|
-
switch (t.data.OPSTRING) {
|
|
340
|
-
case "AND":
|
|
341
|
-
return n.every(Boolean);
|
|
342
|
-
case "OR":
|
|
343
|
-
return n.some(Boolean);
|
|
344
|
-
case "NOT":
|
|
345
|
-
return !n.every(Boolean);
|
|
346
|
-
case "NOT OR":
|
|
347
|
-
return !n.some(Boolean);
|
|
348
|
-
default:
|
|
349
|
-
return !1;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
return !1;
|
|
353
|
-
});
|
|
354
|
-
let ae = W;
|
|
355
|
-
class Me {
|
|
356
|
-
static evaluate(t, r, i) {
|
|
357
|
-
const n = t.nodes.find((s) => s.conditionId === 0 || s.conditionTree === null);
|
|
358
|
-
for (const s of t.nodes) {
|
|
359
|
-
if (s.conditionId === 0 || s.conditionTree === null) continue;
|
|
360
|
-
if (ae.evaluateTree(s.conditionTree, r, i))
|
|
361
|
-
return {
|
|
362
|
-
lindiv: s.lindiv,
|
|
363
|
-
nodeNum: s.nodeNum,
|
|
364
|
-
matched: !0,
|
|
365
|
-
isDefault: !1,
|
|
366
|
-
descriptorType: t.descriptor.DESC_TYPE
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
if (n)
|
|
370
|
-
return {
|
|
371
|
-
lindiv: n.lindiv,
|
|
372
|
-
nodeNum: n.nodeNum,
|
|
373
|
-
matched: !1,
|
|
374
|
-
isDefault: !0,
|
|
375
|
-
descriptorType: t.descriptor.DESC_TYPE
|
|
376
|
-
};
|
|
377
|
-
throw new Error("No matching node found and no default node exists");
|
|
378
|
-
}
|
|
379
|
-
static findAllNonDefaultMatches(t, r, i) {
|
|
380
|
-
const n = [];
|
|
381
|
-
for (const s of t.nodes) {
|
|
382
|
-
if (s.conditionId === 0 || s.conditionTree === null) continue;
|
|
383
|
-
ae.evaluateTree(s.conditionTree, r, i) && n.push(s);
|
|
384
|
-
}
|
|
385
|
-
return n;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
class rt {
|
|
389
|
-
constructor(t, r) {
|
|
390
|
-
C(this, "descriptors");
|
|
391
|
-
C(this, "variableTree");
|
|
392
|
-
this.descriptors = new Map(
|
|
393
|
-
t.map((i) => [i.descriptor.NAME, i])
|
|
394
|
-
), this.variableTree = r;
|
|
395
|
-
}
|
|
396
|
-
evaluate(t, r) {
|
|
397
|
-
const i = this.getDescriptor(t);
|
|
398
|
-
if (!i)
|
|
399
|
-
throw new Error(`Descriptor not found: ${t}`);
|
|
400
|
-
return Me.evaluate(i, r, this.variableTree);
|
|
401
|
-
}
|
|
402
|
-
getDescriptor(t) {
|
|
403
|
-
return this.descriptors.get(t);
|
|
404
|
-
}
|
|
405
|
-
hasDescriptor(t) {
|
|
406
|
-
return this.descriptors.has(t);
|
|
407
|
-
}
|
|
408
|
-
getDescriptorNames() {
|
|
409
|
-
return Array.from(this.descriptors.keys());
|
|
410
|
-
}
|
|
411
|
-
getDescriptorsByType(t) {
|
|
412
|
-
return Array.from(this.descriptors.values()).filter(
|
|
413
|
-
(r) => r.descriptor.DESC_TYPE === t
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
findAllMatches(t, r) {
|
|
417
|
-
const i = this.getDescriptor(t);
|
|
418
|
-
if (!i)
|
|
419
|
-
throw new Error(`Descriptor not found: ${t}`);
|
|
420
|
-
return Me.findAllNonDefaultMatches(i, r, this.variableTree);
|
|
421
|
-
}
|
|
422
|
-
getStats() {
|
|
423
|
-
const t = {};
|
|
424
|
-
for (const r of this.descriptors.values()) {
|
|
425
|
-
const i = r.descriptor.DESC_TYPE;
|
|
426
|
-
t[i] = (t[i] || 0) + 1;
|
|
427
|
-
}
|
|
428
|
-
return {
|
|
429
|
-
total: this.descriptors.size,
|
|
430
|
-
byType: t,
|
|
431
|
-
names: this.getDescriptorNames()
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
function j() {
|
|
436
|
-
const e = V(ke);
|
|
437
|
-
if (!e)
|
|
438
|
-
throw new Error("useVariables must be used within a VariableProvider");
|
|
439
|
-
const { tree: t, setValue: r } = e, i = $(() => (a) => ce(a, t), [t]), n = $(() => (a) => de(a, t), [t]), s = $(() => (a) => ge(a), []);
|
|
440
|
-
return {
|
|
441
|
-
tree: t,
|
|
442
|
-
// Variable tree
|
|
443
|
-
getValue: i,
|
|
444
|
-
// Get variable value
|
|
445
|
-
resolveString: n,
|
|
446
|
-
// Resolve string with variables
|
|
447
|
-
hasVariables: s,
|
|
448
|
-
// Check if string has variables
|
|
449
|
-
setValue: r
|
|
450
|
-
// Set variable value (updates tree state)
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
function it({ children: e, descriptorData: t }) {
|
|
454
|
-
const r = j(), i = $(() => new rt(
|
|
455
|
-
t,
|
|
456
|
-
r.tree
|
|
457
|
-
), [t, r]);
|
|
458
|
-
return /* @__PURE__ */ f(De.Provider, { value: i, children: e });
|
|
459
|
-
}
|
|
460
|
-
var x = /* @__PURE__ */ ((e) => (e._2D_TOP = "2D_TOP", e._2D_FRONT = "2D_FRONT", e._3D = "3D", e))(x || {});
|
|
461
|
-
const fe = 0, nt = 1, Oe = (e) => e + ".0", Pe = (e) => e + ".1", Ve = (e) => e + ".2", Re = (e) => e + ".3", ve = (e) => e.substring(0, e.lastIndexOf(".")), st = (e) => {
|
|
462
|
-
const t = ve(e), i = ($e(e) + 3) % 4;
|
|
463
|
-
return `${t}.${i}`;
|
|
464
|
-
}, at = (e) => {
|
|
465
|
-
const t = ve(e), i = ($e(e) + 1) % 4;
|
|
466
|
-
return `${t}.${i}`;
|
|
467
|
-
}, $e = (e) => parseInt(e.substring(e.lastIndexOf(".") + 1)), X = {
|
|
468
|
-
IAC_THICKNESS: "IAC_THICKNESS",
|
|
469
|
-
// sides and dividers (shelf / partitions)
|
|
470
|
-
IAC_BOTTOMSHELFTHICKNESS: "IAC_BOTTOMSHELFTHICKNESS",
|
|
471
|
-
// for bottom shelf
|
|
472
|
-
IAC_TOPSHELFTHICKNESS: "IAC_TOPSHELFTHICKNESS"
|
|
473
|
-
// for top shelf
|
|
474
|
-
}, v = 1;
|
|
475
|
-
function Q() {
|
|
476
|
-
const e = V(F);
|
|
477
|
-
if (e === void 0)
|
|
478
|
-
throw new Error("useData must be used within a DataProvider");
|
|
479
|
-
return e;
|
|
480
|
-
}
|
|
481
|
-
function ee() {
|
|
482
|
-
const e = V(_e);
|
|
483
|
-
if (!e)
|
|
484
|
-
throw new Error("useArticle must be used within an ArticleProvider");
|
|
485
|
-
return e;
|
|
486
|
-
}
|
|
487
|
-
function ne(e, t, r) {
|
|
488
|
-
const { getArticleData: i } = Q(), { articleName: n } = ee(), { anglClies: s } = i(n), a = s.find((l) => l.TREEID === e && l.DATATYPE === r && l.TAGNAME === t);
|
|
489
|
-
return a ? {
|
|
490
|
-
thickness: Number(a.TAGVALUE)
|
|
491
|
-
} : null;
|
|
492
|
-
}
|
|
493
|
-
function ot(e) {
|
|
494
|
-
const { getArticleData: t } = Q(), { resolveString: r } = j(), { articleName: i } = ee(), n = t(i).anglGrtxs;
|
|
495
|
-
if (!n) return null;
|
|
496
|
-
const s = n.filter((o) => o.TREEID === e), a = /* @__PURE__ */ new Map();
|
|
497
|
-
return s.map((o) => a.set(`AD zone info0${o.NUM + 1}`, r(o.TEXT))), {
|
|
498
|
-
zoneInfo: a
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
function ue(e) {
|
|
502
|
-
const { getArticleData: t } = Q(), { articleName: r } = ee(), { anglZones: i } = t(r), n = i.find((a) => a.TREEID === e), s = i.filter((a) => a.TREEID.substring(0, a.TREEID.lastIndexOf(".")) === e);
|
|
503
|
-
return s.sort((a, o) => a.TREEID.localeCompare(o.TREEID, void 0, { numeric: !0 })), n ? {
|
|
504
|
-
// Zone data
|
|
505
|
-
currentZone: n,
|
|
506
|
-
children: s,
|
|
507
|
-
// Shelf properties
|
|
508
|
-
get topShelfCP() {
|
|
509
|
-
return n?.TOPSHELF;
|
|
510
|
-
},
|
|
511
|
-
get bottomShelfCP() {
|
|
512
|
-
return n?.BOTSHELF;
|
|
513
|
-
},
|
|
514
|
-
zoneInfo() {
|
|
515
|
-
return ot(e)?.zoneInfo;
|
|
516
|
-
},
|
|
517
|
-
// Thickness calculations
|
|
518
|
-
getClieThk(a, o) {
|
|
519
|
-
return this.topShelfCP === "" ? 0 : ne(a, o, nt)?.thickness || 0;
|
|
520
|
-
},
|
|
521
|
-
get topShelfThk() {
|
|
522
|
-
return this.getClieThk(e, X.IAC_TOPSHELFTHICKNESS);
|
|
523
|
-
},
|
|
524
|
-
get bottomShelfThk() {
|
|
525
|
-
return this.getClieThk(e, X.IAC_BOTTOMSHELFTHICKNESS);
|
|
526
|
-
},
|
|
527
|
-
get dividerThk() {
|
|
528
|
-
return this.getClieThk(e, X.IAC_THICKNESS);
|
|
529
|
-
}
|
|
530
|
-
} : null;
|
|
531
|
-
}
|
|
532
|
-
function te(e) {
|
|
533
|
-
const { getArticleData: t } = Q(), { articleName: r } = ee(), { resolveString: i } = j(), { anglElems: n } = t(r), s = n.find((M) => M.TREEID === e), a = ve(e), o = ue(a);
|
|
534
|
-
if (!s) return null;
|
|
535
|
-
const l = s.CPNAME === "" ? 0 : ne(e, X.IAC_THICKNESS, fe)?.thickness || 0, u = ne(at(e), X.IAC_THICKNESS, fe)?.thickness || 0, h = ne(st(e), X.IAC_THICKNESS, fe)?.thickness || 0, m = s.CPNAME === "" ? 0 : s.INSETFOR !== "" ? se(i(s.INSETFOR)) : Number(s.INSET), p = (typeof m == "string" ? 0 : m) || 0, E = s.MANINFO || "black", y = s.CPNAME, c = o?.topShelfThk || 0, d = o?.bottomShelfThk || 0, g = {
|
|
536
|
-
start: Number(s.STARTOFFS) || 0,
|
|
537
|
-
end: Number(s.ENDOFFS) || 0,
|
|
538
|
-
top: Number(s.TOPOFFS) || 0,
|
|
539
|
-
bottom: Number(s.BOTOFFS) || 0
|
|
540
|
-
}, I = {
|
|
541
|
-
start: s.STARTTRIM,
|
|
542
|
-
end: s.ENDTRIM,
|
|
543
|
-
top: s.TOPTRIM,
|
|
544
|
-
bottom: s.BOTTRIM
|
|
545
|
-
}, N = {
|
|
546
|
-
top: I.top === "S" ? c : 0,
|
|
547
|
-
bottom: I.bottom === "S" ? d : 0
|
|
548
|
-
};
|
|
549
|
-
return {
|
|
550
|
-
TREEID: e,
|
|
551
|
-
thk: l,
|
|
552
|
-
nxtThk: u,
|
|
553
|
-
prvThk: h,
|
|
554
|
-
inset: p,
|
|
555
|
-
color: E,
|
|
556
|
-
CPNAME: y,
|
|
557
|
-
topThk: c,
|
|
558
|
-
bottomThk: d,
|
|
559
|
-
oversize: g,
|
|
560
|
-
trim: I,
|
|
561
|
-
elmTrimThk: N
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
var A = class extends Error {
|
|
565
|
-
constructor(e) {
|
|
566
|
-
super(`Evaluation Error: ${e}`), this.name = "EvaluationError";
|
|
567
|
-
}
|
|
568
|
-
}, H, lt = (H = class {
|
|
569
|
-
constructor() {
|
|
570
|
-
C(this, "cache", /* @__PURE__ */ new Map());
|
|
571
|
-
C(this, "source", "");
|
|
572
|
-
C(this, "tokens", []);
|
|
573
|
-
C(this, "start", 0);
|
|
574
|
-
C(this, "current", 0);
|
|
575
|
-
C(this, "errors", []);
|
|
576
|
-
}
|
|
577
|
-
reportError(t) {
|
|
578
|
-
this.errors.push(t);
|
|
579
|
-
}
|
|
580
|
-
scan(t) {
|
|
581
|
-
if (this.cache.has(t)) {
|
|
582
|
-
const r = this.cache.get(t);
|
|
583
|
-
return this.cache.delete(t), this.cache.set(t, r), r;
|
|
584
|
-
}
|
|
585
|
-
try {
|
|
586
|
-
this.source = t;
|
|
587
|
-
const r = this.preformScan();
|
|
588
|
-
if (this.cache.set(this.source, r), this.cache.size > 3) {
|
|
589
|
-
const i = this.cache.keys().next().value;
|
|
590
|
-
this.cache.delete(i);
|
|
591
|
-
}
|
|
592
|
-
return r;
|
|
593
|
-
} catch (r) {
|
|
594
|
-
throw console.error(r), new Error(r instanceof Error ? r.message : String(r));
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
preformScan() {
|
|
598
|
-
this.resetState();
|
|
599
|
-
try {
|
|
600
|
-
if (this.source.includes("<") || this.source.includes(">"))
|
|
601
|
-
throw new Error("Angle brackets are not allowed in the input string");
|
|
602
|
-
if (this.source.length === 0)
|
|
603
|
-
throw new Error("Empty input string");
|
|
604
|
-
for (this.start = 0, this.current = 0, this.tokens = [], this.start === 0 && this.addToken("LEFT_ANGLE_BRACKET", "<"); !this.isAtEnd(); ) {
|
|
605
|
-
this.start = this.current;
|
|
606
|
-
const t = this.peek();
|
|
607
|
-
switch (t) {
|
|
608
|
-
case ":":
|
|
609
|
-
this.addToken("RIGHT_ANGLE_BRACKET", ">"), this.addToken("LEFT_ANGLE_BRACKET", "<"), this.advance();
|
|
610
|
-
break;
|
|
611
|
-
case " ":
|
|
612
|
-
case "\r":
|
|
613
|
-
case " ":
|
|
614
|
-
case `
|
|
615
|
-
`:
|
|
616
|
-
this.advance();
|
|
617
|
-
break;
|
|
618
|
-
case "0":
|
|
619
|
-
case "1":
|
|
620
|
-
case "2":
|
|
621
|
-
case "3":
|
|
622
|
-
case "4":
|
|
623
|
-
case "5":
|
|
624
|
-
case "6":
|
|
625
|
-
case "7":
|
|
626
|
-
case "8":
|
|
627
|
-
case "9":
|
|
628
|
-
case ".":
|
|
629
|
-
this.scanNumber();
|
|
630
|
-
break;
|
|
631
|
-
case "$":
|
|
632
|
-
this.scanVariable();
|
|
633
|
-
break;
|
|
634
|
-
case "+":
|
|
635
|
-
case "-":
|
|
636
|
-
case "*":
|
|
637
|
-
case "/":
|
|
638
|
-
this.addToken("OPERATOR", t), this.advance();
|
|
639
|
-
break;
|
|
640
|
-
case "(":
|
|
641
|
-
this.addToken("PAREN_OPEN", "("), this.advance();
|
|
642
|
-
break;
|
|
643
|
-
case ")":
|
|
644
|
-
this.addToken("PAREN_CLOSE", ")"), this.advance();
|
|
645
|
-
break;
|
|
646
|
-
case "{":
|
|
647
|
-
this.current != 0 && this.tokens[this.tokens.length - 1].type != "OPERATOR" && this.addToken("OPERATOR", "*"), this.addToken("BRACE_OPEN", "{"), this.addToken("LEFT_ANGLE_BRACKET", "<"), this.advance();
|
|
648
|
-
break;
|
|
649
|
-
case "}":
|
|
650
|
-
this.addToken("RIGHT_ANGLE_BRACKET", ">"), this.addToken("BRACE_CLOSE", "}"), this.advance();
|
|
651
|
-
break;
|
|
652
|
-
case "[":
|
|
653
|
-
this.addToken("OPERATOR", "~"), this.addToken("BRACKET_OPEN", "["), this.advance();
|
|
654
|
-
break;
|
|
655
|
-
case "]":
|
|
656
|
-
this.addToken("BRACKET_CLOSE", "]"), this.advance();
|
|
657
|
-
break;
|
|
658
|
-
case "m":
|
|
659
|
-
this.peekNext() === "m" ? this.scanMm() : this.scanIdentifierOrFunction();
|
|
660
|
-
break;
|
|
661
|
-
default:
|
|
662
|
-
this.isAlpha(t) ? this.scanIdentifierOrFunction() : this.reportError(
|
|
663
|
-
`Unexpected character: ${t} at position: ${this.current}`
|
|
664
|
-
);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
if (this.addToken("RIGHT_ANGLE_BRACKET", ">"), this.addToken("EOF", ""), this.errors.length > 0)
|
|
668
|
-
throw new Error(this.errors.join(`,
|
|
669
|
-
`));
|
|
670
|
-
return this.tokens;
|
|
671
|
-
} catch (t) {
|
|
672
|
-
throw new Error(t instanceof Error ? t.message : String(t));
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
isAtEnd() {
|
|
676
|
-
return this.current >= this.source.length;
|
|
677
|
-
}
|
|
678
|
-
advance() {
|
|
679
|
-
return this.source.charAt(this.current++);
|
|
680
|
-
}
|
|
681
|
-
peek() {
|
|
682
|
-
return this.isAtEnd() ? "\0" : this.source.charAt(this.current);
|
|
683
|
-
}
|
|
684
|
-
peekNext() {
|
|
685
|
-
return this.current + 1 >= this.source.length ? "\0" : this.source.charAt(this.current + 1);
|
|
686
|
-
}
|
|
687
|
-
addToken(t, r) {
|
|
688
|
-
this.tokens.push({
|
|
689
|
-
type: t,
|
|
690
|
-
lexeme: r || (t ? this.source.substring(this.start, this.current) : ""),
|
|
691
|
-
position: this.start
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
|
-
isDigit(t) {
|
|
695
|
-
return /^[0-9]$/.test(t);
|
|
696
|
-
}
|
|
697
|
-
isAlpha(t) {
|
|
698
|
-
return /^[a-zA-Z]$/.test(t);
|
|
699
|
-
}
|
|
700
|
-
scanNumber() {
|
|
701
|
-
for (; this.isDigit(this.peek()); )
|
|
702
|
-
this.advance();
|
|
703
|
-
if (this.peek() === ".")
|
|
704
|
-
for (this.advance(), this.isDigit(this.peek()) || this.reportError(
|
|
705
|
-
"Expected digit after decimal point at position: " + this.current
|
|
706
|
-
); this.isDigit(this.peek()); )
|
|
707
|
-
this.advance();
|
|
708
|
-
this.addToken(
|
|
709
|
-
"NUMBER"
|
|
710
|
-
/* NUMBER */
|
|
711
|
-
);
|
|
712
|
-
}
|
|
713
|
-
scanVariable() {
|
|
714
|
-
for (this.advance(); /[a-zA-Z0-9_]/.test(this.peek()); )
|
|
715
|
-
this.advance();
|
|
716
|
-
const t = this.source.substring(this.start + 1, this.current);
|
|
717
|
-
if (t.endsWith("mm")) {
|
|
718
|
-
const r = t.substring(0, t.length - 2);
|
|
719
|
-
r && r.length > 0 ? (this.addToken("VARIABLE", r), this.addToken("UNIT", "mm")) : this.reportError("Variable name cannot be empty or $mm");
|
|
720
|
-
} else
|
|
721
|
-
this.addToken("VARIABLE", t);
|
|
722
|
-
}
|
|
723
|
-
scanMm() {
|
|
724
|
-
this.advance(), this.advance(), this.addToken("UNIT", "mm");
|
|
725
|
-
}
|
|
726
|
-
scanIdentifierOrFunction() {
|
|
727
|
-
const t = ["X", "Y", "n"];
|
|
728
|
-
for (; this.isAlpha(this.peek()); )
|
|
729
|
-
this.advance();
|
|
730
|
-
const r = this.source.substring(this.start, this.current), i = H.MATHEMATICAL_FUNCTIONS[r.toLocaleLowerCase()];
|
|
731
|
-
i != null ? this.addToken(i, r) : t.includes(r) ? this.addToken("SPECIAL_VARIABLE", r) : this.reportError(
|
|
732
|
-
`Unknown identifier: ${r} at position: ${this.current}`
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
resetState() {
|
|
736
|
-
this.tokens = [], this.start = 0, this.current = 0, this.errors = [];
|
|
737
|
-
}
|
|
738
|
-
}, C(H, "MATHEMATICAL_FUNCTIONS", {
|
|
739
|
-
abs: "FUNCTION",
|
|
740
|
-
acos: "FUNCTION",
|
|
741
|
-
asin: "FUNCTION",
|
|
742
|
-
atan: "FUNCTION",
|
|
743
|
-
bog2deg: "FUNCTION",
|
|
744
|
-
cos: "FUNCTION",
|
|
745
|
-
deg2bog: "FUNCTION",
|
|
746
|
-
in2mm: "FUNCTION",
|
|
747
|
-
ln: "FUNCTION",
|
|
748
|
-
log: "FUNCTION",
|
|
749
|
-
log10: "FUNCTION",
|
|
750
|
-
max: "FUNCTION",
|
|
751
|
-
maxunder: "FUNCTION",
|
|
752
|
-
mm2in: "FUNCTION",
|
|
753
|
-
nextto: "FUNCTION",
|
|
754
|
-
pi: "FUNCTION",
|
|
755
|
-
pow: "FUNCTION",
|
|
756
|
-
round: "FUNCTION",
|
|
757
|
-
sin: "FUNCTION",
|
|
758
|
-
sqr: "FUNCTION",
|
|
759
|
-
tab: "FUNCTION",
|
|
760
|
-
tan: "FUNCTION"
|
|
761
|
-
/* FUNCTION */
|
|
762
|
-
}), H), ct = class {
|
|
763
|
-
constructor() {
|
|
764
|
-
C(this, "cache", /* @__PURE__ */ new Map());
|
|
765
|
-
C(this, "tokens", []);
|
|
766
|
-
C(this, "current", 0);
|
|
767
|
-
C(this, "resetCurrent", () => {
|
|
768
|
-
this.current = 0;
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
parse(e) {
|
|
772
|
-
if (this.cache.has(e)) {
|
|
773
|
-
const t = this.cache.get(e);
|
|
774
|
-
return this.cache.delete(e), this.cache.set(e, t), t;
|
|
775
|
-
}
|
|
776
|
-
try {
|
|
777
|
-
this.tokens = e;
|
|
778
|
-
const t = this.performParse(e);
|
|
779
|
-
if (this.cache.set(e, t), this.cache.size > 3) {
|
|
780
|
-
const r = this.cache.keys().next().value;
|
|
781
|
-
this.cache.delete(r);
|
|
782
|
-
}
|
|
783
|
-
return t;
|
|
784
|
-
} catch (t) {
|
|
785
|
-
throw new Error(t instanceof Error ? t.message : String(t));
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
performParse(e) {
|
|
789
|
-
if (this.resetCurrent(), this.tokens.length === 0)
|
|
790
|
-
throw new Error("No tokens to parse.");
|
|
791
|
-
try {
|
|
792
|
-
return this.expression();
|
|
793
|
-
} catch (t) {
|
|
794
|
-
throw new Error(t instanceof Error ? t.message : String(t));
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
checkMillimeterSuffix() {
|
|
798
|
-
if (this.isAtEnd()) return !1;
|
|
799
|
-
const e = this.peek();
|
|
800
|
-
return e.type === "UNIT" && e.lexeme === "mm";
|
|
801
|
-
}
|
|
802
|
-
consumeMillimeterSuffix() {
|
|
803
|
-
return this.checkMillimeterSuffix() ? (this.advance(), !0) : !1;
|
|
804
|
-
}
|
|
805
|
-
sections() {
|
|
806
|
-
const e = [];
|
|
807
|
-
if (!this.check(
|
|
808
|
-
"LEFT_ANGLE_BRACKET"
|
|
809
|
-
/* ANGLE_BRACKET_OPEN */
|
|
810
|
-
))
|
|
811
|
-
return this.expression();
|
|
812
|
-
for (; this.check(
|
|
813
|
-
"LEFT_ANGLE_BRACKET"
|
|
814
|
-
/* ANGLE_BRACKET_OPEN */
|
|
815
|
-
); ) {
|
|
816
|
-
this.advance();
|
|
817
|
-
let t = this.expression();
|
|
818
|
-
this.consume(
|
|
819
|
-
"RIGHT_ANGLE_BRACKET",
|
|
820
|
-
"Expected '>' after section expression."
|
|
821
|
-
), e.push({
|
|
822
|
-
type: "Section",
|
|
823
|
-
nodes: t,
|
|
824
|
-
hasMillimeterSuffix: this.consumeMillimeterSuffix()
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
if (e.length === 1) {
|
|
828
|
-
const t = e[0];
|
|
829
|
-
return t.type === "Section" && t.nodes.type === "Section" ? t.nodes : t;
|
|
830
|
-
}
|
|
831
|
-
return {
|
|
832
|
-
type: "Sections",
|
|
833
|
-
sections: e
|
|
834
|
-
};
|
|
835
|
-
}
|
|
836
|
-
expression() {
|
|
837
|
-
try {
|
|
838
|
-
let e = this.term();
|
|
839
|
-
for (; !this.isAtEnd() && this.check(
|
|
840
|
-
"OPERATOR"
|
|
841
|
-
/* OPERATOR */
|
|
842
|
-
) && ["+", "-"].includes(this.peek().lexeme); ) {
|
|
843
|
-
this.advance();
|
|
844
|
-
const t = this.previous().lexeme, r = this.term();
|
|
845
|
-
e = {
|
|
846
|
-
type: "BinaryExpression",
|
|
847
|
-
left: e,
|
|
848
|
-
operator: t,
|
|
849
|
-
right: r
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
return e;
|
|
853
|
-
} catch (e) {
|
|
854
|
-
throw new Error(
|
|
855
|
-
`Failed to parse expression: ${e.message}`
|
|
856
|
-
);
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
term() {
|
|
860
|
-
try {
|
|
861
|
-
let e = this.factor();
|
|
862
|
-
for (; !this.isAtEnd() && this.check(
|
|
863
|
-
"OPERATOR"
|
|
864
|
-
/* OPERATOR */
|
|
865
|
-
) && ["*", "/", "~"].includes(this.peek().lexeme); ) {
|
|
866
|
-
this.advance();
|
|
867
|
-
const t = this.previous().lexeme, r = this.factor();
|
|
868
|
-
if (r.type === "SpecialVariable" && r.name === "n")
|
|
869
|
-
throw new Error(
|
|
870
|
-
'Invalid usage: "n" cannot appear on the right-hand side of an operator'
|
|
871
|
-
);
|
|
872
|
-
e = {
|
|
873
|
-
type: "BinaryExpression",
|
|
874
|
-
left: e,
|
|
875
|
-
operator: t,
|
|
876
|
-
right: r
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
return e;
|
|
880
|
-
} catch (e) {
|
|
881
|
-
throw new Error(`Failed to parse term: ${e.message}`);
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
factor() {
|
|
885
|
-
try {
|
|
886
|
-
if (this.check(
|
|
887
|
-
"OPERATOR"
|
|
888
|
-
/* OPERATOR */
|
|
889
|
-
) && ["-", "+"].includes(this.peek().lexeme)) {
|
|
890
|
-
this.advance();
|
|
891
|
-
const e = this.previous().lexeme, t = this.factor();
|
|
892
|
-
return {
|
|
893
|
-
type: "UnaryExpression",
|
|
894
|
-
operator: e,
|
|
895
|
-
right: t
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
return this.primary();
|
|
899
|
-
} catch (e) {
|
|
900
|
-
throw new Error(`Failed to parse factor: ${e.message}`);
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
primary() {
|
|
904
|
-
try {
|
|
905
|
-
if (this.check(
|
|
906
|
-
"NUMBER"
|
|
907
|
-
/* NUMBER */
|
|
908
|
-
))
|
|
909
|
-
return this.advance(), {
|
|
910
|
-
type: "NumberLiteral",
|
|
911
|
-
value: parseFloat(this.previous().lexeme),
|
|
912
|
-
hasMillimeterSuffix: this.consumeMillimeterSuffix()
|
|
913
|
-
};
|
|
914
|
-
if (this.check(
|
|
915
|
-
"VARIABLE"
|
|
916
|
-
/* VARIABLE */
|
|
917
|
-
))
|
|
918
|
-
return this.advance(), {
|
|
919
|
-
type: "Variable",
|
|
920
|
-
name: this.previous().lexeme,
|
|
921
|
-
hasMillimeterSuffix: this.consumeMillimeterSuffix()
|
|
922
|
-
};
|
|
923
|
-
if (this.check(
|
|
924
|
-
"SPECIAL_VARIABLE"
|
|
925
|
-
/* SPECIAL_VARIABLE */
|
|
926
|
-
))
|
|
927
|
-
return this.advance(), {
|
|
928
|
-
type: "SpecialVariable",
|
|
929
|
-
name: this.previous().lexeme,
|
|
930
|
-
hasMillimeterSuffix: this.previous().lexeme === "n"
|
|
931
|
-
};
|
|
932
|
-
if (this.check(
|
|
933
|
-
"FUNCTION"
|
|
934
|
-
/* FUNCTION */
|
|
935
|
-
)) {
|
|
936
|
-
this.advance();
|
|
937
|
-
const e = this.previous().lexeme;
|
|
938
|
-
this.consume(
|
|
939
|
-
"PAREN_OPEN",
|
|
940
|
-
`Expected '(' after function name '${e}'.`
|
|
941
|
-
);
|
|
942
|
-
const t = this.expression();
|
|
943
|
-
return this.consume(
|
|
944
|
-
"PAREN_CLOSE",
|
|
945
|
-
"Expected ')' after function arguments."
|
|
946
|
-
), {
|
|
947
|
-
type: "FunctionCall",
|
|
948
|
-
name: e,
|
|
949
|
-
arg: t,
|
|
950
|
-
hasMillimeterSuffix: this.consumeMillimeterSuffix()
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
if (this.check(
|
|
954
|
-
"PAREN_OPEN"
|
|
955
|
-
/* PAREN_OPEN */
|
|
956
|
-
)) {
|
|
957
|
-
this.advance();
|
|
958
|
-
const e = this.expression();
|
|
959
|
-
if (!e)
|
|
960
|
-
throw new Error("Expected expression inside parentheses.");
|
|
961
|
-
return this.consume("PAREN_CLOSE", "Expected ')' after expression."), {
|
|
962
|
-
type: "Grouping",
|
|
963
|
-
expression: e,
|
|
964
|
-
hasMillimeterSuffix: this.consumeMillimeterSuffix()
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
if (this.check(
|
|
968
|
-
"PAREN_CLOSE"
|
|
969
|
-
/* PAREN_CLOSE */
|
|
970
|
-
))
|
|
971
|
-
throw new Error("Unexpected ')' without a matching '('.");
|
|
972
|
-
if (this.check(
|
|
973
|
-
"BRACE_OPEN"
|
|
974
|
-
/* BRACE_OPEN */
|
|
975
|
-
)) {
|
|
976
|
-
this.advance();
|
|
977
|
-
let e = this.sections();
|
|
978
|
-
return this.consume("BRACE_CLOSE", "Expected '}' after expression."), e.type === "Section" && e.nodes.type === "Section" && (e = e.nodes), {
|
|
979
|
-
type: "Repeated",
|
|
980
|
-
toRepeat: e,
|
|
981
|
-
hasMillimeterSuffix: this.consumeMillimeterSuffix()
|
|
982
|
-
};
|
|
983
|
-
}
|
|
984
|
-
if (this.check(
|
|
985
|
-
"LEFT_ANGLE_BRACKET"
|
|
986
|
-
/* ANGLE_BRACKET_OPEN */
|
|
987
|
-
))
|
|
988
|
-
return this.sections();
|
|
989
|
-
throw new Error(`Unexpected token: ${this.peek().lexeme}`);
|
|
990
|
-
} catch (e) {
|
|
991
|
-
throw new Error(`Failed to parse primary: ${e.message}`);
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
check(e) {
|
|
995
|
-
return this.isAtEnd() ? !1 : this.peek().type === e;
|
|
996
|
-
}
|
|
997
|
-
advance() {
|
|
998
|
-
return this.isAtEnd() || this.current++, this.previous();
|
|
999
|
-
}
|
|
1000
|
-
consume(e, t) {
|
|
1001
|
-
if (this.check(e)) return this.advance();
|
|
1002
|
-
throw new Error(t);
|
|
1003
|
-
}
|
|
1004
|
-
isAtEnd() {
|
|
1005
|
-
return this.current >= this.tokens.length;
|
|
1006
|
-
}
|
|
1007
|
-
peek() {
|
|
1008
|
-
return this.tokens[this.current];
|
|
1009
|
-
}
|
|
1010
|
-
previous() {
|
|
1011
|
-
return this.tokens[this.current - 1];
|
|
1012
|
-
}
|
|
1013
|
-
}, xe = (e) => e.type === "SpecialVariable" && e.name === "n";
|
|
1014
|
-
function ut(e, t) {
|
|
1015
|
-
if (e.right.type === "SpecialVariable" && e.right.name === "n")
|
|
1016
|
-
return new A(
|
|
1017
|
-
"Cannot have n in the right side of an expression"
|
|
1018
|
-
);
|
|
1019
|
-
const r = xe(e.left) ? e.left : this.evaluate(e.left), i = xe(e.right) ? e.right : this.evaluate(e.right);
|
|
1020
|
-
if (r instanceof A) return r;
|
|
1021
|
-
if (i instanceof A) return i;
|
|
1022
|
-
const n = r.type === "NumberLiteral" && i.type === "NumberLiteral", s = n ? r.hasMillimeterSuffix === i.hasMillimeterSuffix : !1, a = (o) => o.type === "Repeated";
|
|
1023
|
-
switch (e.operator) {
|
|
1024
|
-
case "+":
|
|
1025
|
-
return n && s && t?.isInsideGroup == !1 ? {
|
|
1026
|
-
type: "NumberLiteral",
|
|
1027
|
-
value: r.value + i.value,
|
|
1028
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix === !0 || i.hasMillimeterSuffix === !0,
|
|
1029
|
-
spreadMm: r.spreadMm || i.spreadMm
|
|
1030
|
-
} : n && t?.isInsideGroup == !0 ? {
|
|
1031
|
-
type: "NumberLiteral",
|
|
1032
|
-
value: r.value + i.value,
|
|
1033
|
-
spreadMm: r.hasMillimeterSuffix || i.hasMillimeterSuffix
|
|
1034
|
-
} : {
|
|
1035
|
-
type: "BinaryExpression",
|
|
1036
|
-
operator: "+",
|
|
1037
|
-
left: r,
|
|
1038
|
-
right: i
|
|
1039
|
-
};
|
|
1040
|
-
case "*":
|
|
1041
|
-
return n && t?.isInsideGroup == !0 ? {
|
|
1042
|
-
type: "NumberLiteral",
|
|
1043
|
-
value: r.value * i.value,
|
|
1044
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix === !0 || i.hasMillimeterSuffix === !0,
|
|
1045
|
-
spreadMm: r.spreadMm || i.spreadMm
|
|
1046
|
-
} : a(i) && r.type === "NumberLiteral" ? {
|
|
1047
|
-
type: "Repeated",
|
|
1048
|
-
toRepeat: i.toRepeat,
|
|
1049
|
-
times: Math.round(r.value),
|
|
1050
|
-
hasMillimeterSuffix: i.type === "NumberLiteral" && i.hasMillimeterSuffix || !1
|
|
1051
|
-
} : t?.isInsideGroup == !1 && r.type !== "SpecialVariable" && r.name !== "n" ? new A("cannot have * outside of group") : r.type === "SpecialVariable" ? {
|
|
1052
|
-
type: "BinaryExpression",
|
|
1053
|
-
operator: "*",
|
|
1054
|
-
left: r,
|
|
1055
|
-
right: {
|
|
1056
|
-
type: "NumberLiteral",
|
|
1057
|
-
value: i.value,
|
|
1058
|
-
hasMillimeterSuffix: !0
|
|
1059
|
-
}
|
|
1060
|
-
} : {
|
|
1061
|
-
type: "BinaryExpression",
|
|
1062
|
-
operator: "*",
|
|
1063
|
-
left: r,
|
|
1064
|
-
right: i,
|
|
1065
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix || i.hasMillimeterSuffix
|
|
1066
|
-
};
|
|
1067
|
-
case "/":
|
|
1068
|
-
if (n && t?.isInsideGroup == !0)
|
|
1069
|
-
return {
|
|
1070
|
-
type: "NumberLiteral",
|
|
1071
|
-
value: r.value / i.value,
|
|
1072
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix === !0 || i.hasMillimeterSuffix === !0
|
|
1073
|
-
};
|
|
1074
|
-
if (t?.isInsideGroup == !1)
|
|
1075
|
-
return new A("cannot have / outside of group");
|
|
1076
|
-
case "-":
|
|
1077
|
-
return n && s && t?.isInsideGroup == !1 ? {
|
|
1078
|
-
type: "NumberLiteral",
|
|
1079
|
-
value: r.value - i.value,
|
|
1080
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix === !0 || i.hasMillimeterSuffix === !0,
|
|
1081
|
-
spreadMm: r.spreadMm || i.spreadMm
|
|
1082
|
-
} : n && t?.isInsideGroup == !0 ? {
|
|
1083
|
-
type: "NumberLiteral",
|
|
1084
|
-
value: r.value - i.value,
|
|
1085
|
-
spreadMm: r.hasMillimeterSuffix || i.hasMillimeterSuffix
|
|
1086
|
-
} : {
|
|
1087
|
-
type: "BinaryExpression",
|
|
1088
|
-
operator: "-",
|
|
1089
|
-
left: r,
|
|
1090
|
-
right: i
|
|
1091
|
-
};
|
|
1092
|
-
default:
|
|
1093
|
-
throw new A("Invalid Operator");
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
function ht(e, t) {
|
|
1097
|
-
const r = this.evaluate(e.arg);
|
|
1098
|
-
if (r instanceof A)
|
|
1099
|
-
throw new A("Error in function arguments");
|
|
1100
|
-
switch (e.name.toLowerCase()) {
|
|
1101
|
-
case "abs":
|
|
1102
|
-
return {
|
|
1103
|
-
type: "NumberLiteral",
|
|
1104
|
-
value: Math.abs(r.value),
|
|
1105
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1106
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1107
|
-
};
|
|
1108
|
-
case "acos":
|
|
1109
|
-
return {
|
|
1110
|
-
type: "NumberLiteral",
|
|
1111
|
-
value: Math.acos(r.value),
|
|
1112
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1113
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1114
|
-
};
|
|
1115
|
-
case "asin":
|
|
1116
|
-
return {
|
|
1117
|
-
type: "NumberLiteral",
|
|
1118
|
-
value: Math.asin(r.value),
|
|
1119
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1120
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1121
|
-
};
|
|
1122
|
-
case "atan":
|
|
1123
|
-
return {
|
|
1124
|
-
type: "NumberLiteral",
|
|
1125
|
-
value: Math.atan(r.value),
|
|
1126
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1127
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1128
|
-
};
|
|
1129
|
-
case "cos":
|
|
1130
|
-
return {
|
|
1131
|
-
type: "NumberLiteral",
|
|
1132
|
-
value: Math.cos(r.value),
|
|
1133
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1134
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1135
|
-
};
|
|
1136
|
-
case "sin":
|
|
1137
|
-
return {
|
|
1138
|
-
type: "NumberLiteral",
|
|
1139
|
-
value: Math.sin(r.value),
|
|
1140
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1141
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1142
|
-
};
|
|
1143
|
-
case "tan":
|
|
1144
|
-
return {
|
|
1145
|
-
type: "NumberLiteral",
|
|
1146
|
-
value: Math.tan(r.value),
|
|
1147
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1148
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1149
|
-
};
|
|
1150
|
-
case "round":
|
|
1151
|
-
return {
|
|
1152
|
-
type: "NumberLiteral",
|
|
1153
|
-
value: Math.round(r.value),
|
|
1154
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1155
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1156
|
-
};
|
|
1157
|
-
case "bog2deg":
|
|
1158
|
-
return {
|
|
1159
|
-
type: "NumberLiteral",
|
|
1160
|
-
value: r.value * (180 / Math.PI),
|
|
1161
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1162
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1163
|
-
};
|
|
1164
|
-
case "deg2bog":
|
|
1165
|
-
return {
|
|
1166
|
-
type: "NumberLiteral",
|
|
1167
|
-
value: r.value * (Math.PI / 180),
|
|
1168
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1169
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1170
|
-
};
|
|
1171
|
-
case "in2mm":
|
|
1172
|
-
return {
|
|
1173
|
-
type: "NumberLiteral",
|
|
1174
|
-
value: r.value * 25.4,
|
|
1175
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1176
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1177
|
-
};
|
|
1178
|
-
case "mm2in":
|
|
1179
|
-
return {
|
|
1180
|
-
type: "NumberLiteral",
|
|
1181
|
-
value: r.value / 25.4,
|
|
1182
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1183
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1184
|
-
};
|
|
1185
|
-
case "ln":
|
|
1186
|
-
return {
|
|
1187
|
-
type: "NumberLiteral",
|
|
1188
|
-
value: Math.log(r.value),
|
|
1189
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1190
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1191
|
-
};
|
|
1192
|
-
case "log10":
|
|
1193
|
-
return {
|
|
1194
|
-
type: "NumberLiteral",
|
|
1195
|
-
value: Math.log10(r.value),
|
|
1196
|
-
hasMillimeterSuffix: r.hasMillimeterSuffix,
|
|
1197
|
-
spreadMm: t?.isInsideGroup === !1
|
|
1198
|
-
};
|
|
1199
|
-
default:
|
|
1200
|
-
throw new A("Function not implemented");
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
function ft(e) {
|
|
1204
|
-
if (!this.variables || !(e.name in this.variables))
|
|
1205
|
-
throw new A(`Variable ${e.name} is not defined.`);
|
|
1206
|
-
return {
|
|
1207
|
-
type: "NumberLiteral",
|
|
1208
|
-
value: this.variables[e.name],
|
|
1209
|
-
hasMillimeterSuffix: e.hasMillimeterSuffix
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
var mt = class {
|
|
1213
|
-
constructor() {
|
|
1214
|
-
C(this, "nestingLevel", 0);
|
|
1215
|
-
C(this, "variables", {});
|
|
1216
|
-
// evaluate binary expression
|
|
1217
|
-
C(this, "evaluateBinaryExpression");
|
|
1218
|
-
C(this, "evaluateFunction");
|
|
1219
|
-
C(this, "evaluateVariable");
|
|
1220
|
-
this.evaluateBinaryExpression = ut.bind(this), this.evaluateFunction = ht.bind(this), this.evaluateVariable = ft.bind(this);
|
|
1221
|
-
}
|
|
1222
|
-
evaluate(e, t = { isInsideGroup: !1 }, r) {
|
|
1223
|
-
this.nestingLevel++;
|
|
1224
|
-
try {
|
|
1225
|
-
if (r && (this.variables = r), this.isSections(e))
|
|
1226
|
-
return this.evaluateSections(e, t);
|
|
1227
|
-
if (this.isSection(e)) {
|
|
1228
|
-
const i = this.evaluate(e.nodes, t);
|
|
1229
|
-
return i instanceof A ? new A(
|
|
1230
|
-
`Error in section ${JSON.stringify(e)}`
|
|
1231
|
-
) : { ...e, nodes: i };
|
|
1232
|
-
}
|
|
1233
|
-
if (this.isNumberLiteral(e))
|
|
1234
|
-
if (t.isInsideGroup) {
|
|
1235
|
-
if (e.hasMillimeterSuffix)
|
|
1236
|
-
return { ...e, spreadMm: !0 };
|
|
1237
|
-
} else
|
|
1238
|
-
return e;
|
|
1239
|
-
if (this.isGrouping(e)) {
|
|
1240
|
-
t = { ...t, isInsideGroup: !0 };
|
|
1241
|
-
const i = this.evaluate(e.expression, t);
|
|
1242
|
-
return i instanceof A ? i : {
|
|
1243
|
-
...i,
|
|
1244
|
-
hasMillimeterSuffix: e.hasMillimeterSuffix
|
|
1245
|
-
};
|
|
1246
|
-
}
|
|
1247
|
-
if (this.isRepeated(e)) {
|
|
1248
|
-
const i = this.evaluate(e.toRepeat);
|
|
1249
|
-
return i instanceof A ? i : { ...e, toRepeat: i };
|
|
1250
|
-
}
|
|
1251
|
-
if (this.isBinaryExpression(e))
|
|
1252
|
-
return this.evaluateBinaryExpression(e, t);
|
|
1253
|
-
if (this.isUnaryExpression(e))
|
|
1254
|
-
return {
|
|
1255
|
-
type: "NumberLiteral",
|
|
1256
|
-
value: e.operator === "-" ? -1 * e.right.value : e.right.value,
|
|
1257
|
-
hasMillimeterSuffix: e.right.hasMillimeterSuffix
|
|
1258
|
-
};
|
|
1259
|
-
if (this.isFunctionCall(e))
|
|
1260
|
-
return this.evaluateFunction(e, t);
|
|
1261
|
-
if (this.isVariable(e)) {
|
|
1262
|
-
if (this.variables)
|
|
1263
|
-
return this.evaluateVariable(e);
|
|
1264
|
-
throw new A("No variables defined.");
|
|
1265
|
-
}
|
|
1266
|
-
throw new A(`unsupported node type: ${e.type}`);
|
|
1267
|
-
} catch (i) {
|
|
1268
|
-
throw new A(i.message);
|
|
1269
|
-
} finally {
|
|
1270
|
-
this.nestingLevel--;
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
isUnaryExpression(e) {
|
|
1274
|
-
return e.type === "UnaryExpression";
|
|
1275
|
-
}
|
|
1276
|
-
isNumberLiteral(e) {
|
|
1277
|
-
return e.type === "NumberLiteral";
|
|
1278
|
-
}
|
|
1279
|
-
isVariable(e) {
|
|
1280
|
-
return e.type === "Variable" || e.type === "SpecialVariable";
|
|
1281
|
-
}
|
|
1282
|
-
isBinaryExpression(e) {
|
|
1283
|
-
return e.type === "BinaryExpression";
|
|
1284
|
-
}
|
|
1285
|
-
isFunctionCall(e) {
|
|
1286
|
-
return e.type === "FunctionCall";
|
|
1287
|
-
}
|
|
1288
|
-
isGrouping(e) {
|
|
1289
|
-
return e.type === "Grouping";
|
|
1290
|
-
}
|
|
1291
|
-
isRepeated(e) {
|
|
1292
|
-
return e.type === "Repeated";
|
|
1293
|
-
}
|
|
1294
|
-
isSections(e) {
|
|
1295
|
-
return e.type === "Sections";
|
|
1296
|
-
}
|
|
1297
|
-
isSection(e) {
|
|
1298
|
-
return e.type === "Section";
|
|
1299
|
-
}
|
|
1300
|
-
evaluateSections(e, t = { isInsideGroup: !1 }) {
|
|
1301
|
-
return { type: "Sections", sections: e.sections.map((i) => {
|
|
1302
|
-
const n = this.evaluate(i.nodes);
|
|
1303
|
-
if (n instanceof A) throw n;
|
|
1304
|
-
return { type: "Section", nodes: n };
|
|
1305
|
-
}) };
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
function G(e, t) {
|
|
1309
|
-
if (!e)
|
|
1310
|
-
throw new A(
|
|
1311
|
-
`unsupported node type to traverse: ${JSON.stringify(e)}`
|
|
1312
|
-
);
|
|
1313
|
-
t(e), e.type === "Sections" && Array.isArray(e.sections) ? e.sections.forEach((r) => G(r, t)) : e.type === "Section" && e.nodes ? G(e.nodes, t) : e.type;
|
|
1314
|
-
}
|
|
1315
|
-
var pt = class {
|
|
1316
|
-
accumulateIncorporatedThicknesses(e, t, r, i, n, s, a, o, l) {
|
|
1317
|
-
let u = 0;
|
|
1318
|
-
if (a === "M")
|
|
1319
|
-
for (let h = 1; h < e.sections.length - 1; h++)
|
|
1320
|
-
u += i;
|
|
1321
|
-
if (a === "O")
|
|
1322
|
-
for (let h = 1; h < e.sections.length - 1; h++)
|
|
1323
|
-
u += i * 2;
|
|
1324
|
-
return n === "M" && (u += t / 2), n === "O" && (u += t), s === "M" && (u += t / 2), s === "O" && (u += t), l === "M" && (u += r / 2), l === "O" && (u += r), o === "M" && (u += r / 2), o === "O" && (u += r), u;
|
|
1325
|
-
}
|
|
1326
|
-
}, dt = class {
|
|
1327
|
-
calculateSections(e, t = 500, r = 0, i) {
|
|
1328
|
-
try {
|
|
1329
|
-
if (e instanceof A)
|
|
1330
|
-
throw e;
|
|
1331
|
-
if (e.type !== "Sections" && e.type !== "Section")
|
|
1332
|
-
throw new A(
|
|
1333
|
-
`Expected Sections or Section, got ${JSON.stringify(e)}`
|
|
1334
|
-
);
|
|
1335
|
-
let n = { type: "Sections", sections: [] };
|
|
1336
|
-
if (e.type === "Sections")
|
|
1337
|
-
for (const c of e.sections)
|
|
1338
|
-
if (c.nodes.type === "Repeated" && c.nodes.times) {
|
|
1339
|
-
for (let d = 0; d < (c.nodes?.times ?? 0); d++)
|
|
1340
|
-
if (c.nodes.toRepeat.type === "Section")
|
|
1341
|
-
n.sections.push(
|
|
1342
|
-
c.nodes.toRepeat
|
|
1343
|
-
);
|
|
1344
|
-
else if (c.nodes.toRepeat.type === "Sections")
|
|
1345
|
-
for (const g of c.nodes.toRepeat.sections)
|
|
1346
|
-
n.sections.push(g);
|
|
1347
|
-
} else
|
|
1348
|
-
n.sections.push(c);
|
|
1349
|
-
else e.type === "Section" && n.sections.push(e);
|
|
1350
|
-
if (i) {
|
|
1351
|
-
const d = new pt().accumulateIncorporatedThicknesses(
|
|
1352
|
-
n,
|
|
1353
|
-
i.startPanelThk,
|
|
1354
|
-
i.endPanelThk,
|
|
1355
|
-
r,
|
|
1356
|
-
i.sizerefout1,
|
|
1357
|
-
i.sizerefedg1,
|
|
1358
|
-
i.sizerefmid,
|
|
1359
|
-
i.sizerefedg2,
|
|
1360
|
-
i.sizerefout2
|
|
1361
|
-
);
|
|
1362
|
-
}
|
|
1363
|
-
n.sections.forEach((c) => {
|
|
1364
|
-
let d = !1;
|
|
1365
|
-
G(c, (g) => {
|
|
1366
|
-
g.type === "NumberLiteral" ? g?.spreadMm === !0 && (d = !0) : g.type === "BinaryExpression" && g.left.type === "NumberLiteral" && (g.left?.spreadMm === !0 && (d = !0), g.right?.spreadMm === !0 && (d = !0));
|
|
1367
|
-
}), d && G(c, (g) => {
|
|
1368
|
-
g.type === "NumberLiteral" ? g.hasMillimeterSuffix = !0 : g.type === "BinaryExpression" && (g.left.type === "NumberLiteral" && (g.left.hasMillimeterSuffix = !0), g.right.type === "NumberLiteral" && (g.right.hasMillimeterSuffix = !0));
|
|
1369
|
-
});
|
|
1370
|
-
});
|
|
1371
|
-
let s = 0;
|
|
1372
|
-
const a = (c) => {
|
|
1373
|
-
if (r && c.type === "Section" && (s += r), c.type === "NumberLiteral")
|
|
1374
|
-
c.hasMillimeterSuffix === !0 && (s += c.value);
|
|
1375
|
-
else if (c.type === "BinaryExpression") {
|
|
1376
|
-
const d = c;
|
|
1377
|
-
d.left.type === "NumberLiteral" && d.right.type === "NumberLiteral" && (d.left.hasMillimeterSuffix === !0 && (s += d.left.value), d.right.hasMillimeterSuffix === !0 && (s += d.right.value));
|
|
1378
|
-
}
|
|
1379
|
-
};
|
|
1380
|
-
if (n.sections.forEach(
|
|
1381
|
-
(c) => G(c, a)
|
|
1382
|
-
), s > t)
|
|
1383
|
-
throw new A("Total length exceeded");
|
|
1384
|
-
let o = t - s + r, l = 0;
|
|
1385
|
-
const u = (c) => {
|
|
1386
|
-
if (c.type === "BinaryExpression") {
|
|
1387
|
-
const d = c;
|
|
1388
|
-
if (d.right.type === "NumberLiteral" && d.left.type === "SpecialVariable" && d.left.name === "n" && d.operator === "*") {
|
|
1389
|
-
l = Math.floor(
|
|
1390
|
-
o / (d.right.value + r)
|
|
1391
|
-
);
|
|
1392
|
-
const g = (l - 1) * r, I = l * d.right.value;
|
|
1393
|
-
o += -g - I;
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
};
|
|
1397
|
-
n.sections.forEach(
|
|
1398
|
-
(c) => G(c, u)
|
|
1399
|
-
);
|
|
1400
|
-
let h = 0;
|
|
1401
|
-
const m = (c) => {
|
|
1402
|
-
c.type === "BinaryExpression" && (c.left.type === "NumberLiteral" && c.left.hasMillimeterSuffix === !1 && (h += c.left.value), c.right.type === "NumberLiteral" && c.right.hasMillimeterSuffix === !1 && (h += c.right.value)), c.type === "NumberLiteral" && c.hasMillimeterSuffix === !1 && (h += c.value);
|
|
1403
|
-
};
|
|
1404
|
-
n.sections.forEach((c) => {
|
|
1405
|
-
G(c, m);
|
|
1406
|
-
});
|
|
1407
|
-
const p = o / h, E = [], y = (c) => {
|
|
1408
|
-
let d = 0, g = 0;
|
|
1409
|
-
if (c.type === "NumberLiteral")
|
|
1410
|
-
c.hasMillimeterSuffix === !1 && (d += c.value * p), c.hasMillimeterSuffix === !0 && (g += c.value), E.push(Number((d + g).toFixed(2)));
|
|
1411
|
-
else if (c.type === "BinaryExpression" && (c.left.type === "NumberLiteral" && c.right.type === "NumberLiteral" && (c.left.hasMillimeterSuffix === !1 && (d += c.left.value * p), c.left.hasMillimeterSuffix === !0 && (g += c.left.value), c.right.hasMillimeterSuffix === !1 && (d += c.right.value * p), c.right.hasMillimeterSuffix === !0 && (g += c.right.value), E.push(Number((d + g).toFixed(2)))), c.left.type === "SpecialVariable" && c.left.name === "n" && c.right.type === "NumberLiteral")) {
|
|
1412
|
-
g += c.right.value;
|
|
1413
|
-
for (let I = 0; I < l; I++)
|
|
1414
|
-
c.right.hasMillimeterSuffix === !0 && E.push(Number(g.toFixed(2)));
|
|
1415
|
-
}
|
|
1416
|
-
};
|
|
1417
|
-
return n.sections.forEach((c) => {
|
|
1418
|
-
G(c, y);
|
|
1419
|
-
}), E;
|
|
1420
|
-
} catch {
|
|
1421
|
-
return new A("Error calculating sections");
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
}, gt = new lt(), Et = new ct(), St = new mt(), vt = (e, t, r, i) => {
|
|
1425
|
-
try {
|
|
1426
|
-
const n = gt.scan(e), s = Et.parse(n), a = St.evaluate(s, {}, i);
|
|
1427
|
-
if (a && !(a instanceof A)) {
|
|
1428
|
-
const l = new dt().calculateSections(a, t, r);
|
|
1429
|
-
if (l && l instanceof A) throw new Error(l.message);
|
|
1430
|
-
return l;
|
|
1431
|
-
}
|
|
1432
|
-
return a || new A("Unknown error during evaluation.");
|
|
1433
|
-
} catch (n) {
|
|
1434
|
-
return new A(n.message);
|
|
1435
|
-
}
|
|
1436
|
-
};
|
|
1437
|
-
function Nt(e) {
|
|
1438
|
-
const t = /^(\d+)\*\{(\d+)\}$/, r = e.match(t);
|
|
1439
|
-
if (r) {
|
|
1440
|
-
const i = parseInt(r[1], 10), n = r[2];
|
|
1441
|
-
return i > 0 ? Array(i).fill(n).join(":") : "";
|
|
1442
|
-
}
|
|
1443
|
-
return e;
|
|
1444
|
-
}
|
|
1445
|
-
function Tt(e) {
|
|
1446
|
-
const t = e.trim().match(/^(\d+(?:\.\d+)?)\s*\*\s*\{.+\}$/);
|
|
1447
|
-
return t ? Number(t[1]) : e;
|
|
1448
|
-
}
|
|
1449
|
-
function Mt(e, t, r) {
|
|
1450
|
-
let i = 0;
|
|
1451
|
-
const { LINDIV1: n, DIVDIR: s, HORDEFTYPE: a, DIVELEM1: o } = e;
|
|
1452
|
-
let l = "width";
|
|
1453
|
-
if (n === "") return { divisionType: l, zone_dimensions: [], divided_length_list: [] };
|
|
1454
|
-
if (s === "H")
|
|
1455
|
-
if (a === "W")
|
|
1456
|
-
i = t.width, l = "width";
|
|
1457
|
-
else if (a === "D")
|
|
1458
|
-
i = t.depth, l = "depth";
|
|
1459
|
-
else if (a === "P")
|
|
1460
|
-
if (o === 0 || o === 2)
|
|
1461
|
-
i = t.width, l = "width";
|
|
1462
|
-
else if (o === 1 || o === 3)
|
|
1463
|
-
i = t.depth, l = "depth";
|
|
1464
|
-
else
|
|
1465
|
-
throw new Error("Unhandled case: DIVELEM1 = " + o);
|
|
1466
|
-
else
|
|
1467
|
-
throw new Error("Unhandled case: HORDEFTYPE = " + a);
|
|
1468
|
-
else if (s === "V")
|
|
1469
|
-
i = t.height, l = "height";
|
|
1470
|
-
else if (s === "A")
|
|
1471
|
-
i = t.width, l = "article";
|
|
1472
|
-
else if (s === "I")
|
|
1473
|
-
i = t.width, l = "independent";
|
|
1474
|
-
else
|
|
1475
|
-
throw new Error("Unhandled case: DIVDIR = " + s);
|
|
1476
|
-
let u = [];
|
|
1477
|
-
const h = Nt(n);
|
|
1478
|
-
if (l === "independent") {
|
|
1479
|
-
const p = Tt(n);
|
|
1480
|
-
u = Array(p).fill(i);
|
|
1481
|
-
} else l === "article" ? u = [i] : u = vt(h, i, r);
|
|
1482
|
-
return Array.isArray(u) ? (a === "P" && (o === 2 || o === 3) && (u = [...u].reverse()), {
|
|
1483
|
-
zone_dimensions: u.map((p) => {
|
|
1484
|
-
if (l === "width")
|
|
1485
|
-
return {
|
|
1486
|
-
width: p,
|
|
1487
|
-
height: t.height,
|
|
1488
|
-
depth: t.depth
|
|
1489
|
-
};
|
|
1490
|
-
if (l === "depth")
|
|
1491
|
-
return {
|
|
1492
|
-
width: t.width,
|
|
1493
|
-
height: t.height,
|
|
1494
|
-
depth: p
|
|
1495
|
-
};
|
|
1496
|
-
if (l === "height")
|
|
1497
|
-
return {
|
|
1498
|
-
width: t.width,
|
|
1499
|
-
height: p,
|
|
1500
|
-
depth: t.depth
|
|
1501
|
-
};
|
|
1502
|
-
if (l === "article" || l === "independent")
|
|
1503
|
-
return {
|
|
1504
|
-
width: t.width,
|
|
1505
|
-
height: t.height,
|
|
1506
|
-
depth: t.depth
|
|
1507
|
-
};
|
|
1508
|
-
throw new Error("Unhandled case: DIVDIR = " + s);
|
|
1509
|
-
}),
|
|
1510
|
-
divisionType: l,
|
|
1511
|
-
divided_length_list: u
|
|
1512
|
-
}) : { divisionType: l, zone_dimensions: [], divided_length_list: [] };
|
|
1513
|
-
}
|
|
1514
|
-
function xt({
|
|
1515
|
-
divisionType: e,
|
|
1516
|
-
parentDimensions: t,
|
|
1517
|
-
lengthList: r,
|
|
1518
|
-
childTREEIDs: i,
|
|
1519
|
-
dividerThk: n
|
|
1520
|
-
}) {
|
|
1521
|
-
const s = -t.width / 2, a = -t.depth / 2, o = -t.height / 2;
|
|
1522
|
-
return {
|
|
1523
|
-
childPositions: r.reduce((u, h, m) => {
|
|
1524
|
-
let p = 0, E = 0, y = 0, c;
|
|
1525
|
-
return e === "width" ? (p = s + u.cumulativeX + h / 2, E = 0, y = 0, c = {
|
|
1526
|
-
width: h,
|
|
1527
|
-
height: t.height,
|
|
1528
|
-
depth: t.depth
|
|
1529
|
-
}, u.cumulativeX += h + n) : e === "depth" ? (p = 0, E = a + u.cumulativeY + h / 2, y = 0, c = {
|
|
1530
|
-
width: t.width,
|
|
1531
|
-
height: t.height,
|
|
1532
|
-
depth: h
|
|
1533
|
-
}, u.cumulativeY += h + n) : e === "independent" || e === "article" ? (p = 0, E = 0, y = 0, c = {
|
|
1534
|
-
width: h,
|
|
1535
|
-
height: t.height,
|
|
1536
|
-
depth: t.depth
|
|
1537
|
-
}) : (p = 0, E = 0, y = o + u.cumulativeZ + h / 2, c = {
|
|
1538
|
-
width: t.width,
|
|
1539
|
-
height: h,
|
|
1540
|
-
depth: t.depth
|
|
1541
|
-
}, u.cumulativeZ += h + n), u.positions.push({
|
|
1542
|
-
x: p,
|
|
1543
|
-
y: E,
|
|
1544
|
-
z: y,
|
|
1545
|
-
zone_dims: c,
|
|
1546
|
-
TREEID: i[m]
|
|
1547
|
-
}), u;
|
|
1548
|
-
}, { cumulativeX: 0, cumulativeY: 0, cumulativeZ: 0, positions: [] }).positions,
|
|
1549
|
-
dividerType: e
|
|
1550
|
-
};
|
|
1551
|
-
}
|
|
1552
|
-
function yt(e) {
|
|
1553
|
-
return {
|
|
1554
|
-
front: te(Oe(e)),
|
|
1555
|
-
left: te(Re(e)),
|
|
1556
|
-
right: te(Pe(e)),
|
|
1557
|
-
back: te(Ve(e))
|
|
1558
|
-
};
|
|
1559
|
-
}
|
|
1560
|
-
function It(e, t, r) {
|
|
1561
|
-
return {
|
|
1562
|
-
front: e.front?.thk || 0,
|
|
1563
|
-
right: e.right?.thk || 0,
|
|
1564
|
-
back: e.back?.thk || 0,
|
|
1565
|
-
left: e.left?.thk || 0,
|
|
1566
|
-
top: t,
|
|
1567
|
-
bottom: r
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
function _t(e) {
|
|
1571
|
-
return {
|
|
1572
|
-
front: e.front?.inset || 0,
|
|
1573
|
-
right: e.right?.inset || 0,
|
|
1574
|
-
back: e.back?.inset || 0,
|
|
1575
|
-
left: e.left?.inset || 0
|
|
1576
|
-
};
|
|
1577
|
-
}
|
|
1578
|
-
function bt(e, t) {
|
|
1579
|
-
return {
|
|
1580
|
-
dimensions: {
|
|
1581
|
-
width: e.width - t.left - t.right,
|
|
1582
|
-
height: e.height,
|
|
1583
|
-
depth: e.depth - t.front - t.back
|
|
1584
|
-
},
|
|
1585
|
-
position: {
|
|
1586
|
-
x: t.left / 2 - t.right / 2,
|
|
1587
|
-
y: t.front / 2 - t.back / 2,
|
|
1588
|
-
z: 0
|
|
1589
|
-
}
|
|
1590
|
-
};
|
|
1591
|
-
}
|
|
1592
|
-
function kt(e, t) {
|
|
1593
|
-
return {
|
|
1594
|
-
dimensions: {
|
|
1595
|
-
width: e.dimensions.width - t.left - t.right,
|
|
1596
|
-
height: e.dimensions.height - t.top - t.bottom,
|
|
1597
|
-
depth: e.dimensions.depth - t.front - t.back
|
|
1598
|
-
},
|
|
1599
|
-
position: {
|
|
1600
|
-
x: t.left / 2 - t.right / 2,
|
|
1601
|
-
y: t.front / 2 - t.back / 2,
|
|
1602
|
-
z: t.bottom / 2 - t.top / 2
|
|
1603
|
-
}
|
|
1604
|
-
};
|
|
1605
|
-
}
|
|
1606
|
-
function At(e, t, r, i) {
|
|
1607
|
-
return t.divisionType ? xt({
|
|
1608
|
-
divisionType: t.divisionType,
|
|
1609
|
-
parentDimensions: e,
|
|
1610
|
-
lengthList: t.divided_length_list,
|
|
1611
|
-
childTREEIDs: i,
|
|
1612
|
-
dividerThk: Number(r) || 0
|
|
1613
|
-
}) : { childPositions: [], dividerType: "height" };
|
|
1614
|
-
}
|
|
1615
|
-
function Dt(e, t, r, i) {
|
|
1616
|
-
if (!r)
|
|
1617
|
-
return { childPositions: [], dividerType: "height" };
|
|
1618
|
-
const n = Mt(r, e.dimensions, t);
|
|
1619
|
-
return At(
|
|
1620
|
-
e.dimensions,
|
|
1621
|
-
n,
|
|
1622
|
-
t,
|
|
1623
|
-
i
|
|
1624
|
-
);
|
|
1625
|
-
}
|
|
1626
|
-
function U({
|
|
1627
|
-
length: e,
|
|
1628
|
-
width: t,
|
|
1629
|
-
thk: r,
|
|
1630
|
-
material: i = "gray",
|
|
1631
|
-
opacity: n = 0.2,
|
|
1632
|
-
isSelected: s = !1,
|
|
1633
|
-
isHovered: a = !1,
|
|
1634
|
-
onClick: o,
|
|
1635
|
-
onPointerEnter: l,
|
|
1636
|
-
onPointerLeave: u
|
|
1637
|
-
}) {
|
|
1638
|
-
const h = s ? "#ff6b00" : a ? "#0066ff" : i, m = s ? 0.8 : a ? 0.6 : n;
|
|
1639
|
-
return /* @__PURE__ */ f("group", { children: /* @__PURE__ */ O(
|
|
1640
|
-
"mesh",
|
|
1641
|
-
{
|
|
1642
|
-
onClick: o,
|
|
1643
|
-
onPointerEnter: l,
|
|
1644
|
-
onPointerLeave: u,
|
|
1645
|
-
children: [
|
|
1646
|
-
/* @__PURE__ */ f("boxGeometry", { args: [e / v, t / v, r / v] }),
|
|
1647
|
-
/* @__PURE__ */ f(
|
|
1648
|
-
"meshStandardMaterial",
|
|
1649
|
-
{
|
|
1650
|
-
color: h,
|
|
1651
|
-
opacity: m,
|
|
1652
|
-
transparent: !0
|
|
1653
|
-
}
|
|
1654
|
-
),
|
|
1655
|
-
/* @__PURE__ */ f(Ke, { color: s ? "#ff6b00" : a ? "#0066ff" : "black" })
|
|
1656
|
-
]
|
|
1657
|
-
}
|
|
1658
|
-
) });
|
|
1659
|
-
}
|
|
1660
|
-
function wt(e, t, r = 0, i = 0) {
|
|
1661
|
-
const n = e / 2, s = t / 2, a = n, o = s;
|
|
1662
|
-
return `
|
|
1663
|
-
${a},${-o}
|
|
1664
|
-
${-a},${-o}
|
|
1665
|
-
${-a + r},${o}
|
|
1666
|
-
${a - i},${o}
|
|
1667
|
-
`.trim().replace(/\s+/g, " ");
|
|
1668
|
-
}
|
|
1669
|
-
function Z({
|
|
1670
|
-
dim_x: e,
|
|
1671
|
-
dim_y: t,
|
|
1672
|
-
fill: r = "lightgray",
|
|
1673
|
-
text: i = "",
|
|
1674
|
-
stroke_width: n = 2,
|
|
1675
|
-
rotate: s = 0,
|
|
1676
|
-
isSelected: a = !1,
|
|
1677
|
-
isHovered: o = !1,
|
|
1678
|
-
onClick: l,
|
|
1679
|
-
onMouseEnter: u,
|
|
1680
|
-
onMouseLeave: h,
|
|
1681
|
-
startPanelThk: m = 0,
|
|
1682
|
-
endPanelThk: p = 0
|
|
1683
|
-
}) {
|
|
1684
|
-
const E = wt(
|
|
1685
|
-
e,
|
|
1686
|
-
t,
|
|
1687
|
-
m,
|
|
1688
|
-
p
|
|
1689
|
-
), y = a ? "#ff6b00" : o ? "#0066ff" : "black", c = a ? n * 2 : o ? n * 1.5 : n, d = a ? 0.8 : o ? 0.7 : 0.5;
|
|
1690
|
-
return /* @__PURE__ */ O("g", { transform: `rotate(${s})`, children: [
|
|
1691
|
-
/* @__PURE__ */ f(
|
|
1692
|
-
"polygon",
|
|
1693
|
-
{
|
|
1694
|
-
points: E,
|
|
1695
|
-
stroke: y,
|
|
1696
|
-
strokeWidth: c,
|
|
1697
|
-
fill: r,
|
|
1698
|
-
strokeLinejoin: "bevel",
|
|
1699
|
-
strokeMiterlimit: "1",
|
|
1700
|
-
opacity: d,
|
|
1701
|
-
onClick: l,
|
|
1702
|
-
onMouseEnter: u,
|
|
1703
|
-
onMouseLeave: h,
|
|
1704
|
-
style: { cursor: l ? "pointer" : "default" }
|
|
1705
|
-
}
|
|
1706
|
-
),
|
|
1707
|
-
/* @__PURE__ */ f(
|
|
1708
|
-
"text",
|
|
1709
|
-
{
|
|
1710
|
-
transform: "scale(1,-1)",
|
|
1711
|
-
x: 0,
|
|
1712
|
-
y: 0,
|
|
1713
|
-
textAnchor: "middle",
|
|
1714
|
-
dominantBaseline: "middle",
|
|
1715
|
-
fontSize: 14,
|
|
1716
|
-
children: i
|
|
1717
|
-
}
|
|
1718
|
-
)
|
|
1719
|
-
] });
|
|
1720
|
-
}
|
|
1721
|
-
function Ct({ TREEID: e, dimension: t, view: r, helper: i }) {
|
|
1722
|
-
const n = i.front, s = V(F);
|
|
1723
|
-
if (!n || !s) return;
|
|
1724
|
-
const { selectedElem: a, setSelectedElem: o, hoveredElem: l, setHoveredElem: u } = s, { CPNAME: h } = n;
|
|
1725
|
-
if (!h) return null;
|
|
1726
|
-
const { elmTrimThk: m } = n, p = i.left?.thk, E = i.right?.thk, y = (n.trim.start === "S" ? p : 0) ?? 0, c = (n.trim.end === "S" ? E : 0) ?? 0, d = (n.trim.start === "M" ? p : 0) ?? 0, g = (n.trim.end === "M" ? E : 0) ?? 0, I = t.height - m.top - m.bottom + n.oversize.top + n.oversize.bottom, N = t.width - y - c + n.oversize.start + n.oversize.end, M = n.thk, D = -(n.oversize.start / 2 - n.oversize.end / 2 - y / 2 + c / 2), S = n.oversize.bottom / 2 - n.oversize.top / 2 + m.bottom / 2 - m.top / 2, T = -(t.depth / 2 - M / 2), _ = a === e, k = l === e, w = () => {
|
|
1727
|
-
console.log("handleClick", e), o(_ ? null : e);
|
|
1728
|
-
}, b = () => {
|
|
1729
|
-
u(e);
|
|
1730
|
-
}, L = () => {
|
|
1731
|
-
u(null);
|
|
1732
|
-
};
|
|
1733
|
-
return r === x._3D ? /* @__PURE__ */ f("group", { position: [D / v, T / v, S / v], rotation: [Math.PI / 2, 0, Math.PI / 2], children: /* @__PURE__ */ f(
|
|
1734
|
-
U,
|
|
1735
|
-
{
|
|
1736
|
-
length: I,
|
|
1737
|
-
width: N,
|
|
1738
|
-
thk: M,
|
|
1739
|
-
treeId: e,
|
|
1740
|
-
isSelected: _,
|
|
1741
|
-
isHovered: k,
|
|
1742
|
-
onClick: w,
|
|
1743
|
-
onPointerEnter: b,
|
|
1744
|
-
onPointerLeave: L
|
|
1745
|
-
}
|
|
1746
|
-
) }) : /* @__PURE__ */ f("g", { transform: `translate(${D},${r === x._2D_TOP ? T : S}) rotate(0)`, children: /* @__PURE__ */ f(
|
|
1747
|
-
Z,
|
|
1748
|
-
{
|
|
1749
|
-
dim_x: N,
|
|
1750
|
-
dim_y: r === x._2D_TOP ? M : I,
|
|
1751
|
-
text: "front " + I + " x " + N + " x " + M,
|
|
1752
|
-
treeId: e,
|
|
1753
|
-
isSelected: _,
|
|
1754
|
-
isHovered: k,
|
|
1755
|
-
onClick: w,
|
|
1756
|
-
onMouseEnter: b,
|
|
1757
|
-
onMouseLeave: L,
|
|
1758
|
-
startPanelThk: r === x._2D_TOP ? d : 0,
|
|
1759
|
-
endPanelThk: r === x._2D_TOP ? g : 0
|
|
1760
|
-
}
|
|
1761
|
-
) });
|
|
1762
|
-
}
|
|
1763
|
-
const J = ({ view: e = x._3D, position: t = [0, 0, 0], rotation: r = [0, 0, 0], children: i }) => {
|
|
1764
|
-
if (e === x._3D)
|
|
1765
|
-
return /* @__PURE__ */ f(
|
|
1766
|
-
"group",
|
|
1767
|
-
{
|
|
1768
|
-
position: [t[0] / v, t[1] / v, t[2] / v],
|
|
1769
|
-
rotation: r,
|
|
1770
|
-
children: i
|
|
1771
|
-
}
|
|
1772
|
-
);
|
|
1773
|
-
const n = t[0], s = e === x._2D_TOP ? t[1] : t[2], a = r[2] * (180 / Math.PI);
|
|
1774
|
-
return /* @__PURE__ */ f("g", { transform: `translate(${n},${s}) rotate(${a})`, children: i });
|
|
1775
|
-
};
|
|
1776
|
-
function Lt({ TREEID: e, dimension: t, view: r, helper: i }) {
|
|
1777
|
-
const n = i.left, s = V(F);
|
|
1778
|
-
if (!n || !s) return;
|
|
1779
|
-
const { selectedElem: a, setSelectedElem: o, hoveredElem: l, setHoveredElem: u } = s, { CPNAME: h } = n;
|
|
1780
|
-
if (!h) return null;
|
|
1781
|
-
const { elmTrimThk: m } = n, p = i.back?.thk, E = i.front?.thk, y = (n.trim.start === "S" ? p : 0) ?? 0, c = (n.trim.end === "S" ? E : 0) ?? 0, d = (n.trim.start === "M" ? p : 0) ?? 0, g = (n.trim.end === "M" ? E : 0) ?? 0, I = t.height - m.top - m.bottom + n.oversize.top + n.oversize.bottom, N = t.depth - y - c + n.oversize.start + n.oversize.end, M = n.thk, D = -(t.width / 2 - M / 2), S = n.oversize.start / 2 - n.oversize.end / 2 - y / 2 + c / 2, T = n.oversize.bottom / 2 - n.oversize.top / 2 + m.bottom / 2 - m.top / 2, _ = a === e, k = l === e, w = () => {
|
|
1782
|
-
o(_ ? null : e);
|
|
1783
|
-
}, b = () => {
|
|
1784
|
-
u(e);
|
|
1785
|
-
}, L = () => {
|
|
1786
|
-
u(null);
|
|
1787
|
-
};
|
|
1788
|
-
return r === x._3D ? /* @__PURE__ */ f("group", { position: [D / v, S / v, T / v], rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ f(
|
|
1789
|
-
U,
|
|
1790
|
-
{
|
|
1791
|
-
length: I,
|
|
1792
|
-
width: N,
|
|
1793
|
-
thk: M,
|
|
1794
|
-
treeId: e,
|
|
1795
|
-
isSelected: _,
|
|
1796
|
-
isHovered: k,
|
|
1797
|
-
onClick: w,
|
|
1798
|
-
onPointerEnter: b,
|
|
1799
|
-
onPointerLeave: L
|
|
1800
|
-
}
|
|
1801
|
-
) }) : /* @__PURE__ */ f("g", { transform: `translate(${D},${r === x._2D_TOP ? S : T}) rotate(90)`, children: /* @__PURE__ */ f(
|
|
1802
|
-
Z,
|
|
1803
|
-
{
|
|
1804
|
-
dim_x: r === x._2D_TOP ? N : I,
|
|
1805
|
-
dim_y: M,
|
|
1806
|
-
text: "left " + I + " x " + N + " x " + M,
|
|
1807
|
-
treeId: e,
|
|
1808
|
-
rotate: 180,
|
|
1809
|
-
isSelected: _,
|
|
1810
|
-
isHovered: k,
|
|
1811
|
-
onClick: w,
|
|
1812
|
-
onMouseEnter: b,
|
|
1813
|
-
onMouseLeave: L,
|
|
1814
|
-
startPanelThk: r === x._2D_TOP ? d : 0,
|
|
1815
|
-
endPanelThk: r === x._2D_TOP ? g : 0
|
|
1816
|
-
}
|
|
1817
|
-
) });
|
|
1818
|
-
}
|
|
1819
|
-
function Ot({ TREEID: e, dimension: t, view: r, helper: i }) {
|
|
1820
|
-
const n = i.back, s = V(F);
|
|
1821
|
-
if (!n || !s) return;
|
|
1822
|
-
const { selectedElem: a, setSelectedElem: o, hoveredElem: l, setHoveredElem: u } = s, { CPNAME: h } = n;
|
|
1823
|
-
if (!h) return null;
|
|
1824
|
-
const { elmTrimThk: m } = n, p = i.right?.thk, E = i.left?.thk, y = (n.trim.start === "S" ? p : 0) ?? 0, c = (n.trim.end === "S" ? E : 0) ?? 0, d = (n.trim.start === "M" ? p : 0) ?? 0, g = (n.trim.end === "M" ? E : 0) ?? 0, I = t.height - m.top - m.bottom + n.oversize.top + n.oversize.bottom, N = t.width - y - c + n.oversize.start + n.oversize.end, M = n.thk, D = n.oversize.start / 2 - n.oversize.end / 2 - y / 2 + c / 2, S = t.depth / 2 - M / 2, T = n.oversize.bottom / 2 - n.oversize.top / 2 + m.bottom / 2 - m.top / 2, _ = a === e, k = l === e, w = () => {
|
|
1825
|
-
o(_ ? null : e);
|
|
1826
|
-
}, b = () => {
|
|
1827
|
-
u(e);
|
|
1828
|
-
}, L = () => {
|
|
1829
|
-
u(null);
|
|
1830
|
-
};
|
|
1831
|
-
return r === x._3D ? /* @__PURE__ */ O("group", { position: [D / v, S / v, T / v], rotation: [Math.PI / 2, 0, Math.PI / 2], children: [
|
|
1832
|
-
/* @__PURE__ */ f(
|
|
1833
|
-
U,
|
|
1834
|
-
{
|
|
1835
|
-
length: I,
|
|
1836
|
-
width: N,
|
|
1837
|
-
thk: M,
|
|
1838
|
-
treeId: e,
|
|
1839
|
-
isSelected: _,
|
|
1840
|
-
isHovered: k,
|
|
1841
|
-
onClick: w,
|
|
1842
|
-
onPointerEnter: b,
|
|
1843
|
-
onPointerLeave: L
|
|
1844
|
-
}
|
|
1845
|
-
),
|
|
1846
|
-
/* @__PURE__ */ f(Ye, { position: [0, 0, 0], color: "blue", fontSize: 20, children: e })
|
|
1847
|
-
] }) : /* @__PURE__ */ f("g", { transform: `translate(${D},${r === x._2D_TOP ? S : T}) rotate(0)`, children: /* @__PURE__ */ f(
|
|
1848
|
-
Z,
|
|
1849
|
-
{
|
|
1850
|
-
dim_x: N,
|
|
1851
|
-
dim_y: r === x._2D_TOP ? M : I,
|
|
1852
|
-
text: "Back " + I + " x " + N + " x " + M,
|
|
1853
|
-
treeId: e,
|
|
1854
|
-
isSelected: _,
|
|
1855
|
-
rotate: 180,
|
|
1856
|
-
isHovered: k,
|
|
1857
|
-
onClick: w,
|
|
1858
|
-
onMouseEnter: b,
|
|
1859
|
-
onMouseLeave: L,
|
|
1860
|
-
startPanelThk: r === x._2D_TOP ? d : 0,
|
|
1861
|
-
endPanelThk: r === x._2D_TOP ? g : 0
|
|
1862
|
-
}
|
|
1863
|
-
) });
|
|
1864
|
-
}
|
|
1865
|
-
function Pt({ TREEID: e, dimension: t, view: r, helper: i }) {
|
|
1866
|
-
const n = i.right, s = V(F);
|
|
1867
|
-
if (!n || !s) return;
|
|
1868
|
-
const { selectedElem: a, setSelectedElem: o, hoveredElem: l, setHoveredElem: u } = s, { CPNAME: h } = n;
|
|
1869
|
-
if (!h) return null;
|
|
1870
|
-
const { elmTrimThk: m } = n, p = i.front?.thk, E = i.back?.thk, y = (n.trim.start === "S" ? p : 0) ?? 0, c = (n.trim.end === "S" ? E : 0) ?? 0, d = (n.trim.start === "M" ? p : 0) ?? 0, g = (n.trim.end === "M" ? E : 0) ?? 0, I = t.height - m.top - m.bottom + n.oversize.top + n.oversize.bottom, N = t.depth - y - c + n.oversize.start + n.oversize.end, M = n.thk, D = t.width / 2 - M / 2, S = -(n.oversize.start / 2 - n.oversize.end / 2 - y / 2 + c / 2), T = n.oversize.bottom / 2 + n.oversize.top / 2 + m.bottom / 2 - m.top / 2, _ = a === e, k = l === e, w = () => {
|
|
1871
|
-
o(_ ? null : e);
|
|
1872
|
-
}, b = () => {
|
|
1873
|
-
u(e);
|
|
1874
|
-
}, L = () => {
|
|
1875
|
-
u(null);
|
|
1876
|
-
};
|
|
1877
|
-
return r === x._3D ? /* @__PURE__ */ f("group", { position: [D / v, S / v, T / v], rotation: [0, Math.PI / 2, 0], children: /* @__PURE__ */ f(
|
|
1878
|
-
U,
|
|
1879
|
-
{
|
|
1880
|
-
length: I,
|
|
1881
|
-
width: N,
|
|
1882
|
-
thk: M,
|
|
1883
|
-
treeId: e,
|
|
1884
|
-
isSelected: _,
|
|
1885
|
-
isHovered: k,
|
|
1886
|
-
onClick: w,
|
|
1887
|
-
onPointerEnter: b,
|
|
1888
|
-
onPointerLeave: L
|
|
1889
|
-
}
|
|
1890
|
-
) }) : /* @__PURE__ */ f("g", { transform: `translate(${D},${r === x._2D_TOP ? S : T}) rotate(90)`, children: /* @__PURE__ */ f(
|
|
1891
|
-
Z,
|
|
1892
|
-
{
|
|
1893
|
-
dim_x: r === x._2D_TOP ? N : I,
|
|
1894
|
-
dim_y: M,
|
|
1895
|
-
text: "right " + I + " x " + N + " x " + M,
|
|
1896
|
-
treeId: e,
|
|
1897
|
-
isSelected: _,
|
|
1898
|
-
isHovered: k,
|
|
1899
|
-
onClick: w,
|
|
1900
|
-
onMouseEnter: b,
|
|
1901
|
-
onMouseLeave: L,
|
|
1902
|
-
startPanelThk: r === x._2D_TOP ? d : 0,
|
|
1903
|
-
endPanelThk: r === x._2D_TOP ? g : 0
|
|
1904
|
-
}
|
|
1905
|
-
) });
|
|
1906
|
-
}
|
|
1907
|
-
function Vt({ TREEID: e, dimension: t, view: r, helper: i }) {
|
|
1908
|
-
const n = ue(e), s = V(F);
|
|
1909
|
-
if (!n || !s) return;
|
|
1910
|
-
const { selectedElem: a, setSelectedElem: o, hoveredElem: l, setHoveredElem: u } = s, { topShelfCP: h } = n;
|
|
1911
|
-
if (!h) return;
|
|
1912
|
-
const m = (i.front?.trim.top !== "S" ? i.front?.thk : 0) ?? 0, p = (i.back?.trim.top !== "S" ? i.back?.thk : 0) ?? 0, E = (i.left?.trim.top !== "S" ? i.left?.thk : 0) ?? 0, y = (i.right?.trim.top !== "S" ? i.right?.thk : 0) ?? 0, c = t.width - E - y, d = t.depth - p - m, g = n.topShelfThk, I = E / 2 - y / 2, N = -(p / 2 - m / 2), M = t.height / 2 - g / 2, D = a === e, S = l === e, T = () => {
|
|
1913
|
-
o(D ? null : e);
|
|
1914
|
-
}, _ = () => {
|
|
1915
|
-
u(e);
|
|
1916
|
-
}, k = () => {
|
|
1917
|
-
u(null);
|
|
1918
|
-
};
|
|
1919
|
-
return r === x._3D ? /* @__PURE__ */ f("group", { position: [I / v, N / v, M / v], rotation: [0, 0, 0], children: /* @__PURE__ */ f(
|
|
1920
|
-
U,
|
|
1921
|
-
{
|
|
1922
|
-
length: c,
|
|
1923
|
-
width: d,
|
|
1924
|
-
thk: g,
|
|
1925
|
-
opacity: 0.8,
|
|
1926
|
-
treeId: e,
|
|
1927
|
-
isSelected: D,
|
|
1928
|
-
isHovered: S,
|
|
1929
|
-
onClick: T,
|
|
1930
|
-
onPointerEnter: _,
|
|
1931
|
-
onPointerLeave: k
|
|
1932
|
-
}
|
|
1933
|
-
) }) : /* @__PURE__ */ f("g", { transform: `translate(${I},${r === x._2D_TOP ? N : M})`, children: /* @__PURE__ */ f(
|
|
1934
|
-
Z,
|
|
1935
|
-
{
|
|
1936
|
-
dim_x: c,
|
|
1937
|
-
dim_y: r === x._2D_TOP ? d : g,
|
|
1938
|
-
text: "Top " + e + " -- " + c + " x " + d + " x " + g,
|
|
1939
|
-
treeId: e,
|
|
1940
|
-
isSelected: D,
|
|
1941
|
-
isHovered: S,
|
|
1942
|
-
onClick: T,
|
|
1943
|
-
onMouseEnter: _,
|
|
1944
|
-
onMouseLeave: k
|
|
1945
|
-
}
|
|
1946
|
-
) });
|
|
1947
|
-
}
|
|
1948
|
-
function Rt({ TREEID: e, dimension: t, view: r, helper: i }) {
|
|
1949
|
-
const n = ue(e), s = V(F);
|
|
1950
|
-
if (!n || !s) return;
|
|
1951
|
-
const { selectedElem: a, setSelectedElem: o, hoveredElem: l, setHoveredElem: u } = s, { bottomShelfCP: h } = n;
|
|
1952
|
-
if (!h) return;
|
|
1953
|
-
const m = (i.front?.trim.bottom !== "S" ? i.front?.thk : 0) ?? 0, p = (i.back?.trim.bottom !== "S" ? i.back?.thk : 0) ?? 0, E = (i.left?.trim.bottom !== "S" ? i.left?.thk : 0) ?? 0, y = (i.right?.trim.bottom !== "S" ? i.right?.thk : 0) ?? 0, c = t.width - E - y, d = t.depth - p - m, g = n.bottomShelfThk, I = E / 2 - y / 2, N = -(p / 2 - m / 2), M = -(t.height / 2 - g / 2), D = a === e, S = l === e, T = () => {
|
|
1954
|
-
o(D ? null : e);
|
|
1955
|
-
}, _ = () => {
|
|
1956
|
-
u(e);
|
|
1957
|
-
}, k = () => {
|
|
1958
|
-
u(null);
|
|
1959
|
-
};
|
|
1960
|
-
return r === x._3D ? /* @__PURE__ */ f("group", { position: [I / v, N / v, M / v], rotation: [0, 0, 0], children: /* @__PURE__ */ f(
|
|
1961
|
-
U,
|
|
1962
|
-
{
|
|
1963
|
-
length: c,
|
|
1964
|
-
width: d,
|
|
1965
|
-
thk: g,
|
|
1966
|
-
opacity: 0.8,
|
|
1967
|
-
treeId: e,
|
|
1968
|
-
isSelected: D,
|
|
1969
|
-
isHovered: S,
|
|
1970
|
-
onClick: T,
|
|
1971
|
-
onPointerEnter: _,
|
|
1972
|
-
onPointerLeave: k
|
|
1973
|
-
}
|
|
1974
|
-
) }) : /* @__PURE__ */ f("g", { transform: `translate(${I},${r === x._2D_TOP ? N : M})`, children: /* @__PURE__ */ f(
|
|
1975
|
-
Z,
|
|
1976
|
-
{
|
|
1977
|
-
dim_x: c,
|
|
1978
|
-
dim_y: r === x._2D_TOP ? d : g,
|
|
1979
|
-
text: "Bot " + c + " x " + d + " x " + g,
|
|
1980
|
-
treeId: e,
|
|
1981
|
-
isSelected: D,
|
|
1982
|
-
isHovered: S,
|
|
1983
|
-
onClick: T,
|
|
1984
|
-
onMouseEnter: _,
|
|
1985
|
-
onMouseLeave: k
|
|
1986
|
-
}
|
|
1987
|
-
) });
|
|
1988
|
-
}
|
|
1989
|
-
function $t() {
|
|
1990
|
-
const e = V(De);
|
|
1991
|
-
if (!e)
|
|
1992
|
-
throw new Error(
|
|
1993
|
-
"useDescriptorManager must be used within a DescriptorProvider"
|
|
1994
|
-
);
|
|
1995
|
-
return e;
|
|
1996
|
-
}
|
|
1997
|
-
function Ft(e, t, r, i = {}) {
|
|
1998
|
-
const { throwOnError: n = !1 } = i;
|
|
1999
|
-
if (!e.hasDescriptor(t))
|
|
2000
|
-
throw new Error(`Descriptor ${t} not found`);
|
|
2001
|
-
return $(() => {
|
|
2002
|
-
try {
|
|
2003
|
-
return {
|
|
2004
|
-
result: e.evaluate(t, r),
|
|
2005
|
-
error: null,
|
|
2006
|
-
success: !0
|
|
2007
|
-
};
|
|
2008
|
-
} catch (s) {
|
|
2009
|
-
const a = s instanceof Error ? s.message : "Unknown error";
|
|
2010
|
-
if (n)
|
|
2011
|
-
throw s;
|
|
2012
|
-
return {
|
|
2013
|
-
result: null,
|
|
2014
|
-
error: a,
|
|
2015
|
-
success: !1
|
|
2016
|
-
};
|
|
2017
|
-
}
|
|
2018
|
-
}, [e, t, r, n]);
|
|
2019
|
-
}
|
|
2020
|
-
function sr(e, t, r) {
|
|
2021
|
-
return $(() => {
|
|
2022
|
-
try {
|
|
2023
|
-
const i = e.findAllMatches(t, r);
|
|
2024
|
-
return {
|
|
2025
|
-
matches: i,
|
|
2026
|
-
error: null,
|
|
2027
|
-
count: i.length
|
|
2028
|
-
};
|
|
2029
|
-
} catch (i) {
|
|
2030
|
-
const n = i instanceof Error ? i.message : "Unknown error";
|
|
2031
|
-
return {
|
|
2032
|
-
matches: [],
|
|
2033
|
-
error: n,
|
|
2034
|
-
count: 0
|
|
2035
|
-
};
|
|
2036
|
-
}
|
|
2037
|
-
}, [e, t, r]);
|
|
2038
|
-
}
|
|
2039
|
-
const R = {
|
|
2040
|
-
LINEAR_DIVISION: "linear-division",
|
|
2041
|
-
ARTICLE: "article"
|
|
2042
|
-
}, B = {
|
|
2043
|
-
STRING: "string",
|
|
2044
|
-
// Direct value
|
|
2045
|
-
DESCRIPTOR: "descriptor"
|
|
2046
|
-
// Value from descriptor evaluation
|
|
2047
|
-
}, ye = {
|
|
2048
|
-
// Check if divider is linear division (any source)
|
|
2049
|
-
linearDivision: (e) => e.type === R.LINEAR_DIVISION,
|
|
2050
|
-
// Check if divider is article (any source)
|
|
2051
|
-
article: (e) => e.type === R.ARTICLE
|
|
2052
|
-
}, zt = {
|
|
2053
|
-
// Check if linear division uses direct string formula
|
|
2054
|
-
string: (e) => e.type === R.LINEAR_DIVISION && e.valueSource === B.STRING,
|
|
2055
|
-
// Check if linear division uses descriptor
|
|
2056
|
-
descriptor: (e) => e.type === R.LINEAR_DIVISION && e.valueSource === B.DESCRIPTOR
|
|
2057
|
-
}, oe = {
|
|
2058
|
-
// Check if article uses direct string name
|
|
2059
|
-
string: (e) => e.type === R.ARTICLE && e.valueSource === B.STRING,
|
|
2060
|
-
// Check if article uses descriptor
|
|
2061
|
-
descriptor: (e) => e.type === R.ARTICLE && e.valueSource === B.DESCRIPTOR
|
|
2062
|
-
}, q = {
|
|
2063
|
-
// Create a linear division with string formula
|
|
2064
|
-
linearDivisionString(e, t, r, i, n, s, a, o) {
|
|
2065
|
-
return {
|
|
2066
|
-
TREEID: e,
|
|
2067
|
-
type: R.LINEAR_DIVISION,
|
|
2068
|
-
valueSource: B.STRING,
|
|
2069
|
-
DIVDIR: t,
|
|
2070
|
-
DIVTYPE: r,
|
|
2071
|
-
HORDEFTYPE: i,
|
|
2072
|
-
LINDIV1: n,
|
|
2073
|
-
DIVELEM1: s,
|
|
2074
|
-
DIVIDER: "",
|
|
2075
|
-
formula: a,
|
|
2076
|
-
thickness: o
|
|
2077
|
-
};
|
|
2078
|
-
},
|
|
2079
|
-
// Create a linear division with descriptor reference
|
|
2080
|
-
// Create linear division with descriptor reference
|
|
2081
|
-
linearDivisionDescriptor(e, t, r, i, n, s, a, o) {
|
|
2082
|
-
return {
|
|
2083
|
-
TREEID: e,
|
|
2084
|
-
type: R.LINEAR_DIVISION,
|
|
2085
|
-
valueSource: B.DESCRIPTOR,
|
|
2086
|
-
DIVDIR: t,
|
|
2087
|
-
DIVTYPE: r,
|
|
2088
|
-
HORDEFTYPE: i,
|
|
2089
|
-
LINDIV1: n,
|
|
2090
|
-
DIVELEM1: s,
|
|
2091
|
-
DIVIDER: "",
|
|
2092
|
-
descriptorName: a,
|
|
2093
|
-
thickness: o
|
|
2094
|
-
};
|
|
2095
|
-
},
|
|
2096
|
-
// Create an article divider
|
|
2097
|
-
// Create article with direct name string
|
|
2098
|
-
articleString(e, t, r, i, n, s, a) {
|
|
2099
|
-
return {
|
|
2100
|
-
TREEID: e,
|
|
2101
|
-
type: R.ARTICLE,
|
|
2102
|
-
valueSource: B.STRING,
|
|
2103
|
-
DIVDIR: t,
|
|
2104
|
-
DIVTYPE: r,
|
|
2105
|
-
HORDEFTYPE: i,
|
|
2106
|
-
LINDIV1: n,
|
|
2107
|
-
DIVELEM1: s,
|
|
2108
|
-
DIVIDER: a,
|
|
2109
|
-
articleName: a
|
|
2110
|
-
};
|
|
2111
|
-
},
|
|
2112
|
-
// Create article with descriptor reference
|
|
2113
|
-
articleDescriptor(e, t, r, i, n, s, a) {
|
|
2114
|
-
return {
|
|
2115
|
-
TREEID: e,
|
|
2116
|
-
type: R.ARTICLE,
|
|
2117
|
-
valueSource: B.DESCRIPTOR,
|
|
2118
|
-
DIVDIR: t,
|
|
2119
|
-
DIVTYPE: r,
|
|
2120
|
-
HORDEFTYPE: i,
|
|
2121
|
-
LINDIV1: n,
|
|
2122
|
-
DIVELEM1: s,
|
|
2123
|
-
DIVIDER: a,
|
|
2124
|
-
descriptorName: a
|
|
2125
|
-
};
|
|
2126
|
-
},
|
|
2127
|
-
// Smart factory: Automatically determines type and source
|
|
2128
|
-
fromZoneData(e, t) {
|
|
2129
|
-
const r = (i) => i.trim().startsWith("#");
|
|
2130
|
-
if (e.DIVDIR === "A") {
|
|
2131
|
-
if (r(e.DIVIDER)) {
|
|
2132
|
-
const i = e.DIVIDER.replace("#", "").trim();
|
|
2133
|
-
return q.articleDescriptor(
|
|
2134
|
-
e.TREEID,
|
|
2135
|
-
e.DIVDIR,
|
|
2136
|
-
e.DIVTYPE,
|
|
2137
|
-
e.HORDEFTYPE,
|
|
2138
|
-
e.LINDIV1,
|
|
2139
|
-
e.DIVELEM1,
|
|
2140
|
-
i
|
|
2141
|
-
);
|
|
2142
|
-
}
|
|
2143
|
-
return q.articleString(
|
|
2144
|
-
e.TREEID,
|
|
2145
|
-
e.DIVDIR,
|
|
2146
|
-
e.DIVTYPE,
|
|
2147
|
-
e.HORDEFTYPE,
|
|
2148
|
-
e.LINDIV1,
|
|
2149
|
-
e.DIVELEM1,
|
|
2150
|
-
e.DIVIDER
|
|
2151
|
-
);
|
|
2152
|
-
}
|
|
2153
|
-
if (r(e.LINDIV1)) {
|
|
2154
|
-
const i = e.LINDIV1.replace("#", "").trim();
|
|
2155
|
-
return q.linearDivisionDescriptor(
|
|
2156
|
-
e.TREEID,
|
|
2157
|
-
e.DIVDIR,
|
|
2158
|
-
e.DIVTYPE,
|
|
2159
|
-
e.HORDEFTYPE,
|
|
2160
|
-
e.LINDIV1,
|
|
2161
|
-
e.DIVELEM1,
|
|
2162
|
-
i,
|
|
2163
|
-
t
|
|
2164
|
-
);
|
|
2165
|
-
}
|
|
2166
|
-
return q.linearDivisionString(
|
|
2167
|
-
e.TREEID,
|
|
2168
|
-
e.DIVDIR,
|
|
2169
|
-
e.DIVTYPE,
|
|
2170
|
-
e.HORDEFTYPE,
|
|
2171
|
-
e.LINDIV1,
|
|
2172
|
-
e.DIVELEM1,
|
|
2173
|
-
e.LINDIV1,
|
|
2174
|
-
t
|
|
2175
|
-
);
|
|
2176
|
-
}
|
|
2177
|
-
};
|
|
2178
|
-
function Gt(e) {
|
|
2179
|
-
if (!e) return "width";
|
|
2180
|
-
const t = {
|
|
2181
|
-
0: "width",
|
|
2182
|
-
1: "depth",
|
|
2183
|
-
2: "width",
|
|
2184
|
-
3: "depth"
|
|
2185
|
-
};
|
|
2186
|
-
return e.DIVDIR === "V" ? "height" : e.HORDEFTYPE === "W" ? "width" : e.HORDEFTYPE === "D" ? "depth" : e.HORDEFTYPE === "P" ? t[e.DIVELEM1] ?? "width" : "width";
|
|
2187
|
-
}
|
|
2188
|
-
function Bt(e, t) {
|
|
2189
|
-
return t ? t[e] : 0;
|
|
2190
|
-
}
|
|
2191
|
-
function Ht(e, t) {
|
|
2192
|
-
const r = e;
|
|
2193
|
-
if (Kt(e))
|
|
2194
|
-
return {
|
|
2195
|
-
value: e.startsWith("#") ? e.slice(1) : e,
|
|
2196
|
-
original: r,
|
|
2197
|
-
isReference: !0
|
|
2198
|
-
};
|
|
2199
|
-
if (/^\d+:\d+$/.test(e))
|
|
2200
|
-
return {
|
|
2201
|
-
value: e,
|
|
2202
|
-
original: r,
|
|
2203
|
-
isReference: !1
|
|
2204
|
-
};
|
|
2205
|
-
const { format: i, expression: n, suffix: s } = Zt(e);
|
|
2206
|
-
let a = n;
|
|
2207
|
-
a = a.replace(/^\((.+)\)$/, "$1");
|
|
2208
|
-
const l = we(a, {
|
|
2209
|
-
variableTree: t,
|
|
2210
|
-
allowFunctions: !0,
|
|
2211
|
-
// Enable round(), floor(), etc.
|
|
2212
|
-
dataType: "FL",
|
|
2213
|
-
silent: !0
|
|
2214
|
-
}).value ?? n;
|
|
2215
|
-
let u;
|
|
2216
|
-
switch (i) {
|
|
2217
|
-
case "expr:ratio":
|
|
2218
|
-
u = `${l}${s}`;
|
|
2219
|
-
break;
|
|
2220
|
-
case "ratio:expr":
|
|
2221
|
-
u = `${s}${l}`;
|
|
2222
|
-
break;
|
|
2223
|
-
case "expr*{ratio}":
|
|
2224
|
-
u = `${l}${s}`;
|
|
2225
|
-
break;
|
|
2226
|
-
case "simple":
|
|
2227
|
-
u = String(l);
|
|
2228
|
-
break;
|
|
2229
|
-
}
|
|
2230
|
-
return {
|
|
2231
|
-
value: u,
|
|
2232
|
-
original: r,
|
|
2233
|
-
isReference: !1
|
|
2234
|
-
};
|
|
2235
|
-
}
|
|
2236
|
-
function Ut(e, t) {
|
|
2237
|
-
return Ht(e, t).value;
|
|
2238
|
-
}
|
|
2239
|
-
function Zt(e) {
|
|
2240
|
-
const r = e.trim().replace(/^\((.+)\)$/, "$1"), i = r.match(/^(\d+|n):(.+?)(mm|cm)?$/);
|
|
2241
|
-
if (i) {
|
|
2242
|
-
const [, a, o, l] = i;
|
|
2243
|
-
return {
|
|
2244
|
-
format: "ratio:expr",
|
|
2245
|
-
expression: o.trim(),
|
|
2246
|
-
suffix: l ? `${a}:${l}` : `${a}:`
|
|
2247
|
-
};
|
|
2248
|
-
}
|
|
2249
|
-
const n = r.match(/^(.+?)(mm|cm)?:(\d+)$/);
|
|
2250
|
-
if (n) {
|
|
2251
|
-
const [, a, o, l] = n;
|
|
2252
|
-
return {
|
|
2253
|
-
format: "expr:ratio",
|
|
2254
|
-
expression: a.trim(),
|
|
2255
|
-
suffix: o ? `${o}:${l}` : `:${l}`
|
|
2256
|
-
};
|
|
2257
|
-
}
|
|
2258
|
-
const s = r.match(/^(.+?)(\*)?{(\d+)}$/);
|
|
2259
|
-
if (s) {
|
|
2260
|
-
const [, a, o, l] = s;
|
|
2261
|
-
return {
|
|
2262
|
-
format: "expr*{ratio}",
|
|
2263
|
-
expression: a.trim(),
|
|
2264
|
-
suffix: o ? `*{${l}}` : `{${l}}`
|
|
2265
|
-
};
|
|
2266
|
-
}
|
|
2267
|
-
return {
|
|
2268
|
-
format: "simple",
|
|
2269
|
-
expression: r,
|
|
2270
|
-
suffix: ""
|
|
2271
|
-
};
|
|
2272
|
-
}
|
|
2273
|
-
function Kt(e) {
|
|
2274
|
-
return e.startsWith("#") ? !0 : e.includes("(") || /[+\-*/]/.test(e) ? !1 : /^[A-Za-z0-9_-]+$/.test(e) ? !0 : !/^\d+:\d+$/.test(e);
|
|
2275
|
-
}
|
|
2276
|
-
function Yt({ divider: e, inputData: t }) {
|
|
2277
|
-
const r = $t(), { resolveString: i } = j(), { result: n, error: s } = Ft(r, e.descriptorName, t, { throwOnError: !1 }), a = $(() => e ? oe.string(e) ? e.articleName : oe.descriptor(e) && n?.lindiv ? n.lindiv : "" : "", [e, n]);
|
|
2278
|
-
return {
|
|
2279
|
-
updatedDivider: $(() => {
|
|
2280
|
-
if (e)
|
|
2281
|
-
return n?.lindiv != null ? {
|
|
2282
|
-
...e,
|
|
2283
|
-
LINDIV1: Ut(i(n.lindiv)),
|
|
2284
|
-
// Replace the descriptor reference with actual formula
|
|
2285
|
-
articleName: a
|
|
2286
|
-
} : { ...e, LINDIV1: i(e.LINDIV1) };
|
|
2287
|
-
}, [e, n, a, i])
|
|
2288
|
-
};
|
|
2289
|
-
}
|
|
2290
|
-
const Wt = {
|
|
2291
|
-
width: {
|
|
2292
|
-
rotation: [0, Math.PI / 2, 0],
|
|
2293
|
-
get3D: (e, t) => ({ length: e.height, width: e.depth, thk: t }),
|
|
2294
|
-
get2DTop: (e, t) => ({ dim_x: e.depth, dim_y: t, rotate: 90 }),
|
|
2295
|
-
get2DFront: (e, t) => ({ dim_x: e.height, dim_y: t, rotate: 90 })
|
|
2296
|
-
},
|
|
2297
|
-
height: {
|
|
2298
|
-
rotation: [0, 0, 0],
|
|
2299
|
-
get3D: (e, t) => ({ length: e.width, width: e.depth, thk: t }),
|
|
2300
|
-
get2DTop: (e) => ({ dim_x: e.width, dim_y: e.depth }),
|
|
2301
|
-
get2DFront: (e, t) => ({ dim_x: e.width, dim_y: t })
|
|
2302
|
-
},
|
|
2303
|
-
depth: {
|
|
2304
|
-
rotation: [Math.PI / 2, 0, Math.PI / 2],
|
|
2305
|
-
get3D: (e, t) => ({ length: e.height, width: e.width, thk: t }),
|
|
2306
|
-
get2DTop: (e, t) => ({ dim_x: e.width, dim_y: t }),
|
|
2307
|
-
get2DFront: (e) => ({ dim_x: e.width, dim_y: e.height })
|
|
2308
|
-
},
|
|
2309
|
-
article: {
|
|
2310
|
-
rotation: [0, 0, 0],
|
|
2311
|
-
get3D: (e, t) => ({ length: e.width, width: e.depth, thk: t }),
|
|
2312
|
-
get2DTop: (e) => ({ dim_x: e.width, dim_y: e.depth }),
|
|
2313
|
-
get2DFront: (e, t) => ({ dim_x: e.width, dim_y: t })
|
|
2314
|
-
},
|
|
2315
|
-
independent: {
|
|
2316
|
-
rotation: [0, 0, 0],
|
|
2317
|
-
get3D: (e, t) => ({ length: e.width, width: e.depth, thk: t }),
|
|
2318
|
-
get2DTop: (e) => ({ dim_x: e.width, dim_y: e.depth }),
|
|
2319
|
-
get2DFront: (e, t) => ({ dim_x: e.width, dim_y: t })
|
|
2320
|
-
}
|
|
2321
|
-
}, Xt = (e, t, r) => ({
|
|
2322
|
-
x: e === "width" ? r.width / 2 + t / 2 : 0,
|
|
2323
|
-
y: e === "depth" ? r.depth / 2 + t / 2 : 0,
|
|
2324
|
-
z: e === "height" ? r.height / 2 + t / 2 : 0
|
|
2325
|
-
});
|
|
2326
|
-
function jt({ divider: e, view: t, childrenPositon: r, dividerThk: i }) {
|
|
2327
|
-
const n = V(F), s = r.dividerType, a = r.childPositions, o = Wt[s];
|
|
2328
|
-
if (!n) return null;
|
|
2329
|
-
const { selectedElem: l, setSelectedElem: u, hoveredElem: h, setHoveredElem: m } = n;
|
|
2330
|
-
return a.map((p, E) => {
|
|
2331
|
-
const c = !(E === a.length - 1) && i !== 0, d = Xt(s, i, p.zone_dims), g = o.get3D(p.zone_dims, i), I = t === x._2D_TOP ? o.get2DTop(p.zone_dims, i) : o.get2DFront(p.zone_dims, i), N = `${e.TREEID} divider`, M = l === N, D = h === N;
|
|
2332
|
-
return /* @__PURE__ */ f(Ze, { children: /* @__PURE__ */ O(J, { view: t, position: [p.x / v, p.y / v, p.z / v], children: [
|
|
2333
|
-
/* @__PURE__ */ f(J, { view: t, position: [d.x / v, d.y / v, d.z / v], rotation: o.rotation, children: c && /* @__PURE__ */ O(pe, { children: [
|
|
2334
|
-
/* @__PURE__ */ f("group", { children: /* @__PURE__ */ O("mesh", { children: [
|
|
2335
|
-
/* @__PURE__ */ f(
|
|
2336
|
-
"boxGeometry",
|
|
2337
|
-
{
|
|
2338
|
-
args: [g.length, g.width, g.thk]
|
|
2339
|
-
}
|
|
2340
|
-
),
|
|
2341
|
-
/* @__PURE__ */ f("meshStandardMaterial", { color: "blue", transparent: !0, opacity: 0.3 })
|
|
2342
|
-
] }) }),
|
|
2343
|
-
t === x._3D ? /* @__PURE__ */ f(
|
|
2344
|
-
U,
|
|
2345
|
-
{
|
|
2346
|
-
...g,
|
|
2347
|
-
opacity: 1,
|
|
2348
|
-
treeId: N,
|
|
2349
|
-
isSelected: M,
|
|
2350
|
-
isHovered: D,
|
|
2351
|
-
onClick: () => u(M ? null : N),
|
|
2352
|
-
onPointerEnter: () => m(N),
|
|
2353
|
-
onPointerLeave: () => m(null)
|
|
2354
|
-
}
|
|
2355
|
-
) : /* @__PURE__ */ f(
|
|
2356
|
-
Z,
|
|
2357
|
-
{
|
|
2358
|
-
...I,
|
|
2359
|
-
text: N,
|
|
2360
|
-
treeId: N,
|
|
2361
|
-
isSelected: M,
|
|
2362
|
-
isHovered: D,
|
|
2363
|
-
onClick: () => u(M ? null : N),
|
|
2364
|
-
onMouseEnter: () => m(N),
|
|
2365
|
-
onMouseLeave: () => m(null)
|
|
2366
|
-
}
|
|
2367
|
-
)
|
|
2368
|
-
] }) }),
|
|
2369
|
-
/* @__PURE__ */ f(ze, { TREEID: p.TREEID, dimension: p.zone_dims, view: t })
|
|
2370
|
-
] }) }, E);
|
|
2371
|
-
});
|
|
2372
|
-
}
|
|
2373
|
-
function qt({ view: e, remainingZone: t, articleName: r }) {
|
|
2374
|
-
return /* @__PURE__ */ f(
|
|
2375
|
-
be,
|
|
2376
|
-
{
|
|
2377
|
-
articleName: r,
|
|
2378
|
-
dimensionOverrides: {
|
|
2379
|
-
width: t.dimensions.width,
|
|
2380
|
-
height: t.dimensions.height,
|
|
2381
|
-
depth: t.dimensions.depth
|
|
2382
|
-
},
|
|
2383
|
-
children: /* @__PURE__ */ f(
|
|
2384
|
-
J,
|
|
2385
|
-
{
|
|
2386
|
-
view: e,
|
|
2387
|
-
position: [
|
|
2388
|
-
t.position.x / v,
|
|
2389
|
-
t.position.y / v,
|
|
2390
|
-
t.position.z / v
|
|
2391
|
-
],
|
|
2392
|
-
children: /* @__PURE__ */ f(Ge, { view: e })
|
|
2393
|
-
}
|
|
2394
|
-
)
|
|
2395
|
-
}
|
|
2396
|
-
);
|
|
2397
|
-
}
|
|
2398
|
-
function Jt({ childrenPositon: e, dividerThk: t, divider: r, view: i, remainingZone: n }) {
|
|
2399
|
-
if (ye.linearDivision(r))
|
|
2400
|
-
return e ? /* @__PURE__ */ f(jt, { view: i, childrenPositon: e, dividerThk: t, divider: r, remainingZone: n }) : null;
|
|
2401
|
-
if (ye.article(r)) {
|
|
2402
|
-
const s = oe.string(r) ? r.articleName : r.LINDIV1;
|
|
2403
|
-
return !n || s === "" ? null : /* @__PURE__ */ f(qt, { view: i, articleName: s, remainingZone: n });
|
|
2404
|
-
}
|
|
2405
|
-
return null;
|
|
2406
|
-
}
|
|
2407
|
-
function Fe() {
|
|
2408
|
-
const { getArticleData: e } = Q(), { articleName: t, dimensionOverrides: r } = ee(), { resolveString: i } = j(), { anglPrims: n } = e(t);
|
|
2409
|
-
if (n.length === 0) throw new Error(`No prims found for article: ${t}`);
|
|
2410
|
-
const s = n[0], a = (l, u) => {
|
|
2411
|
-
const h = typeof l == "string" && l !== "" ? se(i(l)) : u;
|
|
2412
|
-
return parseFloat(String(h)) || 0;
|
|
2413
|
-
}, o = {
|
|
2414
|
-
width: r?.width ?? a(s.DIMCALCFX, s.SIZEX),
|
|
2415
|
-
height: r?.height ?? a(s.DIMCALCFZ, s.SIZEZ),
|
|
2416
|
-
depth: r?.depth ?? a(s.DIMCALCFY, s.SIZEY)
|
|
2417
|
-
};
|
|
2418
|
-
return {
|
|
2419
|
-
current_prim: s,
|
|
2420
|
-
prim_dims: o
|
|
2421
|
-
};
|
|
2422
|
-
}
|
|
2423
|
-
function ze({ TREEID: e, dimension: t, view: r = x._3D }) {
|
|
2424
|
-
console.log(`===================================== Zone Start ${e} =====================================`);
|
|
2425
|
-
const i = ue(e), n = i?.zoneInfo(), s = i?.dividerThk || 0, a = Fe(), o = yt(e), l = It(o, i?.topShelfThk || 0, i?.bottomShelfThk || 0), u = _t(o), h = bt(t, u), m = kt(h, l), p = $(() => {
|
|
2426
|
-
if (i)
|
|
2427
|
-
return q.fromZoneData(i.currentZone, s);
|
|
2428
|
-
}, [i, s]), E = n ? Object.fromEntries(n) : {}, y = Gt(p), c = Bt(y, m.dimensions);
|
|
2429
|
-
E["AD article width"] = a?.prim_dims.width.toString(), E["AD article height"] = a?.prim_dims.height.toString(), E["AD article depth"] = a?.prim_dims.depth.toString(), E[0] = "0", E.X = c.toString();
|
|
2430
|
-
const d = p ? zt.descriptor(p) : !1, g = p ? oe.descriptor(p) : !1, N = d || g ? Yt({ divider: p, inputData: E }).updatedDivider : p, M = Dt(m, s, N, i?.children.map((D) => D.TREEID) || []);
|
|
2431
|
-
return (e === "0" || e === "0") && (console.log("start dimensions ", t), console.log("border inset", u), console.log("border thk", l), console.log("zone dimensions ", h.dimensions), console.log("position => ", h.position), console.log("remaining dimensions ", m.dimensions), console.log("remaining position => ", m.position)), /* @__PURE__ */ f(pe, { children: /* @__PURE__ */ O(J, { view: r, position: [h.position.x / v, h.position.y / v, h.position.z / v], children: [
|
|
2432
|
-
o.front?.CPNAME && /* @__PURE__ */ f(Ct, { view: r, TREEID: Oe(e), dimension: h.dimensions, helper: o }),
|
|
2433
|
-
o.left?.CPNAME && /* @__PURE__ */ f(Lt, { view: r, TREEID: Re(e), dimension: h.dimensions, helper: o }),
|
|
2434
|
-
o.back?.CPNAME && /* @__PURE__ */ f(Ot, { view: r, TREEID: Ve(e), dimension: h.dimensions, helper: o }),
|
|
2435
|
-
o.right?.CPNAME && /* @__PURE__ */ f(Pt, { view: r, TREEID: Pe(e), dimension: h.dimensions, helper: o }),
|
|
2436
|
-
i?.topShelfCP && /* @__PURE__ */ f(Vt, { view: r, TREEID: e, dimension: h.dimensions, helper: o }),
|
|
2437
|
-
i?.bottomShelfCP && /* @__PURE__ */ f(Rt, { view: r, TREEID: e, dimension: h.dimensions, helper: o }),
|
|
2438
|
-
/* @__PURE__ */ f(J, { view: r, position: [m.position.x / v, m.position.y / v, m.position.z / v], children: N && /* @__PURE__ */ f(Jt, { remainingZone: m, divider: N, view: r, childrenPositon: M, dividerThk: s }) })
|
|
2439
|
-
] }) });
|
|
2440
|
-
}
|
|
2441
|
-
const Qt = "scale(1,-1)";
|
|
2442
|
-
function Ge({ view: e = x._3D }) {
|
|
2443
|
-
console.log("========================================================= Designer ===============================================================================================");
|
|
2444
|
-
const r = Fe().prim_dims, i = /* @__PURE__ */ f(ze, { TREEID: "0", view: e, dimension: r }), n = e === x._3D ? i : /* @__PURE__ */ f("g", { transform: Qt, children: i });
|
|
2445
|
-
return console.log(n), n;
|
|
2446
|
-
}
|
|
2447
|
-
function ar({ view: e, data: t, articleName: r }) {
|
|
2448
|
-
const i = t.descriptors, n = t.variables, s = t.anglprim.map((a) => a.NAME);
|
|
2449
|
-
return /* @__PURE__ */ f(pe, { children: /* @__PURE__ */ f(We, { names: s, data: t, children: /* @__PURE__ */ f(be, { articleName: r, children: /* @__PURE__ */ f(je, { imosVariables: n, children: /* @__PURE__ */ f(it, { descriptorData: i, children: /* @__PURE__ */ f(Ge, { view: e }) }) }) }) }) });
|
|
2450
|
-
}
|
|
2451
|
-
function or() {
|
|
2452
|
-
const { tree: e, getValue: t, setValue: r } = j(), i = (o, l) => {
|
|
2453
|
-
const u = Number(l);
|
|
2454
|
-
r(o, isNaN(u) ? l : u);
|
|
2455
|
-
}, s = (() => {
|
|
2456
|
-
const o = {
|
|
2457
|
-
[P.Numeric]: { type: P.Numeric, label: "Dimensions (Numeric)", variables: [] },
|
|
2458
|
-
[P.Surface]: { type: P.Surface, label: "Surfaces", variables: [] },
|
|
2459
|
-
[P.Material]: { type: P.Material, label: "Materials", variables: [] },
|
|
2460
|
-
[P.Text]: { type: P.Text, label: "Text", variables: [] }
|
|
2461
|
-
};
|
|
2462
|
-
return Array.from(e.entries()).forEach(([l, u]) => {
|
|
2463
|
-
const h = t(l), m = u.WERT.startsWith("$");
|
|
2464
|
-
o[u.TYP]?.variables.push({
|
|
2465
|
-
name: l,
|
|
2466
|
-
value: h ?? "undefined",
|
|
2467
|
-
reference: m ? u.WERT : void 0,
|
|
2468
|
-
rawType: u.TYP
|
|
2469
|
-
});
|
|
2470
|
-
}), Object.values(o).filter((l) => l.variables.length > 0);
|
|
2471
|
-
})(), a = (o) => {
|
|
2472
|
-
const l = o.rawType === P.Numeric, u = typeof o.value == "number" ? o.value : Number(o.value);
|
|
2473
|
-
return l && !isNaN(u) ? /* @__PURE__ */ O("div", { className: "var-controller__slider-container", children: [
|
|
2474
|
-
/* @__PURE__ */ f(
|
|
2475
|
-
"input",
|
|
2476
|
-
{
|
|
2477
|
-
type: "range",
|
|
2478
|
-
min: 0,
|
|
2479
|
-
max: 2e4,
|
|
2480
|
-
value: u,
|
|
2481
|
-
onChange: (h) => i(o.name, h.target.value),
|
|
2482
|
-
className: "var-controller__slider"
|
|
2483
|
-
}
|
|
2484
|
-
),
|
|
2485
|
-
/* @__PURE__ */ f(
|
|
2486
|
-
"input",
|
|
2487
|
-
{
|
|
2488
|
-
type: "number",
|
|
2489
|
-
value: u,
|
|
2490
|
-
onChange: (h) => i(o.name, h.target.value),
|
|
2491
|
-
onBlur: (h) => i(o.name, h.target.value),
|
|
2492
|
-
className: "var-controller__number-input",
|
|
2493
|
-
min: 0,
|
|
2494
|
-
max: 2e4
|
|
2495
|
-
}
|
|
2496
|
-
)
|
|
2497
|
-
] }) : /* @__PURE__ */ f(
|
|
2498
|
-
"input",
|
|
2499
|
-
{
|
|
2500
|
-
type: "text",
|
|
2501
|
-
value: o.value,
|
|
2502
|
-
onChange: (h) => i(o.name, h.target.value),
|
|
2503
|
-
onBlur: (h) => i(o.name, h.target.value),
|
|
2504
|
-
className: "var-controller__text-input"
|
|
2505
|
-
}
|
|
2506
|
-
);
|
|
2507
|
-
};
|
|
2508
|
-
return /* @__PURE__ */ O("div", { className: "var-controller", children: [
|
|
2509
|
-
/* @__PURE__ */ f("h2", { children: "Variable Controller" }),
|
|
2510
|
-
/* @__PURE__ */ O("p", { className: "var-controller__header", children: [
|
|
2511
|
-
"Total variables: ",
|
|
2512
|
-
e.size
|
|
2513
|
-
] }),
|
|
2514
|
-
s.map((o) => /* @__PURE__ */ O("section", { className: "var-controller__section", children: [
|
|
2515
|
-
/* @__PURE__ */ O("h3", { className: "var-controller__section-title", children: [
|
|
2516
|
-
o.label,
|
|
2517
|
-
" (",
|
|
2518
|
-
o.variables.length,
|
|
2519
|
-
")"
|
|
2520
|
-
] }),
|
|
2521
|
-
/* @__PURE__ */ O("table", { className: "var-controller__table", children: [
|
|
2522
|
-
/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ O("tr", { children: [
|
|
2523
|
-
/* @__PURE__ */ f("th", { style: { width: "25%" }, children: "Variable Name" }),
|
|
2524
|
-
/* @__PURE__ */ f("th", { style: { width: "35%" }, children: "Current Value" }),
|
|
2525
|
-
/* @__PURE__ */ f("th", { style: { width: "25%" }, children: "Reference" }),
|
|
2526
|
-
/* @__PURE__ */ f("th", { className: "center", style: { width: "15%" }, children: "Type" })
|
|
2527
|
-
] }) }),
|
|
2528
|
-
/* @__PURE__ */ f("tbody", { children: o.variables.map((l) => /* @__PURE__ */ O("tr", { children: [
|
|
2529
|
-
/* @__PURE__ */ f("td", { className: "var-controller__var-name", children: l.name }),
|
|
2530
|
-
/* @__PURE__ */ f("td", { children: a(l) }),
|
|
2531
|
-
/* @__PURE__ */ f("td", { className: "var-controller__reference", children: l.reference || "-" }),
|
|
2532
|
-
/* @__PURE__ */ f("td", { style: { textAlign: "center" }, children: /* @__PURE__ */ f("span", { className: "var-controller__type-badge", children: o.type }) })
|
|
2533
|
-
] }, l.name)) })
|
|
2534
|
-
] })
|
|
2535
|
-
] }, o.type)),
|
|
2536
|
-
/* @__PURE__ */ O("section", { className: "var-controller__stats", children: [
|
|
2537
|
-
/* @__PURE__ */ f("h4", { children: "Quick Stats" }),
|
|
2538
|
-
/* @__PURE__ */ f("ul", { children: s.map((o) => /* @__PURE__ */ O("li", { children: [
|
|
2539
|
-
o.label,
|
|
2540
|
-
": ",
|
|
2541
|
-
o.variables.length,
|
|
2542
|
-
" variables"
|
|
2543
|
-
] }, o.type)) })
|
|
2544
|
-
] })
|
|
2545
|
-
] });
|
|
2546
|
-
}
|
|
2547
|
-
const lr = "1.0.0";
|
|
2548
|
-
export {
|
|
2549
|
-
_e as ArticleContext,
|
|
2550
|
-
ar as ArticleDesigner,
|
|
2551
|
-
be as ArticleProvider,
|
|
2552
|
-
F as DataContext,
|
|
2553
|
-
We as DataProvider,
|
|
2554
|
-
De as DescriptorContext,
|
|
2555
|
-
it as DescriptorProvider,
|
|
2556
|
-
Ge as Designer,
|
|
2557
|
-
lr as VERSION,
|
|
2558
|
-
x as VIEW,
|
|
2559
|
-
or as VarController,
|
|
2560
|
-
ke as VariableContext,
|
|
2561
|
-
je as VariableProvider,
|
|
2562
|
-
nr as VariableResolver,
|
|
2563
|
-
ze as Zone,
|
|
2564
|
-
Yt as ZoneDescriptor,
|
|
2565
|
-
ee as useArticle,
|
|
2566
|
-
Q as useData,
|
|
2567
|
-
Ft as useDescriptorEvaluation,
|
|
2568
|
-
$t as useDescriptorManager,
|
|
2569
|
-
sr as useDescriptorMatches,
|
|
2570
|
-
j as useVariables
|
|
2571
|
-
};
|
|
1
|
+
const a1_0x1169de=a1_0x24a2;(function(_0xe16337,_0x5c7520){const _0x33fcc2=a1_0x24a2,_0x20ef65=_0xe16337();while(!![]){try{const _0x474aea=parseInt(_0x33fcc2(0x216))/0x1+parseInt(_0x33fcc2(0x1b2))/0x2+-parseInt(_0x33fcc2(0x156))/0x3+-parseInt(_0x33fcc2(0x84))/0x4*(-parseInt(_0x33fcc2(0x18f))/0x5)+parseInt(_0x33fcc2(0x18a))/0x6+parseInt(_0x33fcc2(0x1dd))/0x7*(parseInt(_0x33fcc2(0xf5))/0x8)+-parseInt(_0x33fcc2(0x1d5))/0x9*(parseInt(_0x33fcc2(0x155))/0xa);if(_0x474aea===_0x5c7520)break;else _0x20ef65['push'](_0x20ef65['shift']());}catch(_0x2e1bcb){_0x20ef65['push'](_0x20ef65['shift']());}}}(a1_0x40ff,0x61e07));var Ue=Object[a1_0x1169de(0x1da)],Ze=(_0xe9719e,_0x10325a,_0x1b9ff3)=>_0x10325a in _0xe9719e?Ue(_0xe9719e,_0x10325a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b9ff3}):_0xe9719e[_0x10325a]=_0x1b9ff3,D=(_0x433e94,_0x4331ea,_0x7feb43)=>Ze(_0x433e94,typeof _0x4331ea!=a1_0x1169de(0xd8)?_0x4331ea+'':_0x4331ea,_0x7feb43);import{jsx as a1_0x16dbaa,jsxs as a1_0x51d917,Fragment as a1_0x288a7d}from'react/jsx-runtime';import{createContext as a1_0xa55c59,useState as a1_0x1c4ea3,useCallback as a1_0xc52f61,useMemo as a1_0x4a3bd8,useEffect as a1_0x2e6a4a,useContext as a1_0x3fe57c,Fragment as a1_0x44338e}from'react';import{Edges as a1_0x3c55b9,Text as a1_0x58b787}from'@react-three/drei';import{Shape as a1_0x510643,ExtrudeGeometry as a1_0x39b320,BoxGeometry as a1_0x348d24}from'three';const F=a1_0xa55c59(void 0x0);function Qe({data:_0x486f33,children:_0x186367,names:_0x6aa452}){const _0x3319f3=a1_0x1169de,_0x7ff52=_0x486f33,[_0xe98512,_0x357827]=a1_0x1c4ea3(_0x7ff52),[_0x32a2a4,_0x5f1626]=a1_0x1c4ea3(null),[_0x454bd5,_0x3bc669]=a1_0x1c4ea3(null),_0x44ae6e=a1_0xc52f61(_0xca0fb7=>({'anglElems':_0xe98512['anglelem'][_0x3319f3(0x103)](_0x5ca33c=>_0x5ca33c[_0x3319f3(0x99)]===_0xca0fb7),'anglZones':_0xe98512[_0x3319f3(0x170)][_0x3319f3(0x103)](_0x4970ee=>_0x4970ee[_0x3319f3(0x99)]===_0xca0fb7),'anglPrims':_0xe98512['anglprim'][_0x3319f3(0x103)](_0xc3ebae=>_0xc3ebae[_0x3319f3(0x99)]===_0xca0fb7),'anglClies':_0xe98512[_0x3319f3(0x148)][_0x3319f3(0x103)](_0x43a83e=>_0x43a83e[_0x3319f3(0x99)]===_0xca0fb7),'anglGrtxs':_0xe98512['anglgrtx'][_0x3319f3(0x103)](_0x3d79e4=>_0x3d79e4[_0x3319f3(0x99)]===_0xca0fb7)}),[_0xe98512]),{anglElems:_0x351139,anglZones:_0x55ee50,anglPrims:_0x1d9755,anglClies:_0x1100d4,anglGrtxs:_0x4927a3}=a1_0x4a3bd8(()=>_0x6aa452&&_0x6aa452[_0x3319f3(0xc6)]>0x0?{'anglElems':_0xe98512[_0x3319f3(0xb5)][_0x3319f3(0x103)](_0x563f30=>_0x6aa452[_0x3319f3(0x21e)](_0x563f30[_0x3319f3(0x99)])),'anglZones':_0xe98512[_0x3319f3(0x170)][_0x3319f3(0x103)](_0x106f92=>_0x6aa452[_0x3319f3(0x21e)](_0x106f92[_0x3319f3(0x99)])),'anglPrims':_0xe98512[_0x3319f3(0x19f)][_0x3319f3(0x103)](_0x5c8c47=>_0x6aa452[_0x3319f3(0x21e)](_0x5c8c47[_0x3319f3(0x99)])),'anglClies':_0xe98512[_0x3319f3(0x148)][_0x3319f3(0x103)](_0x47ca2a=>_0x6aa452[_0x3319f3(0x21e)](_0x47ca2a[_0x3319f3(0x99)])),'anglGrtxs':_0xe98512[_0x3319f3(0xef)][_0x3319f3(0x103)](_0x4ed77d=>_0x6aa452[_0x3319f3(0x21e)](_0x4ed77d[_0x3319f3(0x99)]))}:{'anglElems':_0xe98512[_0x3319f3(0xb5)],'anglZones':_0xe98512[_0x3319f3(0x170)],'anglPrims':_0xe98512[_0x3319f3(0x19f)],'anglClies':_0xe98512['anglclie'],'anglGrtxs':_0xe98512[_0x3319f3(0xef)]},[_0xe98512,_0x6aa452]),_0xb4ed7d={'anglElems':_0x351139,'anglZones':_0x55ee50,'anglPrims':_0x1d9755,'anglClies':_0x1100d4,'anglGrtxs':_0x4927a3,'selectedElem':_0x32a2a4,'setSelectedElem':_0x5f1626,'hoveredElem':_0x454bd5,'setHoveredElem':_0x3bc669,'updateAnglPrim':(_0x15fd98,_0x37b3e6,_0x3bf2bc)=>{const _0x150cce=_0x3319f3;_0x357827(_0x494a14=>({..._0x494a14,'anglprim':_0x494a14[_0x150cce(0x19f)][_0x150cce(0x9f)](_0x5de93a=>_0x5de93a['NAME']===_0x15fd98?{..._0x5de93a,[_0x37b3e6]:_0x3bf2bc}:_0x5de93a)}));},'updateAnglElem':(_0x68cca7,_0x3bd42e,_0x428eac,_0x428ddf)=>{const _0x53e1c4=_0x3319f3;_0x357827(_0x28f1a4=>({..._0x28f1a4,'anglelem':_0x28f1a4[_0x53e1c4(0xb5)]['map'](_0x288f0c=>_0x288f0c[_0x53e1c4(0xc0)]===_0x3bd42e&&_0x288f0c['NAME']===_0x68cca7?{..._0x288f0c,[_0x428eac]:_0x428ddf}:_0x288f0c)}));},'updateAnglZone':(_0x130d75,_0x1e27d4,_0x24b6bf,_0x1cdf8e)=>{const _0x46909e=_0x3319f3;_0x357827(_0x2b6dbc=>({..._0x2b6dbc,'anglzone':_0x2b6dbc[_0x46909e(0x170)][_0x46909e(0x9f)](_0x4ed915=>_0x4ed915[_0x46909e(0xc0)]===_0x1e27d4&&_0x4ed915[_0x46909e(0x99)]===_0x130d75?{..._0x4ed915,[_0x24b6bf]:_0x1cdf8e}:_0x4ed915)}));},'updateAnglClie':(_0x100423,_0x3abd75,_0x444bb2,_0x3ea3f5,_0x417b8b)=>{const _0x76e0a6=_0x3319f3;_0x357827(_0x449465=>({..._0x449465,'anglclie':_0x449465[_0x76e0a6(0x148)][_0x76e0a6(0x9f)](_0x5e3d11=>_0x5e3d11[_0x76e0a6(0xc0)]===_0x3abd75&&_0x5e3d11['TAGNAME']===_0x444bb2&&_0x5e3d11[_0x76e0a6(0xb7)]===_0x417b8b&&_0x5e3d11[_0x76e0a6(0x99)]===_0x100423?{..._0x5e3d11,'TAGVALUE':_0x3ea3f5,'DATE_LASTCHANGE':new Date()['toISOString']()}:_0x5e3d11)}));},'updateAnglGrtx':(_0x55e67c,_0x54d7c1,_0x113dcd,_0x1dff1b)=>{const _0x50915d=_0x3319f3;_0x357827(_0x2c601b=>({..._0x2c601b,'anglgrtx':_0x2c601b[_0x50915d(0xef)][_0x50915d(0x9f)](_0x35a108=>_0x35a108['TREEID']===_0x54d7c1&&_0x35a108[_0x50915d(0xab)]===_0x113dcd&&_0x35a108[_0x50915d(0x99)]===_0x55e67c?{..._0x35a108,'TEXT':_0x1dff1b,'DATE_LASTCHANGE':new Date()[_0x50915d(0x18c)]()}:_0x35a108)}));},'getArticleData':_0x44ae6e,'allData':_0xe98512};return a1_0x16dbaa(F[_0x3319f3(0x13d)],{'value':_0xb4ed7d,'children':_0x186367});}const be=a1_0xa55c59(null);function ke({children:_0x5dcc4b,articleName:_0x2286a0,dimensionOverrides:_0x283932}){const _0x5d4fe8=a1_0x1169de,_0x11bafd={'articleName':_0x2286a0,'dimensionOverrides':_0x283932};return a1_0x16dbaa(be[_0x5d4fe8(0x13d)],{'value':_0x11bafd,'children':_0x5dcc4b});}const De=a1_0xa55c59(void 0x0);var O=(_0x4bda28=>(_0x4bda28[_0x4bda28['Surface']=0x3]=a1_0x1169de(0xa2),_0x4bda28[_0x4bda28[a1_0x1169de(0x1cd)]=0x4]=a1_0x1169de(0x1cd),_0x4bda28[_0x4bda28[a1_0x1169de(0x205)]=0x64]='Numeric',_0x4bda28[_0x4bda28['Text']=0x78]=a1_0x1169de(0x177),_0x4bda28))(O||{});function me(_0x295341){const _0x39a7b9=a1_0x1169de;return new Map(_0x295341[_0x39a7b9(0x9f)](_0x846dd=>[_0x846dd[_0x39a7b9(0x99)],_0x846dd]));}function ue(_0x35e17a,_0x383c53,_0x5dce3c=new Set()){const _0x64554=a1_0x1169de,_0x21880c=_0x383c53[_0x64554(0x1ed)](_0x35e17a);if(!_0x21880c)return;if(_0x5dce3c[_0x64554(0x9c)](_0x35e17a)){console[_0x64554(0x86)](_0x64554(0x232)+[..._0x5dce3c,_0x35e17a][_0x64554(0x8b)](_0x64554(0x209)));return;}const _0x2f9f9a=_0x21880c[_0x64554(0x90)];if(_0x2f9f9a['startsWith']('$')&&_0x21880c['TYP']!=O['Text']){const _0x479c98=_0x2f9f9a[_0x64554(0x199)](0x1);return _0x5dce3c[_0x64554(0xb6)](_0x35e17a),ue(_0x479c98,_0x383c53,_0x5dce3c);}const _0xf4aa76=Number(_0x2f9f9a);return isNaN(_0xf4aa76)?_0x2f9f9a:_0xf4aa76;}function Ae(_0x40fd30,_0x1b7342,_0x5572d7){const _0x5010d2=a1_0x1169de,_0x3edf6d=_0x5572d7[_0x5010d2(0x1ed)](_0x40fd30);if(!_0x3edf6d)return console[_0x5010d2(0xbb)](_0x5010d2(0x17a)+_0x40fd30+_0x5010d2(0x10e)),_0x5572d7;const _0x34aac6=new Map(_0x5572d7);return _0x34aac6[_0x5010d2(0x1d1)](_0x40fd30,{..._0x3edf6d,'WERT':String(_0x1b7342)}),_0x34aac6;}function ge(_0x5a6cdf,_0x3cf5df){const _0x20ef75=a1_0x1169de;return _0x5a6cdf[_0x20ef75(0x230)](/\$([A-Za-z_][A-Za-z0-9_]*)/g,(_0x4ed4f4,_0x5e789f)=>{const _0x2e8cad=ue(_0x5e789f,_0x3cf5df);return _0x2e8cad!==void 0x0?String(_0x2e8cad):_0x4ed4f4;});}function Ee(_0x4efba5){const _0x2ee1f8=a1_0x1169de;return/\$[A-Za-z_][A-Za-z0-9_]*/g[_0x2ee1f8(0x10a)](_0x4efba5);}function et(_0x4dce66){const _0x5184a1=a1_0x1169de,_0x16454a=_0x4dce66[_0x5184a1(0x1a7)](/\$([A-Za-z_][A-Za-z0-9_]*)/g);return Array[_0x5184a1(0x207)](_0x16454a,_0x49fd64=>_0x49fd64[0x1]);}const cr=Object[a1_0x1169de(0x117)](Object[a1_0x1169de(0x1da)]({'__proto__':null,'createVariableTree':me,'extractVariableNames':et,'getValue':ue,'hasVariables':Ee,'resolveString':ge,'setValue':Ae},Symbol[a1_0x1169de(0x130)],{'value':a1_0x1169de(0x1db)}));function tt({children:_0x40414b,imosVariables:_0x3d4863}){const _0x1e30f5=a1_0x1169de,[_0x362b19,_0x4b4ae7]=a1_0x1c4ea3(()=>me(_0x3d4863));a1_0x2e6a4a(()=>{_0x4b4ae7(me(_0x3d4863));},[_0x3d4863]);const _0x39cee8=a1_0xc52f61((_0x222542,_0x3ddf05)=>{_0x4b4ae7(_0x2eac30=>Ae(_0x222542,_0x3ddf05,_0x2eac30));},[]),_0x519e77={'tree':_0x362b19,'setValue':_0x39cee8};return a1_0x16dbaa(De[_0x1e30f5(0x13d)],{'value':_0x519e77,'children':_0x40414b});}const we=a1_0xa55c59(null),Ne=_0x3a0eff=>{const _0xe93efd=Number(_0x3a0eff);return isNaN(_0xe93efd)?null:_0xe93efd;},Y=_0x131f5d=>_0x131f5d==null?'':String(_0x131f5d),$=(_0x4e1e44,_0x4451e8,_0x451956)=>{const _0x4dadef=Ne(_0x4e1e44),_0x57f0c7=Ne(_0x4451e8);return _0x4dadef===null||_0x57f0c7===null?!0x1:_0x451956(_0x4dadef,_0x57f0c7);},K=(_0x36e97d,_0x3b0e1c,_0x4a7e40)=>_0x36e97d==null||_0x3b0e1c==null?!0x1:_0x4a7e40(Y(_0x36e97d),Y(_0x3b0e1c)),rt={'=':(_0x84fb4f,_0x370169)=>_0x84fb4f==null||_0x370169==null?_0x84fb4f===_0x370169:Y(_0x84fb4f)[a1_0x1169de(0x123)]()===Y(_0x370169)[a1_0x1169de(0x123)](),'!=':(_0x544802,_0x460d42)=>_0x544802==null||_0x460d42==null?_0x544802!==_0x460d42:Y(_0x544802)['trim']()!==Y(_0x460d42)[a1_0x1169de(0x123)](),'>':(_0xe2598a,_0x561538)=>$(_0xe2598a,_0x561538,(_0x3c7fcd,_0x2d9bbd)=>_0x3c7fcd>_0x2d9bbd),'<':(_0x89ae6f,_0x529c9c)=>$(_0x89ae6f,_0x529c9c,(_0x4be202,_0x342a4c)=>_0x4be202<_0x342a4c),'>=':(_0x238359,_0x32b570)=>$(_0x238359,_0x32b570,(_0x4432a0,_0x471915)=>_0x4432a0>=_0x471915),'<=':(_0x254653,_0xce78ca)=>$(_0x254653,_0xce78ca,(_0x52c762,_0x240a35)=>_0x52c762<=_0x240a35),'>':(_0x327be1,_0x55f7ee)=>$(_0x327be1,_0x55f7ee,(_0x23fb77,_0x1d26f0)=>_0x23fb77>_0x1d26f0),'>=':(_0x4c7bf3,_0x1d6dc1)=>$(_0x4c7bf3,_0x1d6dc1,(_0x2b4be6,_0x14faf3)=>_0x2b4be6>=_0x14faf3),'<':(_0x25cc14,_0x19de37)=>$(_0x25cc14,_0x19de37,(_0x23b9b7,_0x5af156)=>_0x23b9b7<_0x5af156),'<=':(_0x331dfb,_0x172cd6)=>$(_0x331dfb,_0x172cd6,(_0x42b175,_0x1c3c78)=>_0x42b175<=_0x1c3c78),'B':(_0x4cda7e,_0x3438d7)=>K(_0x4cda7e,_0x3438d7,(_0x25a662,_0x404b91)=>_0x25a662[a1_0x1169de(0xaa)](_0x404b91)),'!B':(_0x8919ab,_0x20419d)=>K(_0x8919ab,_0x20419d,(_0x1c9c6d,_0x2b896f)=>!_0x1c9c6d['startsWith'](_0x2b896f)),'E':(_0x32126c,_0x493174)=>K(_0x32126c,_0x493174,(_0x246f61,_0x46f340)=>_0x246f61[a1_0x1169de(0x19b)](_0x46f340)),'!E':(_0x2e9ac9,_0x117818)=>K(_0x2e9ac9,_0x117818,(_0x3da0d8,_0x4a6c70)=>!_0x3da0d8[a1_0x1169de(0x19b)](_0x4a6c70)),'C':(_0x4de548,_0x490491)=>K(_0x4de548,_0x490491,(_0x4f734b,_0x106954)=>_0x4f734b[a1_0x1169de(0x21e)](_0x106954)),'!C':(_0x3312f2,_0x50ff02)=>K(_0x3312f2,_0x50ff02,(_0x5f46ca,_0x266f3d)=>!_0x5f46ca['includes'](_0x266f3d))},it={'Zusatzfilter\x203':'filter3','Zusatzfilter\x204':a1_0x1169de(0x173)};function Ce(_0x189a9e,_0x5b1af8={}){const _0x39b1ec=a1_0x1169de,{variableTree:_0x1790cb,dataType:_0x2915b7,silent:_0x412eeb=!0x1,allowFunctions:_0x1e1e8f=!0x0}=_0x5b1af8,_0xe21b31=/^(.+?)\s*(mm|cm|m|in|ft|px|pt|%|deg|rad)$/i,_0x35c2d4={'value':void 0x0,'original':_0x189a9e,'resolved':_0x189a9e,'hadVariables':!0x1,'wasEvaluated':!0x1};try{let _0x184127=_0x189a9e[_0x39b1ec(0x123)](),_0x1d3048;if(_0xe21b31[_0x39b1ec(0x10a)](_0x184127)){const _0x439924=_0x184127['match'](_0xe21b31);_0x439924&&(_0x184127=_0x439924[0x1][_0x39b1ec(0x123)](),_0x1d3048=_0x439924[0x2]);}_0x1790cb&&Ee(_0x184127)&&(_0x35c2d4[_0x39b1ec(0x153)]=!0x0,_0x184127=ge(_0x184127,_0x1790cb),_0x35c2d4[_0x39b1ec(0x1fe)]=_0x184127),Le(_0x184127)?(_0x35c2d4[_0x39b1ec(0x211)]=!0x0,_0x35c2d4[_0x39b1ec(0x101)]=Oe(_0x184127,_0x1e1e8f)):Se(_0x184127)?(_0x35c2d4['wasEvaluated']=!0x0,_0x35c2d4['value']=ve(_0x184127,_0x1e1e8f)):_0x35c2d4['value']=st(_0x184127,_0x2915b7);}catch(_0x420f1e){_0x35c2d4['error']=_0x420f1e instanceof Error?_0x420f1e[_0x39b1ec(0x194)]:String(_0x420f1e),_0x412eeb||console['error']('[ExpressionResolver]\x20Failed\x20to\x20resolve:\x20\x22'+_0x189a9e+'\x22',_0x420f1e),_0x35c2d4[_0x39b1ec(0x101)]=_0x189a9e;}return _0x35c2d4;}function ae(_0x3eb360,_0x25b512={}){const _0x486c9d=a1_0x1169de;return Ce(_0x3eb360,_0x25b512)[_0x486c9d(0x101)];}function a1_0x40ff(){const _0x430cce=['2D_TOP','PAREN_CLOSE','end','SpecialVariable','WERT','\x20parts','resetCurrent','DESC_TYPE','RIGHTVALUE','middle','Sections','var-controller__type-badge','name','NAME','times','useArticle\x20must\x20be\x20used\x20within\x20an\x20ArticleProvider','has','type','getDescriptorsByType','map','evaluateNode','term','Surface','BinaryExpression','Variable\x20Controller','Unhandled\x20case:\x20HORDEFTYPE\x20=\x20','Evaluation\x20Error:\x20','Variable','Invalid\x20usage:\x20\x22n\x22\x20cannot\x20appear\x20on\x20the\x20right-hand\x20side\x20of\x20an\x20operator','anglGrtxs','startsWith','NUM','roots','advance','toFixed','scanMm','Error\x20calculating\x20sections','endPanelThk','Function\x20not\x20implemented','fill','Expected\x20digit\x20after\x20decimal\x20point\x20at\x20position:\x20','anglelem','add','DATATYPE','reportError','getDescriptorNames','variableTree','warn','DIVIDER','Unknown\x20operator:\x20','sections','bind','TREEID','isAtEnd','dimensions','articleName','simple','hasMillimeterSuffix','length','var-controller__section-title','topShelfCP','Repeated','Math.floor(','DIMCALCFX','checkMillimeterSuffix','BRACKET_OPEN','expression','Cannot\x20have\x20n\x20in\x20the\x20right\x20side\x20of\x20an\x20expression','valueSource','blue','front\x20','SIZEX','35%','string','boxGeometry','default','symbol','\x20variables','HORDEFTYPE','scanIdentifierOrFunction','SIZEZ','left','DIMCALCFZ','section','IF\x20statement\x20must\x20have\x20exactly\x203\x20parts:\x20IF(condition,\x20trueValue,\x20falseValue).\x20Got:\x20','\x20at\x20position:\x20','Failed\x20to\x20parse\x20term:\x20','IAC_THICKNESS','DESCRIPTOR','Back\x20','text','bottomShelfThk','atan','rotateY','No\x20variables\x20defined.','reverse','evaluateVariable','Expected\x20\x27(\x27\x20after\x20function\x20name\x20\x27','BRACE_OPEN','anglgrtx','localeCompare','errors','VARIABLE','evaluateTree','Surfaces','264288SasBur','current','var-controller__stats','keys','DIVTYPE','isArray','isDigit','TYP','find','rotate(','getClieThk','linearDivisionString','value','IAC_BOTTOMSHELFTHICKNESS','filter','get3D','target','expr:ratio','nodeNum','Section','BOTTRIM','test','SPECIAL_VARIABLE','AD\x20article\x20height','sizerefout1','\x20not\x20found','tbody','meshStandardMaterial','Unhandled\x20case:\x20DIVDIR\x20=\x20','previous','start','input','consume','get2DTop','freeze','var-controller__section','linearDivisionDescriptor','useZoneSelection\x20must\x20be\x20used\x20within\x20DataProvider','zoneInfo','consumeMillimeterSuffix','calculateSections','bottom','TOPSHELF','position','IAC_TOPSHELFTHICKNESS','SIZEY','trim','data','DIMCALCFY','2D_FRONT','Expression\x20contains\x20invalid\x20characters:\x20','gray','TOPOFFS','LINEAR_DIVISION','delete','some','top','parse','comparison','toStringTag','NOT\x20OR','nodes','Math.ceil(','LEFT_ANGLE_BRACKET','peekNext','EOF','FUNCTION','number','Current\x20Value','right','sort','zone_dims','Provider','=====================================\x20Zone\x20Start\x20','Empty\x20input\x20string','match','article','Expected\x20\x27}\x27\x20after\x20expression.','black','\x20\x20\x20--\x20\x20','translate(','Math.min(','label','anglclie','prim_dims','CPNAME','AND','kind','isFunctionCall','toLocaleLowerCase','Failed\x20to\x20parse\x20expression:\x20','LINDIV1','\x20L\x20','updatedDivider','hadVariables','nestingLevel','850bpanad','1299471uAyBII','useDescriptorManager\x20must\x20be\x20used\x20within\x20a\x20DescriptorProvider','scanVariable','cannot\x20have\x20*\x20outside\x20of\x20group','\x20divider','accumulateIncorporatedThicknesses','Descriptor\x20not\x20found:\x20','1.0.0','isSections','independent','Math.abs(','\x20is\x20not\x20defined.','lightgray','expr*{ratio}','findAllMatches','lindiv','mm2in','lastIndexOf','thk','conditionTree','Math.max(','getDescriptor','isAlpha','Materials','TAGVALUE','TOPTRIM','anglzone','var-controller__slider-container','getStats','filter4','descriptors','useVariables\x20must\x20be\x20used\x20within\x20a\x20VariableProvider','var-controller__text-input','Text','Failed\x20to\x20evaluate\x20expression:\x20','abs','Variable\x20','arg','var-controller__table','TAGNAME','Error\x20in\x20section\x20','rotateZ','Top\x20','scan','inset','cos','Expected\x20Sections\x20or\x20Section,\x20got\x20','isGrouping','isUnaryExpression','COMPARISONTYPE','reduce','No\x20prims\x20found\x20for\x20article:\x20','2297538pqFGyP','fromZoneData','toISOString','hasDescriptor','operator','292310sMWnKS','No\x20matching\x20node\x20found\x20and\x20no\x20default\x20node\x20exists','tokens','center','rotation','message','charAt','TEXT','Invalid\x20condition:\x20','primary','slice','toLowerCase','endsWith','Failed\x20to\x20parse\x20factor:\x20','\x20x\x20','FunctionCall','anglprim','scale(1,-1)','toString','topShelfThk','stringify','resetState','dividerType','DIVDIR','matchAll','floor','DIVELEM1','group','25%','height','Descriptor\x20','evaluateSections','next','MATHEMATICAL_FUNCTIONS','UNIT','516674FPIAXF','NUMBER','split','thickness','Reference',')\x20rotate(0)','#ff6b00','EvaluationError','width','check','Unknown\x20error','isInsideGroup','PAREN_OPEN','Dimensions\x20(Numeric)','INSET','Total\x20variables:\x20','asin','\x20-\x20','lineTo','values','toRepeat','source','STRING','unsupported\x20node\x20type\x20to\x20traverse:\x20','Grouping','Angle\x20brackets\x20are\x20not\x20allowed\x20in\x20the\x20input\x20string','spreadMm','Material','Unexpected\x20token:\x20','linearDivision','MANINFO','set','OPERATOR','mesh','descriptor','139113cXSnFv',')\x20rotate(','push','LEFTVALUE','Expected\x20\x27)\x27\x20after\x20function\x20arguments.','defineProperty','Module','isNumberLiteral','28dTSOhg','\x27use\x20strict\x27;\x20return\x20(','size','depth',')\x20rotate(90)','right\x20','thead','conditionId','toUpperCase','cumulativeX','Expected\x20expression\x20inside\x20parentheses.','UnaryExpression','_2D_FRONT','Quick\x20Stats','dividerThk','ENDTRIM','get','table','bottomShelfCP','15%','Bot\x20','BRACKET_CLOSE','Math.sqrt(','sizerefout2','isReversed','factor','fromEntries','cache','Expected\x20\x27)\x27\x20after\x20expression.','scanNumber','isVariable','preformScan','tan','resolved','_3D','front','ratio:expr','divisionType','log','sizerefmid','Numeric','entries','from','variables','\x20->\x20','forEach','evaluateBinaryExpression','evaluateFunction','NOT','cannot\x20have\x20\x20/\x20outside\x20of\x20group','in2mm','oversize','wasEvaluated','ARTICLE','BRACE_CLOSE','addToken','isRepeated','731419KPWMzv','round','cumulativeZ','_2D_TOP','#0066ff','currentZone','log10','Total\x20length\x20exceeded','includes','peek','children','every','childPositions','Invalid\x20Operator','Unexpected\x20character:\x20','bog2deg','Variable\x20name\x20cannot\x20be\x20empty\x20or\x20$mm','lexeme','left\x20','No\x20tokens\x20to\x20parse.','findAllNonDefaultMatches','performParse','articleDescriptor','back','RIGHT_ANGLE_BRACKET','articleString','replace','linear-division','Circular\x20dependency:\x20','Expected\x20\x27>\x27\x20after\x20section\x20expression.','sin','NumberLiteral','evaluate','AD\x20article\x20depth','div','44bkaose','isSection','error','INSETFOR','substring','acos','Unknown\x20error\x20during\x20evaluation.','join'];a1_0x40ff=function(){return _0x430cce;};return a1_0x40ff();}function Le(_0x3459a0){const _0x371724=a1_0x1169de;return!_0x3459a0||typeof _0x3459a0!=_0x371724(0xd5)?!0x1:/^\s*IF\s*\(/i[_0x371724(0x10a)](_0x3459a0['trim']());}function Oe(_0x4b2e8f,_0x495aab=!0x0){const _0x7ce7ce=a1_0x1169de,_0x46a25c=_0x4b2e8f[_0x7ce7ce(0x123)]()['match'](/^IF\s*\((.*)\)\s*$/i);if(!_0x46a25c)throw new Error('Invalid\x20IF\x20statement:\x20'+_0x4b2e8f);const _0x3c0b21=_0x46a25c[0x1],_0x32911c=nt(_0x3c0b21);if(_0x32911c[_0x7ce7ce(0xc6)]!==0x3)throw new Error(_0x7ce7ce(0xe0)+_0x32911c[_0x7ce7ce(0xc6)]+_0x7ce7ce(0x91));const [_0x5a9668,_0x18de1a,_0x85a1ea]=_0x32911c,_0x493aa8=ne(_0x5a9668[_0x7ce7ce(0x123)](),_0x495aab)?_0x18de1a[_0x7ce7ce(0x123)]():_0x85a1ea[_0x7ce7ce(0x123)]();if(Le(_0x493aa8))return Oe(_0x493aa8,_0x495aab);if(Se(_0x493aa8))return ve(_0x493aa8,_0x495aab);{const _0x47bf62=Number(_0x493aa8);return isNaN(_0x47bf62)?_0x493aa8:_0x47bf62;}}function nt(_0x2b8972){const _0x1f4a9d=a1_0x1169de,_0x2d44a3=[];let _0x620dd4='',_0x28cfa8=0x0;for(let _0xca4892=0x0;_0xca4892<_0x2b8972[_0x1f4a9d(0xc6)];_0xca4892++){const _0x3cff93=_0x2b8972[_0xca4892];_0x3cff93==='('?(_0x28cfa8++,_0x620dd4+=_0x3cff93):_0x3cff93===')'?(_0x28cfa8--,_0x620dd4+=_0x3cff93):_0x3cff93===','&&_0x28cfa8===0x0?(_0x2d44a3[_0x1f4a9d(0x1d7)](_0x620dd4),_0x620dd4=''):_0x620dd4+=_0x3cff93;}return _0x620dd4&&_0x2d44a3[_0x1f4a9d(0x1d7)](_0x620dd4),_0x2d44a3;}function ne(_0xc2175d,_0x4a0cb1){const _0x3cef80=a1_0x1169de;if(/\bAND\b/i[_0x3cef80(0x10a)](_0xc2175d))return _0xc2175d[_0x3cef80(0x1b4)](/\bAND\b/i)['every'](_0x46cff8=>ne(_0x46cff8['trim'](),_0x4a0cb1));if(/\bOR\b/i['test'](_0xc2175d))return _0xc2175d[_0x3cef80(0x1b4)](/\bOR\b/i)[_0x3cef80(0x12c)](_0x13400f=>ne(_0x13400f[_0x3cef80(0x123)](),_0x4a0cb1));if(/^\s*NOT\s+/i[_0x3cef80(0x10a)](_0xc2175d)){const _0x9b1758=_0xc2175d[_0x3cef80(0x230)](/^\s*NOT\s+/i,'')[_0x3cef80(0x123)]();return!ne(_0x9b1758,_0x4a0cb1);}const _0x1b5689=_0xc2175d[_0x3cef80(0x140)](/(.+?)(<=|>=|!=|<>|=|<|>)(.+)/);if(!_0x1b5689)throw new Error(_0x3cef80(0x197)+_0xc2175d);const [,_0x3bff70,_0x59531d,_0x16c271]=_0x1b5689,_0x207496=Me(_0x3bff70['trim'](),_0x4a0cb1),_0x4b75f5=Me(_0x16c271[_0x3cef80(0x123)](),_0x4a0cb1);switch(_0x59531d){case'=':return _0x207496===_0x4b75f5;case'!=':case'<>':return _0x207496!==_0x4b75f5;case'<':return _0x207496<_0x4b75f5;case'>':return _0x207496>_0x4b75f5;case'<=':return _0x207496<=_0x4b75f5;case'>=':return _0x207496>=_0x4b75f5;default:throw new Error(_0x3cef80(0xbd)+_0x59531d);}}function Me(_0x3c6a29,_0x587fa2){const _0x46b080=a1_0x1169de;if(_0x3c6a29[_0x46b080(0xaa)]('\x22')&&_0x3c6a29['endsWith']('\x22')||_0x3c6a29[_0x46b080(0xaa)]('\x27')&&_0x3c6a29[_0x46b080(0x19b)]('\x27'))return _0x3c6a29[_0x46b080(0x199)](0x1,-0x1);if(Se(_0x3c6a29))return ve(_0x3c6a29,_0x587fa2);const _0x557e8c=Number(_0x3c6a29);return isNaN(_0x557e8c)?_0x3c6a29:_0x557e8c;}function Se(_0x1d6e1){const _0x474e75=a1_0x1169de;if(!_0x1d6e1||typeof _0x1d6e1!=_0x474e75(0xd5))return!0x1;const _0x159edb=_0x1d6e1[_0x474e75(0x123)]();return/[+\-*/()]/[_0x474e75(0x10a)](_0x159edb)?/^[\d\s+\-*/().,a-z]+$/i[_0x474e75(0x10a)](_0x159edb):!0x1;}const fe=new Map();function ve(_0x618efd,_0x3e19b4=!0x0){const _0x4afff1=a1_0x1169de,_0x5ddac2=_0x618efd[_0x4afff1(0x123)](),_0x100767=_0x5ddac2+':'+_0x3e19b4;if(fe[_0x4afff1(0x9c)](_0x100767))return fe['get'](_0x100767);let _0x63e8a6=_0x5ddac2['replace'](/\s+/g,'');if(_0x3e19b4&&(_0x63e8a6=_0x63e8a6[_0x4afff1(0x230)](/round\(/g,'Math.round(')[_0x4afff1(0x230)](/floor\(/g,_0x4afff1(0xca))[_0x4afff1(0x230)](/ceil\(/g,_0x4afff1(0x133))['replace'](/abs\(/g,_0x4afff1(0x160))[_0x4afff1(0x230)](/min\(/g,_0x4afff1(0x146))[_0x4afff1(0x230)](/max\(/g,_0x4afff1(0x16a))[_0x4afff1(0x230)](/pow\(/g,'Math.pow(')[_0x4afff1(0x230)](/sqrt\(/g,_0x4afff1(0x1f3))),!(_0x3e19b4?/^[\d+\-*/().,a-zA-Z]+$/:/^[\d+\-*/().]+$/)[_0x4afff1(0x10a)](_0x63e8a6))throw new Error(_0x4afff1(0x127)+_0x618efd);if(!_0x63e8a6)throw new Error('Empty\x20expression');try{const _0x3b3866=Function(_0x4afff1(0x1de)+_0x63e8a6+')')();if(typeof _0x3b3866!=_0x4afff1(0x138)||isNaN(_0x3b3866))throw new Error('Expression\x20did\x20not\x20evaluate\x20to\x20a\x20number:\x20'+_0x618efd);return fe[_0x4afff1(0x1d1)](_0x100767,_0x3b3866),_0x3b3866;}catch(_0x53da74){throw new Error(_0x4afff1(0x178)+_0x618efd+_0x4afff1(0x1c3)+_0x53da74);}}function st(_0x128501,_0x2279cd){const _0x15993f=a1_0x1169de;if(!_0x2279cd){const _0x52254f=Number(_0x128501);return isNaN(_0x52254f)?_0x128501:_0x52254f;}switch(_0x2279cd[_0x15993f(0x1e5)]()){case'FL':return parseFloat(_0x128501);case'IN':return parseInt(_0x128501,0xa);case'CI':case'CS':case'ST':return _0x128501;case'DA':return new Date(_0x128501)[_0x15993f(0x18c)]();default:const _0x589c1d=Number(_0x128501);return isNaN(_0x589c1d)?_0x128501:_0x589c1d;}}const at=_0x38a739=>it[_0x38a739]||_0x38a739,W=class W{};D(W,'evaluateTree',(_0x5487a2,_0x13c198,_0x505c4a)=>_0x5487a2?_0x5487a2[a1_0x1169de(0xac)][a1_0x1169de(0x221)](_0x362abe=>W['evaluateNode'](_0x362abe,_0x13c198,_0x505c4a)):!0x1),D(W,a1_0x1169de(0xa0),(_0xad7579,_0x339736,_0x3a128c)=>{const _0x1fc9cf=a1_0x1169de;if(!_0xad7579)return!0x1;if(_0xad7579[_0x1fc9cf(0x14c)]===_0x1fc9cf(0x12f)){let _0x4e9c22=_0xad7579[_0x1fc9cf(0x124)][_0x1fc9cf(0x1d8)];const _0x4eb896=at(_0xad7579[_0x1fc9cf(0x124)]['LEFTVALUE']);_0x339736[_0x4eb896]!==void 0x0?_0x4e9c22=_0x339736[_0x4eb896]:_0x4e9c22=ae(_0xad7579[_0x1fc9cf(0x124)]['LEFTVALUE'],{'variableTree':_0x3a128c,'dataType':_0xad7579['data'][_0x1fc9cf(0xb7)],'silent':!0x0});const _0x466847=ae(_0xad7579['data'][_0x1fc9cf(0x94)],{'variableTree':_0x3a128c,'dataType':_0xad7579[_0x1fc9cf(0x124)][_0x1fc9cf(0xb7)],'silent':!0x0});return rt[_0xad7579[_0x1fc9cf(0x124)][_0x1fc9cf(0x187)]](_0x4e9c22,_0x466847);}if(_0xad7579[_0x1fc9cf(0x14c)]==='operation'){const _0x33cb10=_0xad7579[_0x1fc9cf(0x220)]['map'](_0x1d5c1f=>W[_0x1fc9cf(0xa0)](_0x1d5c1f,_0x339736,_0x3a128c));switch(_0xad7579[_0x1fc9cf(0x124)]['OPSTRING']){case _0x1fc9cf(0x14b):return _0x33cb10[_0x1fc9cf(0x221)](Boolean);case'OR':return _0x33cb10['some'](Boolean);case _0x1fc9cf(0x20d):return!_0x33cb10['every'](Boolean);case _0x1fc9cf(0x131):return!_0x33cb10[_0x1fc9cf(0x12c)](Boolean);default:return!0x1;}}return!0x1;});let oe=W;class xe{static[a1_0x1169de(0x236)](_0xffe330,_0x5ee07e,_0x477852){const _0x13438a=a1_0x1169de,_0x15fe1d=_0xffe330[_0x13438a(0x132)][_0x13438a(0xfd)](_0x218c6a=>_0x218c6a[_0x13438a(0x1e4)]===0x0||_0x218c6a['conditionTree']===null);for(const _0x5515b5 of _0xffe330['nodes']){if(_0x5515b5[_0x13438a(0x1e4)]===0x0||_0x5515b5[_0x13438a(0x169)]===null)continue;if(oe[_0x13438a(0xf3)](_0x5515b5[_0x13438a(0x169)],_0x5ee07e,_0x477852))return{'lindiv':_0x5515b5[_0x13438a(0x165)],'nodeNum':_0x5515b5['nodeNum'],'matched':!0x0,'isDefault':!0x1,'descriptorType':_0xffe330[_0x13438a(0x1d4)][_0x13438a(0x93)]};}if(_0x15fe1d)return{'lindiv':_0x15fe1d[_0x13438a(0x165)],'nodeNum':_0x15fe1d[_0x13438a(0x107)],'matched':!0x1,'isDefault':!0x0,'descriptorType':_0xffe330[_0x13438a(0x1d4)][_0x13438a(0x93)]};throw new Error(_0x13438a(0x190));}static[a1_0x1169de(0x22a)](_0x510c8e,_0x14d689,_0x5bc985){const _0x2f2443=a1_0x1169de,_0x24d346=[];for(const _0x80c228 of _0x510c8e[_0x2f2443(0x132)]){if(_0x80c228[_0x2f2443(0x1e4)]===0x0||_0x80c228[_0x2f2443(0x169)]===null)continue;oe[_0x2f2443(0xf3)](_0x80c228[_0x2f2443(0x169)],_0x14d689,_0x5bc985)&&_0x24d346[_0x2f2443(0x1d7)](_0x80c228);}return _0x24d346;}}class ot{constructor(_0x3b0088,_0x4c0bc0){const _0x1e6218=a1_0x1169de;D(this,'descriptors'),D(this,'variableTree'),(this['descriptors']=new Map(_0x3b0088['map'](_0x408551=>[_0x408551['descriptor']['NAME'],_0x408551])),this[_0x1e6218(0xba)]=_0x4c0bc0);}[a1_0x1169de(0x236)](_0x49b345,_0x1b16c7){const _0x4cfa90=a1_0x1169de,_0xccd186=this['getDescriptor'](_0x49b345);if(!_0xccd186)throw new Error(_0x4cfa90(0x15c)+_0x49b345);return xe[_0x4cfa90(0x236)](_0xccd186,_0x1b16c7,this[_0x4cfa90(0xba)]);}[a1_0x1169de(0x16b)](_0x2f8e18){const _0x941714=a1_0x1169de;return this['descriptors'][_0x941714(0x1ed)](_0x2f8e18);}[a1_0x1169de(0x18d)](_0x21bec2){const _0x40ac76=a1_0x1169de;return this[_0x40ac76(0x174)][_0x40ac76(0x9c)](_0x21bec2);}[a1_0x1169de(0xb9)](){const _0xec5de5=a1_0x1169de;return Array[_0xec5de5(0x207)](this[_0xec5de5(0x174)]['keys']());}[a1_0x1169de(0x9e)](_0xf6e38e){const _0x108719=a1_0x1169de;return Array[_0x108719(0x207)](this[_0x108719(0x174)][_0x108719(0x1c5)]())[_0x108719(0x103)](_0x25fc32=>_0x25fc32[_0x108719(0x1d4)]['DESC_TYPE']===_0xf6e38e);}[a1_0x1169de(0x164)](_0xdabf3,_0x41ca1f){const _0x7e0952=a1_0x1169de,_0xac0098=this[_0x7e0952(0x16b)](_0xdabf3);if(!_0xac0098)throw new Error('Descriptor\x20not\x20found:\x20'+_0xdabf3);return xe[_0x7e0952(0x22a)](_0xac0098,_0x41ca1f,this[_0x7e0952(0xba)]);}[a1_0x1169de(0x172)](){const _0x1e0a01=a1_0x1169de,_0x31745b={};for(const _0x54fdf6 of this[_0x1e0a01(0x174)][_0x1e0a01(0x1c5)]()){const _0x379780=_0x54fdf6[_0x1e0a01(0x1d4)][_0x1e0a01(0x93)];_0x31745b[_0x379780]=(_0x31745b[_0x379780]||0x0)+0x1;}return{'total':this[_0x1e0a01(0x174)][_0x1e0a01(0x1df)],'byType':_0x31745b,'names':this[_0x1e0a01(0xb9)]()};}}function X(){const _0x14e2d3=a1_0x1169de,_0x324d23=a1_0x3fe57c(De);if(!_0x324d23)throw new Error(_0x14e2d3(0x175));const {tree:_0x3a5701,setValue:_0x411152}=_0x324d23,_0x1e4df2=a1_0x4a3bd8(()=>_0x80993e=>ue(_0x80993e,_0x3a5701),[_0x3a5701]),_0x4c5c8a=a1_0x4a3bd8(()=>_0x590a56=>ge(_0x590a56,_0x3a5701),[_0x3a5701]),_0x4d0993=a1_0x4a3bd8(()=>_0x24fdaf=>Ee(_0x24fdaf),[]);return{'tree':_0x3a5701,'getValue':_0x1e4df2,'resolveString':_0x4c5c8a,'hasVariables':_0x4d0993,'setValue':_0x411152};}function lt({children:_0x2744e2,descriptorData:_0x3d260d}){const _0x32da6d=X(),_0x5506f3=a1_0x4a3bd8(()=>new ot(_0x3d260d,_0x32da6d['tree']),[_0x3d260d,_0x32da6d]);return a1_0x16dbaa(we['Provider'],{'value':_0x5506f3,'children':_0x2744e2});}var M=(_0x56690f=>(_0x56690f['_2D_TOP']=a1_0x1169de(0x8c),_0x56690f[a1_0x1169de(0x1e9)]=a1_0x1169de(0x126),_0x56690f[a1_0x1169de(0x1ff)]='3D',_0x56690f))(M||{});const pe=0x0,ct=0x1,Pe=_0x4e89e5=>_0x4e89e5+'.0',Re=_0x258e01=>_0x258e01+'.1',Ve=_0x26f343=>_0x26f343+'.2',Fe=_0x14ccec=>_0x14ccec+'.3',Te=_0xc11a47=>_0xc11a47[a1_0x1169de(0x88)](0x0,_0xc11a47[a1_0x1169de(0x167)]('.')),ut=_0x2e079c=>{const _0x535977=Te(_0x2e079c),_0xec2f6f=($e(_0x2e079c)+0x3)%0x4;return _0x535977+'.'+_0xec2f6f;},ht=_0x55f590=>{const _0x14405f=Te(_0x55f590),_0x589869=($e(_0x55f590)+0x1)%0x4;return _0x14405f+'.'+_0x589869;},$e=_0x31da2c=>parseInt(_0x31da2c[a1_0x1169de(0x88)](_0x31da2c[a1_0x1169de(0x167)]('.')+0x1)),j={'IAC_THICKNESS':a1_0x1169de(0xe3),'IAC_BOTTOMSHELFTHICKNESS':a1_0x1169de(0x102),'IAC_TOPSHELFTHICKNESS':a1_0x1169de(0x121)},S=0x1;function ee(){const _0x2338ff=a1_0x3fe57c(F);if(_0x2338ff===void 0x0)throw new Error('useData\x20must\x20be\x20used\x20within\x20a\x20DataProvider');return _0x2338ff;}function te(){const _0x37ce9b=a1_0x1169de,_0x20557d=a1_0x3fe57c(be);if(!_0x20557d)throw new Error(_0x37ce9b(0x9b));return _0x20557d;}function se(_0x193cd5,_0x419038,_0x507479){const _0x4c3904=a1_0x1169de,{getArticleData:_0x59e8e8}=ee(),{articleName:_0x3d9eaf}=te(),{anglClies:_0x4f469a}=_0x59e8e8(_0x3d9eaf),_0xd3db73=_0x4f469a['find'](_0x8861fc=>_0x8861fc['TREEID']===_0x193cd5&&_0x8861fc[_0x4c3904(0xb7)]===_0x507479&&_0x8861fc[_0x4c3904(0x17d)]===_0x419038);return _0xd3db73?{'thickness':Number(_0xd3db73[_0x4c3904(0x16e)])}:null;}function ft(_0x20cd63){const _0x1d11bd=a1_0x1169de,{getArticleData:_0x138c13}=ee(),{resolveString:_0x287a09}=X(),{articleName:_0x5b7032}=te(),_0x4a8f00=_0x138c13(_0x5b7032)[_0x1d11bd(0xa9)];if(!_0x4a8f00)return null;const _0x467a3e=_0x4a8f00[_0x1d11bd(0x103)](_0xc69151=>_0xc69151[_0x1d11bd(0xc0)]===_0x20cd63),_0x2ffa3b=new Map();return _0x467a3e[_0x1d11bd(0x9f)](_0x2ce927=>_0x2ffa3b[_0x1d11bd(0x1d1)]('AD\x20zone\x20info0'+(_0x2ce927[_0x1d11bd(0xab)]+0x1),_0x287a09(_0x2ce927[_0x1d11bd(0x196)]))),{'zoneInfo':_0x2ffa3b};}function he(_0x3b0f9c){const _0x15eee0=a1_0x1169de,{getArticleData:_0x5ab081}=ee(),{articleName:_0x24f2f2}=te(),{anglZones:_0x369e70}=_0x5ab081(_0x24f2f2),_0x1e4756=_0x369e70['find'](_0x4bb95a=>_0x4bb95a['TREEID']===_0x3b0f9c),_0x292595=_0x369e70[_0x15eee0(0x103)](_0xc1340b=>_0xc1340b[_0x15eee0(0xc0)]['substring'](0x0,_0xc1340b['TREEID'][_0x15eee0(0x167)]('.'))===_0x3b0f9c);return _0x292595[_0x15eee0(0x13b)]((_0x8d913e,_0x392fdd)=>_0x8d913e[_0x15eee0(0xc0)][_0x15eee0(0xf0)](_0x392fdd['TREEID'],void 0x0,{'numeric':!0x0})),_0x1e4756?{'currentZone':_0x1e4756,'children':_0x292595,get 'topShelfCP'(){const _0xcca9c7=_0x15eee0;return _0x1e4756?.[_0xcca9c7(0x11f)];},get 'bottomShelfCP'(){return _0x1e4756?.['BOTSHELF'];},'zoneInfo'(){const _0x46a3ec=_0x15eee0;return ft(_0x3b0f9c)?.[_0x46a3ec(0x11b)];},'getClieThk'(_0x322a4d,_0x12c052){const _0x41e7c8=_0x15eee0;return this[_0x41e7c8(0xc8)]===''?0x0:se(_0x322a4d,_0x12c052,ct)?.[_0x41e7c8(0x1b5)]||0x0;},get 'topShelfThk'(){const _0x2d0c5a=_0x15eee0;return this[_0x2d0c5a(0xff)](_0x3b0f9c,j[_0x2d0c5a(0x121)]);},get 'bottomShelfThk'(){const _0x24c837=_0x15eee0;return this[_0x24c837(0xff)](_0x3b0f9c,j['IAC_BOTTOMSHELFTHICKNESS']);},get 'dividerThk'(){const _0x3a7359=_0x15eee0;return this[_0x3a7359(0xff)](_0x3b0f9c,j['IAC_THICKNESS']);}}:null;}function re(_0x28aaad){const _0x175506=a1_0x1169de,{getArticleData:_0xb76f50}=ee(),{articleName:_0x3c55aa}=te(),{resolveString:_0x716c5a}=X(),{anglElems:_0x1489fd}=_0xb76f50(_0x3c55aa),_0x2c079c=_0x1489fd[_0x175506(0xfd)](_0x555177=>_0x555177['TREEID']===_0x28aaad),_0x5526b5=Te(_0x28aaad),_0x3e6f67=he(_0x5526b5);if(!_0x2c079c)return null;const _0x46844b=_0x2c079c[_0x175506(0x14a)]===''?0x0:se(_0x28aaad,j['IAC_THICKNESS'],pe)?.[_0x175506(0x1b5)]||0x0,_0x4a57ff=se(ht(_0x28aaad),j[_0x175506(0xe3)],pe)?.['thickness']||0x0,_0x3c9b5c=se(ut(_0x28aaad),j[_0x175506(0xe3)],pe)?.[_0x175506(0x1b5)]||0x0,_0x581d6e=_0x2c079c[_0x175506(0x14a)]===''?0x0:_0x2c079c[_0x175506(0x87)]!==''?ae(_0x716c5a(_0x2c079c[_0x175506(0x87)])):Number(_0x2c079c[_0x175506(0x1c0)]),_0x4d191a=(typeof _0x581d6e==_0x175506(0xd5)?0x0:_0x581d6e)||0x0,_0x154285=_0x2c079c[_0x175506(0x1d0)]||'black',_0x4867d2=_0x2c079c[_0x175506(0x14a)],_0x7b3ab5=_0x3e6f67?.['topShelfThk']||0x0,_0x1a2d82=_0x3e6f67?.['bottomShelfThk']||0x0,_0x6d5003={'start':Number(_0x2c079c['STARTOFFS'])||0x0,'end':Number(_0x2c079c['ENDOFFS'])||0x0,'top':Number(_0x2c079c[_0x175506(0x129)])||0x0,'bottom':Number(_0x2c079c['BOTOFFS'])||0x0},_0x3175bf={'start':_0x2c079c['STARTTRIM'],'end':_0x2c079c[_0x175506(0x1ec)],'top':_0x2c079c[_0x175506(0x16f)],'bottom':_0x2c079c[_0x175506(0x109)]},_0x3797ab={'top':_0x3175bf[_0x175506(0x12d)]==='S'?_0x7b3ab5:0x0,'bottom':_0x3175bf[_0x175506(0x11e)]==='S'?_0x1a2d82:0x0};return{'TREEID':_0x28aaad,'thk':_0x46844b,'nxtThk':_0x4a57ff,'prvThk':_0x3c9b5c,'inset':_0x4d191a,'color':_0x154285,'CPNAME':_0x4867d2,'topThk':_0x7b3ab5,'bottomThk':_0x1a2d82,'oversize':_0x6d5003,'trim':_0x3175bf,'elmTrimThk':_0x3797ab};}var b=class extends Error{constructor(_0xfeac52){const _0x4d1ae1=a1_0x1169de;super(_0x4d1ae1(0xa6)+_0xfeac52),this[_0x4d1ae1(0x98)]=_0x4d1ae1(0x1b9);}},B,pt=(B=class{constructor(){const _0x7863d5=a1_0x1169de;D(this,_0x7863d5(0x1f8),new Map()),D(this,_0x7863d5(0x1c7),''),D(this,_0x7863d5(0x191),[]),D(this,_0x7863d5(0x113),0x0),D(this,_0x7863d5(0xf6),0x0),D(this,'errors',[]);}[a1_0x1169de(0xb8)](_0xfee038){const _0x3b0e8f=a1_0x1169de;this[_0x3b0e8f(0xf1)][_0x3b0e8f(0x1d7)](_0xfee038);}['scan'](_0x49825d){const _0x1cfeb4=a1_0x1169de;if(this[_0x1cfeb4(0x1f8)]['has'](_0x49825d)){const _0x2b46d=this['cache'][_0x1cfeb4(0x1ed)](_0x49825d);return this[_0x1cfeb4(0x1f8)][_0x1cfeb4(0x12b)](_0x49825d),this[_0x1cfeb4(0x1f8)][_0x1cfeb4(0x1d1)](_0x49825d,_0x2b46d),_0x2b46d;}try{this[_0x1cfeb4(0x1c7)]=_0x49825d;const _0x22c725=this[_0x1cfeb4(0x1fc)]();if(this['cache'][_0x1cfeb4(0x1d1)](this[_0x1cfeb4(0x1c7)],_0x22c725),this[_0x1cfeb4(0x1f8)][_0x1cfeb4(0x1df)]>0x3){const _0x4d7793=this[_0x1cfeb4(0x1f8)][_0x1cfeb4(0xf8)]()[_0x1cfeb4(0x1af)]()[_0x1cfeb4(0x101)];this[_0x1cfeb4(0x1f8)][_0x1cfeb4(0x12b)](_0x4d7793);}return _0x22c725;}catch(_0x2af333){throw console[_0x1cfeb4(0x86)](_0x2af333),new Error(_0x2af333 instanceof Error?_0x2af333[_0x1cfeb4(0x194)]:String(_0x2af333));}}['preformScan'](){const _0x1c6ba5=a1_0x1169de;this[_0x1c6ba5(0x1a4)]();try{if(this[_0x1c6ba5(0x1c7)][_0x1c6ba5(0x21e)]('<')||this[_0x1c6ba5(0x1c7)][_0x1c6ba5(0x21e)]('>'))throw new Error(_0x1c6ba5(0x1cb));if(this[_0x1c6ba5(0x1c7)]['length']===0x0)throw new Error(_0x1c6ba5(0x13f));for(this[_0x1c6ba5(0x113)]=0x0,this[_0x1c6ba5(0xf6)]=0x0,this[_0x1c6ba5(0x191)]=[],this[_0x1c6ba5(0x113)]===0x0&&this[_0x1c6ba5(0x214)](_0x1c6ba5(0x134),'<');!this[_0x1c6ba5(0xc1)]();){this[_0x1c6ba5(0x113)]=this['current'];const _0x55a53b=this[_0x1c6ba5(0x21f)]();switch(_0x55a53b){case':':this[_0x1c6ba5(0x214)](_0x1c6ba5(0x22e),'>'),this[_0x1c6ba5(0x214)](_0x1c6ba5(0x134),'<'),this[_0x1c6ba5(0xad)]();break;case'\x20':case'\x0d':case'\x09':case'\x0a':this['advance']();break;case'0':case'1':case'2':case'3':case'4':case'5':case'6':case'7':case'8':case'9':case'.':this[_0x1c6ba5(0x1fa)]();break;case'$':this['scanVariable']();break;case'+':case'-':case'*':case'/':this[_0x1c6ba5(0x214)](_0x1c6ba5(0x1d2),_0x55a53b),this['advance']();break;case'(':this['addToken'](_0x1c6ba5(0x1be),'('),this['advance']();break;case')':this[_0x1c6ba5(0x214)](_0x1c6ba5(0x8d),')'),this[_0x1c6ba5(0xad)]();break;case'{':this[_0x1c6ba5(0xf6)]!=0x0&&this[_0x1c6ba5(0x191)][this['tokens'][_0x1c6ba5(0xc6)]-0x1]['type']!=_0x1c6ba5(0x1d2)&&this[_0x1c6ba5(0x214)](_0x1c6ba5(0x1d2),'*'),this[_0x1c6ba5(0x214)](_0x1c6ba5(0xee),'{'),this[_0x1c6ba5(0x214)]('LEFT_ANGLE_BRACKET','<'),this[_0x1c6ba5(0xad)]();break;case'}':this[_0x1c6ba5(0x214)](_0x1c6ba5(0x22e),'>'),this[_0x1c6ba5(0x214)]('BRACE_CLOSE','}'),this[_0x1c6ba5(0xad)]();break;case'[':this[_0x1c6ba5(0x214)]('OPERATOR','~'),this[_0x1c6ba5(0x214)](_0x1c6ba5(0xcd),'['),this[_0x1c6ba5(0xad)]();break;case']':this[_0x1c6ba5(0x214)](_0x1c6ba5(0x1f2),']'),this['advance']();break;case'm':this[_0x1c6ba5(0x135)]()==='m'?this[_0x1c6ba5(0xaf)]():this[_0x1c6ba5(0xdb)]();break;default:this[_0x1c6ba5(0x16c)](_0x55a53b)?this[_0x1c6ba5(0xdb)]():this[_0x1c6ba5(0xb8)](_0x1c6ba5(0x224)+_0x55a53b+'\x20at\x20position:\x20'+this[_0x1c6ba5(0xf6)]);}}if(this[_0x1c6ba5(0x214)](_0x1c6ba5(0x22e),'>'),this[_0x1c6ba5(0x214)](_0x1c6ba5(0x136),''),this['errors']['length']>0x0)throw new Error(this[_0x1c6ba5(0xf1)]['join'](',\x0a'));return this[_0x1c6ba5(0x191)];}catch(_0x30355d){throw new Error(_0x30355d instanceof Error?_0x30355d[_0x1c6ba5(0x194)]:String(_0x30355d));}}[a1_0x1169de(0xc1)](){const _0x407e1a=a1_0x1169de;return this[_0x407e1a(0xf6)]>=this[_0x407e1a(0x1c7)][_0x407e1a(0xc6)];}[a1_0x1169de(0xad)](){const _0x563104=a1_0x1169de;return this['source'][_0x563104(0x195)](this[_0x563104(0xf6)]++);}[a1_0x1169de(0x21f)](){const _0x3e7115=a1_0x1169de;return this['isAtEnd']()?'\x00':this['source'][_0x3e7115(0x195)](this[_0x3e7115(0xf6)]);}[a1_0x1169de(0x135)](){const _0x3b159d=a1_0x1169de;return this['current']+0x1>=this[_0x3b159d(0x1c7)]['length']?'\x00':this[_0x3b159d(0x1c7)][_0x3b159d(0x195)](this[_0x3b159d(0xf6)]+0x1);}[a1_0x1169de(0x214)](_0x5bb6a9,_0x1d870f){const _0x383802=a1_0x1169de;this[_0x383802(0x191)][_0x383802(0x1d7)]({'type':_0x5bb6a9,'lexeme':_0x1d870f||(_0x5bb6a9?this[_0x383802(0x1c7)][_0x383802(0x88)](this[_0x383802(0x113)],this[_0x383802(0xf6)]):''),'position':this[_0x383802(0x113)]});}['isDigit'](_0x2082d6){const _0x3b0deb=a1_0x1169de;return/^[0-9]$/[_0x3b0deb(0x10a)](_0x2082d6);}[a1_0x1169de(0x16c)](_0x3d56e2){return/^[a-zA-Z]$/['test'](_0x3d56e2);}[a1_0x1169de(0x1fa)](){const _0x116191=a1_0x1169de;for(;this[_0x116191(0xfb)](this[_0x116191(0x21f)]());)this['advance']();if(this[_0x116191(0x21f)]()==='.'){for(this[_0x116191(0xad)](),this['isDigit'](this['peek']())||this[_0x116191(0xb8)](_0x116191(0xb4)+this['current']);this['isDigit'](this[_0x116191(0x21f)]());)this[_0x116191(0xad)]();}this[_0x116191(0x214)](_0x116191(0x1b3));}[a1_0x1169de(0x158)](){const _0x3fb48f=a1_0x1169de;for(this[_0x3fb48f(0xad)]();/[a-zA-Z0-9_]/[_0x3fb48f(0x10a)](this[_0x3fb48f(0x21f)]());)this['advance']();const _0x4d954b=this[_0x3fb48f(0x1c7)]['substring'](this[_0x3fb48f(0x113)]+0x1,this[_0x3fb48f(0xf6)]);if(_0x4d954b[_0x3fb48f(0x19b)]('mm')){const _0x21a7db=_0x4d954b[_0x3fb48f(0x88)](0x0,_0x4d954b[_0x3fb48f(0xc6)]-0x2);_0x21a7db&&_0x21a7db[_0x3fb48f(0xc6)]>0x0?(this['addToken']('VARIABLE',_0x21a7db),this[_0x3fb48f(0x214)](_0x3fb48f(0x1b1),'mm')):this['reportError'](_0x3fb48f(0x226));}else this[_0x3fb48f(0x214)](_0x3fb48f(0xf2),_0x4d954b);}['scanMm'](){const _0x3aaaa3=a1_0x1169de;this['advance'](),this[_0x3aaaa3(0xad)](),this[_0x3aaaa3(0x214)](_0x3aaaa3(0x1b1),'mm');}['scanIdentifierOrFunction'](){const _0x5497ea=a1_0x1169de,_0x5d6ecb=['X','Y','n'];for(;this['isAlpha'](this[_0x5497ea(0x21f)]());)this[_0x5497ea(0xad)]();const _0xec170a=this[_0x5497ea(0x1c7)][_0x5497ea(0x88)](this['start'],this['current']),_0x187290=B['MATHEMATICAL_FUNCTIONS'][_0xec170a[_0x5497ea(0x14e)]()];_0x187290!=null?this[_0x5497ea(0x214)](_0x187290,_0xec170a):_0x5d6ecb['includes'](_0xec170a)?this['addToken'](_0x5497ea(0x10b),_0xec170a):this['reportError']('Unknown\x20identifier:\x20'+_0xec170a+_0x5497ea(0xe1)+this[_0x5497ea(0xf6)]);}[a1_0x1169de(0x1a4)](){const _0x466c09=a1_0x1169de;this['tokens']=[],this['start']=0x0,this[_0x466c09(0xf6)]=0x0,this[_0x466c09(0xf1)]=[];}},D(B,a1_0x1169de(0x1b0),{'abs':a1_0x1169de(0x137),'acos':a1_0x1169de(0x137),'asin':a1_0x1169de(0x137),'atan':a1_0x1169de(0x137),'bog2deg':'FUNCTION','cos':a1_0x1169de(0x137),'deg2bog':'FUNCTION','in2mm':a1_0x1169de(0x137),'ln':a1_0x1169de(0x137),'log':a1_0x1169de(0x137),'log10':a1_0x1169de(0x137),'max':a1_0x1169de(0x137),'maxunder':a1_0x1169de(0x137),'mm2in':a1_0x1169de(0x137),'nextto':a1_0x1169de(0x137),'pi':a1_0x1169de(0x137),'pow':'FUNCTION','round':'FUNCTION','sin':'FUNCTION','sqr':a1_0x1169de(0x137),'tab':a1_0x1169de(0x137),'tan':a1_0x1169de(0x137)}),B),mt=class{constructor(){const _0x399fcb=a1_0x1169de;D(this,_0x399fcb(0x1f8),new Map()),D(this,_0x399fcb(0x191),[]),D(this,_0x399fcb(0xf6),0x0),D(this,'resetCurrent',()=>{const _0x448783=_0x399fcb;this[_0x448783(0xf6)]=0x0;});}[a1_0x1169de(0x12e)](_0x2f7161){const _0x530f01=a1_0x1169de;if(this[_0x530f01(0x1f8)]['has'](_0x2f7161)){const _0x92dd57=this[_0x530f01(0x1f8)]['get'](_0x2f7161);return this[_0x530f01(0x1f8)][_0x530f01(0x12b)](_0x2f7161),this[_0x530f01(0x1f8)][_0x530f01(0x1d1)](_0x2f7161,_0x92dd57),_0x92dd57;}try{this[_0x530f01(0x191)]=_0x2f7161;const _0x13c5ec=this['performParse'](_0x2f7161);if(this[_0x530f01(0x1f8)][_0x530f01(0x1d1)](_0x2f7161,_0x13c5ec),this[_0x530f01(0x1f8)][_0x530f01(0x1df)]>0x3){const _0x8daf37=this[_0x530f01(0x1f8)]['keys']()[_0x530f01(0x1af)]()[_0x530f01(0x101)];this[_0x530f01(0x1f8)]['delete'](_0x8daf37);}return _0x13c5ec;}catch(_0xd54e74){throw new Error(_0xd54e74 instanceof Error?_0xd54e74[_0x530f01(0x194)]:String(_0xd54e74));}}[a1_0x1169de(0x22b)](_0xfb36db){const _0x3524f6=a1_0x1169de;if(this[_0x3524f6(0x92)](),this[_0x3524f6(0x191)]['length']===0x0)throw new Error(_0x3524f6(0x229));try{return this[_0x3524f6(0xce)]();}catch(_0x33c088){throw new Error(_0x33c088 instanceof Error?_0x33c088['message']:String(_0x33c088));}}['checkMillimeterSuffix'](){const _0x1fcb5c=a1_0x1169de;if(this['isAtEnd']())return!0x1;const _0x3601a9=this[_0x1fcb5c(0x21f)]();return _0x3601a9[_0x1fcb5c(0x9d)]===_0x1fcb5c(0x1b1)&&_0x3601a9[_0x1fcb5c(0x227)]==='mm';}['consumeMillimeterSuffix'](){const _0x158b8d=a1_0x1169de;return this[_0x158b8d(0xcc)]()?(this[_0x158b8d(0xad)](),!0x0):!0x1;}[a1_0x1169de(0xbe)](){const _0xf1dc40=a1_0x1169de,_0x59cff7=[];if(!this[_0xf1dc40(0x1bb)](_0xf1dc40(0x134)))return this[_0xf1dc40(0xce)]();for(;this[_0xf1dc40(0x1bb)](_0xf1dc40(0x134));){this[_0xf1dc40(0xad)]();let _0x1e6edf=this[_0xf1dc40(0xce)]();this[_0xf1dc40(0x115)](_0xf1dc40(0x22e),_0xf1dc40(0x233)),_0x59cff7[_0xf1dc40(0x1d7)]({'type':'Section','nodes':_0x1e6edf,'hasMillimeterSuffix':this[_0xf1dc40(0x11c)]()});}if(_0x59cff7[_0xf1dc40(0xc6)]===0x1){const _0x2e2d16=_0x59cff7[0x0];return _0x2e2d16[_0xf1dc40(0x9d)]===_0xf1dc40(0x108)&&_0x2e2d16[_0xf1dc40(0x132)][_0xf1dc40(0x9d)]==='Section'?_0x2e2d16[_0xf1dc40(0x132)]:_0x2e2d16;}return{'type':_0xf1dc40(0x96),'sections':_0x59cff7};}[a1_0x1169de(0xce)](){const _0x168bfc=a1_0x1169de;try{let _0x219f96=this['term']();for(;!this[_0x168bfc(0xc1)]()&&this[_0x168bfc(0x1bb)](_0x168bfc(0x1d2))&&['+','-'][_0x168bfc(0x21e)](this['peek']()[_0x168bfc(0x227)]);){this[_0x168bfc(0xad)]();const _0xe9c65b=this[_0x168bfc(0x112)]()[_0x168bfc(0x227)],_0x445d00=this[_0x168bfc(0xa1)]();_0x219f96={'type':_0x168bfc(0xa3),'left':_0x219f96,'operator':_0xe9c65b,'right':_0x445d00};}return _0x219f96;}catch(_0x179e0d){throw new Error(_0x168bfc(0x14f)+_0x179e0d[_0x168bfc(0x194)]);}}[a1_0x1169de(0xa1)](){const _0x4ae371=a1_0x1169de;try{let _0x2bed7f=this[_0x4ae371(0x1f6)]();for(;!this['isAtEnd']()&&this['check'](_0x4ae371(0x1d2))&&['*','/','~'][_0x4ae371(0x21e)](this[_0x4ae371(0x21f)]()['lexeme']);){this[_0x4ae371(0xad)]();const _0x34831b=this['previous']()[_0x4ae371(0x227)],_0x4c2c8c=this[_0x4ae371(0x1f6)]();if(_0x4c2c8c[_0x4ae371(0x9d)]===_0x4ae371(0x8f)&&_0x4c2c8c['name']==='n')throw new Error(_0x4ae371(0xa8));_0x2bed7f={'type':'BinaryExpression','left':_0x2bed7f,'operator':_0x34831b,'right':_0x4c2c8c};}return _0x2bed7f;}catch(_0x2fc325){throw new Error(_0x4ae371(0xe2)+_0x2fc325[_0x4ae371(0x194)]);}}[a1_0x1169de(0x1f6)](){const _0x313794=a1_0x1169de;try{if(this[_0x313794(0x1bb)](_0x313794(0x1d2))&&['-','+'][_0x313794(0x21e)](this[_0x313794(0x21f)]()['lexeme'])){this[_0x313794(0xad)]();const _0x1226c4=this[_0x313794(0x112)]()[_0x313794(0x227)],_0x3d7372=this[_0x313794(0x1f6)]();return{'type':_0x313794(0x1e8),'operator':_0x1226c4,'right':_0x3d7372};}return this[_0x313794(0x198)]();}catch(_0x1a8444){throw new Error(_0x313794(0x19c)+_0x1a8444[_0x313794(0x194)]);}}[a1_0x1169de(0x198)](){const _0x2d5a71=a1_0x1169de;try{if(this[_0x2d5a71(0x1bb)](_0x2d5a71(0x1b3)))return this['advance'](),{'type':_0x2d5a71(0x235),'value':parseFloat(this[_0x2d5a71(0x112)]()[_0x2d5a71(0x227)]),'hasMillimeterSuffix':this[_0x2d5a71(0x11c)]()};if(this[_0x2d5a71(0x1bb)]('VARIABLE'))return this[_0x2d5a71(0xad)](),{'type':'Variable','name':this[_0x2d5a71(0x112)]()[_0x2d5a71(0x227)],'hasMillimeterSuffix':this['consumeMillimeterSuffix']()};if(this[_0x2d5a71(0x1bb)]('SPECIAL_VARIABLE'))return this[_0x2d5a71(0xad)](),{'type':_0x2d5a71(0x8f),'name':this[_0x2d5a71(0x112)]()[_0x2d5a71(0x227)],'hasMillimeterSuffix':this[_0x2d5a71(0x112)]()[_0x2d5a71(0x227)]==='n'};if(this['check']('FUNCTION')){this[_0x2d5a71(0xad)]();const _0x4c357e=this[_0x2d5a71(0x112)]()['lexeme'];this[_0x2d5a71(0x115)]('PAREN_OPEN',_0x2d5a71(0xed)+_0x4c357e+'\x27.');const _0x2dbb71=this[_0x2d5a71(0xce)]();return this[_0x2d5a71(0x115)](_0x2d5a71(0x8d),_0x2d5a71(0x1d9)),{'type':_0x2d5a71(0x19e),'name':_0x4c357e,'arg':_0x2dbb71,'hasMillimeterSuffix':this['consumeMillimeterSuffix']()};}if(this[_0x2d5a71(0x1bb)](_0x2d5a71(0x1be))){this[_0x2d5a71(0xad)]();const _0x152367=this[_0x2d5a71(0xce)]();if(!_0x152367)throw new Error(_0x2d5a71(0x1e7));return this[_0x2d5a71(0x115)](_0x2d5a71(0x8d),_0x2d5a71(0x1f9)),{'type':_0x2d5a71(0x1ca),'expression':_0x152367,'hasMillimeterSuffix':this[_0x2d5a71(0x11c)]()};}if(this[_0x2d5a71(0x1bb)](_0x2d5a71(0x8d)))throw new Error('Unexpected\x20\x27)\x27\x20without\x20a\x20matching\x20\x27(\x27.');if(this[_0x2d5a71(0x1bb)]('BRACE_OPEN')){this[_0x2d5a71(0xad)]();let _0x5081dd=this[_0x2d5a71(0xbe)]();return this[_0x2d5a71(0x115)](_0x2d5a71(0x213),_0x2d5a71(0x142)),_0x5081dd[_0x2d5a71(0x9d)]===_0x2d5a71(0x108)&&_0x5081dd[_0x2d5a71(0x132)][_0x2d5a71(0x9d)]===_0x2d5a71(0x108)&&(_0x5081dd=_0x5081dd['nodes']),{'type':'Repeated','toRepeat':_0x5081dd,'hasMillimeterSuffix':this[_0x2d5a71(0x11c)]()};}if(this[_0x2d5a71(0x1bb)](_0x2d5a71(0x134)))return this['sections']();throw new Error(_0x2d5a71(0x1ce)+this[_0x2d5a71(0x21f)]()[_0x2d5a71(0x227)]);}catch(_0x5ebdca){throw new Error('Failed\x20to\x20parse\x20primary:\x20'+_0x5ebdca[_0x2d5a71(0x194)]);}}[a1_0x1169de(0x1bb)](_0x1927a6){const _0x776221=a1_0x1169de;return this[_0x776221(0xc1)]()?!0x1:this['peek']()[_0x776221(0x9d)]===_0x1927a6;}['advance'](){const _0x4bd8a9=a1_0x1169de;return this[_0x4bd8a9(0xc1)]()||this[_0x4bd8a9(0xf6)]++,this[_0x4bd8a9(0x112)]();}[a1_0x1169de(0x115)](_0x3193e1,_0x1999c3){const _0x428093=a1_0x1169de;if(this[_0x428093(0x1bb)](_0x3193e1))return this[_0x428093(0xad)]();throw new Error(_0x1999c3);}[a1_0x1169de(0xc1)](){const _0x5acc79=a1_0x1169de;return this['current']>=this['tokens'][_0x5acc79(0xc6)];}['peek'](){const _0x12de88=a1_0x1169de;return this[_0x12de88(0x191)][this[_0x12de88(0xf6)]];}[a1_0x1169de(0x112)](){const _0xf5cef0=a1_0x1169de;return this['tokens'][this[_0xf5cef0(0xf6)]-0x1];}},ye=_0x5ca091=>_0x5ca091[a1_0x1169de(0x9d)]===a1_0x1169de(0x8f)&&_0x5ca091[a1_0x1169de(0x98)]==='n';function dt(_0x26467c,_0x37ee24){const _0x4f2f5f=a1_0x1169de;if(_0x26467c[_0x4f2f5f(0x13a)][_0x4f2f5f(0x9d)]===_0x4f2f5f(0x8f)&&_0x26467c[_0x4f2f5f(0x13a)][_0x4f2f5f(0x98)]==='n')return new b(_0x4f2f5f(0xcf));const _0x159c77=ye(_0x26467c[_0x4f2f5f(0xdd)])?_0x26467c[_0x4f2f5f(0xdd)]:this[_0x4f2f5f(0x236)](_0x26467c[_0x4f2f5f(0xdd)]),_0x234c72=ye(_0x26467c[_0x4f2f5f(0x13a)])?_0x26467c['right']:this[_0x4f2f5f(0x236)](_0x26467c[_0x4f2f5f(0x13a)]);if(_0x159c77 instanceof b)return _0x159c77;if(_0x234c72 instanceof b)return _0x234c72;const _0x38c430=_0x159c77[_0x4f2f5f(0x9d)]==='NumberLiteral'&&_0x234c72[_0x4f2f5f(0x9d)]==='NumberLiteral',_0x608011=_0x38c430?_0x159c77['hasMillimeterSuffix']===_0x234c72['hasMillimeterSuffix']:!0x1,_0x195e98=_0x4cbdc2=>_0x4cbdc2['type']===_0x4f2f5f(0xc9);switch(_0x26467c[_0x4f2f5f(0x18e)]){case'+':return _0x38c430&&_0x608011&&_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x1?{'type':_0x4f2f5f(0x235),'value':_0x159c77[_0x4f2f5f(0x101)]+_0x234c72[_0x4f2f5f(0x101)],'hasMillimeterSuffix':_0x159c77[_0x4f2f5f(0xc5)]===!0x0||_0x234c72[_0x4f2f5f(0xc5)]===!0x0,'spreadMm':_0x159c77[_0x4f2f5f(0x1cc)]||_0x234c72['spreadMm']}:_0x38c430&&_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x0?{'type':_0x4f2f5f(0x235),'value':_0x159c77[_0x4f2f5f(0x101)]+_0x234c72['value'],'spreadMm':_0x159c77[_0x4f2f5f(0xc5)]||_0x234c72[_0x4f2f5f(0xc5)]}:{'type':_0x4f2f5f(0xa3),'operator':'+','left':_0x159c77,'right':_0x234c72};case'*':return _0x38c430&&_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x0?{'type':_0x4f2f5f(0x235),'value':_0x159c77['value']*_0x234c72[_0x4f2f5f(0x101)],'hasMillimeterSuffix':_0x159c77[_0x4f2f5f(0xc5)]===!0x0||_0x234c72[_0x4f2f5f(0xc5)]===!0x0,'spreadMm':_0x159c77[_0x4f2f5f(0x1cc)]||_0x234c72[_0x4f2f5f(0x1cc)]}:_0x195e98(_0x234c72)&&_0x159c77[_0x4f2f5f(0x9d)]===_0x4f2f5f(0x235)?{'type':_0x4f2f5f(0xc9),'toRepeat':_0x234c72['toRepeat'],'times':Math[_0x4f2f5f(0x217)](_0x159c77[_0x4f2f5f(0x101)]),'hasMillimeterSuffix':_0x234c72[_0x4f2f5f(0x9d)]===_0x4f2f5f(0x235)&&_0x234c72[_0x4f2f5f(0xc5)]||!0x1}:_0x37ee24?.['isInsideGroup']==!0x1&&_0x159c77[_0x4f2f5f(0x9d)]!=='SpecialVariable'&&_0x159c77[_0x4f2f5f(0x98)]!=='n'?new b(_0x4f2f5f(0x159)):_0x159c77['type']===_0x4f2f5f(0x8f)?{'type':_0x4f2f5f(0xa3),'operator':'*','left':_0x159c77,'right':{'type':_0x4f2f5f(0x235),'value':_0x234c72[_0x4f2f5f(0x101)],'hasMillimeterSuffix':!0x0}}:{'type':_0x4f2f5f(0xa3),'operator':'*','left':_0x159c77,'right':_0x234c72,'hasMillimeterSuffix':_0x159c77[_0x4f2f5f(0xc5)]||_0x234c72[_0x4f2f5f(0xc5)]};case'/':if(_0x38c430&&_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x0)return{'type':_0x4f2f5f(0x235),'value':_0x159c77[_0x4f2f5f(0x101)]/_0x234c72[_0x4f2f5f(0x101)],'hasMillimeterSuffix':_0x159c77[_0x4f2f5f(0xc5)]===!0x0||_0x234c72['hasMillimeterSuffix']===!0x0};if(_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x1)return new b(_0x4f2f5f(0x20e));case'-':return _0x38c430&&_0x608011&&_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x1?{'type':_0x4f2f5f(0x235),'value':_0x159c77['value']-_0x234c72[_0x4f2f5f(0x101)],'hasMillimeterSuffix':_0x159c77[_0x4f2f5f(0xc5)]===!0x0||_0x234c72[_0x4f2f5f(0xc5)]===!0x0,'spreadMm':_0x159c77[_0x4f2f5f(0x1cc)]||_0x234c72[_0x4f2f5f(0x1cc)]}:_0x38c430&&_0x37ee24?.[_0x4f2f5f(0x1bd)]==!0x0?{'type':_0x4f2f5f(0x235),'value':_0x159c77[_0x4f2f5f(0x101)]-_0x234c72[_0x4f2f5f(0x101)],'spreadMm':_0x159c77[_0x4f2f5f(0xc5)]||_0x234c72[_0x4f2f5f(0xc5)]}:{'type':_0x4f2f5f(0xa3),'operator':'-','left':_0x159c77,'right':_0x234c72};default:throw new b(_0x4f2f5f(0x223));}}function gt(_0x4eec68,_0x463f8f){const _0x4dc796=a1_0x1169de,_0x47db2b=this[_0x4dc796(0x236)](_0x4eec68[_0x4dc796(0x17b)]);if(_0x47db2b instanceof b)throw new b('Error\x20in\x20function\x20arguments');switch(_0x4eec68['name'][_0x4dc796(0x19a)]()){case _0x4dc796(0x179):return{'type':'NumberLiteral','value':Math[_0x4dc796(0x179)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.['isInsideGroup']===!0x1};case _0x4dc796(0x89):return{'type':_0x4dc796(0x235),'value':Math['acos'](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b['hasMillimeterSuffix'],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0x1c2):return{'type':'NumberLiteral','value':Math[_0x4dc796(0x1c2)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b['hasMillimeterSuffix'],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0xe8):return{'type':'NumberLiteral','value':Math[_0x4dc796(0xe8)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0x183):return{'type':_0x4dc796(0x235),'value':Math[_0x4dc796(0x183)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0x234):return{'type':_0x4dc796(0x235),'value':Math[_0x4dc796(0x234)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0x1fd):return{'type':_0x4dc796(0x235),'value':Math[_0x4dc796(0x1fd)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.['isInsideGroup']===!0x1};case'round':return{'type':_0x4dc796(0x235),'value':Math['round'](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b['hasMillimeterSuffix'],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0x225):return{'type':_0x4dc796(0x235),'value':_0x47db2b[_0x4dc796(0x101)]*(0xb4/Math['PI']),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case'deg2bog':return{'type':_0x4dc796(0x235),'value':_0x47db2b[_0x4dc796(0x101)]*(Math['PI']/0xb4),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.['isInsideGroup']===!0x1};case _0x4dc796(0x20f):return{'type':_0x4dc796(0x235),'value':_0x47db2b[_0x4dc796(0x101)]*25.4,'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case _0x4dc796(0x166):return{'type':_0x4dc796(0x235),'value':_0x47db2b['value']/25.4,'hasMillimeterSuffix':_0x47db2b['hasMillimeterSuffix'],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case'ln':return{'type':'NumberLiteral','value':Math['log'](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.[_0x4dc796(0x1bd)]===!0x1};case'log10':return{'type':_0x4dc796(0x235),'value':Math[_0x4dc796(0x21c)](_0x47db2b[_0x4dc796(0x101)]),'hasMillimeterSuffix':_0x47db2b[_0x4dc796(0xc5)],'spreadMm':_0x463f8f?.['isInsideGroup']===!0x1};default:throw new b(_0x4dc796(0xb2));}}function Et(_0x31c171){const _0x5f0b63=a1_0x1169de;if(!this[_0x5f0b63(0x208)]||!(_0x31c171['name']in this[_0x5f0b63(0x208)]))throw new b(_0x5f0b63(0x17a)+_0x31c171[_0x5f0b63(0x98)]+_0x5f0b63(0x161));return{'type':_0x5f0b63(0x235),'value':this['variables'][_0x31c171[_0x5f0b63(0x98)]],'hasMillimeterSuffix':_0x31c171[_0x5f0b63(0xc5)]};}var St=class{constructor(){const _0xf9da6e=a1_0x1169de;D(this,_0xf9da6e(0x154),0x0),D(this,_0xf9da6e(0x208),{}),D(this,_0xf9da6e(0x20b)),D(this,_0xf9da6e(0x20c)),D(this,_0xf9da6e(0xec)),(this[_0xf9da6e(0x20b)]=dt[_0xf9da6e(0xbf)](this),this['evaluateFunction']=gt['bind'](this),this['evaluateVariable']=Et[_0xf9da6e(0xbf)](this));}[a1_0x1169de(0x236)](_0x3b9b7f,_0x477874={'isInsideGroup':!0x1},_0x5ac764){const _0x28be17=a1_0x1169de;this['nestingLevel']++;try{if(_0x5ac764&&(this[_0x28be17(0x208)]=_0x5ac764),this[_0x28be17(0x15e)](_0x3b9b7f))return this[_0x28be17(0x1ae)](_0x3b9b7f,_0x477874);if(this['isSection'](_0x3b9b7f)){const _0x114f70=this[_0x28be17(0x236)](_0x3b9b7f[_0x28be17(0x132)],_0x477874);return _0x114f70 instanceof b?new b(_0x28be17(0x17e)+JSON[_0x28be17(0x1a3)](_0x3b9b7f)):{..._0x3b9b7f,'nodes':_0x114f70};}if(this[_0x28be17(0x1dc)](_0x3b9b7f)){if(_0x477874[_0x28be17(0x1bd)]){if(_0x3b9b7f[_0x28be17(0xc5)])return{..._0x3b9b7f,'spreadMm':!0x0};}else return _0x3b9b7f;}if(this['isGrouping'](_0x3b9b7f)){_0x477874={..._0x477874,'isInsideGroup':!0x0};const _0x4cae73=this[_0x28be17(0x236)](_0x3b9b7f[_0x28be17(0xce)],_0x477874);return _0x4cae73 instanceof b?_0x4cae73:{..._0x4cae73,'hasMillimeterSuffix':_0x3b9b7f[_0x28be17(0xc5)]};}if(this[_0x28be17(0x215)](_0x3b9b7f)){const _0x188a46=this[_0x28be17(0x236)](_0x3b9b7f[_0x28be17(0x1c6)]);return _0x188a46 instanceof b?_0x188a46:{..._0x3b9b7f,'toRepeat':_0x188a46};}if(this['isBinaryExpression'](_0x3b9b7f))return this[_0x28be17(0x20b)](_0x3b9b7f,_0x477874);if(this[_0x28be17(0x186)](_0x3b9b7f))return{'type':_0x28be17(0x235),'value':_0x3b9b7f[_0x28be17(0x18e)]==='-'?-0x1*_0x3b9b7f[_0x28be17(0x13a)][_0x28be17(0x101)]:_0x3b9b7f[_0x28be17(0x13a)][_0x28be17(0x101)],'hasMillimeterSuffix':_0x3b9b7f[_0x28be17(0x13a)][_0x28be17(0xc5)]};if(this[_0x28be17(0x14d)](_0x3b9b7f))return this[_0x28be17(0x20c)](_0x3b9b7f,_0x477874);if(this[_0x28be17(0x1fb)](_0x3b9b7f)){if(this[_0x28be17(0x208)])return this['evaluateVariable'](_0x3b9b7f);throw new b(_0x28be17(0xea));}throw new b('unsupported\x20node\x20type:\x20'+_0x3b9b7f[_0x28be17(0x9d)]);}catch(_0x1008df){throw new b(_0x1008df['message']);}finally{this[_0x28be17(0x154)]--;}}[a1_0x1169de(0x186)](_0x56ca78){const _0x33284a=a1_0x1169de;return _0x56ca78['type']===_0x33284a(0x1e8);}['isNumberLiteral'](_0x2d479a){const _0x1a087d=a1_0x1169de;return _0x2d479a['type']===_0x1a087d(0x235);}['isVariable'](_0x336df7){const _0x2f0231=a1_0x1169de;return _0x336df7['type']===_0x2f0231(0xa7)||_0x336df7[_0x2f0231(0x9d)]===_0x2f0231(0x8f);}['isBinaryExpression'](_0x5fd784){const _0x552b07=a1_0x1169de;return _0x5fd784[_0x552b07(0x9d)]===_0x552b07(0xa3);}[a1_0x1169de(0x14d)](_0x3027f9){return _0x3027f9['type']==='FunctionCall';}[a1_0x1169de(0x185)](_0x1a0a32){const _0x4a6306=a1_0x1169de;return _0x1a0a32[_0x4a6306(0x9d)]===_0x4a6306(0x1ca);}['isRepeated'](_0x4c49c4){const _0x55565c=a1_0x1169de;return _0x4c49c4['type']===_0x55565c(0xc9);}['isSections'](_0x3c6d49){const _0x17ac77=a1_0x1169de;return _0x3c6d49[_0x17ac77(0x9d)]===_0x17ac77(0x96);}[a1_0x1169de(0x85)](_0x4cf7d1){const _0x384619=a1_0x1169de;return _0x4cf7d1[_0x384619(0x9d)]===_0x384619(0x108);}[a1_0x1169de(0x1ae)](_0x43d072,_0x27f4ac={'isInsideGroup':!0x1}){const _0x4f48e1=a1_0x1169de;return{'type':_0x4f48e1(0x96),'sections':_0x43d072[_0x4f48e1(0xbe)][_0x4f48e1(0x9f)](_0x2cd641=>{const _0x2c558b=_0x4f48e1,_0x199cde=this[_0x2c558b(0x236)](_0x2cd641[_0x2c558b(0x132)]);if(_0x199cde instanceof b)throw _0x199cde;return{'type':'Section','nodes':_0x199cde};})};}};function z(_0xb786c8,_0x3efe44){const _0x46aa07=a1_0x1169de;if(!_0xb786c8)throw new b(_0x46aa07(0x1c9)+JSON[_0x46aa07(0x1a3)](_0xb786c8));_0x3efe44(_0xb786c8),_0xb786c8[_0x46aa07(0x9d)]===_0x46aa07(0x96)&&Array[_0x46aa07(0xfa)](_0xb786c8[_0x46aa07(0xbe)])?_0xb786c8[_0x46aa07(0xbe)][_0x46aa07(0x20a)](_0x4dd473=>z(_0x4dd473,_0x3efe44)):_0xb786c8[_0x46aa07(0x9d)]==='Section'&&_0xb786c8[_0x46aa07(0x132)]?z(_0xb786c8[_0x46aa07(0x132)],_0x3efe44):_0xb786c8[_0x46aa07(0x9d)];}var vt=class{['accumulateIncorporatedThicknesses'](_0x565f07,_0x356201,_0x3864c4,_0x138b56,_0x3ef6c8,_0xc61038,_0x48f477,_0x208a47,_0x581174){const _0x569a26=a1_0x1169de;let _0x42e574=0x0;if(_0x48f477==='M'){for(let _0x155df3=0x1;_0x155df3<_0x565f07[_0x569a26(0xbe)]['length']-0x1;_0x155df3++)_0x42e574+=_0x138b56;}if(_0x48f477==='O'){for(let _0x5ce036=0x1;_0x5ce036<_0x565f07['sections']['length']-0x1;_0x5ce036++)_0x42e574+=_0x138b56*0x2;}return _0x3ef6c8==='M'&&(_0x42e574+=_0x356201/0x2),_0x3ef6c8==='O'&&(_0x42e574+=_0x356201),_0xc61038==='M'&&(_0x42e574+=_0x356201/0x2),_0xc61038==='O'&&(_0x42e574+=_0x356201),_0x581174==='M'&&(_0x42e574+=_0x3864c4/0x2),_0x581174==='O'&&(_0x42e574+=_0x3864c4),_0x208a47==='M'&&(_0x42e574+=_0x3864c4/0x2),_0x208a47==='O'&&(_0x42e574+=_0x3864c4),_0x42e574;}},Tt=class{['calculateSections'](_0x35cda0,_0x183f47=0x1f4,_0x292d04=0x0,_0x163c30){const _0x543997=a1_0x1169de;try{if(_0x35cda0 instanceof b)throw _0x35cda0;if(_0x35cda0['type']!=='Sections'&&_0x35cda0[_0x543997(0x9d)]!=='Section')throw new b(_0x543997(0x184)+JSON[_0x543997(0x1a3)](_0x35cda0));let _0x16d5ab={'type':_0x543997(0x96),'sections':[]};if(_0x35cda0[_0x543997(0x9d)]===_0x543997(0x96)){for(const _0x36e9d9 of _0x35cda0[_0x543997(0xbe)])if(_0x36e9d9[_0x543997(0x132)]['type']===_0x543997(0xc9)&&_0x36e9d9['nodes'][_0x543997(0x9a)]){for(let _0x1f56d7=0x0;_0x1f56d7<(_0x36e9d9[_0x543997(0x132)]?.[_0x543997(0x9a)]??0x0);_0x1f56d7++)if(_0x36e9d9[_0x543997(0x132)][_0x543997(0x1c6)][_0x543997(0x9d)]===_0x543997(0x108))_0x16d5ab[_0x543997(0xbe)]['push'](_0x36e9d9[_0x543997(0x132)]['toRepeat']);else{if(_0x36e9d9[_0x543997(0x132)][_0x543997(0x1c6)][_0x543997(0x9d)]===_0x543997(0x96)){for(const _0x5706c1 of _0x36e9d9[_0x543997(0x132)][_0x543997(0x1c6)][_0x543997(0xbe)])_0x16d5ab[_0x543997(0xbe)][_0x543997(0x1d7)](_0x5706c1);}}}else _0x16d5ab['sections'][_0x543997(0x1d7)](_0x36e9d9);}else _0x35cda0['type']==='Section'&&_0x16d5ab[_0x543997(0xbe)]['push'](_0x35cda0);if(_0x163c30){const _0x32136b=new vt()[_0x543997(0x15b)](_0x16d5ab,_0x163c30['startPanelThk'],_0x163c30[_0x543997(0xb1)],_0x292d04,_0x163c30[_0x543997(0x10d)],_0x163c30['sizerefedg1'],_0x163c30[_0x543997(0x204)],_0x163c30['sizerefedg2'],_0x163c30[_0x543997(0x1f4)]);}_0x16d5ab[_0x543997(0xbe)][_0x543997(0x20a)](_0x5bf652=>{let _0xb73804=!0x1;z(_0x5bf652,_0x465b30=>{const _0xe2ba09=a1_0x24a2;_0x465b30[_0xe2ba09(0x9d)]===_0xe2ba09(0x235)?_0x465b30?.[_0xe2ba09(0x1cc)]===!0x0&&(_0xb73804=!0x0):_0x465b30[_0xe2ba09(0x9d)]==='BinaryExpression'&&_0x465b30[_0xe2ba09(0xdd)][_0xe2ba09(0x9d)]==='NumberLiteral'&&(_0x465b30[_0xe2ba09(0xdd)]?.[_0xe2ba09(0x1cc)]===!0x0&&(_0xb73804=!0x0),_0x465b30['right']?.[_0xe2ba09(0x1cc)]===!0x0&&(_0xb73804=!0x0));}),_0xb73804&&z(_0x5bf652,_0x53dd3e=>{const _0xf0a312=a1_0x24a2;_0x53dd3e['type']===_0xf0a312(0x235)?_0x53dd3e[_0xf0a312(0xc5)]=!0x0:_0x53dd3e[_0xf0a312(0x9d)]==='BinaryExpression'&&(_0x53dd3e[_0xf0a312(0xdd)][_0xf0a312(0x9d)]==='NumberLiteral'&&(_0x53dd3e[_0xf0a312(0xdd)][_0xf0a312(0xc5)]=!0x0),_0x53dd3e[_0xf0a312(0x13a)][_0xf0a312(0x9d)]==='NumberLiteral'&&(_0x53dd3e[_0xf0a312(0x13a)][_0xf0a312(0xc5)]=!0x0));});});let _0x4f9d23=0x0;const _0xa25219=_0x54a82b=>{const _0x776659=_0x543997;if(_0x292d04&&_0x54a82b['type']==='Section'&&(_0x4f9d23+=_0x292d04),_0x54a82b['type']===_0x776659(0x235))_0x54a82b[_0x776659(0xc5)]===!0x0&&(_0x4f9d23+=_0x54a82b['value']);else{if(_0x54a82b[_0x776659(0x9d)]==='BinaryExpression'){const _0x14fc00=_0x54a82b;_0x14fc00['left'][_0x776659(0x9d)]===_0x776659(0x235)&&_0x14fc00[_0x776659(0x13a)][_0x776659(0x9d)]===_0x776659(0x235)&&(_0x14fc00['left']['hasMillimeterSuffix']===!0x0&&(_0x4f9d23+=_0x14fc00[_0x776659(0xdd)][_0x776659(0x101)]),_0x14fc00[_0x776659(0x13a)][_0x776659(0xc5)]===!0x0&&(_0x4f9d23+=_0x14fc00[_0x776659(0x13a)]['value']));}}};if(_0x16d5ab['sections'][_0x543997(0x20a)](_0x5e51dc=>z(_0x5e51dc,_0xa25219)),_0x4f9d23>_0x183f47)throw new b(_0x543997(0x21d));let _0x55f66d=_0x183f47-_0x4f9d23+_0x292d04,_0x4f798c=0x0;const _0x3432e8=_0x538777=>{const _0x8c01ed=_0x543997;if(_0x538777[_0x8c01ed(0x9d)]===_0x8c01ed(0xa3)){const _0x31b50f=_0x538777;if(_0x31b50f[_0x8c01ed(0x13a)]['type']==='NumberLiteral'&&_0x31b50f[_0x8c01ed(0xdd)][_0x8c01ed(0x9d)]===_0x8c01ed(0x8f)&&_0x31b50f[_0x8c01ed(0xdd)][_0x8c01ed(0x98)]==='n'&&_0x31b50f[_0x8c01ed(0x18e)]==='*'){_0x4f798c=Math[_0x8c01ed(0x1a8)](_0x55f66d/(_0x31b50f['right']['value']+_0x292d04));const _0x361070=(_0x4f798c-0x1)*_0x292d04,_0x4c2053=_0x4f798c*_0x31b50f[_0x8c01ed(0x13a)][_0x8c01ed(0x101)];_0x55f66d+=-_0x361070-_0x4c2053;}}};_0x16d5ab[_0x543997(0xbe)][_0x543997(0x20a)](_0x28c533=>z(_0x28c533,_0x3432e8));let _0x456ac0=0x0;const _0x5e117d=_0x5dd008=>{const _0x2d9ad3=_0x543997;_0x5dd008[_0x2d9ad3(0x9d)]===_0x2d9ad3(0xa3)&&(_0x5dd008[_0x2d9ad3(0xdd)]['type']===_0x2d9ad3(0x235)&&_0x5dd008[_0x2d9ad3(0xdd)][_0x2d9ad3(0xc5)]===!0x1&&(_0x456ac0+=_0x5dd008[_0x2d9ad3(0xdd)][_0x2d9ad3(0x101)]),_0x5dd008[_0x2d9ad3(0x13a)][_0x2d9ad3(0x9d)]===_0x2d9ad3(0x235)&&_0x5dd008['right'][_0x2d9ad3(0xc5)]===!0x1&&(_0x456ac0+=_0x5dd008[_0x2d9ad3(0x13a)]['value'])),_0x5dd008[_0x2d9ad3(0x9d)]===_0x2d9ad3(0x235)&&_0x5dd008[_0x2d9ad3(0xc5)]===!0x1&&(_0x456ac0+=_0x5dd008[_0x2d9ad3(0x101)]);};_0x16d5ab['sections'][_0x543997(0x20a)](_0xd711ec=>{z(_0xd711ec,_0x5e117d);});const _0x32b693=_0x55f66d/_0x456ac0,_0x5b7ea2=[],_0x204d0e=_0x39df66=>{const _0x2316ad=_0x543997;let _0x461a76=0x0,_0x3052bf=0x0;if(_0x39df66['type']===_0x2316ad(0x235))_0x39df66[_0x2316ad(0xc5)]===!0x1&&(_0x461a76+=_0x39df66[_0x2316ad(0x101)]*_0x32b693),_0x39df66['hasMillimeterSuffix']===!0x0&&(_0x3052bf+=_0x39df66[_0x2316ad(0x101)]),_0x5b7ea2[_0x2316ad(0x1d7)](Number((_0x461a76+_0x3052bf)[_0x2316ad(0xae)](0x2)));else{if(_0x39df66['type']===_0x2316ad(0xa3)&&(_0x39df66[_0x2316ad(0xdd)][_0x2316ad(0x9d)]===_0x2316ad(0x235)&&_0x39df66[_0x2316ad(0x13a)]['type']===_0x2316ad(0x235)&&(_0x39df66[_0x2316ad(0xdd)][_0x2316ad(0xc5)]===!0x1&&(_0x461a76+=_0x39df66[_0x2316ad(0xdd)]['value']*_0x32b693),_0x39df66['left'][_0x2316ad(0xc5)]===!0x0&&(_0x3052bf+=_0x39df66[_0x2316ad(0xdd)][_0x2316ad(0x101)]),_0x39df66[_0x2316ad(0x13a)][_0x2316ad(0xc5)]===!0x1&&(_0x461a76+=_0x39df66[_0x2316ad(0x13a)][_0x2316ad(0x101)]*_0x32b693),_0x39df66[_0x2316ad(0x13a)][_0x2316ad(0xc5)]===!0x0&&(_0x3052bf+=_0x39df66['right'][_0x2316ad(0x101)]),_0x5b7ea2[_0x2316ad(0x1d7)](Number((_0x461a76+_0x3052bf)[_0x2316ad(0xae)](0x2)))),_0x39df66[_0x2316ad(0xdd)]['type']===_0x2316ad(0x8f)&&_0x39df66[_0x2316ad(0xdd)][_0x2316ad(0x98)]==='n'&&_0x39df66[_0x2316ad(0x13a)]['type']===_0x2316ad(0x235))){_0x3052bf+=_0x39df66[_0x2316ad(0x13a)]['value'];for(let _0x29ff0a=0x0;_0x29ff0a<_0x4f798c;_0x29ff0a++)_0x39df66[_0x2316ad(0x13a)][_0x2316ad(0xc5)]===!0x0&&_0x5b7ea2[_0x2316ad(0x1d7)](Number(_0x3052bf['toFixed'](0x2)));}}};return _0x16d5ab[_0x543997(0xbe)][_0x543997(0x20a)](_0x3ce202=>{z(_0x3ce202,_0x204d0e);}),_0x5b7ea2;}catch{return new b(_0x543997(0xb0));}}},Nt=new pt(),Mt=new mt(),xt=new St(),yt=(_0x20321a,_0x1520f8,_0x388495,_0x58e683)=>{const _0x12a7b1=a1_0x1169de;try{const _0x5944d4=Nt[_0x12a7b1(0x181)](_0x20321a),_0x5b551a=Mt['parse'](_0x5944d4),_0x171aa8=xt[_0x12a7b1(0x236)](_0x5b551a,{},_0x58e683);if(_0x171aa8&&!(_0x171aa8 instanceof b)){const _0x2fb77f=new Tt()[_0x12a7b1(0x11d)](_0x171aa8,_0x1520f8,_0x388495);if(_0x2fb77f&&_0x2fb77f instanceof b)throw new Error(_0x2fb77f[_0x12a7b1(0x194)]);return _0x2fb77f;}return _0x171aa8||new b(_0x12a7b1(0x8a));}catch(_0x51b433){return new b(_0x51b433[_0x12a7b1(0x194)]);}};function It(_0x9c4896){const _0x237e58=a1_0x1169de,_0x51b7f7=/^(\d+)\*\{(\d+)\}$/,_0xe5ddc6=_0x9c4896[_0x237e58(0x140)](_0x51b7f7);if(_0xe5ddc6){const _0x248965=parseInt(_0xe5ddc6[0x1],0xa),_0x516dbe=_0xe5ddc6[0x2];return _0x248965>0x0?Array(_0x248965)[_0x237e58(0xb3)](_0x516dbe)[_0x237e58(0x8b)](':'):'';}return _0x9c4896;}function _t(_0x442e16){const _0x1ea89a=a1_0x1169de,_0x1111c8=_0x442e16[_0x1ea89a(0x123)]()[_0x1ea89a(0x140)](/^(\d+(?:\.\d+)?)\s*\*\s*\{.+\}$/);return _0x1111c8?Number(_0x1111c8[0x1]):_0x442e16;}function bt(_0x3f2f99,_0xd610b2,_0x1826ae){const _0x1d15e5=a1_0x1169de;let _0x3cebfe=0x0;const {LINDIV1:_0x5a4a61,DIVDIR:_0x8a74c0,HORDEFTYPE:_0x8e7240,DIVELEM1:_0x5b0c46}=_0x3f2f99;let _0x6d670c=_0x1d15e5(0x1ba),_0x1f9a16=!0x1;if(_0x5a4a61==='')return{'divisionType':_0x6d670c,'zone_dimensions':[],'divided_length_list':[]};if(_0x8a74c0==='H'){if(_0x8e7240==='W')_0x3cebfe=_0xd610b2[_0x1d15e5(0x1ba)],_0x6d670c=_0x1d15e5(0x1ba);else{if(_0x8e7240==='D')_0x3cebfe=_0xd610b2[_0x1d15e5(0x1e0)],_0x6d670c=_0x1d15e5(0x1e0);else{if(_0x8e7240==='P'){if(_0x5b0c46===0x0||_0x5b0c46===0x2)_0x3cebfe=_0xd610b2[_0x1d15e5(0x1ba)],_0x6d670c=_0x1d15e5(0x1ba);else{if(_0x5b0c46===0x1||_0x5b0c46===0x3)_0x3cebfe=_0xd610b2[_0x1d15e5(0x1e0)],_0x6d670c='depth';else throw new Error('Unhandled\x20case:\x20DIVELEM1\x20=\x20'+_0x5b0c46);}}else throw new Error(_0x1d15e5(0xa5)+_0x8e7240);}}}else{if(_0x8a74c0==='V')_0x3cebfe=_0xd610b2[_0x1d15e5(0x1ac)],_0x6d670c=_0x1d15e5(0x1ac);else{if(_0x8a74c0==='A')_0x3cebfe=_0xd610b2['width'],_0x6d670c=_0x1d15e5(0x141);else{if(_0x8a74c0==='I')_0x3cebfe=_0xd610b2['width'],_0x6d670c='independent';else throw new Error(_0x1d15e5(0x111)+_0x8a74c0);}}}let _0x341bbb=[];const _0x39248e=It(_0x5a4a61);if(_0x6d670c===_0x1d15e5(0x15f)){const _0xe36e7b=_t(_0x5a4a61);_0x341bbb=Array(_0xe36e7b)[_0x1d15e5(0xb3)](_0x3cebfe);}else _0x6d670c===_0x1d15e5(0x141)?_0x341bbb=[_0x3cebfe]:_0x341bbb=yt(_0x39248e,_0x3cebfe,_0x1826ae);if(!Array['isArray'](_0x341bbb))return{'divisionType':_0x6d670c,'zone_dimensions':[],'divided_length_list':[]};_0x8e7240==='P'&&(_0x5b0c46===0x2||_0x5b0c46===0x3)&&(_0x1f9a16=!0x0,_0x341bbb=[..._0x341bbb][_0x1d15e5(0xeb)]());const _0x35032e=_0x341bbb['map'](_0x499e75=>{const _0x20c5bf=_0x1d15e5;if(_0x6d670c===_0x20c5bf(0x1ba))return{'width':_0x499e75,'height':_0xd610b2[_0x20c5bf(0x1ac)],'depth':_0xd610b2[_0x20c5bf(0x1e0)]};if(_0x6d670c==='depth')return{'width':_0xd610b2[_0x20c5bf(0x1ba)],'height':_0xd610b2[_0x20c5bf(0x1ac)],'depth':_0x499e75};if(_0x6d670c===_0x20c5bf(0x1ac))return{'width':_0xd610b2['width'],'height':_0x499e75,'depth':_0xd610b2[_0x20c5bf(0x1e0)]};if(_0x6d670c===_0x20c5bf(0x141)||_0x6d670c===_0x20c5bf(0x15f))return{'width':_0xd610b2[_0x20c5bf(0x1ba)],'height':_0xd610b2[_0x20c5bf(0x1ac)],'depth':_0xd610b2['depth']};throw new Error(_0x20c5bf(0x111)+_0x8a74c0);});return{'isReversed':_0x1f9a16,'zone_dimensions':_0x35032e,'divisionType':_0x6d670c,'divided_length_list':_0x341bbb};}function kt({divisionType:_0x4a5c27,parentDimensions:_0x34719b,lengthList:_0x35651b,childTREEIDs:_0x183f4a,dividerThk:_0x13e101}){const _0x8ad05=a1_0x1169de,_0x5d79cb=-_0x34719b[_0x8ad05(0x1ba)]/0x2,_0x403ccd=-_0x34719b[_0x8ad05(0x1e0)]/0x2,_0x2ae3d8=-_0x34719b[_0x8ad05(0x1ac)]/0x2;return{'childPositions':_0x35651b[_0x8ad05(0x188)]((_0x41d48f,_0x1a886e,_0x1f97e7)=>{const _0x24a68d=_0x8ad05;let _0x366821=0x0,_0x2b221e=0x0,_0x3aa46e=0x0,_0x5a80d4;return _0x4a5c27===_0x24a68d(0x1ba)?(_0x366821=_0x5d79cb+_0x41d48f['cumulativeX']+_0x1a886e/0x2,_0x2b221e=0x0,_0x3aa46e=0x0,_0x5a80d4={'width':_0x1a886e,'height':_0x34719b['height'],'depth':_0x34719b[_0x24a68d(0x1e0)]},_0x41d48f[_0x24a68d(0x1e6)]+=_0x1a886e+_0x13e101):_0x4a5c27===_0x24a68d(0x1e0)?(_0x366821=0x0,_0x2b221e=_0x403ccd+_0x41d48f['cumulativeY']+_0x1a886e/0x2,_0x3aa46e=0x0,_0x5a80d4={'width':_0x34719b[_0x24a68d(0x1ba)],'height':_0x34719b[_0x24a68d(0x1ac)],'depth':_0x1a886e},_0x41d48f['cumulativeY']+=_0x1a886e+_0x13e101):_0x4a5c27===_0x24a68d(0x15f)||_0x4a5c27===_0x24a68d(0x141)?(_0x366821=0x0,_0x2b221e=0x0,_0x3aa46e=0x0,_0x5a80d4={'width':_0x1a886e,'height':_0x34719b[_0x24a68d(0x1ac)],'depth':_0x34719b[_0x24a68d(0x1e0)]}):(_0x366821=0x0,_0x2b221e=0x0,_0x3aa46e=_0x2ae3d8+_0x41d48f[_0x24a68d(0x218)]+_0x1a886e/0x2,_0x5a80d4={'width':_0x34719b[_0x24a68d(0x1ba)],'height':_0x1a886e,'depth':_0x34719b[_0x24a68d(0x1e0)]},_0x41d48f[_0x24a68d(0x218)]+=_0x1a886e+_0x13e101),_0x41d48f['positions'][_0x24a68d(0x1d7)]({'x':_0x366821,'y':_0x2b221e,'z':_0x3aa46e,'zone_dims':_0x5a80d4,'TREEID':_0x183f4a[_0x1f97e7]}),_0x41d48f;},{'cumulativeX':0x0,'cumulativeY':0x0,'cumulativeZ':0x0,'positions':[]})['positions'],'dividerType':_0x4a5c27};}function Dt(_0x429c81){return{'front':re(Pe(_0x429c81)),'left':re(Fe(_0x429c81)),'right':re(Re(_0x429c81)),'back':re(Ve(_0x429c81))};}function At(_0x2c4ee1,_0x3bbba3,_0x12407c){const _0x1437b1=a1_0x1169de;return{'front':_0x2c4ee1[_0x1437b1(0x200)]?.[_0x1437b1(0x168)]||0x0,'right':_0x2c4ee1[_0x1437b1(0x13a)]?.['thk']||0x0,'back':_0x2c4ee1['back']?.[_0x1437b1(0x168)]||0x0,'left':_0x2c4ee1[_0x1437b1(0xdd)]?.[_0x1437b1(0x168)]||0x0,'top':_0x3bbba3,'bottom':_0x12407c};}function wt(_0x2f1538){const _0x590f03=a1_0x1169de;return{'front':_0x2f1538['front']?.[_0x590f03(0x182)]||0x0,'right':_0x2f1538['right']?.['inset']||0x0,'back':_0x2f1538[_0x590f03(0x22d)]?.['inset']||0x0,'left':_0x2f1538[_0x590f03(0xdd)]?.['inset']||0x0};}function Ct(_0x1888a7,_0xe38407){const _0x71fede=a1_0x1169de;return{'dimensions':{'width':_0x1888a7[_0x71fede(0x1ba)]-_0xe38407[_0x71fede(0xdd)]-_0xe38407[_0x71fede(0x13a)],'height':_0x1888a7['height'],'depth':_0x1888a7[_0x71fede(0x1e0)]-_0xe38407[_0x71fede(0x200)]-_0xe38407[_0x71fede(0x22d)]},'position':{'x':_0xe38407[_0x71fede(0xdd)]/0x2-_0xe38407[_0x71fede(0x13a)]/0x2,'y':_0xe38407[_0x71fede(0x200)]/0x2-_0xe38407[_0x71fede(0x22d)]/0x2,'z':0x0}};}function Lt(_0x508e1e,_0x225349){const _0x5528ee=a1_0x1169de;return{'dimensions':{'width':_0x508e1e[_0x5528ee(0xc2)][_0x5528ee(0x1ba)]-_0x225349[_0x5528ee(0xdd)]-_0x225349['right'],'height':_0x508e1e[_0x5528ee(0xc2)][_0x5528ee(0x1ac)]-_0x225349[_0x5528ee(0x12d)]-_0x225349[_0x5528ee(0x11e)],'depth':_0x508e1e[_0x5528ee(0xc2)][_0x5528ee(0x1e0)]-_0x225349[_0x5528ee(0x200)]-_0x225349[_0x5528ee(0x22d)]},'position':{'x':_0x225349[_0x5528ee(0xdd)]/0x2-_0x225349[_0x5528ee(0x13a)]/0x2,'y':_0x225349[_0x5528ee(0x200)]/0x2-_0x225349[_0x5528ee(0x22d)]/0x2,'z':_0x225349[_0x5528ee(0x11e)]/0x2-_0x225349[_0x5528ee(0x12d)]/0x2}};}function Ot(_0x5c971f,_0x2bdfd5,_0x2890a0,_0x5984fb){const _0xc317a9=a1_0x1169de;return _0x2bdfd5[_0xc317a9(0x202)]?kt({'divisionType':_0x2bdfd5[_0xc317a9(0x202)],'parentDimensions':_0x5c971f,'lengthList':_0x2bdfd5['divided_length_list'],'childTREEIDs':_0x5984fb,'dividerThk':Number(_0x2890a0)||0x0}):{'childPositions':[],'dividerType':_0xc317a9(0x1ac)};}function Pt(_0x154240,_0xee5b34,_0x443c0c,_0x1fc152){const _0x57761d=a1_0x1169de;if(!_0x443c0c)return{'childPositions':[],'dividerType':_0x57761d(0x1ac)};const _0x537bbf=bt(_0x443c0c,_0x154240['dimensions'],_0xee5b34);return _0x1fc152=_0x537bbf[_0x57761d(0x1f5)]?_0x1fc152[_0x57761d(0xeb)]():_0x1fc152,Ot(_0x154240[_0x57761d(0xc2)],_0x537bbf,_0xee5b34,_0x1fc152);}function a1_0x24a2(_0x47187f,_0x3bd009){_0x47187f=_0x47187f-0x82;const _0x40ff05=a1_0x40ff();let _0x24a2c8=_0x40ff05[_0x47187f];return _0x24a2c8;}function ze(_0x52d8a2,_0x4003f0,_0x182001=0x0,_0x1fda95=0x0){const _0x333125=_0x52d8a2/0x2,_0x32b9c8=_0x4003f0/0x2,_0x51c667=[{'x':_0x333125,'y':-_0x32b9c8},{'x':-_0x333125,'y':-_0x32b9c8},{'x':-_0x333125+_0x182001,'y':_0x32b9c8},{'x':_0x333125-_0x1fda95,'y':_0x32b9c8}];return{'points':_0x51c667,get 'svgPath'(){const _0x4e3463=a1_0x24a2;return'M\x20'+_0x51c667[_0x4e3463(0x9f)](_0x2df61e=>_0x2df61e['x']+','+_0x2df61e['y'])[_0x4e3463(0x8b)](_0x4e3463(0x151))+'\x20Z';},get 'shape'(){const _0x2e541d=a1_0x24a2,_0x34abf6=new a1_0x510643();return _0x51c667[_0x2e541d(0x20a)]((_0x5e5e02,_0x5e41d5)=>_0x5e41d5===0x0?_0x34abf6['moveTo'](_0x5e5e02['x'],_0x5e5e02['y']):_0x34abf6[_0x2e541d(0x1c4)](_0x5e5e02['x'],_0x5e5e02['y'])),_0x34abf6;}};}function H({length:_0x135bd5,width:_0x58a34c,thk:_0x52632a,material:_0x3e999b=a1_0x1169de(0x128),opacity:_0x530321=0.2,isSelected:_0x1a9de5=!0x1,isHovered:_0x589480=!0x1,onClick:_0xe05b04,onPointerEnter:_0x3a385e,onPointerLeave:_0x9000fb,startPanelThk:_0x9b48fb=0x0,endPanelThk:_0x169fe4=0x0}){const _0x230e2f=a1_0x1169de,_0x231236=_0x1a9de5?'#ff6b00':_0x589480?_0x230e2f(0x21a):_0x3e999b,_0x3d897a=_0x1a9de5?0.8:_0x589480?0.6:_0x530321,_0x3f76c8=a1_0x4a3bd8(()=>{const _0x3a6c72=_0x230e2f;if(_0x9b48fb!==0x0||_0x169fe4!==0x0){const {shape:_0x14ae3a}=ze(_0x58a34c,_0x52632a,_0x9b48fb,_0x169fe4),_0xb48c5f=new a1_0x39b320(_0x14ae3a,{'depth':_0x135bd5/S,'bevelEnabled':!0x1,'steps':0x1});return _0xb48c5f['center'](),_0xb48c5f[_0x3a6c72(0x17f)](-Math['PI']/0x2),_0xb48c5f[_0x3a6c72(0xe9)](Math['PI']/0x2),_0xb48c5f;}else return new a1_0x348d24(_0x135bd5/S,_0x58a34c/S,_0x52632a/S);},[_0x135bd5,_0x58a34c,_0x52632a,_0x9b48fb,_0x169fe4]);return a1_0x16dbaa(_0x230e2f(0x1aa),{'rotation':[0x0,0x0,0x0],'children':a1_0x51d917(_0x230e2f(0x1d3),{'geometry':_0x3f76c8,'onClick':_0xe05b04,'onPointerEnter':_0x3a385e,'onPointerLeave':_0x9000fb,'children':[a1_0x16dbaa(_0x230e2f(0x110),{'color':_0x231236,'opacity':_0x3d897a,'transparent':!0x0}),a1_0x16dbaa(a1_0x3c55b9,{'color':_0x1a9de5?'#ff6b00':_0x589480?_0x230e2f(0x21a):_0x230e2f(0x143)})]})});}function U({dim_x:_0x3470a2,dim_y:_0x114d85,fill:_0x330ec1=a1_0x1169de(0x162),text:_0x2467aa='',stroke_width:_0x5fc558=0x2,rotate:_0x36d18d=0x0,isSelected:_0x2f2d5c=!0x1,isHovered:_0x4d35ed=!0x1,onClick:_0x479c9c,onMouseEnter:_0x4e4fbf,onMouseLeave:_0xdb2992,startPanelThk:_0x25af93=0x0,endPanelThk:_0x525141=0x0}){const _0x2388aa=a1_0x1169de,{svgPath:_0xbccb77}=ze(_0x3470a2,_0x114d85,_0x25af93,_0x525141),_0x1f0202=_0x2f2d5c?_0x2388aa(0x1b8):_0x4d35ed?'#0066ff':_0x2388aa(0x143),_0x33860d=_0x2f2d5c?_0x5fc558*0x2:_0x4d35ed?_0x5fc558*1.5:_0x5fc558,_0x46e9bd=_0x2f2d5c?0.8:_0x4d35ed?0.7:0.5;return a1_0x51d917('g',{'transform':_0x2388aa(0xfe)+_0x36d18d+')','children':[a1_0x16dbaa('path',{'d':_0xbccb77,'stroke':_0x1f0202,'strokeWidth':_0x33860d,'fill':_0x330ec1,'strokeLinejoin':'bevel','strokeMiterlimit':'1','opacity':_0x46e9bd,'onClick':_0x479c9c,'onMouseEnter':_0x4e4fbf,'onMouseLeave':_0xdb2992,'style':{'cursor':_0x479c9c?'pointer':_0x2388aa(0xd7)}}),a1_0x16dbaa(_0x2388aa(0xe6),{'transform':_0x2388aa(0x1a0),'x':0x0,'y':0x0,'textAnchor':_0x2388aa(0x95),'dominantBaseline':'middle','fontSize':0xa,'children':_0x2467aa})]});}function q(_0x5490e1){const _0x166e8a=a1_0x1169de,_0x326430=a1_0x3fe57c(F);if(!_0x326430)throw new Error(_0x166e8a(0x11a));const {selectedElem:_0x46e0c2,setSelectedElem:_0x5b6b1e,hoveredElem:_0x234c66,setHoveredElem:_0x33ddb9}=_0x326430,_0x3c167e=_0x46e0c2===_0x5490e1;return{'isSelected':_0x3c167e,'isHovered':_0x234c66===_0x5490e1,'handleClick':()=>{_0x5b6b1e(_0x3c167e?null:_0x5490e1);},'handleMouseEnter':()=>{_0x33ddb9(_0x5490e1);},'handleMouseLeave':()=>{_0x33ddb9(null);}};}function Rt({TREEID:_0x57d5db,dimension:_0x3d1492,view:_0xd5c9f8,helper:_0x426c23}){const _0x507d57=a1_0x1169de,_0x55ce2f=_0x426c23[_0x507d57(0x200)],_0xba42b7=a1_0x3fe57c(F),{isSelected:_0x260410,isHovered:_0x16d61c,handleClick:_0x3975fe,handleMouseEnter:_0x535d7c,handleMouseLeave:_0x24c92b}=q(_0x57d5db);if(!_0x55ce2f||!_0xba42b7)return;const {CPNAME:_0x2b25fd}=_0x55ce2f;if(!_0x2b25fd)return null;const {elmTrimThk:_0x3f0ccd}=_0x55ce2f,_0x412aec=_0x426c23[_0x507d57(0xdd)]?.[_0x507d57(0x168)],_0x2fac21=_0x426c23[_0x507d57(0x13a)]?.[_0x507d57(0x168)],_0x4ff421=(_0x55ce2f[_0x507d57(0x123)][_0x507d57(0x113)]==='S'?_0x412aec:0x0)??0x0,_0x3ff1ca=(_0x55ce2f[_0x507d57(0x123)][_0x507d57(0x8e)]==='S'?_0x2fac21:0x0)??0x0,_0x376d37=(_0x55ce2f[_0x507d57(0x123)][_0x507d57(0x113)]==='M'?_0x412aec:0x0)??0x0,_0x51c777=(_0x55ce2f[_0x507d57(0x123)][_0x507d57(0x8e)]==='M'?_0x2fac21:0x0)??0x0,_0xcfa3c1=_0x3d1492[_0x507d57(0x1ac)]-_0x3f0ccd[_0x507d57(0x12d)]-_0x3f0ccd[_0x507d57(0x11e)]+_0x55ce2f['oversize'][_0x507d57(0x12d)]+_0x55ce2f['oversize'][_0x507d57(0x11e)],_0x2bfd01=_0x3d1492[_0x507d57(0x1ba)]-_0x4ff421-_0x3ff1ca+_0x55ce2f[_0x507d57(0x210)]['start']+_0x55ce2f[_0x507d57(0x210)]['end'],_0x3d6393=_0x55ce2f[_0x507d57(0x168)],_0x1b1a6c=-(_0x55ce2f[_0x507d57(0x210)][_0x507d57(0x113)]/0x2-_0x55ce2f[_0x507d57(0x210)]['end']/0x2-_0x4ff421/0x2+_0x3ff1ca/0x2),_0x32e34b=_0x55ce2f[_0x507d57(0x210)][_0x507d57(0x11e)]/0x2-_0x55ce2f[_0x507d57(0x210)][_0x507d57(0x12d)]/0x2+_0x3f0ccd[_0x507d57(0x11e)]/0x2-_0x3f0ccd[_0x507d57(0x12d)]/0x2,_0x156d3b=-(_0x3d1492[_0x507d57(0x1e0)]/0x2-_0x3d6393/0x2);return _0xd5c9f8===M['_3D']?a1_0x16dbaa('group',{'position':[_0x1b1a6c/S,_0x156d3b/S,_0x32e34b/S],'rotation':[Math['PI']/0x2,0x0,Math['PI']/0x2],'children':a1_0x16dbaa(H,{'length':_0xcfa3c1,'width':_0x2bfd01,'thk':_0x3d6393,'treeId':_0x57d5db,'isSelected':_0x260410,'isHovered':_0x16d61c,'onClick':_0x3975fe,'onPointerEnter':_0x535d7c,'onPointerLeave':_0x24c92b,'startPanelThk':_0x376d37,'endPanelThk':_0x51c777})}):a1_0x16dbaa('g',{'transform':'translate('+_0x1b1a6c+','+(_0xd5c9f8===M[_0x507d57(0x219)]?_0x156d3b:_0x32e34b)+')\x20rotate(0)','children':a1_0x16dbaa(U,{'dim_x':_0x2bfd01,'dim_y':_0xd5c9f8===M['_2D_TOP']?_0x3d6393:_0xcfa3c1,'text':_0x507d57(0xd2)+_0xcfa3c1+'\x20x\x20'+_0x2bfd01+_0x507d57(0x19d)+_0x3d6393,'treeId':_0x57d5db,'isSelected':_0x260410,'isHovered':_0x16d61c,'onClick':_0x3975fe,'onMouseEnter':_0x535d7c,'onMouseLeave':_0x24c92b,'startPanelThk':_0xd5c9f8===M[_0x507d57(0x219)]?_0x376d37:0x0,'endPanelThk':_0xd5c9f8===M[_0x507d57(0x219)]?_0x51c777:0x0})});}const Q=({view:_0xdfa7f2=M[a1_0x1169de(0x1ff)],position:_0x3a6b17=[0x0,0x0,0x0],rotation:_0x19a1c9=[0x0,0x0,0x0],children:_0x1cac44})=>{const _0x1371c3=a1_0x1169de;if(_0xdfa7f2===M[_0x1371c3(0x1ff)])return a1_0x16dbaa(_0x1371c3(0x1aa),{'position':[_0x3a6b17[0x0]/S,_0x3a6b17[0x1]/S,_0x3a6b17[0x2]/S],'rotation':_0x19a1c9,'children':_0x1cac44});const _0x30f4b1=_0x3a6b17[0x0],_0x2a8e21=_0xdfa7f2===M[_0x1371c3(0x219)]?_0x3a6b17[0x1]:_0x3a6b17[0x2],_0x549bc0=_0x19a1c9[0x2]*(0xb4/Math['PI']);return a1_0x16dbaa('g',{'transform':_0x1371c3(0x145)+_0x30f4b1+','+_0x2a8e21+_0x1371c3(0x1d6)+_0x549bc0+')','children':_0x1cac44});};function Vt({TREEID:_0x3ded53,dimension:_0x3131f7,view:_0x1baa52,helper:_0x39e5f2}){const _0x8c9057=a1_0x1169de,_0x3a95c0=_0x39e5f2[_0x8c9057(0xdd)],_0x4747a2=a1_0x3fe57c(F),{isSelected:_0x6c4a84,isHovered:_0x10a35a,handleClick:_0x12946c,handleMouseEnter:_0x1dc80c,handleMouseLeave:_0x11801a}=q(_0x3ded53);if(!_0x3a95c0||!_0x4747a2)return;const {CPNAME:_0x342673}=_0x3a95c0;if(!_0x342673)return null;const {elmTrimThk:_0x2dcc3f}=_0x3a95c0,_0x5dc158=_0x39e5f2[_0x8c9057(0x22d)]?.['thk'],_0x259038=_0x39e5f2['front']?.[_0x8c9057(0x168)],_0x3997d1=(_0x3a95c0['trim'][_0x8c9057(0x113)]==='S'?_0x5dc158:0x0)??0x0,_0x6b1d7c=(_0x3a95c0[_0x8c9057(0x123)][_0x8c9057(0x8e)]==='S'?_0x259038:0x0)??0x0,_0xaa1bad=(_0x3a95c0[_0x8c9057(0x123)][_0x8c9057(0x113)]==='M'?_0x5dc158:0x0)??0x0,_0x2dc30c=(_0x3a95c0[_0x8c9057(0x123)][_0x8c9057(0x8e)]==='M'?_0x259038:0x0)??0x0,_0x5db16e=_0x3131f7['height']-_0x2dcc3f['top']-_0x2dcc3f[_0x8c9057(0x11e)]+_0x3a95c0[_0x8c9057(0x210)]['top']+_0x3a95c0['oversize'][_0x8c9057(0x11e)],_0x18b7bd=_0x3131f7['depth']-_0x3997d1-_0x6b1d7c+_0x3a95c0[_0x8c9057(0x210)][_0x8c9057(0x113)]+_0x3a95c0['oversize'][_0x8c9057(0x8e)],_0x26e355=_0x3a95c0[_0x8c9057(0x168)],_0x500e9c=-(_0x3131f7['width']/0x2-_0x26e355/0x2),_0xd42da5=_0x3a95c0[_0x8c9057(0x210)][_0x8c9057(0x113)]/0x2-_0x3a95c0['oversize'][_0x8c9057(0x8e)]/0x2-_0x3997d1/0x2+_0x6b1d7c/0x2,_0x5a15b8=_0x3a95c0[_0x8c9057(0x210)][_0x8c9057(0x11e)]/0x2-_0x3a95c0[_0x8c9057(0x210)]['top']/0x2+_0x2dcc3f['bottom']/0x2-_0x2dcc3f['top']/0x2;return _0x1baa52===M['_3D']?a1_0x16dbaa(_0x8c9057(0x1aa),{'position':[_0x500e9c/S,_0xd42da5/S,_0x5a15b8/S],'rotation':[0x0,-Math['PI']/0x2,0x0],'children':a1_0x16dbaa(H,{'length':_0x5db16e,'width':_0x18b7bd,'thk':_0x26e355,'treeId':_0x3ded53,'isSelected':_0x6c4a84,'isHovered':_0x10a35a,'onClick':_0x12946c,'onPointerEnter':_0x1dc80c,'onPointerLeave':_0x11801a,'startPanelThk':_0xaa1bad,'endPanelThk':_0x2dc30c})}):a1_0x16dbaa('g',{'transform':'translate('+_0x500e9c+','+(_0x1baa52===M['_2D_TOP']?_0xd42da5:_0x5a15b8)+_0x8c9057(0x1e1),'children':a1_0x16dbaa(U,{'dim_x':_0x1baa52===M[_0x8c9057(0x219)]?_0x18b7bd:_0x5db16e,'dim_y':_0x26e355,'text':_0x8c9057(0x228)+_0x5db16e+_0x8c9057(0x19d)+_0x18b7bd+'\x20x\x20'+_0x26e355,'treeId':_0x3ded53,'rotate':0xb4,'isSelected':_0x6c4a84,'isHovered':_0x10a35a,'onClick':_0x12946c,'onMouseEnter':_0x1dc80c,'onMouseLeave':_0x11801a,'startPanelThk':_0x1baa52===M[_0x8c9057(0x219)]?_0xaa1bad:0x0,'endPanelThk':_0x1baa52===M[_0x8c9057(0x219)]?_0x2dc30c:0x0})});}function Ft({TREEID:_0x54e846,dimension:_0x1a64ba,view:_0x460d7f,helper:_0x384aeb}){const _0x5b4ecc=a1_0x1169de,_0x40218b=_0x384aeb[_0x5b4ecc(0x22d)],_0x2cefb0=a1_0x3fe57c(F),{isSelected:_0x331a1a,isHovered:_0x320bf7,handleClick:_0x4b4f6e,handleMouseEnter:_0x24aed3,handleMouseLeave:_0x994203}=q(_0x54e846);if(!_0x40218b||!_0x2cefb0)return;const {CPNAME:_0x2ce52d}=_0x40218b;if(!_0x2ce52d)return null;const {elmTrimThk:_0x390d62}=_0x40218b,_0xa211f2=_0x384aeb['right']?.['thk'],_0x3a9e89=_0x384aeb[_0x5b4ecc(0xdd)]?.[_0x5b4ecc(0x168)],_0x47bba4=(_0x40218b[_0x5b4ecc(0x123)]['start']==='S'?_0xa211f2:0x0)??0x0,_0x3b7c23=(_0x40218b[_0x5b4ecc(0x123)][_0x5b4ecc(0x8e)]==='S'?_0x3a9e89:0x0)??0x0,_0x3775df=(_0x40218b['trim']['start']==='M'?_0xa211f2:0x0)??0x0,_0x11bb6f=(_0x40218b[_0x5b4ecc(0x123)][_0x5b4ecc(0x8e)]==='M'?_0x3a9e89:0x0)??0x0,_0x45f575=_0x1a64ba[_0x5b4ecc(0x1ac)]-_0x390d62[_0x5b4ecc(0x12d)]-_0x390d62[_0x5b4ecc(0x11e)]+_0x40218b['oversize'][_0x5b4ecc(0x12d)]+_0x40218b[_0x5b4ecc(0x210)][_0x5b4ecc(0x11e)],_0x13170b=_0x1a64ba[_0x5b4ecc(0x1ba)]-_0x47bba4-_0x3b7c23+_0x40218b[_0x5b4ecc(0x210)]['start']+_0x40218b['oversize'][_0x5b4ecc(0x8e)],_0x284f8e=_0x40218b[_0x5b4ecc(0x168)],_0x33e815=_0x40218b[_0x5b4ecc(0x210)][_0x5b4ecc(0x113)]/0x2-_0x40218b[_0x5b4ecc(0x210)][_0x5b4ecc(0x8e)]/0x2-_0x47bba4/0x2+_0x3b7c23/0x2,_0x38633d=_0x1a64ba[_0x5b4ecc(0x1e0)]/0x2-_0x284f8e/0x2,_0x104cb1=_0x40218b[_0x5b4ecc(0x210)][_0x5b4ecc(0x11e)]/0x2-_0x40218b[_0x5b4ecc(0x210)][_0x5b4ecc(0x12d)]/0x2+_0x390d62['bottom']/0x2-_0x390d62[_0x5b4ecc(0x12d)]/0x2;return _0x460d7f===M[_0x5b4ecc(0x1ff)]?a1_0x51d917('group',{'position':[_0x33e815/S,_0x38633d/S,_0x104cb1/S],'rotation':[Math['PI']/0x2,Math['PI'],Math['PI']/0x2],'children':[a1_0x16dbaa(H,{'length':_0x45f575,'width':_0x13170b,'thk':_0x284f8e,'treeId':_0x54e846,'isSelected':_0x331a1a,'isHovered':_0x320bf7,'onClick':_0x4b4f6e,'onPointerEnter':_0x24aed3,'onPointerLeave':_0x994203,'startPanelThk':_0x3775df,'endPanelThk':_0x11bb6f}),a1_0x16dbaa(a1_0x58b787,{'position':[0x0,0x0,0x0],'color':_0x5b4ecc(0xd1),'fontSize':0x14,'children':_0x54e846})]}):a1_0x16dbaa('g',{'transform':_0x5b4ecc(0x145)+_0x33e815+','+(_0x460d7f===M[_0x5b4ecc(0x219)]?_0x38633d:_0x104cb1)+_0x5b4ecc(0x1b7),'children':a1_0x16dbaa(U,{'dim_x':_0x13170b,'dim_y':_0x460d7f===M['_2D_TOP']?_0x284f8e:_0x45f575,'text':_0x5b4ecc(0xe5)+_0x45f575+_0x5b4ecc(0x19d)+_0x13170b+'\x20x\x20'+_0x284f8e,'treeId':_0x54e846,'isSelected':_0x331a1a,'rotate':0xb4,'isHovered':_0x320bf7,'onClick':_0x4b4f6e,'onMouseEnter':_0x24aed3,'onMouseLeave':_0x994203,'startPanelThk':_0x460d7f===M['_2D_TOP']?_0x3775df:0x0,'endPanelThk':_0x460d7f===M['_2D_TOP']?_0x11bb6f:0x0})});}function $t({TREEID:_0x31420e,dimension:_0x1461bf,view:_0x301ff4,helper:_0x167972}){const _0x496386=a1_0x1169de,_0x266574=_0x167972['right'],_0x5511ce=a1_0x3fe57c(F),{isSelected:_0x32c243,isHovered:_0x4e0466,handleClick:_0x595c2c,handleMouseEnter:_0x2135c0,handleMouseLeave:_0x1e6c87}=q(_0x31420e);if(!_0x266574||!_0x5511ce)return;const {CPNAME:_0x3cedd4}=_0x266574;if(!_0x3cedd4)return null;const {elmTrimThk:_0x262081}=_0x266574,_0x3ec61b=_0x167972[_0x496386(0x200)]?.[_0x496386(0x168)],_0x3ad213=_0x167972['back']?.[_0x496386(0x168)],_0x4909b9=(_0x266574['trim'][_0x496386(0x113)]==='S'?_0x3ec61b:0x0)??0x0,_0xa3b73d=(_0x266574['trim'][_0x496386(0x8e)]==='S'?_0x3ad213:0x0)??0x0,_0x52e8ed=(_0x266574[_0x496386(0x123)][_0x496386(0x113)]==='M'?_0x3ec61b:0x0)??0x0,_0xd9b84a=(_0x266574[_0x496386(0x123)][_0x496386(0x8e)]==='M'?_0x3ad213:0x0)??0x0,_0x19f6a0=_0x1461bf[_0x496386(0x1ac)]-_0x262081[_0x496386(0x12d)]-_0x262081['bottom']+_0x266574[_0x496386(0x210)][_0x496386(0x12d)]+_0x266574['oversize'][_0x496386(0x11e)],_0x22fd4e=_0x1461bf[_0x496386(0x1e0)]-_0x4909b9-_0xa3b73d+_0x266574[_0x496386(0x210)][_0x496386(0x113)]+_0x266574[_0x496386(0x210)][_0x496386(0x8e)],_0x4c2c68=_0x266574['thk'],_0x2034ce=_0x1461bf[_0x496386(0x1ba)]/0x2-_0x4c2c68/0x2,_0x864df=-(_0x266574[_0x496386(0x210)]['start']/0x2-_0x266574[_0x496386(0x210)][_0x496386(0x8e)]/0x2-_0x4909b9/0x2+_0xa3b73d/0x2),_0x52031e=_0x266574['oversize']['bottom']/0x2+_0x266574[_0x496386(0x210)][_0x496386(0x12d)]/0x2+_0x262081[_0x496386(0x11e)]/0x2-_0x262081['top']/0x2;return _0x301ff4===M[_0x496386(0x1ff)]?a1_0x16dbaa(_0x496386(0x1aa),{'position':[_0x2034ce/S,_0x864df/S,_0x52031e/S],'rotation':[0x0,Math['PI']/0x2,Math['PI']],'children':a1_0x16dbaa(H,{'length':_0x19f6a0,'width':_0x22fd4e,'thk':_0x4c2c68,'treeId':_0x31420e,'isSelected':_0x32c243,'isHovered':_0x4e0466,'onClick':_0x595c2c,'onPointerEnter':_0x2135c0,'onPointerLeave':_0x1e6c87,'startPanelThk':_0x52e8ed,'endPanelThk':_0xd9b84a})}):a1_0x16dbaa('g',{'transform':'translate('+_0x2034ce+','+(_0x301ff4===M[_0x496386(0x219)]?_0x864df:_0x52031e)+_0x496386(0x1e1),'children':a1_0x16dbaa(U,{'dim_x':_0x301ff4===M[_0x496386(0x219)]?_0x22fd4e:_0x19f6a0,'dim_y':_0x4c2c68,'text':_0x496386(0x1e2)+_0x19f6a0+'\x20x\x20'+_0x22fd4e+_0x496386(0x19d)+_0x4c2c68,'treeId':_0x31420e,'isSelected':_0x32c243,'isHovered':_0x4e0466,'onClick':_0x595c2c,'onMouseEnter':_0x2135c0,'onMouseLeave':_0x1e6c87,'startPanelThk':_0x301ff4===M[_0x496386(0x219)]?_0x52e8ed:0x0,'endPanelThk':_0x301ff4===M[_0x496386(0x219)]?_0xd9b84a:0x0})});}function zt({TREEID:_0x9d6973,dimension:_0x30954c,view:_0x3a46eb,helper:_0x46b640}){const _0x115c50=a1_0x1169de,_0x59d7b5=he(_0x9d6973),_0x19d416=a1_0x3fe57c(F),{isSelected:_0x216bae,isHovered:_0x25c933,handleClick:_0x5417a0,handleMouseEnter:_0x31c6cf,handleMouseLeave:_0xdeec54}=q(_0x9d6973);if(!_0x59d7b5||!_0x19d416)return;const {topShelfCP:_0x2e1cf6}=_0x59d7b5;if(!_0x2e1cf6)return;const _0x1fa11e=(_0x46b640[_0x115c50(0x200)]?.[_0x115c50(0x123)][_0x115c50(0x12d)]!=='S'?_0x46b640[_0x115c50(0x200)]?.['thk']:0x0)??0x0,_0x37758e=(_0x46b640['back']?.[_0x115c50(0x123)][_0x115c50(0x12d)]!=='S'?_0x46b640[_0x115c50(0x22d)]?.[_0x115c50(0x168)]:0x0)??0x0,_0x3db30c=(_0x46b640[_0x115c50(0xdd)]?.[_0x115c50(0x123)][_0x115c50(0x12d)]!=='S'?_0x46b640[_0x115c50(0xdd)]?.[_0x115c50(0x168)]:0x0)??0x0,_0x2bd7b4=(_0x46b640[_0x115c50(0x13a)]?.[_0x115c50(0x123)]['top']!=='S'?_0x46b640[_0x115c50(0x13a)]?.[_0x115c50(0x168)]:0x0)??0x0,_0x4a2a9b=_0x30954c[_0x115c50(0x1ba)]-_0x3db30c-_0x2bd7b4,_0x5b7393=_0x30954c['depth']-_0x37758e-_0x1fa11e,_0x3e8376=_0x59d7b5[_0x115c50(0x1a2)],_0x2035f8=_0x3db30c/0x2-_0x2bd7b4/0x2,_0x111b63=-(_0x37758e/0x2-_0x1fa11e/0x2),_0x5144cb=_0x30954c[_0x115c50(0x1ac)]/0x2-_0x3e8376/0x2;return _0x3a46eb===M[_0x115c50(0x1ff)]?a1_0x16dbaa(_0x115c50(0x1aa),{'position':[_0x2035f8/S,_0x111b63/S,_0x5144cb/S],'rotation':[0x0,0x0,0x0],'children':a1_0x16dbaa(H,{'length':_0x4a2a9b,'width':_0x5b7393,'thk':_0x3e8376,'opacity':0.8,'treeId':_0x9d6973,'isSelected':_0x216bae,'isHovered':_0x25c933,'onClick':_0x5417a0,'onPointerEnter':_0x31c6cf,'onPointerLeave':_0xdeec54})}):a1_0x16dbaa('g',{'transform':_0x115c50(0x145)+_0x2035f8+','+(_0x3a46eb===M[_0x115c50(0x219)]?_0x111b63:_0x5144cb)+')','children':a1_0x16dbaa(U,{'dim_x':_0x4a2a9b,'dim_y':_0x3a46eb===M[_0x115c50(0x219)]?_0x5b7393:_0x3e8376,'text':_0x115c50(0x180)+_0x9d6973+_0x115c50(0x144)+_0x4a2a9b+_0x115c50(0x19d)+_0x5b7393+_0x115c50(0x19d)+_0x3e8376,'treeId':_0x9d6973,'isSelected':_0x216bae,'isHovered':_0x25c933,'onClick':_0x5417a0,'onMouseEnter':_0x31c6cf,'onMouseLeave':_0xdeec54})});}function Gt({TREEID:_0x460add,dimension:_0x697ff9,view:_0x362079,helper:_0x1a6e2a}){const _0xab468c=a1_0x1169de,_0x46cd40=he(_0x460add),_0x1763b9=a1_0x3fe57c(F),{isSelected:_0x1acf8c,isHovered:_0x176fff,handleClick:_0x1c37c0,handleMouseEnter:_0x213a98,handleMouseLeave:_0x5756e6}=q(_0x460add);if(!_0x46cd40||!_0x1763b9)return;const {bottomShelfCP:_0x461548}=_0x46cd40;if(!_0x461548)return;const _0x1d342f=(_0x1a6e2a['front']?.[_0xab468c(0x123)][_0xab468c(0x11e)]!=='S'?_0x1a6e2a[_0xab468c(0x200)]?.[_0xab468c(0x168)]:0x0)??0x0,_0x3346b8=(_0x1a6e2a[_0xab468c(0x22d)]?.[_0xab468c(0x123)][_0xab468c(0x11e)]!=='S'?_0x1a6e2a[_0xab468c(0x22d)]?.[_0xab468c(0x168)]:0x0)??0x0,_0x2cae85=(_0x1a6e2a[_0xab468c(0xdd)]?.['trim'][_0xab468c(0x11e)]!=='S'?_0x1a6e2a[_0xab468c(0xdd)]?.['thk']:0x0)??0x0,_0x5a6e2a=(_0x1a6e2a['right']?.['trim']['bottom']!=='S'?_0x1a6e2a[_0xab468c(0x13a)]?.['thk']:0x0)??0x0,_0x9ac612=_0x697ff9['width']-_0x2cae85-_0x5a6e2a,_0x321c1c=_0x697ff9['depth']-_0x3346b8-_0x1d342f,_0x3b499a=_0x46cd40[_0xab468c(0xe7)],_0x353bb4=_0x2cae85/0x2-_0x5a6e2a/0x2,_0x3579b7=-(_0x3346b8/0x2-_0x1d342f/0x2),_0x2e9b71=-(_0x697ff9['height']/0x2-_0x3b499a/0x2);return _0x362079===M['_3D']?a1_0x16dbaa(_0xab468c(0x1aa),{'position':[_0x353bb4/S,_0x3579b7/S,_0x2e9b71/S],'rotation':[0x0,0x0,0x0],'children':a1_0x16dbaa(H,{'length':_0x9ac612,'width':_0x321c1c,'thk':_0x3b499a,'opacity':0.8,'treeId':_0x460add,'isSelected':_0x1acf8c,'isHovered':_0x176fff,'onClick':_0x1c37c0,'onPointerEnter':_0x213a98,'onPointerLeave':_0x5756e6})}):a1_0x16dbaa('g',{'transform':_0xab468c(0x145)+_0x353bb4+','+(_0x362079===M[_0xab468c(0x219)]?_0x3579b7:_0x2e9b71)+')','children':a1_0x16dbaa(U,{'dim_x':_0x9ac612,'dim_y':_0x362079===M[_0xab468c(0x219)]?_0x321c1c:_0x3b499a,'text':_0xab468c(0x1f1)+_0x9ac612+_0xab468c(0x19d)+_0x321c1c+_0xab468c(0x19d)+_0x3b499a,'treeId':_0x460add,'isSelected':_0x1acf8c,'isHovered':_0x176fff,'onClick':_0x1c37c0,'onMouseEnter':_0x213a98,'onMouseLeave':_0x5756e6})});}function Bt(){const _0x5cbb8b=a1_0x1169de,_0x505aec=a1_0x3fe57c(we);if(!_0x505aec)throw new Error(_0x5cbb8b(0x157));return _0x505aec;}function Ht(_0x32a483,_0x5936c9,_0x5169b3,_0x1305d7={}){const _0xd7ccc9=a1_0x1169de,{throwOnError:_0x36ac7d=!0x1}=_0x1305d7;if(!_0x32a483[_0xd7ccc9(0x18d)](_0x5936c9))throw new Error(_0xd7ccc9(0x1ad)+_0x5936c9+'\x20not\x20found');return a1_0x4a3bd8(()=>{const _0x15ae04=_0xd7ccc9;try{return{'result':_0x32a483[_0x15ae04(0x236)](_0x5936c9,_0x5169b3),'error':null,'success':!0x0};}catch(_0x2b1843){const _0x3b812b=_0x2b1843 instanceof Error?_0x2b1843[_0x15ae04(0x194)]:_0x15ae04(0x1bc);if(_0x36ac7d)throw _0x2b1843;return{'result':null,'error':_0x3b812b,'success':!0x1};}},[_0x32a483,_0x5936c9,_0x5169b3,_0x36ac7d]);}function ur(_0x4ac809,_0x49a706,_0x14270c){return a1_0x4a3bd8(()=>{const _0x414bd7=a1_0x24a2;try{const _0xe5f106=_0x4ac809[_0x414bd7(0x164)](_0x49a706,_0x14270c);return{'matches':_0xe5f106,'error':null,'count':_0xe5f106[_0x414bd7(0xc6)]};}catch(_0x51d84f){const _0x123344=_0x51d84f instanceof Error?_0x51d84f[_0x414bd7(0x194)]:_0x414bd7(0x1bc);return{'matches':[],'error':_0x123344,'count':0x0};}},[_0x4ac809,_0x49a706,_0x14270c]);}const V={'LINEAR_DIVISION':a1_0x1169de(0x231),'ARTICLE':a1_0x1169de(0x141)},G={'STRING':a1_0x1169de(0xd5),'DESCRIPTOR':'descriptor'},Ie={'linearDivision':_0x4710dd=>_0x4710dd[a1_0x1169de(0x9d)]===V['LINEAR_DIVISION'],'article':_0x1657c2=>_0x1657c2[a1_0x1169de(0x9d)]===V['ARTICLE']},Ut={'string':_0xca04c7=>_0xca04c7[a1_0x1169de(0x9d)]===V[a1_0x1169de(0x12a)]&&_0xca04c7[a1_0x1169de(0xd0)]===G[a1_0x1169de(0x1c8)],'descriptor':_0x23b299=>_0x23b299[a1_0x1169de(0x9d)]===V['LINEAR_DIVISION']&&_0x23b299['valueSource']===G[a1_0x1169de(0xe4)]},le={'string':_0x157fb3=>_0x157fb3['type']===V[a1_0x1169de(0x212)]&&_0x157fb3[a1_0x1169de(0xd0)]===G['STRING'],'descriptor':_0xdfa78=>_0xdfa78[a1_0x1169de(0x9d)]===V[a1_0x1169de(0x212)]&&_0xdfa78[a1_0x1169de(0xd0)]===G['DESCRIPTOR']},J={'linearDivisionString'(_0x475684,_0x93cfbf,_0x3faf75,_0x3a0f0f,_0x4c18cc,_0x484294,_0x1ab311,_0x25d8e4){const _0x2f3190=a1_0x1169de;return{'TREEID':_0x475684,'type':V['LINEAR_DIVISION'],'valueSource':G[_0x2f3190(0x1c8)],'DIVDIR':_0x93cfbf,'DIVTYPE':_0x3faf75,'HORDEFTYPE':_0x3a0f0f,'LINDIV1':_0x4c18cc,'DIVELEM1':_0x484294,'DIVIDER':'','formula':_0x1ab311,'thickness':_0x25d8e4};},'linearDivisionDescriptor'(_0x3668b7,_0x4e8d50,_0x424890,_0x45f5ee,_0x556179,_0x293049,_0x131336,_0x526503){const _0x1a9c79=a1_0x1169de;return{'TREEID':_0x3668b7,'type':V['LINEAR_DIVISION'],'valueSource':G[_0x1a9c79(0xe4)],'DIVDIR':_0x4e8d50,'DIVTYPE':_0x424890,'HORDEFTYPE':_0x45f5ee,'LINDIV1':_0x556179,'DIVELEM1':_0x293049,'DIVIDER':'','descriptorName':_0x131336,'thickness':_0x526503};},'articleString'(_0x321dde,_0x2c255f,_0x51a8b0,_0xde2e1f,_0x1731ae,_0x11d47b,_0x104fdd){const _0x4697f0=a1_0x1169de;return{'TREEID':_0x321dde,'type':V[_0x4697f0(0x212)],'valueSource':G[_0x4697f0(0x1c8)],'DIVDIR':_0x2c255f,'DIVTYPE':_0x51a8b0,'HORDEFTYPE':_0xde2e1f,'LINDIV1':_0x1731ae,'DIVELEM1':_0x11d47b,'DIVIDER':_0x104fdd,'articleName':_0x104fdd};},'articleDescriptor'(_0x22fa4f,_0x4e4124,_0x271117,_0x590536,_0x3fcdb9,_0x1deeae,_0x341eb9){const _0x3b84ca=a1_0x1169de;return{'TREEID':_0x22fa4f,'type':V[_0x3b84ca(0x212)],'valueSource':G['DESCRIPTOR'],'DIVDIR':_0x4e4124,'DIVTYPE':_0x271117,'HORDEFTYPE':_0x590536,'LINDIV1':_0x3fcdb9,'DIVELEM1':_0x1deeae,'DIVIDER':_0x341eb9,'descriptorName':_0x341eb9};},'fromZoneData'(_0x479517,_0xaffc81){const _0x519540=a1_0x1169de,_0x2e9e21=_0x135966=>_0x135966[_0x519540(0x123)]()[_0x519540(0xaa)]('#');if(_0x479517['DIVDIR']==='A'){if(_0x2e9e21(_0x479517['DIVIDER'])){const _0x58f8d4=_0x479517[_0x519540(0xbc)][_0x519540(0x230)]('#','')[_0x519540(0x123)]();return J[_0x519540(0x22c)](_0x479517['TREEID'],_0x479517[_0x519540(0x1a6)],_0x479517[_0x519540(0xf9)],_0x479517['HORDEFTYPE'],_0x479517[_0x519540(0x150)],_0x479517[_0x519540(0x1a9)],_0x58f8d4);}return J[_0x519540(0x22f)](_0x479517['TREEID'],_0x479517[_0x519540(0x1a6)],_0x479517[_0x519540(0xf9)],_0x479517['HORDEFTYPE'],_0x479517[_0x519540(0x150)],_0x479517[_0x519540(0x1a9)],_0x479517['DIVIDER']);}if(_0x2e9e21(_0x479517[_0x519540(0x150)])){const _0x39c087=_0x479517[_0x519540(0x150)]['replace']('#','')[_0x519540(0x123)]();return J[_0x519540(0x119)](_0x479517[_0x519540(0xc0)],_0x479517[_0x519540(0x1a6)],_0x479517['DIVTYPE'],_0x479517[_0x519540(0xda)],_0x479517[_0x519540(0x150)],_0x479517[_0x519540(0x1a9)],_0x39c087,_0xaffc81);}return J[_0x519540(0x100)](_0x479517[_0x519540(0xc0)],_0x479517[_0x519540(0x1a6)],_0x479517[_0x519540(0xf9)],_0x479517['HORDEFTYPE'],_0x479517[_0x519540(0x150)],_0x479517[_0x519540(0x1a9)],_0x479517['LINDIV1'],_0xaffc81);}};function Zt(_0x4a6021){const _0x174ddc=a1_0x1169de;if(!_0x4a6021)return _0x174ddc(0x1ba);const _0x5e4256={0x0:_0x174ddc(0x1ba),0x1:_0x174ddc(0x1e0),0x2:_0x174ddc(0x1ba),0x3:_0x174ddc(0x1e0)};return _0x4a6021[_0x174ddc(0x1a6)]==='V'?_0x174ddc(0x1ac):_0x4a6021['HORDEFTYPE']==='W'?'width':_0x4a6021[_0x174ddc(0xda)]==='D'?'depth':_0x4a6021['HORDEFTYPE']==='P'?_0x5e4256[_0x4a6021[_0x174ddc(0x1a9)]]??_0x174ddc(0x1ba):_0x174ddc(0x1ba);}function Kt(_0x24b189,_0x55f8c9){return _0x55f8c9?_0x55f8c9[_0x24b189]:0x0;}function Yt(_0x330d67,_0x598e37){const _0x1bf09b=a1_0x1169de,_0x333657=_0x330d67;if(Xt(_0x330d67))return{'value':_0x330d67[_0x1bf09b(0xaa)]('#')?_0x330d67[_0x1bf09b(0x199)](0x1):_0x330d67,'original':_0x333657,'isReference':!0x0};if(/^\d+:\d+$/['test'](_0x330d67))return{'value':_0x330d67,'original':_0x333657,'isReference':!0x1};const {format:_0x4e492a,expression:_0x55afb6,suffix:_0x567a8d}=jt(_0x330d67);let _0x1a7602=_0x55afb6;_0x1a7602=_0x1a7602['replace'](/^\((.+)\)$/,'$1');const _0x641a0b=Ce(_0x1a7602,{'variableTree':_0x598e37,'allowFunctions':!0x0,'dataType':'FL','silent':!0x0})['value']??_0x55afb6;let _0x4be273;switch(_0x4e492a){case _0x1bf09b(0x106):_0x4be273=''+_0x641a0b+_0x567a8d;break;case'ratio:expr':_0x4be273=''+_0x567a8d+_0x641a0b;break;case _0x1bf09b(0x163):_0x4be273=''+_0x641a0b+_0x567a8d;break;case'simple':_0x4be273=String(_0x641a0b);break;}return{'value':_0x4be273,'original':_0x333657,'isReference':!0x1};}function Wt(_0x5b713a,_0x33824a){const _0x457ad1=a1_0x1169de;return Yt(_0x5b713a,_0x33824a)[_0x457ad1(0x101)];}function jt(_0x4b12a9){const _0x2104ea=a1_0x1169de,_0x714e61=_0x4b12a9[_0x2104ea(0x123)]()[_0x2104ea(0x230)](/^\((.+)\)$/,'$1'),_0xc65b8=_0x714e61[_0x2104ea(0x140)](/^(\d+|n):(.+?)(mm|cm)?$/);if(_0xc65b8){const [,_0x2c5239,_0x39c2ed,_0x9cb4e8]=_0xc65b8;return{'format':_0x2104ea(0x201),'expression':_0x39c2ed['trim'](),'suffix':_0x9cb4e8?_0x2c5239+':'+_0x9cb4e8:_0x2c5239+':'};}const _0x2fb000=_0x714e61['match'](/^(.+?)(mm|cm)?:(\d+)$/);if(_0x2fb000){const [,_0x3cbf61,_0x36921f,_0x5468dd]=_0x2fb000;return{'format':_0x2104ea(0x106),'expression':_0x3cbf61[_0x2104ea(0x123)](),'suffix':_0x36921f?_0x36921f+':'+_0x5468dd:':'+_0x5468dd};}const _0x917e73=_0x714e61[_0x2104ea(0x140)](/^(.+?)(\*)?{(\d+)}$/);if(_0x917e73){const [,_0x327e11,_0x5e20e6,_0x2e8ba0]=_0x917e73;return{'format':_0x2104ea(0x163),'expression':_0x327e11[_0x2104ea(0x123)](),'suffix':_0x5e20e6?'*{'+_0x2e8ba0+'}':'{'+_0x2e8ba0+'}'};}return{'format':_0x2104ea(0xc4),'expression':_0x714e61,'suffix':''};}function Xt(_0x4cecaa){const _0x5c5aad=a1_0x1169de;return _0x4cecaa[_0x5c5aad(0xaa)]('#')?!0x0:_0x4cecaa[_0x5c5aad(0x21e)]('(')||/[+\-*/]/[_0x5c5aad(0x10a)](_0x4cecaa)?!0x1:/^[A-Za-z0-9_-]+$/[_0x5c5aad(0x10a)](_0x4cecaa)?!0x0:!/^\d+:\d+$/[_0x5c5aad(0x10a)](_0x4cecaa);}function qt({divider:_0x2467af,inputData:_0x9dd3b5}){const _0x1ba5e9=a1_0x1169de,_0xfde77=Bt(),{resolveString:_0x52a46b}=X(),{result:_0x26aca4,error:_0x38250f}=Ht(_0xfde77,_0x2467af['descriptorName'],_0x9dd3b5,{'throwOnError':!0x1}),_0x154b27=a1_0x4a3bd8(()=>_0x2467af?le[_0x1ba5e9(0xd5)](_0x2467af)?_0x2467af[_0x1ba5e9(0xc3)]:le[_0x1ba5e9(0x1d4)](_0x2467af)&&_0x26aca4?.[_0x1ba5e9(0x165)]?_0x26aca4['lindiv']:'':'',[_0x2467af,_0x26aca4]);return{'updatedDivider':a1_0x4a3bd8(()=>{const _0x463cab=_0x1ba5e9;if(_0x2467af)return _0x26aca4?.[_0x463cab(0x165)]!=null?{..._0x2467af,'LINDIV1':Wt(_0x52a46b(_0x26aca4['lindiv'])),'articleName':_0x154b27}:{..._0x2467af,'LINDIV1':_0x52a46b(_0x2467af[_0x463cab(0x150)])};},[_0x2467af,_0x26aca4,_0x154b27,_0x52a46b])};}const Jt={'width':{'rotation':[0x0,Math['PI']/0x2,0x0],'get3D':(_0x1ce04a,_0x6acd75)=>({'length':_0x1ce04a[a1_0x1169de(0x1ac)],'width':_0x1ce04a[a1_0x1169de(0x1e0)],'thk':_0x6acd75}),'get2DTop':(_0x3ecd28,_0x57361e)=>({'dim_x':_0x3ecd28[a1_0x1169de(0x1e0)],'dim_y':_0x57361e,'rotate':0x5a}),'get2DFront':(_0x542540,_0x3777e4)=>({'dim_x':_0x542540[a1_0x1169de(0x1ac)],'dim_y':_0x3777e4,'rotate':0x5a})},'height':{'rotation':[0x0,0x0,0x0],'get3D':(_0x48aa93,_0x50dcdc)=>({'length':_0x48aa93[a1_0x1169de(0x1ba)],'width':_0x48aa93[a1_0x1169de(0x1e0)],'thk':_0x50dcdc}),'get2DTop':_0xc82e61=>({'dim_x':_0xc82e61[a1_0x1169de(0x1ba)],'dim_y':_0xc82e61[a1_0x1169de(0x1e0)]}),'get2DFront':(_0xa1cfb,_0x24d5bc)=>({'dim_x':_0xa1cfb['width'],'dim_y':_0x24d5bc})},'depth':{'rotation':[Math['PI']/0x2,0x0,Math['PI']/0x2],'get3D':(_0x19d713,_0x29ba2e)=>({'length':_0x19d713[a1_0x1169de(0x1ac)],'width':_0x19d713['width'],'thk':_0x29ba2e}),'get2DTop':(_0x10a119,_0x266f7d)=>({'dim_x':_0x10a119['width'],'dim_y':_0x266f7d}),'get2DFront':_0x4e5c26=>({'dim_x':_0x4e5c26['width'],'dim_y':_0x4e5c26[a1_0x1169de(0x1ac)]})},'article':{'rotation':[0x0,0x0,0x0],'get3D':(_0xe53a23,_0x23810c)=>({'length':_0xe53a23['width'],'width':_0xe53a23[a1_0x1169de(0x1e0)],'thk':_0x23810c}),'get2DTop':_0x39cbfd=>({'dim_x':_0x39cbfd[a1_0x1169de(0x1ba)],'dim_y':_0x39cbfd['depth']}),'get2DFront':(_0x23aa9b,_0x56ee56)=>({'dim_x':_0x23aa9b[a1_0x1169de(0x1ba)],'dim_y':_0x56ee56})},'independent':{'rotation':[0x0,0x0,0x0],'get3D':(_0x3975e5,_0x26d703)=>({'length':_0x3975e5['width'],'width':_0x3975e5['depth'],'thk':_0x26d703}),'get2DTop':_0xe91bf8=>({'dim_x':_0xe91bf8['width'],'dim_y':_0xe91bf8[a1_0x1169de(0x1e0)]}),'get2DFront':(_0x192488,_0x1acaf4)=>({'dim_x':_0x192488[a1_0x1169de(0x1ba)],'dim_y':_0x1acaf4})}},Qt=(_0x5d54cd,_0x2bee1d,_0x17e010)=>({'x':_0x5d54cd==='width'?_0x17e010[a1_0x1169de(0x1ba)]/0x2+_0x2bee1d/0x2:0x0,'y':_0x5d54cd===a1_0x1169de(0x1e0)?_0x17e010[a1_0x1169de(0x1e0)]/0x2+_0x2bee1d/0x2:0x0,'z':_0x5d54cd===a1_0x1169de(0x1ac)?_0x17e010[a1_0x1169de(0x1ac)]/0x2+_0x2bee1d/0x2:0x0});function er({divider:_0x5e33e7,view:_0x1922c3,childrenPositon:_0x4cb074,dividerThk:_0x5a0d1c}){const _0x1c7197=a1_0x1169de,_0x50bb02=a1_0x3fe57c(F),_0x3ce163=_0x4cb074[_0x1c7197(0x1a5)],_0x28fca8=_0x4cb074[_0x1c7197(0x222)],_0x5d7bdb=Jt[_0x3ce163];if(!_0x50bb02)return null;const {selectedElem:_0x4414cb,setSelectedElem:_0x3d8378,hoveredElem:_0x1f70aa,setHoveredElem:_0x20083f}=_0x50bb02;return _0x28fca8[_0x1c7197(0x9f)]((_0x465bb0,_0x52a38a)=>{const _0x47d921=_0x1c7197,_0x321def=!(_0x52a38a===_0x28fca8['length']-0x1)&&_0x5a0d1c!==0x0,_0x20f0f7=Qt(_0x3ce163,_0x5a0d1c,_0x465bb0[_0x47d921(0x13c)]),_0x1e8e33=_0x5d7bdb[_0x47d921(0x104)](_0x465bb0[_0x47d921(0x13c)],_0x5a0d1c),_0x545489=_0x1922c3===M[_0x47d921(0x219)]?_0x5d7bdb[_0x47d921(0x116)](_0x465bb0[_0x47d921(0x13c)],_0x5a0d1c):_0x5d7bdb['get2DFront'](_0x465bb0[_0x47d921(0x13c)],_0x5a0d1c),_0x573db7=_0x5e33e7[_0x47d921(0xc0)]+_0x47d921(0x15a),_0x8e0140=_0x4414cb===_0x573db7,_0x4815bf=_0x1f70aa===_0x573db7;return a1_0x16dbaa(a1_0x44338e,{'children':a1_0x51d917(Q,{'view':_0x1922c3,'position':[_0x465bb0['x']/S,_0x465bb0['y']/S,_0x465bb0['z']/S],'children':[a1_0x16dbaa(Q,{'view':_0x1922c3,'position':[_0x20f0f7['x']/S,_0x20f0f7['y']/S,_0x20f0f7['z']/S],'rotation':_0x5d7bdb[_0x47d921(0x193)],'children':_0x321def&&a1_0x51d917(a1_0x288a7d,{'children':[a1_0x16dbaa(_0x47d921(0x1aa),{'children':a1_0x51d917('mesh',{'children':[a1_0x16dbaa(_0x47d921(0xd6),{'args':[_0x1e8e33[_0x47d921(0xc6)],_0x1e8e33[_0x47d921(0x1ba)],_0x1e8e33[_0x47d921(0x168)]]}),a1_0x16dbaa('meshStandardMaterial',{'color':_0x47d921(0xd1),'transparent':!0x0,'opacity':0.3})]})}),_0x1922c3===M['_3D']?a1_0x16dbaa(H,{..._0x1e8e33,'opacity':0x1,'treeId':_0x573db7,'isSelected':_0x8e0140,'isHovered':_0x4815bf,'onClick':()=>_0x3d8378(_0x8e0140?null:_0x573db7),'onPointerEnter':()=>_0x20083f(_0x573db7),'onPointerLeave':()=>_0x20083f(null)}):a1_0x16dbaa(U,{..._0x545489,'text':_0x573db7,'treeId':_0x573db7,'isSelected':_0x8e0140,'isHovered':_0x4815bf,'onClick':()=>_0x3d8378(_0x8e0140?null:_0x573db7),'onMouseEnter':()=>_0x20083f(_0x573db7),'onMouseLeave':()=>_0x20083f(null)})]})}),a1_0x16dbaa(Be,{'TREEID':_0x465bb0['TREEID'],'dimension':_0x465bb0['zone_dims'],'view':_0x1922c3})]})},_0x52a38a);});}function tr({view:_0x74df4b,remainingZone:_0x41cda4,articleName:_0x724a7}){const _0x10d935=a1_0x1169de;return a1_0x16dbaa(ke,{'articleName':_0x724a7,'dimensionOverrides':{'width':_0x41cda4[_0x10d935(0xc2)][_0x10d935(0x1ba)],'height':_0x41cda4[_0x10d935(0xc2)]['height'],'depth':_0x41cda4[_0x10d935(0xc2)][_0x10d935(0x1e0)]},'children':a1_0x16dbaa(Q,{'view':_0x74df4b,'position':[_0x41cda4['position']['x']/S,_0x41cda4[_0x10d935(0x120)]['y']/S,_0x41cda4['position']['z']/S],'children':a1_0x16dbaa(He,{'view':_0x74df4b})})});}function rr({childrenPositon:_0x52565b,dividerThk:_0x2b1eac,divider:_0x202d15,view:_0x48528d,remainingZone:_0x24fd31}){const _0x7d9154=a1_0x1169de;if(Ie[_0x7d9154(0x1cf)](_0x202d15))return _0x52565b?a1_0x16dbaa(er,{'view':_0x48528d,'childrenPositon':_0x52565b,'dividerThk':_0x2b1eac,'divider':_0x202d15,'remainingZone':_0x24fd31}):null;if(Ie[_0x7d9154(0x141)](_0x202d15)){const _0x87579b=le[_0x7d9154(0xd5)](_0x202d15)?_0x202d15['articleName']:_0x202d15[_0x7d9154(0x150)];return!_0x24fd31||_0x87579b===''?null:a1_0x16dbaa(tr,{'view':_0x48528d,'articleName':_0x87579b,'remainingZone':_0x24fd31});}return null;}function Ge(){const _0x212b47=a1_0x1169de,{getArticleData:_0x1ecec5}=ee(),{articleName:_0x3b1c30,dimensionOverrides:_0x47366f}=te(),{resolveString:_0x42ef5f}=X(),{anglPrims:_0x22c5af}=_0x1ecec5(_0x3b1c30);if(_0x22c5af['length']===0x0)throw new Error(_0x212b47(0x189)+_0x3b1c30);const _0x41263f=_0x22c5af[0x0],_0x3d1ab0=(_0x116a13,_0x503205)=>{const _0x5bbe9b=_0x212b47,_0xf9e343=typeof _0x116a13==_0x5bbe9b(0xd5)&&_0x116a13!==''?ae(_0x42ef5f(_0x116a13)):_0x503205;return parseFloat(String(_0xf9e343))||0x0;},_0x1841ea={'width':_0x47366f?.[_0x212b47(0x1ba)]??_0x3d1ab0(_0x41263f[_0x212b47(0xcb)],_0x41263f[_0x212b47(0xd3)]),'height':_0x47366f?.[_0x212b47(0x1ac)]??_0x3d1ab0(_0x41263f[_0x212b47(0xde)],_0x41263f[_0x212b47(0xdc)]),'depth':_0x47366f?.['depth']??_0x3d1ab0(_0x41263f[_0x212b47(0x125)],_0x41263f[_0x212b47(0x122)])};return{'current_prim':_0x41263f,'prim_dims':_0x1841ea};}function Be({TREEID:_0x9eda8a,dimension:_0x292f37,view:_0x38713f=M['_3D']}){const _0x411d1b=a1_0x1169de;console[_0x411d1b(0x203)](_0x411d1b(0x13e)+_0x9eda8a+'\x20=====================================');const _0x57baed=he(_0x9eda8a),_0x40ad14=_0x57baed?.['zoneInfo'](),_0x282a63=_0x57baed?.[_0x411d1b(0x1eb)]||0x0,_0x4dfff7=Ge(),_0x4bc96e=Dt(_0x9eda8a),_0x1b0cd9=At(_0x4bc96e,_0x57baed?.[_0x411d1b(0x1a2)]||0x0,_0x57baed?.[_0x411d1b(0xe7)]||0x0),_0x5cb5c0=wt(_0x4bc96e),_0x214e40=Ct(_0x292f37,_0x5cb5c0),_0x116b2d=Lt(_0x214e40,_0x1b0cd9),_0x3a3486=a1_0x4a3bd8(()=>{const _0x3d31a3=_0x411d1b;if(_0x57baed)return J[_0x3d31a3(0x18b)](_0x57baed[_0x3d31a3(0x21b)],_0x282a63);},[_0x57baed,_0x282a63]),_0xd21c4a=_0x40ad14?Object[_0x411d1b(0x1f7)](_0x40ad14):{},_0x56104f=Zt(_0x3a3486),_0x41c913=Kt(_0x56104f,_0x116b2d[_0x411d1b(0xc2)]);_0xd21c4a['AD\x20article\x20width']=_0x4dfff7?.[_0x411d1b(0x149)]['width'][_0x411d1b(0x1a1)](),_0xd21c4a[_0x411d1b(0x10c)]=_0x4dfff7?.[_0x411d1b(0x149)][_0x411d1b(0x1ac)][_0x411d1b(0x1a1)](),_0xd21c4a[_0x411d1b(0x82)]=_0x4dfff7?.[_0x411d1b(0x149)][_0x411d1b(0x1e0)][_0x411d1b(0x1a1)](),_0xd21c4a[0x0]='0',_0xd21c4a['X']=_0x41c913[_0x411d1b(0x1a1)]();const _0x9701ba=_0x3a3486?Ut[_0x411d1b(0x1d4)](_0x3a3486):!0x1,_0x2a81d8=_0x3a3486?le[_0x411d1b(0x1d4)](_0x3a3486):!0x1,_0x588d94=_0x9701ba||_0x2a81d8?qt({'divider':_0x3a3486,'inputData':_0xd21c4a})[_0x411d1b(0x152)]:_0x3a3486,_0x1930b8=Pt(_0x116b2d,_0x282a63,_0x588d94,_0x57baed?.['children'][_0x411d1b(0x9f)](_0x51c29f=>_0x51c29f['TREEID'])||[]);return a1_0x16dbaa(a1_0x288a7d,{'children':a1_0x51d917(Q,{'view':_0x38713f,'position':[_0x214e40[_0x411d1b(0x120)]['x']/S,_0x214e40[_0x411d1b(0x120)]['y']/S,_0x214e40[_0x411d1b(0x120)]['z']/S],'children':[_0x4bc96e[_0x411d1b(0x200)]?.[_0x411d1b(0x14a)]&&a1_0x16dbaa(Rt,{'view':_0x38713f,'TREEID':Pe(_0x9eda8a),'dimension':_0x214e40[_0x411d1b(0xc2)],'helper':_0x4bc96e}),_0x4bc96e['left']?.[_0x411d1b(0x14a)]&&a1_0x16dbaa(Vt,{'view':_0x38713f,'TREEID':Fe(_0x9eda8a),'dimension':_0x214e40[_0x411d1b(0xc2)],'helper':_0x4bc96e}),_0x4bc96e[_0x411d1b(0x22d)]?.[_0x411d1b(0x14a)]&&a1_0x16dbaa(Ft,{'view':_0x38713f,'TREEID':Ve(_0x9eda8a),'dimension':_0x214e40[_0x411d1b(0xc2)],'helper':_0x4bc96e}),_0x4bc96e[_0x411d1b(0x13a)]?.['CPNAME']&&a1_0x16dbaa($t,{'view':_0x38713f,'TREEID':Re(_0x9eda8a),'dimension':_0x214e40['dimensions'],'helper':_0x4bc96e}),_0x57baed?.['topShelfCP']&&a1_0x16dbaa(zt,{'view':_0x38713f,'TREEID':_0x9eda8a,'dimension':_0x214e40[_0x411d1b(0xc2)],'helper':_0x4bc96e}),_0x57baed?.[_0x411d1b(0x1ef)]&&a1_0x16dbaa(Gt,{'view':_0x38713f,'TREEID':_0x9eda8a,'dimension':_0x214e40[_0x411d1b(0xc2)],'helper':_0x4bc96e}),a1_0x16dbaa(Q,{'view':_0x38713f,'position':[_0x116b2d[_0x411d1b(0x120)]['x']/S,_0x116b2d[_0x411d1b(0x120)]['y']/S,_0x116b2d[_0x411d1b(0x120)]['z']/S],'children':_0x588d94&&a1_0x16dbaa(rr,{'remainingZone':_0x116b2d,'divider':_0x588d94,'view':_0x38713f,'childrenPositon':_0x1930b8,'dividerThk':_0x282a63})})]})});}const ir=a1_0x1169de(0x1a0);function He({view:_0x169520=M['_3D']}){const _0x5084d7=a1_0x1169de;console[_0x5084d7(0x203)]('=========================================================\x20\x20Designer\x20\x20\x20===============================================================================================');const _0xcd7b6=Ge()[_0x5084d7(0x149)],_0x241892=a1_0x16dbaa(Be,{'TREEID':'0','view':_0x169520,'dimension':_0xcd7b6});return _0x169520===M[_0x5084d7(0x1ff)]?_0x241892:a1_0x16dbaa('g',{'transform':ir,'children':_0x241892});}function hr({view:_0x88130f,data:_0x2c6c97,articleName:_0x1bae6a}){const _0x190c8e=a1_0x1169de,_0x219282=_0x2c6c97['descriptors'],_0xa0b56f=_0x2c6c97['variables'],_0xae5934=_0x2c6c97['anglprim'][_0x190c8e(0x9f)](_0x180f0d=>_0x180f0d[_0x190c8e(0x99)]);return a1_0x16dbaa(a1_0x288a7d,{'children':a1_0x16dbaa(Qe,{'names':_0xae5934,'data':_0x2c6c97,'children':a1_0x16dbaa(ke,{'articleName':_0x1bae6a,'children':a1_0x16dbaa(tt,{'imosVariables':_0xa0b56f,'children':a1_0x16dbaa(lt,{'descriptorData':_0x219282,'children':a1_0x16dbaa(He,{'view':_0x88130f})})})})})});}function fr(){const _0x1d54f0=a1_0x1169de,{tree:_0x3e7ee5,getValue:_0x1afc7b,setValue:_0x1e9b9d}=X(),_0x27c17b=(_0x3cffef,_0x1c9e53)=>{const _0x3ec9c6=Number(_0x1c9e53);_0x1e9b9d(_0x3cffef,isNaN(_0x3ec9c6)?_0x1c9e53:_0x3ec9c6);},_0x132570=((()=>{const _0x967d01=a1_0x24a2,_0x390336={[O[_0x967d01(0x205)]]:{'type':O[_0x967d01(0x205)],'label':_0x967d01(0x1bf),'variables':[]},[O[_0x967d01(0xa2)]]:{'type':O['Surface'],'label':_0x967d01(0xf4),'variables':[]},[O[_0x967d01(0x1cd)]]:{'type':O[_0x967d01(0x1cd)],'label':_0x967d01(0x16d),'variables':[]},[O[_0x967d01(0x177)]]:{'type':O[_0x967d01(0x177)],'label':_0x967d01(0x177),'variables':[]}};return Array['from'](_0x3e7ee5[_0x967d01(0x206)]())['forEach'](([_0x4739b3,_0x2630e7])=>{const _0x4480a=_0x967d01,_0x130213=_0x1afc7b(_0x4739b3),_0x347594=_0x2630e7['WERT'][_0x4480a(0xaa)]('$');_0x390336[_0x2630e7[_0x4480a(0xfc)]]?.['variables'][_0x4480a(0x1d7)]({'name':_0x4739b3,'value':_0x130213??'undefined','reference':_0x347594?_0x2630e7[_0x4480a(0x90)]:void 0x0,'rawType':_0x2630e7[_0x4480a(0xfc)]});}),Object[_0x967d01(0x1c5)](_0x390336)['filter'](_0x31bcb7=>_0x31bcb7[_0x967d01(0x208)][_0x967d01(0xc6)]>0x0);})()),_0x1367fe=_0x2651f6=>{const _0x27c306=a1_0x24a2,_0x21f44e=_0x2651f6['rawType']===O['Numeric'],_0x379e6d=typeof _0x2651f6['value']==_0x27c306(0x138)?_0x2651f6[_0x27c306(0x101)]:Number(_0x2651f6[_0x27c306(0x101)]);return _0x21f44e&&!isNaN(_0x379e6d)?a1_0x51d917('div',{'className':_0x27c306(0x171),'children':[a1_0x16dbaa(_0x27c306(0x114),{'type':'range','min':0x0,'max':0x4e20,'value':_0x379e6d,'onChange':_0x19b114=>_0x27c17b(_0x2651f6[_0x27c306(0x98)],_0x19b114[_0x27c306(0x105)]['value']),'className':'var-controller__slider'}),a1_0x16dbaa('input',{'type':'number','value':_0x379e6d,'onChange':_0x2ccbb7=>_0x27c17b(_0x2651f6[_0x27c306(0x98)],_0x2ccbb7['target']['value']),'onBlur':_0x299208=>_0x27c17b(_0x2651f6['name'],_0x299208[_0x27c306(0x105)][_0x27c306(0x101)]),'className':'var-controller__number-input','min':0x0,'max':0x4e20})]}):a1_0x16dbaa(_0x27c306(0x114),{'type':_0x27c306(0xe6),'value':_0x2651f6[_0x27c306(0x101)],'onChange':_0x3a2dd0=>_0x27c17b(_0x2651f6[_0x27c306(0x98)],_0x3a2dd0[_0x27c306(0x105)][_0x27c306(0x101)]),'onBlur':_0x114e8d=>_0x27c17b(_0x2651f6['name'],_0x114e8d[_0x27c306(0x105)][_0x27c306(0x101)]),'className':_0x27c306(0x176)});};return a1_0x51d917(_0x1d54f0(0x83),{'className':'var-controller','children':[a1_0x16dbaa('h2',{'children':_0x1d54f0(0xa4)}),a1_0x51d917('p',{'className':'var-controller__header','children':[_0x1d54f0(0x1c1),_0x3e7ee5[_0x1d54f0(0x1df)]]}),_0x132570[_0x1d54f0(0x9f)](_0x50e9e4=>a1_0x51d917(_0x1d54f0(0xdf),{'className':_0x1d54f0(0x118),'children':[a1_0x51d917('h3',{'className':_0x1d54f0(0xc7),'children':[_0x50e9e4[_0x1d54f0(0x147)],'\x20(',_0x50e9e4['variables']['length'],')']}),a1_0x51d917(_0x1d54f0(0x1ee),{'className':_0x1d54f0(0x17c),'children':[a1_0x16dbaa(_0x1d54f0(0x1e3),{'children':a1_0x51d917('tr',{'children':[a1_0x16dbaa('th',{'style':{'width':'25%'},'children':'Variable\x20Name'}),a1_0x16dbaa('th',{'style':{'width':_0x1d54f0(0xd4)},'children':_0x1d54f0(0x139)}),a1_0x16dbaa('th',{'style':{'width':_0x1d54f0(0x1ab)},'children':_0x1d54f0(0x1b6)}),a1_0x16dbaa('th',{'className':_0x1d54f0(0x192),'style':{'width':_0x1d54f0(0x1f0)},'children':'Type'})]})}),a1_0x16dbaa(_0x1d54f0(0x10f),{'children':_0x50e9e4[_0x1d54f0(0x208)][_0x1d54f0(0x9f)](_0x1a5821=>a1_0x51d917('tr',{'children':[a1_0x16dbaa('td',{'className':'var-controller__var-name','children':_0x1a5821[_0x1d54f0(0x98)]}),a1_0x16dbaa('td',{'children':_0x1367fe(_0x1a5821)}),a1_0x16dbaa('td',{'className':'var-controller__reference','children':_0x1a5821['reference']||'-'}),a1_0x16dbaa('td',{'style':{'textAlign':_0x1d54f0(0x192)},'children':a1_0x16dbaa('span',{'className':_0x1d54f0(0x97),'children':_0x50e9e4['type']})})]},_0x1a5821[_0x1d54f0(0x98)]))})]})]},_0x50e9e4['type'])),a1_0x51d917('section',{'className':_0x1d54f0(0xf7),'children':[a1_0x16dbaa('h4',{'children':_0x1d54f0(0x1ea)}),a1_0x16dbaa('ul',{'children':_0x132570[_0x1d54f0(0x9f)](_0xd50747=>a1_0x51d917('li',{'children':[_0xd50747['label'],':\x20',_0xd50747[_0x1d54f0(0x208)][_0x1d54f0(0xc6)],_0x1d54f0(0xd9)]},_0xd50747[_0x1d54f0(0x9d)]))})]})]});}const pr=a1_0x1169de(0x15d);export{be as ArticleContext,hr as ArticleDesigner,ke as ArticleProvider,F as DataContext,Qe as DataProvider,we as DescriptorContext,lt as DescriptorProvider,He as Designer,pr as VERSION,M as VIEW,fr as VarController,De as VariableContext,tt as VariableProvider,cr as VariableResolver,Be as Zone,qt as ZoneDescriptor,te as useArticle,ee as useData,Ht as useDescriptorEvaluation,Bt as useDescriptorManager,ur as useDescriptorMatches,X as useVariables};
|