iflow-engine-base 3.10.7 → 3.10.9
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/bim-engine-sdk.es.js +36 -34
- package/dist/bim-engine-sdk.umd.js +727 -727
- package/dist/chunks/{engine-2d-DsaDpJPQ.js → engine-2d-DVhZzZy6.js} +139 -114
- package/dist/chunks/{engine-3d-XJ7zBlLL.js → engine-3d-LN_LUozy.js} +1800 -1742
- package/dist/chunks/{engine-720-CZj_sSsS.js → engine-720-CxFTL7AO.js} +132 -113
- package/dist/chunks/{engine-gaussian-CX0k_s78.js → engine-gaussian-BTf-NLZ0.js} +617 -579
- package/dist/chunks/{engine-gis-N6XH8qUs.js → engine-gis-BpK8Yk97.js} +10645 -10542
- package/dist/chunks/sdk-assets-RCyRdW2b.js +208 -0
- package/dist/chunks/{sdk-runtime-DTY-QKTD.js → sdk-runtime-CUsuUcES.js} +1557 -1513
- package/dist/chunks/{three-vendor-CAbFcmaK.js → three-vendor-fDCVai2b.js} +2 -1
- package/dist/iflow-engine-base.css +1 -1
- package/dist/index.d.ts +65 -4
- package/dist2d/dwg-preview.es.js +1874 -1762
- package/dist2d/dwg-preview.umd.js +20 -20
- package/distGaussian/gaussian.es.js +9345 -6986
- package/distGaussian/gaussian.umd.js +23 -22
- package/package.json +1 -1
- package/dist/chunks/sdk-assets-1SXx8Tbf.js +0 -84
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { J as I } from "./engine-2d-DVhZzZy6.js";
|
|
2
|
+
import { b8 as w } from "./three-vendor-fDCVai2b.js";
|
|
3
|
+
const _ = "__BIM_ENGINE_SDK_ASSET_BASE__", S = "__BIM_ENGINE_SDK_ASSET_FILE_MAP__", b = "__BIM_ENGINE_SDK_ASSET_FILE_URLS__", g = "__BIM_ENGINE_SDK_ASSET_FILE_SESSION__", M = "https://unpkg.com/iflow-engine-base@3.9.20/dist/", A = "https://__bim_engine_sdk_asset__/", R = ["assets/", "fonts/", "draco/", "basis/", "texture/", "prompt/"];
|
|
4
|
+
function l() {
|
|
5
|
+
return typeof globalThis < "u" ? globalThis : null;
|
|
6
|
+
}
|
|
7
|
+
function u(t) {
|
|
8
|
+
return t.endsWith("/") ? t : `${t}/`;
|
|
9
|
+
}
|
|
10
|
+
function c(t) {
|
|
11
|
+
return String(t).replace(/\\/g, "/").replace(/^\/+/, "").replace(/\/+/g, "/");
|
|
12
|
+
}
|
|
13
|
+
function h(t) {
|
|
14
|
+
return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(t) || /^(?:data|blob):/i.test(t);
|
|
15
|
+
}
|
|
16
|
+
function j(t) {
|
|
17
|
+
return t.startsWith("./") || t.startsWith("../");
|
|
18
|
+
}
|
|
19
|
+
function f(t, e) {
|
|
20
|
+
try {
|
|
21
|
+
return e ? new URL(t, e).toString() : new URL(t).toString();
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function y(t) {
|
|
27
|
+
return /\.zip$/i.test(t.name);
|
|
28
|
+
}
|
|
29
|
+
function F() {
|
|
30
|
+
return `${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
31
|
+
}
|
|
32
|
+
function T(t) {
|
|
33
|
+
return t.startsWith(A);
|
|
34
|
+
}
|
|
35
|
+
function L() {
|
|
36
|
+
const e = l()?.[g];
|
|
37
|
+
return typeof e == "string" && e ? `${A}${e}/` : null;
|
|
38
|
+
}
|
|
39
|
+
function v(t) {
|
|
40
|
+
return `${L() ?? A}${c(t)}`;
|
|
41
|
+
}
|
|
42
|
+
function m() {
|
|
43
|
+
const e = l()?.[S];
|
|
44
|
+
return e instanceof Map ? e : null;
|
|
45
|
+
}
|
|
46
|
+
function z() {
|
|
47
|
+
const e = l()?.[b];
|
|
48
|
+
return Array.isArray(e) ? e : [];
|
|
49
|
+
}
|
|
50
|
+
function U() {
|
|
51
|
+
const t = l();
|
|
52
|
+
t && (z().forEach((e) => URL.revokeObjectURL(e)), delete t[S], delete t[b], delete t[g]);
|
|
53
|
+
}
|
|
54
|
+
function K(t, e) {
|
|
55
|
+
const n = l();
|
|
56
|
+
n && (U(), n[S] = t, n[b] = e, n[g] = F());
|
|
57
|
+
}
|
|
58
|
+
function D(t, e, n) {
|
|
59
|
+
const s = c(e), r = /* @__PURE__ */ new Set([s]), o = s.indexOf("dist/");
|
|
60
|
+
o >= 0 && r.add(s.slice(o + 5));
|
|
61
|
+
const i = s.indexOf("public/");
|
|
62
|
+
i >= 0 && r.add(s.slice(i + 7));
|
|
63
|
+
for (const a of R) {
|
|
64
|
+
const E = s.indexOf(a);
|
|
65
|
+
E >= 0 && r.add(s.slice(E));
|
|
66
|
+
}
|
|
67
|
+
r.forEach((a) => {
|
|
68
|
+
a && (t.set(a, n), t.set(a.toLowerCase(), n));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function O(t) {
|
|
72
|
+
const e = m();
|
|
73
|
+
if (!e)
|
|
74
|
+
return null;
|
|
75
|
+
const n = c(t);
|
|
76
|
+
return e.get(n) ?? e.get(n.toLowerCase()) ?? null;
|
|
77
|
+
}
|
|
78
|
+
function p(t) {
|
|
79
|
+
const e = m();
|
|
80
|
+
if (!e)
|
|
81
|
+
return !1;
|
|
82
|
+
const n = c(t).replace(/\/?$/, "/").toLowerCase();
|
|
83
|
+
for (const s of e.keys())
|
|
84
|
+
if (s.toLowerCase().startsWith(n))
|
|
85
|
+
return !0;
|
|
86
|
+
return !1;
|
|
87
|
+
}
|
|
88
|
+
function N(t) {
|
|
89
|
+
if (!T(t))
|
|
90
|
+
return null;
|
|
91
|
+
const e = L();
|
|
92
|
+
if (!e || !t.startsWith(e))
|
|
93
|
+
return null;
|
|
94
|
+
const n = t.slice(e.length);
|
|
95
|
+
return O(n);
|
|
96
|
+
}
|
|
97
|
+
w.setURLModifier((t) => N(t) ?? t);
|
|
98
|
+
async function k(t) {
|
|
99
|
+
const e = [];
|
|
100
|
+
for (const n of t) {
|
|
101
|
+
const s = c(n.webkitRelativePath || n.name);
|
|
102
|
+
if (y(n)) {
|
|
103
|
+
const r = await I.loadAsync(n), o = Object.values(r.files);
|
|
104
|
+
for (const i of o)
|
|
105
|
+
i.dir || e.push({
|
|
106
|
+
path: c(i.name),
|
|
107
|
+
blob: await i.async("blob")
|
|
108
|
+
});
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
e.push({
|
|
112
|
+
path: s,
|
|
113
|
+
blob: n
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return e;
|
|
117
|
+
}
|
|
118
|
+
function B() {
|
|
119
|
+
return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
|
|
120
|
+
}
|
|
121
|
+
function P(t, e) {
|
|
122
|
+
const n = u(t);
|
|
123
|
+
if (h(n))
|
|
124
|
+
return n;
|
|
125
|
+
const s = d(e) || W() || B();
|
|
126
|
+
return f(n, s || void 0) || n;
|
|
127
|
+
}
|
|
128
|
+
function d(t) {
|
|
129
|
+
if (!t)
|
|
130
|
+
return null;
|
|
131
|
+
try {
|
|
132
|
+
const e = B(), n = f(t, e || void 0) || t, s = new URL(".", n), r = s.pathname.replace(/\\/g, "/");
|
|
133
|
+
return r.endsWith("/chunks/") ? new URL("../", s).toString() : e && /\/src\//.test(r) ? u(e) : s.toString();
|
|
134
|
+
} catch {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function W() {
|
|
139
|
+
if (typeof document > "u")
|
|
140
|
+
return null;
|
|
141
|
+
const t = document.currentScript;
|
|
142
|
+
if (t?.src)
|
|
143
|
+
return d(t.src);
|
|
144
|
+
const e = document.getElementsByTagName("script");
|
|
145
|
+
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
146
|
+
const s = e[n]?.src;
|
|
147
|
+
if (s && /(?:bim-engine-sdk|iflow-engine-base|dwg-preview|gaussian)\.(?:es|umd)\.js(?:[?#].*)?$/.test(s))
|
|
148
|
+
return d(s);
|
|
149
|
+
}
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
function V(t) {
|
|
153
|
+
const e = l();
|
|
154
|
+
if (e) {
|
|
155
|
+
if (!t) {
|
|
156
|
+
delete e[_];
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
e[_] = u(t);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async function x(t) {
|
|
163
|
+
if (!t || t.length === 0) {
|
|
164
|
+
U();
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const e = Array.from(t), n = await k(e), s = /* @__PURE__ */ new Map(), r = [];
|
|
168
|
+
n.forEach((o) => {
|
|
169
|
+
const i = URL.createObjectURL(o.blob);
|
|
170
|
+
r.push(i), D(s, o.path, i);
|
|
171
|
+
}), K(s, r);
|
|
172
|
+
}
|
|
173
|
+
async function Y(t) {
|
|
174
|
+
await x(t ? [t] : null);
|
|
175
|
+
}
|
|
176
|
+
function $(t) {
|
|
177
|
+
const e = L();
|
|
178
|
+
if (e)
|
|
179
|
+
return e;
|
|
180
|
+
const s = l()?.[_];
|
|
181
|
+
return typeof s == "string" && s.length > 0 ? P(s, t) : u(M);
|
|
182
|
+
}
|
|
183
|
+
function J(t, e) {
|
|
184
|
+
if (h(t))
|
|
185
|
+
return t;
|
|
186
|
+
const n = c(t), s = O(n);
|
|
187
|
+
if (s && !t.endsWith("/"))
|
|
188
|
+
return s;
|
|
189
|
+
if (t.endsWith("/") || p(n)) {
|
|
190
|
+
const o = v(n);
|
|
191
|
+
if (p(n))
|
|
192
|
+
return t.endsWith("/") ? u(o) : o;
|
|
193
|
+
}
|
|
194
|
+
if (j(t)) {
|
|
195
|
+
const o = f(t, d(e) || void 0);
|
|
196
|
+
if (o)
|
|
197
|
+
return o;
|
|
198
|
+
}
|
|
199
|
+
const r = $(e);
|
|
200
|
+
return f(n, r) || n;
|
|
201
|
+
}
|
|
202
|
+
export {
|
|
203
|
+
Y as a,
|
|
204
|
+
V as b,
|
|
205
|
+
$ as g,
|
|
206
|
+
J as r,
|
|
207
|
+
x as s
|
|
208
|
+
};
|