var _={},p={};Object.defineProperty(p,"__esModule",{value:!0});p.loop=p.conditional=p.parse=void 0;var w=function o(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t;if(Array.isArray(e))e.forEach(function(s){return o(r,s,t,i)});else if(typeof e=="function")e(r,t,i,o);else{var a=Object.keys(e)[0];Array.isArray(e[a])?(i[a]={},o(r,e[a],t,i[a])):i[a]=e[a](r,t,i,o)}return t};p.parse=w;var C=function(r,e){return function(t,i,a,s){e(t,i,a)&&s(t,r,i,a)}};p.conditional=C;var j=function(r,e){return function(t,i,a,s){for(var f=[],c=t.pos;e(t,i,a);){var v={};if(s(t,r,i,v),t.pos===c)break;c=t.pos,f.push(v)}return f}};p.loop=j;var d={};Object.defineProperty(d,"__esModule",{value:!0});d.readBits=d.readArray=d.readUnsigned=d.readString=d.peekBytes=d.readBytes=d.peekByte=d.readByte=d.buildStream=void 0;var M=function(r){return{data:r,pos:0}};d.buildStream=M;var U=function(){return function(r){return r.data[r.pos++]}};d.readByte=U;var z=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(e){return e.data[e.pos+r]}};d.peekByte=z;var x=function(r){return function(e){return e.data.subarray(e.pos,e.pos+=r)}};d.readBytes=x;var I=function(r){return function(e){return e.data.subarray(e.pos,e.pos+r)}};d.peekBytes=I;var O=function(r){return function(e){return Array.from(x(r)(e)).map(function(t){return String.fromCharCode(t)}).join("")}};d.readString=O;var P=function(r){return function(e){var t=x(2)(e);return r?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};d.readUnsigned=P;var D=function(r,e){return function(t,i,a){for(var s=typeof e=="function"?e(t,i,a):e,f=x(r),c=new Array(s),v=0;v=b){var S=b-n.pos;l.push((0,e.readBytes)(S)(n)),h+=S;break}l.push((0,e.readBytes)(g)(n)),h+=g}for(var k=new Uint8Array(h),A=0,B=0;B