@archilogic/floor-plan-sdk 5.1.11 → 5.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fpe.d.ts +4 -1
- package/dist/fpe.js +1583 -1215
- package/dist/fpe.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/fpe.js
CHANGED
|
@@ -2,78 +2,77 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
/*!
|
|
5
|
-
Archilogic Floor Plan Engine SDK v5.1.
|
|
5
|
+
Archilogic Floor Plan Engine SDK v5.1.13 webgl build 251024-121948-192c01
|
|
6
6
|
|
|
7
7
|
Copyright (c) 2025 Archilogic AG. All rights reserved.
|
|
8
8
|
|
|
9
9
|
License: According to your license agreement with Archilogic AG
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const b$3 = 3.28084, L$1 = (e2, t2 = 1 / 64) => {
|
|
12
12
|
const n2 = 1 / t2;
|
|
13
13
|
return Math.round(e2 * n2) / n2;
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function T$1(e2) {
|
|
16
16
|
return Math.sign(e2) * Math.floor(Math.abs(e2));
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const t2 = e2 *
|
|
18
|
+
function P(e2) {
|
|
19
|
+
const t2 = e2 * b$3, n2 = Math.abs(t2), r2 = L$1(n2 % 1 * 12);
|
|
20
20
|
return {
|
|
21
|
-
feet:
|
|
22
|
-
inches:
|
|
23
|
-
fraction: L$1(
|
|
21
|
+
feet: T$1(n2),
|
|
22
|
+
inches: T$1(r2),
|
|
23
|
+
fraction: L$1(r2 % 1),
|
|
24
24
|
isNegative: Math.sign(e2) < 0
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return e2 *
|
|
27
|
+
function D$1(e2) {
|
|
28
|
+
return e2 * b$3 * b$3;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Ee(e2) {
|
|
31
31
|
return e2 / 180 * Math.PI;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function k$3(e2, t2) {
|
|
34
34
|
return typeof e2 < "u" && e2 !== null && Number.isFinite(e2) && e2 >= -t2 && e2 <= t2;
|
|
35
35
|
}
|
|
36
|
-
function Le(e2) {
|
|
37
|
-
return O(e2, 90);
|
|
38
|
-
}
|
|
39
36
|
function Oe(e2) {
|
|
40
|
-
return
|
|
37
|
+
return k$3(e2, 90);
|
|
38
|
+
}
|
|
39
|
+
function Ie(e2) {
|
|
40
|
+
return k$3(e2, 180);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function _e(e2) {
|
|
43
|
+
return k$3(e2, 180);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const S$3 = " ", F$1 = {
|
|
46
46
|
meters: "m",
|
|
47
47
|
feet: "′",
|
|
48
48
|
inches: "″",
|
|
49
49
|
squareMeters: "m²",
|
|
50
|
-
squareFeet: "ft²"
|
|
51
|
-
fraction: "/"
|
|
50
|
+
squareFeet: "ft²"
|
|
52
51
|
};
|
|
53
|
-
function
|
|
54
|
-
return !(e2 % t2) || t2 <= n2 ? [e2 / t2, 1 / t2] :
|
|
52
|
+
function A$1(e2, t2 = 1 / 2, n2 = 1 / 64) {
|
|
53
|
+
return !(e2 % t2) || t2 <= n2 ? [e2 / t2, 1 / t2] : A$1(e2, t2 / 2);
|
|
55
54
|
}
|
|
56
|
-
const
|
|
55
|
+
const q$1 = (e2 = 0, t2 = "metric", n2 = 3) => {
|
|
57
56
|
if (t2 === "imperial") {
|
|
58
|
-
const { feet:
|
|
57
|
+
const { feet: o2, inches: i2, fraction: s2, isNegative: a2 } = P(e2);
|
|
59
58
|
let c2 = "";
|
|
60
59
|
if (s2 > 0) {
|
|
61
|
-
const [u2,
|
|
62
|
-
c2 = `${
|
|
60
|
+
const [u2, f3] = A$1(L$1(s2));
|
|
61
|
+
c2 = `${S$3}${u2}/${f3}`;
|
|
63
62
|
}
|
|
64
|
-
return `${a2 ? "-" : ""}${
|
|
63
|
+
return `${a2 ? "-" : ""}${o2}${F$1.feet}${S$3}${i2}${c2}${F$1.inches}`;
|
|
65
64
|
}
|
|
66
|
-
const
|
|
67
|
-
return `${Math.round(e2 *
|
|
68
|
-
},
|
|
69
|
-
let
|
|
65
|
+
const r2 = Math.pow(10, n2);
|
|
66
|
+
return `${Math.round(e2 * r2) / r2}${S$3}${F$1.meters}`;
|
|
67
|
+
}, Ue = (e2 = 0, t2 = "metric", n2 = 0, r2 = true) => {
|
|
68
|
+
let o2 = "", i2 = "";
|
|
70
69
|
const s2 = Math.pow(10, n2);
|
|
71
70
|
if (t2 === "imperial") {
|
|
72
|
-
const a2 =
|
|
73
|
-
|
|
71
|
+
const a2 = D$1(e2);
|
|
72
|
+
o2 = `${Math.round(a2 * s2) / s2}`, i2 = `${S$3}${F$1.squareFeet}`;
|
|
74
73
|
} else
|
|
75
|
-
|
|
76
|
-
return
|
|
74
|
+
o2 = `${Math.round(e2 * s2) / s2}`, i2 = `${S$3}${F$1.squareMeters}`;
|
|
75
|
+
return r2 && (o2 += i2), o2;
|
|
77
76
|
};
|
|
78
77
|
[
|
|
79
78
|
"US",
|
|
@@ -88,81 +87,115 @@ const H$3 = (e2 = 0, t2 = "metric", n2 = 3) => {
|
|
|
88
87
|
"Liberia",
|
|
89
88
|
"Myanmar"
|
|
90
89
|
].map((e2) => e2.toLowerCase());
|
|
91
|
-
const
|
|
92
|
-
const n2 = `.${t2}`,
|
|
93
|
-
return
|
|
90
|
+
const te$1 = (e2) => e2.replace(/[.,\s]/g, "_"), ne = (e2) => e2.replace(/[/\\]/g, "_"), re = (e2, t2) => {
|
|
91
|
+
const n2 = `.${t2}`, r2 = e2.endsWith(n2) ? e2.split(n2)[0] : e2;
|
|
92
|
+
return ne(te$1(r2)) + n2;
|
|
94
93
|
};
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
Object.assign(
|
|
94
|
+
function oe({ fileName: e2, href: t2, ext: n2 }) {
|
|
95
|
+
const r2 = document.createElement("a");
|
|
96
|
+
Object.assign(r2, {
|
|
98
97
|
href: t2,
|
|
99
|
-
download:
|
|
98
|
+
download: re(e2, n2),
|
|
100
99
|
target: "_blank",
|
|
101
100
|
rel: "noopener",
|
|
102
101
|
style: "display:none;"
|
|
103
|
-
}), document.body.appendChild(
|
|
102
|
+
}), document.body.appendChild(r2), r2.click(), document.body.removeChild(r2);
|
|
104
103
|
}
|
|
105
|
-
function
|
|
104
|
+
function Ge(e2) {
|
|
106
105
|
return e2.replace(/([A-Z])/g, (t2) => ` ${t2}`).replace(/^./, (t2) => t2.toUpperCase()).trim();
|
|
107
106
|
}
|
|
108
|
-
function
|
|
107
|
+
function ie(e2) {
|
|
109
108
|
return e2.slice(0, 1) === "#" && (e2 = e2.slice(1)), e2;
|
|
110
109
|
}
|
|
111
|
-
function
|
|
112
|
-
const t2 =
|
|
110
|
+
function B$1(e2) {
|
|
111
|
+
const t2 = ie(e2);
|
|
113
112
|
return t2.length === 3 ? `#${t2.split("").map((n2) => n2 + n2).join("")}` : e2;
|
|
114
113
|
}
|
|
115
|
-
function
|
|
114
|
+
function M$3(e2) {
|
|
116
115
|
return e2 >= 0 && e2 <= 255;
|
|
117
116
|
}
|
|
118
|
-
function
|
|
119
|
-
return
|
|
117
|
+
function j$3({ r: e2, g: t2, b: n2 }) {
|
|
118
|
+
return M$3(e2) && M$3(t2) && M$3(n2);
|
|
120
119
|
}
|
|
121
|
-
function
|
|
122
|
-
const t2 =
|
|
120
|
+
function ae(e2) {
|
|
121
|
+
const t2 = B$1(e2), n2 = {
|
|
123
122
|
r: parseInt(t2.substring(1, 3), 16),
|
|
124
123
|
g: parseInt(t2.substring(3, 5), 16),
|
|
125
124
|
b: parseInt(t2.substring(5, 7), 16)
|
|
126
125
|
};
|
|
127
|
-
if (
|
|
126
|
+
if (j$3(n2))
|
|
128
127
|
return n2;
|
|
129
128
|
throw "invalid hex color input";
|
|
130
129
|
}
|
|
131
|
-
function
|
|
132
|
-
return
|
|
130
|
+
function ce(e2) {
|
|
131
|
+
return B$1(e2).match(/^#[a-f0-9]{6}$/i) !== null;
|
|
133
132
|
}
|
|
134
|
-
function
|
|
133
|
+
function Ze(e2) {
|
|
135
134
|
return JSON.parse(JSON.stringify(e2));
|
|
136
135
|
}
|
|
137
|
-
function
|
|
136
|
+
function ue(...e2) {
|
|
138
137
|
let t2 = {};
|
|
139
138
|
for (const n2 of e2)
|
|
140
139
|
if (n2 instanceof Array)
|
|
141
140
|
t2 instanceof Array || (t2 = []), t2 = [...t2, ...n2];
|
|
142
141
|
else if (n2 instanceof Object)
|
|
143
|
-
for (const
|
|
144
|
-
const
|
|
145
|
-
let i2 =
|
|
146
|
-
i2 instanceof Object &&
|
|
142
|
+
for (const r2 of Object.entries(n2)) {
|
|
143
|
+
const o2 = r2[0];
|
|
144
|
+
let i2 = r2[1];
|
|
145
|
+
i2 instanceof Object && o2 in t2 && (i2 = ue(t2[o2], i2)), t2 = { ...t2, [o2]: i2 };
|
|
147
146
|
}
|
|
148
147
|
return t2;
|
|
149
148
|
}
|
|
150
149
|
function y$2() {
|
|
151
150
|
return typeof window < "u" && typeof navigator < "u" && typeof document < "u";
|
|
152
151
|
}
|
|
153
|
-
function
|
|
152
|
+
function de() {
|
|
154
153
|
return y$2() && navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
155
154
|
}
|
|
156
|
-
function
|
|
155
|
+
function ge() {
|
|
157
156
|
return !y$2() || window.self === window.top ? false : !!// ancestorOrigins will fail in some older browsers
|
|
158
157
|
(window.location.ancestorOrigins && window.location.ancestorOrigins[0] || document.referrer);
|
|
159
158
|
}
|
|
159
|
+
ge();
|
|
160
160
|
de();
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
var R$1 = { exports: {} };
|
|
162
|
+
function E$3() {
|
|
163
|
+
}
|
|
164
|
+
E$3.prototype = {
|
|
165
|
+
on: function(e2, t2, n2) {
|
|
166
|
+
var r2 = this.e || (this.e = {});
|
|
167
|
+
return (r2[e2] || (r2[e2] = [])).push({
|
|
168
|
+
fn: t2,
|
|
169
|
+
ctx: n2
|
|
170
|
+
}), this;
|
|
171
|
+
},
|
|
172
|
+
once: function(e2, t2, n2) {
|
|
173
|
+
var r2 = this;
|
|
174
|
+
function o2() {
|
|
175
|
+
r2.off(e2, o2), t2.apply(n2, arguments);
|
|
176
|
+
}
|
|
177
|
+
return o2._ = t2, this.on(e2, o2, n2);
|
|
178
|
+
},
|
|
179
|
+
emit: function(e2) {
|
|
180
|
+
var t2 = [].slice.call(arguments, 1), n2 = ((this.e || (this.e = {}))[e2] || []).slice(), r2 = 0, o2 = n2.length;
|
|
181
|
+
for (r2; r2 < o2; r2++)
|
|
182
|
+
n2[r2].fn.apply(n2[r2].ctx, t2);
|
|
183
|
+
return this;
|
|
184
|
+
},
|
|
185
|
+
off: function(e2, t2) {
|
|
186
|
+
var n2 = this.e || (this.e = {}), r2 = n2[e2], o2 = [];
|
|
187
|
+
if (r2 && t2)
|
|
188
|
+
for (var i2 = 0, s2 = r2.length; i2 < s2; i2++)
|
|
189
|
+
r2[i2].fn !== t2 && r2[i2].fn._ !== t2 && o2.push(r2[i2]);
|
|
190
|
+
return o2.length ? n2[e2] = o2 : delete n2[e2], this;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
R$1.exports = E$3;
|
|
194
|
+
var Ce = R$1.exports.TinyEmitter = E$3;
|
|
195
|
+
const Se = ["info", "warnings", "errors"];
|
|
196
|
+
class ft extends Ce {
|
|
164
197
|
constructor(t2) {
|
|
165
|
-
this.levels =
|
|
198
|
+
super(), this.levels = Se.slice(), this.info = this.log, t2 && this.setLevels(t2), this.levelStack = [];
|
|
166
199
|
}
|
|
167
200
|
setLevels(t2) {
|
|
168
201
|
const n2 = this.levels.slice();
|
|
@@ -207,16 +240,16 @@ class at {
|
|
|
207
240
|
}
|
|
208
241
|
}
|
|
209
242
|
debug(...t2) {
|
|
210
|
-
this.levels.includes("debug") && console.debug(...t2);
|
|
243
|
+
this.levels.includes("debug") && (console.debug(...t2), this.emit("debug", ...t2));
|
|
211
244
|
}
|
|
212
245
|
log(...t2) {
|
|
213
|
-
this.levels.includes("info") && console.log(...t2);
|
|
246
|
+
this.levels.includes("info") && (console.log(...t2), this.emit("info", ...t2));
|
|
214
247
|
}
|
|
215
248
|
warn(...t2) {
|
|
216
|
-
this.levels.includes("warnings") && console.warn(...t2);
|
|
249
|
+
this.levels.includes("warnings") && (console.warn(...t2), this.emit("warning", ...t2));
|
|
217
250
|
}
|
|
218
251
|
error(...t2) {
|
|
219
|
-
this.levels.includes("errors") && console.error(...t2);
|
|
252
|
+
this.levels.includes("errors") && (console.error(...t2), this.emit("error", ...t2));
|
|
220
253
|
}
|
|
221
254
|
}
|
|
222
255
|
var byteToHex$1 = [];
|
|
@@ -242,7 +275,7 @@ const native$1 = {
|
|
|
242
275
|
randomUUID: randomUUID$1
|
|
243
276
|
};
|
|
244
277
|
function v4$1(options, buf, offset) {
|
|
245
|
-
if (native$1.randomUUID &&
|
|
278
|
+
if (native$1.randomUUID && true && !options) {
|
|
246
279
|
return native$1.randomUUID();
|
|
247
280
|
}
|
|
248
281
|
options = options || {};
|
|
@@ -488,15 +521,15 @@ class SpaceAPI {
|
|
|
488
521
|
async getTemporaryAccessToken() {
|
|
489
522
|
return this.connection.getTemporaryAccessToken();
|
|
490
523
|
}
|
|
491
|
-
async createFloor(
|
|
492
|
-
return this.connection.callSpaceAPI("POST", `/v2/floor`,
|
|
524
|
+
async createFloor(floor2) {
|
|
525
|
+
return this.connection.callSpaceAPI("POST", `/v2/floor`, floor2);
|
|
493
526
|
}
|
|
494
527
|
async duplicateFloor(floorId, query) {
|
|
495
528
|
const queryString = query.revisionId ? `?revisionId=${query.revisionId}` : "";
|
|
496
529
|
return this.connection.callSpaceAPI("POST", `/v2/floor/${floorId}/duplicate${queryString}`);
|
|
497
530
|
}
|
|
498
|
-
async updateFloor(floorId,
|
|
499
|
-
return this.connection.callSpaceAPI("PATCH", `/v2/floor/${floorId}`,
|
|
531
|
+
async updateFloor(floorId, floor2) {
|
|
532
|
+
return this.connection.callSpaceAPI("PATCH", `/v2/floor/${floorId}`, floor2);
|
|
500
533
|
}
|
|
501
534
|
async archiveFloor(floorId) {
|
|
502
535
|
return this.connection.callSpaceAPI("POST", `/v2/floor/${floorId}/archive`);
|
|
@@ -520,32 +553,32 @@ class SpaceAPI {
|
|
|
520
553
|
includeRelations,
|
|
521
554
|
includeCustomAttributes
|
|
522
555
|
});
|
|
523
|
-
const
|
|
556
|
+
const floor2 = await this.connection.callSpaceAPI("GET", `/v2/floor/${id}${geometry ? "/geo-json" : ""}${queryString}`);
|
|
524
557
|
let layoutResponse = {};
|
|
525
|
-
if ((_a =
|
|
526
|
-
const { layout, id: id2, lastRevision, categories
|
|
527
|
-
layoutResponse = { layout: { id: id2, layout, lastRevision, categories
|
|
558
|
+
if ((_a = floor2.properties) == null ? void 0 : _a.defaultLayoutId) {
|
|
559
|
+
const { layout, id: id2, lastRevision, categories } = await this.getLayout(floor2.properties.defaultLayoutId, revisionFilter);
|
|
560
|
+
layoutResponse = { layout: { id: id2, layout, lastRevision, categories } };
|
|
528
561
|
}
|
|
529
|
-
return { ...
|
|
562
|
+
return { ...floor2, ...layoutResponse };
|
|
530
563
|
}
|
|
531
564
|
async getFloorGeoJson(id, options) {
|
|
532
565
|
const queryString = generateQueryString(options ?? {});
|
|
533
566
|
const floorData = await this.connection.callSpaceAPI("GET", `/v2/floor/${id}/geo-json${queryString}`);
|
|
534
567
|
let defaultLayoutId;
|
|
535
568
|
if (options == null ? void 0 : options.includeAllElements) {
|
|
536
|
-
const
|
|
569
|
+
const floor2 = floorData.features.find(
|
|
537
570
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
538
571
|
// @ts-ignore
|
|
539
572
|
(feature) => feature.properties.resourceType === "Floor"
|
|
540
573
|
);
|
|
541
|
-
defaultLayoutId =
|
|
574
|
+
defaultLayoutId = floor2 == null ? void 0 : floor2.properties.defaultLayoutId;
|
|
542
575
|
} else {
|
|
543
|
-
const
|
|
544
|
-
defaultLayoutId =
|
|
576
|
+
const floor2 = floorData;
|
|
577
|
+
defaultLayoutId = floor2.properties.defaultLayoutId;
|
|
545
578
|
}
|
|
546
579
|
if (defaultLayoutId) {
|
|
547
|
-
const { layout, id: id2, lastRevision, categories
|
|
548
|
-
return { ...floorData, layout: { id: id2, layout, lastRevision, categories
|
|
580
|
+
const { layout, id: id2, lastRevision, categories } = await this.getLayout(defaultLayoutId);
|
|
581
|
+
return { ...floorData, layout: { id: id2, layout, lastRevision, categories } };
|
|
549
582
|
}
|
|
550
583
|
return floorData;
|
|
551
584
|
}
|
|
@@ -810,10 +843,8 @@ class SpaceAPI {
|
|
|
810
843
|
deleteLayout(layoutId) {
|
|
811
844
|
return this.connection.callSpaceAPI("DELETE", `/v2/layout/${layoutId}`);
|
|
812
845
|
}
|
|
813
|
-
createLayoutRevision(layoutId,
|
|
814
|
-
return this.connection.callSpaceAPI("POST", `/v2/layout/${layoutId}/revisions`,
|
|
815
|
-
layout
|
|
816
|
-
});
|
|
846
|
+
createLayoutRevision(layoutId, createLayoutRevision) {
|
|
847
|
+
return this.connection.callSpaceAPI("POST", `/v2/layout/${layoutId}/revisions`, createLayoutRevision);
|
|
817
848
|
}
|
|
818
849
|
updateLayoutRevision(layoutId, revisionId, params) {
|
|
819
850
|
return this.connection.callSpaceAPI("PATCH", `/v2/layout/${layoutId}/revisions/${revisionId}`, params);
|
|
@@ -828,6 +859,9 @@ class SpaceAPI {
|
|
|
828
859
|
convertLanguageToQuery(convertLanguageToQuery) {
|
|
829
860
|
return this.connection.callSpaceAPI("POST", "/v2/language/graphql", convertLanguageToQuery);
|
|
830
861
|
}
|
|
862
|
+
convertLanguageToAgentResponse(request) {
|
|
863
|
+
return this.connection.callSpaceAPI("POST", "/v2/language/query-floors", request);
|
|
864
|
+
}
|
|
831
865
|
getDxf(floorId) {
|
|
832
866
|
return this.connection.callSpaceAPI("GET", `/v2/floor/${floorId}/dxf`);
|
|
833
867
|
}
|
|
@@ -843,8 +877,8 @@ class SpaceAPI {
|
|
|
843
877
|
getImdfs(params) {
|
|
844
878
|
return this.connection.callSpaceAPI("POST", `/v2/floor/imdf`, params);
|
|
845
879
|
}
|
|
846
|
-
listExtensions() {
|
|
847
|
-
return this.connection.callSpaceAPI("GET", "/v2/extensions");
|
|
880
|
+
listExtensions(options) {
|
|
881
|
+
return this.connection.callSpaceAPI("GET", "/v2/extensions", options);
|
|
848
882
|
}
|
|
849
883
|
createExtension(extension) {
|
|
850
884
|
return this.connection.callSpaceAPI("POST", "/v2/extensions", extension);
|
|
@@ -855,6 +889,16 @@ class SpaceAPI {
|
|
|
855
889
|
deleteExtension(extensionId) {
|
|
856
890
|
return this.connection.callSpaceAPI("DELETE", `/v2/extensions/${extensionId}`);
|
|
857
891
|
}
|
|
892
|
+
// Extension Access Management - requires superadmin permissions
|
|
893
|
+
listExtensionAccess(extensionId) {
|
|
894
|
+
return this.connection.callSpaceAPI("GET", `/v2/extensions/${extensionId}/access`);
|
|
895
|
+
}
|
|
896
|
+
grantExtensionAccess(extensionId, organizationId) {
|
|
897
|
+
return this.connection.callSpaceAPI("PUT", `/v2/extensions/${extensionId}/access/${organizationId}`);
|
|
898
|
+
}
|
|
899
|
+
revokeExtensionAccess(extensionId, organizationId) {
|
|
900
|
+
return this.connection.callSpaceAPI("DELETE", `/v2/extensions/${extensionId}/access/${organizationId}`);
|
|
901
|
+
}
|
|
858
902
|
listBuildings() {
|
|
859
903
|
return this.connection.callSpaceAPI("GET", "/v2/buildings");
|
|
860
904
|
}
|
|
@@ -871,22 +915,19 @@ class SpaceAPI {
|
|
|
871
915
|
return this.connection.callSpaceAPI("DELETE", `/v2/buildings/${id}`);
|
|
872
916
|
}
|
|
873
917
|
}
|
|
874
|
-
var __defProp2 = Object.defineProperty;
|
|
875
|
-
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
876
|
-
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
877
918
|
var ClipperLib;
|
|
878
919
|
((ClipperLib2) => {
|
|
879
|
-
ClipperLib2.version = "6.4.2.
|
|
920
|
+
ClipperLib2.version = "6.4.2.3";
|
|
880
921
|
ClipperLib2.use_lines = true;
|
|
881
922
|
class PolyNode {
|
|
882
923
|
constructor() {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
924
|
+
__publicField(this, "m_Parent", null);
|
|
925
|
+
__publicField(this, "m_polygon", []);
|
|
926
|
+
__publicField(this, "m_Index", 0);
|
|
927
|
+
__publicField(this, "m_jointype", 0);
|
|
928
|
+
__publicField(this, "m_endtype", 0);
|
|
929
|
+
__publicField(this, "m_Children", []);
|
|
930
|
+
__publicField(this, "IsOpen", false);
|
|
890
931
|
}
|
|
891
932
|
IsHoleNode() {
|
|
892
933
|
var result = true;
|
|
@@ -937,7 +978,7 @@ var ClipperLib;
|
|
|
937
978
|
class PolyTree extends PolyNode {
|
|
938
979
|
constructor() {
|
|
939
980
|
super();
|
|
940
|
-
|
|
981
|
+
__publicField(this, "m_AllPolys", []);
|
|
941
982
|
}
|
|
942
983
|
Clear() {
|
|
943
984
|
for (var i2 = 0, ilen = this.m_AllPolys.length; i2 < ilen; i2++)
|
|
@@ -965,8 +1006,8 @@ var ClipperLib;
|
|
|
965
1006
|
ClipperLib2.PI2 = 2 * 3.141592653589793;
|
|
966
1007
|
class FPoint {
|
|
967
1008
|
constructor(...args) {
|
|
968
|
-
|
|
969
|
-
|
|
1009
|
+
__publicField(this, "X", 0);
|
|
1010
|
+
__publicField(this, "Y", 0);
|
|
970
1011
|
var a2 = args, alen = args.length;
|
|
971
1012
|
this.X = 0;
|
|
972
1013
|
this.Y = 0;
|
|
@@ -998,10 +1039,10 @@ var ClipperLib;
|
|
|
998
1039
|
ClipperLib2.FPoint = FPoint;
|
|
999
1040
|
class FRect {
|
|
1000
1041
|
constructor(...args) {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1042
|
+
__publicField(this, "left");
|
|
1043
|
+
__publicField(this, "top");
|
|
1044
|
+
__publicField(this, "right");
|
|
1045
|
+
__publicField(this, "bottom");
|
|
1005
1046
|
var a2 = args, alen = args.length;
|
|
1006
1047
|
if (alen === 4) {
|
|
1007
1048
|
this.left = a2[0];
|
|
@@ -1066,32 +1107,36 @@ var ClipperLib;
|
|
|
1066
1107
|
})(ClipperLib2.NodeType || (ClipperLib2.NodeType = {}));
|
|
1067
1108
|
class TEdge {
|
|
1068
1109
|
constructor() {
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1110
|
+
__publicField(this, "Bot", new ClipperLib2.FPoint());
|
|
1111
|
+
__publicField(this, "Curr", new ClipperLib2.FPoint());
|
|
1112
|
+
//current (updated for every new scanbeam)
|
|
1113
|
+
__publicField(this, "Top", new ClipperLib2.FPoint());
|
|
1114
|
+
__publicField(this, "Delta", new ClipperLib2.FPoint());
|
|
1115
|
+
__publicField(this, "Dx", 0);
|
|
1116
|
+
__publicField(this, "PolyTyp", 0);
|
|
1117
|
+
__publicField(this, "Side", 0);
|
|
1118
|
+
//side only refers to current side of solution poly
|
|
1119
|
+
__publicField(this, "WindDelta", 0);
|
|
1120
|
+
//1 or -1 depending on winding direction
|
|
1121
|
+
__publicField(this, "WindCnt", 0);
|
|
1122
|
+
__publicField(this, "WindCnt2", 0);
|
|
1123
|
+
//winding count of the opposite polytype
|
|
1124
|
+
__publicField(this, "OutIdx", 0);
|
|
1125
|
+
__publicField(this, "Next", null);
|
|
1126
|
+
__publicField(this, "Prev", null);
|
|
1127
|
+
__publicField(this, "NextInLML", null);
|
|
1128
|
+
__publicField(this, "NextInAEL", null);
|
|
1129
|
+
__publicField(this, "PrevInAEL", null);
|
|
1130
|
+
__publicField(this, "NextInSEL", null);
|
|
1131
|
+
__publicField(this, "PrevInSEL", null);
|
|
1087
1132
|
}
|
|
1088
1133
|
}
|
|
1089
1134
|
ClipperLib2.TEdge = TEdge;
|
|
1090
1135
|
class IntersectNode {
|
|
1091
1136
|
constructor() {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1137
|
+
__publicField(this, "Edge1", null);
|
|
1138
|
+
__publicField(this, "Edge2", null);
|
|
1139
|
+
__publicField(this, "Pt", new ClipperLib2.FPoint());
|
|
1095
1140
|
}
|
|
1096
1141
|
}
|
|
1097
1142
|
ClipperLib2.IntersectNode = IntersectNode;
|
|
@@ -1103,67 +1148,68 @@ var ClipperLib;
|
|
|
1103
1148
|
};
|
|
1104
1149
|
class LocalMinima {
|
|
1105
1150
|
constructor() {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1151
|
+
__publicField(this, "Y", 0);
|
|
1152
|
+
__publicField(this, "LeftBound", null);
|
|
1153
|
+
__publicField(this, "RightBound", null);
|
|
1154
|
+
__publicField(this, "Next", null);
|
|
1110
1155
|
}
|
|
1111
1156
|
}
|
|
1112
1157
|
ClipperLib2.LocalMinima = LocalMinima;
|
|
1113
1158
|
class Scanbeam {
|
|
1114
1159
|
constructor() {
|
|
1115
|
-
|
|
1116
|
-
|
|
1160
|
+
__publicField(this, "Y", 0);
|
|
1161
|
+
__publicField(this, "Next", null);
|
|
1117
1162
|
}
|
|
1118
1163
|
}
|
|
1119
1164
|
ClipperLib2.Scanbeam = Scanbeam;
|
|
1120
1165
|
class Maxima {
|
|
1121
1166
|
constructor() {
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1167
|
+
__publicField(this, "X", 0);
|
|
1168
|
+
__publicField(this, "Next", null);
|
|
1169
|
+
__publicField(this, "Prev", null);
|
|
1125
1170
|
}
|
|
1126
1171
|
}
|
|
1127
1172
|
ClipperLib2.Maxima = Maxima;
|
|
1128
1173
|
class OutRec {
|
|
1129
1174
|
constructor() {
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1175
|
+
__publicField(this, "Idx", 0);
|
|
1176
|
+
__publicField(this, "IsHole", false);
|
|
1177
|
+
__publicField(this, "IsOpen", false);
|
|
1178
|
+
__publicField(this, "FirstLeft", null);
|
|
1179
|
+
//see comments in clipper.pas
|
|
1180
|
+
__publicField(this, "Pts", null);
|
|
1181
|
+
__publicField(this, "BottomPt", null);
|
|
1182
|
+
__publicField(this, "PolyNode", null);
|
|
1137
1183
|
}
|
|
1138
1184
|
}
|
|
1139
1185
|
ClipperLib2.OutRec = OutRec;
|
|
1140
1186
|
class OutPt {
|
|
1141
1187
|
constructor() {
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1188
|
+
__publicField(this, "Idx", 0);
|
|
1189
|
+
__publicField(this, "Pt", new ClipperLib2.FPoint());
|
|
1190
|
+
__publicField(this, "Next", null);
|
|
1191
|
+
__publicField(this, "Prev", null);
|
|
1146
1192
|
}
|
|
1147
1193
|
}
|
|
1148
1194
|
ClipperLib2.OutPt = OutPt;
|
|
1149
1195
|
class Join {
|
|
1150
1196
|
constructor() {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1197
|
+
__publicField(this, "OutPt1", null);
|
|
1198
|
+
__publicField(this, "OutPt2", null);
|
|
1199
|
+
__publicField(this, "OffPt", new ClipperLib2.FPoint());
|
|
1154
1200
|
}
|
|
1155
1201
|
}
|
|
1156
1202
|
ClipperLib2.Join = Join;
|
|
1157
1203
|
class ClipperBase {
|
|
1158
1204
|
constructor() {
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1205
|
+
__publicField(this, "m_MinimaList", null);
|
|
1206
|
+
__publicField(this, "m_CurrentLM", null);
|
|
1207
|
+
__publicField(this, "m_edges", new Array());
|
|
1208
|
+
__publicField(this, "m_HasOpenPaths", false);
|
|
1209
|
+
__publicField(this, "PreserveCollinear", false);
|
|
1210
|
+
__publicField(this, "m_Scanbeam", null);
|
|
1211
|
+
__publicField(this, "m_PolyOuts", null);
|
|
1212
|
+
__publicField(this, "m_ActiveEdges", null);
|
|
1167
1213
|
}
|
|
1168
1214
|
// 2.2227587494850775e-162
|
|
1169
1215
|
static near_zero(val) {
|
|
@@ -1747,30 +1793,33 @@ var ClipperLib;
|
|
|
1747
1793
|
e2.PrevInAEL = null;
|
|
1748
1794
|
}
|
|
1749
1795
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1796
|
+
__publicField(ClipperBase, "horizontal", -34e37);
|
|
1797
|
+
__publicField(ClipperBase, "Skip", -2);
|
|
1798
|
+
__publicField(ClipperBase, "Unassigned", -1);
|
|
1799
|
+
__publicField(ClipperBase, "tolerance", 1e-20);
|
|
1800
|
+
// The MAX_VALUE property has a value of 1.7976931348623157e+308. Values larger than MAX_VALUE are represented as "Infinity".
|
|
1801
|
+
//MIN_VALUE has a value of 5e-324. Values smaller than MIN_VALUE ("underflow values") are converted to 0.
|
|
1802
|
+
__publicField(ClipperBase, "maxValue", Math.sqrt(Number.MAX_VALUE));
|
|
1803
|
+
// 1.3407807929942596e+154
|
|
1804
|
+
__publicField(ClipperBase, "minValue", Math.sqrt(Number.MIN_VALUE));
|
|
1756
1805
|
ClipperLib2.ClipperBase = ClipperBase;
|
|
1757
1806
|
class Clipper extends ClipperBase {
|
|
1758
1807
|
constructor(InitOptions) {
|
|
1759
1808
|
super();
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1809
|
+
__publicField(this, "m_SortedEdges", null);
|
|
1810
|
+
__publicField(this, "m_IntersectList", null);
|
|
1811
|
+
__publicField(this, "m_IntersectNodeComparer", null);
|
|
1812
|
+
__publicField(this, "m_ExecuteLocked", false);
|
|
1813
|
+
__publicField(this, "m_ClipFillType", 0);
|
|
1814
|
+
__publicField(this, "m_SubjFillType", 0);
|
|
1815
|
+
__publicField(this, "m_Joins", null);
|
|
1816
|
+
__publicField(this, "m_GhostJoins", null);
|
|
1817
|
+
__publicField(this, "m_UsingPolyTree", false);
|
|
1818
|
+
__publicField(this, "ReverseSolution", false);
|
|
1819
|
+
__publicField(this, "StrictlySimple", false);
|
|
1820
|
+
__publicField(this, "m_ClipType", 0);
|
|
1821
|
+
__publicField(this, "m_Maxima", null);
|
|
1822
|
+
__publicField(this, "ZFillFunction");
|
|
1774
1823
|
if (typeof InitOptions === "undefined") InitOptions = 0;
|
|
1775
1824
|
this.m_PolyOuts = null;
|
|
1776
1825
|
this.m_Scanbeam = null;
|
|
@@ -4114,26 +4163,26 @@ var ClipperLib;
|
|
|
4114
4163
|
return result;
|
|
4115
4164
|
}
|
|
4116
4165
|
}
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4166
|
+
__publicField(Clipper, "ioReverseSolution", 1);
|
|
4167
|
+
__publicField(Clipper, "ioStrictlySimple", 2);
|
|
4168
|
+
__publicField(Clipper, "ioPreserveCollinear", 4);
|
|
4120
4169
|
ClipperLib2.Clipper = Clipper;
|
|
4121
4170
|
class ClipperOffset {
|
|
4122
4171
|
constructor(miterLimit, arcTolerance) {
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4172
|
+
__publicField(this, "m_destPolys", []);
|
|
4173
|
+
__publicField(this, "m_srcPoly", []);
|
|
4174
|
+
__publicField(this, "m_destPoly", []);
|
|
4175
|
+
__publicField(this, "m_normals", new Array());
|
|
4176
|
+
__publicField(this, "m_delta", 0);
|
|
4177
|
+
__publicField(this, "m_sinA", 0);
|
|
4178
|
+
__publicField(this, "m_sin", 0);
|
|
4179
|
+
__publicField(this, "m_cos", 0);
|
|
4180
|
+
__publicField(this, "m_miterLim", 0);
|
|
4181
|
+
__publicField(this, "m_StepsPerRad", 0);
|
|
4182
|
+
__publicField(this, "m_lowest", new ClipperLib2.FPoint());
|
|
4183
|
+
__publicField(this, "m_polyNodes", new ClipperLib2.PolyNode());
|
|
4184
|
+
__publicField(this, "MiterLimit");
|
|
4185
|
+
__publicField(this, "ArcTolerance");
|
|
4137
4186
|
if (typeof miterLimit === "undefined") miterLimit = 2;
|
|
4138
4187
|
if (typeof arcTolerance === "undefined") arcTolerance = ClipperLib2.ClipperOffset.def_arc_tolerance;
|
|
4139
4188
|
this.MiterLimit = miterLimit;
|
|
@@ -4492,8 +4541,8 @@ var ClipperLib;
|
|
|
4492
4541
|
));
|
|
4493
4542
|
}
|
|
4494
4543
|
}
|
|
4495
|
-
|
|
4496
|
-
|
|
4544
|
+
__publicField(ClipperOffset, "two_pi", 6.28318530717959);
|
|
4545
|
+
__publicField(ClipperOffset, "def_arc_tolerance", 0.25);
|
|
4497
4546
|
ClipperLib2.ClipperOffset = ClipperOffset;
|
|
4498
4547
|
ClipperLib2.Error = function(message) {
|
|
4499
4548
|
throw new ClipperLib2.Error(message);
|
|
@@ -4509,10 +4558,17 @@ function polygonBounds(polygons) {
|
|
|
4509
4558
|
};
|
|
4510
4559
|
}
|
|
4511
4560
|
function polygonUnion(polygons) {
|
|
4512
|
-
if (!polygons.length
|
|
4561
|
+
if (!polygons.length) {
|
|
4513
4562
|
return [];
|
|
4514
4563
|
}
|
|
4515
|
-
let
|
|
4564
|
+
let validPolygons = polygons.filter((p2) => p2 && p2.length > 0);
|
|
4565
|
+
if (!validPolygons.length) {
|
|
4566
|
+
return [];
|
|
4567
|
+
}
|
|
4568
|
+
if (validPolygons.length === 1) {
|
|
4569
|
+
return [validPolygons[0]];
|
|
4570
|
+
}
|
|
4571
|
+
let _polygons = getClipperPolygons(validPolygons);
|
|
4516
4572
|
if (!_polygons.length) {
|
|
4517
4573
|
return [];
|
|
4518
4574
|
}
|
|
@@ -4563,7 +4619,10 @@ function polygonWithHolesUnion(polygonLists) {
|
|
|
4563
4619
|
return { polygons: [], polyTree: [] };
|
|
4564
4620
|
}
|
|
4565
4621
|
let subj_paths = getClipperPolygons(polygonLists[0]);
|
|
4566
|
-
let clip_paths =
|
|
4622
|
+
let clip_paths = [];
|
|
4623
|
+
for (let i2 = 1; i2 < polygonLists.length; i2++) {
|
|
4624
|
+
clip_paths.push(...getClipperPolygons(polygonLists[i2]));
|
|
4625
|
+
}
|
|
4567
4626
|
let cpr = new ClipperLib$1.Clipper();
|
|
4568
4627
|
cpr.AddPaths(subj_paths, ClipperLib$1.PolyType.ptSubject, true);
|
|
4569
4628
|
cpr.AddPaths(clip_paths, ClipperLib$1.PolyType.ptClip, true);
|
|
@@ -4597,7 +4656,10 @@ function polygonWithHolesOffset(polygonLists, delta = 0.1, endType = ClipperLib$
|
|
|
4597
4656
|
if (!polygonLists.length || !polygonLists[0]) {
|
|
4598
4657
|
return { polygons: [], polyTree: [] };
|
|
4599
4658
|
}
|
|
4600
|
-
let paths =
|
|
4659
|
+
let paths = [];
|
|
4660
|
+
for (let polygonList of polygonLists) {
|
|
4661
|
+
paths.push(...getClipperPolygons(polygonList));
|
|
4662
|
+
}
|
|
4601
4663
|
let co = new ClipperLib$1.ClipperOffset(2);
|
|
4602
4664
|
co.AddPaths(paths, ClipperLib$1.JoinType.jtMiter, endType);
|
|
4603
4665
|
let clipperPolyTree = new ClipperLib$1.PolyTree();
|
|
@@ -4608,10 +4670,13 @@ function polygonDifference(subjectPolygons, clipPolygons, subjectPathOpen) {
|
|
|
4608
4670
|
if (!subjectPolygons.length || !subjectPolygons[0]) {
|
|
4609
4671
|
return [];
|
|
4610
4672
|
}
|
|
4673
|
+
if (!clipPolygons.length) {
|
|
4674
|
+
return subjectPolygons;
|
|
4675
|
+
}
|
|
4611
4676
|
let subj_paths = getClipperPolygons(subjectPolygons);
|
|
4612
4677
|
let clip_paths = getClipperPolygons(clipPolygons);
|
|
4613
4678
|
let cpr = new ClipperLib$1.Clipper();
|
|
4614
|
-
cpr.AddPaths(subj_paths, ClipperLib$1.PolyType.ptSubject,
|
|
4679
|
+
cpr.AddPaths(subj_paths, ClipperLib$1.PolyType.ptSubject, true);
|
|
4615
4680
|
cpr.AddPaths(clip_paths, ClipperLib$1.PolyType.ptClip, true);
|
|
4616
4681
|
let solution_paths = [];
|
|
4617
4682
|
new ClipperLib$1.PolyTree();
|
|
@@ -4628,8 +4693,22 @@ function polygonWithHolesDifference(subjectPolygonLists, clipPolygonLists) {
|
|
|
4628
4693
|
if (!subjectPolygonLists.length || !subjectPolygonLists[0]) {
|
|
4629
4694
|
return { polygons: [], polyTree: [] };
|
|
4630
4695
|
}
|
|
4631
|
-
|
|
4632
|
-
|
|
4696
|
+
if (!clipPolygonLists.length) {
|
|
4697
|
+
let polygons = subjectPolygonLists.map((polygonList) => [...polygonList]);
|
|
4698
|
+
let polyTree = polygons.map((polygonList) => ({
|
|
4699
|
+
polygon: polygonList[0],
|
|
4700
|
+
children: []
|
|
4701
|
+
}));
|
|
4702
|
+
return { polygons, polyTree };
|
|
4703
|
+
}
|
|
4704
|
+
let subj_paths = [];
|
|
4705
|
+
for (let i2 = 0; i2 < subjectPolygonLists.length; i2++) {
|
|
4706
|
+
subj_paths.push(...getClipperPolygons(subjectPolygonLists[i2]));
|
|
4707
|
+
}
|
|
4708
|
+
let clip_paths = [];
|
|
4709
|
+
for (let i2 = 0; i2 < clipPolygonLists.length; i2++) {
|
|
4710
|
+
clip_paths.push(...getClipperPolygons(clipPolygonLists[i2]));
|
|
4711
|
+
}
|
|
4633
4712
|
let cpr = new ClipperLib$1.Clipper();
|
|
4634
4713
|
cpr.AddPaths(subj_paths, ClipperLib$1.PolyType.ptSubject, true);
|
|
4635
4714
|
cpr.AddPaths(clip_paths, ClipperLib$1.PolyType.ptClip, true);
|
|
@@ -4681,27 +4760,32 @@ function cleanPolygon(polygon, distance = 0.01) {
|
|
|
4681
4760
|
}
|
|
4682
4761
|
function getClipperPolygons(polygons = []) {
|
|
4683
4762
|
let clipperPolygons = [];
|
|
4684
|
-
let
|
|
4685
|
-
for (let
|
|
4763
|
+
let clipperIndex = 0;
|
|
4764
|
+
for (let polyIndex = 0; polyIndex < polygons.length; polyIndex++) {
|
|
4765
|
+
let poly = polygons[polyIndex];
|
|
4686
4766
|
if (!(poly == null ? void 0 : poly.length)) {
|
|
4687
4767
|
continue;
|
|
4688
4768
|
}
|
|
4689
|
-
|
|
4769
|
+
let clipperPoly = new Array(poly.length);
|
|
4690
4770
|
for (let j2 = 0; j2 < poly.length; j2++) {
|
|
4691
|
-
|
|
4771
|
+
let point = poly[j2];
|
|
4772
|
+
clipperPoly[j2] = { X: point[0], Y: -point[1] };
|
|
4692
4773
|
}
|
|
4693
|
-
|
|
4774
|
+
clipperPolygons[clipperIndex] = clipperPoly;
|
|
4775
|
+
clipperIndex++;
|
|
4694
4776
|
}
|
|
4695
4777
|
return clipperPolygons;
|
|
4696
4778
|
}
|
|
4697
4779
|
function getPolygonsFromClipper(clipperPolygons) {
|
|
4698
|
-
let polygons =
|
|
4780
|
+
let polygons = new Array(clipperPolygons.length);
|
|
4699
4781
|
for (let i2 = 0; i2 < clipperPolygons.length; i2++) {
|
|
4700
4782
|
let poly = clipperPolygons[i2] || [];
|
|
4701
|
-
|
|
4783
|
+
let polygon = new Array(poly.length);
|
|
4702
4784
|
for (let j2 = 0; j2 < poly.length; j2++) {
|
|
4703
|
-
|
|
4785
|
+
let point = poly[j2];
|
|
4786
|
+
polygon[j2] = [point.X, -point.Y];
|
|
4704
4787
|
}
|
|
4788
|
+
polygons[i2] = polygon;
|
|
4705
4789
|
}
|
|
4706
4790
|
return polygons;
|
|
4707
4791
|
}
|
|
@@ -5725,10 +5809,10 @@ function equals(p1, p2) {
|
|
|
5725
5809
|
return p1.x === p2.x && p1.y === p2.y;
|
|
5726
5810
|
}
|
|
5727
5811
|
function intersects(p1, q1, p2, q2) {
|
|
5728
|
-
var o1 = sign$
|
|
5729
|
-
var o2 = sign$
|
|
5730
|
-
var o3 = sign$
|
|
5731
|
-
var o4 = sign$
|
|
5812
|
+
var o1 = sign$3(area(p1, q1, p2));
|
|
5813
|
+
var o2 = sign$3(area(p1, q1, q2));
|
|
5814
|
+
var o3 = sign$3(area(p2, q2, p1));
|
|
5815
|
+
var o4 = sign$3(area(p2, q2, q1));
|
|
5732
5816
|
if (o1 !== o2 && o3 !== o4) return true;
|
|
5733
5817
|
if (o1 === 0 && onSegment(p1, p2, q1)) return true;
|
|
5734
5818
|
if (o2 === 0 && onSegment(p1, q2, q1)) return true;
|
|
@@ -5739,7 +5823,7 @@ function intersects(p1, q1, p2, q2) {
|
|
|
5739
5823
|
function onSegment(p2, q2, r2) {
|
|
5740
5824
|
return q2.x <= Math.max(p2.x, r2.x) && q2.x >= Math.min(p2.x, r2.x) && q2.y <= Math.max(p2.y, r2.y) && q2.y >= Math.min(p2.y, r2.y);
|
|
5741
5825
|
}
|
|
5742
|
-
function sign$
|
|
5826
|
+
function sign$3(num) {
|
|
5743
5827
|
return num > 0 ? 1 : num < 0 ? -1 : 0;
|
|
5744
5828
|
}
|
|
5745
5829
|
function intersectsPolygon(a2, b2) {
|
|
@@ -5872,7 +5956,7 @@ const native = {
|
|
|
5872
5956
|
randomUUID
|
|
5873
5957
|
};
|
|
5874
5958
|
function v4(options, buf, offset) {
|
|
5875
|
-
if (native.randomUUID &&
|
|
5959
|
+
if (native.randomUUID && true && !options) {
|
|
5876
5960
|
return native.randomUUID();
|
|
5877
5961
|
}
|
|
5878
5962
|
options = options || {};
|
|
@@ -5936,7 +6020,7 @@ var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Ca
|
|
|
5936
6020
|
var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
|
|
5937
6021
|
var _SpaceGraphProductBase_instances, getAttributesJson_fn;
|
|
5938
6022
|
const defaultLevels$1 = ["info", "warnings", "errors"];
|
|
5939
|
-
class SpaceGraphLogger extends
|
|
6023
|
+
class SpaceGraphLogger extends ft {
|
|
5940
6024
|
error(...args) {
|
|
5941
6025
|
if (this.levels.includes("errors")) {
|
|
5942
6026
|
if (args.length > 0) {
|
|
@@ -6783,19 +6867,66 @@ function getAngleFromLines(p1, p2, q1, q2) {
|
|
|
6783
6867
|
let cross2 = vec2Cross(v1, v2);
|
|
6784
6868
|
return Math.atan2(Math.abs(cross2), dot2);
|
|
6785
6869
|
}
|
|
6870
|
+
function isConvexQuadrilateral(points) {
|
|
6871
|
+
if (points.length !== 4) return false;
|
|
6872
|
+
let prevSign = null;
|
|
6873
|
+
for (let i2 = 0; i2 < 4; i2++) {
|
|
6874
|
+
const p1 = points[i2];
|
|
6875
|
+
const p2 = points[(i2 + 1) % 4];
|
|
6876
|
+
const p3 = points[(i2 + 2) % 4];
|
|
6877
|
+
const cross2 = (p2[0] - p1[0]) * (p3[1] - p2[1]) - (p2[1] - p1[1]) * (p3[0] - p2[0]);
|
|
6878
|
+
if (Math.abs(cross2) < 1e-9) return false;
|
|
6879
|
+
const sign3 = cross2 > 0 ? 1 : -1;
|
|
6880
|
+
if (prevSign === null) {
|
|
6881
|
+
prevSign = sign3;
|
|
6882
|
+
} else if (prevSign !== sign3) {
|
|
6883
|
+
return false;
|
|
6884
|
+
}
|
|
6885
|
+
}
|
|
6886
|
+
return true;
|
|
6887
|
+
}
|
|
6888
|
+
function pointInConvexQuadrilateral(p2, rectPoints) {
|
|
6889
|
+
const epsilon = 1e-9;
|
|
6890
|
+
let expectedSign = null;
|
|
6891
|
+
for (let i2 = 0; i2 < 4; i2++) {
|
|
6892
|
+
const p1 = rectPoints[i2];
|
|
6893
|
+
const p22 = rectPoints[(i2 + 1) % 4];
|
|
6894
|
+
const edgeX = p22[0] - p1[0];
|
|
6895
|
+
const edgeY = p22[1] - p1[1];
|
|
6896
|
+
const pointX = p2[0] - p1[0];
|
|
6897
|
+
const pointY = p2[1] - p1[1];
|
|
6898
|
+
const cross2 = edgeX * pointY - edgeY * pointX;
|
|
6899
|
+
if (Math.abs(cross2) < epsilon) {
|
|
6900
|
+
continue;
|
|
6901
|
+
}
|
|
6902
|
+
const sign3 = cross2 > 0 ? 1 : -1;
|
|
6903
|
+
if (expectedSign === null) {
|
|
6904
|
+
expectedSign = sign3;
|
|
6905
|
+
} else if (expectedSign !== sign3) {
|
|
6906
|
+
return false;
|
|
6907
|
+
}
|
|
6908
|
+
}
|
|
6909
|
+
return true;
|
|
6910
|
+
}
|
|
6786
6911
|
function pointInPolygon(p2, polygonPoints) {
|
|
6787
6912
|
const epsilon = 1e-9;
|
|
6913
|
+
const n2 = polygonPoints.length;
|
|
6914
|
+
if (n2 === 4 && isConvexQuadrilateral(polygonPoints)) {
|
|
6915
|
+
return pointInConvexQuadrilateral(p2, polygonPoints);
|
|
6916
|
+
}
|
|
6788
6917
|
let inside = false;
|
|
6789
6918
|
const x2 = p2[0];
|
|
6790
6919
|
const y2 = p2[1];
|
|
6791
|
-
for (let i2 = 0; i2 <
|
|
6920
|
+
for (let i2 = 0; i2 < n2; i2++) {
|
|
6792
6921
|
const p1 = polygonPoints[i2];
|
|
6793
|
-
const p22 =
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6922
|
+
const p22 = polygonPoints[(i2 + 1) % n2];
|
|
6923
|
+
const x1 = p1[0], y1 = p1[1];
|
|
6924
|
+
const x22 = p22[0], y22 = p22[1];
|
|
6925
|
+
if (y1 < y2 && y22 >= y2 || y22 < y2 && y1 >= y2) {
|
|
6926
|
+
const dY = y22 - y1;
|
|
6927
|
+
if (Math.abs(dY) >= epsilon) {
|
|
6928
|
+
const xCross = x1 + (y2 - y1) / dY * (x22 - x1);
|
|
6929
|
+
if (xCross < x2) inside = !inside;
|
|
6799
6930
|
}
|
|
6800
6931
|
}
|
|
6801
6932
|
}
|
|
@@ -6863,8 +6994,8 @@ function getPolygonWithHolesArea(polygonBoundaries) {
|
|
|
6863
6994
|
return area2;
|
|
6864
6995
|
}
|
|
6865
6996
|
function getPolygonCenter(polygon) {
|
|
6866
|
-
const { min, max: max2 } = polygonBounds([polygon]);
|
|
6867
|
-
return [
|
|
6997
|
+
const { min: min2, max: max2 } = polygonBounds([polygon]);
|
|
6998
|
+
return [min2[0] + (max2[0] - min2[0]) / 2, min2[1] + (max2[1] - min2[1]) / 2];
|
|
6868
6999
|
}
|
|
6869
7000
|
function getPolygonLabelPoint(polygonWithHoles, precision = 0.1) {
|
|
6870
7001
|
let labelPoint;
|
|
@@ -6880,7 +7011,7 @@ function getPolygonLabelPoint(polygonWithHoles, precision = 0.1) {
|
|
|
6880
7011
|
function getPolygonPerimeter(points, isClosed = true) {
|
|
6881
7012
|
let perimeter = 0;
|
|
6882
7013
|
let pointLength = isClosed ? points.length : points.length - 1;
|
|
6883
|
-
for (
|
|
7014
|
+
for (let i2 = 0; i2 < pointLength; i2++) {
|
|
6884
7015
|
let index1 = i2;
|
|
6885
7016
|
let index2 = i2 < points.length - 1 ? i2 + 1 : 0;
|
|
6886
7017
|
let p1 = points[index1];
|
|
@@ -8424,15 +8555,15 @@ function getBoundingBox(vertices) {
|
|
|
8424
8555
|
}
|
|
8425
8556
|
return boundingBox;
|
|
8426
8557
|
}
|
|
8427
|
-
function getAxisAlignedBoundingBox({ min, max: max2, transform }) {
|
|
8558
|
+
function getAxisAlignedBoundingBox({ min: min2, max: max2, transform }) {
|
|
8428
8559
|
if (transform.rotation === 0) {
|
|
8429
8560
|
return {
|
|
8430
|
-
min: vec3Add(
|
|
8561
|
+
min: vec3Add(min2, transform.position),
|
|
8431
8562
|
max: vec3Add(max2, transform.position)
|
|
8432
8563
|
};
|
|
8433
8564
|
} else {
|
|
8434
8565
|
let mTransform = getPositionRotationMatrix(transform.position, transform.rotation, transform.rotationAxis);
|
|
8435
|
-
const points = [[...
|
|
8566
|
+
const points = [[...min2], [...max2], [min2[0], min2[1], max2[2]], [max2[0], max2[1], min2[2]]];
|
|
8436
8567
|
for (const point of points) {
|
|
8437
8568
|
transformMat4(point, point, mTransform);
|
|
8438
8569
|
}
|
|
@@ -9971,8 +10102,8 @@ class LayoutSpace extends LayoutNodeBase {
|
|
|
9971
10102
|
};
|
|
9972
10103
|
}
|
|
9973
10104
|
getAxisAlignedBoundingBox() {
|
|
9974
|
-
const { min, max: max2 } = this.getBoundingBox();
|
|
9975
|
-
return { min, max: max2 };
|
|
10105
|
+
const { min: min2, max: max2 } = this.getBoundingBox();
|
|
10106
|
+
return { min: min2, max: max2 };
|
|
9976
10107
|
}
|
|
9977
10108
|
getBoundingBoxContour() {
|
|
9978
10109
|
const {
|
|
@@ -10035,21 +10166,21 @@ class LayoutBoundaryElementBase extends LayoutElementBase {
|
|
|
10035
10166
|
this.boundaries = cloneBoundaries(boundaries);
|
|
10036
10167
|
}
|
|
10037
10168
|
getBoundingBox() {
|
|
10038
|
-
const
|
|
10169
|
+
const min2 = [0, 0, 0];
|
|
10039
10170
|
const max2 = [0, 0, 0];
|
|
10040
10171
|
const bounds2d = polygonBounds([this.boundaries[0].geometryProfile]);
|
|
10041
|
-
|
|
10172
|
+
min2[0] = bounds2d.min[0];
|
|
10042
10173
|
max2[0] = bounds2d.max[0];
|
|
10043
|
-
|
|
10174
|
+
min2[2] = bounds2d.min[1];
|
|
10044
10175
|
max2[2] = bounds2d.max[1];
|
|
10045
10176
|
if (this.type === "element:floor") {
|
|
10046
|
-
|
|
10177
|
+
min2[1] = this.parameters.elevation - this.parameters.height;
|
|
10047
10178
|
max2[1] = this.parameters.elevation;
|
|
10048
10179
|
} else {
|
|
10049
|
-
|
|
10180
|
+
min2[1] = this.parameters.elevation;
|
|
10050
10181
|
max2[1] = this.parameters.elevation + this.parameters.height;
|
|
10051
10182
|
}
|
|
10052
|
-
return { min, max: max2, transform: this.getTransform() };
|
|
10183
|
+
return { min: min2, max: max2, transform: this.getTransform() };
|
|
10053
10184
|
}
|
|
10054
10185
|
}
|
|
10055
10186
|
const LayoutWallTypeValue = "element:wall";
|
|
@@ -10094,7 +10225,7 @@ class LayoutWall extends LayoutEdgeElementBase {
|
|
|
10094
10225
|
super.setParameters(parameters);
|
|
10095
10226
|
}
|
|
10096
10227
|
getBoundingBox() {
|
|
10097
|
-
const
|
|
10228
|
+
const min2 = [0, 0, 0];
|
|
10098
10229
|
const max2 = [0, 0, 0];
|
|
10099
10230
|
const [start, end] = this.getAxisPoints();
|
|
10100
10231
|
if (!start || !end) {
|
|
@@ -10110,13 +10241,13 @@ class LayoutWall extends LayoutEdgeElementBase {
|
|
|
10110
10241
|
};
|
|
10111
10242
|
const edgeOrientedProfile = applyPolygonTransform2d(this.geometryProfile.points, invertTransform2d(transform));
|
|
10112
10243
|
const bounds2d = polygonBounds([edgeOrientedProfile]);
|
|
10113
|
-
|
|
10244
|
+
min2[0] = bounds2d.min[0];
|
|
10114
10245
|
max2[0] = bounds2d.max[0];
|
|
10115
|
-
|
|
10246
|
+
min2[2] = bounds2d.min[1];
|
|
10116
10247
|
max2[2] = bounds2d.max[1];
|
|
10117
|
-
|
|
10248
|
+
min2[1] = this.parameters.elevation;
|
|
10118
10249
|
max2[1] = this.parameters.elevation + this.parameters.height;
|
|
10119
|
-
return { min, max: max2, transform: transform3d };
|
|
10250
|
+
return { min: min2, max: max2, transform: transform3d };
|
|
10120
10251
|
}
|
|
10121
10252
|
}
|
|
10122
10253
|
const defaultCeilingMaterials = {
|
|
@@ -10628,26 +10759,48 @@ function getBoundaryWallsFromEdges(edges) {
|
|
|
10628
10759
|
}
|
|
10629
10760
|
return [...boundaryWallMap.values()];
|
|
10630
10761
|
}
|
|
10631
|
-
function getBoundaryEdgeMatchCount(
|
|
10762
|
+
function getBoundaryEdgeMatchCount(boundary1Edges, boundary2Edges) {
|
|
10763
|
+
const edge1Count = boundary1Edges.length;
|
|
10764
|
+
const edge2Count = boundary2Edges.length;
|
|
10765
|
+
if (edge1Count === 0 || edge2Count === 0) {
|
|
10766
|
+
return 0;
|
|
10767
|
+
}
|
|
10768
|
+
const [smallerEdges, largerEdges] = edge1Count <= edge2Count ? [boundary1Edges, boundary2Edges] : [boundary2Edges, boundary1Edges];
|
|
10632
10769
|
let edgeMatchCount = 0;
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10770
|
+
const smallerCount = smallerEdges.length;
|
|
10771
|
+
const largerCount = largerEdges.length;
|
|
10772
|
+
if (smallerCount <= 10) {
|
|
10773
|
+
for (let i2 = 0; i2 < smallerCount; i2++) {
|
|
10774
|
+
const id1 = smallerEdges[i2].id;
|
|
10775
|
+
for (let j2 = 0; j2 < largerCount; j2++) {
|
|
10776
|
+
if (id1 === largerEdges[j2].id) {
|
|
10777
|
+
edgeMatchCount++;
|
|
10778
|
+
break;
|
|
10779
|
+
}
|
|
10780
|
+
}
|
|
10781
|
+
}
|
|
10782
|
+
} else {
|
|
10783
|
+
const largerEdgeIds = new Set(largerEdges.map((edge) => edge.id));
|
|
10784
|
+
for (let i2 = 0; i2 < smallerCount; i2++) {
|
|
10785
|
+
if (largerEdgeIds.has(smallerEdges[i2].id)) {
|
|
10636
10786
|
edgeMatchCount++;
|
|
10637
|
-
break;
|
|
10638
10787
|
}
|
|
10639
10788
|
}
|
|
10640
10789
|
}
|
|
10641
10790
|
return edgeMatchCount;
|
|
10642
10791
|
}
|
|
10643
10792
|
function boundariesMatch(boundary1, boundary2, exactMatch) {
|
|
10644
|
-
|
|
10793
|
+
const boundary1Edges = boundary1.edges;
|
|
10794
|
+
const boundary1EdgeCount = boundary1Edges.length;
|
|
10795
|
+
const boundary2Edges = boundary2.edges;
|
|
10796
|
+
const boundary2EdgeCount = boundary2Edges.length;
|
|
10797
|
+
if (boundary1EdgeCount !== boundary2EdgeCount) {
|
|
10645
10798
|
return false;
|
|
10646
10799
|
}
|
|
10647
|
-
const edgeMatchCount = getBoundaryEdgeMatchCount(
|
|
10800
|
+
const edgeMatchCount = getBoundaryEdgeMatchCount(boundary1Edges, boundary2Edges);
|
|
10648
10801
|
let match;
|
|
10649
10802
|
{
|
|
10650
|
-
match = edgeMatchCount ===
|
|
10803
|
+
match = edgeMatchCount === boundary1EdgeCount;
|
|
10651
10804
|
}
|
|
10652
10805
|
return match;
|
|
10653
10806
|
}
|
|
@@ -10665,27 +10818,40 @@ function boundaryListsMatch(boundaries1, boundaries2, exactMatch) {
|
|
|
10665
10818
|
return true;
|
|
10666
10819
|
}
|
|
10667
10820
|
function getSpaceFromBoundaries(layout, boundaries, exactMatch) {
|
|
10821
|
+
const boundariesCount = boundaries.length;
|
|
10668
10822
|
for (const space of layout.spaces) {
|
|
10669
|
-
|
|
10823
|
+
const spaceBoundariesCount = space.boundaries.length;
|
|
10824
|
+
if (spaceBoundariesCount !== boundariesCount) {
|
|
10670
10825
|
continue;
|
|
10671
10826
|
}
|
|
10672
10827
|
let i2 = 0;
|
|
10673
|
-
while (i2 <
|
|
10828
|
+
while (i2 < spaceBoundariesCount) {
|
|
10674
10829
|
const spaceBoundary = space.boundaries[i2];
|
|
10675
10830
|
const boundary = boundaries[i2];
|
|
10676
|
-
if (
|
|
10677
|
-
break;
|
|
10678
|
-
} else {
|
|
10831
|
+
if (boundariesMatch(spaceBoundary, boundary)) {
|
|
10679
10832
|
i2++;
|
|
10833
|
+
} else {
|
|
10834
|
+
break;
|
|
10680
10835
|
}
|
|
10681
10836
|
}
|
|
10682
|
-
if (i2 ===
|
|
10837
|
+
if (i2 === spaceBoundariesCount) {
|
|
10683
10838
|
return arePolygonsTheSame(space, [{ boundaries }]) ? space : void 0;
|
|
10684
10839
|
}
|
|
10685
10840
|
}
|
|
10686
10841
|
return void 0;
|
|
10687
10842
|
}
|
|
10688
|
-
function arePolygonsTheSame(originalSpace, spaces) {
|
|
10843
|
+
function arePolygonsTheSame(originalSpace, spaces, outlineOnly = false) {
|
|
10844
|
+
const eps = 0.01;
|
|
10845
|
+
if (!outlineOnly) {
|
|
10846
|
+
const originalPolygonWithHoles = originalSpace.boundaries.map((boundary) => boundary.geometryProfile);
|
|
10847
|
+
const insertPolygonsWithHoles = spaces.map((space) => space.boundaries.map((boundary) => boundary.geometryProfile));
|
|
10848
|
+
const originalArea = polygonWithHolesArea(originalPolygonWithHoles);
|
|
10849
|
+
const insertAreas = insertPolygonsWithHoles.map((polygon) => polygonWithHolesArea(polygon));
|
|
10850
|
+
const insertAreaSum = insertAreas.reduce((sum, area3) => sum + area3, 0);
|
|
10851
|
+
if (Math.abs(originalArea - insertAreaSum) > eps) {
|
|
10852
|
+
return false;
|
|
10853
|
+
}
|
|
10854
|
+
}
|
|
10689
10855
|
const insertPolygons = spaces.map((space) => [space.boundaries[0].geometryProfile]);
|
|
10690
10856
|
const offsetDistance = 0.01;
|
|
10691
10857
|
const { polygons: inflatedPolygons } = polygonWithHolesOffset(insertPolygons, offsetDistance);
|
|
@@ -10703,7 +10869,6 @@ function arePolygonsTheSame(originalSpace, spaces) {
|
|
|
10703
10869
|
const diff2 = polygonWithHolesDifference([[outerUnionPolygon]], [[removePolygon]]).polygons;
|
|
10704
10870
|
const area1 = diff1.length ? polygonWithHolesArea(diff1[0]) : 0;
|
|
10705
10871
|
const area2 = diff2.length ? polygonWithHolesArea(diff2[0]) : 0;
|
|
10706
|
-
const eps = 0.01;
|
|
10707
10872
|
return area1 < eps && area2 < eps;
|
|
10708
10873
|
}
|
|
10709
10874
|
function cloneBoundary(srcBoundary) {
|
|
@@ -11233,9 +11398,9 @@ class LayoutSpaceDivider extends LayoutEdgeElementBase {
|
|
|
11233
11398
|
rotation: -degAngle,
|
|
11234
11399
|
rotationAxis: [0, 1, 0]
|
|
11235
11400
|
};
|
|
11236
|
-
const
|
|
11401
|
+
const min2 = [0, 0, -0.01];
|
|
11237
11402
|
const max2 = [length2, 0, 0.01];
|
|
11238
|
-
return { min, max: max2, transform: transform3d };
|
|
11403
|
+
return { min: min2, max: max2, transform: transform3d };
|
|
11239
11404
|
}
|
|
11240
11405
|
}
|
|
11241
11406
|
class LayoutOpeningElementBase extends LayoutElementBase {
|
|
@@ -11395,8 +11560,8 @@ function createCaseworkGeometry(element) {
|
|
|
11395
11560
|
let nestedElements = element.elements;
|
|
11396
11561
|
for (let nestedElement of nestedElements) {
|
|
11397
11562
|
if ("product" in nestedElement && nestedElement.product) {
|
|
11398
|
-
let { min, max: max2 } = nestedElement.product.attributes.boundingBox;
|
|
11399
|
-
let minWithOffset = vec3Sub(
|
|
11563
|
+
let { min: min2, max: max2 } = nestedElement.product.attributes.boundingBox;
|
|
11564
|
+
let minWithOffset = vec3Sub(min2, [0, 0.01, 0]);
|
|
11400
11565
|
let dimensions = vec3Sub(max2, minWithOffset);
|
|
11401
11566
|
let position = vec3Add(minWithOffset, nestedElement.position);
|
|
11402
11567
|
subtractGeometries.push({
|
|
@@ -12238,10 +12403,10 @@ class LayoutOpening extends LayoutOpeningElementBase {
|
|
|
12238
12403
|
const { dimensions } = this.parameters;
|
|
12239
12404
|
const parentWall = this.parent;
|
|
12240
12405
|
const width = (parentWall == null ? void 0 : parentWall.parameters.width) || 0;
|
|
12241
|
-
const
|
|
12406
|
+
const min2 = [0, 0, 0];
|
|
12242
12407
|
const max2 = [dimensions[0], dimensions[1], width];
|
|
12243
12408
|
const transform = localTransform ? this.getTransform() : this.getWorldTransform();
|
|
12244
|
-
return { min, max: max2, transform };
|
|
12409
|
+
return { min: min2, max: max2, transform };
|
|
12245
12410
|
}
|
|
12246
12411
|
getSpaces() {
|
|
12247
12412
|
if (!this.parent) {
|
|
@@ -12343,7 +12508,7 @@ class LayoutTransformElementBase extends LayoutElementBase {
|
|
|
12343
12508
|
return { position, rotation, rotationAxis };
|
|
12344
12509
|
}
|
|
12345
12510
|
getBoundingBox(localTransform = false) {
|
|
12346
|
-
const
|
|
12511
|
+
const min2 = [0, 0, 0];
|
|
12347
12512
|
const max2 = [0, 0, 0];
|
|
12348
12513
|
if ("length" in this.parameters) {
|
|
12349
12514
|
max2[0] = this.parameters.length;
|
|
@@ -12357,7 +12522,7 @@ class LayoutTransformElementBase extends LayoutElementBase {
|
|
|
12357
12522
|
max2[2] = this.parameters.frameDepth;
|
|
12358
12523
|
}
|
|
12359
12524
|
if ("radius" in this.parameters) {
|
|
12360
|
-
|
|
12525
|
+
min2[0] = min2[2] = -this.parameters.radius;
|
|
12361
12526
|
max2[0] = max2[2] = this.parameters.radius;
|
|
12362
12527
|
}
|
|
12363
12528
|
if ("profile" in this.parameters && this.parameters.profile !== "none") {
|
|
@@ -12367,27 +12532,27 @@ class LayoutTransformElementBase extends LayoutElementBase {
|
|
|
12367
12532
|
max2[0] = xDim;
|
|
12368
12533
|
max2[2] = zDim;
|
|
12369
12534
|
if (this.type === "element:column") {
|
|
12370
|
-
|
|
12535
|
+
min2[0] = -xDim / 2;
|
|
12371
12536
|
max2[0] = xDim / 2;
|
|
12372
|
-
|
|
12537
|
+
min2[2] = -zDim / 2;
|
|
12373
12538
|
max2[2] = zDim / 2;
|
|
12374
12539
|
}
|
|
12375
12540
|
break;
|
|
12376
12541
|
}
|
|
12377
12542
|
case "curve:circle":
|
|
12378
|
-
|
|
12543
|
+
min2[0] = min2[2] = -this.parameters.profile.radius;
|
|
12379
12544
|
max2[0] = max2[2] = this.parameters.profile.radius;
|
|
12380
12545
|
break;
|
|
12381
12546
|
case "curve:polygon":
|
|
12382
12547
|
let bounds2d = polygonBounds([this.parameters.profile.points]);
|
|
12383
|
-
|
|
12548
|
+
min2[0] = bounds2d.min[0];
|
|
12384
12549
|
max2[0] = bounds2d.max[0];
|
|
12385
|
-
|
|
12550
|
+
min2[2] = bounds2d.min[1];
|
|
12386
12551
|
max2[2] = bounds2d.max[1];
|
|
12387
12552
|
}
|
|
12388
12553
|
}
|
|
12389
12554
|
const transform = localTransform ? this.getTransform() : this.getWorldTransform();
|
|
12390
|
-
return { min, max: max2, transform };
|
|
12555
|
+
return { min: min2, max: max2, transform };
|
|
12391
12556
|
}
|
|
12392
12557
|
setParameters(parameters) {
|
|
12393
12558
|
super.setParameters(parameters);
|
|
@@ -12426,9 +12591,9 @@ class LayoutAsset extends LayoutTransformElementBase {
|
|
|
12426
12591
|
if (!this.product) {
|
|
12427
12592
|
return super.getBoundingBox();
|
|
12428
12593
|
}
|
|
12429
|
-
const { min, max: max2 } = this.product.attributes.boundingBox;
|
|
12594
|
+
const { min: min2, max: max2 } = this.product.attributes.boundingBox;
|
|
12430
12595
|
const transform = localTransform ? this.getTransform() : this.getWorldTransform();
|
|
12431
|
-
return { min, max: max2, transform };
|
|
12596
|
+
return { min: min2, max: max2, transform };
|
|
12432
12597
|
}
|
|
12433
12598
|
}
|
|
12434
12599
|
const LayoutBeamTypeValue = "element:beam";
|
|
@@ -12680,6 +12845,9 @@ class SpaceGraphProductBase extends SpaceGraphNodeWithCustomAttributesBase {
|
|
|
12680
12845
|
attributes.seatCapacity = attributesJson.seatCapacity ?? attributes.seatCapacity;
|
|
12681
12846
|
attributes.updatedAt = attributesJson.updatedAt ?? attributes.updatedAt;
|
|
12682
12847
|
}
|
|
12848
|
+
getBoundingBox() {
|
|
12849
|
+
return this.attributes.boundingBox;
|
|
12850
|
+
}
|
|
12683
12851
|
toJSON() {
|
|
12684
12852
|
const productJson = super.toJSON();
|
|
12685
12853
|
productJson.attributes = __privateMethod$1(this, _SpaceGraphProductBase_instances, getAttributesJson_fn).call(this);
|
|
@@ -12702,8 +12870,8 @@ getAttributesJson_fn = function() {
|
|
|
12702
12870
|
if (attributes.thumbnail !== "") {
|
|
12703
12871
|
attributesJson.thumbnail = attributes.thumbnail;
|
|
12704
12872
|
}
|
|
12705
|
-
let { min, max: max2 } = attributes.boundingBox;
|
|
12706
|
-
if (
|
|
12873
|
+
let { min: min2, max: max2 } = attributes.boundingBox;
|
|
12874
|
+
if (min2[0] !== 1 && max2[0] !== -1) {
|
|
12707
12875
|
attributesJson.boundingBox = {
|
|
12708
12876
|
min: [...attributes.boundingBox.min],
|
|
12709
12877
|
max: [...attributes.boundingBox.max]
|
|
@@ -12763,20 +12931,36 @@ class SpaceGraphProductComponent extends SpaceGraphProductBase {
|
|
|
12763
12931
|
setInstances() {
|
|
12764
12932
|
var _a;
|
|
12765
12933
|
for (const instance of this.instances) {
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
continue;
|
|
12934
|
+
const productsMatch = this.products.length === instance.elements.length && this.products.every((entry, index) => {
|
|
12935
|
+
var _a2;
|
|
12936
|
+
const asset = instance.elements[index];
|
|
12937
|
+
return (asset == null ? void 0 : asset.type) === "element:asset" && entry.product === ((_a2 = asset.product) == null ? void 0 : _a2.id);
|
|
12938
|
+
});
|
|
12939
|
+
if (productsMatch) {
|
|
12940
|
+
for (let i2 = 0; i2 < this.products.length; i2++) {
|
|
12941
|
+
const productEntry = this.products[i2];
|
|
12942
|
+
if ("type" in productEntry.position) continue;
|
|
12943
|
+
if (typeof productEntry.rotation !== "number") continue;
|
|
12944
|
+
const asset = instance.elements[i2];
|
|
12945
|
+
if (asset.type === "element:asset" && ((_a = asset.product) == null ? void 0 : _a.id) === productEntry.product) {
|
|
12946
|
+
asset.setTransform(productEntry.position, productEntry.rotation);
|
|
12947
|
+
}
|
|
12776
12948
|
}
|
|
12777
|
-
|
|
12778
|
-
|
|
12949
|
+
} else {
|
|
12950
|
+
for (let i2 = instance.elements.length - 1; i2 >= 0; i2--) {
|
|
12951
|
+
instance.removeElement(instance.elements[i2]);
|
|
12952
|
+
}
|
|
12953
|
+
for (const productEntry of this.products) {
|
|
12954
|
+
const asset = new LayoutAsset(v4());
|
|
12955
|
+
const product = this.spaceGraph.productsById[productEntry.product];
|
|
12956
|
+
if (!product) {
|
|
12957
|
+
logger$1.error(`Product ${productEntry.product} is missing`);
|
|
12958
|
+
}
|
|
12959
|
+
asset.setProduct(product);
|
|
12960
|
+
if ("type" in productEntry.position) continue;
|
|
12961
|
+
if (typeof productEntry.rotation !== "number") continue;
|
|
12779
12962
|
asset.setTransform(productEntry.position, productEntry.rotation);
|
|
12963
|
+
instance.insertElement(asset);
|
|
12780
12964
|
}
|
|
12781
12965
|
}
|
|
12782
12966
|
}
|
|
@@ -12863,8 +13047,8 @@ function createOrUpdateKitchenElements(element) {
|
|
|
12863
13047
|
if (hasSink) {
|
|
12864
13048
|
let sinkElement = counterElements[0];
|
|
12865
13049
|
let sinkProduct = getSinkProduct(element.spaceGraph);
|
|
12866
|
-
let { min, max: max2 } = sinkProduct.attributes.boundingBox;
|
|
12867
|
-
let productOffset = vec3Add(
|
|
13050
|
+
let { min: min2, max: max2 } = sinkProduct.attributes.boundingBox;
|
|
13051
|
+
let productOffset = vec3Add(min2, vec3Scale(vec3Sub(max2, min2), 0.5));
|
|
12868
13052
|
productOffset[1] = 0;
|
|
12869
13053
|
let assetPosition = vec3Add(
|
|
12870
13054
|
[sinkElementSlot * elementLength - leftHighCabinetLength, counterCabinetHeight, 0],
|
|
@@ -13647,31 +13831,31 @@ function unregisterLayout(layout, spaceGraph) {
|
|
|
13647
13831
|
}
|
|
13648
13832
|
spaceGraph.emit("spatial-structure-delete", layout);
|
|
13649
13833
|
}
|
|
13650
|
-
function registerFloor(
|
|
13651
|
-
spaceGraph.registerNode(
|
|
13652
|
-
for (let layout of
|
|
13834
|
+
function registerFloor(floor2, spaceGraph) {
|
|
13835
|
+
spaceGraph.registerNode(floor2);
|
|
13836
|
+
for (let layout of floor2.layouts) {
|
|
13653
13837
|
registerLayout(layout, spaceGraph);
|
|
13654
13838
|
}
|
|
13655
|
-
spaceGraph.emit("spatial-structure-create",
|
|
13839
|
+
spaceGraph.emit("spatial-structure-create", floor2);
|
|
13656
13840
|
}
|
|
13657
|
-
function unregisterFloor(
|
|
13658
|
-
spaceGraph.unregisterNode(
|
|
13659
|
-
for (let layout of
|
|
13841
|
+
function unregisterFloor(floor2, spaceGraph) {
|
|
13842
|
+
spaceGraph.unregisterNode(floor2);
|
|
13843
|
+
for (let layout of floor2.layouts) {
|
|
13660
13844
|
unregisterLayout(layout, spaceGraph);
|
|
13661
13845
|
}
|
|
13662
|
-
spaceGraph.emit("spatial-structure-delete",
|
|
13846
|
+
spaceGraph.emit("spatial-structure-delete", floor2);
|
|
13663
13847
|
}
|
|
13664
13848
|
function registerBuilding(building, spaceGraph) {
|
|
13665
13849
|
spaceGraph.registerNode(building);
|
|
13666
|
-
for (let
|
|
13667
|
-
registerFloor(
|
|
13850
|
+
for (let floor2 of building.floors) {
|
|
13851
|
+
registerFloor(floor2, spaceGraph);
|
|
13668
13852
|
}
|
|
13669
13853
|
spaceGraph.emit("spatial-structure-create", building);
|
|
13670
13854
|
}
|
|
13671
13855
|
function unregisterBuilding(building, spaceGraph) {
|
|
13672
13856
|
spaceGraph.unregisterNode(building);
|
|
13673
|
-
for (let
|
|
13674
|
-
unregisterFloor(
|
|
13857
|
+
for (let floor2 of building.floors) {
|
|
13858
|
+
unregisterFloor(floor2, spaceGraph);
|
|
13675
13859
|
}
|
|
13676
13860
|
spaceGraph.emit("spatial-structure-delete", building);
|
|
13677
13861
|
}
|
|
@@ -14289,16 +14473,16 @@ class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
|
|
|
14289
14473
|
}
|
|
14290
14474
|
const vertices = [];
|
|
14291
14475
|
for (const space of this.spaces) {
|
|
14292
|
-
const { min:
|
|
14293
|
-
vertices.push(
|
|
14476
|
+
const { min: min22, max: max22 } = space.getAxisAlignedBoundingBox();
|
|
14477
|
+
vertices.push(min22, max22);
|
|
14294
14478
|
}
|
|
14295
14479
|
for (const element of this.getElementList()) {
|
|
14296
|
-
const { min:
|
|
14297
|
-
vertices.push(
|
|
14480
|
+
const { min: min22, max: max22 } = element.getAxisAlignedBoundingBox();
|
|
14481
|
+
vertices.push(min22, max22);
|
|
14298
14482
|
}
|
|
14299
|
-
const { min, max: max2 } = getBoundingBox(vertices.flat());
|
|
14483
|
+
const { min: min2, max: max2 } = getBoundingBox(vertices.flat());
|
|
14300
14484
|
return {
|
|
14301
|
-
min,
|
|
14485
|
+
min: min2,
|
|
14302
14486
|
max: max2,
|
|
14303
14487
|
transform
|
|
14304
14488
|
};
|
|
@@ -14329,10 +14513,10 @@ class SpaceGraphFloor extends SpaceGraphSpatialStructureBase {
|
|
|
14329
14513
|
this.rotation = 0;
|
|
14330
14514
|
this.layouts = [];
|
|
14331
14515
|
}
|
|
14332
|
-
copyForClone(
|
|
14333
|
-
super.copyForClone(
|
|
14334
|
-
this.position = [...
|
|
14335
|
-
this.rotation =
|
|
14516
|
+
copyForClone(floor2) {
|
|
14517
|
+
super.copyForClone(floor2);
|
|
14518
|
+
this.position = [...floor2.position];
|
|
14519
|
+
this.rotation = floor2.rotation;
|
|
14336
14520
|
}
|
|
14337
14521
|
insertLayout(layout) {
|
|
14338
14522
|
if (layout.parent) {
|
|
@@ -14389,32 +14573,32 @@ class SpaceGraphBuilding extends SpaceGraphSpatialStructureBase {
|
|
|
14389
14573
|
super.copyForClone(building);
|
|
14390
14574
|
this.location = JSON.parse(JSON.stringify(building.location));
|
|
14391
14575
|
}
|
|
14392
|
-
insertFloor(
|
|
14393
|
-
if (
|
|
14394
|
-
logger$1.warn(`Floor ${
|
|
14576
|
+
insertFloor(floor2) {
|
|
14577
|
+
if (floor2.parent) {
|
|
14578
|
+
logger$1.warn(`Floor ${floor2.id} already part of building ${floor2.parent.id}.`);
|
|
14395
14579
|
return;
|
|
14396
14580
|
}
|
|
14397
|
-
|
|
14398
|
-
this.floors.push(
|
|
14581
|
+
floor2.parent = this;
|
|
14582
|
+
this.floors.push(floor2);
|
|
14399
14583
|
if (this.spaceGraph) {
|
|
14400
|
-
registerFloor(
|
|
14584
|
+
registerFloor(floor2, this.spaceGraph);
|
|
14401
14585
|
}
|
|
14402
14586
|
}
|
|
14403
|
-
removeFloor(
|
|
14404
|
-
let floorIndex = this.floors.indexOf(
|
|
14587
|
+
removeFloor(floor2) {
|
|
14588
|
+
let floorIndex = this.floors.indexOf(floor2);
|
|
14405
14589
|
if (floorIndex === -1) {
|
|
14406
|
-
logger$1.warn(`Floor ${
|
|
14590
|
+
logger$1.warn(`Floor ${floor2.id} not found.`);
|
|
14407
14591
|
return;
|
|
14408
14592
|
}
|
|
14409
14593
|
if (this.spaceGraph) {
|
|
14410
|
-
unregisterFloor(
|
|
14594
|
+
unregisterFloor(floor2, this.spaceGraph);
|
|
14411
14595
|
}
|
|
14412
|
-
|
|
14596
|
+
floor2.parent = null;
|
|
14413
14597
|
}
|
|
14414
14598
|
createFloor(id) {
|
|
14415
|
-
let
|
|
14416
|
-
this.insertFloor(
|
|
14417
|
-
return
|
|
14599
|
+
let floor2 = new SpaceGraphFloor(id);
|
|
14600
|
+
this.insertFloor(floor2);
|
|
14601
|
+
return floor2;
|
|
14418
14602
|
}
|
|
14419
14603
|
toJSON() {
|
|
14420
14604
|
let buildingJson = {
|
|
@@ -14428,8 +14612,8 @@ class SpaceGraphBuilding extends SpaceGraphSpatialStructureBase {
|
|
|
14428
14612
|
rotation: location.rotation
|
|
14429
14613
|
};
|
|
14430
14614
|
}
|
|
14431
|
-
for (let
|
|
14432
|
-
let floorJson =
|
|
14615
|
+
for (let floor2 of this.floors) {
|
|
14616
|
+
let floorJson = floor2.toJSON();
|
|
14433
14617
|
buildingJson.floors.push(floorJson);
|
|
14434
14618
|
}
|
|
14435
14619
|
return buildingJson;
|
|
@@ -14559,7 +14743,7 @@ function getProductsJson(products) {
|
|
|
14559
14743
|
function getGeometriesJson(geometries) {
|
|
14560
14744
|
let geometriesJson = [];
|
|
14561
14745
|
for (let geometry of geometries) {
|
|
14562
|
-
let geometryJson =
|
|
14746
|
+
let geometryJson = Ze(geometry);
|
|
14563
14747
|
geometriesJson.push(geometryJson);
|
|
14564
14748
|
}
|
|
14565
14749
|
return geometriesJson;
|
|
@@ -14588,8 +14772,8 @@ function getCustomAttributesJson(customAttributes) {
|
|
|
14588
14772
|
}
|
|
14589
14773
|
return customAttributesJson;
|
|
14590
14774
|
}
|
|
14591
|
-
const version = "0.
|
|
14592
|
-
const schemaVersion = version;
|
|
14775
|
+
const version$1 = "0.23.4";
|
|
14776
|
+
const schemaVersion = version$1;
|
|
14593
14777
|
class SpaceGraph {
|
|
14594
14778
|
constructor(sourceSchemaVersion) {
|
|
14595
14779
|
this.products = [];
|
|
@@ -15099,6 +15283,7 @@ function getEdgeFromEdgeJson(layout, edgeJson) {
|
|
|
15099
15283
|
return edge;
|
|
15100
15284
|
}
|
|
15101
15285
|
function getSpaceFromSpaceJson(layout, spaceJson, customAttributesById) {
|
|
15286
|
+
customAttributesById ?? (customAttributesById = layout.spaceGraph.customAttributesById);
|
|
15102
15287
|
let boundaries = getBoundariesFromBoundariesJson(layout, spaceJson.boundaries);
|
|
15103
15288
|
if (!boundaries) {
|
|
15104
15289
|
logger$1.warn(`Invalid boundaries, skipping space ${spaceJson.id}.`);
|
|
@@ -15306,6 +15491,7 @@ function getTransformElement(layout, elementJson) {
|
|
|
15306
15491
|
return element;
|
|
15307
15492
|
}
|
|
15308
15493
|
function getElementFromElementJson(layout, sourceElementJson, spaceGraph) {
|
|
15494
|
+
spaceGraph ?? (spaceGraph = layout.spaceGraph);
|
|
15309
15495
|
let elementJson = runLayoutNodeMigration(sourceElementJson, spaceGraph == null ? void 0 : spaceGraph.sourceSchemaVersion);
|
|
15310
15496
|
let element;
|
|
15311
15497
|
switch (elementJson.type) {
|
|
@@ -15499,22 +15685,22 @@ function getBuildingFromBuildingJson(spaceGraph, buildingJson) {
|
|
|
15499
15685
|
building.location = JSON.parse(JSON.stringify(building.location));
|
|
15500
15686
|
}
|
|
15501
15687
|
for (let floorJson of buildingJson.floors) {
|
|
15502
|
-
let
|
|
15503
|
-
building.insertFloor(
|
|
15688
|
+
let floor2 = getFloorFromFloorJson(spaceGraph, floorJson);
|
|
15689
|
+
building.insertFloor(floor2);
|
|
15504
15690
|
}
|
|
15505
15691
|
return building;
|
|
15506
15692
|
}
|
|
15507
15693
|
function getFloorFromFloorJson(spaceGraph, floorJson) {
|
|
15508
|
-
let
|
|
15509
|
-
loadJsonNameAndCustomId(
|
|
15510
|
-
loadJsonCustomAttributeValues(
|
|
15511
|
-
|
|
15512
|
-
|
|
15694
|
+
let floor2 = new SpaceGraphFloor(floorJson.id);
|
|
15695
|
+
loadJsonNameAndCustomId(floor2, floorJson);
|
|
15696
|
+
loadJsonCustomAttributeValues(floor2, floorJson, spaceGraph.customAttributesById);
|
|
15697
|
+
floor2.position = [...floorJson.position];
|
|
15698
|
+
floor2.rotation = floorJson.rotation;
|
|
15513
15699
|
for (let layoutJson of floorJson.layouts) {
|
|
15514
15700
|
let layout = getLayout(spaceGraph, layoutJson);
|
|
15515
|
-
|
|
15701
|
+
floor2.insertLayout(layout);
|
|
15516
15702
|
}
|
|
15517
|
-
return
|
|
15703
|
+
return floor2;
|
|
15518
15704
|
}
|
|
15519
15705
|
function getCustomAttributeFromCustomAttributeJson(customAttributeDefinitionJson) {
|
|
15520
15706
|
const customAttributeId = getCustomAttributeResourceTypeCompoundId(customAttributeDefinitionJson);
|
|
@@ -16272,55 +16458,74 @@ function sortAndAlignEdges(edges) {
|
|
|
16272
16458
|
let startIndex = ((_a = Object.entries(vertexToEdgeKeys).find(([, edges2]) => edges2.length === 1)) == null ? void 0 : _a[0]) || Object.keys(vertexToEdgeKeys)[0];
|
|
16273
16459
|
const result = [];
|
|
16274
16460
|
const used = /* @__PURE__ */ new Set();
|
|
16275
|
-
|
|
16461
|
+
const unusedEdges = new Set(edges);
|
|
16462
|
+
let currentVertex = Number.parseInt(startIndex);
|
|
16276
16463
|
let currentEdge = vertexToEdgeKeys[currentVertex][0];
|
|
16277
16464
|
while (result.length < edges.length) {
|
|
16278
16465
|
if (used.has(currentEdge)) {
|
|
16279
|
-
|
|
16280
|
-
if (!
|
|
16466
|
+
const nextUnused = unusedEdges.values().next().value;
|
|
16467
|
+
if (!nextUnused) break;
|
|
16468
|
+
currentEdge = nextUnused;
|
|
16281
16469
|
currentVertex = currentEdge.indices[0];
|
|
16282
16470
|
continue;
|
|
16283
16471
|
}
|
|
16284
16472
|
const reverse = currentEdge.indices[0] !== currentVertex;
|
|
16285
16473
|
result.push({ edge: currentEdge, reverse });
|
|
16286
16474
|
used.add(currentEdge);
|
|
16475
|
+
unusedEdges.delete(currentEdge);
|
|
16287
16476
|
const nextVertex = reverse ? currentEdge.indices[0] : currentEdge.indices[1];
|
|
16288
16477
|
const nextEdge = vertexToEdgeKeys[nextVertex].find((e2) => !used.has(e2));
|
|
16289
16478
|
if (nextEdge) {
|
|
16290
16479
|
currentVertex = nextVertex;
|
|
16291
16480
|
currentEdge = nextEdge;
|
|
16292
16481
|
} else {
|
|
16293
|
-
|
|
16294
|
-
if (!
|
|
16482
|
+
const nextUnused = unusedEdges.values().next().value;
|
|
16483
|
+
if (!nextUnused) break;
|
|
16484
|
+
currentEdge = nextUnused;
|
|
16295
16485
|
currentVertex = currentEdge.indices[0];
|
|
16296
16486
|
}
|
|
16297
16487
|
}
|
|
16298
16488
|
return result;
|
|
16299
16489
|
}
|
|
16300
16490
|
function mergeGraphEdgeProfiles(graphEdges) {
|
|
16301
|
-
|
|
16491
|
+
if (graphEdges.length === 1) {
|
|
16492
|
+
const computed2 = graphEdges[0].geometry.computed;
|
|
16493
|
+
return {
|
|
16494
|
+
valid: computed2.valid,
|
|
16495
|
+
skipped: computed2.skipped,
|
|
16496
|
+
selfIntersecting: computed2.selfIntersecting,
|
|
16497
|
+
sidePoints1: computed2.sidePoints1.slice(),
|
|
16498
|
+
sidePoints2: computed2.sidePoints2.slice(),
|
|
16499
|
+
joinPoints1: computed2.joinPoints1.slice(),
|
|
16500
|
+
joinPoints2: computed2.joinPoints2.slice(),
|
|
16501
|
+
points: computed2.points.slice()
|
|
16502
|
+
};
|
|
16503
|
+
}
|
|
16302
16504
|
const sortedEdges = sortAndAlignEdges(graphEdges);
|
|
16303
16505
|
const computed = graphEdges[0].geometry.computed;
|
|
16304
16506
|
let valid = computed.valid;
|
|
16305
16507
|
const firstEdgeReverse = sortedEdges[0].reverse;
|
|
16306
16508
|
const firstEdgeComputed = sortedEdges[0].edge.geometry.computed;
|
|
16307
|
-
const lastEdgeReverse = sortedEdges
|
|
16308
|
-
const lastEdgeComputed = sortedEdges
|
|
16509
|
+
const lastEdgeReverse = sortedEdges.at(-1).reverse;
|
|
16510
|
+
const lastEdgeComputed = sortedEdges.at(-1).edge.geometry.computed;
|
|
16309
16511
|
const joinPoints1 = firstEdgeReverse ? firstEdgeComputed.joinPoints2 : firstEdgeComputed.joinPoints1;
|
|
16310
16512
|
const joinPoints2 = lastEdgeReverse ? lastEdgeComputed.joinPoints1 : lastEdgeComputed.joinPoints2;
|
|
16311
|
-
const
|
|
16312
|
-
const
|
|
16513
|
+
const sidePoints1Parts = [];
|
|
16514
|
+
const sidePoints2Parts = [];
|
|
16313
16515
|
for (const { edge, reverse } of sortedEdges) {
|
|
16314
16516
|
const { computed: computed2 } = edge.geometry;
|
|
16315
16517
|
if (reverse) {
|
|
16316
|
-
|
|
16317
|
-
|
|
16518
|
+
sidePoints1Parts.unshift(computed2.sidePoints2);
|
|
16519
|
+
sidePoints2Parts.push(computed2.sidePoints1);
|
|
16318
16520
|
} else {
|
|
16319
|
-
|
|
16320
|
-
|
|
16521
|
+
sidePoints1Parts.unshift(computed2.sidePoints1);
|
|
16522
|
+
sidePoints2Parts.push(computed2.sidePoints2);
|
|
16321
16523
|
}
|
|
16322
16524
|
}
|
|
16323
|
-
const
|
|
16525
|
+
const sidePoints1 = [].concat(...sidePoints1Parts);
|
|
16526
|
+
const sidePoints2 = [].concat(...sidePoints2Parts);
|
|
16527
|
+
const polygonPoints = graphEdges.map((edge) => edge.geometry.computed.points);
|
|
16528
|
+
const union = polygonUnion(polygonPoints);
|
|
16324
16529
|
let points = [];
|
|
16325
16530
|
if (union.length === 1) {
|
|
16326
16531
|
points = union[0];
|
|
@@ -16338,8 +16543,8 @@ function mergeGraphEdgeProfiles(graphEdges) {
|
|
|
16338
16543
|
valid,
|
|
16339
16544
|
skipped: computed.skipped,
|
|
16340
16545
|
selfIntersecting: computed.selfIntersecting,
|
|
16341
|
-
sidePoints1
|
|
16342
|
-
sidePoints2
|
|
16546
|
+
sidePoints1,
|
|
16547
|
+
sidePoints2,
|
|
16343
16548
|
joinPoints1: joinPoints1.slice(),
|
|
16344
16549
|
joinPoints2: joinPoints2.slice(),
|
|
16345
16550
|
points
|
|
@@ -16447,7 +16652,7 @@ function defaultGetStore() {
|
|
|
16447
16652
|
}
|
|
16448
16653
|
return defaultGetStoreFunc;
|
|
16449
16654
|
}
|
|
16450
|
-
function get(key, customStore = defaultGetStore()) {
|
|
16655
|
+
function get$1(key, customStore = defaultGetStore()) {
|
|
16451
16656
|
return customStore("readonly", (store2) => promisifyRequest(store2.get(key)));
|
|
16452
16657
|
}
|
|
16453
16658
|
function set(key, value, customStore = defaultGetStore()) {
|
|
@@ -17356,22 +17561,22 @@ function Te(e2, t2 = create$4(), i2 = /* @__PURE__ */ new Map(), n2 = true) {
|
|
|
17356
17561
|
let E3 = [];
|
|
17357
17562
|
if (s2.type === "geometry:uri" && s2.format === "data3d") {
|
|
17358
17563
|
let y2 = i2.get(s2.uri), d2 = (y2 == null ? void 0 : y2.meshGeometries) || {};
|
|
17359
|
-
for (let
|
|
17360
|
-
let A2 = d2[
|
|
17564
|
+
for (let g2 in d2) {
|
|
17565
|
+
let A2 = d2[g2];
|
|
17361
17566
|
E3.push(...resolveGeometry(A2, l2.geometriesById, l2.materialsById, []));
|
|
17362
17567
|
}
|
|
17363
17568
|
} else
|
|
17364
17569
|
E3 = resolveGeometry(s2, l2.geometriesById, l2.materialsById, []);
|
|
17365
|
-
let h2 = create$1(),
|
|
17366
|
-
getRotation(h2, m2), getTranslation(
|
|
17570
|
+
let h2 = create$1(), R2 = create$3();
|
|
17571
|
+
getRotation(h2, m2), getTranslation(R2, m2);
|
|
17367
17572
|
for (let y2 of E3)
|
|
17368
17573
|
applyTransformMatrix(y2.vertices, m2);
|
|
17369
|
-
r2.push({ meshes: E3, rotation: h2, position:
|
|
17574
|
+
r2.push({ meshes: E3, rotation: h2, position: R2 });
|
|
17370
17575
|
}
|
|
17371
17576
|
}
|
|
17372
17577
|
return r2;
|
|
17373
17578
|
}
|
|
17374
|
-
function
|
|
17579
|
+
function _n(e2, t2, i2) {
|
|
17375
17580
|
let n2 = fromValues(...e2), r2 = fromValues(...t2), l2 = fromValues(...i2), o2 = create$3(), s2 = create$3(), a2 = create$3();
|
|
17376
17581
|
return subtract(o2, n2, l2), subtract(s2, r2, l2), cross(a2, o2, s2), normalize$2(a2, a2), [...a2];
|
|
17377
17582
|
}
|
|
@@ -17383,7 +17588,7 @@ function mt(e2) {
|
|
|
17383
17588
|
}
|
|
17384
17589
|
for (let c2 = 0; c2 < t2.length; c2 += 3) {
|
|
17385
17590
|
let u2 = t2[c2], m2 = t2[c2 + 1], E3 = t2[c2 + 2];
|
|
17386
|
-
|
|
17591
|
+
_n(n2[u2], n2[m2], n2[E3])[1] < 0.01 || l2.push([r2[u2], r2[m2], r2[E3]]);
|
|
17387
17592
|
}
|
|
17388
17593
|
let s2 = [], a2 = [[]];
|
|
17389
17594
|
if (!l2.length)
|
|
@@ -17394,7 +17599,7 @@ function mt(e2) {
|
|
|
17394
17599
|
isCounterClockwise(c2) ? a2[0].push(c2) : s2.push(c2);
|
|
17395
17600
|
return { outlines: s2, holes: a2, boundingBox: o2 };
|
|
17396
17601
|
}
|
|
17397
|
-
function
|
|
17602
|
+
function lr(e2, t2 = {}) {
|
|
17398
17603
|
let i2 = t2.applyElementMatrix ? getElementMatrix(e2, t2.parentMatrix) : void 0, n2 = Te(e2, i2, t2.resources), r2 = [];
|
|
17399
17604
|
for (let l2 of n2)
|
|
17400
17605
|
for (let o2 of l2.meshes)
|
|
@@ -17405,13 +17610,6 @@ const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0
|
|
|
17405
17610
|
function validate(uuid) {
|
|
17406
17611
|
return typeof uuid === "string" && REGEX.test(uuid);
|
|
17407
17612
|
}
|
|
17408
|
-
const categories = [
|
|
17409
|
-
"lightIndustrial",
|
|
17410
|
-
"office",
|
|
17411
|
-
"parking",
|
|
17412
|
-
"residential",
|
|
17413
|
-
"laboratory"
|
|
17414
|
-
];
|
|
17415
17613
|
const programs = {
|
|
17416
17614
|
care: [
|
|
17417
17615
|
{
|
|
@@ -17901,14 +18099,10 @@ const programs = {
|
|
|
17901
18099
|
]
|
|
17902
18100
|
};
|
|
17903
18101
|
const spaceTaxonomyJson = {
|
|
17904
|
-
categories,
|
|
17905
18102
|
programs
|
|
17906
18103
|
};
|
|
17907
18104
|
const spaceTaxonomy = spaceTaxonomyJson;
|
|
17908
18105
|
const brandColors = {
|
|
17909
|
-
// primary pallette
|
|
17910
|
-
medium_blue: "#1414c1",
|
|
17911
|
-
navy: "#172c4d",
|
|
17912
18106
|
white: "#ffffff",
|
|
17913
18107
|
// dark neutrals
|
|
17914
18108
|
new_york: "#0c1829",
|
|
@@ -17925,21 +18119,9 @@ const brandColors = {
|
|
|
17925
18119
|
// functional
|
|
17926
18120
|
zurich: "#bdd7ff",
|
|
17927
18121
|
blue_ribbon: "#3355ff",
|
|
17928
|
-
dark_blue: "#000099",
|
|
17929
18122
|
zurich_48: "#dfecff",
|
|
17930
18123
|
// should actually be #bdd7ff (zurich) with .48 opacity
|
|
17931
|
-
error: "#ab220a"
|
|
17932
|
-
warning: "#ffc400",
|
|
17933
|
-
// accents
|
|
17934
|
-
san_fran: "#54c072",
|
|
17935
|
-
orange: "#ffab00",
|
|
17936
|
-
purple: "#6700ab",
|
|
17937
|
-
fandango: "#c40096",
|
|
17938
|
-
dodger: "#007aff",
|
|
17939
|
-
flamingo: "#ef5533",
|
|
17940
|
-
aqua: "#00b5ce",
|
|
17941
|
-
palegreen: "#ffeae6",
|
|
17942
|
-
palered: "#e6ffed"
|
|
18124
|
+
error: "#ab220a"
|
|
17943
18125
|
};
|
|
17944
18126
|
const defaultConfig = {
|
|
17945
18127
|
api: {
|
|
@@ -17992,8 +18174,9 @@ const setApiUrls = ({
|
|
|
17992
18174
|
if (typeof newApiProductDataPath === "string") apiProductDataPath = newApiProductDataPath;
|
|
17993
18175
|
if (typeof spaceApiUrl2 === "string") setSpaceApiUrl(spaceApiUrl2);
|
|
17994
18176
|
};
|
|
18177
|
+
const version = "5.1.13";
|
|
17995
18178
|
const defaultLevels = ["info", "warnings", "errors"];
|
|
17996
|
-
let logger = new
|
|
18179
|
+
let logger = new ft(defaultLevels);
|
|
17997
18180
|
function loadAssetResources(loader, node) {
|
|
17998
18181
|
var _a;
|
|
17999
18182
|
let uriGeometry;
|
|
@@ -18071,7 +18254,7 @@ async function loadFromStore(key, maxAge) {
|
|
|
18071
18254
|
let data;
|
|
18072
18255
|
try {
|
|
18073
18256
|
if (useIndexedDb) {
|
|
18074
|
-
data = await get(key, localStore);
|
|
18257
|
+
data = await get$1(key, localStore);
|
|
18075
18258
|
}
|
|
18076
18259
|
const age = requestTime - data.timeStamp;
|
|
18077
18260
|
const maxAge2 = Math.min(data.maxAge, MAX_AGE);
|
|
@@ -18331,7 +18514,7 @@ function getWallContours(layout) {
|
|
|
18331
18514
|
}
|
|
18332
18515
|
const _FloorPlanCore = class _FloorPlanCore2 {
|
|
18333
18516
|
constructor({ options = {} } = {}) {
|
|
18334
|
-
this.settings =
|
|
18517
|
+
this.settings = Ze(defaultConfig);
|
|
18335
18518
|
this.fpeId = "fpe-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 3);
|
|
18336
18519
|
this.computed = {
|
|
18337
18520
|
wallContours: [],
|
|
@@ -18421,13 +18604,13 @@ const _FloorPlanCore = class _FloorPlanCore2 {
|
|
|
18421
18604
|
this.loader.once("assets-loaded", resolve2);
|
|
18422
18605
|
const floorData = await spaceApi.getFloorById(floorId, false, false, true);
|
|
18423
18606
|
const address = (_a = floorData.properties) == null ? void 0 : _a.address;
|
|
18424
|
-
if (
|
|
18607
|
+
if (Oe(address == null ? void 0 : address.latitude)) {
|
|
18425
18608
|
this.location.latitude = address.latitude;
|
|
18426
18609
|
}
|
|
18427
|
-
if (
|
|
18610
|
+
if (Ie(address == null ? void 0 : address.longitude)) {
|
|
18428
18611
|
this.location.longitude = address.longitude;
|
|
18429
18612
|
}
|
|
18430
|
-
if (
|
|
18613
|
+
if (_e(address == null ? void 0 : address.bearing)) {
|
|
18431
18614
|
this.location.bearing = address.bearing;
|
|
18432
18615
|
}
|
|
18433
18616
|
if (!((_b = floorData.layout) == null ? void 0 : _b.layout)) {
|
|
@@ -18447,10 +18630,10 @@ const _FloorPlanCore = class _FloorPlanCore2 {
|
|
|
18447
18630
|
* Change options after the floor plan engine instance has been created
|
|
18448
18631
|
*/
|
|
18449
18632
|
set(args = {}) {
|
|
18450
|
-
var _a, _b, _c, _d,
|
|
18633
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i;
|
|
18451
18634
|
const assetsAreHidden = (_a = this.settings.hideElements) == null ? void 0 : _a.includes("element:asset");
|
|
18452
|
-
let newSettings =
|
|
18453
|
-
if (newSettings.theme) newSettings.theme =
|
|
18635
|
+
let newSettings = Ze(args);
|
|
18636
|
+
if (newSettings.theme) newSettings.theme = ue(defaultConfig.theme, newSettings.theme);
|
|
18454
18637
|
if (newSettings.ui) newSettings.ui = { ...defaultConfig.ui, ...newSettings.ui };
|
|
18455
18638
|
if (newSettings.api) newSettings.api = { ...defaultConfig.api, ...newSettings.api };
|
|
18456
18639
|
if (newSettings.units) newSettings.units = { ...defaultConfig.units, ...newSettings.units };
|
|
@@ -18458,7 +18641,7 @@ const _FloorPlanCore = class _FloorPlanCore2 {
|
|
|
18458
18641
|
for (let key in newSettings) {
|
|
18459
18642
|
this.settings[key] = newSettings[key];
|
|
18460
18643
|
}
|
|
18461
|
-
if ((
|
|
18644
|
+
if ((_e2 = (_d = (_c = this.settings.theme) == null ? void 0 : _c.elements) == null ? void 0 : _d["layout:space"]) == null ? void 0 : _e2.program) {
|
|
18462
18645
|
const programTheme = this.settings.theme.elements["layout:space"].program;
|
|
18463
18646
|
const programMapping = {
|
|
18464
18647
|
wash: "care",
|
|
@@ -18527,7 +18710,7 @@ const _FloorPlanCore = class _FloorPlanCore2 {
|
|
|
18527
18710
|
delete this.utils;
|
|
18528
18711
|
}
|
|
18529
18712
|
};
|
|
18530
|
-
_FloorPlanCore.version =
|
|
18713
|
+
_FloorPlanCore.version = version;
|
|
18531
18714
|
let FloorPlanCore = _FloorPlanCore;
|
|
18532
18715
|
function getDoorAnnotations(node) {
|
|
18533
18716
|
let {
|
|
@@ -18548,7 +18731,7 @@ function getDoorAnnotations(node) {
|
|
|
18548
18731
|
let adjacent = 0;
|
|
18549
18732
|
if (doorAngle < 5 && doorAngle > -5) {
|
|
18550
18733
|
doorAngle = 20;
|
|
18551
|
-
const doorAngleRad =
|
|
18734
|
+
const doorAngleRad = Ee(doorAngle);
|
|
18552
18735
|
opposite = Math.sin(doorAngleRad);
|
|
18553
18736
|
adjacent = Math.cos(doorAngleRad);
|
|
18554
18737
|
needLine = true;
|
|
@@ -18655,7 +18838,7 @@ function getElementAnnotations(element) {
|
|
|
18655
18838
|
return shapes;
|
|
18656
18839
|
}
|
|
18657
18840
|
function getShapesFromMesh(element) {
|
|
18658
|
-
const meshContours =
|
|
18841
|
+
const meshContours = lr(element).sort((a2, b2) => {
|
|
18659
18842
|
if (a2.boundingBox.max[1] < b2.boundingBox.max[1]) return -1;
|
|
18660
18843
|
else return 1;
|
|
18661
18844
|
});
|
|
@@ -18722,9 +18905,9 @@ function getEdgeShapes(edge, style = {}) {
|
|
|
18722
18905
|
return shapes;
|
|
18723
18906
|
}
|
|
18724
18907
|
function fitBoundingBox(sourceBoundingBox, targetLength, targetWidth) {
|
|
18725
|
-
const { min, max: max2 } = sourceBoundingBox;
|
|
18726
|
-
let x2 =
|
|
18727
|
-
let z2 =
|
|
18908
|
+
const { min: min2, max: max2 } = sourceBoundingBox;
|
|
18909
|
+
let x2 = min2[0];
|
|
18910
|
+
let z2 = min2[1];
|
|
18728
18911
|
let x22 = max2[0];
|
|
18729
18912
|
let z22 = max2[1];
|
|
18730
18913
|
let length2 = x22 - x2;
|
|
@@ -18769,7 +18952,7 @@ function getRoomStampContent(space, settings2) {
|
|
|
18769
18952
|
let areaStr;
|
|
18770
18953
|
switch (settings2.units.roomDimensions) {
|
|
18771
18954
|
case "area":
|
|
18772
|
-
areaStr =
|
|
18955
|
+
areaStr = Ue(area2, settings2.units.system, settings2.units.areaDecimals);
|
|
18773
18956
|
break;
|
|
18774
18957
|
case "boundingBox":
|
|
18775
18958
|
default:
|
|
@@ -18777,7 +18960,7 @@ function getRoomStampContent(space, settings2) {
|
|
|
18777
18960
|
break;
|
|
18778
18961
|
}
|
|
18779
18962
|
let usageDisplay = "";
|
|
18780
|
-
if (!usageDisplay && usage !== "undefined") usageDisplay =
|
|
18963
|
+
if (!usageDisplay && usage !== "undefined") usageDisplay = Ge(usage || "");
|
|
18781
18964
|
if (usageMapping !== void 0) {
|
|
18782
18965
|
if (typeof usageMapping !== "string") logger.warn("space label mapping has to be a string");
|
|
18783
18966
|
else if (usageMapping.length > 50)
|
|
@@ -19047,7 +19230,7 @@ const getThemeStyle = ({
|
|
|
19047
19230
|
element,
|
|
19048
19231
|
elementType
|
|
19049
19232
|
}) => {
|
|
19050
|
-
var _a, _b, _c, _d,
|
|
19233
|
+
var _a, _b, _c, _d, _e2, _f;
|
|
19051
19234
|
const themeStyles = (_a = settings2 == null ? void 0 : settings2.theme) == null ? void 0 : _a.elements;
|
|
19052
19235
|
if (!themeStyles) return {};
|
|
19053
19236
|
let elementTheme = ((_b = themeStyles.byId) == null ? void 0 : _b[element == null ? void 0 : element.id]) || themeStyles[elementType] || themeStyles[element == null ? void 0 : element.type] || null;
|
|
@@ -19061,7 +19244,7 @@ const getThemeStyle = ({
|
|
|
19061
19244
|
elementTheme = spaceTheme.program[spaceProgram];
|
|
19062
19245
|
}
|
|
19063
19246
|
} else if (element.type === "element:stairs" && !elementTheme) {
|
|
19064
|
-
if ((
|
|
19247
|
+
if ((_e2 = spaceTheme == null ? void 0 : spaceTheme.usage) == null ? void 0 : _e2.staircase) {
|
|
19065
19248
|
elementTheme = spaceTheme.usage.staircase;
|
|
19066
19249
|
} else if ((_f = spaceTheme == null ? void 0 : spaceTheme.program) == null ? void 0 : _f.circulate) {
|
|
19067
19250
|
elementTheme = spaceTheme.program.circulate;
|
|
@@ -19517,10 +19700,10 @@ var eventemitter3 = { exports: {} };
|
|
|
19517
19700
|
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
19518
19701
|
if (!handlers) return [];
|
|
19519
19702
|
if (handlers.fn) return [handlers.fn];
|
|
19520
|
-
for (var i2 = 0, l2 = handlers.length,
|
|
19521
|
-
|
|
19703
|
+
for (var i2 = 0, l2 = handlers.length, ee = new Array(l2); i2 < l2; i2++) {
|
|
19704
|
+
ee[i2] = handlers[i2].fn;
|
|
19522
19705
|
}
|
|
19523
|
-
return
|
|
19706
|
+
return ee;
|
|
19524
19707
|
};
|
|
19525
19708
|
EventEmitter2.prototype.listenerCount = function listenerCount(event) {
|
|
19526
19709
|
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
@@ -19644,7 +19827,7 @@ punycode$1.exports;
|
|
|
19644
19827
|
"overflow": "Overflow: input needs wider integers to process",
|
|
19645
19828
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
19646
19829
|
"invalid-input": "Invalid input"
|
|
19647
|
-
}, baseMinusTMin = base - tMin,
|
|
19830
|
+
}, baseMinusTMin = base - tMin, floor2 = Math.floor, stringFromCharCode = String.fromCharCode, key;
|
|
19648
19831
|
function error(type2) {
|
|
19649
19832
|
throw new RangeError(errors[type2]);
|
|
19650
19833
|
}
|
|
@@ -19715,12 +19898,12 @@ punycode$1.exports;
|
|
|
19715
19898
|
}
|
|
19716
19899
|
function adapt(delta, numPoints, firstTime) {
|
|
19717
19900
|
var k3 = 0;
|
|
19718
|
-
delta = firstTime ?
|
|
19719
|
-
delta +=
|
|
19901
|
+
delta = firstTime ? floor2(delta / damp) : delta >> 1;
|
|
19902
|
+
delta += floor2(delta / numPoints);
|
|
19720
19903
|
for (; delta > baseMinusTMin * tMax >> 1; k3 += base) {
|
|
19721
|
-
delta =
|
|
19904
|
+
delta = floor2(delta / baseMinusTMin);
|
|
19722
19905
|
}
|
|
19723
|
-
return
|
|
19906
|
+
return floor2(k3 + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
19724
19907
|
}
|
|
19725
19908
|
function decode2(input) {
|
|
19726
19909
|
var output = [], inputLength = input.length, out, i2 = 0, n2 = initialN, bias = initialBias, basic, j2, index, oldi, w2, k3, digit, t2, baseMinusT;
|
|
@@ -19740,7 +19923,7 @@ punycode$1.exports;
|
|
|
19740
19923
|
error("invalid-input");
|
|
19741
19924
|
}
|
|
19742
19925
|
digit = basicToDigit(input.charCodeAt(index++));
|
|
19743
|
-
if (digit >= base || digit >
|
|
19926
|
+
if (digit >= base || digit > floor2((maxInt - i2) / w2)) {
|
|
19744
19927
|
error("overflow");
|
|
19745
19928
|
}
|
|
19746
19929
|
i2 += digit * w2;
|
|
@@ -19749,17 +19932,17 @@ punycode$1.exports;
|
|
|
19749
19932
|
break;
|
|
19750
19933
|
}
|
|
19751
19934
|
baseMinusT = base - t2;
|
|
19752
|
-
if (w2 >
|
|
19935
|
+
if (w2 > floor2(maxInt / baseMinusT)) {
|
|
19753
19936
|
error("overflow");
|
|
19754
19937
|
}
|
|
19755
19938
|
w2 *= baseMinusT;
|
|
19756
19939
|
}
|
|
19757
19940
|
out = output.length + 1;
|
|
19758
19941
|
bias = adapt(i2 - oldi, out, oldi == 0);
|
|
19759
|
-
if (
|
|
19942
|
+
if (floor2(i2 / out) > maxInt - n2) {
|
|
19760
19943
|
error("overflow");
|
|
19761
19944
|
}
|
|
19762
|
-
n2 +=
|
|
19945
|
+
n2 += floor2(i2 / out);
|
|
19763
19946
|
i2 %= out;
|
|
19764
19947
|
output.splice(i2++, 0, n2);
|
|
19765
19948
|
}
|
|
@@ -19790,7 +19973,7 @@ punycode$1.exports;
|
|
|
19790
19973
|
}
|
|
19791
19974
|
}
|
|
19792
19975
|
handledCPCountPlusOne = handledCPCount + 1;
|
|
19793
|
-
if (m2 - n2 >
|
|
19976
|
+
if (m2 - n2 > floor2((maxInt - delta) / handledCPCountPlusOne)) {
|
|
19794
19977
|
error("overflow");
|
|
19795
19978
|
}
|
|
19796
19979
|
delta += (m2 - n2) * handledCPCountPlusOne;
|
|
@@ -19811,7 +19994,7 @@ punycode$1.exports;
|
|
|
19811
19994
|
output.push(
|
|
19812
19995
|
stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0))
|
|
19813
19996
|
);
|
|
19814
|
-
q2 =
|
|
19997
|
+
q2 = floor2(qMinusT / baseMinusT);
|
|
19815
19998
|
}
|
|
19816
19999
|
output.push(stringFromCharCode(digitToBasic(q2, 0)));
|
|
19817
20000
|
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
@@ -19871,635 +20054,7 @@ punycode$1.exports;
|
|
|
19871
20054
|
})(commonjsGlobal);
|
|
19872
20055
|
})(punycode$1, punycode$1.exports);
|
|
19873
20056
|
var punycodeExports = punycode$1.exports;
|
|
19874
|
-
var esErrors = Error;
|
|
19875
|
-
var _eval = EvalError;
|
|
19876
|
-
var range = RangeError;
|
|
19877
|
-
var ref = ReferenceError;
|
|
19878
|
-
var syntax = SyntaxError;
|
|
19879
20057
|
var type = TypeError;
|
|
19880
|
-
var uri = URIError;
|
|
19881
|
-
var shams = function hasSymbols() {
|
|
19882
|
-
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
19883
|
-
return false;
|
|
19884
|
-
}
|
|
19885
|
-
if (typeof Symbol.iterator === "symbol") {
|
|
19886
|
-
return true;
|
|
19887
|
-
}
|
|
19888
|
-
var obj = {};
|
|
19889
|
-
var sym = Symbol("test");
|
|
19890
|
-
var symObj = Object(sym);
|
|
19891
|
-
if (typeof sym === "string") {
|
|
19892
|
-
return false;
|
|
19893
|
-
}
|
|
19894
|
-
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
19895
|
-
return false;
|
|
19896
|
-
}
|
|
19897
|
-
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
19898
|
-
return false;
|
|
19899
|
-
}
|
|
19900
|
-
var symVal = 42;
|
|
19901
|
-
obj[sym] = symVal;
|
|
19902
|
-
for (sym in obj) {
|
|
19903
|
-
return false;
|
|
19904
|
-
}
|
|
19905
|
-
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
19906
|
-
return false;
|
|
19907
|
-
}
|
|
19908
|
-
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
19909
|
-
return false;
|
|
19910
|
-
}
|
|
19911
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
19912
|
-
if (syms.length !== 1 || syms[0] !== sym) {
|
|
19913
|
-
return false;
|
|
19914
|
-
}
|
|
19915
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
19916
|
-
return false;
|
|
19917
|
-
}
|
|
19918
|
-
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
19919
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
19920
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
19921
|
-
return false;
|
|
19922
|
-
}
|
|
19923
|
-
}
|
|
19924
|
-
return true;
|
|
19925
|
-
};
|
|
19926
|
-
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
19927
|
-
var hasSymbolSham = shams;
|
|
19928
|
-
var hasSymbols$1 = function hasNativeSymbols() {
|
|
19929
|
-
if (typeof origSymbol !== "function") {
|
|
19930
|
-
return false;
|
|
19931
|
-
}
|
|
19932
|
-
if (typeof Symbol !== "function") {
|
|
19933
|
-
return false;
|
|
19934
|
-
}
|
|
19935
|
-
if (typeof origSymbol("foo") !== "symbol") {
|
|
19936
|
-
return false;
|
|
19937
|
-
}
|
|
19938
|
-
if (typeof Symbol("bar") !== "symbol") {
|
|
19939
|
-
return false;
|
|
19940
|
-
}
|
|
19941
|
-
return hasSymbolSham();
|
|
19942
|
-
};
|
|
19943
|
-
var test = {
|
|
19944
|
-
__proto__: null,
|
|
19945
|
-
foo: {}
|
|
19946
|
-
};
|
|
19947
|
-
var $Object = Object;
|
|
19948
|
-
var hasProto$1 = function hasProto() {
|
|
19949
|
-
return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
|
|
19950
|
-
};
|
|
19951
|
-
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
19952
|
-
var toStr$1 = Object.prototype.toString;
|
|
19953
|
-
var max = Math.max;
|
|
19954
|
-
var funcType = "[object Function]";
|
|
19955
|
-
var concatty = function concatty2(a2, b2) {
|
|
19956
|
-
var arr = [];
|
|
19957
|
-
for (var i2 = 0; i2 < a2.length; i2 += 1) {
|
|
19958
|
-
arr[i2] = a2[i2];
|
|
19959
|
-
}
|
|
19960
|
-
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
19961
|
-
arr[j2 + a2.length] = b2[j2];
|
|
19962
|
-
}
|
|
19963
|
-
return arr;
|
|
19964
|
-
};
|
|
19965
|
-
var slicy = function slicy2(arrLike, offset) {
|
|
19966
|
-
var arr = [];
|
|
19967
|
-
for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
19968
|
-
arr[j2] = arrLike[i2];
|
|
19969
|
-
}
|
|
19970
|
-
return arr;
|
|
19971
|
-
};
|
|
19972
|
-
var joiny = function(arr, joiner) {
|
|
19973
|
-
var str = "";
|
|
19974
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
19975
|
-
str += arr[i2];
|
|
19976
|
-
if (i2 + 1 < arr.length) {
|
|
19977
|
-
str += joiner;
|
|
19978
|
-
}
|
|
19979
|
-
}
|
|
19980
|
-
return str;
|
|
19981
|
-
};
|
|
19982
|
-
var implementation$1 = function bind(that) {
|
|
19983
|
-
var target = this;
|
|
19984
|
-
if (typeof target !== "function" || toStr$1.apply(target) !== funcType) {
|
|
19985
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
19986
|
-
}
|
|
19987
|
-
var args = slicy(arguments, 1);
|
|
19988
|
-
var bound;
|
|
19989
|
-
var binder = function() {
|
|
19990
|
-
if (this instanceof bound) {
|
|
19991
|
-
var result = target.apply(
|
|
19992
|
-
this,
|
|
19993
|
-
concatty(args, arguments)
|
|
19994
|
-
);
|
|
19995
|
-
if (Object(result) === result) {
|
|
19996
|
-
return result;
|
|
19997
|
-
}
|
|
19998
|
-
return this;
|
|
19999
|
-
}
|
|
20000
|
-
return target.apply(
|
|
20001
|
-
that,
|
|
20002
|
-
concatty(args, arguments)
|
|
20003
|
-
);
|
|
20004
|
-
};
|
|
20005
|
-
var boundLength = max(0, target.length - args.length);
|
|
20006
|
-
var boundArgs = [];
|
|
20007
|
-
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
20008
|
-
boundArgs[i2] = "$" + i2;
|
|
20009
|
-
}
|
|
20010
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
20011
|
-
if (target.prototype) {
|
|
20012
|
-
var Empty = function Empty2() {
|
|
20013
|
-
};
|
|
20014
|
-
Empty.prototype = target.prototype;
|
|
20015
|
-
bound.prototype = new Empty();
|
|
20016
|
-
Empty.prototype = null;
|
|
20017
|
-
}
|
|
20018
|
-
return bound;
|
|
20019
|
-
};
|
|
20020
|
-
var implementation = implementation$1;
|
|
20021
|
-
var functionBind = Function.prototype.bind || implementation;
|
|
20022
|
-
var call = Function.prototype.call;
|
|
20023
|
-
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
20024
|
-
var bind$1 = functionBind;
|
|
20025
|
-
var hasown = bind$1.call(call, $hasOwn);
|
|
20026
|
-
var undefined$1;
|
|
20027
|
-
var $Error = esErrors;
|
|
20028
|
-
var $EvalError = _eval;
|
|
20029
|
-
var $RangeError = range;
|
|
20030
|
-
var $ReferenceError = ref;
|
|
20031
|
-
var $SyntaxError$1 = syntax;
|
|
20032
|
-
var $TypeError$3 = type;
|
|
20033
|
-
var $URIError = uri;
|
|
20034
|
-
var $Function = Function;
|
|
20035
|
-
var getEvalledConstructor = function(expressionSyntax) {
|
|
20036
|
-
try {
|
|
20037
|
-
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
20038
|
-
} catch (e2) {
|
|
20039
|
-
}
|
|
20040
|
-
};
|
|
20041
|
-
var $gOPD$1 = Object.getOwnPropertyDescriptor;
|
|
20042
|
-
if ($gOPD$1) {
|
|
20043
|
-
try {
|
|
20044
|
-
$gOPD$1({}, "");
|
|
20045
|
-
} catch (e2) {
|
|
20046
|
-
$gOPD$1 = null;
|
|
20047
|
-
}
|
|
20048
|
-
}
|
|
20049
|
-
var throwTypeError = function() {
|
|
20050
|
-
throw new $TypeError$3();
|
|
20051
|
-
};
|
|
20052
|
-
var ThrowTypeError = $gOPD$1 ? function() {
|
|
20053
|
-
try {
|
|
20054
|
-
arguments.callee;
|
|
20055
|
-
return throwTypeError;
|
|
20056
|
-
} catch (calleeThrows) {
|
|
20057
|
-
try {
|
|
20058
|
-
return $gOPD$1(arguments, "callee").get;
|
|
20059
|
-
} catch (gOPDthrows) {
|
|
20060
|
-
return throwTypeError;
|
|
20061
|
-
}
|
|
20062
|
-
}
|
|
20063
|
-
}() : throwTypeError;
|
|
20064
|
-
var hasSymbols2 = hasSymbols$1();
|
|
20065
|
-
var hasProto2 = hasProto$1();
|
|
20066
|
-
var getProto = Object.getPrototypeOf || (hasProto2 ? function(x2) {
|
|
20067
|
-
return x2.__proto__;
|
|
20068
|
-
} : null);
|
|
20069
|
-
var needsEval = {};
|
|
20070
|
-
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
20071
|
-
var INTRINSICS = {
|
|
20072
|
-
__proto__: null,
|
|
20073
|
-
"%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
|
|
20074
|
-
"%Array%": Array,
|
|
20075
|
-
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
|
|
20076
|
-
"%ArrayIteratorPrototype%": hasSymbols2 && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
20077
|
-
"%AsyncFromSyncIteratorPrototype%": undefined$1,
|
|
20078
|
-
"%AsyncFunction%": needsEval,
|
|
20079
|
-
"%AsyncGenerator%": needsEval,
|
|
20080
|
-
"%AsyncGeneratorFunction%": needsEval,
|
|
20081
|
-
"%AsyncIteratorPrototype%": needsEval,
|
|
20082
|
-
"%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
|
|
20083
|
-
"%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
|
|
20084
|
-
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
|
|
20085
|
-
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
|
|
20086
|
-
"%Boolean%": Boolean,
|
|
20087
|
-
"%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
|
|
20088
|
-
"%Date%": Date,
|
|
20089
|
-
"%decodeURI%": decodeURI,
|
|
20090
|
-
"%decodeURIComponent%": decodeURIComponent,
|
|
20091
|
-
"%encodeURI%": encodeURI,
|
|
20092
|
-
"%encodeURIComponent%": encodeURIComponent,
|
|
20093
|
-
"%Error%": $Error,
|
|
20094
|
-
"%eval%": eval,
|
|
20095
|
-
// eslint-disable-line no-eval
|
|
20096
|
-
"%EvalError%": $EvalError,
|
|
20097
|
-
"%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
|
|
20098
|
-
"%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
|
|
20099
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
|
|
20100
|
-
"%Function%": $Function,
|
|
20101
|
-
"%GeneratorFunction%": needsEval,
|
|
20102
|
-
"%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
|
|
20103
|
-
"%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
|
|
20104
|
-
"%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
|
|
20105
|
-
"%isFinite%": isFinite,
|
|
20106
|
-
"%isNaN%": isNaN,
|
|
20107
|
-
"%IteratorPrototype%": hasSymbols2 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
20108
|
-
"%JSON%": typeof JSON === "object" ? JSON : undefined$1,
|
|
20109
|
-
"%Map%": typeof Map === "undefined" ? undefined$1 : Map,
|
|
20110
|
-
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
20111
|
-
"%Math%": Math,
|
|
20112
|
-
"%Number%": Number,
|
|
20113
|
-
"%Object%": Object,
|
|
20114
|
-
"%parseFloat%": parseFloat,
|
|
20115
|
-
"%parseInt%": parseInt,
|
|
20116
|
-
"%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
|
|
20117
|
-
"%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
|
|
20118
|
-
"%RangeError%": $RangeError,
|
|
20119
|
-
"%ReferenceError%": $ReferenceError,
|
|
20120
|
-
"%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
|
|
20121
|
-
"%RegExp%": RegExp,
|
|
20122
|
-
"%Set%": typeof Set === "undefined" ? undefined$1 : Set,
|
|
20123
|
-
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
20124
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
|
|
20125
|
-
"%String%": String,
|
|
20126
|
-
"%StringIteratorPrototype%": hasSymbols2 && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
|
|
20127
|
-
"%Symbol%": hasSymbols2 ? Symbol : undefined$1,
|
|
20128
|
-
"%SyntaxError%": $SyntaxError$1,
|
|
20129
|
-
"%ThrowTypeError%": ThrowTypeError,
|
|
20130
|
-
"%TypedArray%": TypedArray,
|
|
20131
|
-
"%TypeError%": $TypeError$3,
|
|
20132
|
-
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
|
|
20133
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
|
|
20134
|
-
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
|
|
20135
|
-
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
|
|
20136
|
-
"%URIError%": $URIError,
|
|
20137
|
-
"%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
|
|
20138
|
-
"%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
|
|
20139
|
-
"%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
|
|
20140
|
-
};
|
|
20141
|
-
if (getProto) {
|
|
20142
|
-
try {
|
|
20143
|
-
null.error;
|
|
20144
|
-
} catch (e2) {
|
|
20145
|
-
var errorProto = getProto(getProto(e2));
|
|
20146
|
-
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
20147
|
-
}
|
|
20148
|
-
}
|
|
20149
|
-
var doEval = function doEval2(name) {
|
|
20150
|
-
var value;
|
|
20151
|
-
if (name === "%AsyncFunction%") {
|
|
20152
|
-
value = getEvalledConstructor("async function () {}");
|
|
20153
|
-
} else if (name === "%GeneratorFunction%") {
|
|
20154
|
-
value = getEvalledConstructor("function* () {}");
|
|
20155
|
-
} else if (name === "%AsyncGeneratorFunction%") {
|
|
20156
|
-
value = getEvalledConstructor("async function* () {}");
|
|
20157
|
-
} else if (name === "%AsyncGenerator%") {
|
|
20158
|
-
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
20159
|
-
if (fn) {
|
|
20160
|
-
value = fn.prototype;
|
|
20161
|
-
}
|
|
20162
|
-
} else if (name === "%AsyncIteratorPrototype%") {
|
|
20163
|
-
var gen = doEval2("%AsyncGenerator%");
|
|
20164
|
-
if (gen && getProto) {
|
|
20165
|
-
value = getProto(gen.prototype);
|
|
20166
|
-
}
|
|
20167
|
-
}
|
|
20168
|
-
INTRINSICS[name] = value;
|
|
20169
|
-
return value;
|
|
20170
|
-
};
|
|
20171
|
-
var LEGACY_ALIASES = {
|
|
20172
|
-
__proto__: null,
|
|
20173
|
-
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
20174
|
-
"%ArrayPrototype%": ["Array", "prototype"],
|
|
20175
|
-
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
20176
|
-
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
20177
|
-
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
20178
|
-
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
20179
|
-
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
20180
|
-
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
20181
|
-
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
20182
|
-
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
20183
|
-
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
20184
|
-
"%DatePrototype%": ["Date", "prototype"],
|
|
20185
|
-
"%ErrorPrototype%": ["Error", "prototype"],
|
|
20186
|
-
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
20187
|
-
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
20188
|
-
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
20189
|
-
"%FunctionPrototype%": ["Function", "prototype"],
|
|
20190
|
-
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
20191
|
-
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
20192
|
-
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
20193
|
-
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
20194
|
-
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
20195
|
-
"%JSONParse%": ["JSON", "parse"],
|
|
20196
|
-
"%JSONStringify%": ["JSON", "stringify"],
|
|
20197
|
-
"%MapPrototype%": ["Map", "prototype"],
|
|
20198
|
-
"%NumberPrototype%": ["Number", "prototype"],
|
|
20199
|
-
"%ObjectPrototype%": ["Object", "prototype"],
|
|
20200
|
-
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
20201
|
-
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
20202
|
-
"%PromisePrototype%": ["Promise", "prototype"],
|
|
20203
|
-
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
20204
|
-
"%Promise_all%": ["Promise", "all"],
|
|
20205
|
-
"%Promise_reject%": ["Promise", "reject"],
|
|
20206
|
-
"%Promise_resolve%": ["Promise", "resolve"],
|
|
20207
|
-
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
20208
|
-
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
20209
|
-
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
20210
|
-
"%SetPrototype%": ["Set", "prototype"],
|
|
20211
|
-
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
20212
|
-
"%StringPrototype%": ["String", "prototype"],
|
|
20213
|
-
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
20214
|
-
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
20215
|
-
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
20216
|
-
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
20217
|
-
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
20218
|
-
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
20219
|
-
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
20220
|
-
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
20221
|
-
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
20222
|
-
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
20223
|
-
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
20224
|
-
};
|
|
20225
|
-
var bind2 = functionBind;
|
|
20226
|
-
var hasOwn$1 = hasown;
|
|
20227
|
-
var $concat$1 = bind2.call(Function.call, Array.prototype.concat);
|
|
20228
|
-
var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
|
|
20229
|
-
var $replace$1 = bind2.call(Function.call, String.prototype.replace);
|
|
20230
|
-
var $strSlice = bind2.call(Function.call, String.prototype.slice);
|
|
20231
|
-
var $exec = bind2.call(Function.call, RegExp.prototype.exec);
|
|
20232
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
20233
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
20234
|
-
var stringToPath = function stringToPath2(string) {
|
|
20235
|
-
var first = $strSlice(string, 0, 1);
|
|
20236
|
-
var last = $strSlice(string, -1);
|
|
20237
|
-
if (first === "%" && last !== "%") {
|
|
20238
|
-
throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");
|
|
20239
|
-
} else if (last === "%" && first !== "%") {
|
|
20240
|
-
throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");
|
|
20241
|
-
}
|
|
20242
|
-
var result = [];
|
|
20243
|
-
$replace$1(string, rePropName, function(match, number, quote2, subString) {
|
|
20244
|
-
result[result.length] = quote2 ? $replace$1(subString, reEscapeChar, "$1") : number || match;
|
|
20245
|
-
});
|
|
20246
|
-
return result;
|
|
20247
|
-
};
|
|
20248
|
-
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
20249
|
-
var intrinsicName = name;
|
|
20250
|
-
var alias;
|
|
20251
|
-
if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
|
|
20252
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
20253
|
-
intrinsicName = "%" + alias[0] + "%";
|
|
20254
|
-
}
|
|
20255
|
-
if (hasOwn$1(INTRINSICS, intrinsicName)) {
|
|
20256
|
-
var value = INTRINSICS[intrinsicName];
|
|
20257
|
-
if (value === needsEval) {
|
|
20258
|
-
value = doEval(intrinsicName);
|
|
20259
|
-
}
|
|
20260
|
-
if (typeof value === "undefined" && !allowMissing) {
|
|
20261
|
-
throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
20262
|
-
}
|
|
20263
|
-
return {
|
|
20264
|
-
alias,
|
|
20265
|
-
name: intrinsicName,
|
|
20266
|
-
value
|
|
20267
|
-
};
|
|
20268
|
-
}
|
|
20269
|
-
throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
|
|
20270
|
-
};
|
|
20271
|
-
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
20272
|
-
if (typeof name !== "string" || name.length === 0) {
|
|
20273
|
-
throw new $TypeError$3("intrinsic name must be a non-empty string");
|
|
20274
|
-
}
|
|
20275
|
-
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
20276
|
-
throw new $TypeError$3('"allowMissing" argument must be a boolean');
|
|
20277
|
-
}
|
|
20278
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
20279
|
-
throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
20280
|
-
}
|
|
20281
|
-
var parts = stringToPath(name);
|
|
20282
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
20283
|
-
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
20284
|
-
var intrinsicRealName = intrinsic.name;
|
|
20285
|
-
var value = intrinsic.value;
|
|
20286
|
-
var skipFurtherCaching = false;
|
|
20287
|
-
var alias = intrinsic.alias;
|
|
20288
|
-
if (alias) {
|
|
20289
|
-
intrinsicBaseName = alias[0];
|
|
20290
|
-
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
20291
|
-
}
|
|
20292
|
-
for (var i2 = 1, isOwn = true; i2 < parts.length; i2 += 1) {
|
|
20293
|
-
var part = parts[i2];
|
|
20294
|
-
var first = $strSlice(part, 0, 1);
|
|
20295
|
-
var last = $strSlice(part, -1);
|
|
20296
|
-
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
20297
|
-
throw new $SyntaxError$1("property names with quotes must have matching quotes");
|
|
20298
|
-
}
|
|
20299
|
-
if (part === "constructor" || !isOwn) {
|
|
20300
|
-
skipFurtherCaching = true;
|
|
20301
|
-
}
|
|
20302
|
-
intrinsicBaseName += "." + part;
|
|
20303
|
-
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
20304
|
-
if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
|
|
20305
|
-
value = INTRINSICS[intrinsicRealName];
|
|
20306
|
-
} else if (value != null) {
|
|
20307
|
-
if (!(part in value)) {
|
|
20308
|
-
if (!allowMissing) {
|
|
20309
|
-
throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available.");
|
|
20310
|
-
}
|
|
20311
|
-
return void 0;
|
|
20312
|
-
}
|
|
20313
|
-
if ($gOPD$1 && i2 + 1 >= parts.length) {
|
|
20314
|
-
var desc = $gOPD$1(value, part);
|
|
20315
|
-
isOwn = !!desc;
|
|
20316
|
-
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
20317
|
-
value = desc.get;
|
|
20318
|
-
} else {
|
|
20319
|
-
value = value[part];
|
|
20320
|
-
}
|
|
20321
|
-
} else {
|
|
20322
|
-
isOwn = hasOwn$1(value, part);
|
|
20323
|
-
value = value[part];
|
|
20324
|
-
}
|
|
20325
|
-
if (isOwn && !skipFurtherCaching) {
|
|
20326
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
20327
|
-
}
|
|
20328
|
-
}
|
|
20329
|
-
}
|
|
20330
|
-
return value;
|
|
20331
|
-
};
|
|
20332
|
-
var callBind$1 = { exports: {} };
|
|
20333
|
-
var esDefineProperty;
|
|
20334
|
-
var hasRequiredEsDefineProperty;
|
|
20335
|
-
function requireEsDefineProperty() {
|
|
20336
|
-
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
|
20337
|
-
hasRequiredEsDefineProperty = 1;
|
|
20338
|
-
var GetIntrinsic3 = getIntrinsic;
|
|
20339
|
-
var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
|
|
20340
|
-
if ($defineProperty2) {
|
|
20341
|
-
try {
|
|
20342
|
-
$defineProperty2({}, "a", { value: 1 });
|
|
20343
|
-
} catch (e2) {
|
|
20344
|
-
$defineProperty2 = false;
|
|
20345
|
-
}
|
|
20346
|
-
}
|
|
20347
|
-
esDefineProperty = $defineProperty2;
|
|
20348
|
-
return esDefineProperty;
|
|
20349
|
-
}
|
|
20350
|
-
var GetIntrinsic$3 = getIntrinsic;
|
|
20351
|
-
var $gOPD = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
|
|
20352
|
-
if ($gOPD) {
|
|
20353
|
-
try {
|
|
20354
|
-
$gOPD([], "length");
|
|
20355
|
-
} catch (e2) {
|
|
20356
|
-
$gOPD = null;
|
|
20357
|
-
}
|
|
20358
|
-
}
|
|
20359
|
-
var gopd$1 = $gOPD;
|
|
20360
|
-
var $defineProperty$1 = requireEsDefineProperty();
|
|
20361
|
-
var $SyntaxError = syntax;
|
|
20362
|
-
var $TypeError$2 = type;
|
|
20363
|
-
var gopd = gopd$1;
|
|
20364
|
-
var defineDataProperty = function defineDataProperty2(obj, property, value) {
|
|
20365
|
-
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
|
20366
|
-
throw new $TypeError$2("`obj` must be an object or a function`");
|
|
20367
|
-
}
|
|
20368
|
-
if (typeof property !== "string" && typeof property !== "symbol") {
|
|
20369
|
-
throw new $TypeError$2("`property` must be a string or a symbol`");
|
|
20370
|
-
}
|
|
20371
|
-
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
|
20372
|
-
throw new $TypeError$2("`nonEnumerable`, if provided, must be a boolean or null");
|
|
20373
|
-
}
|
|
20374
|
-
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
|
20375
|
-
throw new $TypeError$2("`nonWritable`, if provided, must be a boolean or null");
|
|
20376
|
-
}
|
|
20377
|
-
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
|
20378
|
-
throw new $TypeError$2("`nonConfigurable`, if provided, must be a boolean or null");
|
|
20379
|
-
}
|
|
20380
|
-
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
|
20381
|
-
throw new $TypeError$2("`loose`, if provided, must be a boolean");
|
|
20382
|
-
}
|
|
20383
|
-
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
20384
|
-
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
20385
|
-
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
20386
|
-
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
20387
|
-
var desc = !!gopd && gopd(obj, property);
|
|
20388
|
-
if ($defineProperty$1) {
|
|
20389
|
-
$defineProperty$1(obj, property, {
|
|
20390
|
-
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
20391
|
-
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
20392
|
-
value,
|
|
20393
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
20394
|
-
});
|
|
20395
|
-
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
20396
|
-
obj[property] = value;
|
|
20397
|
-
} else {
|
|
20398
|
-
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
20399
|
-
}
|
|
20400
|
-
};
|
|
20401
|
-
var $defineProperty = requireEsDefineProperty();
|
|
20402
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
20403
|
-
return !!$defineProperty;
|
|
20404
|
-
};
|
|
20405
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
20406
|
-
if (!$defineProperty) {
|
|
20407
|
-
return null;
|
|
20408
|
-
}
|
|
20409
|
-
try {
|
|
20410
|
-
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
20411
|
-
} catch (e2) {
|
|
20412
|
-
return true;
|
|
20413
|
-
}
|
|
20414
|
-
};
|
|
20415
|
-
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
20416
|
-
var GetIntrinsic$2 = getIntrinsic;
|
|
20417
|
-
var define = defineDataProperty;
|
|
20418
|
-
var hasDescriptors = hasPropertyDescriptors_1();
|
|
20419
|
-
var gOPD = gopd$1;
|
|
20420
|
-
var $TypeError$1 = type;
|
|
20421
|
-
var $floor$1 = GetIntrinsic$2("%Math.floor%");
|
|
20422
|
-
var setFunctionLength = function setFunctionLength2(fn, length2) {
|
|
20423
|
-
if (typeof fn !== "function") {
|
|
20424
|
-
throw new $TypeError$1("`fn` is not a function");
|
|
20425
|
-
}
|
|
20426
|
-
if (typeof length2 !== "number" || length2 < 0 || length2 > 4294967295 || $floor$1(length2) !== length2) {
|
|
20427
|
-
throw new $TypeError$1("`length` must be a positive 32-bit integer");
|
|
20428
|
-
}
|
|
20429
|
-
var loose = arguments.length > 2 && !!arguments[2];
|
|
20430
|
-
var functionLengthIsConfigurable = true;
|
|
20431
|
-
var functionLengthIsWritable = true;
|
|
20432
|
-
if ("length" in fn && gOPD) {
|
|
20433
|
-
var desc = gOPD(fn, "length");
|
|
20434
|
-
if (desc && !desc.configurable) {
|
|
20435
|
-
functionLengthIsConfigurable = false;
|
|
20436
|
-
}
|
|
20437
|
-
if (desc && !desc.writable) {
|
|
20438
|
-
functionLengthIsWritable = false;
|
|
20439
|
-
}
|
|
20440
|
-
}
|
|
20441
|
-
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
20442
|
-
if (hasDescriptors) {
|
|
20443
|
-
define(
|
|
20444
|
-
/** @type {Parameters<define>[0]} */
|
|
20445
|
-
fn,
|
|
20446
|
-
"length",
|
|
20447
|
-
length2,
|
|
20448
|
-
true,
|
|
20449
|
-
true
|
|
20450
|
-
);
|
|
20451
|
-
} else {
|
|
20452
|
-
define(
|
|
20453
|
-
/** @type {Parameters<define>[0]} */
|
|
20454
|
-
fn,
|
|
20455
|
-
"length",
|
|
20456
|
-
length2
|
|
20457
|
-
);
|
|
20458
|
-
}
|
|
20459
|
-
}
|
|
20460
|
-
return fn;
|
|
20461
|
-
};
|
|
20462
|
-
(function(module) {
|
|
20463
|
-
var bind3 = functionBind;
|
|
20464
|
-
var GetIntrinsic3 = getIntrinsic;
|
|
20465
|
-
var setFunctionLength$1 = setFunctionLength;
|
|
20466
|
-
var $TypeError2 = type;
|
|
20467
|
-
var $apply = GetIntrinsic3("%Function.prototype.apply%");
|
|
20468
|
-
var $call = GetIntrinsic3("%Function.prototype.call%");
|
|
20469
|
-
var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind3.call($call, $apply);
|
|
20470
|
-
var $defineProperty2 = requireEsDefineProperty();
|
|
20471
|
-
var $max = GetIntrinsic3("%Math.max%");
|
|
20472
|
-
module.exports = function callBind2(originalFunction) {
|
|
20473
|
-
if (typeof originalFunction !== "function") {
|
|
20474
|
-
throw new $TypeError2("a function is required");
|
|
20475
|
-
}
|
|
20476
|
-
var func = $reflectApply(bind3, $call, arguments);
|
|
20477
|
-
return setFunctionLength$1(
|
|
20478
|
-
func,
|
|
20479
|
-
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
20480
|
-
true
|
|
20481
|
-
);
|
|
20482
|
-
};
|
|
20483
|
-
var applyBind = function applyBind2() {
|
|
20484
|
-
return $reflectApply(bind3, $apply, arguments);
|
|
20485
|
-
};
|
|
20486
|
-
if ($defineProperty2) {
|
|
20487
|
-
$defineProperty2(module.exports, "apply", { value: applyBind });
|
|
20488
|
-
} else {
|
|
20489
|
-
module.exports.apply = applyBind;
|
|
20490
|
-
}
|
|
20491
|
-
})(callBind$1);
|
|
20492
|
-
var callBindExports = callBind$1.exports;
|
|
20493
|
-
var GetIntrinsic$1 = getIntrinsic;
|
|
20494
|
-
var callBind = callBindExports;
|
|
20495
|
-
var $indexOf = callBind(GetIntrinsic$1("String.prototype.indexOf"));
|
|
20496
|
-
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
20497
|
-
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
20498
|
-
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
20499
|
-
return callBind(intrinsic);
|
|
20500
|
-
}
|
|
20501
|
-
return intrinsic;
|
|
20502
|
-
};
|
|
20503
20058
|
const __viteBrowserExternal = {};
|
|
20504
20059
|
const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20505
20060
|
__proto__: null,
|
|
@@ -20525,11 +20080,11 @@ var objectToString = Object.prototype.toString;
|
|
|
20525
20080
|
var functionToString = Function.prototype.toString;
|
|
20526
20081
|
var $match = String.prototype.match;
|
|
20527
20082
|
var $slice = String.prototype.slice;
|
|
20528
|
-
var $replace = String.prototype.replace;
|
|
20083
|
+
var $replace$1 = String.prototype.replace;
|
|
20529
20084
|
var $toUpperCase = String.prototype.toUpperCase;
|
|
20530
20085
|
var $toLowerCase = String.prototype.toLowerCase;
|
|
20531
20086
|
var $test = RegExp.prototype.test;
|
|
20532
|
-
var $concat = Array.prototype.concat;
|
|
20087
|
+
var $concat$1 = Array.prototype.concat;
|
|
20533
20088
|
var $join = Array.prototype.join;
|
|
20534
20089
|
var $arrSlice = Array.prototype.slice;
|
|
20535
20090
|
var $floor = Math.floor;
|
|
@@ -20539,8 +20094,8 @@ var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "sy
|
|
|
20539
20094
|
var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
|
|
20540
20095
|
var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
|
|
20541
20096
|
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
20542
|
-
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(
|
|
20543
|
-
return
|
|
20097
|
+
var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
|
|
20098
|
+
return O.__proto__;
|
|
20544
20099
|
} : null);
|
|
20545
20100
|
function addNumericSeparator(num, str) {
|
|
20546
20101
|
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
|
|
@@ -20552,17 +20107,27 @@ function addNumericSeparator(num, str) {
|
|
|
20552
20107
|
if (int !== num) {
|
|
20553
20108
|
var intStr = String(int);
|
|
20554
20109
|
var dec = $slice.call(str, intStr.length + 1);
|
|
20555
|
-
return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
20110
|
+
return $replace$1.call(intStr, sepRegex, "$&_") + "." + $replace$1.call($replace$1.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
20556
20111
|
}
|
|
20557
20112
|
}
|
|
20558
|
-
return $replace.call(str, sepRegex, "$&_");
|
|
20113
|
+
return $replace$1.call(str, sepRegex, "$&_");
|
|
20559
20114
|
}
|
|
20560
20115
|
var utilInspect = require$$0;
|
|
20561
20116
|
var inspectCustom = utilInspect.custom;
|
|
20562
20117
|
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
20118
|
+
var quotes = {
|
|
20119
|
+
__proto__: null,
|
|
20120
|
+
"double": '"',
|
|
20121
|
+
single: "'"
|
|
20122
|
+
};
|
|
20123
|
+
var quoteREs = {
|
|
20124
|
+
__proto__: null,
|
|
20125
|
+
"double": /(["\\])/g,
|
|
20126
|
+
single: /(['\\])/g
|
|
20127
|
+
};
|
|
20563
20128
|
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
20564
20129
|
var opts = options || {};
|
|
20565
|
-
if (has$3(opts, "quoteStyle") && (
|
|
20130
|
+
if (has$3(opts, "quoteStyle") && !has$3(quotes, opts.quoteStyle)) {
|
|
20566
20131
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
20567
20132
|
}
|
|
20568
20133
|
if (has$3(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
@@ -20637,7 +20202,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
20637
20202
|
return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
|
|
20638
20203
|
}
|
|
20639
20204
|
if (isSymbol(obj)) {
|
|
20640
|
-
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
|
|
20205
|
+
var symString = hasShammedSymbols ? $replace$1.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
|
|
20641
20206
|
return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
20642
20207
|
}
|
|
20643
20208
|
if (isElement(obj)) {
|
|
@@ -20666,7 +20231,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
20666
20231
|
if (isError(obj)) {
|
|
20667
20232
|
var parts = arrObjKeys(obj, inspect2);
|
|
20668
20233
|
if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
|
|
20669
|
-
return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect2(obj.cause), parts), ", ") + " }";
|
|
20234
|
+
return "{ [" + String(obj) + "] " + $join.call($concat$1.call("[cause]: " + inspect2(obj.cause), parts), ", ") + " }";
|
|
20670
20235
|
}
|
|
20671
20236
|
if (parts.length === 0) {
|
|
20672
20237
|
return "[" + String(obj) + "]";
|
|
@@ -20729,9 +20294,9 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
20729
20294
|
var ys = arrObjKeys(obj, inspect2);
|
|
20730
20295
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
20731
20296
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
20732
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
20297
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
20733
20298
|
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
20734
|
-
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
20299
|
+
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
20735
20300
|
if (ys.length === 0) {
|
|
20736
20301
|
return tag + "{}";
|
|
20737
20302
|
}
|
|
@@ -20743,32 +20308,36 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
20743
20308
|
return String(obj);
|
|
20744
20309
|
};
|
|
20745
20310
|
function wrapQuotes(s2, defaultStyle, opts) {
|
|
20746
|
-
var
|
|
20311
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
20312
|
+
var quoteChar = quotes[style];
|
|
20747
20313
|
return quoteChar + s2 + quoteChar;
|
|
20748
20314
|
}
|
|
20749
20315
|
function quote(s2) {
|
|
20750
|
-
return $replace.call(String(s2), /"/g, """);
|
|
20316
|
+
return $replace$1.call(String(s2), /"/g, """);
|
|
20317
|
+
}
|
|
20318
|
+
function canTrustToString(obj) {
|
|
20319
|
+
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
20751
20320
|
}
|
|
20752
20321
|
function isArray$3(obj) {
|
|
20753
|
-
return toStr(obj) === "[object Array]" && (
|
|
20322
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
20754
20323
|
}
|
|
20755
20324
|
function isDate(obj) {
|
|
20756
|
-
return toStr(obj) === "[object Date]" && (
|
|
20325
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
20757
20326
|
}
|
|
20758
20327
|
function isRegExp$1(obj) {
|
|
20759
|
-
return toStr(obj) === "[object RegExp]" && (
|
|
20328
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
20760
20329
|
}
|
|
20761
20330
|
function isError(obj) {
|
|
20762
|
-
return toStr(obj) === "[object Error]" && (
|
|
20331
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
20763
20332
|
}
|
|
20764
20333
|
function isString(obj) {
|
|
20765
|
-
return toStr(obj) === "[object String]" && (
|
|
20334
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
20766
20335
|
}
|
|
20767
20336
|
function isNumber(obj) {
|
|
20768
|
-
return toStr(obj) === "[object Number]" && (
|
|
20337
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
20769
20338
|
}
|
|
20770
20339
|
function isBoolean(obj) {
|
|
20771
|
-
return toStr(obj) === "[object Boolean]" && (
|
|
20340
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
20772
20341
|
}
|
|
20773
20342
|
function isSymbol(obj) {
|
|
20774
20343
|
if (hasShammedSymbols) {
|
|
@@ -20798,13 +20367,13 @@ function isBigInt(obj) {
|
|
|
20798
20367
|
}
|
|
20799
20368
|
return false;
|
|
20800
20369
|
}
|
|
20801
|
-
var hasOwn = Object.prototype.hasOwnProperty || function(key) {
|
|
20370
|
+
var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
20802
20371
|
return key in this;
|
|
20803
20372
|
};
|
|
20804
20373
|
function has$3(obj, key) {
|
|
20805
|
-
return hasOwn.call(obj, key);
|
|
20374
|
+
return hasOwn$1.call(obj, key);
|
|
20806
20375
|
}
|
|
20807
|
-
function toStr(obj) {
|
|
20376
|
+
function toStr$1(obj) {
|
|
20808
20377
|
return objectToString.call(obj);
|
|
20809
20378
|
}
|
|
20810
20379
|
function nameOf(f3) {
|
|
@@ -20918,7 +20487,9 @@ function inspectString(str, opts) {
|
|
|
20918
20487
|
var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
|
|
20919
20488
|
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
20920
20489
|
}
|
|
20921
|
-
var
|
|
20490
|
+
var quoteRE = quoteREs[opts.quoteStyle || "single"];
|
|
20491
|
+
quoteRE.lastIndex = 0;
|
|
20492
|
+
var s2 = $replace$1.call($replace$1.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
|
|
20922
20493
|
return wrapQuotes(s2, "single", opts);
|
|
20923
20494
|
}
|
|
20924
20495
|
function lowbyte(c2) {
|
|
@@ -21015,32 +20586,27 @@ function arrObjKeys(obj, inspect2) {
|
|
|
21015
20586
|
}
|
|
21016
20587
|
return xs;
|
|
21017
20588
|
}
|
|
21018
|
-
var
|
|
21019
|
-
var
|
|
21020
|
-
var
|
|
21021
|
-
var $TypeError = type;
|
|
21022
|
-
var $WeakMap = GetIntrinsic2("%WeakMap%", true);
|
|
21023
|
-
var $Map = GetIntrinsic2("%Map%", true);
|
|
21024
|
-
var $weakMapGet = callBound("WeakMap.prototype.get", true);
|
|
21025
|
-
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
|
21026
|
-
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
|
21027
|
-
var $mapGet = callBound("Map.prototype.get", true);
|
|
21028
|
-
var $mapSet = callBound("Map.prototype.set", true);
|
|
21029
|
-
var $mapHas = callBound("Map.prototype.has", true);
|
|
21030
|
-
var listGetNode = function(list, key) {
|
|
20589
|
+
var inspect$3 = objectInspect;
|
|
20590
|
+
var $TypeError$5 = type;
|
|
20591
|
+
var listGetNode = function(list, key, isDelete) {
|
|
21031
20592
|
var prev = list;
|
|
21032
20593
|
var curr;
|
|
21033
|
-
for (; (curr = prev.next)
|
|
20594
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
21034
20595
|
if (curr.key === key) {
|
|
21035
20596
|
prev.next = curr.next;
|
|
21036
|
-
|
|
21037
|
-
|
|
21038
|
-
|
|
20597
|
+
if (!isDelete) {
|
|
20598
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */
|
|
20599
|
+
list.next;
|
|
20600
|
+
list.next = curr;
|
|
20601
|
+
}
|
|
21039
20602
|
return curr;
|
|
21040
20603
|
}
|
|
21041
20604
|
}
|
|
21042
20605
|
};
|
|
21043
20606
|
var listGet = function(objects, key) {
|
|
20607
|
+
if (!objects) {
|
|
20608
|
+
return void 0;
|
|
20609
|
+
}
|
|
21044
20610
|
var node = listGetNode(objects, key);
|
|
21045
20611
|
return node && node.value;
|
|
21046
20612
|
};
|
|
@@ -21049,7 +20615,7 @@ var listSet = function(objects, key, value) {
|
|
|
21049
20615
|
if (node) {
|
|
21050
20616
|
node.value = value;
|
|
21051
20617
|
} else {
|
|
21052
|
-
objects.next = /** @type {import('.').ListNode<typeof value>} */
|
|
20618
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
21053
20619
|
{
|
|
21054
20620
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
21055
20621
|
key,
|
|
@@ -21059,66 +20625,832 @@ var listSet = function(objects, key, value) {
|
|
|
21059
20625
|
}
|
|
21060
20626
|
};
|
|
21061
20627
|
var listHas = function(objects, key) {
|
|
20628
|
+
if (!objects) {
|
|
20629
|
+
return false;
|
|
20630
|
+
}
|
|
21062
20631
|
return !!listGetNode(objects, key);
|
|
21063
20632
|
};
|
|
21064
|
-
var
|
|
21065
|
-
|
|
21066
|
-
|
|
20633
|
+
var listDelete = function(objects, key) {
|
|
20634
|
+
if (objects) {
|
|
20635
|
+
return listGetNode(objects, key, true);
|
|
20636
|
+
}
|
|
20637
|
+
};
|
|
20638
|
+
var sideChannelList = function getSideChannelList() {
|
|
21067
20639
|
var $o;
|
|
21068
20640
|
var channel = {
|
|
21069
20641
|
assert: function(key) {
|
|
21070
20642
|
if (!channel.has(key)) {
|
|
21071
|
-
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
20643
|
+
throw new $TypeError$5("Side channel does not contain " + inspect$3(key));
|
|
21072
20644
|
}
|
|
21073
20645
|
},
|
|
20646
|
+
"delete": function(key) {
|
|
20647
|
+
var root = $o && $o.next;
|
|
20648
|
+
var deletedNode = listDelete($o, key);
|
|
20649
|
+
if (deletedNode && root && root === deletedNode) {
|
|
20650
|
+
$o = void 0;
|
|
20651
|
+
}
|
|
20652
|
+
return !!deletedNode;
|
|
20653
|
+
},
|
|
21074
20654
|
get: function(key) {
|
|
21075
|
-
|
|
21076
|
-
|
|
21077
|
-
|
|
20655
|
+
return listGet($o, key);
|
|
20656
|
+
},
|
|
20657
|
+
has: function(key) {
|
|
20658
|
+
return listHas($o, key);
|
|
20659
|
+
},
|
|
20660
|
+
set: function(key, value) {
|
|
20661
|
+
if (!$o) {
|
|
20662
|
+
$o = {
|
|
20663
|
+
next: void 0
|
|
20664
|
+
};
|
|
20665
|
+
}
|
|
20666
|
+
listSet(
|
|
20667
|
+
/** @type {NonNullable<typeof $o>} */
|
|
20668
|
+
$o,
|
|
20669
|
+
key,
|
|
20670
|
+
value
|
|
20671
|
+
);
|
|
20672
|
+
}
|
|
20673
|
+
};
|
|
20674
|
+
return channel;
|
|
20675
|
+
};
|
|
20676
|
+
var esObjectAtoms = Object;
|
|
20677
|
+
var esErrors = Error;
|
|
20678
|
+
var _eval = EvalError;
|
|
20679
|
+
var range = RangeError;
|
|
20680
|
+
var ref = ReferenceError;
|
|
20681
|
+
var syntax = SyntaxError;
|
|
20682
|
+
var uri = URIError;
|
|
20683
|
+
var abs$1 = Math.abs;
|
|
20684
|
+
var floor$1 = Math.floor;
|
|
20685
|
+
var max$2 = Math.max;
|
|
20686
|
+
var min$1 = Math.min;
|
|
20687
|
+
var pow$1 = Math.pow;
|
|
20688
|
+
var round$2 = Math.round;
|
|
20689
|
+
var _isNaN = Number.isNaN || function isNaN2(a2) {
|
|
20690
|
+
return a2 !== a2;
|
|
20691
|
+
};
|
|
20692
|
+
var $isNaN = _isNaN;
|
|
20693
|
+
var sign$2 = function sign(number) {
|
|
20694
|
+
if ($isNaN(number) || number === 0) {
|
|
20695
|
+
return number;
|
|
20696
|
+
}
|
|
20697
|
+
return number < 0 ? -1 : 1;
|
|
20698
|
+
};
|
|
20699
|
+
var gOPD = Object.getOwnPropertyDescriptor;
|
|
20700
|
+
var $gOPD$1 = gOPD;
|
|
20701
|
+
if ($gOPD$1) {
|
|
20702
|
+
try {
|
|
20703
|
+
$gOPD$1([], "length");
|
|
20704
|
+
} catch (e2) {
|
|
20705
|
+
$gOPD$1 = null;
|
|
20706
|
+
}
|
|
20707
|
+
}
|
|
20708
|
+
var gopd = $gOPD$1;
|
|
20709
|
+
var $defineProperty$1 = Object.defineProperty || false;
|
|
20710
|
+
if ($defineProperty$1) {
|
|
20711
|
+
try {
|
|
20712
|
+
$defineProperty$1({}, "a", { value: 1 });
|
|
20713
|
+
} catch (e2) {
|
|
20714
|
+
$defineProperty$1 = false;
|
|
20715
|
+
}
|
|
20716
|
+
}
|
|
20717
|
+
var esDefineProperty = $defineProperty$1;
|
|
20718
|
+
var shams;
|
|
20719
|
+
var hasRequiredShams;
|
|
20720
|
+
function requireShams() {
|
|
20721
|
+
if (hasRequiredShams) return shams;
|
|
20722
|
+
hasRequiredShams = 1;
|
|
20723
|
+
shams = function hasSymbols2() {
|
|
20724
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
20725
|
+
return false;
|
|
20726
|
+
}
|
|
20727
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
20728
|
+
return true;
|
|
20729
|
+
}
|
|
20730
|
+
var obj = {};
|
|
20731
|
+
var sym = Symbol("test");
|
|
20732
|
+
var symObj = Object(sym);
|
|
20733
|
+
if (typeof sym === "string") {
|
|
20734
|
+
return false;
|
|
20735
|
+
}
|
|
20736
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
20737
|
+
return false;
|
|
20738
|
+
}
|
|
20739
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
20740
|
+
return false;
|
|
20741
|
+
}
|
|
20742
|
+
var symVal = 42;
|
|
20743
|
+
obj[sym] = symVal;
|
|
20744
|
+
for (var _2 in obj) {
|
|
20745
|
+
return false;
|
|
20746
|
+
}
|
|
20747
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
20748
|
+
return false;
|
|
20749
|
+
}
|
|
20750
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
20751
|
+
return false;
|
|
20752
|
+
}
|
|
20753
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
20754
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
20755
|
+
return false;
|
|
20756
|
+
}
|
|
20757
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
20758
|
+
return false;
|
|
20759
|
+
}
|
|
20760
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
20761
|
+
var descriptor = (
|
|
20762
|
+
/** @type {PropertyDescriptor} */
|
|
20763
|
+
Object.getOwnPropertyDescriptor(obj, sym)
|
|
20764
|
+
);
|
|
20765
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
20766
|
+
return false;
|
|
20767
|
+
}
|
|
20768
|
+
}
|
|
20769
|
+
return true;
|
|
20770
|
+
};
|
|
20771
|
+
return shams;
|
|
20772
|
+
}
|
|
20773
|
+
var hasSymbols$1;
|
|
20774
|
+
var hasRequiredHasSymbols;
|
|
20775
|
+
function requireHasSymbols() {
|
|
20776
|
+
if (hasRequiredHasSymbols) return hasSymbols$1;
|
|
20777
|
+
hasRequiredHasSymbols = 1;
|
|
20778
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
20779
|
+
var hasSymbolSham = requireShams();
|
|
20780
|
+
hasSymbols$1 = function hasNativeSymbols() {
|
|
20781
|
+
if (typeof origSymbol !== "function") {
|
|
20782
|
+
return false;
|
|
20783
|
+
}
|
|
20784
|
+
if (typeof Symbol !== "function") {
|
|
20785
|
+
return false;
|
|
20786
|
+
}
|
|
20787
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
20788
|
+
return false;
|
|
20789
|
+
}
|
|
20790
|
+
if (typeof Symbol("bar") !== "symbol") {
|
|
20791
|
+
return false;
|
|
20792
|
+
}
|
|
20793
|
+
return hasSymbolSham();
|
|
20794
|
+
};
|
|
20795
|
+
return hasSymbols$1;
|
|
20796
|
+
}
|
|
20797
|
+
var Reflect_getPrototypeOf;
|
|
20798
|
+
var hasRequiredReflect_getPrototypeOf;
|
|
20799
|
+
function requireReflect_getPrototypeOf() {
|
|
20800
|
+
if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
|
|
20801
|
+
hasRequiredReflect_getPrototypeOf = 1;
|
|
20802
|
+
Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
20803
|
+
return Reflect_getPrototypeOf;
|
|
20804
|
+
}
|
|
20805
|
+
var Object_getPrototypeOf;
|
|
20806
|
+
var hasRequiredObject_getPrototypeOf;
|
|
20807
|
+
function requireObject_getPrototypeOf() {
|
|
20808
|
+
if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
|
|
20809
|
+
hasRequiredObject_getPrototypeOf = 1;
|
|
20810
|
+
var $Object2 = esObjectAtoms;
|
|
20811
|
+
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
20812
|
+
return Object_getPrototypeOf;
|
|
20813
|
+
}
|
|
20814
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
20815
|
+
var toStr = Object.prototype.toString;
|
|
20816
|
+
var max$1 = Math.max;
|
|
20817
|
+
var funcType = "[object Function]";
|
|
20818
|
+
var concatty = function concatty2(a2, b2) {
|
|
20819
|
+
var arr = [];
|
|
20820
|
+
for (var i2 = 0; i2 < a2.length; i2 += 1) {
|
|
20821
|
+
arr[i2] = a2[i2];
|
|
20822
|
+
}
|
|
20823
|
+
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
20824
|
+
arr[j2 + a2.length] = b2[j2];
|
|
20825
|
+
}
|
|
20826
|
+
return arr;
|
|
20827
|
+
};
|
|
20828
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
20829
|
+
var arr = [];
|
|
20830
|
+
for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
20831
|
+
arr[j2] = arrLike[i2];
|
|
20832
|
+
}
|
|
20833
|
+
return arr;
|
|
20834
|
+
};
|
|
20835
|
+
var joiny = function(arr, joiner) {
|
|
20836
|
+
var str = "";
|
|
20837
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
20838
|
+
str += arr[i2];
|
|
20839
|
+
if (i2 + 1 < arr.length) {
|
|
20840
|
+
str += joiner;
|
|
20841
|
+
}
|
|
20842
|
+
}
|
|
20843
|
+
return str;
|
|
20844
|
+
};
|
|
20845
|
+
var implementation$1 = function bind(that) {
|
|
20846
|
+
var target = this;
|
|
20847
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
20848
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
20849
|
+
}
|
|
20850
|
+
var args = slicy(arguments, 1);
|
|
20851
|
+
var bound;
|
|
20852
|
+
var binder = function() {
|
|
20853
|
+
if (this instanceof bound) {
|
|
20854
|
+
var result = target.apply(
|
|
20855
|
+
this,
|
|
20856
|
+
concatty(args, arguments)
|
|
20857
|
+
);
|
|
20858
|
+
if (Object(result) === result) {
|
|
20859
|
+
return result;
|
|
20860
|
+
}
|
|
20861
|
+
return this;
|
|
20862
|
+
}
|
|
20863
|
+
return target.apply(
|
|
20864
|
+
that,
|
|
20865
|
+
concatty(args, arguments)
|
|
20866
|
+
);
|
|
20867
|
+
};
|
|
20868
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
20869
|
+
var boundArgs = [];
|
|
20870
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
20871
|
+
boundArgs[i2] = "$" + i2;
|
|
20872
|
+
}
|
|
20873
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
20874
|
+
if (target.prototype) {
|
|
20875
|
+
var Empty = function Empty2() {
|
|
20876
|
+
};
|
|
20877
|
+
Empty.prototype = target.prototype;
|
|
20878
|
+
bound.prototype = new Empty();
|
|
20879
|
+
Empty.prototype = null;
|
|
20880
|
+
}
|
|
20881
|
+
return bound;
|
|
20882
|
+
};
|
|
20883
|
+
var implementation = implementation$1;
|
|
20884
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
20885
|
+
var functionCall = Function.prototype.call;
|
|
20886
|
+
var functionApply;
|
|
20887
|
+
var hasRequiredFunctionApply;
|
|
20888
|
+
function requireFunctionApply() {
|
|
20889
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
20890
|
+
hasRequiredFunctionApply = 1;
|
|
20891
|
+
functionApply = Function.prototype.apply;
|
|
20892
|
+
return functionApply;
|
|
20893
|
+
}
|
|
20894
|
+
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
20895
|
+
var bind$2 = functionBind;
|
|
20896
|
+
var $apply$1 = requireFunctionApply();
|
|
20897
|
+
var $call$2 = functionCall;
|
|
20898
|
+
var $reflectApply = reflectApply;
|
|
20899
|
+
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
20900
|
+
var bind$1 = functionBind;
|
|
20901
|
+
var $TypeError$4 = type;
|
|
20902
|
+
var $call$1 = functionCall;
|
|
20903
|
+
var $actualApply = actualApply;
|
|
20904
|
+
var callBindApplyHelpers = function callBindBasic(args) {
|
|
20905
|
+
if (args.length < 1 || typeof args[0] !== "function") {
|
|
20906
|
+
throw new $TypeError$4("a function is required");
|
|
20907
|
+
}
|
|
20908
|
+
return $actualApply(bind$1, $call$1, args);
|
|
20909
|
+
};
|
|
20910
|
+
var get;
|
|
20911
|
+
var hasRequiredGet;
|
|
20912
|
+
function requireGet() {
|
|
20913
|
+
if (hasRequiredGet) return get;
|
|
20914
|
+
hasRequiredGet = 1;
|
|
20915
|
+
var callBind = callBindApplyHelpers;
|
|
20916
|
+
var gOPD2 = gopd;
|
|
20917
|
+
var hasProtoAccessor;
|
|
20918
|
+
try {
|
|
20919
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
20920
|
+
[].__proto__ === Array.prototype;
|
|
20921
|
+
} catch (e2) {
|
|
20922
|
+
if (!e2 || typeof e2 !== "object" || !("code" in e2) || e2.code !== "ERR_PROTO_ACCESS") {
|
|
20923
|
+
throw e2;
|
|
20924
|
+
}
|
|
20925
|
+
}
|
|
20926
|
+
var desc = !!hasProtoAccessor && gOPD2 && gOPD2(
|
|
20927
|
+
Object.prototype,
|
|
20928
|
+
/** @type {keyof typeof Object.prototype} */
|
|
20929
|
+
"__proto__"
|
|
20930
|
+
);
|
|
20931
|
+
var $Object2 = Object;
|
|
20932
|
+
var $getPrototypeOf = $Object2.getPrototypeOf;
|
|
20933
|
+
get = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
20934
|
+
/** @type {import('./get')} */
|
|
20935
|
+
function getDunder(value) {
|
|
20936
|
+
return $getPrototypeOf(value == null ? value : $Object2(value));
|
|
20937
|
+
}
|
|
20938
|
+
) : false;
|
|
20939
|
+
return get;
|
|
20940
|
+
}
|
|
20941
|
+
var getProto$1;
|
|
20942
|
+
var hasRequiredGetProto;
|
|
20943
|
+
function requireGetProto() {
|
|
20944
|
+
if (hasRequiredGetProto) return getProto$1;
|
|
20945
|
+
hasRequiredGetProto = 1;
|
|
20946
|
+
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
20947
|
+
var originalGetProto = requireObject_getPrototypeOf();
|
|
20948
|
+
var getDunderProto = requireGet();
|
|
20949
|
+
getProto$1 = reflectGetProto ? function getProto2(O) {
|
|
20950
|
+
return reflectGetProto(O);
|
|
20951
|
+
} : originalGetProto ? function getProto2(O) {
|
|
20952
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
20953
|
+
throw new TypeError("getProto: not an object");
|
|
20954
|
+
}
|
|
20955
|
+
return originalGetProto(O);
|
|
20956
|
+
} : getDunderProto ? function getProto2(O) {
|
|
20957
|
+
return getDunderProto(O);
|
|
20958
|
+
} : null;
|
|
20959
|
+
return getProto$1;
|
|
20960
|
+
}
|
|
20961
|
+
var hasown;
|
|
20962
|
+
var hasRequiredHasown;
|
|
20963
|
+
function requireHasown() {
|
|
20964
|
+
if (hasRequiredHasown) return hasown;
|
|
20965
|
+
hasRequiredHasown = 1;
|
|
20966
|
+
var call = Function.prototype.call;
|
|
20967
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
20968
|
+
var bind3 = functionBind;
|
|
20969
|
+
hasown = bind3.call(call, $hasOwn);
|
|
20970
|
+
return hasown;
|
|
20971
|
+
}
|
|
20972
|
+
var undefined$1;
|
|
20973
|
+
var $Object = esObjectAtoms;
|
|
20974
|
+
var $Error = esErrors;
|
|
20975
|
+
var $EvalError = _eval;
|
|
20976
|
+
var $RangeError = range;
|
|
20977
|
+
var $ReferenceError = ref;
|
|
20978
|
+
var $SyntaxError = syntax;
|
|
20979
|
+
var $TypeError$3 = type;
|
|
20980
|
+
var $URIError = uri;
|
|
20981
|
+
var abs = abs$1;
|
|
20982
|
+
var floor = floor$1;
|
|
20983
|
+
var max = max$2;
|
|
20984
|
+
var min = min$1;
|
|
20985
|
+
var pow = pow$1;
|
|
20986
|
+
var round$1 = round$2;
|
|
20987
|
+
var sign$1 = sign$2;
|
|
20988
|
+
var $Function = Function;
|
|
20989
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
20990
|
+
try {
|
|
20991
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
20992
|
+
} catch (e2) {
|
|
20993
|
+
}
|
|
20994
|
+
};
|
|
20995
|
+
var $gOPD = gopd;
|
|
20996
|
+
var $defineProperty = esDefineProperty;
|
|
20997
|
+
var throwTypeError = function() {
|
|
20998
|
+
throw new $TypeError$3();
|
|
20999
|
+
};
|
|
21000
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
21001
|
+
try {
|
|
21002
|
+
arguments.callee;
|
|
21003
|
+
return throwTypeError;
|
|
21004
|
+
} catch (calleeThrows) {
|
|
21005
|
+
try {
|
|
21006
|
+
return $gOPD(arguments, "callee").get;
|
|
21007
|
+
} catch (gOPDthrows) {
|
|
21008
|
+
return throwTypeError;
|
|
21009
|
+
}
|
|
21010
|
+
}
|
|
21011
|
+
}() : throwTypeError;
|
|
21012
|
+
var hasSymbols = requireHasSymbols()();
|
|
21013
|
+
var getProto = requireGetProto();
|
|
21014
|
+
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
21015
|
+
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
21016
|
+
var $apply = requireFunctionApply();
|
|
21017
|
+
var $call = functionCall;
|
|
21018
|
+
var needsEval = {};
|
|
21019
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
21020
|
+
var INTRINSICS = {
|
|
21021
|
+
__proto__: null,
|
|
21022
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
|
|
21023
|
+
"%Array%": Array,
|
|
21024
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
|
|
21025
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
21026
|
+
"%AsyncFromSyncIteratorPrototype%": undefined$1,
|
|
21027
|
+
"%AsyncFunction%": needsEval,
|
|
21028
|
+
"%AsyncGenerator%": needsEval,
|
|
21029
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
21030
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
21031
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
|
|
21032
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
|
|
21033
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
|
|
21034
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
|
|
21035
|
+
"%Boolean%": Boolean,
|
|
21036
|
+
"%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
|
|
21037
|
+
"%Date%": Date,
|
|
21038
|
+
"%decodeURI%": decodeURI,
|
|
21039
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
21040
|
+
"%encodeURI%": encodeURI,
|
|
21041
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
21042
|
+
"%Error%": $Error,
|
|
21043
|
+
"%eval%": eval,
|
|
21044
|
+
// eslint-disable-line no-eval
|
|
21045
|
+
"%EvalError%": $EvalError,
|
|
21046
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array,
|
|
21047
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
|
|
21048
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
|
|
21049
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
|
|
21050
|
+
"%Function%": $Function,
|
|
21051
|
+
"%GeneratorFunction%": needsEval,
|
|
21052
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
|
|
21053
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
|
|
21054
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
|
|
21055
|
+
"%isFinite%": isFinite,
|
|
21056
|
+
"%isNaN%": isNaN,
|
|
21057
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
21058
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined$1,
|
|
21059
|
+
"%Map%": typeof Map === "undefined" ? undefined$1 : Map,
|
|
21060
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
21061
|
+
"%Math%": Math,
|
|
21062
|
+
"%Number%": Number,
|
|
21063
|
+
"%Object%": $Object,
|
|
21064
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
21065
|
+
"%parseFloat%": parseFloat,
|
|
21066
|
+
"%parseInt%": parseInt,
|
|
21067
|
+
"%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
|
|
21068
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
|
|
21069
|
+
"%RangeError%": $RangeError,
|
|
21070
|
+
"%ReferenceError%": $ReferenceError,
|
|
21071
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
|
|
21072
|
+
"%RegExp%": RegExp,
|
|
21073
|
+
"%Set%": typeof Set === "undefined" ? undefined$1 : Set,
|
|
21074
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
21075
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
|
|
21076
|
+
"%String%": String,
|
|
21077
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
|
|
21078
|
+
"%Symbol%": hasSymbols ? Symbol : undefined$1,
|
|
21079
|
+
"%SyntaxError%": $SyntaxError,
|
|
21080
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
21081
|
+
"%TypedArray%": TypedArray,
|
|
21082
|
+
"%TypeError%": $TypeError$3,
|
|
21083
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
|
|
21084
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
|
|
21085
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
|
|
21086
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
|
|
21087
|
+
"%URIError%": $URIError,
|
|
21088
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
|
|
21089
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
|
|
21090
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet,
|
|
21091
|
+
"%Function.prototype.call%": $call,
|
|
21092
|
+
"%Function.prototype.apply%": $apply,
|
|
21093
|
+
"%Object.defineProperty%": $defineProperty,
|
|
21094
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
21095
|
+
"%Math.abs%": abs,
|
|
21096
|
+
"%Math.floor%": floor,
|
|
21097
|
+
"%Math.max%": max,
|
|
21098
|
+
"%Math.min%": min,
|
|
21099
|
+
"%Math.pow%": pow,
|
|
21100
|
+
"%Math.round%": round$1,
|
|
21101
|
+
"%Math.sign%": sign$1,
|
|
21102
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
21103
|
+
};
|
|
21104
|
+
if (getProto) {
|
|
21105
|
+
try {
|
|
21106
|
+
null.error;
|
|
21107
|
+
} catch (e2) {
|
|
21108
|
+
var errorProto = getProto(getProto(e2));
|
|
21109
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
21110
|
+
}
|
|
21111
|
+
}
|
|
21112
|
+
var doEval = function doEval2(name) {
|
|
21113
|
+
var value;
|
|
21114
|
+
if (name === "%AsyncFunction%") {
|
|
21115
|
+
value = getEvalledConstructor("async function () {}");
|
|
21116
|
+
} else if (name === "%GeneratorFunction%") {
|
|
21117
|
+
value = getEvalledConstructor("function* () {}");
|
|
21118
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
21119
|
+
value = getEvalledConstructor("async function* () {}");
|
|
21120
|
+
} else if (name === "%AsyncGenerator%") {
|
|
21121
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
21122
|
+
if (fn) {
|
|
21123
|
+
value = fn.prototype;
|
|
21124
|
+
}
|
|
21125
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
21126
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
21127
|
+
if (gen && getProto) {
|
|
21128
|
+
value = getProto(gen.prototype);
|
|
21129
|
+
}
|
|
21130
|
+
}
|
|
21131
|
+
INTRINSICS[name] = value;
|
|
21132
|
+
return value;
|
|
21133
|
+
};
|
|
21134
|
+
var LEGACY_ALIASES = {
|
|
21135
|
+
__proto__: null,
|
|
21136
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
21137
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
21138
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
21139
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
21140
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
21141
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
21142
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
21143
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
21144
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
21145
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
21146
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
21147
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
21148
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
21149
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
21150
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
21151
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
21152
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
21153
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
21154
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
21155
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
21156
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
21157
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
21158
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
21159
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
21160
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
21161
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
21162
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
21163
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
21164
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
21165
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
21166
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
21167
|
+
"%Promise_all%": ["Promise", "all"],
|
|
21168
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
21169
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
21170
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
21171
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
21172
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
21173
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
21174
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
21175
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
21176
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
21177
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
21178
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
21179
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
21180
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
21181
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
21182
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
21183
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
21184
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
21185
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
21186
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
21187
|
+
};
|
|
21188
|
+
var bind2 = functionBind;
|
|
21189
|
+
var hasOwn = requireHasown();
|
|
21190
|
+
var $concat = bind2.call($call, Array.prototype.concat);
|
|
21191
|
+
var $spliceApply = bind2.call($apply, Array.prototype.splice);
|
|
21192
|
+
var $replace = bind2.call($call, String.prototype.replace);
|
|
21193
|
+
var $strSlice = bind2.call($call, String.prototype.slice);
|
|
21194
|
+
var $exec = bind2.call($call, RegExp.prototype.exec);
|
|
21195
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
21196
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
21197
|
+
var stringToPath = function stringToPath2(string) {
|
|
21198
|
+
var first = $strSlice(string, 0, 1);
|
|
21199
|
+
var last = $strSlice(string, -1);
|
|
21200
|
+
if (first === "%" && last !== "%") {
|
|
21201
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
21202
|
+
} else if (last === "%" && first !== "%") {
|
|
21203
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
21204
|
+
}
|
|
21205
|
+
var result = [];
|
|
21206
|
+
$replace(string, rePropName, function(match, number, quote2, subString) {
|
|
21207
|
+
result[result.length] = quote2 ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
21208
|
+
});
|
|
21209
|
+
return result;
|
|
21210
|
+
};
|
|
21211
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
21212
|
+
var intrinsicName = name;
|
|
21213
|
+
var alias;
|
|
21214
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
21215
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
21216
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
21217
|
+
}
|
|
21218
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
21219
|
+
var value = INTRINSICS[intrinsicName];
|
|
21220
|
+
if (value === needsEval) {
|
|
21221
|
+
value = doEval(intrinsicName);
|
|
21222
|
+
}
|
|
21223
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
21224
|
+
throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
21225
|
+
}
|
|
21226
|
+
return {
|
|
21227
|
+
alias,
|
|
21228
|
+
name: intrinsicName,
|
|
21229
|
+
value
|
|
21230
|
+
};
|
|
21231
|
+
}
|
|
21232
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
21233
|
+
};
|
|
21234
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
21235
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
21236
|
+
throw new $TypeError$3("intrinsic name must be a non-empty string");
|
|
21237
|
+
}
|
|
21238
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
21239
|
+
throw new $TypeError$3('"allowMissing" argument must be a boolean');
|
|
21240
|
+
}
|
|
21241
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
21242
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
21243
|
+
}
|
|
21244
|
+
var parts = stringToPath(name);
|
|
21245
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
21246
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
21247
|
+
var intrinsicRealName = intrinsic.name;
|
|
21248
|
+
var value = intrinsic.value;
|
|
21249
|
+
var skipFurtherCaching = false;
|
|
21250
|
+
var alias = intrinsic.alias;
|
|
21251
|
+
if (alias) {
|
|
21252
|
+
intrinsicBaseName = alias[0];
|
|
21253
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
21254
|
+
}
|
|
21255
|
+
for (var i2 = 1, isOwn = true; i2 < parts.length; i2 += 1) {
|
|
21256
|
+
var part = parts[i2];
|
|
21257
|
+
var first = $strSlice(part, 0, 1);
|
|
21258
|
+
var last = $strSlice(part, -1);
|
|
21259
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
21260
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
21261
|
+
}
|
|
21262
|
+
if (part === "constructor" || !isOwn) {
|
|
21263
|
+
skipFurtherCaching = true;
|
|
21264
|
+
}
|
|
21265
|
+
intrinsicBaseName += "." + part;
|
|
21266
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
21267
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
21268
|
+
value = INTRINSICS[intrinsicRealName];
|
|
21269
|
+
} else if (value != null) {
|
|
21270
|
+
if (!(part in value)) {
|
|
21271
|
+
if (!allowMissing) {
|
|
21272
|
+
throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available.");
|
|
21078
21273
|
}
|
|
21079
|
-
|
|
21080
|
-
|
|
21081
|
-
|
|
21274
|
+
return void 0;
|
|
21275
|
+
}
|
|
21276
|
+
if ($gOPD && i2 + 1 >= parts.length) {
|
|
21277
|
+
var desc = $gOPD(value, part);
|
|
21278
|
+
isOwn = !!desc;
|
|
21279
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
21280
|
+
value = desc.get;
|
|
21281
|
+
} else {
|
|
21282
|
+
value = value[part];
|
|
21082
21283
|
}
|
|
21083
21284
|
} else {
|
|
21084
|
-
|
|
21085
|
-
|
|
21285
|
+
isOwn = hasOwn(value, part);
|
|
21286
|
+
value = value[part];
|
|
21287
|
+
}
|
|
21288
|
+
if (isOwn && !skipFurtherCaching) {
|
|
21289
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
21290
|
+
}
|
|
21291
|
+
}
|
|
21292
|
+
}
|
|
21293
|
+
return value;
|
|
21294
|
+
};
|
|
21295
|
+
var GetIntrinsic$2 = getIntrinsic;
|
|
21296
|
+
var callBindBasic2 = callBindApplyHelpers;
|
|
21297
|
+
var $indexOf = callBindBasic2([GetIntrinsic$2("%String.prototype.indexOf%")]);
|
|
21298
|
+
var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
|
|
21299
|
+
var intrinsic = (
|
|
21300
|
+
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
21301
|
+
GetIntrinsic$2(name, !!allowMissing)
|
|
21302
|
+
);
|
|
21303
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
21304
|
+
return callBindBasic2(
|
|
21305
|
+
/** @type {const} */
|
|
21306
|
+
[intrinsic]
|
|
21307
|
+
);
|
|
21308
|
+
}
|
|
21309
|
+
return intrinsic;
|
|
21310
|
+
};
|
|
21311
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
21312
|
+
var callBound$1 = callBound$2;
|
|
21313
|
+
var inspect$2 = objectInspect;
|
|
21314
|
+
var $TypeError$2 = type;
|
|
21315
|
+
var $Map = GetIntrinsic$1("%Map%", true);
|
|
21316
|
+
var $mapGet = callBound$1("Map.prototype.get", true);
|
|
21317
|
+
var $mapSet = callBound$1("Map.prototype.set", true);
|
|
21318
|
+
var $mapHas = callBound$1("Map.prototype.has", true);
|
|
21319
|
+
var $mapDelete = callBound$1("Map.prototype.delete", true);
|
|
21320
|
+
var $mapSize = callBound$1("Map.prototype.size", true);
|
|
21321
|
+
var sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */
|
|
21322
|
+
function getSideChannelMap() {
|
|
21323
|
+
var $m;
|
|
21324
|
+
var channel = {
|
|
21325
|
+
assert: function(key) {
|
|
21326
|
+
if (!channel.has(key)) {
|
|
21327
|
+
throw new $TypeError$2("Side channel does not contain " + inspect$2(key));
|
|
21328
|
+
}
|
|
21329
|
+
},
|
|
21330
|
+
"delete": function(key) {
|
|
21331
|
+
if ($m) {
|
|
21332
|
+
var result = $mapDelete($m, key);
|
|
21333
|
+
if ($mapSize($m) === 0) {
|
|
21334
|
+
$m = void 0;
|
|
21086
21335
|
}
|
|
21336
|
+
return result;
|
|
21337
|
+
}
|
|
21338
|
+
return false;
|
|
21339
|
+
},
|
|
21340
|
+
get: function(key) {
|
|
21341
|
+
if ($m) {
|
|
21342
|
+
return $mapGet($m, key);
|
|
21087
21343
|
}
|
|
21088
21344
|
},
|
|
21089
21345
|
has: function(key) {
|
|
21090
|
-
if ($
|
|
21091
|
-
|
|
21092
|
-
return $weakMapHas($wm, key);
|
|
21093
|
-
}
|
|
21094
|
-
} else if ($Map) {
|
|
21095
|
-
if ($m) {
|
|
21096
|
-
return $mapHas($m, key);
|
|
21097
|
-
}
|
|
21098
|
-
} else {
|
|
21099
|
-
if ($o) {
|
|
21100
|
-
return listHas($o, key);
|
|
21101
|
-
}
|
|
21346
|
+
if ($m) {
|
|
21347
|
+
return $mapHas($m, key);
|
|
21102
21348
|
}
|
|
21103
21349
|
return false;
|
|
21104
21350
|
},
|
|
21105
21351
|
set: function(key, value) {
|
|
21106
|
-
if (
|
|
21107
|
-
|
|
21108
|
-
|
|
21352
|
+
if (!$m) {
|
|
21353
|
+
$m = new $Map();
|
|
21354
|
+
}
|
|
21355
|
+
$mapSet($m, key, value);
|
|
21356
|
+
}
|
|
21357
|
+
};
|
|
21358
|
+
return channel;
|
|
21359
|
+
};
|
|
21360
|
+
var GetIntrinsic2 = getIntrinsic;
|
|
21361
|
+
var callBound = callBound$2;
|
|
21362
|
+
var inspect$1 = objectInspect;
|
|
21363
|
+
var getSideChannelMap$1 = sideChannelMap;
|
|
21364
|
+
var $TypeError$1 = type;
|
|
21365
|
+
var $WeakMap = GetIntrinsic2("%WeakMap%", true);
|
|
21366
|
+
var $weakMapGet = callBound("WeakMap.prototype.get", true);
|
|
21367
|
+
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
|
21368
|
+
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
|
21369
|
+
var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
|
|
21370
|
+
var sideChannelWeakmap = $WeakMap ? (
|
|
21371
|
+
/** @type {Exclude<import('.'), false>} */
|
|
21372
|
+
function getSideChannelWeakMap() {
|
|
21373
|
+
var $wm;
|
|
21374
|
+
var $m;
|
|
21375
|
+
var channel = {
|
|
21376
|
+
assert: function(key) {
|
|
21377
|
+
if (!channel.has(key)) {
|
|
21378
|
+
throw new $TypeError$1("Side channel does not contain " + inspect$1(key));
|
|
21109
21379
|
}
|
|
21110
|
-
|
|
21111
|
-
|
|
21112
|
-
if (
|
|
21113
|
-
|
|
21380
|
+
},
|
|
21381
|
+
"delete": function(key) {
|
|
21382
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
21383
|
+
if ($wm) {
|
|
21384
|
+
return $weakMapDelete($wm, key);
|
|
21385
|
+
}
|
|
21386
|
+
} else if (getSideChannelMap$1) {
|
|
21387
|
+
if ($m) {
|
|
21388
|
+
return $m["delete"](key);
|
|
21389
|
+
}
|
|
21114
21390
|
}
|
|
21115
|
-
|
|
21116
|
-
}
|
|
21117
|
-
|
|
21118
|
-
|
|
21391
|
+
return false;
|
|
21392
|
+
},
|
|
21393
|
+
get: function(key) {
|
|
21394
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
21395
|
+
if ($wm) {
|
|
21396
|
+
return $weakMapGet($wm, key);
|
|
21397
|
+
}
|
|
21398
|
+
}
|
|
21399
|
+
return $m && $m.get(key);
|
|
21400
|
+
},
|
|
21401
|
+
has: function(key) {
|
|
21402
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
21403
|
+
if ($wm) {
|
|
21404
|
+
return $weakMapHas($wm, key);
|
|
21405
|
+
}
|
|
21406
|
+
}
|
|
21407
|
+
return !!$m && $m.has(key);
|
|
21408
|
+
},
|
|
21409
|
+
set: function(key, value) {
|
|
21410
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
21411
|
+
if (!$wm) {
|
|
21412
|
+
$wm = new $WeakMap();
|
|
21413
|
+
}
|
|
21414
|
+
$weakMapSet($wm, key, value);
|
|
21415
|
+
} else if (getSideChannelMap$1) {
|
|
21416
|
+
if (!$m) {
|
|
21417
|
+
$m = getSideChannelMap$1();
|
|
21418
|
+
}
|
|
21419
|
+
$m.set(key, value);
|
|
21119
21420
|
}
|
|
21120
|
-
listSet($o, key, value);
|
|
21121
21421
|
}
|
|
21422
|
+
};
|
|
21423
|
+
return channel;
|
|
21424
|
+
}
|
|
21425
|
+
) : getSideChannelMap$1;
|
|
21426
|
+
var $TypeError = type;
|
|
21427
|
+
var inspect = objectInspect;
|
|
21428
|
+
var getSideChannelList2 = sideChannelList;
|
|
21429
|
+
var getSideChannelMap2 = sideChannelMap;
|
|
21430
|
+
var getSideChannelWeakMap2 = sideChannelWeakmap;
|
|
21431
|
+
var makeChannel = getSideChannelWeakMap2 || getSideChannelMap2 || getSideChannelList2;
|
|
21432
|
+
var sideChannel = function getSideChannel() {
|
|
21433
|
+
var $channelData;
|
|
21434
|
+
var channel = {
|
|
21435
|
+
assert: function(key) {
|
|
21436
|
+
if (!channel.has(key)) {
|
|
21437
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
|
21438
|
+
}
|
|
21439
|
+
},
|
|
21440
|
+
"delete": function(key) {
|
|
21441
|
+
return !!$channelData && $channelData["delete"](key);
|
|
21442
|
+
},
|
|
21443
|
+
get: function(key) {
|
|
21444
|
+
return $channelData && $channelData.get(key);
|
|
21445
|
+
},
|
|
21446
|
+
has: function(key) {
|
|
21447
|
+
return !!$channelData && $channelData.has(key);
|
|
21448
|
+
},
|
|
21449
|
+
set: function(key, value) {
|
|
21450
|
+
if (!$channelData) {
|
|
21451
|
+
$channelData = makeChannel();
|
|
21452
|
+
}
|
|
21453
|
+
$channelData.set(key, value);
|
|
21122
21454
|
}
|
|
21123
21455
|
};
|
|
21124
21456
|
return channel;
|
|
@@ -21168,7 +21500,7 @@ var compactQueue = function compactQueue2(queue) {
|
|
|
21168
21500
|
}
|
|
21169
21501
|
};
|
|
21170
21502
|
var arrayToObject = function arrayToObject2(source, options) {
|
|
21171
|
-
var obj = options && options.plainObjects ?
|
|
21503
|
+
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
21172
21504
|
for (var i2 = 0; i2 < source.length; ++i2) {
|
|
21173
21505
|
if (typeof source[i2] !== "undefined") {
|
|
21174
21506
|
obj[i2] = source[i2];
|
|
@@ -21180,7 +21512,7 @@ var merge = function merge2(target, source, options) {
|
|
|
21180
21512
|
if (!source) {
|
|
21181
21513
|
return target;
|
|
21182
21514
|
}
|
|
21183
|
-
if (typeof source !== "object") {
|
|
21515
|
+
if (typeof source !== "object" && typeof source !== "function") {
|
|
21184
21516
|
if (isArray$2(target)) {
|
|
21185
21517
|
target.push(source);
|
|
21186
21518
|
} else if (target && typeof target === "object") {
|
|
@@ -21230,7 +21562,7 @@ var assign = function assignSingleSource(target, source) {
|
|
|
21230
21562
|
return acc;
|
|
21231
21563
|
}, target);
|
|
21232
21564
|
};
|
|
21233
|
-
var decode = function(str,
|
|
21565
|
+
var decode = function(str, defaultDecoder, charset) {
|
|
21234
21566
|
var strWithoutPlus = str.replace(/\+/g, " ");
|
|
21235
21567
|
if (charset === "iso-8859-1") {
|
|
21236
21568
|
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -21370,11 +21702,13 @@ var defaults$2 = {
|
|
|
21370
21702
|
arrayFormat: "indices",
|
|
21371
21703
|
charset: "utf-8",
|
|
21372
21704
|
charsetSentinel: false,
|
|
21705
|
+
commaRoundTrip: false,
|
|
21373
21706
|
delimiter: "&",
|
|
21374
21707
|
encode: true,
|
|
21375
21708
|
encodeDotInKeys: false,
|
|
21376
21709
|
encoder: utils$2.encode,
|
|
21377
21710
|
encodeValuesOnly: false,
|
|
21711
|
+
filter: void 0,
|
|
21378
21712
|
format: defaultFormat,
|
|
21379
21713
|
formatter: formats$1.formatters[defaultFormat],
|
|
21380
21714
|
// deprecated
|
|
@@ -21449,18 +21783,18 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
|
|
|
21449
21783
|
var keys = Object.keys(obj);
|
|
21450
21784
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
21451
21785
|
}
|
|
21452
|
-
var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, "%2E") : prefix;
|
|
21786
|
+
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
|
|
21453
21787
|
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
|
|
21454
21788
|
if (allowEmptyArrays && isArray$1(obj) && obj.length === 0) {
|
|
21455
21789
|
return adjustedPrefix + "[]";
|
|
21456
21790
|
}
|
|
21457
21791
|
for (var j2 = 0; j2 < objKeys.length; ++j2) {
|
|
21458
21792
|
var key = objKeys[j2];
|
|
21459
|
-
var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
21793
|
+
var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
21460
21794
|
if (skipNulls && value === null) {
|
|
21461
21795
|
continue;
|
|
21462
21796
|
}
|
|
21463
|
-
var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, "%2E") : key;
|
|
21797
|
+
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
|
|
21464
21798
|
var keyPrefix = isArray$1(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
|
|
21465
21799
|
sideChannel2.set(object, step);
|
|
21466
21800
|
var valueSideChannel = getSideChannel2();
|
|
@@ -21536,7 +21870,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
|
21536
21870
|
arrayFormat,
|
|
21537
21871
|
charset,
|
|
21538
21872
|
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults$2.charsetSentinel,
|
|
21539
|
-
commaRoundTrip: opts.commaRoundTrip,
|
|
21873
|
+
commaRoundTrip: !!opts.commaRoundTrip,
|
|
21540
21874
|
delimiter: typeof opts.delimiter === "undefined" ? defaults$2.delimiter : opts.delimiter,
|
|
21541
21875
|
encode: typeof opts.encode === "boolean" ? opts.encode : defaults$2.encode,
|
|
21542
21876
|
encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults$2.encodeDotInKeys,
|
|
@@ -21578,11 +21912,12 @@ var stringify_1 = function(object, opts) {
|
|
|
21578
21912
|
var sideChannel2 = getSideChannel2();
|
|
21579
21913
|
for (var i2 = 0; i2 < objKeys.length; ++i2) {
|
|
21580
21914
|
var key = objKeys[i2];
|
|
21581
|
-
|
|
21915
|
+
var value = obj[key];
|
|
21916
|
+
if (options.skipNulls && value === null) {
|
|
21582
21917
|
continue;
|
|
21583
21918
|
}
|
|
21584
21919
|
pushToArray(keys, stringify$1(
|
|
21585
|
-
|
|
21920
|
+
value,
|
|
21586
21921
|
key,
|
|
21587
21922
|
generateArrayPrefix,
|
|
21588
21923
|
commaRoundTrip,
|
|
@@ -21635,17 +21970,22 @@ var defaults$1 = {
|
|
|
21635
21970
|
parameterLimit: 1e3,
|
|
21636
21971
|
parseArrays: true,
|
|
21637
21972
|
plainObjects: false,
|
|
21638
|
-
|
|
21973
|
+
strictDepth: false,
|
|
21974
|
+
strictNullHandling: false,
|
|
21975
|
+
throwOnLimitExceeded: false
|
|
21639
21976
|
};
|
|
21640
21977
|
var interpretNumericEntities = function(str) {
|
|
21641
21978
|
return str.replace(/&#(\d+);/g, function($0, numberStr) {
|
|
21642
21979
|
return String.fromCharCode(parseInt(numberStr, 10));
|
|
21643
21980
|
});
|
|
21644
21981
|
};
|
|
21645
|
-
var parseArrayValue = function(val, options) {
|
|
21982
|
+
var parseArrayValue = function(val, options, currentArrayLength) {
|
|
21646
21983
|
if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
|
|
21647
21984
|
return val.split(",");
|
|
21648
21985
|
}
|
|
21986
|
+
if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
|
|
21987
|
+
throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
21988
|
+
}
|
|
21649
21989
|
return val;
|
|
21650
21990
|
};
|
|
21651
21991
|
var isoSentinel = "utf8=%26%2310003%3B";
|
|
@@ -21655,7 +21995,13 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
21655
21995
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
|
|
21656
21996
|
cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
21657
21997
|
var limit2 = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
21658
|
-
var parts = cleanStr.split(
|
|
21998
|
+
var parts = cleanStr.split(
|
|
21999
|
+
options.delimiter,
|
|
22000
|
+
options.throwOnLimitExceeded ? limit2 + 1 : limit2
|
|
22001
|
+
);
|
|
22002
|
+
if (options.throwOnLimitExceeded && parts.length > limit2) {
|
|
22003
|
+
throw new RangeError("Parameter limit exceeded. Only " + limit2 + " parameter" + (limit2 === 1 ? "" : "s") + " allowed.");
|
|
22004
|
+
}
|
|
21659
22005
|
var skipIndex = -1;
|
|
21660
22006
|
var i2;
|
|
21661
22007
|
var charset = options.charset;
|
|
@@ -21679,21 +22025,26 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
21679
22025
|
var part = parts[i2];
|
|
21680
22026
|
var bracketEqualsPos = part.indexOf("]=");
|
|
21681
22027
|
var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
|
|
21682
|
-
var key
|
|
22028
|
+
var key;
|
|
22029
|
+
var val;
|
|
21683
22030
|
if (pos === -1) {
|
|
21684
22031
|
key = options.decoder(part, defaults$1.decoder, charset, "key");
|
|
21685
22032
|
val = options.strictNullHandling ? null : "";
|
|
21686
22033
|
} else {
|
|
21687
22034
|
key = options.decoder(part.slice(0, pos), defaults$1.decoder, charset, "key");
|
|
21688
22035
|
val = utils$1.maybeMap(
|
|
21689
|
-
parseArrayValue(
|
|
22036
|
+
parseArrayValue(
|
|
22037
|
+
part.slice(pos + 1),
|
|
22038
|
+
options,
|
|
22039
|
+
isArray(obj[key]) ? obj[key].length : 0
|
|
22040
|
+
),
|
|
21690
22041
|
function(encodedVal) {
|
|
21691
22042
|
return options.decoder(encodedVal, defaults$1.decoder, charset, "value");
|
|
21692
22043
|
}
|
|
21693
22044
|
);
|
|
21694
22045
|
}
|
|
21695
22046
|
if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
|
|
21696
|
-
val = interpretNumericEntities(val);
|
|
22047
|
+
val = interpretNumericEntities(String(val));
|
|
21697
22048
|
}
|
|
21698
22049
|
if (part.indexOf("[]=") > -1) {
|
|
21699
22050
|
val = isArray(val) ? [val] : val;
|
|
@@ -21708,14 +22059,19 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
21708
22059
|
return obj;
|
|
21709
22060
|
};
|
|
21710
22061
|
var parseObject = function(chain, val, options, valuesParsed) {
|
|
21711
|
-
var
|
|
22062
|
+
var currentArrayLength = 0;
|
|
22063
|
+
if (chain.length > 0 && chain[chain.length - 1] === "[]") {
|
|
22064
|
+
var parentKey = chain.slice(0, -1).join("");
|
|
22065
|
+
currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
|
|
22066
|
+
}
|
|
22067
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
|
|
21712
22068
|
for (var i2 = chain.length - 1; i2 >= 0; --i2) {
|
|
21713
22069
|
var obj;
|
|
21714
22070
|
var root = chain[i2];
|
|
21715
22071
|
if (root === "[]" && options.parseArrays) {
|
|
21716
|
-
obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : []
|
|
22072
|
+
obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils$1.combine([], leaf);
|
|
21717
22073
|
} else {
|
|
21718
|
-
obj = options.plainObjects ?
|
|
22074
|
+
obj = options.plainObjects ? { __proto__: null } : {};
|
|
21719
22075
|
var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
|
|
21720
22076
|
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
|
|
21721
22077
|
var index = parseInt(decodedRoot, 10);
|
|
@@ -21761,6 +22117,9 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesPars
|
|
|
21761
22117
|
keys.push(segment[1]);
|
|
21762
22118
|
}
|
|
21763
22119
|
if (segment) {
|
|
22120
|
+
if (options.strictDepth === true) {
|
|
22121
|
+
throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
|
|
22122
|
+
}
|
|
21764
22123
|
keys.push("[" + key.slice(segment.index) + "]");
|
|
21765
22124
|
}
|
|
21766
22125
|
return parseObject(keys, val, options, valuesParsed);
|
|
@@ -21781,6 +22140,9 @@ var normalizeParseOptions = function normalizeParseOptions2(opts) {
|
|
|
21781
22140
|
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
|
|
21782
22141
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
21783
22142
|
}
|
|
22143
|
+
if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
|
|
22144
|
+
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
|
|
22145
|
+
}
|
|
21784
22146
|
var charset = typeof opts.charset === "undefined" ? defaults$1.charset : opts.charset;
|
|
21785
22147
|
var duplicates = typeof opts.duplicates === "undefined" ? defaults$1.duplicates : opts.duplicates;
|
|
21786
22148
|
if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
|
|
@@ -21807,16 +22169,18 @@ var normalizeParseOptions = function normalizeParseOptions2(opts) {
|
|
|
21807
22169
|
parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults$1.parameterLimit,
|
|
21808
22170
|
parseArrays: opts.parseArrays !== false,
|
|
21809
22171
|
plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults$1.plainObjects,
|
|
21810
|
-
|
|
22172
|
+
strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults$1.strictDepth,
|
|
22173
|
+
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults$1.strictNullHandling,
|
|
22174
|
+
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
|
|
21811
22175
|
};
|
|
21812
22176
|
};
|
|
21813
22177
|
var parse$2 = function(str, opts) {
|
|
21814
22178
|
var options = normalizeParseOptions(opts);
|
|
21815
22179
|
if (str === "" || str === null || typeof str === "undefined") {
|
|
21816
|
-
return options.plainObjects ?
|
|
22180
|
+
return options.plainObjects ? { __proto__: null } : {};
|
|
21817
22181
|
}
|
|
21818
22182
|
var tempObj = typeof str === "string" ? parseValues(str, options) : str;
|
|
21819
|
-
var obj = options.plainObjects ?
|
|
22183
|
+
var obj = options.plainObjects ? { __proto__: null } : {};
|
|
21820
22184
|
var keys = Object.keys(tempObj);
|
|
21821
22185
|
for (var i2 = 0; i2 < keys.length; ++i2) {
|
|
21822
22186
|
var key = keys[i2];
|
|
@@ -23140,9 +23504,9 @@ const _Color$1 = class _Color2 {
|
|
|
23140
23504
|
* @param min - Minimum value
|
|
23141
23505
|
* @param max - Maximum value
|
|
23142
23506
|
*/
|
|
23143
|
-
_clamp(value,
|
|
23144
|
-
return typeof value == "number" ? Math.min(Math.max(value,
|
|
23145
|
-
value[i2] = Math.min(Math.max(v2,
|
|
23507
|
+
_clamp(value, min2 = 0, max2 = 1) {
|
|
23508
|
+
return typeof value == "number" ? Math.min(Math.max(value, min2), max2) : (value.forEach((v2, i2) => {
|
|
23509
|
+
value[i2] = Math.min(Math.max(v2, min2), max2);
|
|
23146
23510
|
}), value);
|
|
23147
23511
|
}
|
|
23148
23512
|
};
|
|
@@ -23248,7 +23612,7 @@ function removeItems(arr, startIdx, removeCount) {
|
|
|
23248
23612
|
arr[i2] = arr[i2 + removeCount];
|
|
23249
23613
|
arr.length = len2;
|
|
23250
23614
|
}
|
|
23251
|
-
function
|
|
23615
|
+
function sign2(n2) {
|
|
23252
23616
|
return n2 === 0 ? 0 : n2 < 0 ? -1 : 1;
|
|
23253
23617
|
}
|
|
23254
23618
|
let nextUid = 0;
|
|
@@ -23465,7 +23829,7 @@ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
23465
23829
|
removeItems,
|
|
23466
23830
|
rgb2hex,
|
|
23467
23831
|
sayHello,
|
|
23468
|
-
sign,
|
|
23832
|
+
sign: sign2,
|
|
23469
23833
|
skipHello,
|
|
23470
23834
|
string2hex,
|
|
23471
23835
|
trimCanvas,
|
|
@@ -29173,8 +29537,8 @@ class ProjectionSystem {
|
|
|
29173
29537
|
* is y-flipped.
|
|
29174
29538
|
*/
|
|
29175
29539
|
calculateProjection(_destinationFrame, sourceFrame, _resolution, root) {
|
|
29176
|
-
const pm = this.projectionMatrix,
|
|
29177
|
-
pm.identity(), pm.a = 1 / sourceFrame.width * 2, pm.d =
|
|
29540
|
+
const pm = this.projectionMatrix, sign3 = root ? -1 : 1;
|
|
29541
|
+
pm.identity(), pm.a = 1 / sourceFrame.width * 2, pm.d = sign3 * (1 / sourceFrame.height * 2), pm.tx = -1 - sourceFrame.x * pm.a, pm.ty = -sign3 - sourceFrame.y * pm.d;
|
|
29178
29542
|
}
|
|
29179
29543
|
/**
|
|
29180
29544
|
* Sets the transform of the active render target to the given matrix.
|
|
@@ -33051,7 +33415,7 @@ class Sprite extends Container {
|
|
|
33051
33415
|
}
|
|
33052
33416
|
/** When the texture is updated, this event will fire to update the scale and frame. */
|
|
33053
33417
|
_onTextureUpdate() {
|
|
33054
|
-
this._textureID = -1, this._textureTrimmedID = -1, this._cachedTint = 16777215, this._width && (this.scale.x =
|
|
33418
|
+
this._textureID = -1, this._textureTrimmedID = -1, this._cachedTint = 16777215, this._width && (this.scale.x = sign2(this.scale.x) * this._width / this._texture.orig.width), this._height && (this.scale.y = sign2(this.scale.y) * this._height / this._texture.orig.height);
|
|
33055
33419
|
}
|
|
33056
33420
|
/** Called when the anchor position updates. */
|
|
33057
33421
|
_onAnchorUpdate() {
|
|
@@ -33170,7 +33534,7 @@ class Sprite extends Container {
|
|
|
33170
33534
|
return Math.abs(this.scale.x) * this._texture.orig.width;
|
|
33171
33535
|
}
|
|
33172
33536
|
set width(value) {
|
|
33173
|
-
const s2 =
|
|
33537
|
+
const s2 = sign2(this.scale.x) || 1;
|
|
33174
33538
|
this.scale.x = s2 * value / this._texture.orig.width, this._width = value;
|
|
33175
33539
|
}
|
|
33176
33540
|
/** The height of the sprite, setting this will actually modify the scale to achieve the value set. */
|
|
@@ -33178,7 +33542,7 @@ class Sprite extends Container {
|
|
|
33178
33542
|
return Math.abs(this.scale.y) * this._texture.orig.height;
|
|
33179
33543
|
}
|
|
33180
33544
|
set height(value) {
|
|
33181
|
-
const s2 =
|
|
33545
|
+
const s2 = sign2(this.scale.y) || 1;
|
|
33182
33546
|
this.scale.y = s2 * value / this._texture.orig.height, this._height = value;
|
|
33183
33547
|
}
|
|
33184
33548
|
/**
|
|
@@ -35863,7 +36227,7 @@ const defaultDestroyOptions = {
|
|
|
35863
36227
|
}
|
|
35864
36228
|
set width(value) {
|
|
35865
36229
|
this.updateText(true);
|
|
35866
|
-
const s2 =
|
|
36230
|
+
const s2 = sign2(this.scale.x) || 1;
|
|
35867
36231
|
this.scale.x = s2 * value / this._texture.orig.width, this._width = value;
|
|
35868
36232
|
}
|
|
35869
36233
|
/** The height of the Text, setting this will actually modify the scale to achieve the value set. */
|
|
@@ -35872,7 +36236,7 @@ const defaultDestroyOptions = {
|
|
|
35872
36236
|
}
|
|
35873
36237
|
set height(value) {
|
|
35874
36238
|
this.updateText(true);
|
|
35875
|
-
const s2 =
|
|
36239
|
+
const s2 = sign2(this.scale.y) || 1;
|
|
35876
36240
|
this.scale.y = s2 * value / this._texture.orig.height, this._height = value;
|
|
35877
36241
|
}
|
|
35878
36242
|
/**
|
|
@@ -38127,8 +38491,6 @@ const MOUSE_POINTER_ID = 1, TOUCH_TO_POINTER = {
|
|
|
38127
38491
|
*/
|
|
38128
38492
|
mapPositionToPoint(point, x2, y2) {
|
|
38129
38493
|
const rect = this.domElement.isConnected ? this.domElement.getBoundingClientRect() : {
|
|
38130
|
-
x: 0,
|
|
38131
|
-
y: 0,
|
|
38132
38494
|
width: this.domElement.width,
|
|
38133
38495
|
height: this.domElement.height,
|
|
38134
38496
|
left: 0,
|
|
@@ -38998,8 +39360,8 @@ class CanvasMaskSystem {
|
|
|
38998
39360
|
else if (shape.type === SHAPES.CIRC)
|
|
38999
39361
|
context2.arc(shape.x, shape.y, shape.radius, 0, 2 * Math.PI), context2.closePath();
|
|
39000
39362
|
else if (shape.type === SHAPES.ELIP) {
|
|
39001
|
-
const w2 = shape.width * 2, h2 = shape.height * 2, x2 = shape.x - w2 / 2, y2 = shape.y - h2 / 2, kappa = 0.5522848, ox = w2 / 2 * kappa, oy = h2 / 2 * kappa,
|
|
39002
|
-
context2.moveTo(x2, ym), context2.bezierCurveTo(x2, ym - oy, xm - ox, y2, xm, y2), context2.bezierCurveTo(xm + ox, y2,
|
|
39363
|
+
const w2 = shape.width * 2, h2 = shape.height * 2, x2 = shape.x - w2 / 2, y2 = shape.y - h2 / 2, kappa = 0.5522848, ox = w2 / 2 * kappa, oy = h2 / 2 * kappa, xe = x2 + w2, ye = y2 + h2, xm = x2 + w2 / 2, ym = y2 + h2 / 2;
|
|
39364
|
+
context2.moveTo(x2, ym), context2.bezierCurveTo(x2, ym - oy, xm - ox, y2, xm, y2), context2.bezierCurveTo(xm + ox, y2, xe, ym - oy, xe, ym), context2.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye), context2.bezierCurveTo(xm - ox, ye, x2, ym + oy, x2, ym), context2.closePath();
|
|
39003
39365
|
} else if (shape.type === SHAPES.RREC) {
|
|
39004
39366
|
const rx = shape.x, ry = shape.y, width = shape.width, height = shape.height;
|
|
39005
39367
|
let radius = shape.radius;
|
|
@@ -39376,8 +39738,10 @@ const canvasUtils = {
|
|
|
39376
39738
|
canvas = texture.tintCache[stringColor];
|
|
39377
39739
|
} else
|
|
39378
39740
|
canvas = settings.ADAPTER.createCanvas();
|
|
39379
|
-
if (canvasUtils.tintMethod(texture, color, canvas), canvas.tintId = texture._updateID, canvasUtils.convertTintToImage)
|
|
39380
|
-
|
|
39741
|
+
if (canvasUtils.tintMethod(texture, color, canvas), canvas.tintId = texture._updateID, canvasUtils.convertTintToImage && canvas.toDataURL !== void 0) {
|
|
39742
|
+
const tintImage = new Image();
|
|
39743
|
+
tintImage.src = canvas.toDataURL(), texture.tintCache[stringColor] = tintImage;
|
|
39744
|
+
} else
|
|
39381
39745
|
texture.tintCache[stringColor] = canvas;
|
|
39382
39746
|
return canvas;
|
|
39383
39747
|
},
|
|
@@ -39752,8 +40116,8 @@ class CanvasGraphicsRenderer {
|
|
|
39752
40116
|
* @param context - The canvas context
|
|
39753
40117
|
*/
|
|
39754
40118
|
paintEllipse(shape, fillStyle, lineStyle, contextFillStyle, worldAlpha, context2) {
|
|
39755
|
-
const w2 = shape.width * 2, h2 = shape.height * 2, x2 = shape.x - w2 / 2, y2 = shape.y - h2 / 2, kappa = 0.5522848, ox = w2 / 2 * kappa, oy = h2 / 2 * kappa,
|
|
39756
|
-
lineStyle.alignment === 0 && context2.save(), context2.beginPath(), context2.moveTo(x2, ym), context2.bezierCurveTo(x2, ym - oy, xm - ox, y2, xm, y2), context2.bezierCurveTo(xm + ox, y2,
|
|
40119
|
+
const w2 = shape.width * 2, h2 = shape.height * 2, x2 = shape.x - w2 / 2, y2 = shape.y - h2 / 2, kappa = 0.5522848, ox = w2 / 2 * kappa, oy = h2 / 2 * kappa, xe = x2 + w2, ye = y2 + h2, xm = x2 + w2 / 2, ym = y2 + h2 / 2;
|
|
40120
|
+
lineStyle.alignment === 0 && context2.save(), context2.beginPath(), context2.moveTo(x2, ym), context2.bezierCurveTo(x2, ym - oy, xm - ox, y2, xm, y2), context2.bezierCurveTo(xm + ox, y2, xe, ym - oy, xe, ym), context2.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye), context2.bezierCurveTo(xm - ox, ye, x2, ym + oy, x2, ym), context2.closePath(), lineStyle.alignment === 0 && context2.clip(), fillStyle.visible && (context2.globalAlpha = fillStyle.alpha * worldAlpha, context2.fillStyle = contextFillStyle, context2.fill()), lineStyle.alignment === 0 && context2.restore();
|
|
39757
40121
|
}
|
|
39758
40122
|
/**
|
|
39759
40123
|
* Paint Rounded Rectangle
|
|
@@ -41685,7 +42049,7 @@ var __typeError = (msg) => {
|
|
|
41685
42049
|
throw TypeError(msg);
|
|
41686
42050
|
};
|
|
41687
42051
|
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
41688
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"),
|
|
42052
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), member.get(obj));
|
|
41689
42053
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
41690
42054
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
41691
42055
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
@@ -41768,12 +42132,12 @@ class CursorCoordinates extends Helper {
|
|
|
41768
42132
|
if (!this.rootEl) return;
|
|
41769
42133
|
this.setData({
|
|
41770
42134
|
cursor: [
|
|
41771
|
-
|
|
42135
|
+
q$1(
|
|
41772
42136
|
this.floorPlan.interaction.cursor[0],
|
|
41773
42137
|
this.floorPlan.settings.units.system,
|
|
41774
42138
|
this.floorPlan.settings.units.lengthDecimals
|
|
41775
42139
|
),
|
|
41776
|
-
|
|
42140
|
+
q$1(
|
|
41777
42141
|
this.floorPlan.interaction.cursor[1],
|
|
41778
42142
|
this.floorPlan.settings.units.system,
|
|
41779
42143
|
this.floorPlan.settings.units.lengthDecimals
|
|
@@ -41920,8 +42284,8 @@ class ScaleBar extends Helper {
|
|
|
41920
42284
|
}
|
|
41921
42285
|
backgroundClr() {
|
|
41922
42286
|
function hexToRgba(hex, opacity = 1) {
|
|
41923
|
-
if (
|
|
41924
|
-
const { r: r2, g: g2, b: b2 } =
|
|
42287
|
+
if (ce(hex)) {
|
|
42288
|
+
const { r: r2, g: g2, b: b2 } = ae(hex);
|
|
41925
42289
|
return `rgba(${r2},${g2},${b2},${opacity})`;
|
|
41926
42290
|
}
|
|
41927
42291
|
}
|
|
@@ -41968,8 +42332,7 @@ const IconCloseBlack = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40
|
|
|
41968
42332
|
</svg>`;
|
|
41969
42333
|
const defaults = {
|
|
41970
42334
|
w: 100,
|
|
41971
|
-
h: 80
|
|
41972
|
-
tip: 15
|
|
42335
|
+
h: 80
|
|
41973
42336
|
};
|
|
41974
42337
|
class InfoWindow {
|
|
41975
42338
|
constructor({
|
|
@@ -42024,7 +42387,7 @@ class InfoWindow {
|
|
|
42024
42387
|
_updateInfoWindow() {
|
|
42025
42388
|
if (!this.el) return;
|
|
42026
42389
|
const isPanning = this._floorPlan.interaction.isPanning;
|
|
42027
|
-
const
|
|
42390
|
+
const pe = isPanning ? "pointer-events: none;" : "";
|
|
42028
42391
|
const x2 = this._anchorPos[0] - 47;
|
|
42029
42392
|
const y2 = this._anchorPos[1] - this.height - 15;
|
|
42030
42393
|
const i2 = 1e3 + this.position[1] * 2;
|
|
@@ -42032,7 +42395,7 @@ class InfoWindow {
|
|
|
42032
42395
|
const w2 = this.width;
|
|
42033
42396
|
this.el.setAttribute(
|
|
42034
42397
|
"style",
|
|
42035
|
-
`transform: translate(${x2}px, ${y2}px);${
|
|
42398
|
+
`transform: translate(${x2}px, ${y2}px);${pe} height:${h2}px; width:${w2}px; z-index:${i2}`
|
|
42036
42399
|
);
|
|
42037
42400
|
}
|
|
42038
42401
|
set({ width, height, position, html, closeButton }) {
|
|
@@ -42523,9 +42886,9 @@ const _Color = class _Color22 {
|
|
|
42523
42886
|
* @param min - Minimum value
|
|
42524
42887
|
* @param max - Maximum value
|
|
42525
42888
|
*/
|
|
42526
|
-
_clamp(value,
|
|
42527
|
-
return typeof value == "number" ? Math.min(Math.max(value,
|
|
42528
|
-
value[i2] = Math.min(Math.max(v2,
|
|
42889
|
+
_clamp(value, min2 = 0, max2 = 1) {
|
|
42890
|
+
return typeof value == "number" ? Math.min(Math.max(value, min2), max2) : (value.forEach((v2, i2) => {
|
|
42891
|
+
value[i2] = Math.min(Math.max(v2, min2), max2);
|
|
42529
42892
|
}), value);
|
|
42530
42893
|
}
|
|
42531
42894
|
};
|
|
@@ -42704,10 +43067,10 @@ function drawImage({ shape, settings: fpeSettings, style, gfx }) {
|
|
|
42704
43067
|
}
|
|
42705
43068
|
let sprite = Sprite.from(url2);
|
|
42706
43069
|
if (shape.type === "curve:polygon") {
|
|
42707
|
-
let { min, max: max2 } = polygonBounds([shape.points]);
|
|
42708
|
-
width = max2[0] -
|
|
42709
|
-
height = max2[1] -
|
|
42710
|
-
position =
|
|
43070
|
+
let { min: min2, max: max2 } = polygonBounds([shape.points]);
|
|
43071
|
+
width = max2[0] - min2[0];
|
|
43072
|
+
height = max2[1] - min2[1];
|
|
43073
|
+
position = min2;
|
|
42711
43074
|
let maskGfx = new Graphics();
|
|
42712
43075
|
drawShape({
|
|
42713
43076
|
shape: { type: "curve:polygon", points: shape.points, style: { fill: 16777215 } },
|
|
@@ -43109,7 +43472,7 @@ function getProductGraphics(element, nodeContainer, floorPlan, style) {
|
|
|
43109
43472
|
])
|
|
43110
43473
|
);
|
|
43111
43474
|
gfx.hitArea = hitArea;
|
|
43112
|
-
gfx.
|
|
43475
|
+
gfx.eventMode = "static";
|
|
43113
43476
|
}
|
|
43114
43477
|
if (style === "selected") {
|
|
43115
43478
|
if (!textureData.contourTexture) {
|
|
@@ -43198,6 +43561,7 @@ function createNodeGraphics(node, nodeContainer, floorPlan, style, preview, ctx)
|
|
|
43198
43561
|
if (contourGfx) nodeContainer.addChild(contourGfx);
|
|
43199
43562
|
}
|
|
43200
43563
|
function drawNode(node, floorPlan, { ctx, style, container, preview }) {
|
|
43564
|
+
var _a, _b, _c;
|
|
43201
43565
|
const { view, settings: settings2 } = floorPlan;
|
|
43202
43566
|
if (!(node == null ? void 0 : node.spaceGraph)) return;
|
|
43203
43567
|
if (!preview) {
|
|
@@ -43223,7 +43587,8 @@ function drawNode(node, floorPlan, { ctx, style, container, preview }) {
|
|
|
43223
43587
|
"spatialGraph:edge"
|
|
43224
43588
|
];
|
|
43225
43589
|
const skipGraphic = settings2.hideElements.includes(node.type) || // conditionally draw edges and floor plan images
|
|
43226
|
-
node.type === "spatialGraph:edge" && !settings2.showSpaceDividers || node.type === "element:spaceDivider" || node.type === "annotation:floorPlanImage" && !settings2.showFloorPlan || //
|
|
43590
|
+
node.type === "spatialGraph:edge" && !settings2.showSpaceDividers || node.type === "element:spaceDivider" || node.type === "annotation:floorPlanImage" && !settings2.showFloorPlan || // skip ceiling lights when hidden
|
|
43591
|
+
node.type === "element:asset" && "product" in node && ((_c = (_b = (_a = node.product) == null ? void 0 : _a.attributes) == null ? void 0 : _b.subCategories) == null ? void 0 : _c.includes("ceilingLight")) && !settings2.showCeilingLamps || // don't draw 'element:floor' and 'element:ceiling' because we already draw the space
|
|
43227
43592
|
"space" in node || // skip detached opening elements
|
|
43228
43593
|
(node.type === "element:window" || node.type === "element:door") && !node.parent || // skip structural elements if merged wall contours are drawn
|
|
43229
43594
|
floorPlan.computed.wallContours.length && wallContourTypes.includes(node.type);
|
|
@@ -43305,9 +43670,9 @@ function _getZoomExtentsBoundingBox({
|
|
|
43305
43670
|
const rectWidth = rectRight - rectLeft;
|
|
43306
43671
|
const rectHeight = rectBottom - rectTop;
|
|
43307
43672
|
const fittedBoundingBox = fitBoundingBox(layoutBoundingBox, rectWidth, rectHeight);
|
|
43308
|
-
let { min, max: max2 } = fittedBoundingBox;
|
|
43309
|
-
let x2 =
|
|
43310
|
-
let z2 =
|
|
43673
|
+
let { min: min2, max: max2 } = fittedBoundingBox;
|
|
43674
|
+
let x2 = min2[0];
|
|
43675
|
+
let z2 = min2[1];
|
|
43311
43676
|
let length2 = max2[0] - x2;
|
|
43312
43677
|
let width = max2[1] - z2;
|
|
43313
43678
|
const scaleWidth = viewportWidth / rectWidth;
|
|
@@ -43345,9 +43710,9 @@ function _setZoom({
|
|
|
43345
43710
|
return new Promise((resolve2) => {
|
|
43346
43711
|
var _a;
|
|
43347
43712
|
if (!Number.isFinite((_a = bb.min) == null ? void 0 : _a[0])) resolve2(false);
|
|
43348
|
-
const { min, max: max2 } = bb;
|
|
43349
|
-
let boundingBoxX =
|
|
43350
|
-
let boundingBoxZ =
|
|
43713
|
+
const { min: min2, max: max2 } = bb;
|
|
43714
|
+
let boundingBoxX = min2[0];
|
|
43715
|
+
let boundingBoxZ = min2[1];
|
|
43351
43716
|
const boundingBoxX2 = max2[0];
|
|
43352
43717
|
const boundingBoxZ2 = max2[1];
|
|
43353
43718
|
let boundingBoxLength = boundingBoxX2 - boundingBoxX;
|
|
@@ -44173,7 +44538,7 @@ function saveImage(canvas, { format: format2 = "png", fileName = "floorplan", qu
|
|
|
44173
44538
|
let type2 = format2 === "png" ? "image/png" : "image/jpeg";
|
|
44174
44539
|
canvas.toBlob(
|
|
44175
44540
|
function(blob) {
|
|
44176
|
-
|
|
44541
|
+
oe({ fileName, href: URL.createObjectURL(blob), ext: format2 });
|
|
44177
44542
|
},
|
|
44178
44543
|
type2,
|
|
44179
44544
|
quality
|
|
@@ -44346,11 +44711,11 @@ class PolygonHelper extends Helper {
|
|
|
44346
44711
|
}
|
|
44347
44712
|
getLengthText(length2) {
|
|
44348
44713
|
const { units } = this.floorPlan.settings;
|
|
44349
|
-
return
|
|
44714
|
+
return q$1(length2, units.system, units.lengthDecimals);
|
|
44350
44715
|
}
|
|
44351
44716
|
getAreaText(area2) {
|
|
44352
44717
|
const { units } = this.floorPlan.settings;
|
|
44353
|
-
return
|
|
44718
|
+
return Ue(area2, units.system, units.areaDecimals);
|
|
44354
44719
|
}
|
|
44355
44720
|
reset() {
|
|
44356
44721
|
this.drawing = false;
|
|
@@ -44849,7 +45214,7 @@ class FloorPlanEngine extends FloorPlanCore {
|
|
|
44849
45214
|
drawNode(node, this, { preview: true, style, ctx: layer.container });
|
|
44850
45215
|
}
|
|
44851
45216
|
drawNodeUpdate(id, style) {
|
|
44852
|
-
var _a, _b, _c, _d,
|
|
45217
|
+
var _a, _b, _c, _d, _e2;
|
|
44853
45218
|
if (!this.layout) {
|
|
44854
45219
|
return;
|
|
44855
45220
|
}
|
|
@@ -44860,7 +45225,7 @@ class FloorPlanEngine extends FloorPlanCore {
|
|
|
44860
45225
|
drawUpdate(node, this, { style });
|
|
44861
45226
|
} else {
|
|
44862
45227
|
let ctx = this.view.gfxLayers.scene;
|
|
44863
|
-
if ("parent" in node && this.view.gfxNodes[(
|
|
45228
|
+
if ("parent" in node && this.view.gfxNodes[(_e2 = node.parent) == null ? void 0 : _e2.id]) {
|
|
44864
45229
|
ctx = this.view.gfxNodes[node.parent.id];
|
|
44865
45230
|
}
|
|
44866
45231
|
drawNode(node, this, { ctx, style });
|
|
@@ -44888,7 +45253,7 @@ class FloorPlanEngine extends FloorPlanCore {
|
|
|
44888
45253
|
const fpePlan = document.createElement("div");
|
|
44889
45254
|
fpePlan.classList.add("fpe__plan");
|
|
44890
45255
|
const fpeCanvas = document.createElement("canvas");
|
|
44891
|
-
fpeCanvas.
|
|
45256
|
+
fpeCanvas.setAttribute("alt", "fpe-canvas");
|
|
44892
45257
|
fpeCanvas.classList.add("fpe__canvas");
|
|
44893
45258
|
fpeNode.appendChild(fpePlan);
|
|
44894
45259
|
fpePlan.appendChild(fpeCanvas);
|
|
@@ -45051,7 +45416,10 @@ class FloorPlanEngine extends FloorPlanCore {
|
|
|
45051
45416
|
if (!element) {
|
|
45052
45417
|
return Promise.resolve(true);
|
|
45053
45418
|
}
|
|
45054
|
-
const {
|
|
45419
|
+
const {
|
|
45420
|
+
min: [x2, _y, z2],
|
|
45421
|
+
max: [x22, _y2, z22]
|
|
45422
|
+
} = element.getAxisAlignedBoundingBox();
|
|
45055
45423
|
const boundingBox2d = {
|
|
45056
45424
|
min: [x2 - margin, z2 - margin],
|
|
45057
45425
|
max: [x22 + margin, z22 + margin]
|
|
@@ -45076,9 +45444,9 @@ class FloorPlanEngine extends FloorPlanCore {
|
|
|
45076
45444
|
zoomByFactor(factor, animate = true) {
|
|
45077
45445
|
if (!Number.isFinite(factor) || factor <= 0)
|
|
45078
45446
|
return Promise.reject("factor is not a positive number");
|
|
45079
|
-
let { min, max: max2 } = this.view.viewbox;
|
|
45080
|
-
let x2 =
|
|
45081
|
-
let z2 =
|
|
45447
|
+
let { min: min2, max: max2 } = this.view.viewbox;
|
|
45448
|
+
let x2 = min2[0];
|
|
45449
|
+
let z2 = min2[1];
|
|
45082
45450
|
let length2 = max2[0] - x2;
|
|
45083
45451
|
let width = max2[1] - z2;
|
|
45084
45452
|
const newLength = length2 / factor;
|
|
@@ -45200,7 +45568,7 @@ class FloorPlanEngine extends FloorPlanCore {
|
|
|
45200
45568
|
maxWidth,
|
|
45201
45569
|
download: download2 = false
|
|
45202
45570
|
} = {}) {
|
|
45203
|
-
let dataArgs = { format: format2, quality
|
|
45571
|
+
let dataArgs = { format: format2, quality };
|
|
45204
45572
|
if (download2) dataArgs.format = "png";
|
|
45205
45573
|
const canvas = document.querySelector("#" + this.fpeId + " canvas");
|
|
45206
45574
|
const dataUrl = await canvasToDataUrl(canvas, dataArgs).catch((err) => {
|