@wasm-fmt/clang-format 18.1.4 → 18.1.6

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.
@@ -204,7 +204,7 @@ if (!empty(values.lines)) {
204
204
  await writeFile(file, formatted, { encoding: "utf-8" });
205
205
  }
206
206
  } else {
207
- console.log(formatted);
207
+ process.stdout.write(formatted);
208
208
  }
209
209
  process.exit(0);
210
210
  }
@@ -256,7 +256,7 @@ format_range: {
256
256
  await writeFile(file, formatted, { encoding: "utf-8" });
257
257
  }
258
258
  } else {
259
- console.log(formatted);
259
+ process.stdout.write(formatted);
260
260
  }
261
261
 
262
262
  process.exit(0);
@@ -275,7 +275,7 @@ for (const [file_no, file] of fileNames.entries()) {
275
275
  await writeFile(file, formatted, { encoding: "utf-8" });
276
276
  }
277
277
  } else {
278
- console.log(formatted);
278
+ process.stdout.write(formatted);
279
279
  }
280
280
  }
281
281
 
package/clang-format.js CHANGED
@@ -1 +1 @@
1
- let e;export default async function t(t){if(void 0!==e)return e;void 0===t&&(t=new URL("clang-format.wasm",import.meta.url)),("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),e=await async function(e){if("function"==typeof Response&&e instanceof Response){if("compileStreaming"in WebAssembly)try{return await WebAssembly.compileStreaming(e)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.compileStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}return e.arrayBuffer()}return e}(await t).then((e=>a({wasm:e}))),version=e.version,r=()=>{}}function r(){throw new Error("uninit")}export function version(){r()}export function set_fallback_style(t){r(),e.set_fallback_style(t)}function n(e){const{error:t,content:r}=e;if(t)throw Error(r);return r}export function format(t,a="<stdin>",o="LLVM"){return r(),n(e.format(t,a,o))}export function format_line_range(t,a,o="<stdin>",s="LLVM"){r();const i=new e.RangeList;for(const[e,t]of a){if(e<1)throw Error("start line should be at least 1");if(e>t)throw Error("start line should not exceed end line");i.push_back(e),i.push_back(t)}const u=e.format_line(t,o,s,i);return i.delete(),n(u)}export function format_byte_range(t,a,o="<stdin>",s="LLVM"){r();const i=new e.RangeList;if(1===a.length&&1===a[0].length)i.push_back(a[0][0]);else for(const[e,t]of a){if(e<0)throw Error("start offset should be at least 0");if(t<0)throw Error("length should be at least 0");i.push_back(e),i.push_back(t)}const u=e.format_byte(t,o,s,i);return i.delete(),n(u)}export{format_byte_range as formatByteRange,format_line_range as formatLineRange};var a=function(e={}){var t,r,n,a,o,s,i,u,l,c,p=e,h=new Promise(((e,r)=>{t=e})),d=e=>console.log(e),f=e=>console.error(e);function v(){var e=c.buffer;r=new Int8Array(e),n=new Int16Array(e),o=new Uint8Array(e),s=new Uint16Array(e),a=new Int32Array(e),i=new Uint32Array(e),u=new Float32Array(e),l=new Float64Array(e)}c=new WebAssembly.Memory({initial:256,maximum:32768}),v(),p.noExitRuntime;var g,m=e=>g.get(e);class y{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){i[this.ptr+4>>2]=e}get_type(){return i[this.ptr+4>>2]}set_destructor(e){i[this.ptr+8>>2]=e}get_destructor(){return i[this.ptr+8>>2]}set_caught(e){e=e?1:0,r[this.ptr+12]=e}get_caught(){return 0!=r[this.ptr+12]}set_rethrown(e){e=e?1:0,r[this.ptr+13]=e}get_rethrown(){return 0!=r[this.ptr+13]}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){i[this.ptr+16>>2]=e}get_adjusted_ptr(){return i[this.ptr+16>>2]}get_exception_ptr(){if(Ve(this.get_type()))return i[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var $=(e,t,r)=>((e,t,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<e.length;++s){var i=e.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++s)),i<=127){if(r>=o)break;t[r++]=i}else if(i<=2047){if(r+1>=o)break;t[r++]=192|i>>6,t[r++]=128|63&i}else if(i<=65535){if(r+2>=o)break;t[r++]=224|i>>12,t[r++]=128|i>>6&63,t[r++]=128|63&i}else{if(r+3>=o)break;t[r++]=240|i>>18,t[r++]=128|i>>12&63,t[r++]=128|i>>6&63,t[r++]=128|63&i}}return t[r]=0,r-a})(e,o,t,r),w="undefined"!=typeof TextDecoder?new TextDecoder:void 0,b=(e,t,r)=>{for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&w)return w.decode(e.subarray(t,a));for(var o="";t<a;){var s=e[t++];if(128&s){var i=63&e[t++];if(192!=(224&s)){var u=63&e[t++];if((s=224==(240&s)?(15&s)<<12|i<<6|u:(7&s)<<18|i<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(s);else{var l=s-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|i)}else o+=String.fromCharCode(s)}return o},C=(e,t)=>e?b(o,e,t):"",T={varargs:void 0,getStr:e=>C(e)},P={},_=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function A(e){return this.fromWireType(i[e>>2])}var D,F,O,k={},S={},W={},E=e=>{throw new D(e)},x=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&E("Mismatched type converter count");for(var a=0;a<e.length;++a)M(e[a],n[a])}e.forEach((function(e){W[e]=t}));var a=new Array(t.length),o=[],s=0;t.forEach(((e,t)=>{S.hasOwnProperty(e)?a[t]=S[e]:(o.push(e),k.hasOwnProperty(e)||(k[e]=[]),k[e].push((()=>{a[t]=S[e],++s===o.length&&n(a)})))})),0===o.length&&n(a)},U=e=>{for(var t="",r=e;o[r];)t+=F[o[r++]];return t},j=e=>{throw new O(e)};function M(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||j(`type "${n}" must have a positive integer typeid pointer`),S.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;j(`Cannot register type '${n}' twice`)}if(S[e]=t,delete W[e],k.hasOwnProperty(e)){var a=k[e];delete k[e],a.forEach((e=>e()))}}(e,t,r)}var R,I=e=>{j(e.$$.ptrType.registeredClass.name+" instance already deleted")},L=!1,V=e=>{},z=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},N=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=N(e,t,r.baseClass);return null===n?null:r.downcast(n)},H={},Y=[],B=()=>{for(;Y.length;){var e=Y.pop();e.$$.deleteScheduled=!1,e.delete()}},q={},G=(e,t)=>(t.ptrType&&t.ptr||E("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&E("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Z(Object.create(e,{$$:{value:t,writable:!0}})));var Z=e=>"undefined"==typeof FinalizationRegistry?(Z=e=>e,e):(L=new FinalizationRegistry((e=>{z(e.$$)})),Z=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};L.register(e,r,e)}return e},V=e=>L.unregister(e),Z(e));function J(){}var K=(e,t)=>Object.defineProperty(t,"name",{value:e}),Q=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(...n){return e[t].overloadTable.hasOwnProperty(n.length)||j(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[n.length].apply(this,n)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},X=(e,t,r)=>{p.hasOwnProperty(e)?((void 0===r||void 0!==p[e].overloadTable&&void 0!==p[e].overloadTable[r])&&j(`Cannot register public name '${e}' twice`),Q(p,e,e),p.hasOwnProperty(r)&&j(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),p[e].overloadTable[r]=t):(p[e]=t,void 0!==r&&(p[e].numArguments=r))};function ee(e,t,r,n,a,o,s,i){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=i,this.pureVirtualFunctions=[]}var te=(e,t,r)=>{for(;t!==r;)t.upcast||j(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function re(e,t){if(null===t)return this.isReference&&j(`null is not a valid ${this.name}`),0;t.$$||j(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return te(t.$$.ptr,r,this.registeredClass)}function ne(e,t){var r;if(null===t)return this.isReference&&j(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t&&t.$$||j(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&j(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=te(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&j("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:j(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var a=t.clone();r=this.rawShare(r,me.toHandle((()=>a.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:j("Unsupporting sharing policy")}return r}function ae(e,t){if(null===t)return this.isReference&&j(`null is not a valid ${this.name}`),0;t.$$||j(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&j(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return te(t.$$.ptr,r,this.registeredClass)}function oe(e,t,r,n,a,o,s,i,u,l,c){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=i,this.rawConstructor=u,this.rawShare=l,this.rawDestructor=c,a||void 0!==t.baseClass?this.toWireType=ne:n?(this.toWireType=re,this.destructorFunction=null):(this.toWireType=ae,this.destructorFunction=null)}var se,ie=(e,t,r)=>{p.hasOwnProperty(e)||E("Replacing nonexistent public symbol"),void 0!==p[e].overloadTable&&void 0!==r?p[e].overloadTable[r]=t:(p[e]=t,p[e].argCount=r)},ue=(e,t)=>{var r,n,a=(e=U(e)).includes("j")?(r=e,n=t,(...e)=>((e,t,r=[])=>e.includes("j")?((e,t,r)=>(e=e.replace(/p/g,"i"),(0,dynCalls[e])(t,...r)))(e,t,r):m(t)(...r))(r,n,e)):m(t);return"function"!=typeof a&&j(`unknown function pointer with signature ${e}: ${t}`),a},le=e=>{var t=Ie(e),r=U(t);return Re(t),r},ce=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||S[t]||(W[t]?W[t].forEach(e):(r.push(t),n[t]=!0))})),new se(`${e}: `+r.map(le).join([", "]))},pe=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(i[t+4*n>>2]);return r};function he(e,t,r,n,a,o){var s=t.length;s<2&&j("argTypes array size mismatch! Must at least get return value and 'this' types!");var i=null!==t[1]&&null!==r,u=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].destructorFunction)return!0;return!1}(t),l="void"!==t[0].name,c=s-2,p=new Array(c),h=[],d=[];return K(e,(function(...r){var o;r.length!==c&&j(`function ${e} called with ${r.length} arguments, expected ${c}`),d.length=0,h.length=i?2:1,h[0]=a,i&&(o=t[1].toWireType(d,this),h[1]=o);for(var s=0;s<c;++s)p[s]=t[s+2].toWireType(d,r[s]),h.push(p[s]);return function(e){if(u)_(d);else for(var r=i?1:2;r<t.length;r++){var n=1===r?o:p[r-2];null!==t[r].destructorFunction&&t[r].destructorFunction(n)}if(l)return t[0].fromWireType(e)}(n(...h))}))}var de,fe=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},ve=[],ge=[],me={toValue:e=>(e||j("Cannot use deleted val. handle = "+e),ge[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=ve.pop()||ge.length;return ge[t]=e,ge[t+1]=1,t}}}},ye={name:"emscripten::val",fromWireType:e=>{var t=me.toValue(e);return(e=>{e>9&&0==--ge[e+1]&&(ge[e]=void 0,ve.push(e))})(e),t},toWireType:(e,t)=>me.toHandle(t),argPackAdvance:8,readValueFromPointer:A,destructorFunction:null},$e=e=>M(e,ye),we=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},be=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(u[e>>2])};case 8:return function(e){return this.fromWireType(l[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ce=(e,t,u)=>{switch(t){case 1:return u?e=>r[e]:e=>o[e];case 2:return u?e=>n[e>>1]:e=>s[e>>1];case 4:return u?e=>a[e>>2]:e=>i[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Te="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Pe=(e,t)=>{for(var r=e,a=r>>1,i=a+t/2;!(a>=i)&&s[a];)++a;if((r=a<<1)-e>32&&Te)return Te.decode(o.subarray(e,r));for(var u="",l=0;!(l>=t/2);++l){var c=n[e+2*l>>1];if(0==c)break;u+=String.fromCharCode(c)}return u},_e=(e,t,r)=>{if(r??=2147483647,r<2)return 0;for(var a=t,o=(r-=2)<2*e.length?r/2:e.length,s=0;s<o;++s){var i=e.charCodeAt(s);n[t>>1]=i,t+=2}return n[t>>1]=0,t-a},Ae=e=>2*e.length,De=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var o=a[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var s=o-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(o)}return n},Fe=(e,t,r)=>{if(r??=2147483647,r<4)return 0;for(var n=t,o=n+r-4,s=0;s<e.length;++s){var i=e.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++s)),a[t>>2]=i,(t+=4)+4>o)break}return a[t>>2]=0,t-n},Oe=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},ke=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Se=[0,31,60,91,121,152,182,213,244,274,305,335],We=[0,31,59,90,120,151,181,212,243,273,304,334],Ee={};de=()=>performance.now();var xe,Ue,je,Me,Re,Ie,Le,Ve,ze=e=>{var t=(e-c.buffer.byteLength+65535)/65536;try{return c.grow(t),v(),1}catch(e){}},Ne={},He=()=>{if(!He.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:"./this.program"};for(var t in Ne)void 0===Ne[t]?delete e[t]:e[t]=Ne[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);He.strings=r}return He.strings},Ye=e=>{throw`exit(${e})`},Be=Ye,qe=[null,[],[]],Ge=(e,t)=>{var r=qe[e];0===t||10===t?((1===e?d:f)(b(r,0)),r.length=0):r.push(t)};D=p.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);F=e})(),O=p.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(J.prototype,{isAliasOf(e){if(!(this instanceof J))return!1;if(!(e instanceof J))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,a=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return t===n&&r===a},clone(){if(this.$$.ptr||I(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Z(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||I(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j("Object already scheduled for deletion"),V(this),z(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||I(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j("Object already scheduled for deletion"),Y.push(this),1===Y.length&&R&&R(B),this.$$.deleteScheduled=!0,this}}),p.getInheritedInstanceCount=()=>Object.keys(q).length,p.getLiveInheritedInstances=()=>{var e=[];for(var t in q)q.hasOwnProperty(t)&&e.push(q[t]);return e},p.flushPendingDeletes=B,p.setDelayFunction=e=>{R=e,Y.length&&R&&R(B)},Object.assign(oe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},argPackAdvance:8,readValueFromPointer:A,fromWireType:function(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=((e,t)=>(t=((e,t)=>{for(void 0===t&&j("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),q[t]))(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?G(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):G(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,s=this.registeredClass.getActualType(t),i=H[s];if(!i)return a.call(this);o=this.isConst?i.constPointerType:i.pointerType;var u=N(t,this.registeredClass,o.registeredClass);return null===u?a.call(this):this.isSmartPointer?G(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):G(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}}),se=p.UnboundTypeError=(xe=Error,(Ue=K("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(xe.prototype),Ue.prototype.constructor=Ue,Ue.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},Ue),ge.push(0,1,void 0,1,null,1,!0,1,!1,1),p.count_emval_handles=()=>ge.length/2-5-ve.length;var Ze={a:{E:(e,t)=>m(e)(t),g:(e,t,r)=>{throw new y(e).init(t,r),e},R:e=>{},S:(e,t,r,n)=>{},O:(e,t)=>{},J:(e,t)=>{},C:(e,t,r)=>{},K:(e,t)=>{},L:(e,t,r,n)=>{},G:function(e,t,r,n){T.varargs=n},A:(e,t,r,n)=>{},N:(e,t)=>{},x:(e,t,r)=>{},z:(e,t,r)=>{},T:()=>{!function(){throw""}()},$:e=>{var t=P[e];delete P[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map((e=>e.getterReturnType)).concat(a.map((e=>e.setterArgumentType)));x([e],o,(e=>{var o={};return a.forEach(((t,r)=>{var n=t.fieldName,s=e[r],i=t.getter,u=t.getterContext,l=e[r+a.length],c=t.setter,p=t.setterContext;o[n]={read:e=>s.fromWireType(i(u,e)),write:(e,t)=>{var r=[];c(p,e,l.toWireType(r,t)),_(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var a in o)if(!(a in t))throw new TypeError(`Missing field: "${a}"`);var s=r();for(a in o)o[a].write(s,t[a]);return null!==e&&e.push(n,s),s},argPackAdvance:8,readValueFromPointer:A,destructorFunction:n}]}))},t:(e,t,r,n,a)=>{},Z:(e,t,r,n)=>{M(e,{name:t=U(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(o[e])},destructorFunction:null})},B:(e,t,r,n,a,o,s,i,u,l,c,p,h)=>{c=U(c),o=ue(a,o),i&&=ue(s,i),l&&=ue(u,l),h=ue(p,h);var d=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(c);X(d,(function(){ce(`Cannot construct ${c} due to unbound types`,[n])})),x([e,t,r],n?[n]:[],(t=>{var r,a;t=t[0],a=n?(r=t.registeredClass).instancePrototype:J.prototype;var s=K(c,(function(...e){if(Object.getPrototypeOf(this)!==u)throw new O("Use 'new' to construct "+c);if(void 0===p.constructor_body)throw new O(c+" has no accessible constructor");var t=p.constructor_body[e.length];if(void 0===t)throw new O(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)})),u=Object.create(a,{constructor:{value:s}});s.prototype=u;var p=new ee(c,s,u,h,r,o,i,l);p.baseClass&&(p.baseClass.__derivedClasses??=[],p.baseClass.__derivedClasses.push(p));var f=new oe(c,p,!0,!1,!1),v=new oe(c+"*",p,!1,!1,!1),g=new oe(c+" const*",p,!1,!0,!1);return H[e]={pointerType:v,constPointerType:g},ie(d,s),[f,v,g]}))},q:(e,t,r,n,a,o)=>{var s=pe(t,r);a=ue(n,a),x([],[e],(e=>{var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new O(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{ce(`Cannot construct ${e.name} due to unbound types`,s)},x([],s,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=he(r,n,null,a,o),[]))),[]}))},d:(e,t,r,n,a,o,s,i,u)=>{var l=pe(r,n);t=U(t),t=fe(t),o=ue(a,o),x([],[e],(e=>{var n=`${(e=e[0]).name}.${t}`;function a(){ce(`Cannot call ${n} due to unbound types`,l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),i&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,c=u[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===r-2?(a.argCount=r-2,a.className=e.name,u[t]=a):(Q(u,t,n),u[t].overloadTable[r-2]=a),x([],l,(a=>{var i=he(n,a,e,o,s);return void 0===u[t].overloadTable?(i.argCount=r-2,u[t]=i):u[t].overloadTable[r-2]=i,[]})),[]}))},Y:$e,k:(e,t,r)=>{M(e,{name:t=U(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:be(t,r),destructorFunction:null})},e:(e,t,r,n,a,o,s)=>{var i=pe(t,r);e=U(e),e=fe(e),a=ue(n,a),X(e,(function(){ce(`Cannot call ${e} due to unbound types`,i)}),t-1),x([],i,(r=>{var n=[r[0],null].concat(r.slice(1));return ie(e,he(e,n,null,a,o),t-1),[]}))},c:(e,t,r,n,a)=>{t=U(t),-1===a&&(a=4294967295);var o=e=>e;if(0===n){var s=32-8*r;o=e=>e<<s>>>s}var i=t.includes("unsigned");M(e,{name:t,fromWireType:o,toWireType:i?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Ce(t,r,0!==n),destructorFunction:null})},b:(e,t,n)=>{var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=i[e>>2],n=i[e+4>>2];return new a(r.buffer,n,t)}M(e,{name:n=U(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},M:(e,t)=>{$e(e)},j:(e,t)=>{var r="std::string"===(t=U(t));M(e,{name:t,fromWireType(e){var t,n=i[e>>2],a=e+4;if(r)for(var s=a,u=0;u<=n;++u){var l=a+u;if(u==n||0==o[l]){var c=C(s,l-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=l+1}}else{var p=new Array(n);for(u=0;u<n;++u)p[u]=String.fromCharCode(o[a+u]);t=p.join("")}return Re(e),t},toWireType(e,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var a="string"==typeof t;a||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||j("Cannot pass non-string to std::string"),n=r&&a?(e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t})(t):t.length;var s=Me(4+n+1),u=s+4;if(i[s>>2]=n,r&&a)$(t,u,n+1);else if(a)for(var l=0;l<n;++l){var c=t.charCodeAt(l);c>255&&(Re(u),j("String has UTF-16 code units that do not fit in 8 bits")),o[u+l]=c}else for(l=0;l<n;++l)o[u+l]=t[l];return null!==e&&e.push(Re,s),s},argPackAdvance:8,readValueFromPointer:A,destructorFunction(e){Re(e)}})},f:(e,t,r)=>{var n,a,o,u;r=U(r),2===t?(n=Pe,a=_e,u=Ae,o=e=>s[e>>1]):4===t&&(n=De,a=Fe,u=Oe,o=e=>i[e>>2]),M(e,{name:r,fromWireType:e=>{for(var r,a=i[e>>2],s=e+4,u=0;u<=a;++u){var l=e+4+u*t;if(u==a||0==o(l)){var c=n(s,l-s);void 0===r?r=c:(r+=String.fromCharCode(0),r+=c),s=l+t}}return Re(e),r},toWireType:(e,n)=>{"string"!=typeof n&&j(`Cannot pass non-string to C++ string type ${r}`);var o=u(n),s=Me(4+o+t);return i[s>>2]=o/t,a(n,s+4,o+t),null!==e&&e.push(Re,s),s},argPackAdvance:8,readValueFromPointer:A,destructorFunction(e){Re(e)}})},aa:(e,t,r,n,a,o)=>{P[e]={name:U(t),rawConstructor:ue(r,n),rawDestructor:ue(a,o),fields:[]}},h:(e,t,r,n,a,o,s,i,u,l)=>{P[e].fields.push({fieldName:U(t),getterReturnType:r,getter:ue(n,a),getterContext:o,setterArgumentType:s,setter:ue(i,u),setterContext:l})},_:(e,t)=>{M(e,{isVoid:!0,name:t=U(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Q:(e,t,r)=>o.copyWithin(e,t,t+r),F:()=>{},l:(e,t)=>{var r,n;void 0===(n=S[r=e])&&j(`_emval_take_value has unknown type ${le(r)}`);var a=(e=n).readValueFromPointer(t);return me.toHandle(a)},p:function(e,t,r){var n=ke(e,t),o=new Date(1e3*n);a[r>>2]=o.getUTCSeconds(),a[r+4>>2]=o.getUTCMinutes(),a[r+8>>2]=o.getUTCHours(),a[r+12>>2]=o.getUTCDate(),a[r+16>>2]=o.getUTCMonth(),a[r+20>>2]=o.getUTCFullYear()-1900,a[r+24>>2]=o.getUTCDay();var s=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),i=(o.getTime()-s)/864e5|0;a[r+28>>2]=i},r:function(e,t,r){var n=ke(e,t),o=new Date(1e3*n);a[r>>2]=o.getSeconds(),a[r+4>>2]=o.getMinutes(),a[r+8>>2]=o.getHours(),a[r+12>>2]=o.getDate(),a[r+16>>2]=o.getMonth(),a[r+20>>2]=o.getFullYear()-1900,a[r+24>>2]=o.getDay();var s=0|(e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?We:Se)[e.getMonth()]+e.getDate()-1})(o);a[r+28>>2]=s,a[r+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),c=0|(u!=l&&o.getTimezoneOffset()==Math.min(l,u));a[r+32>>2]=c},n:function(e,t,r,n,a,o,s,i){return ke(a,o),-52},o:function(e,t,r,n,a,o,s){ke(o,s)},y:(e,t)=>{if(Ee[e]&&(clearTimeout(Ee[e].id),delete Ee[e]),!t)return 0;var r=setTimeout((()=>{delete Ee[e],Le(e,de())}),t);return Ee[e]={id:r,timeout_ms:t},0},H:(e,t,r,n)=>{var o=(new Date).getFullYear(),s=new Date(o,0,1),u=new Date(o,6,1),l=s.getTimezoneOffset(),c=u.getTimezoneOffset(),p=Math.max(l,c);i[e>>2]=60*p,a[t>>2]=Number(l!=c);var h=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],d=h(s),f=h(u);c<l?($(d,r,17),$(f,n,17)):($(d,n,17),$(f,r,17))},P:()=>Date.now(),v:()=>2147483648,u:e=>{var t=o.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n,a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var i=Math.min(r,(n=Math.max(e,s))+(65536-n%65536)%65536);if(ze(i))return!0}return!1},U:(e,t)=>{var n=0;return He().forEach(((a,o)=>{var s=t+n;i[e+4*o>>2]=s,((e,t)=>{for(var n=0;n<e.length;++n)r[t++]=e.charCodeAt(n);r[t]=0})(a,s),n+=a.length+1})),0},V:(e,t)=>{var r=He();i[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),i[t>>2]=n,0},X:Be,i:e=>52,I:(e,t)=>{var o=0;return 0==e?o=2:1!=e&&2!=e||(o=64),r[t]=2,n[t+2>>1]=1,tempI64=[o>>>0,(tempDouble=o,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],a[t+8>>2]=tempI64[0],a[t+12>>2]=tempI64[1],tempI64=[0,(tempDouble=0,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],a[t+16>>2]=tempI64[0],a[t+20>>2]=tempI64[1],0},m:function(e,t,r,n,a,o){return ke(n,a),52},D:(e,t,r,n)=>52,s:function(e,t,r,n,a){return ke(t,r),70},w:(e,t,r,n)=>{for(var a=0,s=0;s<r;s++){var u=i[t>>2],l=i[t+4>>2];t+=8;for(var c=0;c<l;c++)Ge(e,o[u+c]);a+=l}return i[n>>2]=a,0},a:c,W:Ye}};return WebAssembly.instantiate(p.wasm,Ze).then((e=>{var r=(e.instance||e).exports;je=r.ca,Me=r.ea,Re=r.fa,Ie=r.ga,r.ha,r.ia,Le=r.ja,r.ka,r.la,r.ma,r.na,r.oa,Ve=r.pa,r.qa,r.ra,r.sa,r.ta,r.ua,r.va,r.wa,r.xa,g=r.da,function(e){e.ba()}(r),t(p),je()})),h};
1
+ let e;export default async function t(t){if(void 0!==e)return e;void 0===t&&(t=new URL("clang-format.wasm",import.meta.url)),("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),e=await async function(e){if("function"==typeof Response&&e instanceof Response){if("compileStreaming"in WebAssembly)try{return await WebAssembly.compileStreaming(e)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.compileStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}return e.arrayBuffer()}return e}(await t).then((e=>a({wasm:e}))),version=e.version,r=()=>{}}function r(){throw new Error("uninit")}export function version(){r()}export function set_fallback_style(t){r(),e.set_fallback_style(t)}function n(e){const{error:t,content:r}=e;if(t)throw Error(r);return r}export function format(t,a="<stdin>",o="LLVM"){return r(),n(e.format(t,a,o))}export function format_line_range(t,a,o="<stdin>",s="LLVM"){r();const i=new e.RangeList;for(const[e,t]of a){if(e<1)throw Error("start line should be at least 1");if(e>t)throw Error("start line should not exceed end line");i.push_back(e),i.push_back(t)}const u=e.format_line(t,o,s,i);return i.delete(),n(u)}export function format_byte_range(t,a,o="<stdin>",s="LLVM"){r();const i=new e.RangeList;if(1===a.length&&1===a[0].length)i.push_back(a[0][0]);else for(const[e,t]of a){if(e<0)throw Error("start offset should be at least 0");if(t<0)throw Error("length should be at least 0");i.push_back(e),i.push_back(t)}const u=e.format_byte(t,o,s,i);return i.delete(),n(u)}export{format_byte_range as formatByteRange,format_line_range as formatLineRange};var a=function(e={}){var t,r,n,a,o,s,i,u,l,c,p=e,h=new Promise(((e,r)=>{t=e})),d=e=>console.log(e),f=e=>console.error(e);function v(){var e=c.buffer;r=new Int8Array(e),n=new Int16Array(e),o=new Uint8Array(e),s=new Uint16Array(e),a=new Int32Array(e),i=new Uint32Array(e),u=new Float32Array(e),l=new Float64Array(e)}c=new WebAssembly.Memory({initial:256,maximum:32768}),v(),p.noExitRuntime;var g,m=e=>g.get(e);class y{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){i[this.ptr+4>>2]=e}get_type(){return i[this.ptr+4>>2]}set_destructor(e){i[this.ptr+8>>2]=e}get_destructor(){return i[this.ptr+8>>2]}set_caught(e){e=e?1:0,r[this.ptr+12]=e}get_caught(){return 0!=r[this.ptr+12]}set_rethrown(e){e=e?1:0,r[this.ptr+13]=e}get_rethrown(){return 0!=r[this.ptr+13]}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){i[this.ptr+16>>2]=e}get_adjusted_ptr(){return i[this.ptr+16>>2]}get_exception_ptr(){if(Ve(this.get_type()))return i[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var $=(e,t,r)=>((e,t,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<e.length;++s){var i=e.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++s)),i<=127){if(r>=o)break;t[r++]=i}else if(i<=2047){if(r+1>=o)break;t[r++]=192|i>>6,t[r++]=128|63&i}else if(i<=65535){if(r+2>=o)break;t[r++]=224|i>>12,t[r++]=128|i>>6&63,t[r++]=128|63&i}else{if(r+3>=o)break;t[r++]=240|i>>18,t[r++]=128|i>>12&63,t[r++]=128|i>>6&63,t[r++]=128|63&i}}return t[r]=0,r-a})(e,o,t,r),w="undefined"!=typeof TextDecoder?new TextDecoder:void 0,b=(e,t,r)=>{for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&w)return w.decode(e.subarray(t,a));for(var o="";t<a;){var s=e[t++];if(128&s){var i=63&e[t++];if(192!=(224&s)){var u=63&e[t++];if((s=224==(240&s)?(15&s)<<12|i<<6|u:(7&s)<<18|i<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(s);else{var l=s-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|i)}else o+=String.fromCharCode(s)}return o},C=(e,t)=>e?b(o,e,t):"",T={varargs:void 0,getStr:e=>C(e)},P={},_=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function A(e){return this.fromWireType(i[e>>2])}var D,F,O,k={},S={},W={},E=e=>{throw new D(e)},x=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&E("Mismatched type converter count");for(var a=0;a<e.length;++a)M(e[a],n[a])}e.forEach((function(e){W[e]=t}));var a=new Array(t.length),o=[],s=0;t.forEach(((e,t)=>{S.hasOwnProperty(e)?a[t]=S[e]:(o.push(e),k.hasOwnProperty(e)||(k[e]=[]),k[e].push((()=>{a[t]=S[e],++s===o.length&&n(a)})))})),0===o.length&&n(a)},U=e=>{for(var t="",r=e;o[r];)t+=F[o[r++]];return t},j=e=>{throw new O(e)};function M(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||j(`type "${n}" must have a positive integer typeid pointer`),S.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;j(`Cannot register type '${n}' twice`)}if(S[e]=t,delete W[e],k.hasOwnProperty(e)){var a=k[e];delete k[e],a.forEach((e=>e()))}}(e,t,r)}var R,I=e=>{j(e.$$.ptrType.registeredClass.name+" instance already deleted")},L=!1,V=e=>{},z=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},N=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=N(e,t,r.baseClass);return null===n?null:r.downcast(n)},H={},Y=[],B=()=>{for(;Y.length;){var e=Y.pop();e.$$.deleteScheduled=!1,e.delete()}},q={},G=(e,t)=>(t.ptrType&&t.ptr||E("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&E("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Z(Object.create(e,{$$:{value:t,writable:!0}})));var Z=e=>"undefined"==typeof FinalizationRegistry?(Z=e=>e,e):(L=new FinalizationRegistry((e=>{z(e.$$)})),Z=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};L.register(e,r,e)}return e},V=e=>L.unregister(e),Z(e));function J(){}var K=(e,t)=>Object.defineProperty(t,"name",{value:e}),Q=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(...n){return e[t].overloadTable.hasOwnProperty(n.length)||j(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[n.length].apply(this,n)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},X=(e,t,r)=>{p.hasOwnProperty(e)?((void 0===r||void 0!==p[e].overloadTable&&void 0!==p[e].overloadTable[r])&&j(`Cannot register public name '${e}' twice`),Q(p,e,e),p.hasOwnProperty(r)&&j(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),p[e].overloadTable[r]=t):(p[e]=t,void 0!==r&&(p[e].numArguments=r))};function ee(e,t,r,n,a,o,s,i){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=i,this.pureVirtualFunctions=[]}var te=(e,t,r)=>{for(;t!==r;)t.upcast||j(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function re(e,t){if(null===t)return this.isReference&&j(`null is not a valid ${this.name}`),0;t.$$||j(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return te(t.$$.ptr,r,this.registeredClass)}function ne(e,t){var r;if(null===t)return this.isReference&&j(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t&&t.$$||j(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&j(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=te(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&j("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:j(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var a=t.clone();r=this.rawShare(r,me.toHandle((()=>a.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:j("Unsupporting sharing policy")}return r}function ae(e,t){if(null===t)return this.isReference&&j(`null is not a valid ${this.name}`),0;t.$$||j(`Cannot pass "${we(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&j(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return te(t.$$.ptr,r,this.registeredClass)}function oe(e,t,r,n,a,o,s,i,u,l,c){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=i,this.rawConstructor=u,this.rawShare=l,this.rawDestructor=c,a||void 0!==t.baseClass?this.toWireType=ne:n?(this.toWireType=re,this.destructorFunction=null):(this.toWireType=ae,this.destructorFunction=null)}var se,ie=(e,t,r)=>{p.hasOwnProperty(e)||E("Replacing nonexistent public symbol"),void 0!==p[e].overloadTable&&void 0!==r?p[e].overloadTable[r]=t:(p[e]=t,p[e].argCount=r)},ue=(e,t)=>{var r,n,a=(e=U(e)).includes("j")?(r=e,n=t,(...e)=>((e,t,r=[])=>e.includes("j")?((e,t,r)=>(e=e.replace(/p/g,"i"),(0,dynCalls[e])(t,...r)))(e,t,r):m(t)(...r))(r,n,e)):m(t);return"function"!=typeof a&&j(`unknown function pointer with signature ${e}: ${t}`),a},le=e=>{var t=Ie(e),r=U(t);return je(t),r},ce=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||S[t]||(W[t]?W[t].forEach(e):(r.push(t),n[t]=!0))})),new se(`${e}: `+r.map(le).join([", "]))},pe=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(i[t+4*n>>2]);return r};function he(e,t,r,n,a,o){var s=t.length;s<2&&j("argTypes array size mismatch! Must at least get return value and 'this' types!");var i=null!==t[1]&&null!==r,u=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].destructorFunction)return!0;return!1}(t),l="void"!==t[0].name,c=s-2,p=new Array(c),h=[],d=[];return K(e,(function(...r){var o;r.length!==c&&j(`function ${e} called with ${r.length} arguments, expected ${c}`),d.length=0,h.length=i?2:1,h[0]=a,i&&(o=t[1].toWireType(d,this),h[1]=o);for(var s=0;s<c;++s)p[s]=t[s+2].toWireType(d,r[s]),h.push(p[s]);return function(e){if(u)_(d);else for(var r=i?1:2;r<t.length;r++){var n=1===r?o:p[r-2];null!==t[r].destructorFunction&&t[r].destructorFunction(n)}if(l)return t[0].fromWireType(e)}(n(...h))}))}var de,fe=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},ve=[],ge=[],me={toValue:e=>(e||j("Cannot use deleted val. handle = "+e),ge[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=ve.pop()||ge.length;return ge[t]=e,ge[t+1]=1,t}}}},ye={name:"emscripten::val",fromWireType:e=>{var t=me.toValue(e);return(e=>{e>9&&0==--ge[e+1]&&(ge[e]=void 0,ve.push(e))})(e),t},toWireType:(e,t)=>me.toHandle(t),argPackAdvance:8,readValueFromPointer:A,destructorFunction:null},$e=e=>M(e,ye),we=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},be=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(u[e>>2])};case 8:return function(e){return this.fromWireType(l[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Ce=(e,t,u)=>{switch(t){case 1:return u?e=>r[e]:e=>o[e];case 2:return u?e=>n[e>>1]:e=>s[e>>1];case 4:return u?e=>a[e>>2]:e=>i[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Te="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Pe=(e,t)=>{for(var r=e,a=r>>1,i=a+t/2;!(a>=i)&&s[a];)++a;if((r=a<<1)-e>32&&Te)return Te.decode(o.subarray(e,r));for(var u="",l=0;!(l>=t/2);++l){var c=n[e+2*l>>1];if(0==c)break;u+=String.fromCharCode(c)}return u},_e=(e,t,r)=>{if(r??=2147483647,r<2)return 0;for(var a=t,o=(r-=2)<2*e.length?r/2:e.length,s=0;s<o;++s){var i=e.charCodeAt(s);n[t>>1]=i,t+=2}return n[t>>1]=0,t-a},Ae=e=>2*e.length,De=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var o=a[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var s=o-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(o)}return n},Fe=(e,t,r)=>{if(r??=2147483647,r<4)return 0;for(var n=t,o=n+r-4,s=0;s<e.length;++s){var i=e.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++s)),a[t>>2]=i,(t+=4)+4>o)break}return a[t>>2]=0,t-n},Oe=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},ke=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Se=[0,31,60,91,121,152,182,213,244,274,305,335],We=[0,31,59,90,120,151,181,212,243,273,304,334],Ee={};de=()=>performance.now();var xe,Ue,je,Me,Re,Ie,Le,Ve,ze=e=>{var t=(e-c.buffer.byteLength+65535)/65536;try{return c.grow(t),v(),1}catch(e){}},Ne={},He=()=>{if(!He.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:"./this.program"};for(var t in Ne)void 0===Ne[t]?delete e[t]:e[t]=Ne[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);He.strings=r}return He.strings},Ye=e=>{throw`exit(${e})`},Be=Ye,qe=[null,[],[]],Ge=(e,t)=>{var r=qe[e];0===t||10===t?((1===e?d:f)(b(r,0)),r.length=0):r.push(t)};D=p.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);F=e})(),O=p.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(J.prototype,{isAliasOf(e){if(!(this instanceof J))return!1;if(!(e instanceof J))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,a=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return t===n&&r===a},clone(){if(this.$$.ptr||I(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Z(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||I(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j("Object already scheduled for deletion"),V(this),z(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||I(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j("Object already scheduled for deletion"),Y.push(this),1===Y.length&&R&&R(B),this.$$.deleteScheduled=!0,this}}),p.getInheritedInstanceCount=()=>Object.keys(q).length,p.getLiveInheritedInstances=()=>{var e=[];for(var t in q)q.hasOwnProperty(t)&&e.push(q[t]);return e},p.flushPendingDeletes=B,p.setDelayFunction=e=>{R=e,Y.length&&R&&R(B)},Object.assign(oe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},argPackAdvance:8,readValueFromPointer:A,fromWireType:function(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=((e,t)=>(t=((e,t)=>{for(void 0===t&&j("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),q[t]))(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?G(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):G(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,s=this.registeredClass.getActualType(t),i=H[s];if(!i)return a.call(this);o=this.isConst?i.constPointerType:i.pointerType;var u=N(t,this.registeredClass,o.registeredClass);return null===u?a.call(this):this.isSmartPointer?G(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):G(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}}),se=p.UnboundTypeError=(xe=Error,(Ue=K("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(xe.prototype),Ue.prototype.constructor=Ue,Ue.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},Ue),ge.push(0,1,void 0,1,null,1,!0,1,!1,1),p.count_emval_handles=()=>ge.length/2-5-ve.length;var Ze={a:{F:(e,t)=>m(e)(t),k:(e,t,r)=>{throw new y(e).init(t,r),e},R:e=>{},S:(e,t,r,n)=>{},O:(e,t)=>{},K:(e,t)=>{},D:(e,t,r)=>{},L:(e,t)=>{},M:(e,t,r,n)=>{},H:function(e,t,r,n){T.varargs=n},B:(e,t,r,n)=>{},N:(e,t)=>{},y:(e,t,r)=>{},A:(e,t,r)=>{},T:()=>{!function(){throw""}()},W:e=>{var t=P[e];delete P[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map((e=>e.getterReturnType)).concat(a.map((e=>e.setterArgumentType)));x([e],o,(e=>{var o={};return a.forEach(((t,r)=>{var n=t.fieldName,s=e[r],i=t.getter,u=t.getterContext,l=e[r+a.length],c=t.setter,p=t.setterContext;o[n]={read:e=>s.fromWireType(i(u,e)),write:(e,t)=>{var r=[];c(p,e,l.toWireType(r,t)),_(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var a in o)if(!(a in t))throw new TypeError(`Missing field: "${a}"`);var s=r();for(a in o)o[a].write(s,t[a]);return null!==e&&e.push(n,s),s},argPackAdvance:8,readValueFromPointer:A,destructorFunction:n}]}))},u:(e,t,r,n,a)=>{},_:(e,t,r,n)=>{M(e,{name:t=U(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(o[e])},destructorFunction:null})},r:(e,t,r,n,a,o,s,i,u,l,c,p,h)=>{c=U(c),o=ue(a,o),i&&=ue(s,i),l&&=ue(u,l),h=ue(p,h);var d=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(c);X(d,(function(){ce(`Cannot construct ${c} due to unbound types`,[n])})),x([e,t,r],n?[n]:[],(t=>{var r,a;t=t[0],a=n?(r=t.registeredClass).instancePrototype:J.prototype;var s=K(c,(function(...e){if(Object.getPrototypeOf(this)!==u)throw new O("Use 'new' to construct "+c);if(void 0===p.constructor_body)throw new O(c+" has no accessible constructor");var t=p.constructor_body[e.length];if(void 0===t)throw new O(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)})),u=Object.create(a,{constructor:{value:s}});s.prototype=u;var p=new ee(c,s,u,h,r,o,i,l);p.baseClass&&(p.baseClass.__derivedClasses??=[],p.baseClass.__derivedClasses.push(p));var f=new oe(c,p,!0,!1,!1),v=new oe(c+"*",p,!1,!1,!1),g=new oe(c+" const*",p,!1,!0,!1);return H[e]={pointerType:v,constPointerType:g},ie(d,s),[f,v,g]}))},m:(e,t,r,n,a,o)=>{var s=pe(t,r);a=ue(n,a),x([],[e],(e=>{var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new O(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{ce(`Cannot construct ${e.name} due to unbound types`,s)},x([],s,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=he(r,n,null,a,o),[]))),[]}))},d:(e,t,r,n,a,o,s,i,u)=>{var l=pe(r,n);t=U(t),t=fe(t),o=ue(a,o),x([],[e],(e=>{var n=`${(e=e[0]).name}.${t}`;function a(){ce(`Cannot call ${n} due to unbound types`,l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),i&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,c=u[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===r-2?(a.argCount=r-2,a.className=e.name,u[t]=a):(Q(u,t,n),u[t].overloadTable[r-2]=a),x([],l,(a=>{var i=he(n,a,e,o,s);return void 0===u[t].overloadTable?(i.argCount=r-2,u[t]=i):u[t].overloadTable[r-2]=i,[]})),[]}))},Z:$e,j:(e,t,r)=>{M(e,{name:t=U(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:be(t,r),destructorFunction:null})},e:(e,t,r,n,a,o,s)=>{var i=pe(t,r);e=U(e),e=fe(e),a=ue(n,a),X(e,(function(){ce(`Cannot call ${e} due to unbound types`,i)}),t-1),x([],i,(r=>{var n=[r[0],null].concat(r.slice(1));return ie(e,he(e,n,null,a,o),t-1),[]}))},c:(e,t,r,n,a)=>{t=U(t),-1===a&&(a=4294967295);var o=e=>e;if(0===n){var s=32-8*r;o=e=>e<<s>>>s}var i=t.includes("unsigned");M(e,{name:t,fromWireType:o,toWireType:i?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Ce(t,r,0!==n),destructorFunction:null})},b:(e,t,n)=>{var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=i[e>>2],n=i[e+4>>2];return new a(r.buffer,n,t)}M(e,{name:n=U(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},C:(e,t)=>{$e(e)},i:(e,t)=>{var r="std::string"===(t=U(t));M(e,{name:t,fromWireType(e){var t,n=i[e>>2],a=e+4;if(r)for(var s=a,u=0;u<=n;++u){var l=a+u;if(u==n||0==o[l]){var c=C(s,l-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=l+1}}else{var p=new Array(n);for(u=0;u<n;++u)p[u]=String.fromCharCode(o[a+u]);t=p.join("")}return je(e),t},toWireType(e,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var a="string"==typeof t;a||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||j("Cannot pass non-string to std::string"),n=r&&a?(e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t})(t):t.length;var s=Re(4+n+1),u=s+4;if(i[s>>2]=n,r&&a)$(t,u,n+1);else if(a)for(var l=0;l<n;++l){var c=t.charCodeAt(l);c>255&&(je(u),j("String has UTF-16 code units that do not fit in 8 bits")),o[u+l]=c}else for(l=0;l<n;++l)o[u+l]=t[l];return null!==e&&e.push(je,s),s},argPackAdvance:8,readValueFromPointer:A,destructorFunction(e){je(e)}})},f:(e,t,r)=>{var n,a,o,u;r=U(r),2===t?(n=Pe,a=_e,u=Ae,o=e=>s[e>>1]):4===t&&(n=De,a=Fe,u=Oe,o=e=>i[e>>2]),M(e,{name:r,fromWireType:e=>{for(var r,a=i[e>>2],s=e+4,u=0;u<=a;++u){var l=e+4+u*t;if(u==a||0==o(l)){var c=n(s,l-s);void 0===r?r=c:(r+=String.fromCharCode(0),r+=c),s=l+t}}return je(e),r},toWireType:(e,n)=>{"string"!=typeof n&&j(`Cannot pass non-string to C++ string type ${r}`);var o=u(n),s=Re(4+o+t);return i[s>>2]=o/t,a(n,s+4,o+t),null!==e&&e.push(je,s),s},argPackAdvance:8,readValueFromPointer:A,destructorFunction(e){je(e)}})},aa:(e,t,r,n,a,o)=>{P[e]={name:U(t),rawConstructor:ue(r,n),rawDestructor:ue(a,o),fields:[]}},g:(e,t,r,n,a,o,s,i,u,l)=>{P[e].fields.push({fieldName:U(t),getterReturnType:r,getter:ue(n,a),getterContext:o,setterArgumentType:s,setter:ue(i,u),setterContext:l})},$:(e,t)=>{M(e,{isVoid:!0,name:t=U(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Q:(e,t,r)=>o.copyWithin(e,t,t+r),G:()=>{},l:(e,t)=>{var r,n;void 0===(n=S[r=e])&&j(`_emval_take_value has unknown type ${le(r)}`);var a=(e=n).readValueFromPointer(t);return me.toHandle(a)},q:function(e,t,r){var n=ke(e,t),o=new Date(1e3*n);a[r>>2]=o.getUTCSeconds(),a[r+4>>2]=o.getUTCMinutes(),a[r+8>>2]=o.getUTCHours(),a[r+12>>2]=o.getUTCDate(),a[r+16>>2]=o.getUTCMonth(),a[r+20>>2]=o.getUTCFullYear()-1900,a[r+24>>2]=o.getUTCDay();var s=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),i=(o.getTime()-s)/864e5|0;a[r+28>>2]=i},s:function(e,t,r){var n=ke(e,t),o=new Date(1e3*n);a[r>>2]=o.getSeconds(),a[r+4>>2]=o.getMinutes(),a[r+8>>2]=o.getHours(),a[r+12>>2]=o.getDate(),a[r+16>>2]=o.getMonth(),a[r+20>>2]=o.getFullYear()-1900,a[r+24>>2]=o.getDay();var s=0|(e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?We:Se)[e.getMonth()]+e.getDate()-1})(o);a[r+28>>2]=s,a[r+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),c=0|(u!=l&&o.getTimezoneOffset()==Math.min(l,u));a[r+32>>2]=c},o:function(e,t,r,n,a,o,s,i){return ke(a,o),-52},p:function(e,t,r,n,a,o,s){ke(o,s)},z:(e,t)=>{if(Ee[e]&&(clearTimeout(Ee[e].id),delete Ee[e]),!t)return 0;var r=setTimeout((()=>{delete Ee[e],Le(e,de())}),t);return Ee[e]={id:r,timeout_ms:t},0},I:(e,t,r,n)=>{var o=(new Date).getFullYear(),s=new Date(o,0,1),u=new Date(o,6,1),l=s.getTimezoneOffset(),c=u.getTimezoneOffset(),p=Math.max(l,c);i[e>>2]=60*p,a[t>>2]=Number(l!=c);var h=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],d=h(s),f=h(u);c<l?($(d,r,17),$(f,n,17)):($(d,n,17),$(f,r,17))},P:()=>Date.now(),w:()=>2147483648,v:e=>{var t=o.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n,a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var i=Math.min(r,(n=Math.max(e,s))+(65536-n%65536)%65536);if(ze(i))return!0}return!1},U:(e,t)=>{var n=0;return He().forEach(((a,o)=>{var s=t+n;i[e+4*o>>2]=s,((e,t)=>{for(var n=0;n<e.length;++n)r[t++]=e.charCodeAt(n);r[t]=0})(a,s),n+=a.length+1})),0},V:(e,t)=>{var r=He();i[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),i[t>>2]=n,0},Y:Be,h:e=>52,J:(e,t)=>{var o=0;return 0==e?o=2:1!=e&&2!=e||(o=64),r[t]=2,n[t+2>>1]=1,tempI64=[o>>>0,(tempDouble=o,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],a[t+8>>2]=tempI64[0],a[t+12>>2]=tempI64[1],tempI64=[0,(tempDouble=0,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],a[t+16>>2]=tempI64[0],a[t+20>>2]=tempI64[1],0},n:function(e,t,r,n,a,o){return ke(n,a),52},E:(e,t,r,n)=>52,t:function(e,t,r,n,a){return ke(t,r),70},x:(e,t,r,n)=>{for(var a=0,s=0;s<r;s++){var u=i[t>>2],l=i[t+4>>2];t+=8;for(var c=0;c<l;c++)Ge(e,o[u+c]);a+=l}return i[n>>2]=a,0},a:c,X:Ye}};return WebAssembly.instantiate(p.wasm,Ze).then((e=>{var r=(e.instance||e).exports;je=r.da,Me=r.ea,Re=r.fa,Ie=r.ga,r.ha,r.ia,Le=r.ja,r.ka,r.la,r.ma,r.na,r.oa,Ve=r.pa,r.qa,r.ra,r.sa,r.ta,r.ua,r.va,r.wa,r.xa,g=r.ca,function(e){e.ba()}(r),t(p),Me()})),h};
package/clang-format.wasm CHANGED
Binary file
package/git-clang-format CHANGED
@@ -499,12 +499,12 @@ def clang_format_to_blob(filename, line_ranges, revision=None,
499
499
  Returns the object ID (SHA-1) of the created blob."""
500
500
  clang_format_cmd = [binary]
501
501
  if style:
502
- clang_format_cmd.extend(['-style='+style])
502
+ clang_format_cmd.extend(['--style='+style])
503
503
  clang_format_cmd.extend([
504
- '-lines=%s:%s' % (start_line, start_line+line_count-1)
504
+ '--lines=%s:%s' % (start_line, start_line+line_count-1)
505
505
  for start_line, line_count in line_ranges])
506
506
  if revision is not None:
507
- clang_format_cmd.extend(['-assume-filename='+filename])
507
+ clang_format_cmd.extend(['--assume-filename='+filename])
508
508
  git_show_cmd = ['git', 'cat-file', 'blob', '%s:%s' % (revision, filename)]
509
509
  git_show = subprocess.Popen(git_show_cmd, env=env, stdin=subprocess.PIPE,
510
510
  stdout=subprocess.PIPE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wasm-fmt/clang-format",
3
3
  "author": "magic-akari <akari.ccino@gamil.com>",
4
- "version": "18.1.4",
4
+ "version": "18.1.6",
5
5
  "description": "A wasm based clang-format",
6
6
  "main": "clang-format.js",
7
7
  "types": "clang-format.d.ts",