@expofp/loader 1.0.47 → 1.0.48
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/{downloadZip-DMgeO3fU.js → downloadZip-mR_QbdG8.js} +2 -2
- package/dist/{downloadZip-DMgeO3fU.js.map → downloadZip-mR_QbdG8.js.map} +1 -1
- package/dist/index.js +325 -274
- package/dist/index.js.map +1 -1
- package/dist/loadAndWaitGlobal.d.ts +3 -1
- package/dist/{makeOffline-1iGrM4gF.js → makeOffline-CfdUQ4b2.js} +3 -2
- package/dist/makeOffline-CfdUQ4b2.js.map +1 -0
- package/dist/{makeOfflineBundle-g0Y3sA2l.js → makeOfflineBundle-D4r0VqcQ.js} +2 -2
- package/dist/{makeOfflineBundle-g0Y3sA2l.js.map → makeOfflineBundle-D4r0VqcQ.js.map} +1 -1
- package/dist/resolve.d.ts +2 -0
- package/package.json +1 -1
- package/dist/makeOffline-1iGrM4gF.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
function J(
|
|
2
|
-
return i("assetResolver resolveRef:",
|
|
1
|
+
function J(t) {
|
|
2
|
+
return i("assetResolver resolveRef:", t), l(t);
|
|
3
3
|
}
|
|
4
4
|
const U = {
|
|
5
5
|
schema: "asset",
|
|
6
|
-
resolveRef: async (
|
|
6
|
+
resolveRef: async (t) => J(t),
|
|
7
7
|
offlineMethod: "localizeRef"
|
|
8
8
|
};
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
async function f(
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
9
|
+
let h;
|
|
10
|
+
const N = /* @__PURE__ */ new WeakSet(), _ = new Function("url", 'return import(url, { with: { type: "json" } });');
|
|
11
|
+
async function f(t, e) {
|
|
12
|
+
var n, o;
|
|
13
|
+
if (h === void 0 && !e.forceFetch)
|
|
14
14
|
try {
|
|
15
|
-
await
|
|
15
|
+
await _(t), h = !1;
|
|
16
16
|
} catch {
|
|
17
|
-
i("importJson: dynamic import not available, falling back to fetch"),
|
|
17
|
+
i("importJson: dynamic import not available, falling back to fetch"), h = !0;
|
|
18
18
|
}
|
|
19
|
-
let
|
|
20
|
-
return !
|
|
19
|
+
let r;
|
|
20
|
+
return !h && !e.forceFetch ? (r = (await _(t)).default, (n = e.importCallback) == null || n.call(e, t, "json")) : (i("importJson: fetch", t), r = await W(t, e.refCache, e.abortSignal || null), (o = e.importCallback) == null || o.call(e, t, "json")), N.has(r) || u(r), r;
|
|
21
21
|
}
|
|
22
|
-
async function
|
|
23
|
-
const n = "__loadJson__" +
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
throw new Error(`Failed to fetch JSON from ${
|
|
30
|
-
return await
|
|
22
|
+
async function W(t, e, r) {
|
|
23
|
+
const n = "__loadJson__" + t;
|
|
24
|
+
if (e.has(n))
|
|
25
|
+
return e.get(n);
|
|
26
|
+
const o = (async function() {
|
|
27
|
+
const s = await fetch(t, { signal: r });
|
|
28
|
+
if (!s.ok)
|
|
29
|
+
throw new Error(`Failed to fetch JSON from ${t}`);
|
|
30
|
+
return await s.json();
|
|
31
31
|
})();
|
|
32
|
-
return
|
|
32
|
+
return e.set(n, o), o;
|
|
33
33
|
}
|
|
34
|
-
async function
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
37
|
-
const
|
|
38
|
-
return
|
|
34
|
+
async function p(t, e, r) {
|
|
35
|
+
if (e.has(t))
|
|
36
|
+
return e.get(t);
|
|
37
|
+
const n = r().then((o) => (u(o), o));
|
|
38
|
+
return e.set(t, n), n;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const B = {
|
|
41
41
|
schema: "bundle-assets",
|
|
42
|
-
async resolveRef(
|
|
43
|
-
i("bundleAssetsResolver resolveRef:",
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
const
|
|
47
|
-
return
|
|
42
|
+
async resolveRef(t, e) {
|
|
43
|
+
i("bundleAssetsResolver resolveRef:", t);
|
|
44
|
+
const r = l(t);
|
|
45
|
+
return p(t, e.refCache, async () => {
|
|
46
|
+
const n = await f(r, e), o = r.substring(0, r.lastIndexOf("/") + 1);
|
|
47
|
+
return n.map((s) => ({
|
|
48
48
|
$ref: `asset+${o}${s}`
|
|
49
49
|
}));
|
|
50
50
|
});
|
|
51
51
|
},
|
|
52
52
|
offlineMethod: "localizeRef"
|
|
53
|
-
},
|
|
53
|
+
}, L = "https://efp-runtime.expofp.com/", T = {
|
|
54
54
|
schema: "expo-runtime-branch",
|
|
55
|
-
async resolveRef(
|
|
56
|
-
i("expoRuntimeBranchResolver resolveRef:",
|
|
57
|
-
const
|
|
58
|
-
return
|
|
59
|
-
$ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${await f(
|
|
55
|
+
async resolveRef(t, e) {
|
|
56
|
+
i("expoRuntimeBranchResolver resolveRef:", t);
|
|
57
|
+
const r = l(t), n = `${L}branches/${r}.json`;
|
|
58
|
+
return p(t, e.refCache, async () => ({
|
|
59
|
+
$ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${await f(n, e)}/`
|
|
60
60
|
}));
|
|
61
61
|
},
|
|
62
62
|
offlineMethod: "resolveRef"
|
|
63
|
-
},
|
|
63
|
+
}, C = {
|
|
64
64
|
schema: "expo-runtime-get-branch",
|
|
65
|
-
async resolveRef(
|
|
66
|
-
i("expoRuntimeGetBranchResolver resolveRef:",
|
|
67
|
-
const
|
|
68
|
-
return f(
|
|
65
|
+
async resolveRef(t, e) {
|
|
66
|
+
i("expoRuntimeGetBranchResolver resolveRef:", t);
|
|
67
|
+
const n = `https://${l(t)}.expofp.com/get-branch`;
|
|
68
|
+
return f(n, e);
|
|
69
69
|
},
|
|
70
70
|
offlineMethod: "resolveRef"
|
|
71
|
-
},
|
|
71
|
+
}, D = {
|
|
72
72
|
schema: "expo-runtime",
|
|
73
73
|
// canResolve(ref: string) {
|
|
74
74
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
75
75
|
// },
|
|
76
|
-
async resolveRef(
|
|
77
|
-
i("expoRuntimeResolver resolveRef:",
|
|
78
|
-
const
|
|
79
|
-
entry: { $ref: `asset+${
|
|
80
|
-
assets: { $ref: `bundle-assets+${
|
|
76
|
+
async resolveRef(t) {
|
|
77
|
+
i("expoRuntimeResolver resolveRef:", t);
|
|
78
|
+
const e = l(t), r = {
|
|
79
|
+
entry: { $ref: `asset+${e}expofp.js` },
|
|
80
|
+
assets: { $ref: `bundle-assets+${e}bundle.json` }
|
|
81
81
|
};
|
|
82
|
-
return u(
|
|
82
|
+
return u(r), r;
|
|
83
83
|
},
|
|
84
84
|
// async *makeOfflineRef(ref: string) {
|
|
85
85
|
// log('expoRuntimeResolver makeOfflineRef:', ref);
|
|
@@ -99,336 +99,387 @@ const T = {
|
|
|
99
99
|
// return targetFilePath;
|
|
100
100
|
// },
|
|
101
101
|
offlineMethod: "resolveRef"
|
|
102
|
-
},
|
|
103
|
-
canResolve(
|
|
104
|
-
return
|
|
102
|
+
}, I = {
|
|
103
|
+
canResolve(t) {
|
|
104
|
+
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("./");
|
|
105
105
|
},
|
|
106
|
-
resolveRef(
|
|
107
|
-
if (i("httpResolver resolveRef:",
|
|
108
|
-
return f(
|
|
106
|
+
resolveRef(t, e) {
|
|
107
|
+
if (i("httpResolver resolveRef:", t), !this.canResolve(t)) throw new Error(`Unexpected ref in httpResolver: ${t}`);
|
|
108
|
+
return f(t, e);
|
|
109
109
|
},
|
|
110
110
|
offlineMethod: "resolveRef"
|
|
111
111
|
};
|
|
112
|
-
async function
|
|
113
|
-
const { globalVar:
|
|
114
|
-
|
|
115
|
-
() =>
|
|
112
|
+
async function O(t, e) {
|
|
113
|
+
const { globalVar: r, timeoutMs: n = 1e4, pollIntervalMs: o = 10 } = e;
|
|
114
|
+
P() ? (await z(t, e.abortSignal), r && await k(
|
|
115
|
+
() => window[r],
|
|
116
|
+
r,
|
|
116
117
|
n,
|
|
118
|
+
o,
|
|
119
|
+
e.abortSignal
|
|
120
|
+
)) : (await S(t, e.abortSignal), r && await k(
|
|
121
|
+
() => globalThis[r],
|
|
117
122
|
r,
|
|
118
|
-
|
|
123
|
+
n,
|
|
124
|
+
o,
|
|
125
|
+
e.abortSignal
|
|
119
126
|
));
|
|
120
127
|
}
|
|
121
|
-
function
|
|
128
|
+
function P() {
|
|
122
129
|
return typeof window < "u" && typeof document < "u";
|
|
123
130
|
}
|
|
124
|
-
function z(e) {
|
|
125
|
-
return new Promise((
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
131
|
+
function z(t, e) {
|
|
132
|
+
return new Promise((r, n) => {
|
|
133
|
+
const o = document.createElement("script");
|
|
134
|
+
o.src = t, o.async = !0;
|
|
135
|
+
const a = () => {
|
|
136
|
+
o.onload = null, o.onerror = null, o.remove();
|
|
137
|
+
}, s = () => {
|
|
138
|
+
a(), n(new Error("Script load aborted"));
|
|
130
139
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
},
|
|
140
|
+
if (e != null && e.aborted) {
|
|
141
|
+
a(), n(new Error("Script load aborted"));
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
e == null || e.addEventListener("abort", s, { once: !0 }), o.onload = () => {
|
|
145
|
+
e == null || e.removeEventListener("abort", s), a(), r();
|
|
146
|
+
}, o.onerror = () => {
|
|
147
|
+
e == null || e.removeEventListener("abort", s), a(), n(new Error(`Failed to load script: ${t}`));
|
|
148
|
+
}, document.head.appendChild(o);
|
|
136
149
|
});
|
|
137
150
|
}
|
|
138
|
-
async function
|
|
151
|
+
async function S(t, e) {
|
|
139
152
|
if (typeof fetch != "function")
|
|
140
|
-
throw new Error(
|
|
141
|
-
|
|
142
|
-
);
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
throw new Error("loadInNode: fetch is not available. Use Node 18+ or provide a global fetch.");
|
|
154
|
+
if (e != null && e.aborted)
|
|
155
|
+
throw new Error("Script load aborted");
|
|
156
|
+
let r;
|
|
157
|
+
try {
|
|
158
|
+
r = await fetch(t, { signal: e });
|
|
159
|
+
} catch (s) {
|
|
160
|
+
throw s && s.name === "AbortError" ? new Error("Script load aborted") : s;
|
|
161
|
+
}
|
|
162
|
+
if (!r.ok)
|
|
163
|
+
throw new Error(`Failed to load script in Node (HTTP ${r.status}): ${t}`);
|
|
164
|
+
if (e != null && e.aborted)
|
|
165
|
+
throw new Error("Script load aborted");
|
|
166
|
+
let n;
|
|
167
|
+
try {
|
|
168
|
+
n = await r.text();
|
|
169
|
+
} catch (s) {
|
|
170
|
+
throw s && s.name === "AbortError" ? new Error("Script load aborted") : s;
|
|
171
|
+
}
|
|
172
|
+
if (e != null && e.aborted)
|
|
173
|
+
throw new Error("Script load aborted");
|
|
174
|
+
const o = globalThis, a = o.window;
|
|
175
|
+
o.window = o;
|
|
176
|
+
try {
|
|
177
|
+
(0, eval)(n);
|
|
178
|
+
} finally {
|
|
179
|
+
a === void 0 ? delete o.window : o.window = a;
|
|
180
|
+
}
|
|
148
181
|
}
|
|
149
|
-
function
|
|
150
|
-
return new Promise((
|
|
151
|
-
const
|
|
182
|
+
function k(t, e, r, n, o) {
|
|
183
|
+
return new Promise((a, s) => {
|
|
184
|
+
const d = Date.now(), c = () => {
|
|
185
|
+
s(new Error("Wait for global aborted"));
|
|
186
|
+
};
|
|
187
|
+
if (o != null && o.aborted) {
|
|
188
|
+
s(new Error("Wait for global aborted"));
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
o == null || o.addEventListener("abort", c, { once: !0 });
|
|
192
|
+
const w = () => {
|
|
193
|
+
if (o != null && o.aborted)
|
|
194
|
+
return s(new Error("Wait for global aborted"));
|
|
152
195
|
try {
|
|
153
|
-
if (
|
|
154
|
-
return o();
|
|
196
|
+
if (t() !== void 0)
|
|
197
|
+
return o == null || o.removeEventListener("abort", c), a();
|
|
155
198
|
} catch {
|
|
156
199
|
}
|
|
157
|
-
if (Date.now() -
|
|
158
|
-
return
|
|
159
|
-
setTimeout(
|
|
200
|
+
if (Date.now() - d >= r)
|
|
201
|
+
return o == null || o.removeEventListener("abort", c), s(new Error(`Timed out after ${r} ms waiting for global "${e}"`));
|
|
202
|
+
setTimeout(w, n);
|
|
160
203
|
};
|
|
161
|
-
|
|
204
|
+
w();
|
|
162
205
|
});
|
|
163
206
|
}
|
|
164
|
-
const
|
|
207
|
+
const V = {
|
|
165
208
|
schema: "legacy-asset-urls",
|
|
166
|
-
resolveRef(
|
|
167
|
-
return i("legacyAssetUrlsResolver resolveRef:",
|
|
168
|
-
var
|
|
169
|
-
const
|
|
209
|
+
resolveRef(t, e) {
|
|
210
|
+
return i("legacyAssetUrlsResolver resolveRef:", t), p(t, e.refCache, async () => {
|
|
211
|
+
var b, R;
|
|
212
|
+
const r = l(t), n = `${r}version.js`;
|
|
170
213
|
try {
|
|
171
|
-
await
|
|
214
|
+
await O(n, {
|
|
215
|
+
globalVar: "__fpDataVersion",
|
|
216
|
+
timeoutMs: 3e4,
|
|
217
|
+
abortSignal: e.abortSignal
|
|
218
|
+
}), (b = e.importCallback) == null || b.call(e, n, "script");
|
|
172
219
|
} catch {
|
|
173
|
-
console.warn(`Could not load version.js at ${
|
|
220
|
+
console.warn(`Could not load version.js at ${n}, proceeding without it`);
|
|
174
221
|
}
|
|
175
|
-
const o = globalThis.__fpDataVersion || (+/* @__PURE__ */ new Date()).toString(), a = `${
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
222
|
+
const o = globalThis.__fpDataVersion || (+/* @__PURE__ */ new Date()).toString(), a = `${r}files.json?v=${o}`, s = `${r}data.js?v=${o}`, d = f(a, e), c = O(s, {
|
|
223
|
+
globalVar: "__data",
|
|
224
|
+
abortSignal: e.abortSignal
|
|
225
|
+
});
|
|
226
|
+
(R = e.importCallback) == null || R.call(e, s, "script"), await Promise.all([d, c]);
|
|
227
|
+
const w = await d, j = globalThis.__data || {};
|
|
228
|
+
return { ...[...w, "data.js"].reduce((E, $) => (E[$] = { $ref: `asset+${r}${$}?v=${o}` }, E), {}), ...G(r, j) };
|
|
179
229
|
});
|
|
180
230
|
},
|
|
181
231
|
offlineMethod: "resolveRef"
|
|
182
232
|
};
|
|
183
|
-
function
|
|
184
|
-
const
|
|
185
|
-
function
|
|
186
|
-
typeof o == "string" && o.length > 0 &&
|
|
233
|
+
function G(t, e) {
|
|
234
|
+
const r = /* @__PURE__ */ new Set();
|
|
235
|
+
function n(o) {
|
|
236
|
+
typeof o == "string" && o.length > 0 && r.add(o);
|
|
187
237
|
}
|
|
188
|
-
return
|
|
238
|
+
return n(e.logo), e.exhibitors.forEach((o) => {
|
|
189
239
|
var a;
|
|
190
|
-
|
|
191
|
-
}),
|
|
240
|
+
n(o.logo), (a = o.gallery) == null || a.forEach((s) => n(s));
|
|
241
|
+
}), e.events.forEach((o) => {
|
|
192
242
|
var a;
|
|
193
|
-
|
|
194
|
-
|
|
243
|
+
n(o.logoFile), (a = o.speakers) == null || a.forEach((s) => {
|
|
244
|
+
n(s.photoFile);
|
|
195
245
|
});
|
|
196
|
-
}), Array.from(
|
|
246
|
+
}), Array.from(r).reduce((o, a) => (o[a] = { $ref: `asset+${t}${a}` }, o), {});
|
|
197
247
|
}
|
|
198
248
|
const Z = {
|
|
199
249
|
schema: "legacy-data",
|
|
200
|
-
resolveRef(
|
|
201
|
-
return i("legacyDataResolver resolveRef:",
|
|
202
|
-
const
|
|
250
|
+
resolveRef(t, e) {
|
|
251
|
+
return i("legacyDataResolver resolveRef:", t), p(t, e.refCache, async () => {
|
|
252
|
+
const r = l(t);
|
|
203
253
|
return {
|
|
204
|
-
_to_remove_for_offline_to_work_dataUrlBase:
|
|
205
|
-
legacyAssetUrls: { $ref: `legacy-asset-urls+${
|
|
254
|
+
_to_remove_for_offline_to_work_dataUrlBase: r,
|
|
255
|
+
legacyAssetUrls: { $ref: `legacy-asset-urls+${r}` }
|
|
206
256
|
};
|
|
207
257
|
});
|
|
208
258
|
},
|
|
209
259
|
offlineMethod: "resolveRef"
|
|
210
260
|
}, H = [
|
|
211
|
-
|
|
212
|
-
|
|
261
|
+
I,
|
|
262
|
+
B,
|
|
213
263
|
U,
|
|
214
|
-
W,
|
|
215
|
-
S,
|
|
216
264
|
D,
|
|
265
|
+
T,
|
|
266
|
+
C,
|
|
217
267
|
Z,
|
|
218
|
-
|
|
219
|
-
],
|
|
220
|
-
async function
|
|
221
|
-
i("Resolving:",
|
|
222
|
-
const
|
|
223
|
-
importCallback:
|
|
224
|
-
refCache: (
|
|
225
|
-
forceFetch: !!(
|
|
268
|
+
V
|
|
269
|
+
], K = /* @__PURE__ */ new Map();
|
|
270
|
+
async function v(t, e, r) {
|
|
271
|
+
i("Resolving:", e, "of", t, r), typeof window < "u" && (window.__lastResolveObject = t);
|
|
272
|
+
const n = {
|
|
273
|
+
importCallback: r == null ? void 0 : r.importCallback,
|
|
274
|
+
refCache: (r == null ? void 0 : r.refCache) || K,
|
|
275
|
+
forceFetch: !!(r != null && r.forceFetch),
|
|
276
|
+
abortSignal: (r == null ? void 0 : r.abortSignal) || null
|
|
226
277
|
};
|
|
227
|
-
if (typeof
|
|
228
|
-
throw new Error(`Invalid JSON Pointer (not a string): ${
|
|
229
|
-
if (!
|
|
230
|
-
throw new Error(`Invalid JSON Pointer: ${
|
|
231
|
-
if (
|
|
232
|
-
throw new Error(`Invalid JSON Pointer: ${
|
|
278
|
+
if (typeof e != "string")
|
|
279
|
+
throw new Error(`Invalid JSON Pointer (not a string): ${e}`);
|
|
280
|
+
if (!e.startsWith("/"))
|
|
281
|
+
throw new Error(`Invalid JSON Pointer: ${e}`);
|
|
282
|
+
if (e.length > 1 && e.endsWith("/"))
|
|
283
|
+
throw new Error(`Invalid JSON Pointer: ${e}`);
|
|
233
284
|
let o;
|
|
234
|
-
if (
|
|
235
|
-
throw new Error(`Invalid JSON Pointer (empty part): ${
|
|
236
|
-
if (
|
|
285
|
+
if (e === "/" ? o = [] : o = e.substring(1).split("/"), o.some((a) => a.length === 0))
|
|
286
|
+
throw new Error(`Invalid JSON Pointer (empty part): ${e}`);
|
|
287
|
+
if (r != null && r.mutate) {
|
|
237
288
|
o.unshift("root");
|
|
238
|
-
const a = { root:
|
|
239
|
-
await
|
|
289
|
+
const a = { root: t };
|
|
290
|
+
await A(a, o, 0, n), ee(t, a.root);
|
|
240
291
|
} else
|
|
241
|
-
return await
|
|
292
|
+
return await g(t, o, 0, n);
|
|
242
293
|
}
|
|
243
|
-
async function
|
|
244
|
-
const o =
|
|
245
|
-
if (await
|
|
246
|
-
if (
|
|
294
|
+
async function A(t, e, r, n) {
|
|
295
|
+
const o = e[r];
|
|
296
|
+
if (await q(t, o, n), r != e.length - 1) {
|
|
297
|
+
if (t[o] === null || typeof t[o] != "object")
|
|
247
298
|
throw new Error(
|
|
248
|
-
`Cannot resolve path, encountered non-object at part '${
|
|
299
|
+
`Cannot resolve path, encountered non-object at part '${e.slice(1).join("/")}', index ${r - 1}'`
|
|
249
300
|
);
|
|
250
|
-
return await
|
|
301
|
+
return await A(t[o], e, r + 1, n);
|
|
251
302
|
}
|
|
252
303
|
}
|
|
253
|
-
async function
|
|
254
|
-
i("resolveObjectMutate:",
|
|
255
|
-
let
|
|
256
|
-
const o = await
|
|
257
|
-
o !== void 0 && (e
|
|
304
|
+
async function q(t, e, r) {
|
|
305
|
+
i("resolveObjectMutate:", t, e);
|
|
306
|
+
let n = t[e];
|
|
307
|
+
const o = await y(n, r);
|
|
308
|
+
o !== void 0 && (t[e] = o);
|
|
258
309
|
}
|
|
259
|
-
async function
|
|
260
|
-
if (
|
|
261
|
-
return await
|
|
262
|
-
if (
|
|
310
|
+
async function g(t, e, r, n) {
|
|
311
|
+
if (r === e.length)
|
|
312
|
+
return await y(t, n);
|
|
313
|
+
if (t === null || typeof t != "object")
|
|
263
314
|
throw new Error(
|
|
264
|
-
`Cannot resolve path, encountered non-object at part '${
|
|
315
|
+
`Cannot resolve path, encountered non-object at part '${e.join("/")}', index ${r}'`
|
|
265
316
|
);
|
|
266
|
-
const o =
|
|
267
|
-
let a =
|
|
268
|
-
return a === void 0 && (a = (await
|
|
317
|
+
const o = e[r];
|
|
318
|
+
let a = t[o];
|
|
319
|
+
return a === void 0 && (a = (await y(t, n))[o]), await g(a, e, r + 1, n);
|
|
269
320
|
}
|
|
270
|
-
async function
|
|
271
|
-
i("resolveObject:",
|
|
272
|
-
let
|
|
321
|
+
async function y(t, e) {
|
|
322
|
+
i("resolveObject:", t);
|
|
323
|
+
let r = t;
|
|
273
324
|
do {
|
|
274
|
-
if (typeof
|
|
275
|
-
return
|
|
276
|
-
const
|
|
277
|
-
if (
|
|
278
|
-
if (
|
|
279
|
-
throw new Error(`No resolver found for ref: ${
|
|
280
|
-
return u(
|
|
325
|
+
if (typeof r != "object" || r === null || !("$ref" in r))
|
|
326
|
+
return r;
|
|
327
|
+
const n = H.filter((a) => M(a, r.$ref));
|
|
328
|
+
if (n.length === 0) {
|
|
329
|
+
if (r.$ref)
|
|
330
|
+
throw new Error(`No resolver found for ref: ${r.$ref}`);
|
|
331
|
+
return u(r), r;
|
|
281
332
|
}
|
|
282
|
-
if (
|
|
283
|
-
throw new Error(`Multiple resolvers can resolve ref: ${
|
|
284
|
-
const o = await
|
|
285
|
-
|
|
333
|
+
if (n.length > 1)
|
|
334
|
+
throw new Error(`Multiple resolvers can resolve ref: ${r.$ref}`);
|
|
335
|
+
const o = await Q(n[0], r.$ref, e);
|
|
336
|
+
r = x(o, r);
|
|
286
337
|
} while (!0);
|
|
287
338
|
}
|
|
288
|
-
async function
|
|
289
|
-
if (!
|
|
290
|
-
throw new Error(`Unexpected ref: ${
|
|
291
|
-
return
|
|
339
|
+
async function Q(t, e, r) {
|
|
340
|
+
if (!M(t, e))
|
|
341
|
+
throw new Error(`Unexpected ref: ${e}`);
|
|
342
|
+
return t.resolveRef(e, r);
|
|
292
343
|
}
|
|
293
|
-
function
|
|
294
|
-
if (
|
|
295
|
-
return
|
|
296
|
-
if (
|
|
297
|
-
return
|
|
344
|
+
function M(t, e) {
|
|
345
|
+
if (t.canResolve)
|
|
346
|
+
return t.canResolve(e);
|
|
347
|
+
if (t.schema)
|
|
348
|
+
return X(e, t.schema);
|
|
298
349
|
throw new Error("Resolver is missing canResolve method and schema property");
|
|
299
350
|
}
|
|
300
|
-
function
|
|
301
|
-
const
|
|
302
|
-
for (const
|
|
303
|
-
if (
|
|
351
|
+
function X(t, e) {
|
|
352
|
+
const r = [`${e}+`, `${e}:`];
|
|
353
|
+
for (const n of r)
|
|
354
|
+
if (t.startsWith(n))
|
|
304
355
|
return !0;
|
|
305
356
|
return !1;
|
|
306
357
|
}
|
|
307
|
-
function l(
|
|
308
|
-
if (
|
|
309
|
-
return
|
|
310
|
-
const
|
|
311
|
-
if (
|
|
312
|
-
return
|
|
313
|
-
if (n !== -1)
|
|
314
|
-
return e.substring(n + 1);
|
|
315
|
-
const r = e.indexOf(":");
|
|
358
|
+
function l(t) {
|
|
359
|
+
if (t.startsWith("http://") || t.startsWith("https://"))
|
|
360
|
+
return t;
|
|
361
|
+
const e = t.indexOf("+http://"), r = t.indexOf("+https://");
|
|
362
|
+
if (e !== -1)
|
|
363
|
+
return t.substring(e + 1);
|
|
316
364
|
if (r !== -1)
|
|
317
|
-
return
|
|
318
|
-
|
|
365
|
+
return t.substring(r + 1);
|
|
366
|
+
const n = t.indexOf(":");
|
|
367
|
+
if (n !== -1)
|
|
368
|
+
return t.substring(n + 1);
|
|
369
|
+
throw new Error(`Error getting URL from: ${t}, no valid prefix found`);
|
|
319
370
|
}
|
|
320
|
-
typeof window < "u" && (window.__debugResolve = async function(
|
|
371
|
+
typeof window < "u" && (window.__debugResolve = async function(e, r, n) {
|
|
321
372
|
let o, a, s;
|
|
322
|
-
return typeof
|
|
373
|
+
return typeof e == "string" ? (o = window.__lastResolveObject, a = e, s = r) : (o = e, a = r, s = n), await v(o, a, s);
|
|
323
374
|
});
|
|
324
|
-
function
|
|
325
|
-
return async (
|
|
375
|
+
function m(t) {
|
|
376
|
+
return async (e, ...r) => {
|
|
326
377
|
try {
|
|
327
|
-
const a = (await import(await
|
|
328
|
-
return a(
|
|
329
|
-
} catch (
|
|
330
|
-
throw console.error("efp-loader", `Error when trying to import and call "${
|
|
378
|
+
const a = (await import(await v(e, "/runtime/entry")))[t];
|
|
379
|
+
return a(e, ...r);
|
|
380
|
+
} catch (n) {
|
|
381
|
+
throw console.error("efp-loader", `Error when trying to import and call "${t}":`, n), n;
|
|
331
382
|
}
|
|
332
383
|
};
|
|
333
384
|
}
|
|
334
|
-
function i(...
|
|
335
|
-
globalThis.__EFP_LOADER_DEBUG__ && console.debug("efp-loader", ...
|
|
385
|
+
function i(...t) {
|
|
386
|
+
globalThis.__EFP_LOADER_DEBUG__ && console.debug("efp-loader", ...t);
|
|
336
387
|
}
|
|
337
|
-
function u(
|
|
338
|
-
if (
|
|
339
|
-
Object.freeze(
|
|
340
|
-
for (const
|
|
341
|
-
const
|
|
342
|
-
typeof
|
|
388
|
+
function u(t) {
|
|
389
|
+
if (t === null || typeof t != "object") return t;
|
|
390
|
+
Object.freeze(t);
|
|
391
|
+
for (const e of Object.keys(t)) {
|
|
392
|
+
const r = t[e];
|
|
393
|
+
typeof r == "object" && r !== null && !Object.isFrozen(r) && u(r);
|
|
343
394
|
}
|
|
344
|
-
return
|
|
395
|
+
return t;
|
|
345
396
|
}
|
|
346
|
-
function
|
|
347
|
-
return "structuredClone" in globalThis ? globalThis.structuredClone(
|
|
397
|
+
function F(t) {
|
|
398
|
+
return "structuredClone" in globalThis ? globalThis.structuredClone(t) : JSON.parse(JSON.stringify(t));
|
|
348
399
|
}
|
|
349
|
-
function
|
|
400
|
+
function Y(t) {
|
|
350
401
|
if (typeof document > "u") return;
|
|
351
|
-
const
|
|
352
|
-
|
|
402
|
+
const e = document.createElement("link");
|
|
403
|
+
e.rel = "preconnect", e.href = t, e.crossOrigin = "anonymous", document.head.appendChild(e);
|
|
353
404
|
}
|
|
354
|
-
function
|
|
355
|
-
if (
|
|
356
|
-
if (
|
|
405
|
+
function x(t, e) {
|
|
406
|
+
if (t === e) return;
|
|
407
|
+
if (e === null || typeof e != "object")
|
|
357
408
|
throw new Error("Cannot merge non-object source");
|
|
358
|
-
if (Array.isArray(t))
|
|
359
|
-
throw new Error("Cannot merge arrays");
|
|
360
|
-
const n = Object.keys(t).filter((o) => o !== "$ref");
|
|
361
|
-
if (n.length === 0) return _(e);
|
|
362
409
|
if (Array.isArray(e))
|
|
410
|
+
throw new Error("Cannot merge arrays");
|
|
411
|
+
const r = Object.keys(e).filter((o) => o !== "$ref");
|
|
412
|
+
if (r.length === 0) return F(t);
|
|
413
|
+
if (Array.isArray(t))
|
|
363
414
|
throw new Error("Cannot merge into arrays");
|
|
364
|
-
if (
|
|
415
|
+
if (t === null || typeof t != "object")
|
|
365
416
|
throw new Error("Cannot merge into non-object target");
|
|
366
|
-
const
|
|
367
|
-
for (const o of
|
|
368
|
-
|
|
369
|
-
return
|
|
417
|
+
const n = F({ ...t });
|
|
418
|
+
for (const o of r)
|
|
419
|
+
n[o] = e[o];
|
|
420
|
+
return n;
|
|
370
421
|
}
|
|
371
|
-
function ee(
|
|
372
|
-
if (
|
|
373
|
-
if (t === null || typeof t != "object")
|
|
374
|
-
throw new Error("Cannot replace with non-object source");
|
|
422
|
+
function ee(t, e) {
|
|
423
|
+
if (t !== e) {
|
|
375
424
|
if (e === null || typeof e != "object")
|
|
425
|
+
throw new Error("Cannot replace with non-object source");
|
|
426
|
+
if (t === null || typeof t != "object")
|
|
376
427
|
throw new Error("Cannot replace non-object target");
|
|
377
|
-
if (Array.isArray(
|
|
378
|
-
if (!Array.isArray(
|
|
428
|
+
if (Array.isArray(t)) {
|
|
429
|
+
if (!Array.isArray(e))
|
|
379
430
|
throw new Error("replaceObjectFields does not support mixing arrays and objects");
|
|
380
|
-
|
|
381
|
-
for (const
|
|
382
|
-
|
|
431
|
+
t.length = 0;
|
|
432
|
+
for (const r of e)
|
|
433
|
+
t.push(r);
|
|
383
434
|
return;
|
|
384
435
|
}
|
|
385
|
-
for (const
|
|
386
|
-
|
|
387
|
-
for (const
|
|
388
|
-
|
|
436
|
+
for (const r of Object.keys(t))
|
|
437
|
+
r in e || delete t[r];
|
|
438
|
+
for (const r of Object.keys(e))
|
|
439
|
+
t[r] = e[r];
|
|
389
440
|
}
|
|
390
441
|
}
|
|
391
|
-
async function te(
|
|
392
|
-
|
|
393
|
-
for (const
|
|
394
|
-
await
|
|
442
|
+
async function te(t, e, r) {
|
|
443
|
+
r = r || {};
|
|
444
|
+
for (const n of e)
|
|
445
|
+
await v(t, n, { ...r, mutate: !0 });
|
|
395
446
|
}
|
|
396
447
|
typeof window < "u" && (window.__debugMutateManifest = te);
|
|
397
|
-
async function
|
|
398
|
-
const { makeOfflineBundle:
|
|
399
|
-
return await t
|
|
448
|
+
async function re(t) {
|
|
449
|
+
const { makeOfflineBundle: e } = await import("./makeOfflineBundle-D4r0VqcQ.js");
|
|
450
|
+
return await e(t);
|
|
400
451
|
}
|
|
401
|
-
async function
|
|
402
|
-
const { downloadZip:
|
|
403
|
-
return await t
|
|
452
|
+
async function oe(t) {
|
|
453
|
+
const { downloadZip: e } = await import("./downloadZip-mR_QbdG8.js");
|
|
454
|
+
return await e(t);
|
|
404
455
|
}
|
|
405
|
-
async function
|
|
406
|
-
const { makeOffline:
|
|
407
|
-
for await (const
|
|
408
|
-
"data" in
|
|
409
|
-
console.info("Offline data: ",
|
|
456
|
+
async function ne(t) {
|
|
457
|
+
const { makeOffline: e } = await import("./makeOffline-CfdUQ4b2.js"), r = await e(t);
|
|
458
|
+
for await (const n of (await r).files)
|
|
459
|
+
"data" in n ? console.info(`🗳️ Put ${n.targetFilePath} <=`, n.data) : "url" in n && console.info(`🗳️ Download ${n.targetFilePath} <= ${n.url}`);
|
|
460
|
+
console.info("Offline data: ", r.manifest);
|
|
410
461
|
}
|
|
411
|
-
typeof window < "u" && (window.__debugDownloadZip =
|
|
412
|
-
const ie =
|
|
413
|
-
async function fe(
|
|
414
|
-
return await
|
|
462
|
+
typeof window < "u" && (window.__debugDownloadZip = oe, window.__debugMakeOfflineBundle = re, window.__debugLogOfflineManifestFiles = ne);
|
|
463
|
+
const ie = m("mount"), le = m("load"), ce = m("initialize");
|
|
464
|
+
async function fe(t, e, ...r) {
|
|
465
|
+
return await m(t)(e, ...r);
|
|
415
466
|
}
|
|
416
|
-
|
|
467
|
+
Y("https://efp-runtime.expofp.com/");
|
|
417
468
|
export {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
469
|
+
x as a,
|
|
470
|
+
Q as b,
|
|
471
|
+
M as c,
|
|
421
472
|
fe as callFunction_Experimental,
|
|
422
|
-
|
|
423
|
-
|
|
473
|
+
F as d,
|
|
474
|
+
oe as downloadZip,
|
|
424
475
|
ce as initialize,
|
|
425
476
|
i as l,
|
|
426
477
|
le as load,
|
|
427
|
-
|
|
478
|
+
re as makeOfflineBundle,
|
|
428
479
|
ie as mount,
|
|
429
480
|
te as mutateManifest,
|
|
430
481
|
l as p,
|
|
431
482
|
H as r,
|
|
432
|
-
|
|
483
|
+
v as resolve
|
|
433
484
|
};
|
|
434
485
|
//# sourceMappingURL=index.js.map
|