lerc-wasm-4BPBJWUK.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. import {
  2. fs_exports,
  3. init_fs,
  4. init_path,
  5. path_exports
  6. } from "./chunk-DL3VOCHZ.js";
  7. import "./chunk-A5ICIBVI.js";
  8. // node_modules/@arcgis/core/chunks/lerc-wasm.js
  9. function t(t2, n2) {
  10. for (var e2 = 0; e2 < n2.length; e2++) {
  11. const r2 = n2[e2];
  12. if (typeof r2 != "string" && !Array.isArray(r2)) {
  13. for (const n3 in r2)
  14. if (n3 !== "default" && !(n3 in t2)) {
  15. const e3 = Object.getOwnPropertyDescriptor(r2, n3);
  16. e3 && Object.defineProperty(t2, n3, e3.get ? e3 : { enumerable: true, get: () => r2[n3] });
  17. }
  18. }
  19. }
  20. return Object.freeze(Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }));
  21. }
  22. var n;
  23. var e;
  24. var r;
  25. var i = { exports: {} };
  26. n = i, e = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0, typeof __filename != "undefined" && (e = e || __filename), r = function(t2) {
  27. var n2, r2;
  28. (t2 = (t2 = t2 || {}) !== void 0 ? t2 : {}).ready = new Promise(function(t3, e2) {
  29. n2 = t3, r2 = e2;
  30. });
  31. var i2, o2 = {};
  32. for (i2 in t2)
  33. t2.hasOwnProperty(i2) && (o2[i2] = t2[i2]);
  34. var u, s, a, f, c, l = typeof window == "object", p = typeof importScripts == "function", h = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string", d = "";
  35. function m(n3) {
  36. return t2.locateFile ? t2.locateFile(n3, d) : d + n3;
  37. }
  38. h ? (d = p ? (init_path(), path_exports).dirname(d) + "/" : __dirname + "/", u = function(t3, n3) {
  39. return f || (f = (init_fs(), fs_exports)), c || (c = (init_path(), path_exports)), t3 = c.normalize(t3), f.readFileSync(t3, n3 ? null : "utf8");
  40. }, a = function(t3) {
  41. var n3 = u(t3, true);
  42. return n3.buffer || (n3 = new Uint8Array(n3)), b(n3.buffer), n3;
  43. }, s = function(t3, n3, e2) {
  44. f || (f = (init_fs(), fs_exports)), c || (c = (init_path(), path_exports)), t3 = c.normalize(t3), f.readFile(t3, function(t4, r3) {
  45. t4 ? e2(t4) : n3(r3.buffer);
  46. });
  47. }, process.argv.length > 1 && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function(t3) {
  48. if (!(t3 instanceof ct))
  49. throw t3;
  50. }), process.on("unhandledRejection", G), t2.inspect = function() {
  51. return "[Emscripten Module object]";
  52. }) : (l || p) && (p ? d = self.location.href : typeof document != "undefined" && document.currentScript && (d = document.currentScript.src), e && (d = e), d = d.indexOf("blob:") !== 0 ? d.substr(0, d.lastIndexOf("/") + 1) : "", u = function(t3) {
  53. var n3 = new XMLHttpRequest();
  54. return n3.open("GET", t3, false), n3.send(null), n3.responseText;
  55. }, p && (a = function(t3) {
  56. var n3 = new XMLHttpRequest();
  57. return n3.open("GET", t3, false), n3.responseType = "arraybuffer", n3.send(null), new Uint8Array(n3.response);
  58. }), s = function(t3, n3, e2) {
  59. var r3 = new XMLHttpRequest();
  60. r3.open("GET", t3, true), r3.responseType = "arraybuffer", r3.onload = function() {
  61. r3.status == 200 || r3.status == 0 && r3.response ? n3(r3.response) : e2();
  62. }, r3.onerror = e2, r3.send(null);
  63. }), t2.print || console.log.bind(console);
  64. var y, g, _ = t2.printErr || console.warn.bind(console);
  65. for (i2 in o2)
  66. o2.hasOwnProperty(i2) && (t2[i2] = o2[i2]);
  67. o2 = null, t2.arguments && t2.arguments, t2.thisProgram && t2.thisProgram, t2.quit && t2.quit, t2.wasmBinary && (y = t2.wasmBinary), t2.noExitRuntime, typeof WebAssembly != "object" && G("no native wasm support detected");
  68. var w = false;
  69. function b(t3, n3) {
  70. t3 || G("Assertion failed: " + n3);
  71. }
  72. var v, A, R, S, P, E = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0;
  73. function I(t3, n3, e2) {
  74. for (var r3 = n3 + e2, i3 = n3; t3[i3] && !(i3 >= r3); )
  75. ++i3;
  76. if (i3 - n3 > 16 && t3.subarray && E)
  77. return E.decode(t3.subarray(n3, i3));
  78. for (var o3 = ""; n3 < i3; ) {
  79. var u2 = t3[n3++];
  80. if (128 & u2) {
  81. var s2 = 63 & t3[n3++];
  82. if ((224 & u2) != 192) {
  83. var a2 = 63 & t3[n3++];
  84. if ((u2 = (240 & u2) == 224 ? (15 & u2) << 12 | s2 << 6 | a2 : (7 & u2) << 18 | s2 << 12 | a2 << 6 | 63 & t3[n3++]) < 65536)
  85. o3 += String.fromCharCode(u2);
  86. else {
  87. var f2 = u2 - 65536;
  88. o3 += String.fromCharCode(55296 | f2 >> 10, 56320 | 1023 & f2);
  89. }
  90. } else
  91. o3 += String.fromCharCode((31 & u2) << 6 | s2);
  92. } else
  93. o3 += String.fromCharCode(u2);
  94. }
  95. return o3;
  96. }
  97. function x(t3, n3) {
  98. return t3 ? I(R, t3, n3) : "";
  99. }
  100. function T(t3, n3) {
  101. return t3 % n3 > 0 && (t3 += n3 - t3 % n3), t3;
  102. }
  103. function j(n3) {
  104. v = n3, t2.HEAP8 = A = new Int8Array(n3), t2.HEAP16 = new Int16Array(n3), t2.HEAP32 = S = new Int32Array(n3), t2.HEAPU8 = R = new Uint8Array(n3), t2.HEAPU16 = new Uint16Array(n3), t2.HEAPU32 = new Uint32Array(n3), t2.HEAPF32 = new Float32Array(n3), t2.HEAPF64 = new Float64Array(n3);
  105. }
  106. t2.INITIAL_MEMORY;
  107. var D = [], H = [], M = [];
  108. function O() {
  109. if (t2.preRun)
  110. for (typeof t2.preRun == "function" && (t2.preRun = [t2.preRun]); t2.preRun.length; )
  111. U(t2.preRun.shift());
  112. Z(D);
  113. }
  114. function W() {
  115. Z(H);
  116. }
  117. function q() {
  118. if (t2.postRun)
  119. for (typeof t2.postRun == "function" && (t2.postRun = [t2.postRun]); t2.postRun.length; )
  120. F(t2.postRun.shift());
  121. Z(M);
  122. }
  123. function U(t3) {
  124. D.unshift(t3);
  125. }
  126. function C(t3) {
  127. H.unshift(t3);
  128. }
  129. function F(t3) {
  130. M.unshift(t3);
  131. }
  132. var B = 0, k = null;
  133. function z(n3) {
  134. B++, t2.monitorRunDependencies && t2.monitorRunDependencies(B);
  135. }
  136. function L(n3) {
  137. if (B--, t2.monitorRunDependencies && t2.monitorRunDependencies(B), B == 0 && k) {
  138. var e2 = k;
  139. k = null, e2();
  140. }
  141. }
  142. function G(n3) {
  143. t2.onAbort && t2.onAbort(n3), _(n3 += ""), w = true, n3 = "abort(" + n3 + "). Build with -s ASSERTIONS=1 for more info.";
  144. var e2 = new WebAssembly.RuntimeError(n3);
  145. throw r2(e2), e2;
  146. }
  147. t2.preloadedImages = {}, t2.preloadedAudios = {};
  148. var X, N = "data:application/octet-stream;base64,";
  149. function Y(t3) {
  150. return t3.startsWith(N);
  151. }
  152. function J(t3) {
  153. return t3.startsWith("file://");
  154. }
  155. function K(t3) {
  156. try {
  157. if (t3 == X && y)
  158. return new Uint8Array(y);
  159. if (a)
  160. return a(t3);
  161. throw "both async and sync fetching of the wasm failed";
  162. } catch (_2) {
  163. G(_2);
  164. }
  165. }
  166. function Q() {
  167. if (!y && (l || p)) {
  168. if (typeof fetch == "function" && !J(X))
  169. return fetch(X, { credentials: "same-origin" }).then(function(t3) {
  170. if (!t3.ok)
  171. throw "failed to load wasm binary file at '" + X + "'";
  172. return t3.arrayBuffer();
  173. }).catch(function() {
  174. return K(X);
  175. });
  176. if (s)
  177. return new Promise(function(t3, n3) {
  178. s(X, function(n4) {
  179. t3(new Uint8Array(n4));
  180. }, n3);
  181. });
  182. }
  183. return Promise.resolve().then(function() {
  184. return K(X);
  185. });
  186. }
  187. function V() {
  188. var n3 = { a: st };
  189. function e2(n4, e3) {
  190. var r3 = n4.exports;
  191. t2.asm = r3, j((g = t2.asm.g).buffer), P = t2.asm.m, C(t2.asm.h), L();
  192. }
  193. function i3(t3) {
  194. e2(t3.instance);
  195. }
  196. function o3(t3) {
  197. return Q().then(function(t4) {
  198. return WebAssembly.instantiate(t4, n3);
  199. }).then(t3, function(t4) {
  200. _("failed to asynchronously prepare wasm: " + t4), G(t4);
  201. });
  202. }
  203. function u2() {
  204. return y || typeof WebAssembly.instantiateStreaming != "function" || Y(X) || J(X) || typeof fetch != "function" ? o3(i3) : fetch(X, { credentials: "same-origin" }).then(function(t3) {
  205. return WebAssembly.instantiateStreaming(t3, n3).then(i3, function(t4) {
  206. return _("wasm streaming compile failed: " + t4), _("falling back to ArrayBuffer instantiation"), o3(i3);
  207. });
  208. });
  209. }
  210. if (z(), t2.instantiateWasm)
  211. try {
  212. return t2.instantiateWasm(n3, e2);
  213. } catch (s2) {
  214. return _("Module.instantiateWasm callback failed with error: " + s2), false;
  215. }
  216. return u2().catch(r2), {};
  217. }
  218. function Z(n3) {
  219. for (; n3.length > 0; ) {
  220. var e2 = n3.shift();
  221. if (typeof e2 != "function") {
  222. var r3 = e2.func;
  223. typeof r3 == "number" ? e2.arg === void 0 ? P.get(r3)() : P.get(r3)(e2.arg) : r3(e2.arg === void 0 ? null : e2.arg);
  224. } else
  225. e2(t2);
  226. }
  227. }
  228. function $(t3, n3, e2, r3) {
  229. G("Assertion failed: " + x(t3) + ", at: " + [n3 ? x(n3) : "unknown filename", e2, r3 ? x(r3) : "unknown function"]);
  230. }
  231. function tt(t3) {
  232. return ft(t3 + 16) + 16;
  233. }
  234. function nt(t3) {
  235. this.excPtr = t3, this.ptr = t3 - 16, this.set_type = function(t4) {
  236. S[this.ptr + 4 >> 2] = t4;
  237. }, this.get_type = function() {
  238. return S[this.ptr + 4 >> 2];
  239. }, this.set_destructor = function(t4) {
  240. S[this.ptr + 8 >> 2] = t4;
  241. }, this.get_destructor = function() {
  242. return S[this.ptr + 8 >> 2];
  243. }, this.set_refcount = function(t4) {
  244. S[this.ptr >> 2] = t4;
  245. }, this.set_caught = function(t4) {
  246. t4 = t4 ? 1 : 0, A[this.ptr + 12 >> 0] = t4;
  247. }, this.get_caught = function() {
  248. return A[this.ptr + 12 >> 0] != 0;
  249. }, this.set_rethrown = function(t4) {
  250. t4 = t4 ? 1 : 0, A[this.ptr + 13 >> 0] = t4;
  251. }, this.get_rethrown = function() {
  252. return A[this.ptr + 13 >> 0] != 0;
  253. }, this.init = function(t4, n3) {
  254. this.set_type(t4), this.set_destructor(n3), this.set_refcount(0), this.set_caught(false), this.set_rethrown(false);
  255. }, this.add_ref = function() {
  256. var t4 = S[this.ptr >> 2];
  257. S[this.ptr >> 2] = t4 + 1;
  258. }, this.release_ref = function() {
  259. var t4 = S[this.ptr >> 2];
  260. return S[this.ptr >> 2] = t4 - 1, t4 === 1;
  261. };
  262. }
  263. function et(t3, n3, e2) {
  264. throw new nt(t3).init(n3, e2), t3;
  265. }
  266. function rt() {
  267. G();
  268. }
  269. function it(t3, n3, e2) {
  270. R.copyWithin(t3, n3, n3 + e2);
  271. }
  272. function ot(t3) {
  273. try {
  274. return g.grow(t3 - v.byteLength + 65535 >>> 16), j(g.buffer), 1;
  275. } catch (n3) {
  276. }
  277. }
  278. function ut(t3) {
  279. var n3 = R.length, e2 = 2147483648;
  280. if ((t3 >>>= 0) > e2)
  281. return false;
  282. for (var r3 = 1; r3 <= 4; r3 *= 2) {
  283. var i3 = n3 * (1 + 0.2 / r3);
  284. if (i3 = Math.min(i3, t3 + 100663296), ot(Math.min(e2, T(Math.max(t3, i3), 65536))))
  285. return true;
  286. }
  287. return false;
  288. }
  289. Y(X = "lerc-wasm.wasm") || (X = m(X));
  290. var st = { a: $, c: tt, b: et, f: rt, d: it, e: ut };
  291. V(), t2.___wasm_call_ctors = function() {
  292. return (t2.___wasm_call_ctors = t2.asm.h).apply(null, arguments);
  293. }, t2._lerc_getBlobInfo = function() {
  294. return (t2._lerc_getBlobInfo = t2.asm.i).apply(null, arguments);
  295. }, t2._lerc_getDataRanges = function() {
  296. return (t2._lerc_getDataRanges = t2.asm.j).apply(null, arguments);
  297. }, t2._lerc_decode = function() {
  298. return (t2._lerc_decode = t2.asm.k).apply(null, arguments);
  299. }, t2._lerc_decode_4D = function() {
  300. return (t2._lerc_decode_4D = t2.asm.l).apply(null, arguments);
  301. };
  302. var at, ft = t2._malloc = function() {
  303. return (ft = t2._malloc = t2.asm.n).apply(null, arguments);
  304. };
  305. function ct(t3) {
  306. this.name = "ExitStatus", this.message = "Program terminated with exit(" + t3 + ")", this.status = t3;
  307. }
  308. function lt(e2) {
  309. function r3() {
  310. at || (at = true, t2.calledRun = true, w || (W(), n2(t2), t2.onRuntimeInitialized && t2.onRuntimeInitialized(), q()));
  311. }
  312. B > 0 || (O(), B > 0 || (t2.setStatus ? (t2.setStatus("Running..."), setTimeout(function() {
  313. setTimeout(function() {
  314. t2.setStatus("");
  315. }, 1), r3();
  316. }, 1)) : r3()));
  317. }
  318. if (t2._free = function() {
  319. return (t2._free = t2.asm.o).apply(null, arguments);
  320. }, k = function t3() {
  321. at || lt(), at || (k = t3);
  322. }, t2.run = lt, t2.preInit)
  323. for (typeof t2.preInit == "function" && (t2.preInit = [t2.preInit]); t2.preInit.length > 0; )
  324. t2.preInit.pop()();
  325. return lt(), t2.ready;
  326. }, n.exports = r;
  327. var o = t({ __proto__: null, default: i.exports }, [i.exports]);
  328. export {
  329. o as l
  330. };
  331. //# sourceMappingURL=lerc-wasm-4BPBJWUK.js.map