define(["exports","./when-d186add7","./Check-2514d21d","./RuntimeError-4a74cd1a"],(function(e,t,n,r){"use strict";function o(e,r,d,i){if(!t.e(e))throw new n.t("uint8Array is required.");if(r<0)throw new n.t("byteOffset cannot be negative.");if(d<0)throw new n.t("byteLength cannot be negative.");if(r+d>e.byteLength)throw new n.t("sub-region exceeds array bounds.");return r=t.u(r,0),d=t.u(d,e.byteLength-r),i=t.u(i,"utf-8"),e=e.subarray(r,r+d),o.decode(e,i)}function d(e,t,n){return t<=e&&e<=n}o.decodeWithTextDecoder=function(e,t){return new TextDecoder(t).decode(e)},o.decodeWithFromCharCode=function(e){for(var t="",n=function(e){for(var t=0,n=0,o=0,i=128,c=191,u=[],f=e.length,a=0;a<f;++a){var h=e[a];if(0===o){if(d(h,0,127)){u.push(h);continue}if(d(h,194,223)){o=1,t=31&h;continue}if(d(h,224,239)){224===h&&(i=160),237===h&&(c=159),o=2,t=15&h;continue}if(d(h,240,244)){240===h&&(i=144),244===h&&(c=143),o=3,t=7&h;continue}throw new r.t("String decoding failed.")}d(h,i,c)?(i=128,c=191,t=t<<6|63&h,++n===o&&(u.push(t),t=o=n=0)):(t=o=n=0,i=128,c=191,--a)}return u}(e),o=n.length,i=0;i<o;++i){var c=n[i];c<=65535?t+=String.fromCharCode(c):(c-=65536,t+=String.fromCharCode(55296+(c>>10),56320+(1023&c)))}return t},"undefined"!=typeof TextDecoder?o.decode=o.decodeWithTextDecoder:o.decode=o.decodeWithFromCharCode,e.a=o}));
