glassjar 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- (function(q,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(q=typeof globalThis<"u"?globalThis:q||self,T(q.engine={}))})(this,(function(q){"use strict";var T=typeof document<"u"?document.currentScript:null;function ZA(Q){return Q&&Q.__esModule&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q}var _={exports:{}},kA;function TA(){if(kA)return _.exports;kA=1;var Q=typeof Reflect=="object"?Reflect:null,A=Q&&typeof Q.apply=="function"?Q.apply:function(i,F,M){return Function.prototype.apply.call(i,F,M)},I;Q&&typeof Q.ownKeys=="function"?I=Q.ownKeys:Object.getOwnPropertySymbols?I=function(i){return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i))}:I=function(i){return Object.getOwnPropertyNames(i)};function g(o){console&&console.warn&&console.warn(o)}var C=Number.isNaN||function(i){return i!==i};function B(){B.init.call(this)}_.exports=B,_.exports.once=s,B.EventEmitter=B,B.prototype._events=void 0,B.prototype._eventsCount=0,B.prototype._maxListeners=void 0;var E=10;function D(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}Object.defineProperty(B,"defaultMaxListeners",{enumerable:!0,get:function(){return E},set:function(o){if(typeof o!="number"||o<0||C(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");E=o}}),B.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},B.prototype.setMaxListeners=function(i){if(typeof i!="number"||i<0||C(i))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+i+".");return this._maxListeners=i,this};function w(o){return o._maxListeners===void 0?B.defaultMaxListeners:o._maxListeners}B.prototype.getMaxListeners=function(){return w(this)},B.prototype.emit=function(i){for(var F=[],M=1;M<arguments.length;M++)F.push(arguments[M]);var y=i==="error",S=this._events;if(S!==void 0)y=y&&S.error===void 0;else if(!y)return!1;if(y){var Y;if(F.length>0&&(Y=F[0]),Y instanceof Error)throw Y;var x=new Error("Unhandled error."+(Y?" ("+Y.message+")":""));throw x.context=Y,x}var e=S[i];if(e===void 0)return!1;if(typeof e=="function")A(e,this,F);else for(var WA=e.length,SI=R(e,WA),M=0;M<WA;++M)A(SI[M],this,F);return!0};function N(o,i,F,M){var y,S,Y;if(D(F),S=o._events,S===void 0?(S=o._events=Object.create(null),o._eventsCount=0):(S.newListener!==void 0&&(o.emit("newListener",i,F.listener?F.listener:F),S=o._events),Y=S[i]),Y===void 0)Y=S[i]=F,++o._eventsCount;else if(typeof Y=="function"?Y=S[i]=M?[F,Y]:[Y,F]:M?Y.unshift(F):Y.push(F),y=w(o),y>0&&Y.length>y&&!Y.warned){Y.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+Y.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=o,x.type=i,x.count=Y.length,g(x)}return o}B.prototype.addListener=function(i,F){return N(this,i,F,!1)},B.prototype.on=B.prototype.addListener,B.prototype.prependListener=function(i,F){return N(this,i,F,!0)};function k(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function U(o,i,F){var M={fired:!1,wrapFn:void 0,target:o,type:i,listener:F},y=k.bind(M);return y.listener=F,M.wrapFn=y,y}B.prototype.once=function(i,F){return D(F),this.on(i,U(this,i,F)),this},B.prototype.prependOnceListener=function(i,F){return D(F),this.prependListener(i,U(this,i,F)),this},B.prototype.removeListener=function(i,F){var M,y,S,Y,x;if(D(F),y=this._events,y===void 0)return this;if(M=y[i],M===void 0)return this;if(M===F||M.listener===F)--this._eventsCount===0?this._events=Object.create(null):(delete y[i],y.removeListener&&this.emit("removeListener",i,M.listener||F));else if(typeof M!="function"){for(S=-1,Y=M.length-1;Y>=0;Y--)if(M[Y]===F||M[Y].listener===F){x=M[Y].listener,S=Y;break}if(S<0)return this;S===0?M.shift():H(M,S),M.length===1&&(y[i]=M[0]),y.removeListener!==void 0&&this.emit("removeListener",i,x||F)}return this},B.prototype.off=B.prototype.removeListener,B.prototype.removeAllListeners=function(i){var F,M,y;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[i]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[i]),this;if(arguments.length===0){var S=Object.keys(M),Y;for(y=0;y<S.length;++y)Y=S[y],Y!=="removeListener"&&this.removeAllListeners(Y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(F=M[i],typeof F=="function")this.removeListener(i,F);else if(F!==void 0)for(y=F.length-1;y>=0;y--)this.removeListener(i,F[y]);return this};function h(o,i,F){var M=o._events;if(M===void 0)return[];var y=M[i];return y===void 0?[]:typeof y=="function"?F?[y.listener||y]:[y]:F?d(y):R(y,y.length)}B.prototype.listeners=function(i){return h(this,i,!0)},B.prototype.rawListeners=function(i){return h(this,i,!1)},B.listenerCount=function(o,i){return typeof o.listenerCount=="function"?o.listenerCount(i):K.call(o,i)},B.prototype.listenerCount=K;function K(o){var i=this._events;if(i!==void 0){var F=i[o];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}B.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function R(o,i){for(var F=new Array(i),M=0;M<i;++M)F[M]=o[M];return F}function H(o,i){for(;i+1<o.length;i++)o[i]=o[i+1];o.pop()}function d(o){for(var i=new Array(o.length),F=0;F<i.length;++F)i[F]=o[F].listener||o[F];return i}function s(o,i){return new Promise(function(F,M){function y(Y){o.removeListener(i,S),M(Y)}function S(){typeof o.removeListener=="function"&&o.removeListener("error",y),F([].slice.call(arguments))}u(o,i,S,{once:!0}),i!=="error"&&BA(o,y,{once:!0})})}function BA(o,i,F){typeof o.on=="function"&&u(o,"error",i,F)}function u(o,i,F,M){if(typeof o.on=="function")M.once?o.once(i,F):o.on(i,F);else if(typeof o.addEventListener=="function")o.addEventListener(i,function y(S){M.once&&o.removeEventListener(i,y),F(S)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof o)}return _.exports}var VA=TA();const KA=ZA(VA);class EA{__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,RA.unregister(this),A}free(){const A=this.__destroy_into_raw();G.__wbg_dapadapter_free(A,0)}attach(A){G.dapadapter_attach(this.__wbg_ptr,A)}detach(){G.dapadapter_detach(this.__wbg_ptr)}constructor(){const A=G.dapadapter_new();return this.__wbg_ptr=A>>>0,RA.register(this,this.__wbg_ptr,this),this}on(A){G.dapadapter_on(this.__wbg_ptr,A)}resetRun(){G.dapadapter_resetRun(this.__wbg_ptr)}sendMessage(A){return G.dapadapter_sendMessage(this.__wbg_ptr,A)}setFilterInternals(A){G.dapadapter_setFilterInternals(this.__wbg_ptr,A)}}Symbol.dispose&&(EA.prototype[Symbol.dispose]=EA.prototype.free);class z{static __wrap(A){A=A>>>0;const I=Object.create(z.prototype);return I.__wbg_ptr=A,YA.register(I,I.__wbg_ptr,I),I}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,YA.unregister(this),A}free(){const A=this.__destroy_into_raw();G.__wbg_trap_free(A,0)}static __wbg_wasmer_trap(){G.trap___wbg_wasmer_trap()}}Symbol.dispose&&(z.prototype[Symbol.dispose]=z.prototype.free);function tA(){let Q,A;try{const I=G.cpp_exception_hash();return Q=I[0],A=I[1],p(I[0],I[1])}finally{G.__wbindgen_free(Q,A,1)}}function yA(Q){const A=t(Q,G.__wbindgen_malloc,G.__wbindgen_realloc),I=W,g=G.prefetch_urls(A,I);var C=XA(g[0],g[1]).slice();return G.__wbindgen_free(g[0],g[1]*4,4),C}function zA(){return{__proto__:null,"./engine_bg.js":{__proto__:null,__wbg_BigInt_b7bbccdff258c9f2:function(A){return BigInt(A)},__wbg_Error_8c4e43fe74559d73:function(A,I){return Error(p(A,I))},__wbg_Number_04624de7d0e8332d:function(A){return Number(A)},__wbg_String_8f0eb39a4a4c2f66:function(A,I){const g=String(I),C=t(g,G.__wbindgen_malloc,G.__wbindgen_realloc),B=W;c().setInt32(A+4,B,!0),c().setInt32(A+0,C,!0)},__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2:function(A,I){const g=I,C=typeof g=="bigint"?g:void 0;c().setBigInt64(A+8,j(C)?BigInt(0):C,!0),c().setInt32(A+0,!j(C),!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(A){const I=A,g=typeof I=="boolean"?I:void 0;return j(g)?16777215:g?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(A,I){const g=DA(I),C=t(g,G.__wbindgen_malloc,G.__wbindgen_realloc),B=W;c().setInt32(A+4,B,!0),c().setInt32(A+0,C,!0)},__wbg___wbindgen_function_table_5ae7216dfcbcc506:function(){return G.__wbindgen_export},__wbg___wbindgen_in_47fa6863be6f2f25:function(A,I){return A in I},__wbg___wbindgen_is_bigint_31b12575b56f32fc:function(A){return typeof A=="bigint"},__wbg___wbindgen_is_function_0095a73b8b156f76:function(A){return typeof A=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(A){const I=A;return typeof I=="object"&&I!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(A){return typeof A=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(A){return A===void 0},__wbg___wbindgen_jsval_eq_11888390b0186270:function(A,I){return A===I},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(A,I){return A==I},__wbg___wbindgen_lt_bb59cc3d23526e0d:function(A,I){return A<I},__wbg___wbindgen_neg_6b4d356dff49dcc6:function(A){return-A},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(A,I){const g=I,C=typeof g=="number"?g:void 0;c().setFloat64(A+8,j(C)?0:C,!0),c().setInt32(A+0,!j(C),!0)},__wbg___wbindgen_rethrow_05525c567f154472:function(A){throw A},__wbg___wbindgen_shr_ef8e07cce709eb54:function(A,I){return A>>I},__wbg___wbindgen_string_get_72fb696202c56729:function(A,I){const g=I,C=typeof g=="string"?g:void 0;var B=j(C)?0:t(C,G.__wbindgen_malloc,G.__wbindgen_realloc),E=W;c().setInt32(A+4,E,!0),c().setInt32(A+0,B,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(A,I){throw new Error(p(A,I))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(A){A._wbg_cb_unref()},__wbg_addEventListener_3acb0aad4483804c:function(){return J(function(A,I,g,C){A.addEventListener(p(I,g),C)},arguments)},__wbg_apply_2e22c45cb4f12415:function(){return J(function(A,I,g){return Reflect.apply(A,I,g)},arguments)},__wbg_apply_ada2ee1a60ac7b3c:function(){return J(function(A,I,g){return A.apply(I,g)},arguments)},__wbg_arrayBuffer_bb54076166006c39:function(){return J(function(A){return A.arrayBuffer()},arguments)},__wbg_bind_1dc37de2b9939128:function(A,I,g,C){return A.bind(I,g,C)},__wbg_bind_29ba380591735d8c:function(A,I,g){return A.bind(I,g)},__wbg_buffer_7b5f53e46557d8f1:function(A){return A.buffer},__wbg_byteLength_7b03c17ff1e4037f:function(A){return A.byteLength},__wbg_byteLength_b5d783d06792ed2c:function(A){return A.byteLength},__wbg_call_389efe28435a9388:function(){return J(function(A,I){return A.call(I)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return J(function(A,I,g){return A.call(I,g)},arguments)},__wbg_compareExchange_b578410c358e695e:function(){return J(function(A,I,g,C){return Atomics.compareExchange(A,I>>>0,g,C)},arguments)},__wbg_constructor_ad6c0ed428f55d34:function(A){return A.constructor},__wbg_crypto_86f2631e91b51511:function(A){return A.crypto},__wbg_customSections_193491b069139fb1:function(A,I,g){return WebAssembly.Module.customSections(A,p(I,g))},__wbg_data_5330da50312d0bc1:function(A){return A.data},__wbg_done_57b39ecd9addfe81:function(A){return A.done},__wbg_entries_58c7934c745daac7:function(A){return Object.entries(A)},__wbg_error_7534b8e9a36f1ab4:function(A,I){let g,C;try{g=A,C=I,console.error(p(A,I))}finally{G.__wbindgen_free(g,C,1)}},__wbg_exports_794a42000dacd046:function(A){return WebAssembly.Module.exports(A)},__wbg_exports_86b4926134c40288:function(A){return A.exports},__wbg_fetch_d1488f40cef1e210:function(A,I,g){return A.fetch(p(I,g))},__wbg_from_bddd64e7d5ff6941:function(A){return Array.from(A)},__wbg_getPrototypeOf_2653517f1dc884d5:function(){return J(function(A){return Reflect.getPrototypeOf(A)},arguments)},__wbg_getRandomValues_b3f15fcbfabb0f8b:function(){return J(function(A,I){A.getRandomValues(I)},arguments)},__wbg_getTime_1e3cd1391c5c3995:function(A){return A.getTime()},__wbg_getTimezoneOffset_81776d10a4ec18a8:function(A){return A.getTimezoneOffset()},__wbg_getUint32_bb6f5a401408e7fa:function(A,I,g){return A.getUint32(I>>>0,g!==0)},__wbg_get_7efbcc3819719b0f:function(){return J(function(A,I){return A.get(I>>>0)},arguments)},__wbg_get_9b94d73e6221f75c:function(A,I){return A[I>>>0]},__wbg_get_b3ed3ad4be2bc8ac:function(){return J(function(A,I){return Reflect.get(A,I)},arguments)},__wbg_get_index_253dd2a9e007656d:function(A,I){return A[I>>>0]},__wbg_get_index_9a5bfdd2ca49c65f:function(A,I){return A[I>>>0]},__wbg_get_with_ref_key_1dc361bd10053bfe:function(A,I){return A[I]},__wbg_grow_5d42bf28c2da22cb:function(){return J(function(A,I){return A.grow(I>>>0)},arguments)},__wbg_grow_d034989fce14cc8e:function(){return J(function(A,I){return A.grow(I>>>0)},arguments)},__wbg_imports_8333d40ab24779ad:function(A){return WebAssembly.Module.imports(A)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(A){let I;try{I=A instanceof ArrayBuffer}catch{I=!1}return I},__wbg_instanceof_Error_8573fe0b0b480f46:function(A){let I;try{I=A instanceof Error}catch{I=!1}return I},__wbg_instanceof_Function_2a29eec978bb3b11:function(A){let I;try{I=A instanceof Function}catch{I=!1}return I},__wbg_instanceof_Global_2db767b6b2347f01:function(A){let I;try{I=A instanceof WebAssembly.Global}catch{I=!1}return I},__wbg_instanceof_Map_53af74335dec57f4:function(A){let I;try{I=A instanceof Map}catch{I=!1}return I},__wbg_instanceof_Memory_dc8c61e3f831ee37:function(A){let I;try{I=A instanceof WebAssembly.Memory}catch{I=!1}return I},__wbg_instanceof_Module_d0d412b14363ba9a:function(A){let I;try{I=A instanceof WebAssembly.Module}catch{I=!1}return I},__wbg_instanceof_Object_1c6af87502b733ed:function(A){let I;try{I=A instanceof Object}catch{I=!1}return I},__wbg_instanceof_RangeError_0b0dd056bc557b89:function(A){let I;try{I=A instanceof RangeError}catch{I=!1}return I},__wbg_instanceof_Response_ee1d54d79ae41977:function(A){let I;try{I=A instanceof Response}catch{I=!1}return I},__wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26:function(A){let I;try{I=A instanceof SharedArrayBuffer}catch{I=!1}return I},__wbg_instanceof_Table_127f216e592f4159:function(A){let I;try{I=A instanceof WebAssembly.Table}catch{I=!1}return I},__wbg_instanceof_Tag_f1d6b24a98b95210:function(A){let I;try{I=A instanceof WebAssembly.Tag}catch{I=!1}return I},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(A){let I;try{I=A instanceof Uint8Array}catch{I=!1}return I},__wbg_isArray_d314bb98fcf08331:function(A){return Array.isArray(A)},__wbg_isSafeInteger_bfbc7332a9768d2a:function(A){return Number.isSafeInteger(A)},__wbg_is_f29129f676e5410c:function(A,I){return Object.is(A,I)},__wbg_iterator_6ff6560ca1568e55:function(){return Symbol.iterator},__wbg_length_32ed9a279acd054c:function(A){return A.length},__wbg_length_35a7bace40f36eac:function(A){return A.length},__wbg_length_aeb94ff17a8a8556:function(A){return A.length},__wbg_load_eff64ff5e429a422:function(){return J(function(A,I){return Atomics.load(A,I>>>0)},arguments)},__wbg_message_9ddc4b9a62a7c379:function(A){return A.message},__wbg_msCrypto_d562bbe83e0d4b91:function(A){return A.msCrypto},__wbg_new_0_73afc35eb544e539:function(){return new Date},__wbg_new_245cd5c49157e602:function(A){return new Date(A)},__wbg_new_2ac7fa8be584d280:function(A,I,g){return new DataView(A,I>>>0,g>>>0)},__wbg_new_361308b2356cecd0:function(){return new Object},__wbg_new_3eb36ae241fe6f44:function(){return new Array},__wbg_new_4a996a46a82782b6:function(){return J(function(A,I){return new WebAssembly.Global(A,I)},arguments)},__wbg_new_57c27ff3ddf5b62c:function(){return J(function(A){return new WebAssembly.Module(A)},arguments)},__wbg_new_8a6f238a6ece86ea:function(){return new Error},__wbg_new_a4e3cab1cdd635ba:function(){return J(function(A,I){return new WebAssembly.Instance(A,I)},arguments)},__wbg_new_b061c0550d9f3281:function(){return J(function(A){return new WebAssembly.Memory(A)},arguments)},__wbg_new_b5d9e2fb389fef91:function(A,I){try{var g={a:A,b:I},C=(E,D)=>{const w=g.a;g.a=0;try{return mA(w,g.b,E,D)}finally{g.a=w}};return new Promise(C)}finally{g.a=g.b=0}},__wbg_new_ca409f861989e0c5:function(A){return new SharedArrayBuffer(A>>>0)},__wbg_new_dca287b076112a51:function(){return new Map},__wbg_new_dd2b680c8bf6ae29:function(A){return new Uint8Array(A)},__wbg_new_from_slice_a3d2629dc1826784:function(A,I){return new Uint8Array(AA(A,I))},__wbg_new_no_args_1c7c842f08d00ebb:function(A,I){return new Function(p(A,I))},__wbg_new_with_args_7bba34e94b1cfa40:function(A,I,g,C){return new Function(p(A,I),p(g,C))},__wbg_new_with_byte_offset_9120ba79e057895b:function(A,I){return new Uint8Array(A,I>>>0)},__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1:function(A,I,g){return new Uint8Array(A,I>>>0,g>>>0)},__wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1:function(A,I,g){return new Int32Array(A,I>>>0,g>>>0)},__wbg_new_with_length_1763c527b2923202:function(A){return new Array(A>>>0)},__wbg_new_with_length_a2c39cbe88fd8ff1:function(A){return new Uint8Array(A>>>0)},__wbg_next_3482f54c49e8af19:function(){return J(function(A){return A.next()},arguments)},__wbg_next_418f80d8f5303233:function(A){return A.next},__wbg_node_e1f24f89a7336c2e:function(A){return A.node},__wbg_notify_78a90977fab74963:function(){return J(function(A,I){return Atomics.notify(A,I>>>0)},arguments)},__wbg_now_a3af9a2f4bbaa4d1:function(){return Date.now()},__wbg_now_ebffdf7e580f210d:function(A){return A.now()},__wbg_ok_87f537440a0acf85:function(A){return A.ok},__wbg_postMessage_2041f4e90af61318:function(){return J(function(A,I){A.postMessage(I)},arguments)},__wbg_process_3975fd6c72f520aa:function(A){return A.process},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(A,I,g){Uint8Array.prototype.set.call(AA(A,I),g)},__wbg_push_8ffdcb2063340ba5:function(A,I){return A.push(I)},__wbg_queueMicrotask_0aa0a927f78f5d98:function(A){return A.queueMicrotask},__wbg_queueMicrotask_5bb536982f78a56f:function(A){queueMicrotask(A)},__wbg_randomFillSync_f8c153b79f285817:function(){return J(function(A,I){A.randomFillSync(I)},arguments)},__wbg_removeEventListener_e63328781a5b9af9:function(){return J(function(A,I,g,C){A.removeEventListener(p(I,g),C)},arguments)},__wbg_require_b74f47fc2d022fd6:function(){return J(function(){return module.require},arguments)},__wbg_resolve_002c4b7d9d8f6b64:function(A){return Promise.resolve(A)},__wbg_setTimeout_e0aacd5a637418a6:function(){return J(function(A,I,g){return A.setTimeout(I,g)},arguments)},__wbg_setUint32_d168af7751a8557e:function(A,I,g,C){A.setUint32(I>>>0,g>>>0,C!==0)},__wbg_set_0af2522656c2a71b:function(){return J(function(A,I,g){A.set(I>>>0,g)},arguments)},__wbg_set_1eb0999cf5d27fc8:function(A,I,g){return A.set(I,g)},__wbg_set_25cf9deff6bf0ea8:function(A,I,g){A.set(I,g>>>0)},__wbg_set_3f1d0b984ed272ed:function(A,I,g){A[I]=g},__wbg_set_6cb8631f80447a67:function(){return J(function(A,I,g){return Reflect.set(A,I,g)},arguments)},__wbg_set_cc56eefd2dd91957:function(A,I,g){A.set(AA(I,g))},__wbg_set_f43e577aea94465b:function(A,I,g){A[I>>>0]=g},__wbg_set_index_b3244a6c458021e4:function(A,I,g){A[I>>>0]=g},__wbg_set_index_f259b54e97f7b177:function(A,I,g){A[I>>>0]=g},__wbg_set_onmessage_ea7cc2ba099021cd:function(A,I){A.onmessage=I},__wbg_set_value_fc06e541de098215:function(A,I){A.value=I},__wbg_slice_8bbd46adb2100583:function(A,I,g){return A.slice(I>>>0,g>>>0)},__wbg_stack_0ed75d68575b0f3c:function(A,I){const g=I.stack,C=t(g,G.__wbindgen_malloc,G.__wbindgen_realloc),B=W;c().setInt32(A+4,B,!0),c().setInt32(A+0,C,!0)},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){const A=typeof global>"u"?null:global;return j(A)?0:l(A)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){const A=typeof globalThis>"u"?null:globalThis;return j(A)?0:l(A)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){const A=typeof self>"u"?null:self;return j(A)?0:l(A)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){const A=typeof window>"u"?null:window;return j(A)?0:l(A)},__wbg_store_d1d951c98d9bed41:function(){return J(function(A,I,g){return Atomics.store(A,I>>>0,g)},arguments)},__wbg_subarray_a96e1fef17ed23cb:function(A,I,g){return A.subarray(I>>>0,g>>>0)},__wbg_then_0d9fe2c7b1857d32:function(A,I,g){return A.then(I,g)},__wbg_then_b9e7b3b5f1a9e1b5:function(A,I){return A.then(I)},__wbg_toString_56d946daff83867b:function(A,I,g){const C=I.toString(g),B=t(C,G.__wbindgen_malloc,G.__wbindgen_realloc),E=W;c().setInt32(A+4,E,!0),c().setInt32(A+0,B,!0)},__wbg_toString_964ff7fe6eca8362:function(A){return A.toString()},__wbg_trap_new:function(A){return z.__wrap(A)},__wbg_validate_71c2d02a71bda62f:function(){return J(function(A){return WebAssembly.validate(A)},arguments)},__wbg_value_0546255b415e96c1:function(A){return A.value},__wbg_value_ce37a60e576310ff:function(A){return A.value},__wbg_versions_4e31226f5e8dc909:function(A){return A.versions},__wbg_wait_be5dae1e53f590f1:function(){return J(function(A,I,g){return Atomics.wait(A,I>>>0,g)},arguments)},__wbg_warn_81ab00e6e16e886d:function(A,I,g){console.warn(A,I,g)},__wbindgen_cast_0000000000000001:function(A,I){return rA(A,I,G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______,lA)},__wbindgen_cast_0000000000000002:function(A,I){return b(A,I,G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______,PA)},__wbindgen_cast_0000000000000003:function(A,I){return b(A,I,G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___,UA)},__wbindgen_cast_0000000000000004:function(A,I){return b(A,I,G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___,UA)},__wbindgen_cast_0000000000000005:function(A,I){return b(A,I,G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___,bA)},__wbindgen_cast_0000000000000006:function(A,I){return b(A,I,G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______,fA)},__wbindgen_cast_0000000000000007:function(A){return A},__wbindgen_cast_0000000000000008:function(A){return A},__wbindgen_cast_0000000000000009:function(A,I){return AA(A,I)},__wbindgen_cast_000000000000000a:function(A,I){return p(A,I)},__wbindgen_cast_000000000000000b:function(A,I){return BigInt.asUintN(64,A)|BigInt.asUintN(64,I)<<BigInt(64)},__wbindgen_cast_000000000000000c:function(A){return BigInt.asUintN(64,A)},__wbindgen_init_externref_table:function(){const A=G.__wbindgen_externrefs,I=A.grow(4);A.set(0,void 0),A.set(I+0,void 0),A.set(I+1,null),A.set(I+2,!0),A.set(I+3,!1)}}}}function lA(Q,A,I){G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q,A,I)}function PA(Q,A,I){G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q,A,I)}function fA(Q,A,I){G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q,A,I)}function bA(Q,A,I){const g=G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q,A,I);if(g[1])throw wA(g[0])}function UA(Q,A,I){const g=G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q,A,I);if(g[2])throw wA(g[1]);return wA(g[0])}function mA(Q,A,I,g){G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q,A,I,g)}const RA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(Q=>G.__wbg_dapadapter_free(Q>>>0,1)),YA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(Q=>G.__wbg_trap_free(Q>>>0,1));function l(Q){const A=G.__externref_table_alloc();return G.__wbindgen_externrefs.set(A,Q),A}const $=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(Q=>Q.dtor(Q.a,Q.b));function DA(Q){const A=typeof Q;if(A=="number"||A=="boolean"||Q==null)return`${Q}`;if(A=="string")return`"${Q}"`;if(A=="symbol"){const C=Q.description;return C==null?"Symbol":`Symbol(${C})`}if(A=="function"){const C=Q.name;return typeof C=="string"&&C.length>0?`Function(${C})`:"Function"}if(Array.isArray(Q)){const C=Q.length;let B="[";C>0&&(B+=DA(Q[0]));for(let E=1;E<C;E++)B+=", "+DA(Q[E]);return B+="]",B}const I=/\[object ([^\]]+)\]/.exec(toString.call(Q));let g;if(I&&I.length>1)g=I[1];else return toString.call(Q);if(g=="Object")try{return"Object("+JSON.stringify(Q)+")"}catch{return"Object"}return Q instanceof Error?`${Q.name}: ${Q.message}
2
- ${Q.stack}`:g}function XA(Q,A){Q=Q>>>0;const I=c(),g=[];for(let C=Q;C<Q+4*A;C+=4)g.push(G.__wbindgen_externrefs.get(I.getUint32(C,!0)));return G.__externref_drop_slice(Q,A),g}function AA(Q,A){return Q=Q>>>0,f().subarray(Q/1,Q/1+A)}let V=null;function c(){return(V===null||V.buffer.detached===!0||V.buffer.detached===void 0&&V.buffer!==G.memory.buffer)&&(V=new DataView(G.memory.buffer)),V}function p(Q,A){return Q=Q>>>0,vA(Q,A)}let P=null;function f(){return(P===null||P.byteLength===0)&&(P=new Uint8Array(G.memory.buffer)),P}function J(Q,A){try{return Q.apply(this,A)}catch(I){const g=l(I);G.__wbindgen_exn_store(g)}}function j(Q){return Q==null}function rA(Q,A,I,g){const C={a:Q,b:A,cnt:1,dtor:I},B=(...E)=>{C.cnt++;try{return g(C.a,C.b,...E)}finally{B._wbg_cb_unref()}};return B._wbg_cb_unref=()=>{--C.cnt===0&&(C.dtor(C.a,C.b),C.a=0,$.unregister(C))},$.register(B,C,C),B}function b(Q,A,I,g){const C={a:Q,b:A,cnt:1,dtor:I},B=(...E)=>{C.cnt++;const D=C.a;C.a=0;try{return g(D,C.b,...E)}finally{C.a=D,B._wbg_cb_unref()}};return B._wbg_cb_unref=()=>{--C.cnt===0&&(C.dtor(C.a,C.b),C.a=0,$.unregister(C))},$.register(B,C,C),B}function t(Q,A,I){if(I===void 0){const D=m.encode(Q),w=A(D.length,1)>>>0;return f().subarray(w,w+D.length).set(D),W=D.length,w}let g=Q.length,C=A(g,1)>>>0;const B=f();let E=0;for(;E<g;E++){const D=Q.charCodeAt(E);if(D>127)break;B[C+E]=D}if(E!==g){E!==0&&(Q=Q.slice(E)),C=I(C,g,g=E+Q.length*3,1)>>>0;const D=f().subarray(C+E,C+g),w=m.encodeInto(Q,D);E+=w.written,C=I(C,g,E,1)>>>0}return W=E,C}function wA(Q){const A=G.__wbindgen_externrefs.get(Q);return G.__externref_table_dealloc(Q),A}let IA=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});IA.decode();const nA=2146435072;let iA=0;function vA(Q,A){return iA+=A,iA>=nA&&(IA=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),IA.decode(),iA=A),IA.decode(f().subarray(Q,Q+A))}const m=new TextEncoder;"encodeInto"in m||(m.encodeInto=function(Q,A){const I=m.encode(Q);return A.set(I),{read:Q.length,written:I.length}});let W=0,G;function uA(Q,A){return G=Q.exports,V=null,P=null,G.__wbindgen_start(),G}async function eA(Q,A){if(typeof Response=="function"&&Q instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(Q,A)}catch(C){if(Q.ok&&I(Q.type)&&Q.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",C);else throw C}const g=await Q.arrayBuffer();return await WebAssembly.instantiate(g,A)}else{const g=await WebAssembly.instantiate(Q,A);return g instanceof WebAssembly.Instance?{instance:g,module:Q}:g}function I(g){switch(g){case"basic":case"cors":case"default":return!0}return!1}}async function _A(Q){if(G!==void 0)return G;Q!==void 0&&(Object.getPrototypeOf(Q)===Object.prototype?{module_or_path:Q}=Q:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),Q===void 0&&(Q=new URL("",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:T&&T.tagName.toUpperCase()==="SCRIPT"&&T.src||new URL("glassjar.umd.cjs",document.baseURI).href));const A=zA();(typeof Q=="string"||typeof Request=="function"&&Q instanceof Request||typeof URL=="function"&&Q instanceof URL)&&(Q=fetch(Q));const{instance:I,module:g}=await eA(await Q,A);return uA(I)}const $A=new URL("https://cdn.jsdelivr.net/npm/glassjar@0.9.0/dist/engine_bg.wasm"),AI=Object.freeze({maxObjectBytes:128*1024*1024,maxEntries:256,maxMetadataBytes:8*1024*1024,maxEntryMetadataBytes:1024*1024});class II{records=new Map;staged=new Map;stagingFailed=!1;objectBytes=0;metadataBytes=0;evictions=0;oversized=0;limits;constructor(A={}){this.limits=Object.freeze({...AI,...A});for(const I of Object.values(this.limits))if(!Number.isSafeInteger(I)||I<0)throw new RangeError("C++ cache limits must be nonnegative safe integers")}beginBatch(){this.discardBatch(),this.stagingFailed=!1}stage(A){if(this.stagingFailed)return;const I=this.recordSize(A);if(I===void 0||this.staged.has(A.source)){this.failBatch();return}const g=this.limits;for(;this.records.size&&(this.records.size+this.staged.size>=g.maxEntries||this.objectBytes+A.object.byteLength>g.maxObjectBytes||this.metadataBytes+I>g.maxMetadataBytes);)this.remove(this.records.keys().next().value),this.evictions++;if(this.records.size+this.staged.size>=g.maxEntries||this.objectBytes+A.object.byteLength>g.maxObjectBytes||this.metadataBytes+I>g.maxMetadataBytes||I>g.maxEntryMetadataBytes){this.oversized++,this.failBatch();return}this.staged.set(A.source,{...A,object:new Uint8Array(A.object),metadataBytes:I}),this.objectBytes+=A.object.byteLength,this.metadataBytes+=I}abandonBatch(){this.failBatch()}failBatch(){this.discardBatch(),this.stagingFailed=!0}recordSize(A){if(!(typeof A.source!="string"||!A.source.startsWith("/")||A.source.split("/").slice(1).some(I=>!I||I==="."||I==="..")||typeof A.key!="string"||typeof A.object_hash!="string"||!/^[a-f0-9]{64}$/.test(A.key)||!/^[a-f0-9]{64}$/.test(A.object_hash)||A.receipt!=null&&typeof A.receipt!="string"||!(A.object instanceof Uint8Array)))return new TextEncoder().encode(JSON.stringify({source:A.source,key:A.key,object_hash:A.object_hash,...A.receipt==null?{}:{receipt:A.receipt}})).byteLength}async validateBatch(){if(this.stagingFailed)return!1;const A=[...this.staged.values()];for(const I of A){if(!gI(I.object))return!1;const g=await crypto.subtle.digest("SHA-256",I.object);if(Array.from(new Uint8Array(g),B=>B.toString(16).padStart(2,"0")).join("")!==I.object_hash)return!1}return!0}commitBatch(){for(const[A,I]of this.staged)this.remove(A),this.records.set(A,I);this.staged.clear(),this.stagingFailed=!1}discardBatch(){for(const A of this.staged.values())this.objectBytes-=A.object.byteLength,this.metadataBytes-=A.metadataBytes;this.staged.clear()}snapshot(){return[...this.records.values()].map(({source:A,key:I,object_hash:g,object:C,receipt:B})=>({source:A,key:I,object_hash:g,...B==null?{}:{receipt:B},object:C.slice()}))}touch(A){const I=this.records.get(A);I&&(this.records.delete(A),this.records.set(A,I))}put(A){if(typeof A.source!="string"||!A.source.startsWith("/")||A.source.split("/").slice(1).some(B=>!B||B==="."||B==="..")||typeof A.key!="string"||typeof A.object_hash!="string"||!/^[a-f0-9]{64}$/.test(A.object_hash)||!/^[a-f0-9]{64}$/.test(A.key)||!(A.object instanceof Uint8Array))return;const I=this.recordSize(A);if(I===void 0)return;const g=this.limits;if(this.remove(A.source),g.maxEntries===0||A.object.byteLength>g.maxObjectBytes||I>g.maxMetadataBytes||I>g.maxEntryMetadataBytes){this.oversized++;return}for(;this.records.size>=g.maxEntries||this.objectBytes+A.object.byteLength>g.maxObjectBytes||this.metadataBytes+I>g.maxMetadataBytes;)this.remove(this.records.keys().next().value),this.evictions++;const C={...A,object:new Uint8Array(A.object),metadataBytes:I};this.records.set(A.source,C),this.objectBytes+=C.object.byteLength,this.metadataBytes+=I}delete(A){this.remove(A)}remove(A){const I=this.records.get(A);I&&(this.objectBytes-=I.object.byteLength,this.metadataBytes-=I.metadataBytes,this.records.delete(A))}clear(){this.records.clear(),this.staged.clear(),this.stagingFailed=!1,this.objectBytes=this.metadataBytes=0}stats(){return{objectBytes:this.objectBytes,metadataBytes:this.metadataBytes,entries:this.records.size,stagingEntries:this.staged.size,stagingObjectBytes:[...this.staged.values()].reduce((A,I)=>A+I.object.byteLength,0),stagingMetadataBytes:[...this.staged.values()].reduce((A,I)=>A+I.metadataBytes,0),evictions:this.evictions,oversized:this.oversized}}}function gI(Q){if(!WebAssembly.validate(Q)||Q.length<8)return!1;let A=8,I=!1;const g=()=>{let C=0,B=0;for(let E=0;E<5&&A<Q.length;E++,B+=7){const D=Q[A++];if(C+=(D&127)*2**B,!(D&128))return C}throw new Error("Malformed object section")};try{for(;A<Q.length;){const C=Q[A++],B=g(),E=A+B;if(E>Q.length||C===8)return!1;if(C===0){const D=g();if(A+D>E)return!1;const w=new TextDecoder().decode(Q.subarray(A,A+D));if(A+=D,w==="linking"){if(I||g()!==2)return!1;I=!0}}A=E}return I}catch{return!1}}const L=Symbol();function a(Q){return Q instanceof Error?{type:"error",error:{type:Q.constructor.name,message:Q.message}}:{type:"error",error:{type:typeof Q,message:String(Q)}}}class JA{name;data;constructor(A,I){this.name=A,this.data=I}download(){const A=new Uint8Array(this.data),I=new Blob([A]),g=URL.createObjectURL(I),C=document.createElement("a");C.href=g,C.download=this.name,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(g)}}class hA extends KA{[L];dap;enabled=!0;set filterInternals(A){this.dap.setFilterInternals(A)}constructor(){super(),this[L]={attach:this.attach.bind(this),detach:this.detach.bind(this),beginRun:()=>this.dap.resetRun()},this.onMessage=this.onMessage.bind(this),this.dap=new EA,this.dap.on(this.onMessage)}send(A){return this.dap.sendMessage(A)}artifactListener=A=>{if(A.data.type!=="artifact")return;const I=new JA(A.data.name,new Uint8Array(A.data.data));this.emit("artifact",I)};attach(A){A.addEventListener("message",this.artifactListener),this.dap.attach(A)}detach(A){A.removeEventListener("message",this.artifactListener),this.dap.detach()}onMessage(A){this.emit("event",A)}}const CI="glassjar-wasm:";function QI(Q,A){const I=new URL(String(Q),A);if(I.protocol!=="https:"&&I.protocol!=="http:")throw new TypeError(`Engine Wasm must be served over http(s), not ${I.protocol}`);return I.href}function BI(Q){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/worker-bkz0CBX9.js").href:new URL("assets/worker-bkz0CBX9.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{type:"module",name:Q?.name})}function EI(Q){return new BI(Q?{name:CI+Q}:void 0)}const DI="/dev/debugger-sh-host";class SA{buffer=new SharedArrayBuffer(4+64*1024);length=new Int32Array(this.buffer,0,1);bytes=new Uint8Array(this.buffer,4);publish(A){Atomics.store(this.length,0,A),Atomics.notify(this.length,0)}}function oA(Q){try{return new Error(`Host device callback failed: ${Q instanceof Error?Q.message:String(Q)}`)}catch{return new Error("Host device callback failed")}}function LA(Q){try{const A=Q?.();if(A&&typeof A.then=="function")return Promise.resolve(A).catch(()=>{}),new TypeError("Host device cleanup must be synchronous")}catch(A){return oA(A)}}class wI{constructor(A){this.onFailure=A}incoming=new SA;outgoing=new SA;workerStart={guest_to_host:this.incoming.buffer,host_to_guest:this.outgoing.buffer};abort=new AbortController;listeners=new Set;cleanup;worker;writing=!1;open(A){let I;try{I=A({signal:this.abort.signal,onData:g=>{if(this.assertOpen(),typeof g!="function")throw new TypeError("Host device listener must be a function");return this.listeners.add(g),()=>{this.listeners.delete(g)}},write:g=>this.write(g)})}catch(g){throw oA(g)}if(I!==void 0&&typeof I!="function")throw Promise.resolve(I).catch(()=>{}),new TypeError("Host device opener must return a cleanup function or undefined");if(typeof I=="function")if(this.abort.signal.aborted){const g=LA(I);if(g)throw g}else this.cleanup=I}attach(A){this.assertOpen(),this.worker=A,A.addEventListener("message",this.onMessage)}assertOpen(){if(this.abort.signal.aborted)throw new Error("Host device is closed")}async write(A){if(this.assertOpen(),!(A instanceof Uint8Array))throw new TypeError("Host device writes require Uint8Array");if(this.writing)throw new Error("Await the previous host device write before writing again");this.writing=!0;try{const I=new Uint8Array(A),g=this.outgoing;let C=0;for(;C<I.length;){this.assertOpen();const B=Atomics.load(g.length,0);if(B!==0){await Atomics.waitAsync(g.length,0,B).value;continue}const E=I.subarray(C,C+g.bytes.length);g.bytes.set(E),g.publish(E.length),C+=E.length}}finally{this.writing=!1}}onMessage=A=>{if(!(this.abort.signal.aborted||A.data?.type!=="host_wake"))try{const I=Atomics.load(this.incoming.length,0);if(I<=0)return;const g=this.incoming.bytes.slice(0,I);this.incoming.publish(0);for(const C of this.listeners){if(this.abort.signal.aborted)break;Promise.resolve(C(g)).catch(B=>this.fail(B))}}catch(I){this.fail(I)}};fail(A){this.abort.signal.aborted||(this.close(),this.onFailure(oA(A)))}close(){if(this.abort.signal.aborted)return;this.worker?.removeEventListener("message",this.onMessage),this.worker=void 0,this.incoming.publish(-1),this.outgoing.publish(-1),this.abort.abort(),this.listeners.clear();const A=this.cleanup;return this.cleanup=void 0,LA(A)}}const iI=["__future__","_abc","_aix_support","_android_support","_apple_support","_ast","_ast_unparse","_asyncio","_bisect","_blake2","_bz2","_codecs","_codecs_cn","_codecs_hk","_codecs_iso2022","_codecs_jp","_codecs_kr","_codecs_tw","_collections","_collections_abc","_colorize","_compat_pickle","_contextvars","_csv","_ctypes","_curses","_curses_panel","_datetime","_dbm","_decimal","_elementtree","_frozen_importlib","_frozen_importlib_external","_functools","_gdbm","_hashlib","_heapq","_hmac","_imp","_interpchannels","_interpqueues","_interpreters","_io","_ios_support","_json","_locale","_lsprof","_lzma","_markupbase","_math_integer","_md5","_multibytecodec","_multiprocessing","_opcode","_opcode_metadata","_operator","_osx_support","_overlapped","_pickle","_posixshmem","_posixsubprocess","_py_abc","_py_warnings","_pydatetime","_pydecimal","_pyio","_pylong","_pyrepl","_queue","_random","_remote_debugging","_scproxy","_sha1","_sha2","_sha3","_signal","_sitebuiltins","_socket","_sqlite3","_sre","_ssl","_stat","_statistics","_string","_strptime","_struct","_suggestions","_symtable","_sysconfig","_testbuffer","_testcapi","_testclinic","_testclinic_limited","_testinternalcapi","_testlimitedcapi","_thread","_threading_local","_tkinter","_tokenize","_tracemalloc","_types","_typing","_uuid","_warnings","_weakref","_weakrefset","_winapi","_wmi","_xxtestfuzz","_zoneinfo","_zstd","abc","annotationlib","antigravity","argparse","array","ast","asyncio","atexit","base64","bdb","binascii","bisect","builtins","bz2","cProfile","calendar","cmath","cmd","code","codecs","codeop","collections","colorsys","compileall","compression","concurrent","configparser","contextlib","contextvars","copy","copyreg","csv","ctypes","curses","dataclasses","datetime","dbm","decimal","difflib","dis","doctest","email","encodings","ensurepip","enum","errno","faulthandler","fcntl","filecmp","fileinput","fnmatch","fractions","ftplib","functools","gc","genericpath","getopt","getpass","gettext","glob","graphlib","grp","gzip","hashlib","heapq","hmac","html","http","idlelib","imaplib","importlib","inspect","io","ipaddress","itertools","json","keyword","linecache","locale","logging","lzma","mailbox","marshal","math","mimetypes","mmap","modulefinder","msvcrt","multiprocessing","netrc","nt","ntpath","nturl2path","numbers","opcode","operator","optparse","os","pathlib","pdb","pickle","pickletools","pkgutil","platform","plistlib","poplib","posix","posixpath","pprint","profile","profiling","pstats","pty","pwd","py_compile","pyclbr","pydoc","pydoc_data","pyexpat","queue","quopri","random","re","readline","reprlib","resource","rlcompleter","runpy","sched","secrets","select","selectors","shelve","shlex","shutil","signal","site","smtplib","socket","socketserver","sqlite3","ssl","stat","statistics","string","stringprep","struct","subprocess","symtable","sys","sysconfig","syslog","tabnanny","tarfile","tempfile","termios","textwrap","this","threading","time","timeit","tkinter","token","tokenize","tomllib","trace","traceback","tracemalloc","tty","turtle","turtledemo","types","typing","unicodedata","unittest","urllib","uuid","venv","warnings","wave","weakref","webbrowser","winreg","winsound","wsgiref","xml","xmlrpc","xxsubtype","zipapp","zipfile","zipimport","zlib","zoneinfo"],gA="3.15.2",sA="/usr/local/lib/python3.15/site-packages",cA="https://pypi.org/pypi",oI="files.pythonhosted.org",X={packages:50,downloadBytes:60*1024*1024,files:5e3,unpackedBytes:200*1024*1024},NI={python_version:gA.split(".").slice(0,2).join("."),python_full_version:gA,implementation_name:"cpython",implementation_version:gA,platform_python_implementation:"CPython",os_name:"posix",sys_platform:"wasi",platform_system:"",platform_machine:"wasm32",platform_release:"0.0.0",platform_version:"0.0.0"},aA={yaml:"PyYAML",bs4:"beautifulsoup4",dateutil:"python-dateutil",attr:"attrs",dotenv:"python-dotenv",jwt:"PyJWT",serial:"pyserial",docx:"python-docx",pptx:"python-pptx",slugify:"python-slugify",PIL:"pillow",sklearn:"scikit-learn",cv2:"opencv-python",Crypto:"pycryptodome",skimage:"scikit-image",google:"protobuf",_pytest:"pytest"},FI=new Set(iI),HA=/^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;function Z(Q){return Q.toLowerCase().replace(/[-_.]+/g,"-")}function GI(Q){const A=new Set;for(const I of Q.split(`
3
- `)){const g=I.replace(/#.*/,"").trim();let C=/^import\s+(.+)$/.exec(g);if(C){for(const B of C[1].split(",")){const E=B.trim().split(/\s+/)[0]?.split(".")[0];E&&A.add(E)}continue}C=/^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(g),C&&A.add(C[1].split(".")[0])}return A}function MI(Q){const A=new Set,I=[];let g="";const C=(E,D)=>{for(const[w,N]of Object.entries(E))typeof N=="string"?(w.endsWith(".py")&&(I.push(N),D||A.add(w.slice(0,-3))),!D&&w==="requirements.txt"&&(g=N)):(D||A.add(w),C(N,`${D}/${w}`))};C(Q,"");const B=new Map;for(const E of I)for(const D of GI(E)){if(FI.has(D)||A.has(D)||D.startsWith("_")&&!(D in aA))continue;const w=aA[D]??D;B.set(Z(w),w)}for(const E of g.split(`
4
- `)){const D=E.replace(/#.*/,"").trim();if(!D||D.startsWith("-"))continue;const w=/^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(D)?.[0];w&&B.set(Z(w),D)}return[...B.values()].sort()}function r(Q){const A=/^v?(?:\d+!)?(\d+(?:\.\d+)*)(?:[-_.]?(a|b|c|rc|alpha|beta|pre|preview)[-_.]?(\d*))?(?:-(\d+)|[-_.]?(?:post|rev|r)[-_.]?(\d*))?(?:[-_.]?dev[-_.]?(\d*))?(?:\+[a-z0-9.]+)?$/i.exec(Q.trim());if(!A)return null;const I=A[2]?.toLowerCase(),g=I?{a:0,alpha:0,b:1,beta:1,c:2,rc:2,pre:2,preview:2}[I]:void 0;return{release:A[1].split(".").map(Number),pre:g===void 0?void 0:[g,Number(A[3]||0)],post:A[4]!==void 0?Number(A[4]):A[5]!==void 0?Number(A[5]||0):void 0,dev:A[6]!==void 0?Number(A[6]||0):void 0,text:Q}}function qA(Q,A){const I=Math.max(Q.release.length,A.release.length);for(let E=0;E<I;E++){const D=(Q.release[E]??0)-(A.release[E]??0);if(D)return Math.sign(D)}const g=E=>[E.pre?0:E.dev!==void 0&&E.post===void 0?-1:1,E.pre?.[0]??0,E.pre?.[1]??0,E.post??-1,E.dev??Number.POSITIVE_INFINITY],C=g(Q),B=g(A);for(let E=0;E<C.length;E++)if(C[E]!==B[E])return Math.sign(C[E]-B[E]);return 0}const pA=Q=>Q.pre!==void 0||Q.dev!==void 0;function NA(Q,A){for(const I of A.split(",")){const g=I.trim();if(!g)continue;const C=/^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(g);if(!C)return!1;const[,B,E]=C;if((B==="=="||B==="!=")&&E.endsWith(".*")){if(E.slice(0,-2).split(".").map(Number).every((U,h)=>(Q.release[h]??0)===U)!==(B==="=="))return!1;continue}const D=r(E);if(!D)return!1;const w=qA(Q,D);if(B==="~="){const N=D.release.slice(0,Math.max(1,D.release.length-1));if(w<0||!N.every((k,U)=>(Q.release[U]??0)===k))return!1}else if(!(B==="=="||B==="==="?w===0:B==="!="?w!==0:B==="<="?w<=0:B===">="?w>=0:B==="<"?w<0:w>0))return!1}return!0}function OA(Q){const[A,I]=Q.split(";",2).map(C=>C.trim()),g=/^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[([^\]]*)\])?\s*\(?\s*([^)]*?)\s*\)?$/.exec(A);return!g||g[3].includes("@")?null:{name:g[1],extras:(g[2]??"").split(",").map(C=>C.trim()).filter(Boolean),specifiers:g[3].replace(/\s+/g,""),marker:I||void 0}}function kI(Q,A=[]){const I=Q.match(/\(|\)|'[^']*'|"[^"]*"|===|==|!=|<=|>=|~=|<|>|\bnot\s+in\b|\bin\b|\band\b|\bor\b|[A-Za-z_][A-Za-z0-9_.]*/g)??[];let g=0;const C=N=>/^['"]/.test(N)?{text:N.slice(1,-1)}:N==="extra"?{text:"",variable:"extra"}:{text:NI[N]??"",variable:N},B=(N,k,U)=>{if(N.variable==="extra"||U.variable==="extra"){const R=Z((N.variable==="extra"?U:N).text),H=A.some(d=>Z(d)===R);return k==="!="?!H:H}if(k==="in")return U.text.includes(N.text);if(/^not\s+in$/.test(k))return!U.text.includes(N.text);if(!N.variable&&U.variable)return B(U,{"<":">",">":"<","<=":">=",">=":"<="}[k]??k,N);const h=r(N.text),K=r(U.text);return h&&K&&/version/.test(N.variable??"")?NA(h,`${k}${U.text}`):k==="=="||k==="==="?N.text===U.text:k==="!="?N.text!==U.text:!1},E=()=>{if(I[g]==="("){g++;const h=w();return g++,h}const N=C(I[g++]),k=I[g++],U=C(I[g++]);return B(N,k,U)},D=()=>{let N=E();for(;I[g]==="and";)g++,N=E()&&N;return N},w=()=>{let N=D();for(;I[g]==="or";)g++,N=D()||N;return N};try{return w()}catch{return!1}}function KI(Q){if(Q.packagetype!=="bdist_wheel"||Q.yanked)return!1;const A=Q.filename.replace(/\.whl$/,"").split("-").slice(-3);return A.length===3&&A[1]==="none"&&A[2]==="any"&&A[0].split(".").some(I=>I==="py3"||I.startsWith("py3"))}function yI(Q){return Q?NA(r(gA),Q.replace(/\s+/g,"")):!0}class UI{constructor(A=(I,g)=>fetch(I,g)){this.fetchImpl=A}projects=new Map;metadata=new Map;wheels=new Map;project(A){const I=Z(A);let g=this.projects.get(I);return g||(g=this.fetchImpl(`${cA}/${encodeURIComponent(I)}/json`).then(async C=>C.ok?await C.json():null,()=>null),this.projects.set(I,g)),g}requiresDist(A,I,g){if(g.info.version===I)return Promise.resolve(g.info.requires_dist??[]);const C=`${Z(A)}@${I}`;let B=this.metadata.get(C);return B||(B=this.fetchImpl(`${cA}/${encodeURIComponent(Z(A))}/${encodeURIComponent(I)}/json`).then(async E=>E.ok?(await E.json()).info.requires_dist??[]:[],()=>[]),this.metadata.set(C,B)),B}async resolve(A,I=()=>{}){const g=new Map,C=[];for(const B of A){const E=OA(B);E&&HA.test(E.name)&&C.push({requirement:E,top:!0})}for(;C.length;){const{requirement:B,top:E}=C.shift(),D=Z(B.name);if(g.has(D))continue;if(g.size>=X.packages)break;const w=await this.project(B.name);if(!w){E&&I({kind:"skipped",message:`${B.name}: not found on PyPI`});continue}const N=Object.entries(w.releases).map(([K,R])=>({version:r(K),files:R})).filter(K=>K.version!==null&&NA(K.version,B.specifiers)).sort((K,R)=>qA(R.version,K.version)),U=[...N.filter(K=>!pA(K.version)),...N.filter(K=>pA(K.version))].map(K=>({version:K.version,wheel:K.files.find(R=>KI(R)&&yI(R.requires_python))})).find(K=>K.wheel);if(!U?.wheel){const K=N.some(R=>R.files.some(H=>H.packagetype==="bdist_wheel"));I({kind:"skipped",message:K?`${w.info.name} has compiled code, which can't run in the browser`:`${w.info.name}: no Python 3.15 wheel on PyPI`});continue}const h=new URL(U.wheel.url);if(!(h.protocol!=="https:"||h.hostname!==oI)){g.set(D,{name:w.info.name,version:U.version.text,url:U.wheel.url,sha256:U.wheel.digests.sha256,size:U.wheel.size});for(const K of await this.requiresDist(B.name,U.version.text,w)){const R=OA(K);!R||!HA.test(R.name)||R.marker&&!kI(R.marker,B.extras)||C.push({requirement:R,top:!1})}}}return[...g.values()]}async install(A,I=()=>{}){const g={};let C=0,B=0;for(const E of A){if(C+=E.size,C>X.downloadBytes){I({kind:"skipped",message:`${E.name}: over the ${X.downloadBytes>>20}MB package limit`});break}const D=`${E.url}#${E.sha256}`;let w=this.wheels.get(D);w||(I({kind:"installing",message:`Installing ${E.name} ${E.version}`}),w=this.download(E),this.wheels.set(D,w),w.catch(()=>this.wheels.delete(D)));let N;try{N=await w}catch(k){I({kind:"skipped",message:`${E.name}: ${k instanceof Error?k.message:String(k)}`});continue}for(const[k,U]of N){if(++B>X.files)break;g[`${sA}/${k}`]=U}}return g}async download(A){const I=await this.fetchImpl(A.url,{cache:"force-cache"});if(!I.ok)throw new Error(`download failed (${I.status})`);const g=new Uint8Array(await I.arrayBuffer());if([...new Uint8Array(await crypto.subtle.digest("SHA-256",g))].map(B=>B.toString(16).padStart(2,"0")).join("")!==A.sha256)throw new Error("download did not match PyPI's checksum");return RI(await JI(g,X.unpackedBytes))}}function RI(Q){const A=new Map;for(const[I,g]of Q){const C=/^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(I);C?A.set(C[2],g):/^[^/]+\.data\//.test(I)||A.set(I,g)}return A}function YI(Q){return Q.length>0&&!Q.startsWith("/")&&!Q.includes("\\")&&!Q.includes("\0")&&!Q.split("/").some(A=>A===".."||A===".")}async function JI(Q,A){const I=new DataView(Q.buffer,Q.byteOffset,Q.byteLength);let g=-1;for(let N=Q.length-22;N>=Math.max(0,Q.length-22-65535);N--)if(I.getUint32(N,!0)===101010256){g=N;break}if(g<0)throw new Error("not a zip archive");const C=I.getUint16(g+10,!0);let B=I.getUint32(g+16,!0);const E=new Map;let D=0;const w=new TextDecoder;for(let N=0;N<C;N++){if(I.getUint32(B,!0)!==33639248)throw new Error("corrupt zip directory");const k=I.getUint16(B+10,!0),U=I.getUint32(B+20,!0),h=I.getUint32(B+24,!0),K=I.getUint16(B+28,!0),R=I.getUint16(B+30,!0),H=I.getUint16(B+32,!0),d=I.getUint32(B+42,!0),s=w.decode(Q.subarray(B+46,B+46+K));if(B+=46+K+R+H,s.endsWith("/"))continue;if(!YI(s))throw new Error(`unsafe path in package: ${s}`);if(D+=h,D>A)throw new Error("package too large");const BA=d+30+I.getUint16(d+26,!0)+I.getUint16(d+28,!0),u=Q.subarray(BA,BA+U);let o;if(k===0)o=u.slice();else if(k===8)o=new Uint8Array(await new Response(new Blob([u.slice()]).stream().pipeThrough(new DecompressionStream("deflate-raw"))).arrayBuffer());else throw new Error(`unsupported compression in package: ${s}`);if(o.length!==h)throw new Error(`corrupt entry in package: ${s}`);E.set(s,o)}return E}const n={installer:void 0,sets:new Map};async function xA(Q,A=()=>{}){const I=MI(Q);if(!I.length)return{};const g=I.join(`
5
- `);let C=n.sets.get(g);if(!C){n.installer??=new UI;const D=n.installer,w=[],N=k=>{k.kind==="skipped"?w.push(k):A(k)};C=D.resolve(I,N).then(async k=>({files:await D.install(k,N),notes:w})),n.sets.set(g,C),C.catch(()=>n.sets.delete(g))}const{files:B,notes:E}=await C;for(const D of E)A(D);return B}const hI=["4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"],CA=Object.freeze({compiler:"d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",sysroot:"8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",exceptions:"20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"});function jA(Q="legacy"){if(Q==="legacy")return{profile:Q,digests:CA};if(Q==="stock-certified-v1"&&hI.length>0)return{profile:Q,digests:CA};throw new Error(`The ${Q} toolchain is not available in this build`)}class v{#A;hashCount=3;hashMs;constructor(A,I){this.#A=A,this.hashMs=I}static async load(A,I,g,C=CA.exceptions,B="legacy"){const E=jA(B);if(A.length!==2)throw new Error("Missing C++ toolchain assets");let D,w;const N=await Promise.allSettled(A.map(async(H,d)=>{try{const s=await fetch(H,{cache:"force-cache",signal:g});if(!s.ok)throw new Error(`Cannot load C++ toolchain (${s.status})`);return d===0&&I&&typeof WebAssembly.compileStreaming=="function"&&typeof s.clone=="function"&&(w=WebAssembly.compileStreaming(s.clone()).catch(()=>{})),new Uint8Array(await s.arrayBuffer())}catch(s){throw D??={error:s},s}}));if(N[0].status==="rejected"||N[1].status==="rejected")throw D?.error;const[k,U]=[N[0].value,N[1].value],[h,K]=await Promise.allSettled([v.ingestOwned(k,U,!1,C),I?(w??Promise.resolve(void 0)).then(H=>H??WebAssembly.compile(k)):Promise.resolve(void 0)]);if(h.status==="rejected")throw h.reason;const R=h.value;if(R.#A.compilerHash!==E.digests.compiler||R.#A.sysrootHash!==E.digests.sysroot||R.#A.exceptionsHash!==E.digests.exceptions)throw new Error("C++ toolchain integrity mismatch");if(g?.aborted)throw new DOMException("Toolchain loading aborted","AbortError");if(K.status==="rejected")throw K.reason;return R.#A.stockProfile=E.profile==="stock-certified-v1",R.#A.module=K.value,R}static async fromBytes(A,I,g){const C=new Uint8Array(A),B=new Uint8Array(I);return v.ingestOwned(C,B,g,CA.exceptions)}static async ingestOwned(A,I,g,C){const B=performance.now(),E=await Promise.allSettled([dA(A),dA(I)]);if(E[0].status==="rejected")throw E[0].reason;if(E[1].status==="rejected")throw E[1].reason;const[D,w]=[E[0].value,E[1].value],N=g?await WebAssembly.compile(A):void 0;return new v({compiler:A,sysroot:I,compilerHash:D,sysrootHash:w,exceptionsHash:C,module:N},performance.now()-B)}matchesExpectation(A){return A.compilerSha256===this.#A.compilerHash&&A.sysrootSha256===this.#A.sysrootHash&&A.exceptionsSha256===this.#A.exceptionsHash}get identity(){return`${this.#A.compilerHash}:${this.#A.sysrootHash}:${this.#A.exceptionsHash}`}get identityBytes(){return this.#A.compiler.byteLength+this.#A.sysroot.byteLength}get compilerBytes(){return this.#A.compiler.byteLength}configure(A,I){try{return A.postMessage({...I,toolchain:this.#A}),!!this.#A.module}catch(g){if(!(g instanceof DOMException)||g.name!=="DataCloneError"||!this.#A.module)throw g;return A.postMessage({...I,toolchain:{...this.#A,module:void 0}}),!1}}}async function dA(Q){const A=await crypto.subtle.digest("SHA-256",Q);return Array.from(new Uint8Array(A),I=>I.toString(16).padStart(2,"0")).join("")}let FA,QA;class GA{stdout=new MA(1);stderr=new MA(2);stdin=new O;debugger;lang;scope;fs={};binaryFiles={};cppArtifacts;hostDevice;options;python;retain;idleTimeoutMs;wasmUrl;objects;generation=0;scopeEpoch=0;operationId=0;disposed=!1;active;promise;slot;idleTimer;toolchain;toolchainLoading;toolchainController;initializing=new Set;toolchainIdentity;toolchainIngestions=0;toolchainHashCount=0;toolchainHashMs=0;compilerModuleCloned=!1;disposal;cancellationDraining;releaseDrain;releases=new Set;retirements=0;latest;cacheValidation;static async create(A,I={}){const{wasmUrl:g,python:C,...B}=I,E=g===void 0?void 0:QI(g,globalThis.location?.href),D=structuredClone(B);C&&(D.python={packages:!!C.packages,onPackageStatus:typeof C.onPackageStatus=="function"?C.onPackageStatus:void 0});const w=E??null;if(QA!==void 0&&QA!==w)throw new Error("The engine Wasm is already loaded from a different wasmUrl");QA=w,FA??=_A({module_or_path:E??$A}).catch(k=>{throw FA=void 0,QA=void 0,k}),await FA;const N=new GA(A,D);if(N.wasmUrl=E,A!=="c"&&typeof window<"u"&&typeof fetch<"u")for(const k of yA(A))fetch(k,{cache:"force-cache"}).then(U=>U.arrayBuffer()).catch(()=>{});return N}constructor(A,I){const g=I.cpp;this.retain=I.retainWorker??g?.retainWorker??!0;const C=I.idleTimeoutMs??g?.idleTimeoutMs??3e4;if(!Number.isSafeInteger(C)||C<1||C>3e5)throw new RangeError("Worker idle timeout must be between 1 and 300000 milliseconds");if(this.idleTimeoutMs=C,g){if(A!=="c")throw new TypeError("C++ performance options require C/C++");if(!g.scope?.projectId||!g.scope.accountId)throw new TypeError("C++ performance options require project and account identity");if(g.compilerLifetime!==void 0&&!["idle","project"].includes(g.compilerLifetime))throw new TypeError("Invalid compiler lifetime");jA(g.toolchainProfile),this.scope=Object.freeze({...g.scope}),this.options=Object.freeze({...g,scope:this.scope,idleTimeoutMs:C})}if(I.python){if(A!=="python")throw new TypeError("Python options require Python");this.python=Object.freeze({...I.python})}this.objects=new II(typeof g?.objectCache=="object"?g.objectCache:{}),this.debugger=new hA,this.lang=A}get cacheCompilerModule(){return this.options?.cacheCompilerModule??this.retain}get cacheStats(){return structuredClone({...this.objects.stats(),generation:this.generation,scopeEpoch:this.scopeEpoch,operationId:this.operationId,cacheEpoch:this.generation,toolchainProfile:this.options?.toolchainProfile??"legacy",cacheEligible:this.cacheValidation?.eligible??!1,stockCertificateSha256:this.cacheValidation?.certificate,cacheEligibilitySnapshot:this.cacheValidation?.snapshot,cacheEligibilityOperationId:this.cacheValidation?.operationId,cacheEligibilityReason:this.cacheValidation?.reason,toolchainIdentityBytes:this.toolchain?.identityBytes??0,toolchainIngestions:this.toolchainIngestions,toolchainHashCount:this.toolchainHashCount,toolchainHashMs:this.toolchainHashMs,compilerModuleCloned:this.compilerModuleCloned,workerRetained:!!this.slot&&!this.active,workerRetirements:this.retirements,compilerModuleIdentityBytes:this.cacheCompilerModule?this.toolchain?.compilerBytes??0:0,latest:this.active?.stats??this.latest})}clearCaches(){this.cacheValidation=void 0,this.generation++,this.objects.clear(),this.toolchain=void 0,this.active||(this.toolchainController?.abort(),this.toolchainLoading=void 0),this.active||this.retireWorker()}stop(){return this.clearCaches(),this.cancelCurrentOperation()}cancelCurrentOperation(){if(this.cancellationDraining)return this.cancellationDraining;this.operationId++;const A=this.promise,I=this.active?.publication;this.retireWorker(),this.objects.discardBatch(),this.active&&this.finish(this.active,{type:"stopped"});const g=Promise.allSettled([A,I]).then(()=>{this.cancellationDraining===g&&(this.cancellationDraining=void 0)});return this.cancellationDraining=g,g}releaseCompilerResources(A={}){const I=A.signal;return I?.aborted?Promise.resolve("cancelled"):this.disposed?Promise.resolve("released"):new Promise(g=>{const C={resolve:g,signal:I,abort:()=>this.settleRelease(C,"cancelled")};this.releases.add(C),I?.addEventListener("abort",C.abort,{once:!0}),this.flushReleases()})}settleRelease(A,I){this.releases.delete(A)&&(A.signal?.removeEventListener("abort",A.abort),A.resolve(I))}flushReleases(){if(!(this.active||!this.releases.size||this.releaseDrain)){if(this.initializing.size){this.toolchainController?.abort();const A=[...this.initializing];this.toolchainLoading=void 0,this.releaseDrain=Promise.allSettled(A).then(()=>{this.releaseDrain=void 0,this.flushReleases()});return}this.retireWorker(),this.toolchainController?.abort(),this.toolchain=void 0,this.toolchainLoading=void 0;for(const A of this.releases)this.settleRelease(A,"released")}}dispose(){if(this.disposal)return this.disposal;this.disposed=!0,this.scopeEpoch++,this.fs={},this.binaryFiles={},this.cppArtifacts=void 0,this.hostDevice=void 0,this.stdout.removeAllListeners(),this.stderr.removeAllListeners(),this.debugger.removeAllListeners();const A=[...this.initializing];return this.toolchainController?.abort(),this.disposal=Promise.allSettled([this.stop(),...A]).then(()=>{this.latest=void 0,this.flushReleases()}),this.disposal}prepareCompiler(A){if(A?.validateCacheInputs!==void 0&&typeof A.validateCacheInputs!="boolean")return Promise.resolve(a(new TypeError("Invalid compiler preparation options")));const I=A?.validateCacheInputs===!0&&this.options?.toolchainProfile==="stock-certified-v1"&&!!this.options?.objectCache&&this.objects.limits.maxEntries>0&&this.objects.limits.maxObjectBytes>0&&this.objects.limits.maxMetadataBytes>0&&this.objects.limits.maxEntryMetadataBytes>0;return this.submit(!0,!0,I)}run(){return this.lang==="python"&&this.python?.packages?this.runWithPackages():this.submit(!1)}async runWithPackages(){const A=g=>{try{this.python?.onPackageStatus?.(g)}catch{}};let I={};try{I=await xA(this.fs,A)}catch(g){A({kind:"skipped",message:`Packages: ${g instanceof Error?g.message:String(g)}`})}return this.submit(!1,!1,!1,I)}compile(){return this.submit(!0)}submit(A,I=!1,g=!1,C={}){if(this.disposed)return Promise.resolve(a(new Error("Engine is disposed")));if(this.active||this.cancellationDraining)return Promise.resolve(a(new Error("An engine job is already active")));if(A&&this.lang!=="c")return Promise.resolve(a(new Error("Compile-only is supported for C/C++")));this.cacheValidation=void 0;const B=I&&!g;let E;try{const K=B||!this.cppArtifacts?null:{...this.cppArtifacts};if(K?.cacheCertificate!==void 0){const R=K.cacheCertificate;(typeof R!="string"||R.length>1024*1024||new TextEncoder().encode(R).byteLength>1024*1024)&&delete K.cacheCertificate}E={fs:B?{}:structuredClone(this.fs),binary_files:Object.fromEntries(Object.entries(B?{}:{...C,...this.binaryFiles}).map(([R,H])=>[R,new Uint8Array(H)])),cpp_artifacts:structuredClone(K)}}catch(K){return Promise.resolve(a(K))}const D=!A&&this.debugger.enabled,w=A?void 0:this.hostDevice;if(w!==void 0&&(typeof w!="function"||!["c","python"].includes(this.lang)))return Promise.resolve(a(new TypeError("Invalid host device configuration")));clearTimeout(this.idleTimer),this.stdin[L].clear();const N=!!this.slot;let k;const U=new Promise(K=>{k=K});this.promise=U;const h={generation:this.generation,scopeEpoch:this.scopeEpoch,operationId:++this.operationId,cacheEpoch:this.generation,prepareOnly:I,validateCacheInputs:g,settled:!1,buildOnly:A,debug:D,opener:w,startedAt:performance.now(),resolve:k,stats:{operation:I?"prepare_compiler":A?"compile":"run",workerReadyMs:0,workerReused:N},start:{...E,lang:this.lang,prepare_compiler:I,validate_cache_inputs:g,scope_epoch:this.scopeEpoch,operation_id:this.operationId,cache_epoch:this.generation,is_debug:D,build_only:A,stdin_buffer:this.stdin[L].buffer,cpp_cache:this.options?.objectCache&&!D&&!I?{generation:this.generation,entries:this.objects.snapshot(),max_entry_metadata_bytes:Math.min(this.objects.limits.maxEntryMetadataBytes,this.objects.limits.maxMetadataBytes,1024*1024)}:null}};this.objects.beginBatch(),this.active=h;try{if(this.slot||this.makeWorker(),!this.current(h))return U;const K=this.slot;this.lang==="c"&&!this.toolchain&&this.ensureToolchain().catch(R=>{this.current(h)&&this.slot===K&&this.finish(h,a(R))}),this.slot.ready&&this.dispatch(h)}catch(K){this.finish(h,a(K))}return U}current(A){return this.active===A&&!A.settled}makeWorker(){const A=EI(this.wasmUrl),I={worker:A,ready:!1,remove:()=>{}};this.slot=I;const g=E=>{if(this.slot!==I)return;const D=E.data,w=this.active;if(D.type==="ready"){if(I.ready)return;I.ready=!0,w&&this.current(w)&&this.dispatch(w);return}if(!(!w||!this.current(w))){if(!I.ready&&D.type==="error"){this.finish(w,a(new Error(D.message)));return}if(!(D.operationId!==w.operationId||D.scopeEpoch!==w.scopeEpoch))try{if(D.type==="cpp_cache_eligibility"){if(this.options?.toolchainProfile!=="stock-certified-v1"||w.prepareOnly&&!w.validateCacheInputs)return;const N=U=>typeof U=="string"&&/^[0-9a-f]{64}$/.test(U),k=D.eligible===!0&&N(D.certificate_sha256)&&N(D.snapshot);this.cacheValidation={eligible:k,certificate:N(D.certificate_sha256)?D.certificate_sha256:void 0,snapshot:k?D.snapshot:void 0,operationId:w.operationId,reason:k?void 0:typeof D.reason=="string"?D.reason.slice(0,128):"stock-input-validation"}}else if(D.type==="stop")this.finish(w,{type:"completed",exitCode:D.exit_code,timing:{totalMs:performance.now()-w.startedAt,buildMs:D.build_ms,runMs:D.run_ms}});else if(D.type==="error")this.finish(w,a(new Error(D.message)));else if(D.type==="cpp_cache_object"&&D.generation===this.generation&&w.generation===this.generation)try{this.objects.stage(D)}catch{this.objects.abandonBatch()}else D.type==="cpp_cache_stats"&&D.generation===w.generation?w.stats.cache=D.stats:D.type==="cpp_cache_abandon"?this.objects.abandonBatch():D.type==="object_build_complete"?w.publication??=this.publishObjects(w,I):D.type==="compiler_module_stats"&&(w.stats.compilerModule=D)}catch(N){this.finish(w,a(N))}}},C=E=>{this.slot===I&&(this.clearCaches(),this.active?this.finish(this.active,a(E.error??new Error(E.message))):this.retireWorker())},B=()=>C({message:"Unreadable execution worker message"});this.debugger[L].attach(A),A.addEventListener("message",g),A.addEventListener("error",C),A.addEventListener("messageerror",B),I.remove=()=>{A.removeEventListener("message",g),A.removeEventListener("error",C),A.removeEventListener("messageerror",B),this.debugger[L].detach(A)}}async publishObjects(A,I){let g=!1;try{g=await this.objects.validateBatch()}catch{}if(!(!this.current(A)||this.slot!==I)){try{g&&A.cacheEpoch===this.generation?this.objects.commitBatch():(this.objects.abandonBatch(),this.cacheValidation?.operationId===A.operationId&&(this.cacheValidation={...this.cacheValidation,eligible:!1,snapshot:void 0,reason:"stock-publication-budget-or-validation"}))}catch{this.objects.clear(),this.cacheValidation?.operationId===A.operationId&&(this.cacheValidation={...this.cacheValidation,eligible:!1,snapshot:void 0,reason:"stock-publication-failure"})}this.current(A)&&I.worker.postMessage({type:"object_build_ack",scopeEpoch:A.scopeEpoch,operationId:A.operationId,cacheEpoch:A.cacheEpoch})}}ensureToolchain(){if(this.toolchain)return Promise.resolve(this.toolchain);if(this.toolchainLoading)return this.toolchainLoading;this.toolchainController=new AbortController;const A=v.load(yA("c"),this.cacheCompilerModule,this.toolchainController.signal,tA(),this.options?.toolchainProfile);return this.toolchainLoading=A,this.initializing.add(A),A.then(()=>this.initializing.delete(A),()=>{this.initializing.delete(A),this.toolchainLoading===A&&(this.toolchainLoading=void 0)}),A}async dispatch(A){const I=this.slot;if(!(!this.current(A)||!I))try{if(this.lang==="c"){const B=this.scopeEpoch,E=this.generation,D=this.ensureToolchain(),w=this.toolchain??await D;if(!this.current(A)||this.slot!==I||B!==this.scopeEpoch)return;const N=A.start.cpp_artifacts?.requiredToolchain;if(N&&!w.matchesExpectation(N)){this.finish(A,{type:"error",error:{type:"artifact-toolchain-integrity",message:"C++ artifacts require a different compiler, sysroot, or exception runtime"}});return}E===this.generation&&(this.toolchainIdentity&&this.toolchainIdentity!==w.identity&&(this.objects.clear(),A.start.cpp_cache=null),this.toolchain!==w&&(this.toolchainIngestions++,this.toolchainHashCount+=w.hashCount,this.toolchainHashMs+=w.hashMs),this.toolchainIdentity=w.identity,this.toolchain=w,this.toolchainLoading===D&&(this.toolchainLoading=void 0)),I.toolchain!==w&&(this.compilerModuleCloned=w.configure(I.worker,{type:"configure_cpp",cacheCompilerModule:this.cacheCompilerModule}),I.toolchain=w)}if(!this.current(A)||this.slot!==I)return;const g=I.worker;A.stats.workerReadyMs=performance.now()-A.startedAt;const C=B=>this.current(A)&&B.scopeEpoch===A.scopeEpoch&&B.operationId===A.operationId;if(this.stdout[L].attach(g,C),this.stderr[L].attach(g,C),A.prepareOnly||this.debugger[L].beginRun(),A.opener){if(A.device=new wI(B=>this.finish(A,a(B))),A.device.attach(g),A.device.open(A.opener),!this.current(A))return;A.start.host_device=A.device.workerStart}this.current(A)&&(g.postMessage(A.start),A.start.fs={},A.start.binary_files={},A.start.cpp_artifacts=null,A.start.cpp_cache=null)}catch(g){this.current(A)&&(this.toolchainLoading=void 0,this.finish(A,a(g)))}}finish(A,I){if(!this.current(A))return;(I.type!=="completed"||I.exitCode!==0)&&(this.cacheValidation=void 0),A.settled=!0;const g=this.slot?.worker;g&&(this.stdout[L].detach(g),this.stderr[L].detach(g));const C=A.device?.close();C&&(I=a(C));const B=I.type==="completed"&&A.generation===this.generation&&!this.disposed,E=B&&I.type==="completed"&&I.exitCode===0;if(A.generation===this.generation)for(const D of A.stats.cache?.invalid_sources??[])this.objects.delete(D);if(E)for(const D of A.stats.cache?.hit_sources??[])this.objects.touch(D);this.objects.discardBatch(),this.latest=A.stats,this.stdin[L].clear(),(!B||!this.retain)&&this.retireWorker(),!this.disposed&&A.cacheEpoch===this.generation&&(this.slot||this.toolchain&&this.cacheCompilerModule)&&this.options?.compilerLifetime!=="project"&&(this.idleTimer=setTimeout(()=>{this.retireWorker(),this.toolchain=void 0,this.toolchainLoading=void 0},this.idleTimeoutMs)),!this.retain&&!this.cacheCompilerModule&&(this.toolchain=void 0),A.cacheEpoch!==this.generation&&(this.toolchainController?.abort(),this.toolchainLoading=void 0),this.active=void 0,this.promise=void 0,this.flushReleases(),A.resolve(I)}retireWorker(){clearTimeout(this.idleTimer);const A=this.slot;A&&(this.slot=void 0,A.remove(),this.stdout[L].detach(A.worker),this.stderr[L].detach(A.worker),A.worker.onerror=I=>I.preventDefault(),A.worker.terminate(),this.retirements++)}}class MA extends KA{constructor(A){super(),this.mode=A,this.callback=(I=>{const g=I.data;if(this.accepts&&!this.accepts(g)||g.type!=="stdout"||g.mode!==this.mode)return;const C=g.data;this.emit("data",C)}).bind(this),this[L]={attach:this.attach.bind(this),detach:this.detach.bind(this)}}callback;accepts;[L];attach(A,I){this.accepts=I,A.addEventListener("message",this.callback)}detach(A){A.removeEventListener("message",this.callback)}}class O{static BUFFER_SIZE=2048;static HEADER_SIZE=8;static DATA_SIZE=O.BUFFER_SIZE-O.HEADER_SIZE;static READ_IDX=0;static WRITE_IDX=1;static encoder=new TextEncoder;buffer=new SharedArrayBuffer(O.BUFFER_SIZE);generation=0;indices;data;[L];constructor(){this.indices=new Int32Array(this.buffer,0,2),this.data=new Int8Array(this.buffer,O.HEADER_SIZE);const A=()=>this.buffer;this[L]={clear:this.clear.bind(this),get buffer(){return A()}}}clear(){this.generation++,Atomics.notify(this.indices,O.READ_IDX),this.buffer=new SharedArrayBuffer(O.BUFFER_SIZE),this.indices=new Int32Array(this.buffer,0,2),this.data=new Int8Array(this.buffer,O.HEADER_SIZE)}async write(A){const I=typeof A=="string"?O.encoder.encode(A):A;return this.writeBytes(I)}async writeBytes(A){const{DATA_SIZE:I,READ_IDX:g,WRITE_IDX:C}=O;let B=0;const E=this.generation;for(;B<A.length&&E===this.generation;){const D=Atomics.load(this.indices,g);let w=Atomics.load(this.indices,C);w===I-1&&D>0&&(w=0);const N=D<=w?I-w-1:D-w-1;if(N===0){await Atomics.waitAsync(this.indices,g,D).value;continue}const k=Math.min(A.length-B,N);this.data.set(A.subarray(B,B+k),w),Atomics.store(this.indices,C,(w+k)%I),Atomics.notify(this.indices,C),B+=k}}}q.Artifact=JA,q.Debugger=hA,q.Engine=GA,q.HOST_DEVICE_PATH=DI,q.SITE_PACKAGES=sA,q.Stdin=O,q.Stdout=MA,q.pythonPackageFiles=xA,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(p,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(p=typeof globalThis<"u"?globalThis:p||self,Z(p.engine={}))})(this,(function(p){"use strict";var Z=typeof document<"u"?document.currentScript:null;function WA(Q){return Q&&Q.__esModule&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q}var _={exports:{}},GA;function ZA(){if(GA)return _.exports;GA=1;var Q=typeof Reflect=="object"?Reflect:null,A=Q&&typeof Q.apply=="function"?Q.apply:function(i,F,k){return Function.prototype.apply.call(i,F,k)},g;Q&&typeof Q.ownKeys=="function"?g=Q.ownKeys:Object.getOwnPropertySymbols?g=function(i){return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i))}:g=function(i){return Object.getOwnPropertyNames(i)};function I(o){console&&console.warn&&console.warn(o)}var C=Number.isNaN||function(i){return i!==i};function B(){B.init.call(this)}_.exports=B,_.exports.once=s,B.EventEmitter=B,B.prototype._events=void 0,B.prototype._eventsCount=0,B.prototype._maxListeners=void 0;var E=10;function D(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}Object.defineProperty(B,"defaultMaxListeners",{enumerable:!0,get:function(){return E},set:function(o){if(typeof o!="number"||o<0||C(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");E=o}}),B.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},B.prototype.setMaxListeners=function(i){if(typeof i!="number"||i<0||C(i))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+i+".");return this._maxListeners=i,this};function w(o){return o._maxListeners===void 0?B.defaultMaxListeners:o._maxListeners}B.prototype.getMaxListeners=function(){return w(this)},B.prototype.emit=function(i){for(var F=[],k=1;k<arguments.length;k++)F.push(arguments[k]);var K=i==="error",S=this._events;if(S!==void 0)K=K&&S.error===void 0;else if(!K)return!1;if(K){var Y;if(F.length>0&&(Y=F[0]),Y instanceof Error)throw Y;var j=new Error("Unhandled error."+(Y?" ("+Y.message+")":""));throw j.context=Y,j}var v=S[i];if(v===void 0)return!1;if(typeof v=="function")A(v,this,F);else for(var VA=v.length,Sg=U(v,VA),k=0;k<VA;++k)A(Sg[k],this,F);return!0};function N(o,i,F,k){var K,S,Y;if(D(F),S=o._events,S===void 0?(S=o._events=Object.create(null),o._eventsCount=0):(S.newListener!==void 0&&(o.emit("newListener",i,F.listener?F.listener:F),S=o._events),Y=S[i]),Y===void 0)Y=S[i]=F,++o._eventsCount;else if(typeof Y=="function"?Y=S[i]=k?[F,Y]:[Y,F]:k?Y.unshift(F):Y.push(F),K=w(o),K>0&&Y.length>K&&!Y.warned){Y.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+Y.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=o,j.type=i,j.count=Y.length,I(j)}return o}B.prototype.addListener=function(i,F){return N(this,i,F,!1)},B.prototype.on=B.prototype.addListener,B.prototype.prependListener=function(i,F){return N(this,i,F,!0)};function G(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(o,i,F){var k={fired:!1,wrapFn:void 0,target:o,type:i,listener:F},K=G.bind(k);return K.listener=F,k.wrapFn=K,K}B.prototype.once=function(i,F){return D(F),this.on(i,R(this,i,F)),this},B.prototype.prependOnceListener=function(i,F){return D(F),this.prependListener(i,R(this,i,F)),this},B.prototype.removeListener=function(i,F){var k,K,S,Y,j;if(D(F),K=this._events,K===void 0)return this;if(k=K[i],k===void 0)return this;if(k===F||k.listener===F)--this._eventsCount===0?this._events=Object.create(null):(delete K[i],K.removeListener&&this.emit("removeListener",i,k.listener||F));else if(typeof k!="function"){for(S=-1,Y=k.length-1;Y>=0;Y--)if(k[Y]===F||k[Y].listener===F){j=k[Y].listener,S=Y;break}if(S<0)return this;S===0?k.shift():q(k,S),k.length===1&&(K[i]=k[0]),K.removeListener!==void 0&&this.emit("removeListener",i,j||F)}return this},B.prototype.off=B.prototype.removeListener,B.prototype.removeAllListeners=function(i){var F,k,K;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[i]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[i]),this;if(arguments.length===0){var S=Object.keys(k),Y;for(K=0;K<S.length;++K)Y=S[K],Y!=="removeListener"&&this.removeAllListeners(Y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(F=k[i],typeof F=="function")this.removeListener(i,F);else if(F!==void 0)for(K=F.length-1;K>=0;K--)this.removeListener(i,F[K]);return this};function h(o,i,F){var k=o._events;if(k===void 0)return[];var K=k[i];return K===void 0?[]:typeof K=="function"?F?[K.listener||K]:[K]:F?x(K):U(K,K.length)}B.prototype.listeners=function(i){return h(this,i,!0)},B.prototype.rawListeners=function(i){return h(this,i,!1)},B.listenerCount=function(o,i){return typeof o.listenerCount=="function"?o.listenerCount(i):y.call(o,i)},B.prototype.listenerCount=y;function y(o){var i=this._events;if(i!==void 0){var F=i[o];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}B.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function U(o,i){for(var F=new Array(i),k=0;k<i;++k)F[k]=o[k];return F}function q(o,i){for(;i+1<o.length;i++)o[i]=o[i+1];o.pop()}function x(o){for(var i=new Array(o.length),F=0;F<i.length;++F)i[F]=o[F].listener||o[F];return i}function s(o,i){return new Promise(function(F,k){function K(Y){o.removeListener(i,S),k(Y)}function S(){typeof o.removeListener=="function"&&o.removeListener("error",K),F([].slice.call(arguments))}u(o,i,S,{once:!0}),i!=="error"&&BA(o,K,{once:!0})})}function BA(o,i,F){typeof o.on=="function"&&u(o,"error",i,F)}function u(o,i,F,k){if(typeof o.on=="function")k.once?o.once(i,F):o.on(i,F);else if(typeof o.addEventListener=="function")o.addEventListener(i,function K(S){k.once&&o.removeEventListener(i,K),F(S)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof o)}return _.exports}var TA=ZA();const yA=WA(TA);class EA{__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,UA.unregister(this),A}free(){const A=this.__destroy_into_raw();M.__wbg_dapadapter_free(A,0)}attach(A){M.dapadapter_attach(this.__wbg_ptr,A)}detach(){M.dapadapter_detach(this.__wbg_ptr)}constructor(){const A=M.dapadapter_new();return this.__wbg_ptr=A>>>0,UA.register(this,this.__wbg_ptr,this),this}on(A){M.dapadapter_on(this.__wbg_ptr,A)}resetRun(){M.dapadapter_resetRun(this.__wbg_ptr)}sendMessage(A){return M.dapadapter_sendMessage(this.__wbg_ptr,A)}setFilterInternals(A){M.dapadapter_setFilterInternals(this.__wbg_ptr,A)}}Symbol.dispose&&(EA.prototype[Symbol.dispose]=EA.prototype.free);class z{static __wrap(A){A=A>>>0;const g=Object.create(z.prototype);return g.__wbg_ptr=A,YA.register(g,g.__wbg_ptr,g),g}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,YA.unregister(this),A}free(){const A=this.__destroy_into_raw();M.__wbg_trap_free(A,0)}static __wbg_wasmer_trap(){M.trap___wbg_wasmer_trap()}}Symbol.dispose&&(z.prototype[Symbol.dispose]=z.prototype.free);function tA(){let Q,A;try{const g=M.cpp_exception_hash();return Q=g[0],A=g[1],d(g[0],g[1])}finally{M.__wbindgen_free(Q,A,1)}}function KA(Q){const A=t(Q,M.__wbindgen_malloc,M.__wbindgen_realloc),g=V,I=M.prefetch_urls(A,g);var C=PA(I[0],I[1]).slice();return M.__wbindgen_free(I[0],I[1]*4,4),C}function zA(){return{__proto__:null,"./engine_bg.js":{__proto__:null,__wbg_BigInt_b7bbccdff258c9f2:function(A){return BigInt(A)},__wbg_Error_8c4e43fe74559d73:function(A,g){return Error(d(A,g))},__wbg_Number_04624de7d0e8332d:function(A){return Number(A)},__wbg_String_8f0eb39a4a4c2f66:function(A,g){const I=String(g),C=t(I,M.__wbindgen_malloc,M.__wbindgen_realloc),B=V;c().setInt32(A+4,B,!0),c().setInt32(A+0,C,!0)},__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2:function(A,g){const I=g,C=typeof I=="bigint"?I:void 0;c().setBigInt64(A+8,O(C)?BigInt(0):C,!0),c().setInt32(A+0,!O(C),!0)},__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25:function(A){const g=A,I=typeof g=="boolean"?g:void 0;return O(I)?16777215:I?1:0},__wbg___wbindgen_debug_string_0bc8482c6e3508ae:function(A,g){const I=DA(g),C=t(I,M.__wbindgen_malloc,M.__wbindgen_realloc),B=V;c().setInt32(A+4,B,!0),c().setInt32(A+0,C,!0)},__wbg___wbindgen_function_table_5ae7216dfcbcc506:function(){return M.__wbindgen_export},__wbg___wbindgen_in_47fa6863be6f2f25:function(A,g){return A in g},__wbg___wbindgen_is_bigint_31b12575b56f32fc:function(A){return typeof A=="bigint"},__wbg___wbindgen_is_function_0095a73b8b156f76:function(A){return typeof A=="function"},__wbg___wbindgen_is_object_5ae8e5880f2c1fbd:function(A){const g=A;return typeof g=="object"&&g!==null},__wbg___wbindgen_is_string_cd444516edc5b180:function(A){return typeof A=="string"},__wbg___wbindgen_is_undefined_9e4d92534c42d778:function(A){return A===void 0},__wbg___wbindgen_jsval_eq_11888390b0186270:function(A,g){return A===g},__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811:function(A,g){return A==g},__wbg___wbindgen_lt_bb59cc3d23526e0d:function(A,g){return A<g},__wbg___wbindgen_neg_6b4d356dff49dcc6:function(A){return-A},__wbg___wbindgen_number_get_8ff4255516ccad3e:function(A,g){const I=g,C=typeof I=="number"?I:void 0;c().setFloat64(A+8,O(C)?0:C,!0),c().setInt32(A+0,!O(C),!0)},__wbg___wbindgen_rethrow_05525c567f154472:function(A){throw A},__wbg___wbindgen_shr_ef8e07cce709eb54:function(A,g){return A>>g},__wbg___wbindgen_string_get_72fb696202c56729:function(A,g){const I=g,C=typeof I=="string"?I:void 0;var B=O(C)?0:t(C,M.__wbindgen_malloc,M.__wbindgen_realloc),E=V;c().setInt32(A+4,E,!0),c().setInt32(A+0,B,!0)},__wbg___wbindgen_throw_be289d5034ed271b:function(A,g){throw new Error(d(A,g))},__wbg__wbg_cb_unref_d9b87ff7982e3b21:function(A){A._wbg_cb_unref()},__wbg_addEventListener_3acb0aad4483804c:function(){return J(function(A,g,I,C){A.addEventListener(d(g,I),C)},arguments)},__wbg_apply_2e22c45cb4f12415:function(){return J(function(A,g,I){return Reflect.apply(A,g,I)},arguments)},__wbg_apply_ada2ee1a60ac7b3c:function(){return J(function(A,g,I){return A.apply(g,I)},arguments)},__wbg_arrayBuffer_bb54076166006c39:function(){return J(function(A){return A.arrayBuffer()},arguments)},__wbg_bind_1dc37de2b9939128:function(A,g,I,C){return A.bind(g,I,C)},__wbg_bind_29ba380591735d8c:function(A,g,I){return A.bind(g,I)},__wbg_buffer_7b5f53e46557d8f1:function(A){return A.buffer},__wbg_byteLength_7b03c17ff1e4037f:function(A){return A.byteLength},__wbg_byteLength_b5d783d06792ed2c:function(A){return A.byteLength},__wbg_call_389efe28435a9388:function(){return J(function(A,g){return A.call(g)},arguments)},__wbg_call_4708e0c13bdc8e95:function(){return J(function(A,g,I){return A.call(g,I)},arguments)},__wbg_compareExchange_b578410c358e695e:function(){return J(function(A,g,I,C){return Atomics.compareExchange(A,g>>>0,I,C)},arguments)},__wbg_constructor_ad6c0ed428f55d34:function(A){return A.constructor},__wbg_crypto_86f2631e91b51511:function(A){return A.crypto},__wbg_customSections_193491b069139fb1:function(A,g,I){return WebAssembly.Module.customSections(A,d(g,I))},__wbg_data_5330da50312d0bc1:function(A){return A.data},__wbg_done_57b39ecd9addfe81:function(A){return A.done},__wbg_entries_58c7934c745daac7:function(A){return Object.entries(A)},__wbg_error_7534b8e9a36f1ab4:function(A,g){let I,C;try{I=A,C=g,console.error(d(A,g))}finally{M.__wbindgen_free(I,C,1)}},__wbg_exports_794a42000dacd046:function(A){return WebAssembly.Module.exports(A)},__wbg_exports_86b4926134c40288:function(A){return A.exports},__wbg_fetch_d1488f40cef1e210:function(A,g,I){return A.fetch(d(g,I))},__wbg_from_bddd64e7d5ff6941:function(A){return Array.from(A)},__wbg_getPrototypeOf_2653517f1dc884d5:function(){return J(function(A){return Reflect.getPrototypeOf(A)},arguments)},__wbg_getRandomValues_b3f15fcbfabb0f8b:function(){return J(function(A,g){A.getRandomValues(g)},arguments)},__wbg_getTime_1e3cd1391c5c3995:function(A){return A.getTime()},__wbg_getTimezoneOffset_81776d10a4ec18a8:function(A){return A.getTimezoneOffset()},__wbg_getUint32_bb6f5a401408e7fa:function(A,g,I){return A.getUint32(g>>>0,I!==0)},__wbg_get_7efbcc3819719b0f:function(){return J(function(A,g){return A.get(g>>>0)},arguments)},__wbg_get_9b94d73e6221f75c:function(A,g){return A[g>>>0]},__wbg_get_b3ed3ad4be2bc8ac:function(){return J(function(A,g){return Reflect.get(A,g)},arguments)},__wbg_get_index_253dd2a9e007656d:function(A,g){return A[g>>>0]},__wbg_get_index_9a5bfdd2ca49c65f:function(A,g){return A[g>>>0]},__wbg_get_with_ref_key_1dc361bd10053bfe:function(A,g){return A[g]},__wbg_grow_5d42bf28c2da22cb:function(){return J(function(A,g){return A.grow(g>>>0)},arguments)},__wbg_grow_d034989fce14cc8e:function(){return J(function(A,g){return A.grow(g>>>0)},arguments)},__wbg_imports_8333d40ab24779ad:function(A){return WebAssembly.Module.imports(A)},__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04:function(A){let g;try{g=A instanceof ArrayBuffer}catch{g=!1}return g},__wbg_instanceof_Error_8573fe0b0b480f46:function(A){let g;try{g=A instanceof Error}catch{g=!1}return g},__wbg_instanceof_Function_2a29eec978bb3b11:function(A){let g;try{g=A instanceof Function}catch{g=!1}return g},__wbg_instanceof_Global_2db767b6b2347f01:function(A){let g;try{g=A instanceof WebAssembly.Global}catch{g=!1}return g},__wbg_instanceof_Map_53af74335dec57f4:function(A){let g;try{g=A instanceof Map}catch{g=!1}return g},__wbg_instanceof_Memory_dc8c61e3f831ee37:function(A){let g;try{g=A instanceof WebAssembly.Memory}catch{g=!1}return g},__wbg_instanceof_Module_d0d412b14363ba9a:function(A){let g;try{g=A instanceof WebAssembly.Module}catch{g=!1}return g},__wbg_instanceof_Object_1c6af87502b733ed:function(A){let g;try{g=A instanceof Object}catch{g=!1}return g},__wbg_instanceof_RangeError_0b0dd056bc557b89:function(A){let g;try{g=A instanceof RangeError}catch{g=!1}return g},__wbg_instanceof_Response_ee1d54d79ae41977:function(A){let g;try{g=A instanceof Response}catch{g=!1}return g},__wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26:function(A){let g;try{g=A instanceof SharedArrayBuffer}catch{g=!1}return g},__wbg_instanceof_Table_127f216e592f4159:function(A){let g;try{g=A instanceof WebAssembly.Table}catch{g=!1}return g},__wbg_instanceof_Tag_f1d6b24a98b95210:function(A){let g;try{g=A instanceof WebAssembly.Tag}catch{g=!1}return g},__wbg_instanceof_Uint8Array_9b9075935c74707c:function(A){let g;try{g=A instanceof Uint8Array}catch{g=!1}return g},__wbg_isArray_d314bb98fcf08331:function(A){return Array.isArray(A)},__wbg_isSafeInteger_bfbc7332a9768d2a:function(A){return Number.isSafeInteger(A)},__wbg_is_f29129f676e5410c:function(A,g){return Object.is(A,g)},__wbg_iterator_6ff6560ca1568e55:function(){return Symbol.iterator},__wbg_length_32ed9a279acd054c:function(A){return A.length},__wbg_length_35a7bace40f36eac:function(A){return A.length},__wbg_length_aeb94ff17a8a8556:function(A){return A.length},__wbg_load_eff64ff5e429a422:function(){return J(function(A,g){return Atomics.load(A,g>>>0)},arguments)},__wbg_message_9ddc4b9a62a7c379:function(A){return A.message},__wbg_msCrypto_d562bbe83e0d4b91:function(A){return A.msCrypto},__wbg_new_0_73afc35eb544e539:function(){return new Date},__wbg_new_245cd5c49157e602:function(A){return new Date(A)},__wbg_new_2ac7fa8be584d280:function(A,g,I){return new DataView(A,g>>>0,I>>>0)},__wbg_new_361308b2356cecd0:function(){return new Object},__wbg_new_3eb36ae241fe6f44:function(){return new Array},__wbg_new_4a996a46a82782b6:function(){return J(function(A,g){return new WebAssembly.Global(A,g)},arguments)},__wbg_new_57c27ff3ddf5b62c:function(){return J(function(A){return new WebAssembly.Module(A)},arguments)},__wbg_new_8a6f238a6ece86ea:function(){return new Error},__wbg_new_a4e3cab1cdd635ba:function(){return J(function(A,g){return new WebAssembly.Instance(A,g)},arguments)},__wbg_new_b061c0550d9f3281:function(){return J(function(A){return new WebAssembly.Memory(A)},arguments)},__wbg_new_b5d9e2fb389fef91:function(A,g){try{var I={a:A,b:g},C=(E,D)=>{const w=I.a;I.a=0;try{return mA(w,I.b,E,D)}finally{I.a=w}};return new Promise(C)}finally{I.a=I.b=0}},__wbg_new_ca409f861989e0c5:function(A){return new SharedArrayBuffer(A>>>0)},__wbg_new_dca287b076112a51:function(){return new Map},__wbg_new_dd2b680c8bf6ae29:function(A){return new Uint8Array(A)},__wbg_new_from_slice_a3d2629dc1826784:function(A,g){return new Uint8Array(AA(A,g))},__wbg_new_no_args_1c7c842f08d00ebb:function(A,g){return new Function(d(A,g))},__wbg_new_with_args_7bba34e94b1cfa40:function(A,g,I,C){return new Function(d(A,g),d(I,C))},__wbg_new_with_byte_offset_9120ba79e057895b:function(A,g){return new Uint8Array(A,g>>>0)},__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1:function(A,g,I){return new Uint8Array(A,g>>>0,I>>>0)},__wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1:function(A,g,I){return new Int32Array(A,g>>>0,I>>>0)},__wbg_new_with_length_1763c527b2923202:function(A){return new Array(A>>>0)},__wbg_new_with_length_a2c39cbe88fd8ff1:function(A){return new Uint8Array(A>>>0)},__wbg_next_3482f54c49e8af19:function(){return J(function(A){return A.next()},arguments)},__wbg_next_418f80d8f5303233:function(A){return A.next},__wbg_node_e1f24f89a7336c2e:function(A){return A.node},__wbg_notify_78a90977fab74963:function(){return J(function(A,g){return Atomics.notify(A,g>>>0)},arguments)},__wbg_now_a3af9a2f4bbaa4d1:function(){return Date.now()},__wbg_now_ebffdf7e580f210d:function(A){return A.now()},__wbg_ok_87f537440a0acf85:function(A){return A.ok},__wbg_postMessage_2041f4e90af61318:function(){return J(function(A,g){A.postMessage(g)},arguments)},__wbg_process_3975fd6c72f520aa:function(A){return A.process},__wbg_prototypesetcall_bdcdcc5842e4d77d:function(A,g,I){Uint8Array.prototype.set.call(AA(A,g),I)},__wbg_push_8ffdcb2063340ba5:function(A,g){return A.push(g)},__wbg_queueMicrotask_0aa0a927f78f5d98:function(A){return A.queueMicrotask},__wbg_queueMicrotask_5bb536982f78a56f:function(A){queueMicrotask(A)},__wbg_randomFillSync_f8c153b79f285817:function(){return J(function(A,g){A.randomFillSync(g)},arguments)},__wbg_removeEventListener_e63328781a5b9af9:function(){return J(function(A,g,I,C){A.removeEventListener(d(g,I),C)},arguments)},__wbg_require_b74f47fc2d022fd6:function(){return J(function(){return module.require},arguments)},__wbg_resolve_002c4b7d9d8f6b64:function(A){return Promise.resolve(A)},__wbg_setTimeout_e0aacd5a637418a6:function(){return J(function(A,g,I){return A.setTimeout(g,I)},arguments)},__wbg_setUint32_d168af7751a8557e:function(A,g,I,C){A.setUint32(g>>>0,I>>>0,C!==0)},__wbg_set_0af2522656c2a71b:function(){return J(function(A,g,I){A.set(g>>>0,I)},arguments)},__wbg_set_1eb0999cf5d27fc8:function(A,g,I){return A.set(g,I)},__wbg_set_25cf9deff6bf0ea8:function(A,g,I){A.set(g,I>>>0)},__wbg_set_3f1d0b984ed272ed:function(A,g,I){A[g]=I},__wbg_set_6cb8631f80447a67:function(){return J(function(A,g,I){return Reflect.set(A,g,I)},arguments)},__wbg_set_cc56eefd2dd91957:function(A,g,I){A.set(AA(g,I))},__wbg_set_f43e577aea94465b:function(A,g,I){A[g>>>0]=I},__wbg_set_index_b3244a6c458021e4:function(A,g,I){A[g>>>0]=I},__wbg_set_index_f259b54e97f7b177:function(A,g,I){A[g>>>0]=I},__wbg_set_onmessage_ea7cc2ba099021cd:function(A,g){A.onmessage=g},__wbg_set_value_fc06e541de098215:function(A,g){A.value=g},__wbg_slice_8bbd46adb2100583:function(A,g,I){return A.slice(g>>>0,I>>>0)},__wbg_stack_0ed75d68575b0f3c:function(A,g){const I=g.stack,C=t(I,M.__wbindgen_malloc,M.__wbindgen_realloc),B=V;c().setInt32(A+4,B,!0),c().setInt32(A+0,C,!0)},__wbg_static_accessor_GLOBAL_12837167ad935116:function(){const A=typeof global>"u"?null:global;return O(A)?0:l(A)},__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f:function(){const A=typeof globalThis>"u"?null:globalThis;return O(A)?0:l(A)},__wbg_static_accessor_SELF_a621d3dfbb60d0ce:function(){const A=typeof self>"u"?null:self;return O(A)?0:l(A)},__wbg_static_accessor_WINDOW_f8727f0cf888e0bd:function(){const A=typeof window>"u"?null:window;return O(A)?0:l(A)},__wbg_store_d1d951c98d9bed41:function(){return J(function(A,g,I){return Atomics.store(A,g>>>0,I)},arguments)},__wbg_subarray_a96e1fef17ed23cb:function(A,g,I){return A.subarray(g>>>0,I>>>0)},__wbg_then_0d9fe2c7b1857d32:function(A,g,I){return A.then(g,I)},__wbg_then_b9e7b3b5f1a9e1b5:function(A,g){return A.then(g)},__wbg_toString_56d946daff83867b:function(A,g,I){const C=g.toString(I),B=t(C,M.__wbindgen_malloc,M.__wbindgen_realloc),E=V;c().setInt32(A+4,E,!0),c().setInt32(A+0,B,!0)},__wbg_toString_964ff7fe6eca8362:function(A){return A.toString()},__wbg_trap_new:function(A){return z.__wrap(A)},__wbg_validate_71c2d02a71bda62f:function(){return J(function(A){return WebAssembly.validate(A)},arguments)},__wbg_value_0546255b415e96c1:function(A){return A.value},__wbg_value_ce37a60e576310ff:function(A){return A.value},__wbg_versions_4e31226f5e8dc909:function(A){return A.versions},__wbg_wait_5404654a64e22842:function(){return J(function(A,g,I,C){return Atomics.wait(A,g>>>0,I,C)},arguments)},__wbg_wait_be5dae1e53f590f1:function(){return J(function(A,g,I){return Atomics.wait(A,g>>>0,I)},arguments)},__wbg_warn_81ab00e6e16e886d:function(A,g,I){console.warn(A,g,I)},__wbindgen_cast_0000000000000001:function(A,g){return rA(A,g,M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_core_d941ad8722425d2e___ops__function__Fn__web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent____Output_______,lA)},__wbindgen_cast_0000000000000002:function(A,g){return b(A,g,M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_core_d941ad8722425d2e___ops__function__Fn__web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent____Output_______,fA)},__wbindgen_cast_0000000000000003:function(A,g){return b(A,g,M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_for__a__core_d941ad8722425d2e___ops__function__FnMut____a_js_sys_662c4dd2f34eb95c___Array____Output___core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue___,RA)},__wbindgen_cast_0000000000000004:function(A,g){return b(A,g,M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_for__a__core_d941ad8722425d2e___ops__function__FnMut____a_js_sys_662c4dd2f34eb95c___Array____Output___core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue___,RA)},__wbindgen_cast_0000000000000005:function(A,g){return b(A,g,M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_for__a__core_d941ad8722425d2e___ops__function__FnMut____a_js_sys_662c4dd2f34eb95c___Array____Output___core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue___,bA)},__wbindgen_cast_0000000000000006:function(A,g){return b(A,g,M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_core_d941ad8722425d2e___ops__function__FnMut__wasm_bindgen_8243b1be48d1cf33___JsValue____Output_______,XA)},__wbindgen_cast_0000000000000007:function(A){return A},__wbindgen_cast_0000000000000008:function(A){return A},__wbindgen_cast_0000000000000009:function(A,g){return AA(A,g)},__wbindgen_cast_000000000000000a:function(A,g){return d(A,g)},__wbindgen_cast_000000000000000b:function(A,g){return BigInt.asUintN(64,A)|BigInt.asUintN(64,g)<<BigInt(64)},__wbindgen_cast_000000000000000c:function(A){return BigInt.asUintN(64,A)},__wbindgen_init_externref_table:function(){const A=M.__wbindgen_externrefs,g=A.grow(4);A.set(0,void 0),A.set(g+0,void 0),A.set(g+1,null),A.set(g+2,!0),A.set(g+3,!1)}}}}function lA(Q,A,g){M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent_____(Q,A,g)}function fA(Q,A,g){M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent______1_(Q,A,g)}function XA(Q,A,g){M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___wasm_bindgen_8243b1be48d1cf33___JsValue_____(Q,A,g)}function bA(Q,A,g){const I=M.wasm_bindgen_8243b1be48d1cf33___convert__closures________invoke___js_sys_662c4dd2f34eb95c___Array__core_d941ad8722425d2e___result__Result_____wasm_bindgen_8243b1be48d1cf33___JsValue__(Q,A,g);if(I[1])throw wA(I[0])}function RA(Q,A,g){const I=M.wasm_bindgen_8243b1be48d1cf33___convert__closures________invoke___js_sys_662c4dd2f34eb95c___Array__core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue__(Q,A,g);if(I[2])throw wA(I[1]);return wA(I[0])}function mA(Q,A,g,I){M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___wasm_bindgen_8243b1be48d1cf33___JsValue__wasm_bindgen_8243b1be48d1cf33___JsValue_____(Q,A,g,I)}const UA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(Q=>M.__wbg_dapadapter_free(Q>>>0,1)),YA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(Q=>M.__wbg_trap_free(Q>>>0,1));function l(Q){const A=M.__externref_table_alloc();return M.__wbindgen_externrefs.set(A,Q),A}const $=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(Q=>Q.dtor(Q.a,Q.b));function DA(Q){const A=typeof Q;if(A=="number"||A=="boolean"||Q==null)return`${Q}`;if(A=="string")return`"${Q}"`;if(A=="symbol"){const C=Q.description;return C==null?"Symbol":`Symbol(${C})`}if(A=="function"){const C=Q.name;return typeof C=="string"&&C.length>0?`Function(${C})`:"Function"}if(Array.isArray(Q)){const C=Q.length;let B="[";C>0&&(B+=DA(Q[0]));for(let E=1;E<C;E++)B+=", "+DA(Q[E]);return B+="]",B}const g=/\[object ([^\]]+)\]/.exec(toString.call(Q));let I;if(g&&g.length>1)I=g[1];else return toString.call(Q);if(I=="Object")try{return"Object("+JSON.stringify(Q)+")"}catch{return"Object"}return Q instanceof Error?`${Q.name}: ${Q.message}
2
+ ${Q.stack}`:I}function PA(Q,A){Q=Q>>>0;const g=c(),I=[];for(let C=Q;C<Q+4*A;C+=4)I.push(M.__wbindgen_externrefs.get(g.getUint32(C,!0)));return M.__externref_drop_slice(Q,A),I}function AA(Q,A){return Q=Q>>>0,X().subarray(Q/1,Q/1+A)}let T=null;function c(){return(T===null||T.buffer.detached===!0||T.buffer.detached===void 0&&T.buffer!==M.memory.buffer)&&(T=new DataView(M.memory.buffer)),T}function d(Q,A){return Q=Q>>>0,eA(Q,A)}let f=null;function X(){return(f===null||f.byteLength===0)&&(f=new Uint8Array(M.memory.buffer)),f}function J(Q,A){try{return Q.apply(this,A)}catch(g){const I=l(g);M.__wbindgen_exn_store(I)}}function O(Q){return Q==null}function rA(Q,A,g,I){const C={a:Q,b:A,cnt:1,dtor:g},B=(...E)=>{C.cnt++;try{return I(C.a,C.b,...E)}finally{B._wbg_cb_unref()}};return B._wbg_cb_unref=()=>{--C.cnt===0&&(C.dtor(C.a,C.b),C.a=0,$.unregister(C))},$.register(B,C,C),B}function b(Q,A,g,I){const C={a:Q,b:A,cnt:1,dtor:g},B=(...E)=>{C.cnt++;const D=C.a;C.a=0;try{return I(D,C.b,...E)}finally{C.a=D,B._wbg_cb_unref()}};return B._wbg_cb_unref=()=>{--C.cnt===0&&(C.dtor(C.a,C.b),C.a=0,$.unregister(C))},$.register(B,C,C),B}function t(Q,A,g){if(g===void 0){const D=m.encode(Q),w=A(D.length,1)>>>0;return X().subarray(w,w+D.length).set(D),V=D.length,w}let I=Q.length,C=A(I,1)>>>0;const B=X();let E=0;for(;E<I;E++){const D=Q.charCodeAt(E);if(D>127)break;B[C+E]=D}if(E!==I){E!==0&&(Q=Q.slice(E)),C=g(C,I,I=E+Q.length*3,1)>>>0;const D=X().subarray(C+E,C+I),w=m.encodeInto(Q,D);E+=w.written,C=g(C,I,E,1)>>>0}return V=E,C}function wA(Q){const A=M.__wbindgen_externrefs.get(Q);return M.__externref_table_dealloc(Q),A}let gA=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});gA.decode();const nA=2146435072;let iA=0;function eA(Q,A){return iA+=A,iA>=nA&&(gA=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),gA.decode(),iA=A),gA.decode(X().subarray(Q,Q+A))}const m=new TextEncoder;"encodeInto"in m||(m.encodeInto=function(Q,A){const g=m.encode(Q);return A.set(g),{read:Q.length,written:g.length}});let V=0,M;function uA(Q,A){return M=Q.exports,T=null,f=null,M.__wbindgen_start(),M}async function vA(Q,A){if(typeof Response=="function"&&Q instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(Q,A)}catch(C){if(Q.ok&&g(Q.type)&&Q.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",C);else throw C}const I=await Q.arrayBuffer();return await WebAssembly.instantiate(I,A)}else{const I=await WebAssembly.instantiate(Q,A);return I instanceof WebAssembly.Instance?{instance:I,module:Q}:I}function g(I){switch(I){case"basic":case"cors":case"default":return!0}return!1}}async function _A(Q){if(M!==void 0)return M;Q!==void 0&&(Object.getPrototypeOf(Q)===Object.prototype?{module_or_path:Q}=Q:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),Q===void 0&&(Q=new URL("",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Z&&Z.tagName.toUpperCase()==="SCRIPT"&&Z.src||new URL("glassjar.umd.cjs",document.baseURI).href));const A=zA();(typeof Q=="string"||typeof Request=="function"&&Q instanceof Request||typeof URL=="function"&&Q instanceof URL)&&(Q=fetch(Q));const{instance:g,module:I}=await vA(await Q,A);return uA(g)}const $A=new URL("https://cdn.jsdelivr.net/npm/glassjar@0.10.0/dist/engine_bg.wasm"),Ag=Object.freeze({maxObjectBytes:128*1024*1024,maxEntries:256,maxMetadataBytes:8*1024*1024,maxEntryMetadataBytes:1024*1024});class gg{records=new Map;staged=new Map;stagingFailed=!1;objectBytes=0;metadataBytes=0;evictions=0;oversized=0;limits;constructor(A={}){this.limits=Object.freeze({...Ag,...A});for(const g of Object.values(this.limits))if(!Number.isSafeInteger(g)||g<0)throw new RangeError("C++ cache limits must be nonnegative safe integers")}beginBatch(){this.discardBatch(),this.stagingFailed=!1}stage(A){if(this.stagingFailed)return;const g=this.recordSize(A);if(g===void 0||this.staged.has(A.source)){this.failBatch();return}const I=this.limits;for(;this.records.size&&(this.records.size+this.staged.size>=I.maxEntries||this.objectBytes+A.object.byteLength>I.maxObjectBytes||this.metadataBytes+g>I.maxMetadataBytes);)this.remove(this.records.keys().next().value),this.evictions++;if(this.records.size+this.staged.size>=I.maxEntries||this.objectBytes+A.object.byteLength>I.maxObjectBytes||this.metadataBytes+g>I.maxMetadataBytes||g>I.maxEntryMetadataBytes){this.oversized++,this.failBatch();return}this.staged.set(A.source,{...A,object:new Uint8Array(A.object),metadataBytes:g}),this.objectBytes+=A.object.byteLength,this.metadataBytes+=g}abandonBatch(){this.failBatch()}failBatch(){this.discardBatch(),this.stagingFailed=!0}recordSize(A){if(!(typeof A.source!="string"||!A.source.startsWith("/")||A.source.split("/").slice(1).some(g=>!g||g==="."||g==="..")||typeof A.key!="string"||typeof A.object_hash!="string"||!/^[a-f0-9]{64}$/.test(A.key)||!/^[a-f0-9]{64}$/.test(A.object_hash)||A.receipt!=null&&typeof A.receipt!="string"||!(A.object instanceof Uint8Array)))return new TextEncoder().encode(JSON.stringify({source:A.source,key:A.key,object_hash:A.object_hash,...A.receipt==null?{}:{receipt:A.receipt}})).byteLength}async validateBatch(){if(this.stagingFailed)return!1;const A=[...this.staged.values()];for(const g of A){if(!Ig(g.object))return!1;const I=await crypto.subtle.digest("SHA-256",g.object);if(Array.from(new Uint8Array(I),B=>B.toString(16).padStart(2,"0")).join("")!==g.object_hash)return!1}return!0}commitBatch(){for(const[A,g]of this.staged)this.remove(A),this.records.set(A,g);this.staged.clear(),this.stagingFailed=!1}discardBatch(){for(const A of this.staged.values())this.objectBytes-=A.object.byteLength,this.metadataBytes-=A.metadataBytes;this.staged.clear()}snapshot(){return[...this.records.values()].map(({source:A,key:g,object_hash:I,object:C,receipt:B})=>({source:A,key:g,object_hash:I,...B==null?{}:{receipt:B},object:C.slice()}))}touch(A){const g=this.records.get(A);g&&(this.records.delete(A),this.records.set(A,g))}put(A){if(typeof A.source!="string"||!A.source.startsWith("/")||A.source.split("/").slice(1).some(B=>!B||B==="."||B==="..")||typeof A.key!="string"||typeof A.object_hash!="string"||!/^[a-f0-9]{64}$/.test(A.object_hash)||!/^[a-f0-9]{64}$/.test(A.key)||!(A.object instanceof Uint8Array))return;const g=this.recordSize(A);if(g===void 0)return;const I=this.limits;if(this.remove(A.source),I.maxEntries===0||A.object.byteLength>I.maxObjectBytes||g>I.maxMetadataBytes||g>I.maxEntryMetadataBytes){this.oversized++;return}for(;this.records.size>=I.maxEntries||this.objectBytes+A.object.byteLength>I.maxObjectBytes||this.metadataBytes+g>I.maxMetadataBytes;)this.remove(this.records.keys().next().value),this.evictions++;const C={...A,object:new Uint8Array(A.object),metadataBytes:g};this.records.set(A.source,C),this.objectBytes+=C.object.byteLength,this.metadataBytes+=g}delete(A){this.remove(A)}remove(A){const g=this.records.get(A);g&&(this.objectBytes-=g.object.byteLength,this.metadataBytes-=g.metadataBytes,this.records.delete(A))}clear(){this.records.clear(),this.staged.clear(),this.stagingFailed=!1,this.objectBytes=this.metadataBytes=0}stats(){return{objectBytes:this.objectBytes,metadataBytes:this.metadataBytes,entries:this.records.size,stagingEntries:this.staged.size,stagingObjectBytes:[...this.staged.values()].reduce((A,g)=>A+g.object.byteLength,0),stagingMetadataBytes:[...this.staged.values()].reduce((A,g)=>A+g.metadataBytes,0),evictions:this.evictions,oversized:this.oversized}}}function Ig(Q){if(!WebAssembly.validate(Q)||Q.length<8)return!1;let A=8,g=!1;const I=()=>{let C=0,B=0;for(let E=0;E<5&&A<Q.length;E++,B+=7){const D=Q[A++];if(C+=(D&127)*2**B,!(D&128))return C}throw new Error("Malformed object section")};try{for(;A<Q.length;){const C=Q[A++],B=I(),E=A+B;if(E>Q.length||C===8)return!1;if(C===0){const D=I();if(A+D>E)return!1;const w=new TextDecoder().decode(Q.subarray(A,A+D));if(A+=D,w==="linking"){if(g||I()!==2)return!1;g=!0}}A=E}return g}catch{return!1}}const L=Symbol();function H(Q){return Q instanceof Error?{type:"error",error:{type:Q.constructor.name,message:Q.message}}:{type:"error",error:{type:typeof Q,message:String(Q)}}}class JA{name;data;constructor(A,g){this.name=A,this.data=g}download(){const A=new Uint8Array(this.data),g=new Blob([A]),I=URL.createObjectURL(g),C=document.createElement("a");C.href=I,C.download=this.name,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(I)}}class hA extends yA{[L];dap;enabled=!0;set filterInternals(A){this.dap.setFilterInternals(A)}constructor(){super(),this[L]={attach:this.attach.bind(this),detach:this.detach.bind(this),beginRun:()=>this.dap.resetRun()},this.onMessage=this.onMessage.bind(this),this.dap=new EA,this.dap.on(this.onMessage)}send(A){return this.dap.sendMessage(A)}artifactListener=A=>{if(A.data.type!=="artifact")return;const g=new JA(A.data.name,new Uint8Array(A.data.data));this.emit("artifact",g)};attach(A){A.addEventListener("message",this.artifactListener),this.dap.attach(A)}detach(A){A.removeEventListener("message",this.artifactListener),this.dap.detach()}onMessage(A){this.emit("event",A)}}const Cg="glassjar-wasm:";function Qg(Q,A){const g=new URL(String(Q),A);if(g.protocol!=="https:"&&g.protocol!=="http:")throw new TypeError(`Engine Wasm must be served over http(s), not ${g.protocol}`);return g.href}function Bg(Q){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/worker-D45G03b3.js").href:new URL("assets/worker-D45G03b3.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{type:"module",name:Q?.name})}function Eg(Q){return new Bg(Q?{name:Cg+Q}:void 0)}const Dg="/dev/debugger-sh-host";class SA{buffer=new SharedArrayBuffer(4+64*1024);length=new Int32Array(this.buffer,0,1);bytes=new Uint8Array(this.buffer,4);publish(A){Atomics.store(this.length,0,A),Atomics.notify(this.length,0)}}function oA(Q){try{return new Error(`Host device callback failed: ${Q instanceof Error?Q.message:String(Q)}`)}catch{return new Error("Host device callback failed")}}function LA(Q){try{const A=Q?.();if(A&&typeof A.then=="function")return Promise.resolve(A).catch(()=>{}),new TypeError("Host device cleanup must be synchronous")}catch(A){return oA(A)}}class wg{constructor(A){this.onFailure=A}incoming=new SA;outgoing=new SA;workerStart={guest_to_host:this.incoming.buffer,host_to_guest:this.outgoing.buffer};abort=new AbortController;listeners=new Set;cleanup;worker;writing=!1;open(A){let g;try{g=A({signal:this.abort.signal,onData:I=>{if(this.assertOpen(),typeof I!="function")throw new TypeError("Host device listener must be a function");return this.listeners.add(I),()=>{this.listeners.delete(I)}},write:I=>this.write(I)})}catch(I){throw oA(I)}if(g!==void 0&&typeof g!="function")throw Promise.resolve(g).catch(()=>{}),new TypeError("Host device opener must return a cleanup function or undefined");if(typeof g=="function")if(this.abort.signal.aborted){const I=LA(g);if(I)throw I}else this.cleanup=g}attach(A){this.assertOpen(),this.worker=A,A.addEventListener("message",this.onMessage)}assertOpen(){if(this.abort.signal.aborted)throw new Error("Host device is closed")}async write(A){if(this.assertOpen(),!(A instanceof Uint8Array))throw new TypeError("Host device writes require Uint8Array");if(this.writing)throw new Error("Await the previous host device write before writing again");this.writing=!0;try{const g=new Uint8Array(A),I=this.outgoing;let C=0;for(;C<g.length;){this.assertOpen();const B=Atomics.load(I.length,0);if(B!==0){await Atomics.waitAsync(I.length,0,B).value;continue}const E=g.subarray(C,C+I.bytes.length);I.bytes.set(E),I.publish(E.length),C+=E.length}}finally{this.writing=!1}}onMessage=A=>{if(!(this.abort.signal.aborted||A.data?.type!=="host_wake"))try{const g=Atomics.load(this.incoming.length,0);if(g<=0)return;const I=this.incoming.bytes.slice(0,g);this.incoming.publish(0);for(const C of this.listeners){if(this.abort.signal.aborted)break;Promise.resolve(C(I)).catch(B=>this.fail(B))}}catch(g){this.fail(g)}};fail(A){this.abort.signal.aborted||(this.close(),this.onFailure(oA(A)))}close(){if(this.abort.signal.aborted)return;this.worker?.removeEventListener("message",this.onMessage),this.worker=void 0,this.incoming.publish(-1),this.outgoing.publish(-1),this.abort.abort(),this.listeners.clear();const A=this.cleanup;return this.cleanup=void 0,LA(A)}}const ig=["__future__","_abc","_aix_support","_android_support","_apple_support","_ast","_ast_unparse","_asyncio","_bisect","_blake2","_bz2","_codecs","_codecs_cn","_codecs_hk","_codecs_iso2022","_codecs_jp","_codecs_kr","_codecs_tw","_collections","_collections_abc","_colorize","_compat_pickle","_contextvars","_csv","_ctypes","_curses","_curses_panel","_datetime","_dbm","_decimal","_elementtree","_frozen_importlib","_frozen_importlib_external","_functools","_gdbm","_hashlib","_heapq","_hmac","_imp","_interpchannels","_interpqueues","_interpreters","_io","_ios_support","_json","_locale","_lsprof","_lzma","_markupbase","_math_integer","_md5","_multibytecodec","_multiprocessing","_opcode","_opcode_metadata","_operator","_osx_support","_overlapped","_pickle","_posixshmem","_posixsubprocess","_py_abc","_py_warnings","_pydatetime","_pydecimal","_pyio","_pylong","_pyrepl","_queue","_random","_remote_debugging","_scproxy","_sha1","_sha2","_sha3","_signal","_sitebuiltins","_socket","_sqlite3","_sre","_ssl","_stat","_statistics","_string","_strptime","_struct","_suggestions","_symtable","_sysconfig","_testbuffer","_testcapi","_testclinic","_testclinic_limited","_testinternalcapi","_testlimitedcapi","_thread","_threading_local","_tkinter","_tokenize","_tracemalloc","_types","_typing","_uuid","_warnings","_weakref","_weakrefset","_winapi","_wmi","_xxtestfuzz","_zoneinfo","_zstd","abc","annotationlib","antigravity","argparse","array","ast","asyncio","atexit","base64","bdb","binascii","bisect","builtins","bz2","cProfile","calendar","cmath","cmd","code","codecs","codeop","collections","colorsys","compileall","compression","concurrent","configparser","contextlib","contextvars","copy","copyreg","csv","ctypes","curses","dataclasses","datetime","dbm","decimal","difflib","dis","doctest","email","encodings","ensurepip","enum","errno","faulthandler","fcntl","filecmp","fileinput","fnmatch","fractions","ftplib","functools","gc","genericpath","getopt","getpass","gettext","glob","graphlib","grp","gzip","hashlib","heapq","hmac","html","http","idlelib","imaplib","importlib","inspect","io","ipaddress","itertools","json","keyword","linecache","locale","logging","lzma","mailbox","marshal","math","mimetypes","mmap","modulefinder","msvcrt","multiprocessing","netrc","nt","ntpath","nturl2path","numbers","opcode","operator","optparse","os","pathlib","pdb","pickle","pickletools","pkgutil","platform","plistlib","poplib","posix","posixpath","pprint","profile","profiling","pstats","pty","pwd","py_compile","pyclbr","pydoc","pydoc_data","pyexpat","queue","quopri","random","re","readline","reprlib","resource","rlcompleter","runpy","sched","secrets","select","selectors","shelve","shlex","shutil","signal","site","smtplib","socket","socketserver","sqlite3","ssl","stat","statistics","string","stringprep","struct","subprocess","symtable","sys","sysconfig","syslog","tabnanny","tarfile","tempfile","termios","textwrap","this","threading","time","timeit","tkinter","token","tokenize","tomllib","trace","traceback","tracemalloc","tty","turtle","turtledemo","types","typing","unicodedata","unittest","urllib","uuid","venv","warnings","wave","weakref","webbrowser","winreg","winsound","wsgiref","xml","xmlrpc","xxsubtype","zipapp","zipfile","zipimport","zlib","zoneinfo"],IA="3.15.2",sA="/usr/local/lib/python3.15/site-packages",cA="https://pypi.org/pypi",og="files.pythonhosted.org",P={packages:50,downloadBytes:60*1024*1024,files:5e3,unpackedBytes:200*1024*1024},Ng={python_version:IA.split(".").slice(0,2).join("."),python_full_version:IA,implementation_name:"cpython",implementation_version:IA,platform_python_implementation:"CPython",os_name:"posix",sys_platform:"wasi",platform_system:"",platform_machine:"wasm32",platform_release:"0.0.0",platform_version:"0.0.0"},HA={yaml:"PyYAML",bs4:"beautifulsoup4",dateutil:"python-dateutil",attr:"attrs",dotenv:"python-dotenv",jwt:"PyJWT",serial:"pyserial",docx:"python-docx",pptx:"python-pptx",slugify:"python-slugify",PIL:"pillow",sklearn:"scikit-learn",cv2:"opencv-python",Crypto:"pycryptodome",skimage:"scikit-image",google:"protobuf",_pytest:"pytest"},Fg=new Set(ig),aA=/^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;function W(Q){return Q.toLowerCase().replace(/[-_.]+/g,"-")}function Mg(Q){const A=new Set;for(const g of Q.split(`
3
+ `)){const I=g.replace(/#.*/,"").trim();let C=/^import\s+(.+)$/.exec(I);if(C){for(const B of C[1].split(",")){const E=B.trim().split(/\s+/)[0]?.split(".")[0];E&&A.add(E)}continue}C=/^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(I),C&&A.add(C[1].split(".")[0])}return A}function kg(Q){const A=new Set,g=[];let I="";const C=(E,D)=>{for(const[w,N]of Object.entries(E))typeof N=="string"?(w.endsWith(".py")&&(g.push(N),D||A.add(w.slice(0,-3))),!D&&w==="requirements.txt"&&(I=N)):(D||A.add(w),C(N,`${D}/${w}`))};C(Q,"");const B=new Map;for(const E of g)for(const D of Mg(E)){if(Fg.has(D)||A.has(D)||D.startsWith("_")&&!(D in HA))continue;const w=HA[D]??D;B.set(W(w),w)}for(const E of I.split(`
4
+ `)){const D=E.replace(/#.*/,"").trim();if(!D||D.startsWith("-"))continue;const w=/^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(D)?.[0];w&&B.set(W(w),D)}return[...B.values()].sort()}function r(Q){const A=/^v?(?:\d+!)?(\d+(?:\.\d+)*)(?:[-_.]?(a|b|c|rc|alpha|beta|pre|preview)[-_.]?(\d*))?(?:-(\d+)|[-_.]?(?:post|rev|r)[-_.]?(\d*))?(?:[-_.]?dev[-_.]?(\d*))?(?:\+[a-z0-9.]+)?$/i.exec(Q.trim());if(!A)return null;const g=A[2]?.toLowerCase(),I=g?{a:0,alpha:0,b:1,beta:1,c:2,rc:2,pre:2,preview:2}[g]:void 0;return{release:A[1].split(".").map(Number),pre:I===void 0?void 0:[I,Number(A[3]||0)],post:A[4]!==void 0?Number(A[4]):A[5]!==void 0?Number(A[5]||0):void 0,dev:A[6]!==void 0?Number(A[6]||0):void 0,text:Q}}function qA(Q,A){const g=Math.max(Q.release.length,A.release.length);for(let E=0;E<g;E++){const D=(Q.release[E]??0)-(A.release[E]??0);if(D)return Math.sign(D)}const I=E=>[E.pre?0:E.dev!==void 0&&E.post===void 0?-1:1,E.pre?.[0]??0,E.pre?.[1]??0,E.post??-1,E.dev??Number.POSITIVE_INFINITY],C=I(Q),B=I(A);for(let E=0;E<C.length;E++)if(C[E]!==B[E])return Math.sign(C[E]-B[E]);return 0}const pA=Q=>Q.pre!==void 0||Q.dev!==void 0;function NA(Q,A){for(const g of A.split(",")){const I=g.trim();if(!I)continue;const C=/^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(I);if(!C)return!1;const[,B,E]=C;if((B==="=="||B==="!=")&&E.endsWith(".*")){if(E.slice(0,-2).split(".").map(Number).every((R,h)=>(Q.release[h]??0)===R)!==(B==="=="))return!1;continue}const D=r(E);if(!D)return!1;const w=qA(Q,D);if(B==="~="){const N=D.release.slice(0,Math.max(1,D.release.length-1));if(w<0||!N.every((G,R)=>(Q.release[R]??0)===G))return!1}else if(!(B==="=="||B==="==="?w===0:B==="!="?w!==0:B==="<="?w<=0:B===">="?w>=0:B==="<"?w<0:w>0))return!1}return!0}function dA(Q){const[A,g]=Q.split(";",2).map(C=>C.trim()),I=/^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[([^\]]*)\])?\s*\(?\s*([^)]*?)\s*\)?$/.exec(A);return!I||I[3].includes("@")?null:{name:I[1],extras:(I[2]??"").split(",").map(C=>C.trim()).filter(Boolean),specifiers:I[3].replace(/\s+/g,""),marker:g||void 0}}function Gg(Q,A=[]){const g=Q.match(/\(|\)|'[^']*'|"[^"]*"|===|==|!=|<=|>=|~=|<|>|\bnot\s+in\b|\bin\b|\band\b|\bor\b|[A-Za-z_][A-Za-z0-9_.]*/g)??[];let I=0;const C=N=>/^['"]/.test(N)?{text:N.slice(1,-1)}:N==="extra"?{text:"",variable:"extra"}:{text:Ng[N]??"",variable:N},B=(N,G,R)=>{if(N.variable==="extra"||R.variable==="extra"){const U=W((N.variable==="extra"?R:N).text),q=A.some(x=>W(x)===U);return G==="!="?!q:q}if(G==="in")return R.text.includes(N.text);if(/^not\s+in$/.test(G))return!R.text.includes(N.text);if(!N.variable&&R.variable)return B(R,{"<":">",">":"<","<=":">=",">=":"<="}[G]??G,N);const h=r(N.text),y=r(R.text);return h&&y&&/version/.test(N.variable??"")?NA(h,`${G}${R.text}`):G==="=="||G==="==="?N.text===R.text:G==="!="?N.text!==R.text:!1},E=()=>{if(g[I]==="("){I++;const h=w();return I++,h}const N=C(g[I++]),G=g[I++],R=C(g[I++]);return B(N,G,R)},D=()=>{let N=E();for(;g[I]==="and";)I++,N=E()&&N;return N},w=()=>{let N=D();for(;g[I]==="or";)I++,N=D()||N;return N};try{return w()}catch{return!1}}function yg(Q){if(Q.packagetype!=="bdist_wheel"||Q.yanked)return!1;const A=Q.filename.replace(/\.whl$/,"").split("-").slice(-3);return A.length===3&&A[1]==="none"&&A[2]==="any"&&A[0].split(".").some(g=>g==="py3"||g.startsWith("py3"))}function Kg(Q){return Q?NA(r(IA),Q.replace(/\s+/g,"")):!0}class Rg{constructor(A=(g,I)=>fetch(g,I)){this.fetchImpl=A}projects=new Map;metadata=new Map;wheels=new Map;project(A){const g=W(A);let I=this.projects.get(g);return I||(I=this.fetchImpl(`${cA}/${encodeURIComponent(g)}/json`).then(async C=>C.ok?await C.json():null,()=>null),this.projects.set(g,I)),I}requiresDist(A,g,I){if(I.info.version===g)return Promise.resolve(I.info.requires_dist??[]);const C=`${W(A)}@${g}`;let B=this.metadata.get(C);return B||(B=this.fetchImpl(`${cA}/${encodeURIComponent(W(A))}/${encodeURIComponent(g)}/json`).then(async E=>E.ok?(await E.json()).info.requires_dist??[]:[],()=>[]),this.metadata.set(C,B)),B}async resolve(A,g=()=>{}){const I=new Map,C=[];for(const B of A){const E=dA(B);E&&aA.test(E.name)&&C.push({requirement:E,top:!0})}for(;C.length;){const{requirement:B,top:E}=C.shift(),D=W(B.name);if(I.has(D))continue;if(I.size>=P.packages)break;const w=await this.project(B.name);if(!w){E&&g({kind:"skipped",message:`${B.name}: not found on PyPI`});continue}const N=Object.entries(w.releases).map(([y,U])=>({version:r(y),files:U})).filter(y=>y.version!==null&&NA(y.version,B.specifiers)).sort((y,U)=>qA(U.version,y.version)),R=[...N.filter(y=>!pA(y.version)),...N.filter(y=>pA(y.version))].map(y=>({version:y.version,wheel:y.files.find(U=>yg(U)&&Kg(U.requires_python))})).find(y=>y.wheel);if(!R?.wheel){const y=N.some(U=>U.files.some(q=>q.packagetype==="bdist_wheel"));g({kind:"skipped",message:y?`${w.info.name} has compiled code, which can't run in the browser`:`${w.info.name}: no Python 3.15 wheel on PyPI`});continue}const h=new URL(R.wheel.url);if(!(h.protocol!=="https:"||h.hostname!==og)){I.set(D,{name:w.info.name,version:R.version.text,url:R.wheel.url,sha256:R.wheel.digests.sha256,size:R.wheel.size});for(const y of await this.requiresDist(B.name,R.version.text,w)){const U=dA(y);!U||!aA.test(U.name)||U.marker&&!Gg(U.marker,B.extras)||C.push({requirement:U,top:!1})}}}return[...I.values()]}async install(A,g=()=>{}){const I={};let C=0,B=0;for(const E of A){if(C+=E.size,C>P.downloadBytes){g({kind:"skipped",message:`${E.name}: over the ${P.downloadBytes>>20}MB package limit`});break}const D=`${E.url}#${E.sha256}`;let w=this.wheels.get(D);w||(g({kind:"installing",message:`Installing ${E.name} ${E.version}`}),w=this.download(E),this.wheels.set(D,w),w.catch(()=>this.wheels.delete(D)));let N;try{N=await w}catch(G){g({kind:"skipped",message:`${E.name}: ${G instanceof Error?G.message:String(G)}`});continue}for(const[G,R]of N){if(++B>P.files)break;I[`${sA}/${G}`]=R}}return I}async download(A){const g=await this.fetchImpl(A.url,{cache:"force-cache"});if(!g.ok)throw new Error(`download failed (${g.status})`);const I=new Uint8Array(await g.arrayBuffer());if([...new Uint8Array(await crypto.subtle.digest("SHA-256",I))].map(B=>B.toString(16).padStart(2,"0")).join("")!==A.sha256)throw new Error("download did not match PyPI's checksum");return Ug(await Jg(I,P.unpackedBytes))}}function Ug(Q){const A=new Map;for(const[g,I]of Q){const C=/^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(g);C?A.set(C[2],I):/^[^/]+\.data\//.test(g)||A.set(g,I)}return A}function Yg(Q){return Q.length>0&&!Q.startsWith("/")&&!Q.includes("\\")&&!Q.includes("\0")&&!Q.split("/").some(A=>A===".."||A===".")}async function Jg(Q,A){const g=new DataView(Q.buffer,Q.byteOffset,Q.byteLength);let I=-1;for(let N=Q.length-22;N>=Math.max(0,Q.length-22-65535);N--)if(g.getUint32(N,!0)===101010256){I=N;break}if(I<0)throw new Error("not a zip archive");const C=g.getUint16(I+10,!0);let B=g.getUint32(I+16,!0);const E=new Map;let D=0;const w=new TextDecoder;for(let N=0;N<C;N++){if(g.getUint32(B,!0)!==33639248)throw new Error("corrupt zip directory");const G=g.getUint16(B+10,!0),R=g.getUint32(B+20,!0),h=g.getUint32(B+24,!0),y=g.getUint16(B+28,!0),U=g.getUint16(B+30,!0),q=g.getUint16(B+32,!0),x=g.getUint32(B+42,!0),s=w.decode(Q.subarray(B+46,B+46+y));if(B+=46+y+U+q,s.endsWith("/"))continue;if(!Yg(s))throw new Error(`unsafe path in package: ${s}`);if(D+=h,D>A)throw new Error("package too large");const BA=x+30+g.getUint16(x+26,!0)+g.getUint16(x+28,!0),u=Q.subarray(BA,BA+R);let o;if(G===0)o=u.slice();else if(G===8)o=new Uint8Array(await new Response(new Blob([u.slice()]).stream().pipeThrough(new DecompressionStream("deflate-raw"))).arrayBuffer());else throw new Error(`unsupported compression in package: ${s}`);if(o.length!==h)throw new Error(`corrupt entry in package: ${s}`);E.set(s,o)}return E}const n={installer:void 0,sets:new Map};async function jA(Q,A=()=>{}){const g=kg(Q);if(!g.length)return{};const I=g.join(`
5
+ `);let C=n.sets.get(I);if(!C){n.installer??=new Rg;const D=n.installer,w=[],N=G=>{G.kind==="skipped"?w.push(G):A(G)};C=D.resolve(g,N).then(async G=>({files:await D.install(G,N),notes:w})),n.sets.set(I,C),C.catch(()=>n.sets.delete(I))}const{files:B,notes:E}=await C;for(const D of E)A(D);return B}const hg=["4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"],CA=Object.freeze({compiler:"d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",sysroot:"8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",exceptions:"20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"});function OA(Q="legacy"){if(Q==="legacy")return{profile:Q,digests:CA};if(Q==="stock-certified-v1"&&hg.length>0)return{profile:Q,digests:CA};throw new Error(`The ${Q} toolchain is not available in this build`)}class e{#A;hashCount=3;hashMs;constructor(A,g){this.#A=A,this.hashMs=g}static async load(A,g,I,C=CA.exceptions,B="legacy"){const E=OA(B);if(A.length!==2)throw new Error("Missing C++ toolchain assets");let D,w;const N=await Promise.allSettled(A.map(async(q,x)=>{try{const s=await fetch(q,{cache:"force-cache",signal:I});if(!s.ok)throw new Error(`Cannot load C++ toolchain (${s.status})`);return x===0&&g&&typeof WebAssembly.compileStreaming=="function"&&typeof s.clone=="function"&&(w=WebAssembly.compileStreaming(s.clone()).catch(()=>{})),new Uint8Array(await s.arrayBuffer())}catch(s){throw D??={error:s},s}}));if(N[0].status==="rejected"||N[1].status==="rejected")throw D?.error;const[G,R]=[N[0].value,N[1].value],[h,y]=await Promise.allSettled([e.ingestOwned(G,R,!1,C),g?(w??Promise.resolve(void 0)).then(q=>q??WebAssembly.compile(G)):Promise.resolve(void 0)]);if(h.status==="rejected")throw h.reason;const U=h.value;if(U.#A.compilerHash!==E.digests.compiler||U.#A.sysrootHash!==E.digests.sysroot||U.#A.exceptionsHash!==E.digests.exceptions)throw new Error("C++ toolchain integrity mismatch");if(I?.aborted)throw new DOMException("Toolchain loading aborted","AbortError");if(y.status==="rejected")throw y.reason;return U.#A.stockProfile=E.profile==="stock-certified-v1",U.#A.module=y.value,U}static async fromBytes(A,g,I){const C=new Uint8Array(A),B=new Uint8Array(g);return e.ingestOwned(C,B,I,CA.exceptions)}static async ingestOwned(A,g,I,C){const B=performance.now(),E=await Promise.allSettled([xA(A),xA(g)]);if(E[0].status==="rejected")throw E[0].reason;if(E[1].status==="rejected")throw E[1].reason;const[D,w]=[E[0].value,E[1].value],N=I?await WebAssembly.compile(A):void 0;return new e({compiler:A,sysroot:g,compilerHash:D,sysrootHash:w,exceptionsHash:C,module:N},performance.now()-B)}matchesExpectation(A){return A.compilerSha256===this.#A.compilerHash&&A.sysrootSha256===this.#A.sysrootHash&&A.exceptionsSha256===this.#A.exceptionsHash}get identity(){return`${this.#A.compilerHash}:${this.#A.sysrootHash}:${this.#A.exceptionsHash}`}get identityBytes(){return this.#A.compiler.byteLength+this.#A.sysroot.byteLength}get compilerBytes(){return this.#A.compiler.byteLength}configure(A,g){try{return A.postMessage({...g,toolchain:this.#A}),!!this.#A.module}catch(I){if(!(I instanceof DOMException)||I.name!=="DataCloneError"||!this.#A.module)throw I;return A.postMessage({...g,toolchain:{...this.#A,module:void 0}}),!1}}}async function xA(Q){const A=await crypto.subtle.digest("SHA-256",Q);return Array.from(new Uint8Array(A),g=>g.toString(16).padStart(2,"0")).join("")}let FA,QA;class MA{stdout=new kA(1);stderr=new kA(2);stdin=new a;debugger;lang;scope;fs={};binaryFiles={};cppArtifacts;hostDevice;program={};options;python;retain;idleTimeoutMs;wasmUrl;objects;generation=0;scopeEpoch=0;operationId=0;disposed=!1;active;promise;slot;idleTimer;toolchain;toolchainLoading;toolchainController;initializing=new Set;toolchainIdentity;toolchainIngestions=0;toolchainHashCount=0;toolchainHashMs=0;compilerModuleCloned=!1;disposal;cancellationDraining;releaseDrain;releases=new Set;retirements=0;latest;cacheValidation;static async create(A,g={}){const{wasmUrl:I,python:C,...B}=g,E=I===void 0?void 0:Qg(I,globalThis.location?.href),D=structuredClone(B);C&&(D.python={packages:!!C.packages,onPackageStatus:typeof C.onPackageStatus=="function"?C.onPackageStatus:void 0});const w=E??null;if(QA!==void 0&&QA!==w)throw new Error("The engine Wasm is already loaded from a different wasmUrl");QA=w,FA??=_A({module_or_path:E??$A}).catch(G=>{throw FA=void 0,QA=void 0,G}),await FA;const N=new MA(A,D);if(N.wasmUrl=E,A!=="c"&&typeof window<"u"&&typeof fetch<"u")for(const G of KA(A))fetch(G,{cache:"force-cache"}).then(R=>R.arrayBuffer()).catch(()=>{});return N}constructor(A,g){const I=g.cpp;this.retain=g.retainWorker??I?.retainWorker??!0;const C=g.idleTimeoutMs??I?.idleTimeoutMs??3e4;if(!Number.isSafeInteger(C)||C<1||C>3e5)throw new RangeError("Worker idle timeout must be between 1 and 300000 milliseconds");if(this.idleTimeoutMs=C,I){if(A!=="c")throw new TypeError("C++ performance options require C/C++");if(!I.scope?.projectId||!I.scope.accountId)throw new TypeError("C++ performance options require project and account identity");if(I.compilerLifetime!==void 0&&!["idle","project"].includes(I.compilerLifetime))throw new TypeError("Invalid compiler lifetime");OA(I.toolchainProfile),this.scope=Object.freeze({...I.scope}),this.options=Object.freeze({...I,scope:this.scope,idleTimeoutMs:C})}if(g.python){if(A!=="python")throw new TypeError("Python options require Python");this.python=Object.freeze({...g.python})}this.objects=new gg(typeof I?.objectCache=="object"?I.objectCache:{}),this.debugger=new hA,this.lang=A}get cacheCompilerModule(){return this.options?.cacheCompilerModule??this.retain}get cacheStats(){return structuredClone({...this.objects.stats(),generation:this.generation,scopeEpoch:this.scopeEpoch,operationId:this.operationId,cacheEpoch:this.generation,toolchainProfile:this.options?.toolchainProfile??"legacy",cacheEligible:this.cacheValidation?.eligible??!1,stockCertificateSha256:this.cacheValidation?.certificate,cacheEligibilitySnapshot:this.cacheValidation?.snapshot,cacheEligibilityOperationId:this.cacheValidation?.operationId,cacheEligibilityReason:this.cacheValidation?.reason,toolchainIdentityBytes:this.toolchain?.identityBytes??0,toolchainIngestions:this.toolchainIngestions,toolchainHashCount:this.toolchainHashCount,toolchainHashMs:this.toolchainHashMs,compilerModuleCloned:this.compilerModuleCloned,workerRetained:!!this.slot&&!this.active,workerRetirements:this.retirements,compilerModuleIdentityBytes:this.cacheCompilerModule?this.toolchain?.compilerBytes??0:0,latest:this.active?.stats??this.latest})}clearCaches(){this.cacheValidation=void 0,this.generation++,this.objects.clear(),this.toolchain=void 0,this.active||(this.toolchainController?.abort(),this.toolchainLoading=void 0),this.active||this.retireWorker()}stop(){return this.clearCaches(),this.cancelCurrentOperation()}cancelCurrentOperation(){if(this.cancellationDraining)return this.cancellationDraining;this.operationId++;const A=this.promise,g=this.active?.publication;this.retireWorker(),this.objects.discardBatch(),this.active&&this.finish(this.active,{type:"stopped"});const I=Promise.allSettled([A,g]).then(()=>{this.cancellationDraining===I&&(this.cancellationDraining=void 0)});return this.cancellationDraining=I,I}releaseCompilerResources(A={}){const g=A.signal;return g?.aborted?Promise.resolve("cancelled"):this.disposed?Promise.resolve("released"):new Promise(I=>{const C={resolve:I,signal:g,abort:()=>this.settleRelease(C,"cancelled")};this.releases.add(C),g?.addEventListener("abort",C.abort,{once:!0}),this.flushReleases()})}settleRelease(A,g){this.releases.delete(A)&&(A.signal?.removeEventListener("abort",A.abort),A.resolve(g))}flushReleases(){if(!(this.active||!this.releases.size||this.releaseDrain)){if(this.initializing.size){this.toolchainController?.abort();const A=[...this.initializing];this.toolchainLoading=void 0,this.releaseDrain=Promise.allSettled(A).then(()=>{this.releaseDrain=void 0,this.flushReleases()});return}this.retireWorker(),this.toolchainController?.abort(),this.toolchain=void 0,this.toolchainLoading=void 0;for(const A of this.releases)this.settleRelease(A,"released")}}dispose(){if(this.disposal)return this.disposal;this.disposed=!0,this.scopeEpoch++,this.fs={},this.binaryFiles={},this.cppArtifacts=void 0,this.hostDevice=void 0,this.stdout.removeAllListeners(),this.stderr.removeAllListeners(),this.debugger.removeAllListeners();const A=[...this.initializing];return this.toolchainController?.abort(),this.disposal=Promise.allSettled([this.stop(),...A]).then(()=>{this.latest=void 0,this.flushReleases()}),this.disposal}prepareCompiler(A){if(A?.validateCacheInputs!==void 0&&typeof A.validateCacheInputs!="boolean")return Promise.resolve(H(new TypeError("Invalid compiler preparation options")));const g=A?.validateCacheInputs===!0&&this.options?.toolchainProfile==="stock-certified-v1"&&!!this.options?.objectCache&&this.objects.limits.maxEntries>0&&this.objects.limits.maxObjectBytes>0&&this.objects.limits.maxMetadataBytes>0&&this.objects.limits.maxEntryMetadataBytes>0;return this.submit(!0,!0,g)}run(){return this.lang==="python"&&this.python?.packages?this.runWithPackages():this.submit(!1)}async runWithPackages(){const A=I=>{try{this.python?.onPackageStatus?.(I)}catch{}};let g={};try{g=await jA(this.fs,A)}catch(I){A({kind:"skipped",message:`Packages: ${I instanceof Error?I.message:String(I)}`})}return this.submit(!1,!1,!1,g)}compile(){return this.submit(!0)}submit(A,g=!1,I=!1,C={}){if(this.disposed)return Promise.resolve(H(new Error("Engine is disposed")));if(this.active||this.cancellationDraining)return Promise.resolve(H(new Error("An engine job is already active")));if(A&&this.lang==="python")return Promise.resolve(H(new Error("Compile-only is supported for C/C++ and Rust")));this.cacheValidation=void 0;const B=g&&!I;let E;try{const y=B||!this.cppArtifacts?null:{...this.cppArtifacts};if(y?.cacheCertificate!==void 0){const U=y.cacheCertificate;(typeof U!="string"||U.length>1024*1024||new TextEncoder().encode(U).byteLength>1024*1024)&&delete y.cacheCertificate}E={fs:B?{}:structuredClone(this.fs),binary_files:Object.fromEntries(Object.entries(B?{}:{...C,...this.binaryFiles}).map(([U,q])=>[U,new Uint8Array(q)])),cpp_artifacts:structuredClone(y)}}catch(y){return Promise.resolve(H(y))}const D=!A&&this.debugger.enabled,w=A?void 0:this.hostDevice;if(w!==void 0&&(typeof w!="function"||!["c","python"].includes(this.lang)))return Promise.resolve(H(new TypeError("Invalid host device configuration")));clearTimeout(this.idleTimer),this.stdin[L].clear();const N=!!this.slot;let G;const R=new Promise(y=>{G=y});this.promise=R;const h={generation:this.generation,scopeEpoch:this.scopeEpoch,operationId:++this.operationId,cacheEpoch:this.generation,prepareOnly:g,validateCacheInputs:I,settled:!1,buildOnly:A,debug:D,opener:w,startedAt:performance.now(),resolve:G,stats:{operation:g?"prepare_compiler":A?"compile":"run",workerReadyMs:0,workerReused:N},start:{...E,lang:this.lang,prepare_compiler:g,validate_cache_inputs:I,scope_epoch:this.scopeEpoch,operation_id:this.operationId,cache_epoch:this.generation,is_debug:D,build_only:A,stdin_buffer:this.stdin[L].buffer,program:{args:[...this.program.args??[]].map(String),cwd:this.program.cwd,entry:this.program.entry,env:{...this.program.env},collectFiles:!!this.program.collectFiles},cpp_cache:this.options?.objectCache&&!D&&!g?{generation:this.generation,entries:this.objects.snapshot(),max_entry_metadata_bytes:Math.min(this.objects.limits.maxEntryMetadataBytes,this.objects.limits.maxMetadataBytes,1024*1024)}:null}};this.objects.beginBatch(),this.active=h;try{if(this.slot||this.makeWorker(),!this.current(h))return R;const y=this.slot;this.lang==="c"&&!this.toolchain&&this.ensureToolchain().catch(U=>{this.current(h)&&this.slot===y&&this.finish(h,H(U))}),this.slot.ready&&this.dispatch(h)}catch(y){this.finish(h,H(y))}return R}current(A){return this.active===A&&!A.settled}makeWorker(){const A=Eg(this.wasmUrl),g={worker:A,ready:!1,remove:()=>{}};this.slot=g;const I=E=>{if(this.slot!==g)return;const D=E.data,w=this.active;if(D.type==="ready"){if(g.ready)return;g.ready=!0,w&&this.current(w)&&this.dispatch(w);return}if(!(!w||!this.current(w))){if(!g.ready&&D.type==="error"){this.finish(w,H(new Error(D.message)));return}if(!(D.operationId!==w.operationId||D.scopeEpoch!==w.scopeEpoch))try{if(D.type==="cpp_cache_eligibility"){if(this.options?.toolchainProfile!=="stock-certified-v1"||w.prepareOnly&&!w.validateCacheInputs)return;const N=R=>typeof R=="string"&&/^[0-9a-f]{64}$/.test(R),G=D.eligible===!0&&N(D.certificate_sha256)&&N(D.snapshot);this.cacheValidation={eligible:G,certificate:N(D.certificate_sha256)?D.certificate_sha256:void 0,snapshot:G?D.snapshot:void 0,operationId:w.operationId,reason:G?void 0:typeof D.reason=="string"?D.reason.slice(0,128):"stock-input-validation"}}else if(D.type==="files")w.files={written:Object.fromEntries(D.written),removed:D.removed,truncated:D.truncated};else if(D.type==="stop")this.finish(w,{type:"completed",exitCode:D.exit_code,timing:{totalMs:performance.now()-w.startedAt,buildMs:D.build_ms,runMs:D.run_ms},...w.files?{files:w.files}:{}});else if(D.type==="error")this.finish(w,H(new Error(D.message)));else if(D.type==="cpp_cache_object"&&D.generation===this.generation&&w.generation===this.generation)try{this.objects.stage(D)}catch{this.objects.abandonBatch()}else D.type==="cpp_cache_stats"&&D.generation===w.generation?w.stats.cache=D.stats:D.type==="cpp_cache_abandon"?this.objects.abandonBatch():D.type==="object_build_complete"?w.publication??=this.publishObjects(w,g):D.type==="compiler_module_stats"&&(w.stats.compilerModule=D)}catch(N){this.finish(w,H(N))}}},C=E=>{this.slot===g&&(this.clearCaches(),this.active?this.finish(this.active,H(E.error??new Error(E.message))):this.retireWorker())},B=()=>C({message:"Unreadable execution worker message"});this.debugger[L].attach(A),A.addEventListener("message",I),A.addEventListener("error",C),A.addEventListener("messageerror",B),g.remove=()=>{A.removeEventListener("message",I),A.removeEventListener("error",C),A.removeEventListener("messageerror",B),this.debugger[L].detach(A)}}async publishObjects(A,g){let I=!1;try{I=await this.objects.validateBatch()}catch{}if(!(!this.current(A)||this.slot!==g)){try{I&&A.cacheEpoch===this.generation?this.objects.commitBatch():(this.objects.abandonBatch(),this.cacheValidation?.operationId===A.operationId&&(this.cacheValidation={...this.cacheValidation,eligible:!1,snapshot:void 0,reason:"stock-publication-budget-or-validation"}))}catch{this.objects.clear(),this.cacheValidation?.operationId===A.operationId&&(this.cacheValidation={...this.cacheValidation,eligible:!1,snapshot:void 0,reason:"stock-publication-failure"})}this.current(A)&&g.worker.postMessage({type:"object_build_ack",scopeEpoch:A.scopeEpoch,operationId:A.operationId,cacheEpoch:A.cacheEpoch})}}ensureToolchain(){if(this.toolchain)return Promise.resolve(this.toolchain);if(this.toolchainLoading)return this.toolchainLoading;this.toolchainController=new AbortController;const A=e.load(KA("c"),this.cacheCompilerModule,this.toolchainController.signal,tA(),this.options?.toolchainProfile);return this.toolchainLoading=A,this.initializing.add(A),A.then(()=>this.initializing.delete(A),()=>{this.initializing.delete(A),this.toolchainLoading===A&&(this.toolchainLoading=void 0)}),A}async dispatch(A){const g=this.slot;if(!(!this.current(A)||!g))try{if(this.lang==="c"){const B=this.scopeEpoch,E=this.generation,D=this.ensureToolchain(),w=this.toolchain??await D;if(!this.current(A)||this.slot!==g||B!==this.scopeEpoch)return;const N=A.start.cpp_artifacts?.requiredToolchain;if(N&&!w.matchesExpectation(N)){this.finish(A,{type:"error",error:{type:"artifact-toolchain-integrity",message:"C++ artifacts require a different compiler, sysroot, or exception runtime"}});return}E===this.generation&&(this.toolchainIdentity&&this.toolchainIdentity!==w.identity&&(this.objects.clear(),A.start.cpp_cache=null),this.toolchain!==w&&(this.toolchainIngestions++,this.toolchainHashCount+=w.hashCount,this.toolchainHashMs+=w.hashMs),this.toolchainIdentity=w.identity,this.toolchain=w,this.toolchainLoading===D&&(this.toolchainLoading=void 0)),g.toolchain!==w&&(this.compilerModuleCloned=w.configure(g.worker,{type:"configure_cpp",cacheCompilerModule:this.cacheCompilerModule}),g.toolchain=w)}if(!this.current(A)||this.slot!==g)return;const I=g.worker;A.stats.workerReadyMs=performance.now()-A.startedAt;const C=B=>this.current(A)&&B.scopeEpoch===A.scopeEpoch&&B.operationId===A.operationId;if(this.stdout[L].attach(I,C),this.stderr[L].attach(I,C),A.prepareOnly||this.debugger[L].beginRun(),A.opener){if(A.device=new wg(B=>this.finish(A,H(B))),A.device.attach(I),A.device.open(A.opener),!this.current(A))return;A.start.host_device=A.device.workerStart}this.current(A)&&(I.postMessage(A.start),A.start.fs={},A.start.binary_files={},A.start.cpp_artifacts=null,A.start.cpp_cache=null)}catch(I){this.current(A)&&(this.toolchainLoading=void 0,this.finish(A,H(I)))}}finish(A,g){if(!this.current(A))return;(g.type!=="completed"||g.exitCode!==0)&&(this.cacheValidation=void 0),A.settled=!0;const I=this.slot?.worker;I&&(this.stdout[L].detach(I),this.stderr[L].detach(I));const C=A.device?.close();C&&(g=H(C));const B=g.type==="completed"&&A.generation===this.generation&&!this.disposed,E=B&&g.type==="completed"&&g.exitCode===0;if(A.generation===this.generation)for(const D of A.stats.cache?.invalid_sources??[])this.objects.delete(D);if(E)for(const D of A.stats.cache?.hit_sources??[])this.objects.touch(D);this.objects.discardBatch(),this.latest=A.stats,this.stdin[L].clear(),(!B||!this.retain)&&this.retireWorker(),!this.disposed&&A.cacheEpoch===this.generation&&(this.slot||this.toolchain&&this.cacheCompilerModule)&&this.options?.compilerLifetime!=="project"&&(this.idleTimer=setTimeout(()=>{this.retireWorker(),this.toolchain=void 0,this.toolchainLoading=void 0},this.idleTimeoutMs)),!this.retain&&!this.cacheCompilerModule&&(this.toolchain=void 0),A.cacheEpoch!==this.generation&&(this.toolchainController?.abort(),this.toolchainLoading=void 0),this.active=void 0,this.promise=void 0,this.flushReleases(),A.resolve(g)}retireWorker(){clearTimeout(this.idleTimer);const A=this.slot;A&&(this.slot=void 0,A.remove(),this.stdout[L].detach(A.worker),this.stderr[L].detach(A.worker),A.worker.onerror=g=>g.preventDefault(),A.worker.terminate(),this.retirements++)}}class kA extends yA{constructor(A){super(),this.mode=A,this.callback=(g=>{const I=g.data;if(this.accepts&&!this.accepts(I)||I.type!=="stdout"||I.mode!==this.mode)return;const C=I.data;this.emit("data",C)}).bind(this),this[L]={attach:this.attach.bind(this),detach:this.detach.bind(this)}}callback;accepts;[L];attach(A,g){this.accepts=g,A.addEventListener("message",this.callback)}detach(A){A.removeEventListener("message",this.callback)}}class a{static BUFFER_SIZE=2048;static HEADER_SIZE=12;static DATA_SIZE=a.BUFFER_SIZE-a.HEADER_SIZE;static READ_IDX=0;static WRITE_IDX=1;static CLOSED_IDX=2;static encoder=new TextEncoder;buffer=new SharedArrayBuffer(a.BUFFER_SIZE);generation=0;queue=Promise.resolve();indices;data;[L];constructor(){this.indices=new Int32Array(this.buffer,0,3),this.data=new Int8Array(this.buffer,a.HEADER_SIZE);const A=()=>this.buffer;this[L]={clear:this.clear.bind(this),get buffer(){return A()}}}clear(){this.generation++,Atomics.notify(this.indices,a.READ_IDX),this.buffer=new SharedArrayBuffer(a.BUFFER_SIZE),this.indices=new Int32Array(this.buffer,0,3),this.data=new Int8Array(this.buffer,a.HEADER_SIZE),this.queue=Promise.resolve()}write(A){const g=typeof A=="string"?a.encoder.encode(A):A;return this.enqueue(()=>this.writeBytes(g))}end(){const A=this.generation;return this.enqueue(async()=>{A===this.generation&&(Atomics.store(this.indices,a.CLOSED_IDX,1),Atomics.notify(this.indices,a.WRITE_IDX))})}enqueue(A){const g=this.queue.then(A,A);return this.queue=g.catch(()=>{}),g}async writeBytes(A){const{DATA_SIZE:g,READ_IDX:I,WRITE_IDX:C}=a;let B=0;const E=this.generation;for(;B<A.length&&E===this.generation;){const D=Atomics.load(this.indices,I);let w=Atomics.load(this.indices,C);w===g-1&&D>0&&(w=0);const N=D<=w?g-w-1:D-w-1;if(N===0){await Atomics.waitAsync(this.indices,I,D).value;continue}const G=Math.min(A.length-B,N);this.data.set(A.subarray(B,B+G),w),Atomics.store(this.indices,C,(w+G)%g),Atomics.notify(this.indices,C),B+=G}}}p.Artifact=JA,p.Debugger=hA,p.Engine=MA,p.HOST_DEVICE_PATH=Dg,p.SITE_PACKAGES=sA,p.Stdin=a,p.Stdout=kA,p.pythonPackageFiles=jA,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/dist/index.d.ts CHANGED
@@ -77,11 +77,33 @@ export type Timing = {
77
77
  buildMs: number;
78
78
  runMs: number;
79
79
  };
80
+ /** Files a program created, changed or removed, when `program.collectFiles` is set. */
81
+ export interface ProgramFiles {
82
+ /** New or changed files by absolute path. */
83
+ written: Record<string, Uint8Array>;
84
+ removed: string[];
85
+ /** Some files were left out because they went over the size limits. */
86
+ truncated: boolean;
87
+ }
80
88
  export type CompletedResult = {
81
89
  type: 'completed';
82
90
  exitCode: number;
83
91
  timing: Timing;
92
+ files?: ProgramFiles;
84
93
  };
94
+ /** How a run starts the student's program, the way a shell would. */
95
+ export interface ProgramOptions {
96
+ /** Arguments after the program's name: `argv[1..]` in C/C++ and Rust, `sys.argv[1:]`. */
97
+ args?: string[];
98
+ /** Absolute directory the program starts in; defaults to `/`. */
99
+ cwd?: string;
100
+ /** Python script or Rust crate root to start from; defaults to `/main.py` or `/main.rs`. */
101
+ entry?: string;
102
+ /** Extra environment variables, such as `TERM`, `COLUMNS` and `LINES`. */
103
+ env?: Record<string, string>;
104
+ /** Return the files the program created, changed or removed in the result. */
105
+ collectFiles?: boolean;
106
+ }
85
107
  export type StoppedResult = {
86
108
  type: 'stopped';
87
109
  };
@@ -165,6 +187,8 @@ export declare class Engine {
165
187
  binaryFiles: Record<string, Uint8Array>;
166
188
  cppArtifacts?: CppArtifacts;
167
189
  hostDevice?: HostDeviceOpener;
190
+ /** How the next run starts the program: arguments, directory, entry file, environment. */
191
+ program: ProgramOptions;
168
192
  private readonly options?;
169
193
  private readonly python?;
170
194
  private readonly retain;
@@ -221,7 +245,10 @@ export declare class Engine {
221
245
  run(): Promise<RunResult>;
222
246
  /** Installs what the program imports from PyPI, then runs it with those files mounted. */
223
247
  private runWithPackages;
224
- /** Compiles Run-profile C++ translation units only; never links, runs, or opens devices. */
248
+ /**
249
+ * Builds without running: C++ compiles its Run-profile translation units (no link, no
250
+ * devices); Rust compiles and links its crate. Errors arrive as a nonzero exit code.
251
+ */
225
252
  compile(): Promise<RunResult>;
226
253
  private submit;
227
254
  private current;
@@ -258,9 +285,13 @@ export declare class Stdin {
258
285
  private static readonly DATA_SIZE;
259
286
  private static readonly READ_IDX;
260
287
  private static readonly WRITE_IDX;
288
+ /** Nonzero after `end()`: reads return end-of-file once the buffer drains. */
289
+ private static readonly CLOSED_IDX;
261
290
  private static encoder;
262
291
  private buffer;
263
292
  private generation;
293
+ /** Writes and `end()` happen in call order. */
294
+ private queue;
264
295
  private indices;
265
296
  private data;
266
297
  [Internals]: {
@@ -270,6 +301,12 @@ export declare class Stdin {
270
301
  constructor();
271
302
  private clear;
272
303
  write(value: Uint8Array | string): Promise<void>;
304
+ /**
305
+ * Close the program's input, like Ctrl+D in a terminal or the end of a `< file`:
306
+ * once it has read everything written so far, its reads return end-of-file.
307
+ */
308
+ end(): Promise<void>;
309
+ private enqueue;
273
310
  private writeBytes;
274
311
  }
275
312
  export * from './debugger.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAKlC,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAkB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAqB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAe,SAAS,EAAE,MAAM,WAAW,CAAC;AAOnD,MAAM,MAAM,IAAI,GAAG,GAAG,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC3C,KAAK,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;AAExB,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAChD,8EAA8E;IA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AAC,MAAM,CAAC,OAAO,CAAqB;IAE3C,OAAO,CAAC,MAAM,CAA4C;IAC1D,OAAO,CAAC,UAAU,CAAK;IACvB,+CAA+C;IAC/C,OAAO,CAAC,KAAK,CAAoC;IACjD,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,IAAI,CAAY;IAExB,CAAC,SAAS,CAAC,EAAE;QACX,KAAK,IAAI,IAAI,CAAC;QACd,MAAM,EAAE,iBAAiB,CAAC;KAC3B,CAAC;;IAcF,OAAO,CAAC,KAAK;IASN,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKvD;;;OAGG;IACI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B,OAAO,CAAC,OAAO;YAMD,UAAU;CA0BzB;AAED,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glassjar",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "A browser-based execution engine and debugger powered by WebAssembly",
5
5
  "keywords": [
6
6
  "wasm",