UNPKG

@pdftron/webviewer

Version:

[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib

1 lines • 143 kB
var Module = typeof Module !== "undefined" ? Module : {}; if (!Module.expectedDataFileDownloads) { Module.expectedDataFileDownloads = 0 } Module.expectedDataFileDownloads++; (function () { var loadPackage = function (metadata) { var PACKAGE_PATH; if (typeof window === "object") { PACKAGE_PATH = window["encodeURIComponent"](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf("/")) + "/") } else if (typeof location !== "undefined") { PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf("/")) + "/") } else { throw "using preloaded data can only be done on a web page or in a web worker" } var PACKAGE_NAME = "../output/exe/InfixServer.mem"; var REMOTE_PACKAGE_BASE = "InfixServerWasm.mem"; if (typeof Module["locateFilePackage"] === "function" && !Module["locateFile"]) { Module["locateFile"] = Module["locateFilePackage"]; err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)") } var REMOTE_PACKAGE_NAME = Module["locateFile"] ? Module["locateFile"](REMOTE_PACKAGE_BASE, "") : REMOTE_PACKAGE_BASE; var REMOTE_PACKAGE_SIZE = metadata["remote_package_size"]; var PACKAGE_UUID = metadata["package_uuid"]; function fetchRemotePackage(packageName, packageSize, callback, errback) { var xhr = new XMLHttpRequest; xhr.open("GET", packageName, true); xhr.responseType = "arraybuffer"; xhr.onprogress = function (event) { var url = packageName; var size = packageSize; if (event.total) size = event.total; if (event.loaded) { if (!xhr.addedTotal) { xhr.addedTotal = true; if (!Module.dataFileDownloads) Module.dataFileDownloads = {}; Module.dataFileDownloads[url] = { loaded: event.loaded, total: size } } else { Module.dataFileDownloads[url].loaded = event.loaded } var total = 0; var loaded = 0; var num = 0; for (var download in Module.dataFileDownloads) { var data = Module.dataFileDownloads[download]; total += data.total; loaded += data.loaded; num++ } total = Math.ceil(total * Module.expectedDataFileDownloads / num); if (Module["setStatus"]) Module["setStatus"]("Downloading data... (" + loaded + "/" + total + ")") } else if (!Module.dataFileDownloads) { if (Module["setStatus"]) Module["setStatus"]("Downloading data...") } }; xhr.onerror = function (event) { throw new Error("NetworkError for: " + packageName) }; xhr.onload = function (event) { if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || xhr.status == 0 && xhr.response) { var packageData = xhr.response; callback(packageData) } else { throw new Error(xhr.statusText + " : " + xhr.responseURL) } }; xhr.send(null) } function handleError(error) { console.error("package error:", error) } var fetchedCallback = null; var fetched = Module["getPreloadedPackage"] ? Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null; if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function (data) { if (fetchedCallback) { fetchedCallback(data); fetchedCallback = null } else { fetched = data } }, handleError); function runWithFS() { function assert(check, msg) { if (!check) throw msg + (new Error).stack } Module["FS_createPath"]("/", "cmaps", true, true); Module["FS_createPath"]("/", "fonts", true, true); Module["FS_createPath"]("/", "hyphenation", true, true); Module["FS_createPath"]("/", "profiles", true, true); Module["FS_createPath"]("/", "sysfonts", true, true); Module["FS_createPath"]("/", "test", true, true); Module["FS_createPath"]("/test", "input", true, true); Module["FS_createPath"]("/test/input", "SDK", true, true); function DataRequest(start, end, audio) { this.start = start; this.end = end; this.audio = audio } DataRequest.prototype = { requests: {}, open: function (mode, name) { this.name = name; this.requests[name] = this; Module["addRunDependency"]("fp " + this.name) }, send: function () { }, onload: function () { var byteArray = this.byteArray.subarray(this.start, this.end); this.finish(byteArray) }, finish: function (byteArray) { var that = this; Module["FS_createDataFile"](this.name, null, byteArray, true, true, true); Module["removeRunDependency"]("fp " + that.name); this.requests[this.name] = null } }; var files = metadata["files"]; for (var i = 0; i < files.length; ++i) { new DataRequest(files[i]["start"], files[i]["end"], files[i]["audio"]).open("GET", files[i]["filename"]) } function processPackageData(arrayBuffer) { assert(arrayBuffer, "Loading data file failed."); assert(arrayBuffer instanceof ArrayBuffer, "bad input to processPackageData"); var byteArray = new Uint8Array(arrayBuffer); DataRequest.prototype.byteArray = byteArray; var files = metadata["files"]; for (var i = 0; i < files.length; ++i) { DataRequest.prototype.requests[files[i].filename].onload() } Module["removeRunDependency"]("datafile_../output/exe/InfixServer.mem") } Module["addRunDependency"]("datafile_../output/exe/InfixServer.mem"); if (!Module.preloadResults) Module.preloadResults = {}; Module.preloadResults[PACKAGE_NAME] = { fromCache: false }; if (fetched) { processPackageData(fetched); fetched = null } else { fetchedCallback = processPackageData } } if (Module["calledRun"]) { runWithFS() } else { if (!Module["preRun"]) Module["preRun"] = []; Module["preRun"].push(runWithFS) } }; loadPackage({ "files": [{ "filename": "/autotransXML.cfg", "start": 0, "end": 2901, "audio": 0 }, { "filename": "/coreTransXML.cfg", "start": 2901, "end": 5130, "audio": 0 }, { "filename": "/fieldXML.cfg", "start": 5130, "end": 7242, "audio": 0 }, { "filename": "/infixcore.cfg", "start": 7242, "end": 8344, "audio": 0 }, { "filename": "/infixserver.key", "start": 8344, "end": 8362, "audio": 0 }, { "filename": "/New Document.pdf", "start": 8362, "end": 14440, "audio": 0 }, { "filename": "/sdk.cfg", "start": 14440, "end": 15575, "audio": 0 }, { "filename": "/transXML.cfg", "start": 15575, "end": 18861, "audio": 0 }, { "filename": "/cmaps/83pv-RKSJ-H", "start": 18861, "end": 24778, "audio": 0 }, { "filename": "/cmaps/90ms-RKSJ-H", "start": 24778, "end": 29685, "audio": 0 }, { "filename": "/cmaps/90ms-RKSJ-UCS2", "start": 29685, "end": 134715, "audio": 0 }, { "filename": "/cmaps/90ms-RKSJ-V", "start": 134715, "end": 137781, "audio": 0 }, { "filename": "/cmaps/90msp-RKSJ-H", "start": 137781, "end": 142619, "audio": 0 }, { "filename": "/cmaps/90msp-RKSJ-V", "start": 142619, "end": 145668, "audio": 0 }, { "filename": "/cmaps/90pv-RKSJ-H", "start": 145668, "end": 152320, "audio": 0 }, { "filename": "/cmaps/90pv-RKSJ-UCS2", "start": 152320, "end": 154411, "audio": 0 }, { "filename": "/cmaps/90pv-RKSJ-UCS2C", "start": 154411, "end": 250539, "audio": 0 }, { "filename": "/cmaps/Add-RKSJ-H", "start": 250539, "end": 264414, "audio": 0 }, { "filename": "/cmaps/Add-RKSJ-V", "start": 264414, "end": 267074, "audio": 0 }, { "filename": "/cmaps/Adobe-CNS1-UCS2", "start": 267074, "end": 493660, "audio": 0 }, { "filename": "/cmaps/Adobe-GB1-UCS2", "start": 493660, "end": 710111, "audio": 0 }, { "filename": "/cmaps/Adobe-Japan1-UCS2", "start": 710111, "end": 892310, "audio": 0 }, { "filename": "/cmaps/Adobe-Korea1-UCS2", "start": 892310, "end": 1037958, "audio": 0 }, { "filename": "/cmaps/B5pc-H", "start": 1037958, "end": 1044342, "audio": 0 }, { "filename": "/cmaps/B5pc-UCS2", "start": 1044342, "end": 1045826, "audio": 0 }, { "filename": "/cmaps/B5pc-UCS2C", "start": 1045826, "end": 1317608, "audio": 0 }, { "filename": "/cmaps/B5pc-V", "start": 1317608, "end": 1319381, "audio": 0 }, { "filename": "/cmaps/CNS-EUC-H", "start": 1319381, "end": 1330464, "audio": 0 }, { "filename": "/cmaps/CNS-EUC-V", "start": 1330464, "end": 1342579, "audio": 0 }, { "filename": "/cmaps/ecnames.txt", "start": 1342579, "end": 1345818, "audio": 0 }, { "filename": "/cmaps/ETen-B5-H", "start": 1345818, "end": 1352358, "audio": 0 }, { "filename": "/cmaps/ETen-B5-UCS2", "start": 1352358, "end": 1627820, "audio": 0 }, { "filename": "/cmaps/ETen-B5-V", "start": 1627820, "end": 1629631, "audio": 0 }, { "filename": "/cmaps/ETenms-B5-H", "start": 1629631, "end": 1631090, "audio": 0 }, { "filename": "/cmaps/ETenms-B5-V", "start": 1631090, "end": 1632956, "audio": 0 }, { "filename": "/cmaps/EUC-H", "start": 1632956, "end": 1636868, "audio": 0 }, { "filename": "/cmaps/EUC-V", "start": 1636868, "end": 1638928, "audio": 0 }, { "filename": "/cmaps/Ext-RKSJ-H", "start": 1638928, "end": 1653372, "audio": 0 }, { "filename": "/cmaps/Ext-RKSJ-V", "start": 1653372, "end": 1655690, "audio": 0 }, { "filename": "/cmaps/GB-EUC-H", "start": 1655690, "end": 1658954, "audio": 0 }, { "filename": "/cmaps/GB-EUC-V", "start": 1658954, "end": 1660891, "audio": 0 }, { "filename": "/cmaps/GBK-EUC-H", "start": 1660891, "end": 1742830, "audio": 0 }, { "filename": "/cmaps/GBK-EUC-UCS2", "start": 1742830, "end": 1965914, "audio": 0 }, { "filename": "/cmaps/GBK-EUC-V", "start": 1965914, "end": 1967840, "audio": 0 }, { "filename": "/cmaps/GBpc-EUC-H", "start": 1967840, "end": 1971132, "audio": 0 }, { "filename": "/cmaps/GBpc-EUC-UCS2", "start": 1971132, "end": 1972698, "audio": 0 }, { "filename": "/cmaps/GBpc-EUC-UCS2C", "start": 1972698, "end": 2114291, "audio": 0 }, { "filename": "/cmaps/GBpc-EUC-V", "start": 2114291, "end": 2116240, "audio": 0 }, { "filename": "/cmaps/GBT-EUC-H", "start": 2116240, "end": 2161850, "audio": 0 }, { "filename": "/cmaps/GBT-EUC-V", "start": 2161850, "end": 2163795, "audio": 0 }, { "filename": "/cmaps/H", "start": 2163795, "end": 2167573, "audio": 0 }, { "filename": "/cmaps/iceni-macroman", "start": 2167573, "end": 2177360, "audio": 0 }, { "filename": "/cmaps/iceni-winansii", "start": 2177360, "end": 2183834, "audio": 0 }, { "filename": "/cmaps/Identity-H", "start": 2183834, "end": 2190234, "audio": 0 }, { "filename": "/cmaps/Identity-V", "start": 2190234, "end": 2191433, "audio": 0 }, { "filename": "/cmaps/KSC-EUC-H", "start": 2191433, "end": 2201998, "audio": 0 }, { "filename": "/cmaps/KSC-EUC-V", "start": 2201998, "end": 2203871, "audio": 0 }, { "filename": "/cmaps/KSCms-UHC-H", "start": 2203871, "end": 2218648, "audio": 0 }, { "filename": "/cmaps/KSCms-UHC-HW-H", "start": 2218648, "end": 2233421, "audio": 0 }, { "filename": "/cmaps/KSCms-UHC-HW-V", "start": 2233421, "end": 2235307, "audio": 0 }, { "filename": "/cmaps/KSCms-UHC-UCS2", "start": 2235307, "end": 2416704, "audio": 0 }, { "filename": "/cmaps/KSCms-UHC-V", "start": 2416704, "end": 2418591, "audio": 0 }, { "filename": "/cmaps/KSCpc-EUC-H", "start": 2418591, "end": 2429983, "audio": 0 }, { "filename": "/cmaps/KSCpc-EUC-UCS2C", "start": 2429983, "end": 2579881, "audio": 0 }, { "filename": "/cmaps/KSCpc-EUC-V", "start": 2579881, "end": 2581766, "audio": 0 }, { "filename": "/cmaps/ReadMe.html", "start": 2581766, "end": 2584471, "audio": 0 }, { "filename": "/cmaps/UniCNS-UCS2-H", "start": 2584471, "end": 2890047, "audio": 0 }, { "filename": "/cmaps/UniCNS-UCS2-V", "start": 2890047, "end": 2891855, "audio": 0 }, { "filename": "/cmaps/UniGB-UCS2-H", "start": 2891855, "end": 3157837, "audio": 0 }, { "filename": "/cmaps/UniGB-UCS2-V", "start": 3157837, "end": 3159841, "audio": 0 }, { "filename": "/cmaps/UniJIS-UCS2-H", "start": 3159841, "end": 3327275, "audio": 0 }, { "filename": "/cmaps/UniJIS-UCS2-HW-H", "start": 3327275, "end": 3328932, "audio": 0 }, { "filename": "/cmaps/UniJIS-UCS2-HW-V", "start": 3328932, "end": 3334360, "audio": 0 }, { "filename": "/cmaps/UniJIS-UCS2-V", "start": 3334360, "end": 3339706, "audio": 0 }, { "filename": "/cmaps/UniJIS-UTF16-H", "start": 3339706, "end": 3539728, "audio": 0 }, { "filename": "/cmaps/UniJIS-UTF16-V", "start": 3539728, "end": 3544539, "audio": 0 }, { "filename": "/cmaps/UniKS-UCS2-H", "start": 3544539, "end": 3709385, "audio": 0 }, { "filename": "/cmaps/UniKS-UCS2-V", "start": 3709385, "end": 3711298, "audio": 0 }, { "filename": "/cmaps/V", "start": 3711298, "end": 3713334, "audio": 0 }, { "filename": "/fonts/a010013l.pfb", "start": 3713334, "end": 3739328, "audio": 0 }, { "filename": "/fonts/a010015l.pfb", "start": 3739328, "end": 3766308, "audio": 0 }, { "filename": "/fonts/a010033l.pfb", "start": 3766308, "end": 3793190, "audio": 0 }, { "filename": "/fonts/a010035l.pfb", "start": 3793190, "end": 3820720, "audio": 0 }, { "filename": "/fonts/b018012l.pfb", "start": 3820720, "end": 3856242, "audio": 0 }, { "filename": "/fonts/b018015l.pfb", "start": 3856242, "end": 3891695, "audio": 0 }, { "filename": "/fonts/b018032l.pfb", "start": 3891695, "end": 3926312, "audio": 0 }, { "filename": "/fonts/b018035l.pfb", "start": 3926312, "end": 3961530, "audio": 0 }, { "filename": "/fonts/c059013l.pfb", "start": 3961530, "end": 3999091, "audio": 0 }, { "filename": "/fonts/c059016l.pfb", "start": 3999091, "end": 4037854, "audio": 0 }, { "filename": "/fonts/c059033l.pfb", "start": 4037854, "end": 4076267, "audio": 0 }, { "filename": "/fonts/c059036l.pfb", "start": 4076267, "end": 4115009, "audio": 0 }, { "filename": "/fonts/d050000l.pfb", "start": 4115009, "end": 4159546, "audio": 0 }, { "filename": "/fonts/fontFamilyNames.txt", "start": 4159546, "end": 4160074, "audio": 0 }, { "filename": "/fonts/fonts.dir", "start": 4160074, "end": 4162489, "audio": 0 }, { "filename": "/fonts/n019003l.pfb", "start": 4162489, "end": 4189994, "audio": 0 }, { "filename": "/fonts/n019004l.pfb", "start": 4189994, "end": 4216756, "audio": 0 }, { "filename": "/fonts/n019023l.pfb", "start": 4216756, "end": 4245153, "audio": 0 }, { "filename": "/fonts/n019024l.pfb", "start": 4245153, "end": 4274124, "audio": 0 }, { "filename": "/fonts/n019043l.pfb", "start": 4274124, "end": 4301530, "audio": 0 }, { "filename": "/fonts/n019044l.pfb", "start": 4301530, "end": 4329490, "audio": 0 }, { "filename": "/fonts/n019063l.pfb", "start": 4329490, "end": 4357788, "audio": 0 }, { "filename": "/fonts/n019064l.pfb", "start": 4357788, "end": 4387172, "audio": 0 }, { "filename": "/fonts/n021003l.pfb", "start": 4387172, "end": 4422333, "audio": 0 }, { "filename": "/fonts/n021004l.pfb", "start": 4422333, "end": 4457329, "audio": 0 }, { "filename": "/fonts/n021023l.pfb", "start": 4457329, "end": 4494468, "audio": 0 }, { "filename": "/fonts/n021024l.pfb", "start": 4494468, "end": 4530793, "audio": 0 }, { "filename": "/fonts/n022003l.pfb", "start": 4530793, "end": 4566512, "audio": 0 }, { "filename": "/fonts/n022004l.pfb", "start": 4566512, "end": 4604796, "audio": 0 }, { "filename": "/fonts/n022023l.pfb", "start": 4604796, "end": 4639473, "audio": 0 }, { "filename": "/fonts/n022024l.pfb", "start": 4639473, "end": 4680159, "audio": 0 }, { "filename": "/fonts/p052003l.pfb", "start": 4680159, "end": 4722487, "audio": 0 }, { "filename": "/fonts/p052004l.pfb", "start": 4722487, "end": 4764078, "audio": 0 }, { "filename": "/fonts/p052023l.pfb", "start": 4764078, "end": 4803995, "audio": 0 }, { "filename": "/fonts/p052024l.pfb", "start": 4803995, "end": 4844382, "audio": 0 }, { "filename": "/fonts/s050000l.pfb", "start": 4844382, "end": 4876595, "audio": 0 }, { "filename": "/fonts/z003034l.pfb", "start": 4876595, "end": 4915017, "audio": 0 }, { "filename": "/hyphenation/hyph-bg.tex", "start": 4915017, "end": 4930957, "audio": 0 }, { "filename": "/hyphenation/hyph-ca.tex", "start": 4930957, "end": 4943151, "audio": 0 }, { "filename": "/hyphenation/hyph-cop.tex", "start": 4943151, "end": 4952851, "audio": 0 }, { "filename": "/hyphenation/hyph-cs.tex", "start": 4952851, "end": 4982407, "audio": 0 }, { "filename": "/hyphenation/hyph-cy.tex", "start": 4982407, "end": 5035064, "audio": 0 }, { "filename": "/hyphenation/hyph-da.tex", "start": 5035064, "end": 5045703, "audio": 0 }, { "filename": "/hyphenation/hyph-de-1901.tex", "start": 5045703, "end": 5155394, "audio": 0 }, { "filename": "/hyphenation/hyph-de-1996.tex", "start": 5155394, "end": 5266389, "audio": 0 }, { "filename": "/hyphenation/hyph-el-monoton.tex", "start": 5266389, "end": 5274960, "audio": 0 }, { "filename": "/hyphenation/hyph-el-polyton.tex", "start": 5274960, "end": 5295595, "audio": 0 }, { "filename": "/hyphenation/hyph-en-gb.tex", "start": 5295595, "end": 5361650, "audio": 0 }, { "filename": "/hyphenation/hyph-en-us.tex", "start": 5361650, "end": 5400229, "audio": 0 }, { "filename": "/hyphenation/hyph-eo.tex", "start": 5400229, "end": 5418348, "audio": 0 }, { "filename": "/hyphenation/hyph-es.tex", "start": 5418348, "end": 5448514, "audio": 0 }, { "filename": "/hyphenation/hyph-et.tex", "start": 5448514, "end": 5479014, "audio": 0 }, { "filename": "/hyphenation/hyph-eu.tex", "start": 5479014, "end": 5482089, "audio": 0 }, { "filename": "/hyphenation/hyph-fi.tex", "start": 5482089, "end": 5489506, "audio": 0 }, { "filename": "/hyphenation/hyph-fr.tex", "start": 5489506, "end": 5523235, "audio": 0 }, { "filename": "/hyphenation/hyph-ga.tex", "start": 5523235, "end": 5577794, "audio": 0 }, { "filename": "/hyphenation/hyph-gl.tex", "start": 5577794, "end": 5599689, "audio": 0 }, { "filename": "/hyphenation/hyph-grc.tex", "start": 5599689, "end": 5683318, "audio": 0 }, { "filename": "/hyphenation/hyph-hr.tex", "start": 5683318, "end": 5695575, "audio": 0 }, { "filename": "/hyphenation/hyph-hsb.tex", "start": 5695575, "end": 5711103, "audio": 0 }, { "filename": "/hyphenation/hyph-hu.tex", "start": 5711103, "end": 6304246, "audio": 0 }, { "filename": "/hyphenation/hyph-ia.tex", "start": 6304246, "end": 6312204, "audio": 0 }, { "filename": "/hyphenation/hyph-id.tex", "start": 6312204, "end": 6318433, "audio": 0 }, { "filename": "/hyphenation/hyph-is.tex", "start": 6318433, "end": 6352402, "audio": 0 }, { "filename": "/hyphenation/hyph-it.tex", "start": 6352402, "end": 6361253, "audio": 0 }, { "filename": "/hyphenation/hyph-la.tex", "start": 6361253, "end": 6372074, "audio": 0 }, { "filename": "/hyphenation/hyph-lt.tex", "start": 6372074, "end": 6383288, "audio": 0 }, { "filename": "/hyphenation/hyph-mn-cyrl-x-2a.tex", "start": 6383288, "end": 6400560, "audio": 0 }, { "filename": "/hyphenation/hyph-mn-cyrl.tex", "start": 6400560, "end": 6409367, "audio": 0 }, { "filename": "/hyphenation/hyph-nb.tex", "start": 6409367, "end": 6410426, "audio": 0 }, { "filename": "/hyphenation/hyph-nl.tex", "start": 6410426, "end": 6512970, "audio": 0 }, { "filename": "/hyphenation/hyph-nn.tex", "start": 6512970, "end": 6514031, "audio": 0 }, { "filename": "/hyphenation/hyph-no.tex", "start": 6514031, "end": 6736858, "audio": 0 }, { "filename": "/hyphenation/hyph-pl.tex", "start": 6736858, "end": 6775583, "audio": 0 }, { "filename": "/hyphenation/hyph-pt.tex", "start": 6775583, "end": 6781407, "audio": 0 }, { "filename": "/hyphenation/hyph-ro.tex", "start": 6781407, "end": 6790542, "audio": 0 }, { "filename": "/hyphenation/hyph-ru.tex", "start": 6790542, "end": 6847922, "audio": 0 }, { "filename": "/hyphenation/hyph-sa.tex", "start": 6847922, "end": 6856672, "audio": 0 }, { "filename": "/hyphenation/hyph-sh-cyrl.tex", "start": 6856672, "end": 6893109, "audio": 0 }, { "filename": "/hyphenation/hyph-sh-latn.tex", "start": 6893109, "end": 6919809, "audio": 0 }, { "filename": "/hyphenation/hyph-sk.tex", "start": 6919809, "end": 6946092, "audio": 0 }, { "filename": "/hyphenation/hyph-sl.tex", "start": 6946092, "end": 6957232, "audio": 0 }, { "filename": "/hyphenation/hyph-sr-cyrl.tex", "start": 6957232, "end": 6995586, "audio": 0 }, { "filename": "/hyphenation/hyph-sv.tex", "start": 6995586, "end": 7035099, "audio": 0 }, { "filename": "/hyphenation/hyph-tr.tex", "start": 7035099, "end": 7039989, "audio": 0 }, { "filename": "/hyphenation/hyph-uk.tex", "start": 7039989, "end": 7068546, "audio": 0 }, { "filename": "/hyphenation/hyph-zh-latn.tex", "start": 7068546, "end": 7073387, "audio": 0 }, { "filename": "/profiles/USWebCoatedSWOP.icc", "start": 7073387, "end": 7630555, "audio": 0 }, { "filename": "/sysfonts/NotoSans-Bold.ttf", "start": 7630555, "end": 7944347, "audio": 0 }, { "filename": "/sysfonts/NotoSans-BoldItalic.ttf", "start": 7944347, "end": 8269023, "audio": 0 }, { "filename": "/sysfonts/NotoSans-Italic.ttf", "start": 8269023, "end": 8595027, "audio": 0 }, { "filename": "/sysfonts/NotoSans-Regular.ttf", "start": 8595027, "end": 8908171, "audio": 0 }, { "filename": "/test/input/SDK/TranslateAuto.xml", "start": 8908171, "end": 8909558, "audio": 0 }, { "filename": "/test/input/SDK/Wood_Schools-001.pdf", "start": 8909558, "end": 9052080, "audio": 0 }], "remote_package_size": 9052080, "package_uuid": "045459a8-910e-4dbd-b22f-5ab0a7140a6f" }) })(); var moduleOverrides = {}; var key; for (key in Module) { if (Module.hasOwnProperty(key)) { moduleOverrides[key] = Module[key] } } var arguments_ = []; var thisProgram = "./this.program"; var quit_ = function (status, toThrow) { throw toThrow }; var ENVIRONMENT_IS_WEB = false; var ENVIRONMENT_IS_WORKER = false; var ENVIRONMENT_IS_NODE = false; var ENVIRONMENT_IS_SHELL = false; ENVIRONMENT_IS_WEB = typeof window === "object"; ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; ENVIRONMENT_IS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string"; ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; var scriptDirectory = ""; function locateFile(path) { if (Module["locateFile"]) { return Module["locateFile"](path, scriptDirectory) } return scriptDirectory + path } var read_, readAsync, readBinary, setWindowTitle; var nodeFS; var nodePath; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = require("path").dirname(scriptDirectory) + "/" } else { scriptDirectory = __dirname + "/" } read_ = function shell_read(filename, binary) { if (!nodeFS) nodeFS = require("fs"); if (!nodePath) nodePath = require("path"); filename = nodePath["normalize"](filename); return nodeFS["readFileSync"](filename, binary ? null : "utf8") }; readBinary = function readBinary(filename) { var ret = read_(filename, true); if (!ret.buffer) { ret = new Uint8Array(ret) } assert(ret.buffer); return ret }; if (process["argv"].length > 1) { thisProgram = process["argv"][1].replace(/\\/g, "/") } arguments_ = process["argv"].slice(2); if (typeof module !== "undefined") { module["exports"] = Module } process["on"]("uncaughtException", function (ex) { if (!(ex instanceof ExitStatus)) { throw ex } }); process["on"]("unhandledRejection", abort); quit_ = function (status) { process["exit"](status) }; Module["inspect"] = function () { return "[Emscripten Module object]" } } else if (ENVIRONMENT_IS_SHELL) { if (typeof read != "undefined") { read_ = function shell_read(f) { return read(f) } } readBinary = function readBinary(f) { var data; if (typeof readbuffer === "function") { return new Uint8Array(readbuffer(f)) } data = read(f, "binary"); assert(typeof data === "object"); return data }; if (typeof scriptArgs != "undefined") { arguments_ = scriptArgs } else if (typeof arguments != "undefined") { arguments_ = arguments } if (typeof quit === "function") { quit_ = function (status) { quit(status) } } if (typeof print !== "undefined") { if (typeof console === "undefined") console = {}; console.log = print; console.warn = console.error = typeof printErr !== "undefined" ? printErr : print } } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = self.location.href } else if (typeof document !== "undefined" && document.currentScript) { scriptDirectory = document.currentScript.src } if (scriptDirectory.indexOf("blob:") !== 0) { scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf("/") + 1) } else { scriptDirectory = "" } { read_ = function (url) { var xhr = new XMLHttpRequest; xhr.open("GET", url, false); xhr.send(null); return xhr.responseText }; if (ENVIRONMENT_IS_WORKER) { readBinary = function (url) { var xhr = new XMLHttpRequest; xhr.open("GET", url, false); xhr.responseType = "arraybuffer"; xhr.send(null); return new Uint8Array(xhr.response) } } readAsync = function (url, onload, onerror) { var xhr = new XMLHttpRequest; xhr.open("GET", url, true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (xhr.status == 200 || xhr.status == 0 && xhr.response) { onload(xhr.response); return } onerror() }; xhr.onerror = onerror; xhr.send(null) } } setWindowTitle = function (title) { document.title = title } } else { } var out = Module["print"] || console.log.bind(console); var err = Module["printErr"] || console.warn.bind(console); for (key in moduleOverrides) { if (moduleOverrides.hasOwnProperty(key)) { Module[key] = moduleOverrides[key] } } moduleOverrides = null; if (Module["arguments"]) arguments_ = Module["arguments"]; if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; if (Module["quit"]) quit_ = Module["quit"]; var STACK_ALIGN = 16; function alignMemory(size, factor) { if (!factor) factor = STACK_ALIGN; return Math.ceil(size / factor) * factor } var tempRet0 = 0; var setTempRet0 = function (value) { tempRet0 = value }; var getTempRet0 = function () { return tempRet0 }; var wasmBinary; if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; if (typeof WebAssembly !== "object") { abort("no native wasm support detected") } var wasmMemory; var ABORT = false; var EXITSTATUS; function assert(condition, text) { if (!condition) { abort("Assertion failed: " + text) } } function getCFunc(ident) { var func = Module["_" + ident]; assert(func, "Cannot call unknown function " + ident + ", make sure it is exported"); return func } function ccall(ident, returnType, argTypes, args, opts) { var toC = { "string": function (str) { var ret = 0; if (str !== null && str !== undefined && str !== 0) { var len = (str.length << 2) + 1; ret = stackAlloc(len); stringToUTF8(str, ret, len) } return ret }, "array": function (arr) { var ret = stackAlloc(arr.length); writeArrayToMemory(arr, ret); return ret } }; function convertReturnValue(ret) { if (returnType === "string") return UTF8ToString(ret); if (returnType === "boolean") return Boolean(ret); return ret } var func = getCFunc(ident); var cArgs = []; var stack = 0; if (args) { for (var i = 0; i < args.length; i++) { var converter = toC[argTypes[i]]; if (converter) { if (stack === 0) stack = stackSave(); cArgs[i] = converter(args[i]) } else { cArgs[i] = args[i] } } } var ret = func.apply(null, cArgs); ret = convertReturnValue(ret); if (stack !== 0) stackRestore(stack); return ret } function cwrap(ident, returnType, argTypes, opts) { argTypes = argTypes || []; var numericArgs = argTypes.every(function (type) { return type === "number" }); var numericRet = returnType !== "string"; if (numericRet && numericArgs && !opts) { return getCFunc(ident) } return function () { return ccall(ident, returnType, argTypes, arguments, opts) } } var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined; function UTF8ArrayToString(heap, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr; if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { return UTF8Decoder.decode(heap.subarray(idx, endPtr)) } else { var str = ""; while (idx < endPtr) { var u0 = heap[idx++]; if (!(u0 & 128)) { str += String.fromCharCode(u0); continue } var u1 = heap[idx++] & 63; if ((u0 & 224) == 192) { str += String.fromCharCode((u0 & 31) << 6 | u1); continue } var u2 = heap[idx++] & 63; if ((u0 & 240) == 224) { u0 = (u0 & 15) << 12 | u1 << 6 | u2 } else { u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63 } if (u0 < 65536) { str += String.fromCharCode(u0) } else { var ch = u0 - 65536; str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023) } } } return str } function UTF8ToString(ptr, maxBytesToRead) { return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "" } function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { if (!(maxBytesToWrite > 0)) return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; for (var i = 0; i < str.length; ++i) { var u = str.charCodeAt(i); if (u >= 55296 && u <= 57343) { var u1 = str.charCodeAt(++i); u = 65536 + ((u & 1023) << 10) | u1 & 1023 } if (u <= 127) { if (outIdx >= endIdx) break; heap[outIdx++] = u } else if (u <= 2047) { if (outIdx + 1 >= endIdx) break; heap[outIdx++] = 192 | u >> 6; heap[outIdx++] = 128 | u & 63 } else if (u <= 65535) { if (outIdx + 2 >= endIdx) break; heap[outIdx++] = 224 | u >> 12; heap[outIdx++] = 128 | u >> 6 & 63; heap[outIdx++] = 128 | u & 63 } else { if (outIdx + 3 >= endIdx) break; heap[outIdx++] = 240 | u >> 18; heap[outIdx++] = 128 | u >> 12 & 63; heap[outIdx++] = 128 | u >> 6 & 63; heap[outIdx++] = 128 | u & 63 } } heap[outIdx] = 0; return outIdx - startIdx } function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite) } function lengthBytesUTF8(str) { var len = 0; for (var i = 0; i < str.length; ++i) { var u = str.charCodeAt(i); if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; if (u <= 127) ++len; else if (u <= 2047) len += 2; else if (u <= 65535) len += 3; else len += 4 } return len } function allocateUTF8(str) { var size = lengthBytesUTF8(str) + 1; var ret = _malloc(size); if (ret) stringToUTF8Array(str, HEAP8, ret, size); return ret } function allocateUTF8OnStack(str) { var size = lengthBytesUTF8(str) + 1; var ret = stackAlloc(size); stringToUTF8Array(str, HEAP8, ret, size); return ret } function writeArrayToMemory(array, buffer) { HEAP8.set(array, buffer) } function writeAsciiToMemory(str, buffer, dontAddNull) { for (var i = 0; i < str.length; ++i) { HEAP8[buffer++ >> 0] = str.charCodeAt(i) } if (!dontAddNull) HEAP8[buffer >> 0] = 0 } function alignUp(x, multiple) { if (x % multiple > 0) { x += multiple - x % multiple } return x } var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; function updateGlobalBufferAndViews(buf) { buffer = buf; Module["HEAP8"] = HEAP8 = new Int8Array(buf); Module["HEAP16"] = HEAP16 = new Int16Array(buf); Module["HEAP32"] = HEAP32 = new Int32Array(buf); Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf); Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf); Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf); Module["HEAPF32"] = HEAPF32 = new Float32Array(buf); Module["HEAPF64"] = HEAPF64 = new Float64Array(buf) } var INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 62914560; var wasmTable; var __ATPRERUN__ = []; var __ATINIT__ = []; var __ATMAIN__ = []; var __ATPOSTRUN__ = []; var runtimeInitialized = false; var runtimeExited = false; __ATINIT__.push({ func: function () { ___wasm_call_ctors() } }); function preRun() { if (Module["preRun"]) { if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; while (Module["preRun"].length) { addOnPreRun(Module["preRun"].shift()) } } callRuntimeCallbacks(__ATPRERUN__) } function initRuntime() { runtimeInitialized = true; if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); TTY.init(); callRuntimeCallbacks(__ATINIT__) } function preMain() { FS.ignorePermissions = false; callRuntimeCallbacks(__ATMAIN__) } function exitRuntime() { runtimeExited = true } function postRun() { if (Module["postRun"]) { if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; while (Module["postRun"].length) { addOnPostRun(Module["postRun"].shift()) } } callRuntimeCallbacks(__ATPOSTRUN__) } function addOnPreRun(cb) { __ATPRERUN__.unshift(cb) } function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb) } var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; function getUniqueRunDependency(id) { return id } function addRunDependency(id) { runDependencies++; if (Module["monitorRunDependencies"]) { Module["monitorRunDependencies"](runDependencies) } } function removeRunDependency(id) { runDependencies--; if (Module["monitorRunDependencies"]) { Module["monitorRunDependencies"](runDependencies) } if (runDependencies == 0) { if (runDependencyWatcher !== null) { clearInterval(runDependencyWatcher); runDependencyWatcher = null } if (dependenciesFulfilled) { var callback = dependenciesFulfilled; dependenciesFulfilled = null; callback() } } } Module["preloadedImages"] = {}; Module["preloadedAudios"] = {}; function abort(what) { if (Module["onAbort"]) { Module["onAbort"](what) } what += ""; err(what); ABORT = true; EXITSTATUS = 1; what = "abort(" + what + "). Build with -s ASSERTIONS=1 for more info."; var e = new WebAssembly.RuntimeError(what); throw e } function hasPrefix(str, prefix) { return String.prototype.startsWith ? str.startsWith(prefix) : str.indexOf(prefix) === 0 } var dataURIPrefix = "data:application/octet-stream;base64,"; function isDataURI(filename) { return hasPrefix(filename, dataURIPrefix) } var fileURIPrefix = "file://"; function isFileURI(filename) { return hasPrefix(filename, fileURIPrefix) } var wasmBinaryFile = "InfixServerWasm.wasm"; if (!isDataURI(wasmBinaryFile)) { wasmBinaryFile = locateFile(wasmBinaryFile) } function getBinary(file) { try { if (file == wasmBinaryFile && wasmBinary) { return new Uint8Array(wasmBinary) } if (readBinary) { return readBinary(file) } else { throw "both async and sync fetching of the wasm failed" } } catch (err) { abort(err) } } function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function (response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'" } return response["arrayBuffer"]() }).catch(function () { return getBinary(wasmBinaryFile) }) } else { if (readAsync) { return new Promise(function (resolve, reject) { readAsync(wasmBinaryFile, function (response) { resolve(new Uint8Array(response)) }, reject) }) } } } return Promise.resolve().then(function () { return getBinary(wasmBinaryFile) }) } function createWasm() { var info = { "a": asmLibraryArg }; function receiveInstance(instance, module) { var exports = instance.exports; Module["asm"] = exports; wasmMemory = Module["asm"]["Ba"]; updateGlobalBufferAndViews(wasmMemory.buffer); wasmTable = Module["asm"]["Ua"]; removeRunDependency("wasm-instantiate") } addRunDependency("wasm-instantiate"); function receiveInstantiatedSource(output) { receiveInstance(output["instance"]) } function instantiateArrayBuffer(receiver) { return getBinaryPromise().then(function (binary) { return WebAssembly.instantiate(binary, info) }).then(receiver, function (reason) { err("failed to asynchronously prepare wasm: " + reason); abort(reason) }) } function instantiateAsync() { if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === "function") { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function (response) { var result = WebAssembly.instantiateStreaming(response, info); return result.then(receiveInstantiatedSource, function (reason) { err("wasm streaming compile failed: " + reason); err("falling back to ArrayBuffer instantiation"); return instantiateArrayBuffer(receiveInstantiatedSource) }) }) } else { return instantiateArrayBuffer(receiveInstantiatedSource) } } if (Module["instantiateWasm"]) { try { var exports = Module["instantiateWasm"](info, receiveInstance); return exports } catch (e) { err("Module.instantiateWasm callback failed with error: " + e); return false } } instantiateAsync(); return {} } var tempDouble; var tempI64; var ASM_CONSTS = { 3553524: function ($0, $1, $2, $3) { var xhr = new XMLHttpRequest; var url = Module.UTF8ToString($0); xhr.open("GET", url, false); xhr.responseType = "arraybuffer"; if ($1 >= 0) { xhr.setRequestHeader("Range", ["bytes=", $1, "-", $2].join("")) } if ($3 >= 0) { var customHeaders = Module["customHeadersMap"][$3]; if (customHeaders) { for (var header in customHeaders) { xhr.setRequestHeader(header, customHeaders[header]) } } var withCredentials = Module["withCredentials"][$3]; if (withCredentials) { xhr.withCredentials = withCredentials } } try { xhr.send() } catch (err) { return 0 } if (xhr.status == 200 || xhr.status == 206) { var responseArray = new Uint8Array(xhr.response); Module["__LAST_REQUESTED_DATA__"] = responseArray; return Module["__LAST_REQUESTED_DATA__"].length } return 0 }, 3554292: function ($0) { if (Module["__LAST_REQUESTED_DATA__"]) { var data = Module["__LAST_REQUESTED_DATA__"]; Module.HEAPU8.set(data, $0); delete Module["__LAST_REQUESTED_DATA__"]; return 1 } return 0 } }; function callRuntimeCallbacks(callbacks) { while (callbacks.length > 0) { var callback = callbacks.shift(); if (typeof callback == "function") { callback(Module); continue } var func = callback.func; if (typeof func === "number") { if (callback.arg === undefined) { wasmTable.get(func)() } else { wasmTable.get(func)(callback.arg) } } else { func(callback.arg === undefined ? null : callback.arg) } } } var _emscripten_get_now; if (ENVIRONMENT_IS_NODE) { _emscripten_get_now = function () { var t = process["hrtime"](); return t[0] * 1e3 + t[1] / 1e6 } } else if (typeof dateNow !== "undefined") { _emscripten_get_now = dateNow } else _emscripten_get_now = function () { return performance.now() }; var _emscripten_get_now_is_monotonic = true; function setErrNo(value) { HEAP32[___errno_location() >> 2] = value; return value } function _clock_gettime(clk_id, tp) { var now; if (clk_id === 0) { now = Date.now() } else if ((clk_id === 1 || clk_id === 4) && _emscripten_get_now_is_monotonic) { now = _emscripten_get_now() } else { setErrNo(28); return -1 } HEAP32[tp >> 2] = now / 1e3 | 0; HEAP32[tp + 4 >> 2] = now % 1e3 * 1e3 * 1e3 | 0; return 0 } function ___clock_gettime(a0, a1) { return _clock_gettime(a0, a1) } var ExceptionInfoAttrs = { DESTRUCTOR_OFFSET: 0, REFCOUNT_OFFSET: 4, TYPE_OFFSET: 8, CAUGHT_OFFSET: 12, RETHROWN_OFFSET: 13, SIZE: 16 }; function ___cxa_allocate_exception(size) { return _malloc(size + ExceptionInfoAttrs.SIZE) + ExceptionInfoAttrs.SIZE } function ExceptionInfo(excPtr) { this.excPtr = excPtr; this.ptr = excPtr - ExceptionInfoAttrs.SIZE; this.set_type = function (type) { HEAP32[this.ptr + ExceptionInfoAttrs.TYPE_OFFSET >> 2] = type }; this.get_type = function () { return HEAP32[this.ptr + ExceptionInfoAttrs.TYPE_OFFSET >> 2] }; this.set_destructor = function (destructor) { HEAP32[this.ptr + ExceptionInfoAttrs.DESTRUCTOR_OFFSET >> 2] = destructor }; this.get_destructor = function () { return HEAP32[this.ptr + ExceptionInfoAttrs.DESTRUCTOR_OFFSET >> 2] }; this.set_refcount = function (refcount) { HEAP32[this.ptr + ExceptionInfoAttrs.REFCOUNT_OFFSET >> 2] = refcount }; this.set_caught = function (caught) { caught = caught ? 1 : 0; HEAP8[this.ptr + ExceptionInfoAttrs.CAUGHT_OFFSET >> 0] = caught }; this.get_caught = function () { return HEAP8[this.ptr + ExceptionInfoAttrs.CAUGHT_OFFSET >> 0] != 0 }; this.set_rethrown = function (rethrown) { rethrown = rethrown ? 1 : 0; HEAP8[this.ptr + ExceptionInfoAttrs.RETHROWN_OFFSET >> 0] = rethrown }; this.get_rethrown = function () { return HEAP8[this.ptr + ExceptionInfoAttrs.RETHROWN_OFFSET >> 0] != 0 }; this.init = function (type, destructor) { this.set_type(type); this.set_destructor(destructor); this.set_refcount(0); this.set_caught(false); this.set_rethrown(false) }; this.add_ref = function () { var value = HEAP32[this.ptr + ExceptionInfoAttrs.REFCOUNT_OFFSET >> 2]; HEAP32[this.ptr + ExceptionInfoAttrs.REFCOUNT_OFFSET >> 2] = value + 1 }; this.release_ref = function () { var prev = HEAP32[this.ptr + ExceptionInfoAttrs.REFCOUNT_OFFSET >> 2]; HEAP32[this.ptr + ExceptionInfoAttrs.REFCOUNT_OFFSET >> 2] = prev - 1; return prev === 1 } } function CatchInfo(ptr) { this.free = function () { _free(this.ptr); this.ptr = 0 }; this.set_base_ptr = function (basePtr) { HEAP32[this.ptr >> 2] = basePtr }; this.get_base_ptr = function () { return HEAP32[this.ptr >> 2] }; this.set_adjusted_ptr = function (adjustedPtr) { var ptrSize = 4; HEAP32[this.ptr + ptrSize >> 2] = adjustedPtr }; this.get_adjusted_ptr = function () { var ptrSize = 4; return HEAP32[this.ptr + ptrSize >> 2] }; this.get_exception_ptr = function () { var isPointer = ___cxa_is_pointer_type(this.get_exception_info().get_type()); if (isPointer) { return HEAP32[this.get_base_ptr() >> 2] } var adjusted = this.get_adjusted_ptr(); if (adjusted !== 0) return adjusted; return this.get_base_ptr() }; this.get_exception_info = function () { return new ExceptionInfo(this.get_base_ptr()) }; if (ptr === undefined) { this.ptr = _malloc(8); this.set_adjusted_ptr(0) } else { this.ptr = ptr } } var exceptionCaught = []; function exception_addRef(info) { info.add_ref() } var uncaughtExceptionCount = 0; function ___cxa_begin_catch(ptr) { var catchInfo = new CatchInfo(ptr); var info = catchInfo.get_exception_info(); if (!info.get_caught()) { info.set_caught(true); uncaughtExceptionCount-- } info.set_rethrown(false); exceptionCaught.push(catchInfo); exception_addRef(info); return catchInfo.get_exception_ptr() } var exceptionLast = 0; function ___cxa_free_exception(ptr) { return _free(new ExceptionInfo(ptr).ptr) } function exception_decRef(info) { if (info.release_ref() && !info.get_rethrown()) { var destructor = info.get_destructor(); if (destructor) { wasmTable.get(destructor)(info.excPtr) } ___cxa_free_exception(info.excPtr) } } function ___cxa_end_catch() { _setThrew(0); var catchInfo = exceptionCaught.pop(); exception_decRef(catchInfo.get_exception_info()); catchInfo.free(); exceptionLast = 0 } function ___resumeException(catchInfoPtr) { var catchInfo = new CatchInfo(catchInfoPtr); var ptr = catchInfo.get_base_ptr(); if (!exceptionLast) { exceptionLast = ptr } catchInfo.free(); throw ptr } function ___cxa_find_matching_catch_2() { var thrown = exceptionLast; if (!thrown) { setTempRet0(0 | 0); return 0 | 0 } var info = new ExceptionInfo(thrown); var thrownType = info.get_type(); var catchInfo = new CatchInfo; catchInfo.set_base_ptr(thrown); if (!thrownType) { setTempRet0(0 | 0); return catchInfo.ptr | 0 } var typeArray = Array.prototype.slice.call(arguments); var stackTop = stackSave(); var exceptionThrowBuf = stackAlloc(4); HEAP32[exceptionThrowBuf >> 2] = thrown; for (var i = 0; i < typeArray.length; i++) { var caughtType = typeArray[i]; if (caughtType === 0 || caughtType === thrownType) { break } if (___cxa_can_catch(caughtType, thrownType, exceptionThrowBuf)) { var adjusted = HEAP32[exceptionThrowBuf >> 2]; if (thrown !== adjusted) { catchInfo.set_adjusted_ptr(adjusted) } setTempRet0(caughtType | 0); return catchInfo.ptr | 0 } } stackRestore(stackTop); setTempRet0(thrownType | 0); return catchInfo.ptr | 0 } function ___cxa_find_matching_catch_3() { var thrown = exceptionLast; if (!thrown) { setTempRet0(0 | 0); return 0 | 0 } var info = new ExceptionInfo(thrown); var thrownType = info.get_type(); var catchInfo = new CatchInfo; catchInfo.set_base_ptr(thrown); if (!thrownType) { setTempRet0(0 | 0); return catchInfo.ptr | 0 } var typeArray = Array.prototype.slice.call(arguments); var stackTop = stackSave(); var exceptionThrowBuf = stackAlloc(4); HEAP32[exceptionThrowBuf >> 2] = thrown; for (var i = 0; i < typeArray.length; i++) { var caughtType = typeArray[i]; if (caughtType === 0 || caughtType === thrownType) { break } if (___cxa_can_catch(caughtType, thrownType, exceptionThrowBuf)) { var adjusted = HEAP32[exceptionThrowBuf >> 2]; if (thrown !== adjusted) { catchInfo.set_adjusted_ptr(adjusted) } setTempRet0(caughtType | 0); return catchInfo.ptr | 0 } } stackRestore(stackTop); setTempRet0(thrownType | 0); return catchInfo.ptr | 0 } function ___cxa_rethrow() { var catchInfo = exceptionCaught.pop(); if (!catchInfo) { abort("no exception to throw") } var info = catchInfo.get_exception_info(); var ptr = catchInfo.get_base_ptr(); if (!info.get_rethrown()) { exceptionCaught.push(catchInfo); info.set_rethrown(true); info.set_caught(false); uncaughtExceptionCount++ } else { catchInfo.free() } exceptionLast = ptr; throw ptr } function ___cxa_throw(ptr, type, destructor) { var info = new ExceptionInfo(ptr); info.init(type, destructor); exceptionLast = ptr; uncaughtExceptionCount++; throw ptr } function _gmtime_r(time, tmPtr) { var date = new Date(HEAP32[time >> 2] * 1e3); HEAP32[tmPtr >> 2] = date.getUTCSeconds(); HEAP32[tmPtr + 4 >> 2] = date.getUTCMinutes(); HEAP32[tmPtr + 8 >> 2] = date.getUTCHours(); HEAP32[tmPtr + 12 >> 2] = date.getUTCDate(); HEAP32[tmPtr + 16 >> 2] = date.getUTCMonth(); HEAP32[tmPtr + 20 >> 2] = date.getUTCFullYear() - 1900; HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); HEAP32[tmPtr + 36 >> 2] = 0; HEAP32[tmPtr + 32 >> 2] = 0; var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0; HEAP32[tmPtr + 28 >> 2] = yday; if (!_gmtime_r.GMTString) _gmtime_r.GMTString = allocateUTF8("GMT"); HEAP32[tmPtr + 40 >> 2] = _gmtime_r.GMTString; return tmPtr } function ___gmtime_r(a0, a1) { return _gmtime_r(a0, a1) } function _tzset() { if (_tzset.called) return; _tzset.called = true; var currentYear = (new Date).getFullYear(); var winter = new Date(currentYear, 0, 1); var summer = new Date(currentYear, 6, 1); var winterOffset = winter.getTimezoneOffset(); var summerOffset = summer.getTimezoneOffset(); var stdTimezoneOffset = Math.max(winterOffset, summerOffset); HEAP32[__get_timezone() >> 2] = stdTimezoneOffset * 60; HEAP32[__get_daylight() >> 2] = Number(winterOffset != summerOffset); function extractZone(date) { var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/); return match ? match[1] : "GMT" } var winterName = extractZone(winter); var summerName = extractZone(summer); var winterNamePtr = allocateUTF8(winterName); var summerNamePtr = allocateUTF8(summerName); if (summerOffset < winterOffset) { HEAP32[__get_tzname() >> 2] = winterNamePtr; HEAP32[__get_tzname() + 4 >> 2] = summerNamePtr } else { HEAP32[__get_tzname() >> 2] = summerNamePtr; HEAP32[__get_tzname() + 4 >> 2] = winterNamePtr } } function _localtime_r(time, tmPtr) { _tzset(); var date = new Date(HEAP32[time >> 2] * 1e3); HEAP32[tmPtr >> 2] = date.getSeconds(); HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); HEAP32[tmPtr + 8 >> 2] = date.getHours(); HEAP32[tmPtr + 12 >> 2] = date.getDate(); HEAP32[tmPtr + 16 >> 2] = date.getMonth(); HEAP32[tmPtr + 20 >> 2] = date.getFullYear() - 1900; HEAP32[tmPtr + 24 >> 2] = date.getDay(); var start = new Date(date.getFullYear(), 0, 1); var yday = (date.getTime() - start.getTime()) / (1e3 * 60 * 60 * 24) | 0; HEAP32[tmPtr + 28 >> 2] = yday; HEAP32[tmPtr + 36 >> 2] = -(date.getTimezoneOffset() * 60); var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset(); var winterOffset = start.getTimezoneOffset(); var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset)) | 0; HEAP32[tmPtr + 32 >> 2] = dst; var zonePtr = HEAP32[__get_tzname() + (dst ? 4 : 0) >> 2]; HEAP32[tmPtr + 40 >> 2] = zonePtr; return tmPtr } function ___localtime_r(a0, a1) { return _localtime_r(a0, a1) } var PATH = { splitPath: function (filename) { var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; return splitPathRe.exec(filename).slice(1) }, normalizeArray: function (parts, allowAboveRoot) { var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === ".") { parts.splice(i, 1) } else if (last === "..") { parts.splice(i, 1); up++ } else if (up) { parts.splice(i, 1); up-- } } if (allowAboveRoot) { for (; up; up--) { parts.unshift("..") } } return parts }, normalize: function (path) { var isAbsolute = path.charAt(0) === "/", trailingSlash = path.substr(-1) === "/"; path = PATH.normalizeArray(path.split("/").filter(function (p) { return !!p }), !isAbsolute).join("/"); if (!path && !isAbsolute) { path = "." } if (path && trailingSlash) { path += "/" } return (isAbsolute ? "/" : "") + path }, dirname: function (path) { var result = PATH.splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { return "." } if (dir) { dir = dir.substr(0, dir.length - 1) } return root + dir }, basename: function (path) { if (path === "/") return "/"; path = PATH.normalize(path); path = path.replace(/\/$/, ""); var lastSlash = path.lastIndexOf("/"); if (lastSlash === -1) return path; return path.substr(lastSlash + 1) }, extname: function (path) { return PATH.splitPath(path)[3] }, join: function () { var paths = Array.prototype.slice.call(arguments, 0); return PATH.normalize(paths.join("/")) }, join2: function (l, r) { return PATH.normalize(l + "/" + r) } }; function getRandomDevice() { if (typeof crypto === "object" && typeof crypto["getRandomValues"] === "function") { var randomBuffer = new Uint8Array(1); return function () { crypto.getRandomValues(randomBuffer); return randomBuffer[0] } } else if (ENVIRONMENT_IS_NODE) { try { var crypto_module = require("crypto"); return function () { return crypto_module["randomBytes"](1)[0] } } catch (e) { } } return function () { abort("randomDevice") } } var PATH_FS = { resolve: function () { var resolvedPath = "", resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = i >= 0 ? arguments[i] : FS.cwd(); if (typeof path !== "string") { throw new TypeError("Arguments to path.resolve must be strings") } else if (!path) { return "" } resolvedPath = path + "/" + resolvedPath; resolvedAbsolute = path.charAt(0) === "/" } resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(function (p) { return !!p }), !resolvedAbsolute).join("/"); return (resolvedAbsolute ? "/" : "") + resolvedPath || "." }, relative: function (from, to) { from = PATH_FS.resolve(from).substr(1); to = PATH_FS.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== "") break } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== "") break } if (start > end) return []; return arr.slice(start, end - start + 1) } var fromParts = trim(from.split("/")); var toParts = trim(to.sp