var __awaiter=this&&this.__awaiter||function(e,r,t,n){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):i(e.value).then(o,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(r){return s([e,r])}}function s(o){if(n)throw new TypeError("Generator is already executing.");while(t)try{if(n=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;i=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]>8&255]};var j=function(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]};var D=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]};var N=function(e){return z(e,23,4)};var B=function(e){return z(e,52,8)};var q=function(e,r){g(e[_],r,{get:function(){return x(this)[r]}})};var H=function(e,r,t,n){var i=v(t);var a=x(e);if(i+r>a.byteLength)throw U(F);var o=x(a.buffer).bytes;var u=i+a.byteOffset;var s=o.slice(u,u+r);return n?s:s.reverse()};var W=function(e,r,t,n,i,a){var o=v(t);var u=x(e);if(o+r>u.byteLength)throw U(F);var s=x(u.buffer).bytes;var l=o+u.byteOffset;var f=n(+i);for(var c=0;c