mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-26 16:07:18 +00:00
18 lines
1.2 MiB
JavaScript
18 lines
1.2 MiB
JavaScript
|
|
"use strict";
|
||
|
|
|
||
|
|
var _createPyodideModule = (() => {
|
||
|
|
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||
|
|
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
|
||
|
|
return (
|
||
|
|
function(_createPyodideModule = {}) {
|
||
|
|
|
||
|
|
var Module=typeof _createPyodideModule!="undefined"?_createPyodideModule:{};if(typeof globalThis.BigInt64Array==="undefined"){function partsToBigIntSigned(lower,upper){return BigInt(lower)|BigInt(upper+2*(upper&2147483648))<<32n}function partsToBigIntUnsigned(lower,upper){return BigInt(lower)|BigInt(upper)<<32n}function bigIntToParts(value){var lower=Number(BigInt(value)&BigInt(4294967295))|0;var upper=Number(BigInt(value)>>32n)|0;return[lower,upper]}function createBigIntArrayShim(partsToBigInt){function createBigInt64Array(array){if(typeof array==="number"){array=new Uint32Array(2*array)}var orig_array;if(!ArrayBuffer.isView(array)){if(array.constructor&&array.constructor.name==="ArrayBuffer"){array=new Uint32Array(array)}else{orig_array=array;array=new Uint32Array(array.length*2)}}var proxy=new Proxy({slice:function(min,max){if(max===undefined){max=array.length}var new_buf=array.slice(min*2,max*2);return createBigInt64Array(new_buf)},subarray:function(min,max){var new_buf=array.subarray(min*2,max*2);return createBigInt64Array(new_buf)},[Symbol.iterator]:function*(){for(var i=0;i<array.length/2;i++){yield partsToBigInt(array[2*i],array[2*i+1])}},BYTES_PER_ELEMENT:2*array.BYTES_PER_ELEMENT,buffer:array.buffer,byteLength:array.byteLength,byteOffset:array.byteOffset,length:array.length/2,copyWithin:function(target,start,end){array.copyWithin(target*2,start*2,end*2);return proxy},set:function(source,targetOffset){if(targetOffset===undefined){targetOffset=0}if(2*(source.length+targetOffset)>array.length){throw new RangeError("offset is out of bounds")}for(var i=0;i<source.length;i++){var value=source[i];var pair=bigIntToParts(value);array.set(pair,2*(targetOffset+i))}}},{get:function(target,idx,receiver){if(typeof idx!=="string"||!/^\d+$/.test(idx)){return Reflect.get(target,idx,receiver)}var lower=array[idx*2];var upper=array[idx*2+1];return partsToBigInt(lower,upper)},set:function(target,idx,value,receiver){if(typeof idx!=="string"||!/^\d+$/.test(idx)){return Reflect.set(target,idx,value,receiver)}if(typeof value!=="bigint"){throw new TypeError(`Cannot convert ${value} to a BigInt`)}var pair=bigIntToParts(value);array.set(pair,2*idx);return true}});if(orig_array){proxy.set(orig_array)}return proxy}return createBigInt64Array}globalThis.BigUint64Array=createBigIntArrayShim(partsToBigIntUnsigned);globalThis.BigInt64Array=createBigIntArrayShim(partsToBigIntSigned)}var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var 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;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;if(e&&typeof e=="object"&&e.stack){toLog=[e,e.stack]}err("exiting due to exception: "+toLog)}if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process.argv.length>1){thisProgram=process.argv[1].repla
|
||
|
|
|
||
|
|
|
||
|
|
return _createPyodideModule.ready
|
||
|
|
}
|
||
|
|
|
||
|
|
);
|
||
|
|
})();
|
||
|
|
globalThis._createPyodideModule = _createPyodideModule;
|