142 lines
3.5 KiB
JavaScript
142 lines
3.5 KiB
JavaScript
// Metro module 1115 (f1116).
|
|
import { NATIVE } from "./Module1001";
|
|
import { debug } from "./Module817";
|
|
function $mk117630($env) {
|
|
return function(a0) {
|
|
a0($env[0]);
|
|
};
|
|
}
|
|
let env925 = {};
|
|
const c925_2 = (this ? this.__awaiter : this) || function(c12811_0, c12811_1, a2, c12811_3) {
|
|
let r2 = a2;
|
|
let Promise2 = a2;
|
|
if (!a2) {
|
|
Promise2 = Promise;
|
|
r2 = Promise2;
|
|
}
|
|
return new r2(function(a0, c24217_1) {
|
|
let rejected2, step2;
|
|
let c24217_0 = a0;
|
|
const fulfilled2 = function fulfilled(a0) {
|
|
try {
|
|
step2(c12811_3.next(a0));
|
|
} catch ($e) {
|
|
c24217_1($e);
|
|
}
|
|
};
|
|
rejected2 = function rejected(a0) {
|
|
try {
|
|
step2(c12811_3.throw(a0));
|
|
} catch ($e) {
|
|
c24217_1($e);
|
|
}
|
|
};
|
|
step2 = function step(a0) {
|
|
if (a0.done) {
|
|
c24217_0(a0.value);
|
|
} else {
|
|
let env28825;
|
|
let value = a0.value;
|
|
const r10 = env28825 = {};
|
|
env28825[0] = value;
|
|
if (!(value instanceof Promise2)) {
|
|
value = new Promise2($mk117630(r10));
|
|
}
|
|
value.then(fulfilled2, rejected2);
|
|
}
|
|
};
|
|
const r16 = c12811_3.apply(c12811_0, c12811_1 || []);
|
|
c12811_3 = r16;
|
|
const r18 = r16.next();
|
|
const { done, value } = r18;
|
|
if (done) {
|
|
a0(value);
|
|
} else {
|
|
let env24218;
|
|
const r21 = env24218 = {};
|
|
env24218[0] = value;
|
|
(value instanceof Promise2 ? value : new Promise2($mk117630(r21))).then(fulfilled2, rejected2);
|
|
}
|
|
});
|
|
};
|
|
export const modulesLoaderIntegration = () => {
|
|
let env12812 = {
|
|
$parent: env925
|
|
};
|
|
env12812[0] = false;
|
|
env12812[1] = null;
|
|
return {
|
|
name: "ModulesLoader",
|
|
setupOnce: () => {},
|
|
processEvent: async (a0) => {
|
|
let r71, r80;
|
|
let env24216 = {
|
|
$parent: env12812
|
|
};
|
|
env24216[0] = a0;
|
|
let c28824_2;
|
|
let c28824_3 = 0;
|
|
let c31215_0;
|
|
L18: {
|
|
L15: {
|
|
try {
|
|
if (env12812[0]) {
|
|
if (env12812[1]) {
|
|
env24216[0].modules = {
|
|
...env12812[1],
|
|
...env24216[0].modules
|
|
};
|
|
}
|
|
r80 = env24216[0];
|
|
break L18;
|
|
}
|
|
c28824_3 = 1;
|
|
env12812[1] = await NATIVE.fetchModules();
|
|
c28824_3 = 0;
|
|
env12812[0] = true;
|
|
if (env12812[1]) {
|
|
env24216[0].modules = {
|
|
...env12812[1],
|
|
...env24216[0].modules
|
|
};
|
|
}
|
|
r71 = env24216[0];
|
|
} catch ($e) {
|
|
const r32 = $e;
|
|
let r8 = r32;
|
|
c28824_2 = r32;
|
|
if (c28824_3 !== 0) {
|
|
while (true) {
|
|
try {
|
|
const r100 = c28824_2;
|
|
c28824_3 = 0;
|
|
c31215_0 = r100;
|
|
debug.log(`Failed to get modules from native: ${c31215_0}`);
|
|
env12812[0] = true;
|
|
if (env12812[1]) {
|
|
env24216[0].modules = {
|
|
...env12812[1],
|
|
...env24216[0].modules
|
|
};
|
|
}
|
|
r71 = env24216[0];
|
|
break L15;
|
|
} catch (r96) {
|
|
r8 = r96;
|
|
c28824_2 = r96;
|
|
if (c28824_3 === 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw r8;
|
|
}
|
|
}
|
|
return r71;
|
|
}
|
|
return r80;
|
|
}
|
|
};
|
|
};
|