var ar=Object.create;var R=Object.defineProperty;var cr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var lr=Object.getPrototypeOf,dr=Object.prototype.hasOwnProperty;var d=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var pr=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fr(t))!dr.call(r,n)&&n!==e&&R(r,n,{get:()=>t[n],enumerable:!(o=cr(t,n))||o.enumerable});return r};var hr=(r,t,e)=>(e=r!=null?ar(lr(r)):{},pr(t||!r||!r.__esModule?R(e,"default",{value:r,enumerable:!0}):e,r));var W=d((exports,module)=>{var requireFoolWebpack=eval(`typeof require !== 'undefined' ? require : function (module) { throw new Error('Module " + module + " not found.') }`);module.exports=requireFoolWebpack});var g=d((Mr,h)=>{var N=W(),S=function(r){return typeof r<"u"&&r.versions!=null&&r.versions.node!=null};h.exports.isNode=S;h.exports.platform=typeof process<"u"&&S(process)?"node":"browser";var L=kr("worker_threads");h.exports.isMainThread=h.exports.platform==="node"?(!L||L.isMainThread)&&!process.connected:typeof Window<"u";h.exports.cpus=h.exports.platform==="browser"?self.navigator.hardwareConcurrency:N("os").cpus().length;function kr(r){try{return N(r)}catch{return null}}});var b=d((jr,D)=>{"use strict";function f(r,t){var e=this;if(!(this instanceof f))throw new SyntaxError("Constructor must be called with the new operator");if(typeof r!="function")throw new SyntaxError("Function parameter handler(resolve, reject) missing");var o=[],n=[];this.resolved=!1,this.rejected=!1,this.pending=!0;var u=function(s,a){o.push(s),n.push(a)};this.then=function(s,a){return new f(function(w,x){var sr=s?F(s,w,x):w,ur=a?F(a,w,x):x;u(sr,ur)},e)};var c=function(s){return e.resolved=!0,e.rejected=!1,e.pending=!1,o.forEach(function(a){a(s)}),u=function(a,w){a(s)},c=i=function(){},e},i=function(s){return e.resolved=!1,e.rejected=!0,e.pending=!1,n.forEach(function(a){a(s)}),u=function(a,w){w(s)},c=i=function(){},e};this.cancel=function(){return t?t.cancel():i(new y),e},this.timeout=function(s){if(t)t.timeout(s);else{var a=setTimeout(function(){i(new v("Promise timed out after "+s+" ms"))},s);e.always(function(){clearTimeout(a)})}return e},r(function(s){c(s)},function(s){i(s)})}function F(r,t,e){return function(o){try{var n=r(o);n&&typeof n.then=="function"&&typeof n.catch=="function"?n.then(t,e):t(n)}catch(u){e(u)}}}f.prototype.catch=function(r){return this.then(null,r)};f.prototype.always=function(r){return this.then(r,r)};f.all=function(r){return new f(function(t,e){var o=r.length,n=[];o?r.forEach(function(u,c){u.then(function(i){n[c]=i,o--,o==0&&t(n)},function(i){o=0,e(i)})}):t(n)})};f.defer=function(){var r={};return r.promise=new f(function(t,e){r.resolve=t,r.reject=e}),r};function y(r){this.message=r||"promise cancelled",this.stack=new Error().stack}y.prototype=new Error;y.prototype.constructor=Error;y.prototype.name="CancellationError";f.CancellationError=y;function v(r){this.message=r||"timeout exceeded",this.stack=new Error().stack}v.prototype=new Error;v.prototype.constructor=Error;v.prototype.name="TimeoutError";f.TimeoutError=v;D.exports=f});var H=d((Ar,U)=>{U.exports=`!function(){var __webpack_exports__={};!function(){var exports=__webpack_exports__,__webpack_unused_export__;function _typeof(r){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \\" + module + \\" not found.') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}},WorkerThreads,parentPort;if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(r,e){addEventListener(r,function(r){e(r.data)})},worker.send=function(r){postMessage(r)};else{if("undefined"==typeof process)throw new Error("Script must be executed as a worker");try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(error){if("object"!==_typeof(error)||null===error||"MODULE_NOT_FOUND"!==error.code)throw error}WorkerThreads&&null!==WorkerThreads.parentPort?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=process.send.bind(process),worker.on("disconnect",function(){process.exit(1)}),worker.exit=process.exit.bind(process))}function convertError(o){return Object.getOwnPropertyNames(o).reduce(function(r,e){return Object.defineProperty(r,e,{value:o[e],enumerable:!0})},{})}function isPromise(r){return r&&"function"==typeof r.then&&"function"==typeof r.catch}worker.methods={},worker.methods.run=function(r,e){r=new Function("return ("+r+").apply(null, arguments);");return r.apply(r,e)},worker.methods.methods=function(){return Object.keys(worker.methods)};var currentRequestId=null;worker.on("message",function(e){if(e===TERMINATE_METHOD_ID)return worker.exit(0);try{var r=worker.methods[e.method];if(!r)throw new Error('Unknown method "'+e.method+'"');currentRequestId=e.id;var o=r.apply(r,e.params);isPromise(o)?o.then(function(r){worker.send({id:e.id,result:r,error:null}),currentRequestId=null}).catch(function(r){worker.send({id:e.id,result:null,error:convertError(r)}),currentRequestId=null}):(worker.send({id:e.id,result:o,error:null}),currentRequestId=null)}catch(r){worker.send({id:e.id,result:null,error:convertError(r)})}}),worker.register=function(r){if(r)for(var e in r)r.hasOwnProperty(e)&&(worker.methods[e]=r[e]);worker.send("ready")},worker.emit=function(r){currentRequestId&&worker.send({id:currentRequestId,isEvent:!0,payload:r})},__webpack_unused_export__=worker.register,__webpack_unused_export__=worker.emit}()}();`});var G=d((Ir,k)=>{"use strict";var _=b(),z=g(),E=W(),C="__workerpool-terminate__",wr=1e3;function $(){var r=q();if(!r)throw new Error("WorkerPool: workerType = 'thread' is not supported, Node >= 11.7.0 required");return r}function B(){if(typeof Worker!="function"&&(typeof Worker!="object"||typeof Worker.prototype.constructor!="function"))throw new Error("WorkerPool: Web Workers not supported")}function q(){try{return E("worker_threads")}catch(r){if(typeof r=="object"&&r!==null&&r.code==="MODULE_NOT_FOUND")return null;throw r}}function mr(){if(z.platform==="browser"){if(typeof Blob>"u")throw new Error("Blob not supported by the browser");if(!window.URL||typeof window.URL.createObjectURL!="function")throw new Error("URL.createObjectURL not supported by the browser");var r=new Blob([H()],{type:"text/javascript"});return window.URL.createObjectURL(r)}else return __dirname+"/worker.js"}function yr(r,t){if(t.workerType==="web")return B(),T(r,Worker);if(t.workerType==="thread")return e=$(),O(r,e);if(t.workerType==="process"||!t.workerType)return P(r,Q(t),E("child_process"));if(z.platform==="browser")return B(),T(r,Worker);var e=q();return e?O(r,e):P(r,Q(t),E("child_process"))}function T(r,t){var e=new t(r);return e.isBrowserWorker=!0,e.on=function(o,n){this.addEventListener(o,function(u){n(u.data)})},e.send=function(o){this.postMessage(o)},e}function O(r,t){var e=new t.Worker(r,{stdout:!1,stderr:!1});return e.isWorkerThread=!0,e.send=function(o){this.postMessage(o)},e.kill=function(){return this.terminate(),!0},e.disconnect=function(){this.terminate()},e}function P(r,t,e){var o=e.fork(r,t.forkArgs,t.forkOpts);return o.isChildProcess=!0,o}function Q(r){r=r||{};var t=process.execArgv.join(" "),e=t.indexOf("--inspect")!==-1,o=t.indexOf("--debug-brk")!==-1,n=[];return e&&(n.push("--inspect="+r.debugPort),o&&n.push("--debug-brk")),process.execArgv.forEach(function(u){u.indexOf("--max-old-space-size")>-1&&n.push(u)}),Object.assign({},r,{forkArgs:r.forkArgs,forkOpts:Object.assign({},r.forkOpts,{execArgv:(r.forkOpts&&r.forkOpts.execArgv||[]).concat(n)})})}function vr(r){for(var t=new Error(""),e=Object.keys(r),o=0;o0};m.prototype.terminate=function(r,t){var e=this;if(r){for(var o in this.processing)this.processing[o]!==void 0&&this.processing[o].resolver.reject(new Error("Worker terminated"));this.processing=Object.create(null)}if(typeof t=="function"&&(this.terminationHandler=t),this.busy())this.terminating=!0;else{var n=function(c){if(e.terminated=!0,e.worker!=null&&e.worker.removeAllListeners&&e.worker.removeAllListeners("message"),e.worker=null,e.terminating=!1,e.terminationHandler)e.terminationHandler(c,e);else if(c)throw c};if(this.worker)if(typeof this.worker.kill=="function"){if(this.worker.killed){n(new Error("worker already killed!"));return}if(this.worker.isChildProcess){var u=setTimeout(function(){e.worker.kill()},wr);this.worker.once("exit",function(){clearTimeout(u),e.worker.killed=!0,n()}),this.worker.ready?this.worker.send(C):this.worker.requestQueue.push(C)}else this.worker.kill(),this.worker.killed=!0,n();return}else if(typeof this.worker.terminate=="function")this.worker.terminate(),this.worker.killed=!0;else throw new Error("Failed to terminate worker");n()}};m.prototype.terminateAndNotify=function(r,t){var e=_.defer();return t&&(e.promise.timeout=t),this.terminate(r,function(o,n){o?e.reject(o):e.resolve(n)}),e.promise};k.exports=m;k.exports._tryRequireWorkerThreads=q;k.exports._setupProcessWorker=P;k.exports._setupBrowserWorker=T;k.exports._setupWorkerThreadWorker=O;k.exports.ensureWorkerThreads=$});var K=d((Rr,J)=>{"use strict";var X=65535;J.exports=M;function M(){this.ports=Object.create(null),this.length=0}M.prototype.nextAvailableStartingAt=function(r){for(;this.ports[r]===!0;)r++;if(r>=X)throw new Error("WorkerPool debug port limit reached: "+r+">= "+X);return this.ports[r]=!0,this.length++,r};M.prototype.releasePort=function(r){delete this.ports[r],this.length--}});var tr=d((Lr,er)=>{var j=b(),V=G(),gr=g(),br=K(),Y=new br;function l(r,t){typeof r=="string"?this.script=r||null:(this.script=null,t=r),this.workers=[],this.tasks=[],t=t||{},this.forkArgs=t.forkArgs||[],this.forkOpts=t.forkOpts||{},this.debugPortStart=t.debugPortStart||43210,this.nodeWorker=t.nodeWorker,this.workerType=t.workerType||t.nodeWorker||"auto",this.maxQueueSize=t.maxQueueSize||1/0,t&&"maxWorkers"in t?(_r(t.maxWorkers),this.maxWorkers=t.maxWorkers):this.maxWorkers=Math.max((gr.cpus||4)-1,1),t&&"minWorkers"in t&&(t.minWorkers==="max"?this.minWorkers=this.maxWorkers:(xr(t.minWorkers),this.minWorkers=t.minWorkers,this.maxWorkers=Math.max(this.minWorkers,this.maxWorkers)),this._ensureMinWorkers()),this._boundNext=this._next.bind(this),this.workerType==="thread"&&V.ensureWorkerThreads()}l.prototype.exec=function(r,t,e){if(t&&!Array.isArray(t))throw new TypeError('Array expected as argument "params"');if(typeof r=="string"){var o=j.defer();if(this.tasks.length>=this.maxQueueSize)throw new Error("Max queue size of "+this.maxQueueSize+" reached");var n=this.tasks,u={method:r,params:t,resolver:o,timeout:null,options:e};n.push(u);var c=o.promise.timeout;return o.promise.timeout=function(s){return n.indexOf(u)!==-1?(u.timeout=s,o.promise):c.call(o.promise,s)},this._next(),o.promise}else{if(typeof r=="function")return this.exec("run",[String(r),t]);throw new TypeError('Function or string expected as argument "method"')}};l.prototype.proxy=function(){if(arguments.length>0)throw new Error("No arguments expected");var r=this;return this.exec("methods").then(function(t){var e={};return t.forEach(function(o){e[o]=function(){return r.exec(o,Array.prototype.slice.call(arguments))}}),e})};l.prototype._next=function(){if(this.tasks.length>0){var r=this._getWorker();if(r){var t=this,e=this.tasks.shift();if(e.resolver.promise.pending){var o=r.exec(e.method,e.params,e.resolver,e.options).then(t._boundNext).catch(function(){if(r.terminated)return t._removeWorker(r)}).then(function(){t._next()});typeof e.timeout=="number"&&o.timeout(e.timeout)}else t._next()}}};l.prototype._getWorker=function(){for(var r=this.workers,t=0;t= 1")}function xr(r){if(!Z(r)||!rr(r)||r<0)throw new TypeError("Option minWorkers must be an integer number >= 0")}function Z(r){return typeof r=="number"}function rr(r){return Math.round(r)==r}er.exports=l});var A=d((exports,module)=>{var requireFoolWebpack=eval(`typeof require !== 'undefined' ? require : function (module) { throw new Error('Module " + module + " not found.') }`),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}};if(typeof self<"u"&&typeof postMessage=="function"&&typeof addEventListener=="function")worker.on=function(r,t){addEventListener(r,function(e){t(e.data)})},worker.send=function(r){postMessage(r)};else if(typeof process<"u"){try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(r){if(!(typeof r=="object"&&r!==null&&r.code==="MODULE_NOT_FOUND"))throw r}WorkerThreads&&WorkerThreads.parentPort!==null?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=process.send.bind(process),worker.on("disconnect",function(){process.exit(1)}),worker.exit=process.exit.bind(process))}else throw new Error("Script must be executed as a worker");var WorkerThreads,parentPort;function convertError(r){return Object.getOwnPropertyNames(r).reduce(function(t,e){return Object.defineProperty(t,e,{value:r[e],enumerable:!0})},{})}function isPromise(r){return r&&typeof r.then=="function"&&typeof r.catch=="function"}worker.methods={};worker.methods.run=function r(t,e){var o=new Function("return ("+t+").apply(null, arguments);");return o.apply(o,e)};worker.methods.methods=function r(){return Object.keys(worker.methods)};var currentRequestId=null;worker.on("message",function(r){if(r===TERMINATE_METHOD_ID)return worker.exit(0);try{var t=worker.methods[r.method];if(t){currentRequestId=r.id;var e=t.apply(t,r.params);isPromise(e)?e.then(function(o){worker.send({id:r.id,result:o,error:null}),currentRequestId=null}).catch(function(o){worker.send({id:r.id,result:null,error:convertError(o)}),currentRequestId=null}):(worker.send({id:r.id,result:e,error:null}),currentRequestId=null)}else throw new Error('Unknown method "'+r.method+'"')}catch(o){worker.send({id:r.id,result:null,error:convertError(o)})}});worker.register=function(r){if(r)for(var t in r)r.hasOwnProperty(t)&&(worker.methods[t]=r[t]);worker.send("ready")};worker.emit=function(r){currentRequestId&&worker.send({id:currentRequestId,isEvent:!0,payload:r})};typeof exports<"u"&&(exports.add=worker.register,exports.emit=worker.emit)});var or=d(p=>{var I=g();p.pool=function(t,e){var o=tr();return new o(t,e)};p.worker=function(t){var e=A();e.add(t)};p.workerEmit=function(t){var e=A();e.emit(t)};p.Promise=b();p.platform=I.platform;p.isMainThread=I.isMainThread;p.cpus=I.cpus});var nr=require("./dist/compiler.cjs"),ir=hr(require("./scripts/bootstrap.compiler.js"));function Wr(r){let t;return r?(t=r.toIterable)?t.call(r):r:[]}var Er=Symbol.for("#lineText"),Tr=or(),Sr=Math.random();function Or(r,t){let e={id:t.sourceId},o=null;try{o=(0,nr.compile)(r,t)}catch(u){console.log("ERROR COMPILING IMBA",u,t.sourcePath),o={}}for(let u=0,c=Wr(o.diagnostics),i=c.length;u