<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/**
 * @license bytebuffer.js (c) 2015 Daniel Wirtz &lt;dcode@dcode.io&gt;
 * Backing buffer: ArrayBuffer, Accessor: Uint8Array
 * Released under the Apache License, Version 2.0
 * see: https://github.com/dcodeIO/bytebuffer.js for details
 */
!function(t, e) {
    "function" == typeof define &amp;&amp; define.amd ? define([ "long" ], e) : "function" == typeof require &amp;&amp; "object" == typeof module &amp;&amp; module &amp;&amp; module.exports ? module.exports = function() {
        var t;
        try {
            t = require("long");
        } catch (t) {}
        return e(t);
    }() : (t.dcodeIO = t.dcodeIO || {}).ByteBuffer = e(t.dcodeIO.Long);
}(this, function(t) {
    "use strict";
    var ByteBuffer = function(t, e, i) {
        if (void 0 === t &amp;&amp; (t = ByteBuffer.DEFAULT_CAPACITY), void 0 === e &amp;&amp; (e = ByteBuffer.DEFAULT_ENDIAN), 
        void 0 === i &amp;&amp; (i = ByteBuffer.DEFAULT_NOASSERT), !i) {
            if ((t |= 0) &lt; 0) throw RangeError("Illegal capacity");
            e = !!e, i = !!i;
        }
        this.buffer = 0 === t ? r : new ArrayBuffer(t), this.view = 0 === t ? null : new Uint8Array(this.buffer), 
        this.offset = 0, this.markedOffset = -1, this.limit = t, this.littleEndian = e, 
        this.noAssert = i;
    };
    ByteBuffer.VERSION = "5.0.1", ByteBuffer.LITTLE_ENDIAN = !0, ByteBuffer.BIG_ENDIAN = !1, 
    ByteBuffer.DEFAULT_CAPACITY = 16, ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN, 
    ByteBuffer.DEFAULT_NOASSERT = !1, ByteBuffer.Long = t || null;
    var e = ByteBuffer.prototype;
    e.__isByteBuffer__, Object.defineProperty(e, "__isByteBuffer__", {
        value: !0,
        enumerable: !1,
        configurable: !1
    });
    var r = new ArrayBuffer(0), i = String.fromCharCode;
    function stringSource(t) {
        var e = 0;
        return function() {
            return e &lt; t.length ? t.charCodeAt(e++) : null;
        };
    }
    function stringDestination() {
        var t = [], e = [];
        return function() {
            if (0 === arguments.length) return e.join("") + i.apply(String, t);
            t.length + arguments.length &gt; 1024 &amp;&amp; (e.push(i.apply(String, t)), t.length = 0), 
            Array.prototype.push.apply(t, arguments);
        };
    }
    function ieee754_read(t, e, r, i, n) {
        var f, o, s = 8 * n - i - 1, h = (1 &lt;&lt; s) - 1, a = h &gt;&gt; 1, l = -7, u = r ? n - 1 : 0, g = r ? -1 : 1, w = t[e + u];
        for (u += g, f = w &amp; (1 &lt;&lt; -l) - 1, w &gt;&gt;= -l, l += s; l &gt; 0; f = 256 * f + t[e + u], 
        u += g, l -= 8) ;
        for (o = f &amp; (1 &lt;&lt; -l) - 1, f &gt;&gt;= -l, l += i; l &gt; 0; o = 256 * o + t[e + u], u += g, 
        l -= 8) ;
        if (0 === f) f = 1 - a; else {
            if (f === h) return o ? NaN : 1 / 0 * (w ? -1 : 1);
            o += Math.pow(2, i), f -= a;
        }
        return (w ? -1 : 1) * o * Math.pow(2, f - i);
    }
    function ieee754_write(t, e, r, i, n, f) {
        var o, s, h, a = 8 * f - n - 1, l = (1 &lt;&lt; a) - 1, u = l &gt;&gt; 1, g = 23 === n ? Math.pow(2, -24) - Math.pow(2, -77) : 0, w = i ? 0 : f - 1, b = i ? 1 : -1, v = e &lt; 0 || 0 === e &amp;&amp; 1 / e &lt; 0 ? 1 : 0;
        for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (s = isNaN(e) ? 1 : 0, o = l) : (o = Math.floor(Math.log(e) / Math.LN2), 
        e * (h = Math.pow(2, -o)) &lt; 1 &amp;&amp; (o--, h *= 2), (e += o + u &gt;= 1 ? g / h : g * Math.pow(2, 1 - u)) * h &gt;= 2 &amp;&amp; (o++, 
        h /= 2), o + u &gt;= l ? (s = 0, o = l) : o + u &gt;= 1 ? (s = (e * h - 1) * Math.pow(2, n), 
        o += u) : (s = e * Math.pow(2, u - 1) * Math.pow(2, n), o = 0)); n &gt;= 8; t[r + w] = 255 &amp; s, 
        w += b, s /= 256, n -= 8) ;
        for (o = o &lt;&lt; n | s, a += n; a &gt; 0; t[r + w] = 255 &amp; o, w += b, o /= 256, a -= 8) ;
        t[r + w - b] |= 128 * v;
    }
    ByteBuffer.accessor = function() {
        return Uint8Array;
    }, ByteBuffer.allocate = function(t, e, r) {
        return new ByteBuffer(t, e, r);
    }, ByteBuffer.concat = function(t, e, r, i) {
        "boolean" != typeof e &amp;&amp; "string" == typeof e || (i = r, r = e, e = void 0);
        for (var n, f = 0, o = 0, s = t.length; o &lt; s; ++o) ByteBuffer.isByteBuffer(t[o]) || (t[o] = ByteBuffer.wrap(t[o], e)), 
        (n = t[o].limit - t[o].offset) &gt; 0 &amp;&amp; (f += n);
        if (0 === f) return new ByteBuffer(0, r, i);
        var h, a = new ByteBuffer(f, r, i);
        for (o = 0; o &lt; s; ) (n = (h = t[o++]).limit - h.offset) &lt;= 0 || (a.view.set(h.view.subarray(h.offset, h.limit), a.offset), 
        a.offset += n);
        return a.limit = a.offset, a.offset = 0, a;
    }, ByteBuffer.isByteBuffer = function(t) {
        return !0 === (t &amp;&amp; t.__isByteBuffer__);
    }, ByteBuffer.type = function() {
        return ArrayBuffer;
    }, ByteBuffer.wrap = function(t, r, i, n) {
        if ("string" != typeof r &amp;&amp; (n = i, i = r, r = void 0), "string" == typeof t) switch (void 0 === r &amp;&amp; (r = "utf8"), 
        r) {
          case "base64":
            return ByteBuffer.fromBase64(t, i);

          case "hex":
            return ByteBuffer.fromHex(t, i);

          case "binary":
            return ByteBuffer.fromBinary(t, i);

          case "utf8":
            return ByteBuffer.fromUTF8(t, i);

          case "debug":
            return ByteBuffer.fromDebug(t, i);

          default:
            throw Error("Unsupported encoding: " + r);
        }
        if (null === t || "object" != typeof t) throw TypeError("Illegal buffer");
        var f;
        if (ByteBuffer.isByteBuffer(t)) return (f = e.clone.call(t)).markedOffset = -1, 
        f;
        if (t instanceof Uint8Array) f = new ByteBuffer(0, i, n), t.length &gt; 0 &amp;&amp; (f.buffer = t.buffer, 
        f.offset = t.byteOffset, f.limit = t.byteOffset + t.byteLength, f.view = new Uint8Array(t.buffer)); else if (t instanceof ArrayBuffer) f = new ByteBuffer(0, i, n), 
        t.byteLength &gt; 0 &amp;&amp; (f.buffer = t, f.offset = 0, f.limit = t.byteLength, f.view = t.byteLength &gt; 0 ? new Uint8Array(t) : null); else {
            if ("[object Array]" !== Object.prototype.toString.call(t)) throw TypeError("Illegal buffer");
            (f = new ByteBuffer(t.length, i, n)).limit = t.length;
            for (var o = 0; o &lt; t.length; ++o) f.view[o] = t[o];
        }
        return f;
    }, e.writeBitSet = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if (!(t instanceof Array)) throw TypeError("Illegal BitSet: Not an array");
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        var i, n = e, f = t.length, o = f &gt;&gt; 3, s = 0;
        for (e += this.writeVarint32(f, e); o--; ) i = 1 &amp; !!t[s++] | (1 &amp; !!t[s++]) &lt;&lt; 1 | (1 &amp; !!t[s++]) &lt;&lt; 2 | (1 &amp; !!t[s++]) &lt;&lt; 3 | (1 &amp; !!t[s++]) &lt;&lt; 4 | (1 &amp; !!t[s++]) &lt;&lt; 5 | (1 &amp; !!t[s++]) &lt;&lt; 6 | (1 &amp; !!t[s++]) &lt;&lt; 7, 
        this.writeByte(i, e++);
        if (s &lt; f) {
            var h = 0;
            for (i = 0; s &lt; f; ) i |= (1 &amp; !!t[s++]) &lt;&lt; h++;
            this.writeByte(i, e++);
        }
        return r ? (this.offset = e, this) : e - n;
    }, e.readBitSet = function(t) {
        var e = void 0 === t;
        e &amp;&amp; (t = this.offset);
        var r, i = this.readVarint32(t), n = i.value, f = n &gt;&gt; 3, o = 0, s = [];
        for (t += i.length; f--; ) r = this.readByte(t++), s[o++] = !!(1 &amp; r), s[o++] = !!(2 &amp; r), 
        s[o++] = !!(4 &amp; r), s[o++] = !!(8 &amp; r), s[o++] = !!(16 &amp; r), s[o++] = !!(32 &amp; r), 
        s[o++] = !!(64 &amp; r), s[o++] = !!(128 &amp; r);
        if (o &lt; n) {
            var h = 0;
            for (r = this.readByte(t++); o &lt; n; ) s[o++] = !!(r &gt;&gt; h++ &amp; 1);
        }
        return e &amp;&amp; (this.offset = t), s;
    }, e.readBytes = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + t &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+" + t + ") &lt;= " + this.buffer.byteLength);
        }
        var i = this.slice(e, e + t);
        return r &amp;&amp; (this.offset += t), i;
    }, e.writeBytes = e.append, e.writeInt8 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t |= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 1;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 1, this.view[e] = t, r &amp;&amp; (this.offset += 1), 
        this;
    }, e.writeByte = e.writeInt8, e.readInt8 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 1 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+1) &lt;= " + this.buffer.byteLength);
        }
        var r = this.view[t];
        return 128 == (128 &amp; r) &amp;&amp; (r = -(255 - r + 1)), e &amp;&amp; (this.offset += 1), r;
    }, e.readByte = e.readInt8, e.writeUint8 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 1;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 1, this.view[e] = t, r &amp;&amp; (this.offset += 1), 
        this;
    }, e.writeUInt8 = e.writeUint8, e.readUint8 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 1 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+1) &lt;= " + this.buffer.byteLength);
        }
        var r = this.view[t];
        return e &amp;&amp; (this.offset += 1), r;
    }, e.readUInt8 = e.readUint8, e.writeInt16 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t |= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 2;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 2, this.littleEndian ? (this.view[e + 1] = (65280 &amp; t) &gt;&gt;&gt; 8, 
        this.view[e] = 255 &amp; t) : (this.view[e] = (65280 &amp; t) &gt;&gt;&gt; 8, this.view[e + 1] = 255 &amp; t), 
        r &amp;&amp; (this.offset += 2), this;
    }, e.writeShort = e.writeInt16, e.readInt16 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 2 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+2) &lt;= " + this.buffer.byteLength);
        }
        var r = 0;
        return this.littleEndian ? (r = this.view[t], r |= this.view[t + 1] &lt;&lt; 8) : (r = this.view[t] &lt;&lt; 8, 
        r |= this.view[t + 1]), 32768 == (32768 &amp; r) &amp;&amp; (r = -(65535 - r + 1)), e &amp;&amp; (this.offset += 2), 
        r;
    }, e.readShort = e.readInt16, e.writeUint16 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 2;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 2, this.littleEndian ? (this.view[e + 1] = (65280 &amp; t) &gt;&gt;&gt; 8, 
        this.view[e] = 255 &amp; t) : (this.view[e] = (65280 &amp; t) &gt;&gt;&gt; 8, this.view[e + 1] = 255 &amp; t), 
        r &amp;&amp; (this.offset += 2), this;
    }, e.writeUInt16 = e.writeUint16, e.readUint16 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 2 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+2) &lt;= " + this.buffer.byteLength);
        }
        var r = 0;
        return this.littleEndian ? (r = this.view[t], r |= this.view[t + 1] &lt;&lt; 8) : (r = this.view[t] &lt;&lt; 8, 
        r |= this.view[t + 1]), e &amp;&amp; (this.offset += 2), r;
    }, e.readUInt16 = e.readUint16, e.writeInt32 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t |= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 4;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 4, this.littleEndian ? (this.view[e + 3] = t &gt;&gt;&gt; 24 &amp; 255, 
        this.view[e + 2] = t &gt;&gt;&gt; 16 &amp; 255, this.view[e + 1] = t &gt;&gt;&gt; 8 &amp; 255, this.view[e] = 255 &amp; t) : (this.view[e] = t &gt;&gt;&gt; 24 &amp; 255, 
        this.view[e + 1] = t &gt;&gt;&gt; 16 &amp; 255, this.view[e + 2] = t &gt;&gt;&gt; 8 &amp; 255, this.view[e + 3] = 255 &amp; t), 
        r &amp;&amp; (this.offset += 4), this;
    }, e.writeInt = e.writeInt32, e.readInt32 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 4 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+4) &lt;= " + this.buffer.byteLength);
        }
        var r = 0;
        return this.littleEndian ? (r = this.view[t + 2] &lt;&lt; 16, r |= this.view[t + 1] &lt;&lt; 8, 
        r |= this.view[t], r += this.view[t + 3] &lt;&lt; 24 &gt;&gt;&gt; 0) : (r = this.view[t + 1] &lt;&lt; 16, 
        r |= this.view[t + 2] &lt;&lt; 8, r |= this.view[t + 3], r += this.view[t] &lt;&lt; 24 &gt;&gt;&gt; 0), 
        r |= 0, e &amp;&amp; (this.offset += 4), r;
    }, e.readInt = e.readInt32, e.writeUint32 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 4;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 4, this.littleEndian ? (this.view[e + 3] = t &gt;&gt;&gt; 24 &amp; 255, 
        this.view[e + 2] = t &gt;&gt;&gt; 16 &amp; 255, this.view[e + 1] = t &gt;&gt;&gt; 8 &amp; 255, this.view[e] = 255 &amp; t) : (this.view[e] = t &gt;&gt;&gt; 24 &amp; 255, 
        this.view[e + 1] = t &gt;&gt;&gt; 16 &amp; 255, this.view[e + 2] = t &gt;&gt;&gt; 8 &amp; 255, this.view[e + 3] = 255 &amp; t), 
        r &amp;&amp; (this.offset += 4), this;
    }, e.writeUInt32 = e.writeUint32, e.readUint32 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 4 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+4) &lt;= " + this.buffer.byteLength);
        }
        var r = 0;
        return this.littleEndian ? (r = this.view[t + 2] &lt;&lt; 16, r |= this.view[t + 1] &lt;&lt; 8, 
        r |= this.view[t], r += this.view[t + 3] &lt;&lt; 24 &gt;&gt;&gt; 0) : (r = this.view[t + 1] &lt;&lt; 16, 
        r |= this.view[t + 2] &lt;&lt; 8, r |= this.view[t + 3], r += this.view[t] &lt;&lt; 24 &gt;&gt;&gt; 0), 
        e &amp;&amp; (this.offset += 4), r;
    }, e.readUInt32 = e.readUint32, t &amp;&amp; (e.writeInt64 = function(e, r) {
        var i = void 0 === r;
        if (i &amp;&amp; (r = this.offset), !this.noAssert) {
            if ("number" == typeof e) e = t.fromNumber(e); else if ("string" == typeof e) e = t.fromString(e); else if (!(e &amp;&amp; e instanceof t)) throw TypeError("Illegal value: " + e + " (not an integer or Long)");
            if ("number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
            if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+0) &lt;= " + this.buffer.byteLength);
        }
        "number" == typeof e ? e = t.fromNumber(e) : "string" == typeof e &amp;&amp; (e = t.fromString(e)), 
        r += 8;
        var n = this.buffer.byteLength;
        r &gt; n &amp;&amp; this.resize((n *= 2) &gt; r ? n : r), r -= 8;
        var f = e.low, o = e.high;
        return this.littleEndian ? (this.view[r + 3] = f &gt;&gt;&gt; 24 &amp; 255, this.view[r + 2] = f &gt;&gt;&gt; 16 &amp; 255, 
        this.view[r + 1] = f &gt;&gt;&gt; 8 &amp; 255, this.view[r] = 255 &amp; f, r += 4, this.view[r + 3] = o &gt;&gt;&gt; 24 &amp; 255, 
        this.view[r + 2] = o &gt;&gt;&gt; 16 &amp; 255, this.view[r + 1] = o &gt;&gt;&gt; 8 &amp; 255, this.view[r] = 255 &amp; o) : (this.view[r] = o &gt;&gt;&gt; 24 &amp; 255, 
        this.view[r + 1] = o &gt;&gt;&gt; 16 &amp; 255, this.view[r + 2] = o &gt;&gt;&gt; 8 &amp; 255, this.view[r + 3] = 255 &amp; o, 
        r += 4, this.view[r] = f &gt;&gt;&gt; 24 &amp; 255, this.view[r + 1] = f &gt;&gt;&gt; 16 &amp; 255, this.view[r + 2] = f &gt;&gt;&gt; 8 &amp; 255, 
        this.view[r + 3] = 255 &amp; f), i &amp;&amp; (this.offset += 8), this;
    }, e.writeLong = e.writeInt64, e.readInt64 = function(e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 8 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+8) &lt;= " + this.buffer.byteLength);
        }
        var i = 0, n = 0;
        this.littleEndian ? (i = this.view[e + 2] &lt;&lt; 16, i |= this.view[e + 1] &lt;&lt; 8, i |= this.view[e], 
        i += this.view[e + 3] &lt;&lt; 24 &gt;&gt;&gt; 0, e += 4, n = this.view[e + 2] &lt;&lt; 16, n |= this.view[e + 1] &lt;&lt; 8, 
        n |= this.view[e], n += this.view[e + 3] &lt;&lt; 24 &gt;&gt;&gt; 0) : (n = this.view[e + 1] &lt;&lt; 16, 
        n |= this.view[e + 2] &lt;&lt; 8, n |= this.view[e + 3], n += this.view[e] &lt;&lt; 24 &gt;&gt;&gt; 0, 
        e += 4, i = this.view[e + 1] &lt;&lt; 16, i |= this.view[e + 2] &lt;&lt; 8, i |= this.view[e + 3], 
        i += this.view[e] &lt;&lt; 24 &gt;&gt;&gt; 0);
        var f = new t(i, n, !1);
        return r &amp;&amp; (this.offset += 8), f;
    }, e.readLong = e.readInt64, e.writeUint64 = function(e, r) {
        var i = void 0 === r;
        if (i &amp;&amp; (r = this.offset), !this.noAssert) {
            if ("number" == typeof e) e = t.fromNumber(e); else if ("string" == typeof e) e = t.fromString(e); else if (!(e &amp;&amp; e instanceof t)) throw TypeError("Illegal value: " + e + " (not an integer or Long)");
            if ("number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
            if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+0) &lt;= " + this.buffer.byteLength);
        }
        "number" == typeof e ? e = t.fromNumber(e) : "string" == typeof e &amp;&amp; (e = t.fromString(e)), 
        r += 8;
        var n = this.buffer.byteLength;
        r &gt; n &amp;&amp; this.resize((n *= 2) &gt; r ? n : r), r -= 8;
        var f = e.low, o = e.high;
        return this.littleEndian ? (this.view[r + 3] = f &gt;&gt;&gt; 24 &amp; 255, this.view[r + 2] = f &gt;&gt;&gt; 16 &amp; 255, 
        this.view[r + 1] = f &gt;&gt;&gt; 8 &amp; 255, this.view[r] = 255 &amp; f, r += 4, this.view[r + 3] = o &gt;&gt;&gt; 24 &amp; 255, 
        this.view[r + 2] = o &gt;&gt;&gt; 16 &amp; 255, this.view[r + 1] = o &gt;&gt;&gt; 8 &amp; 255, this.view[r] = 255 &amp; o) : (this.view[r] = o &gt;&gt;&gt; 24 &amp; 255, 
        this.view[r + 1] = o &gt;&gt;&gt; 16 &amp; 255, this.view[r + 2] = o &gt;&gt;&gt; 8 &amp; 255, this.view[r + 3] = 255 &amp; o, 
        r += 4, this.view[r] = f &gt;&gt;&gt; 24 &amp; 255, this.view[r + 1] = f &gt;&gt;&gt; 16 &amp; 255, this.view[r + 2] = f &gt;&gt;&gt; 8 &amp; 255, 
        this.view[r + 3] = 255 &amp; f), i &amp;&amp; (this.offset += 8), this;
    }, e.writeUInt64 = e.writeUint64, e.readUint64 = function(e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 8 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+8) &lt;= " + this.buffer.byteLength);
        }
        var i = 0, n = 0;
        this.littleEndian ? (i = this.view[e + 2] &lt;&lt; 16, i |= this.view[e + 1] &lt;&lt; 8, i |= this.view[e], 
        i += this.view[e + 3] &lt;&lt; 24 &gt;&gt;&gt; 0, e += 4, n = this.view[e + 2] &lt;&lt; 16, n |= this.view[e + 1] &lt;&lt; 8, 
        n |= this.view[e], n += this.view[e + 3] &lt;&lt; 24 &gt;&gt;&gt; 0) : (n = this.view[e + 1] &lt;&lt; 16, 
        n |= this.view[e + 2] &lt;&lt; 8, n |= this.view[e + 3], n += this.view[e] &lt;&lt; 24 &gt;&gt;&gt; 0, 
        e += 4, i = this.view[e + 1] &lt;&lt; 16, i |= this.view[e + 2] &lt;&lt; 8, i |= this.view[e + 3], 
        i += this.view[e] &lt;&lt; 24 &gt;&gt;&gt; 0);
        var f = new t(i, n, !0);
        return r &amp;&amp; (this.offset += 8), f;
    }, e.readUInt64 = e.readUint64), e.writeFloat32 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t) throw TypeError("Illegal value: " + t + " (not a number)");
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 4;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 4, ieee754_write(this.view, t, e, this.littleEndian, 23, 4), 
        r &amp;&amp; (this.offset += 4), this;
    }, e.writeFloat = e.writeFloat32, e.readFloat32 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 4 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+4) &lt;= " + this.buffer.byteLength);
        }
        var r = ieee754_read(this.view, t, this.littleEndian, 23, 4);
        return e &amp;&amp; (this.offset += 4), r;
    }, e.readFloat = e.readFloat32, e.writeFloat64 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t) throw TypeError("Illegal value: " + t + " (not a number)");
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        e += 8;
        var i = this.buffer.byteLength;
        return e &gt; i &amp;&amp; this.resize((i *= 2) &gt; e ? i : e), e -= 8, ieee754_write(this.view, t, e, this.littleEndian, 52, 8), 
        r &amp;&amp; (this.offset += 8), this;
    }, e.writeDouble = e.writeFloat64, e.readFloat64 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 8 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+8) &lt;= " + this.buffer.byteLength);
        }
        var r = ieee754_read(this.view, t, this.littleEndian, 52, 8);
        return e &amp;&amp; (this.offset += 8), r;
    }, e.readDouble = e.readFloat64, ByteBuffer.MAX_VARINT32_BYTES = 5, ByteBuffer.calculateVarint32 = function(t) {
        return (t &gt;&gt;&gt;= 0) &lt; 128 ? 1 : t &lt; 16384 ? 2 : t &lt; 1 &lt;&lt; 21 ? 3 : t &lt; 1 &lt;&lt; 28 ? 4 : 5;
    }, ByteBuffer.zigZagEncode32 = function(t) {
        return ((t |= 0) &lt;&lt; 1 ^ t &gt;&gt; 31) &gt;&gt;&gt; 0;
    }, ByteBuffer.zigZagDecode32 = function(t) {
        return t &gt;&gt;&gt; 1 ^ -(1 &amp; t) | 0;
    }, e.writeVarint32 = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t |= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        var i, n = ByteBuffer.calculateVarint32(t);
        e += n;
        var f = this.buffer.byteLength;
        for (e &gt; f &amp;&amp; this.resize((f *= 2) &gt; e ? f : e), e -= n, t &gt;&gt;&gt;= 0; t &gt;= 128; ) i = 127 &amp; t | 128, 
        this.view[e++] = i, t &gt;&gt;&gt;= 7;
        return this.view[e++] = t, r ? (this.offset = e, this) : n;
    }, e.writeVarint32ZigZag = function(t, e) {
        return this.writeVarint32(ByteBuffer.zigZagEncode32(t), e);
    }, e.readVarint32 = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 1 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+1) &lt;= " + this.buffer.byteLength);
        }
        var r, i = 0, n = 0;
        do {
            if (!this.noAssert &amp;&amp; t &gt; this.limit) {
                var f = Error("Truncated");
                throw f.truncated = !0, f;
            }
            r = this.view[t++], i &lt; 5 &amp;&amp; (n |= (127 &amp; r) &lt;&lt; 7 * i), ++i;
        } while (0 != (128 &amp; r));
        return n |= 0, e ? (this.offset = t, n) : {
            value: n,
            length: i
        };
    }, e.readVarint32ZigZag = function(t) {
        var e = this.readVarint32(t);
        return "object" == typeof e ? e.value = ByteBuffer.zigZagDecode32(e.value) : e = ByteBuffer.zigZagDecode32(e), 
        e;
    }, t &amp;&amp; (ByteBuffer.MAX_VARINT64_BYTES = 10, ByteBuffer.calculateVarint64 = function(e) {
        "number" == typeof e ? e = t.fromNumber(e) : "string" == typeof e &amp;&amp; (e = t.fromString(e));
        var r = e.toInt() &gt;&gt;&gt; 0, i = e.shiftRightUnsigned(28).toInt() &gt;&gt;&gt; 0, n = e.shiftRightUnsigned(56).toInt() &gt;&gt;&gt; 0;
        return 0 == n ? 0 == i ? r &lt; 16384 ? r &lt; 128 ? 1 : 2 : r &lt; 1 &lt;&lt; 21 ? 3 : 4 : i &lt; 16384 ? i &lt; 128 ? 5 : 6 : i &lt; 1 &lt;&lt; 21 ? 7 : 8 : n &lt; 128 ? 9 : 10;
    }, ByteBuffer.zigZagEncode64 = function(e) {
        return "number" == typeof e ? e = t.fromNumber(e, !1) : "string" == typeof e ? e = t.fromString(e, !1) : !1 !== e.unsigned &amp;&amp; (e = e.toSigned()), 
        e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned();
    }, ByteBuffer.zigZagDecode64 = function(e) {
        return "number" == typeof e ? e = t.fromNumber(e, !1) : "string" == typeof e ? e = t.fromString(e, !1) : !1 !== e.unsigned &amp;&amp; (e = e.toSigned()), 
        e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned();
    }, e.writeVarint64 = function(e, r) {
        var i = void 0 === r;
        if (i &amp;&amp; (r = this.offset), !this.noAssert) {
            if ("number" == typeof e) e = t.fromNumber(e); else if ("string" == typeof e) e = t.fromString(e); else if (!(e &amp;&amp; e instanceof t)) throw TypeError("Illegal value: " + e + " (not an integer or Long)");
            if ("number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
            if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+0) &lt;= " + this.buffer.byteLength);
        }
        "number" == typeof e ? e = t.fromNumber(e, !1) : "string" == typeof e ? e = t.fromString(e, !1) : !1 !== e.unsigned &amp;&amp; (e = e.toSigned());
        var n = ByteBuffer.calculateVarint64(e), f = e.toInt() &gt;&gt;&gt; 0, o = e.shiftRightUnsigned(28).toInt() &gt;&gt;&gt; 0, s = e.shiftRightUnsigned(56).toInt() &gt;&gt;&gt; 0;
        r += n;
        var h = this.buffer.byteLength;
        switch (r &gt; h &amp;&amp; this.resize((h *= 2) &gt; r ? h : r), r -= n, n) {
          case 10:
            this.view[r + 9] = s &gt;&gt;&gt; 7 &amp; 1;

          case 9:
            this.view[r + 8] = 9 !== n ? 128 | s : 127 &amp; s;

          case 8:
            this.view[r + 7] = 8 !== n ? o &gt;&gt;&gt; 21 | 128 : o &gt;&gt;&gt; 21 &amp; 127;

          case 7:
            this.view[r + 6] = 7 !== n ? o &gt;&gt;&gt; 14 | 128 : o &gt;&gt;&gt; 14 &amp; 127;

          case 6:
            this.view[r + 5] = 6 !== n ? o &gt;&gt;&gt; 7 | 128 : o &gt;&gt;&gt; 7 &amp; 127;

          case 5:
            this.view[r + 4] = 5 !== n ? 128 | o : 127 &amp; o;

          case 4:
            this.view[r + 3] = 4 !== n ? f &gt;&gt;&gt; 21 | 128 : f &gt;&gt;&gt; 21 &amp; 127;

          case 3:
            this.view[r + 2] = 3 !== n ? f &gt;&gt;&gt; 14 | 128 : f &gt;&gt;&gt; 14 &amp; 127;

          case 2:
            this.view[r + 1] = 2 !== n ? f &gt;&gt;&gt; 7 | 128 : f &gt;&gt;&gt; 7 &amp; 127;

          case 1:
            this.view[r] = 1 !== n ? 128 | f : 127 &amp; f;
        }
        return i ? (this.offset += n, this) : n;
    }, e.writeVarint64ZigZag = function(t, e) {
        return this.writeVarint64(ByteBuffer.zigZagEncode64(t), e);
    }, e.readVarint64 = function(e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 1 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+1) &lt;= " + this.buffer.byteLength);
        }
        var i = e, n = 0, f = 0, o = 0, s = 0;
        if (n = 127 &amp; (s = this.view[e++]), 128 &amp; s &amp;&amp; (n |= (127 &amp; (s = this.view[e++])) &lt;&lt; 7, 
        (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (n |= (127 &amp; (s = this.view[e++])) &lt;&lt; 14, 
        (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (n |= (127 &amp; (s = this.view[e++])) &lt;&lt; 21, 
        (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (f = 127 &amp; (s = this.view[e++]), (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (f |= (127 &amp; (s = this.view[e++])) &lt;&lt; 7, 
        (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (f |= (127 &amp; (s = this.view[e++])) &lt;&lt; 14, 
        (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (f |= (127 &amp; (s = this.view[e++])) &lt;&lt; 21, 
        (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (o = 127 &amp; (s = this.view[e++]), (128 &amp; s || this.noAssert &amp;&amp; void 0 === s) &amp;&amp; (o |= (127 &amp; (s = this.view[e++])) &lt;&lt; 7, 
        128 &amp; s || this.noAssert &amp;&amp; void 0 === s)))))))))) throw Error("Buffer overrun");
        var h = t.fromBits(n | f &lt;&lt; 28, f &gt;&gt;&gt; 4 | o &lt;&lt; 24, !1);
        return r ? (this.offset = e, h) : {
            value: h,
            length: e - i
        };
    }, e.readVarint64ZigZag = function(e) {
        var r = this.readVarint64(e);
        return r &amp;&amp; r.value instanceof t ? r.value = ByteBuffer.zigZagDecode64(r.value) : r = ByteBuffer.zigZagDecode64(r), 
        r;
    }), e.writeCString = function(t, e) {
        var r = void 0 === e;
        r &amp;&amp; (e = this.offset);
        var i, n = t.length;
        if (!this.noAssert) {
            if ("string" != typeof t) throw TypeError("Illegal str: Not a string");
            for (i = 0; i &lt; n; ++i) if (0 === t.charCodeAt(i)) throw RangeError("Illegal str: Contains NULL-characters");
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        n = f.calculateUTF16asUTF8(stringSource(t))[1], e += n + 1;
        var o = this.buffer.byteLength;
        return e &gt; o &amp;&amp; this.resize((o *= 2) &gt; e ? o : e), e -= n + 1, f.encodeUTF16toUTF8(stringSource(t), function(t) {
            this.view[e++] = t;
        }.bind(this)), this.view[e++] = 0, r ? (this.offset = e, this) : n;
    }, e.readCString = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 1 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+1) &lt;= " + this.buffer.byteLength);
        }
        var r, i = t, n = -1;
        return f.decodeUTF8toUTF16(function() {
            if (0 === n) return null;
            if (t &gt;= this.limit) throw RangeError("Illegal range: Truncated data, " + t + " &lt; " + this.limit);
            return 0 === (n = this.view[t++]) ? null : n;
        }.bind(this), r = stringDestination(), !0), e ? (this.offset = t, r()) : {
            string: r(),
            length: t - i
        };
    }, e.writeIString = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("string" != typeof t) throw TypeError("Illegal str: Not a string");
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        var i, n = e;
        i = f.calculateUTF16asUTF8(stringSource(t), this.noAssert)[1], e += 4 + i;
        var o = this.buffer.byteLength;
        if (e &gt; o &amp;&amp; this.resize((o *= 2) &gt; e ? o : e), e -= 4 + i, this.littleEndian ? (this.view[e + 3] = i &gt;&gt;&gt; 24 &amp; 255, 
        this.view[e + 2] = i &gt;&gt;&gt; 16 &amp; 255, this.view[e + 1] = i &gt;&gt;&gt; 8 &amp; 255, this.view[e] = 255 &amp; i) : (this.view[e] = i &gt;&gt;&gt; 24 &amp; 255, 
        this.view[e + 1] = i &gt;&gt;&gt; 16 &amp; 255, this.view[e + 2] = i &gt;&gt;&gt; 8 &amp; 255, this.view[e + 3] = 255 &amp; i), 
        e += 4, f.encodeUTF16toUTF8(stringSource(t), function(t) {
            this.view[e++] = t;
        }.bind(this)), e !== n + 4 + i) throw RangeError("Illegal range: Truncated data, " + e + " == " + (e + 4 + i));
        return r ? (this.offset = e, this) : e - n;
    }, e.readIString = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 4 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+4) &lt;= " + this.buffer.byteLength);
        }
        var r = t, i = this.readUint32(t), n = this.readUTF8String(i, ByteBuffer.METRICS_BYTES, t += 4);
        return t += n.length, e ? (this.offset = t, n.string) : {
            string: n.string,
            length: t - r
        };
    }, ByteBuffer.METRICS_CHARS = "c", ByteBuffer.METRICS_BYTES = "b", e.writeUTF8String = function(t, e) {
        var r, i = void 0 === e;
        if (i &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        var n = e;
        r = f.calculateUTF16asUTF8(stringSource(t))[1], e += r;
        var o = this.buffer.byteLength;
        return e &gt; o &amp;&amp; this.resize((o *= 2) &gt; e ? o : e), e -= r, f.encodeUTF16toUTF8(stringSource(t), function(t) {
            this.view[e++] = t;
        }.bind(this)), i ? (this.offset = e, this) : e - n;
    }, e.writeString = e.writeUTF8String, ByteBuffer.calculateUTF8Chars = function(t) {
        return f.calculateUTF16asUTF8(stringSource(t))[0];
    }, ByteBuffer.calculateUTF8Bytes = function(t) {
        return f.calculateUTF16asUTF8(stringSource(t))[1];
    }, ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes, e.readUTF8String = function(t, e, r) {
        "number" == typeof e &amp;&amp; (r = e, e = void 0);
        var i = void 0 === r;
        if (i &amp;&amp; (r = this.offset), void 0 === e &amp;&amp; (e = ByteBuffer.METRICS_CHARS), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal length: " + t + " (not an integer)");
            if (t |= 0, "number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
            if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+0) &lt;= " + this.buffer.byteLength);
        }
        var n, o = 0, s = r;
        if (e === ByteBuffer.METRICS_CHARS) {
            if (n = stringDestination(), f.decodeUTF8(function() {
                return o &lt; t &amp;&amp; r &lt; this.limit ? this.view[r++] : null;
            }.bind(this), function(t) {
                ++o, f.UTF8toUTF16(t, n);
            }), o !== t) throw RangeError("Illegal range: Truncated data, " + o + " == " + t);
            return i ? (this.offset = r, n()) : {
                string: n(),
                length: r - s
            };
        }
        if (e === ByteBuffer.METRICS_BYTES) {
            if (!this.noAssert) {
                if ("number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
                if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + t &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+" + t + ") &lt;= " + this.buffer.byteLength);
            }
            var h = r + t;
            if (f.decodeUTF8toUTF16(function() {
                return r &lt; h ? this.view[r++] : null;
            }.bind(this), n = stringDestination(), this.noAssert), r !== h) throw RangeError("Illegal range: Truncated data, " + r + " == " + h);
            return i ? (this.offset = r, n()) : {
                string: n(),
                length: r - s
            };
        }
        throw TypeError("Unsupported metrics: " + e);
    }, e.readString = e.readUTF8String, e.writeVString = function(t, e) {
        var r = void 0 === e;
        if (r &amp;&amp; (e = this.offset), !this.noAssert) {
            if ("string" != typeof t) throw TypeError("Illegal str: Not a string");
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: " + e + " (not an integer)");
            if ((e &gt;&gt;&gt;= 0) &lt; 0 || e + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + e + " (+0) &lt;= " + this.buffer.byteLength);
        }
        var i, n, o = e;
        i = f.calculateUTF16asUTF8(stringSource(t), this.noAssert)[1], n = ByteBuffer.calculateVarint32(i), 
        e += n + i;
        var s = this.buffer.byteLength;
        if (e &gt; s &amp;&amp; this.resize((s *= 2) &gt; e ? s : e), e -= n + i, e += this.writeVarint32(i, e), 
        f.encodeUTF16toUTF8(stringSource(t), function(t) {
            this.view[e++] = t;
        }.bind(this)), e !== o + i + n) throw RangeError("Illegal range: Truncated data, " + e + " == " + (e + i + n));
        return r ? (this.offset = e, this) : e - o;
    }, e.readVString = function(t) {
        var e = void 0 === t;
        if (e &amp;&amp; (t = this.offset), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 1 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+1) &lt;= " + this.buffer.byteLength);
        }
        var r = t, i = this.readVarint32(t), n = this.readUTF8String(i.value, ByteBuffer.METRICS_BYTES, t += i.length);
        return t += n.length, e ? (this.offset = t, n.string) : {
            string: n.string,
            length: t - r
        };
    }, e.append = function(t, e, r) {
        "number" != typeof e &amp;&amp; "string" == typeof e || (r = e, e = void 0);
        var i = void 0 === r;
        if (i &amp;&amp; (r = this.offset), !this.noAssert) {
            if ("number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
            if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+0) &lt;= " + this.buffer.byteLength);
        }
        t instanceof ByteBuffer || (t = ByteBuffer.wrap(t, e));
        var n = t.limit - t.offset;
        if (n &lt;= 0) return this;
        r += n;
        var f = this.buffer.byteLength;
        return r &gt; f &amp;&amp; this.resize((f *= 2) &gt; r ? f : r), r -= n, this.view.set(t.view.subarray(t.offset, t.limit), r), 
        t.offset += n, i &amp;&amp; (this.offset += n), this;
    }, e.appendTo = function(t, e) {
        return t.append(this, e), this;
    }, e.assert = function(t) {
        return this.noAssert = !t, this;
    }, e.capacity = function() {
        return this.buffer.byteLength;
    }, e.clear = function() {
        return this.offset = 0, this.limit = this.buffer.byteLength, this.markedOffset = -1, 
        this;
    }, e.clone = function(t) {
        var e = new ByteBuffer(0, this.littleEndian, this.noAssert);
        return t ? (e.buffer = new ArrayBuffer(this.buffer.byteLength), e.view = new Uint8Array(e.buffer)) : (e.buffer = this.buffer, 
        e.view = this.view), e.offset = this.offset, e.markedOffset = this.markedOffset, 
        e.limit = this.limit, e;
    }, e.compact = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (e &gt;&gt;&gt;= 0, t &lt; 0 || t &gt; e || e &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + t + " &lt;= " + e + " &lt;= " + this.buffer.byteLength);
        }
        if (0 === t &amp;&amp; e === this.buffer.byteLength) return this;
        var i = e - t;
        if (0 === i) return this.buffer = r, this.view = null, this.markedOffset &gt;= 0 &amp;&amp; (this.markedOffset -= t), 
        this.offset = 0, this.limit = 0, this;
        var n = new ArrayBuffer(i), f = new Uint8Array(n);
        return f.set(this.view.subarray(t, e)), this.buffer = n, this.view = f, this.markedOffset &gt;= 0 &amp;&amp; (this.markedOffset -= t), 
        this.offset = 0, this.limit = i, this;
    }, e.copy = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (e &gt;&gt;&gt;= 0, t &lt; 0 || t &gt; e || e &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + t + " &lt;= " + e + " &lt;= " + this.buffer.byteLength);
        }
        if (t === e) return new ByteBuffer(0, this.littleEndian, this.noAssert);
        var r = e - t, i = new ByteBuffer(r, this.littleEndian, this.noAssert);
        return i.offset = 0, i.limit = r, i.markedOffset &gt;= 0 &amp;&amp; (i.markedOffset -= t), 
        this.copyTo(i, 0, t, e), i;
    }, e.copyTo = function(t, e, r, i) {
        var n, f;
        if (!this.noAssert &amp;&amp; !ByteBuffer.isByteBuffer(t)) throw TypeError("Illegal target: Not a ByteBuffer");
        if (e = (f = void 0 === e) ? t.offset : 0 | e, r = (n = void 0 === r) ? this.offset : 0 | r, 
        i = void 0 === i ? this.limit : 0 | i, e &lt; 0 || e &gt; t.buffer.byteLength) throw RangeError("Illegal target range: 0 &lt;= " + e + " &lt;= " + t.buffer.byteLength);
        if (r &lt; 0 || i &gt; this.buffer.byteLength) throw RangeError("Illegal source range: 0 &lt;= " + r + " &lt;= " + this.buffer.byteLength);
        var o = i - r;
        return 0 === o ? t : (t.ensureCapacity(e + o), t.view.set(this.view.subarray(r, i), e), 
        n &amp;&amp; (this.offset += o), f &amp;&amp; (t.offset += o), this);
    }, e.ensureCapacity = function(t) {
        var e = this.buffer.byteLength;
        return e &lt; t ? this.resize((e *= 2) &gt; t ? e : t) : this;
    }, e.fill = function(t, e, r) {
        var i = void 0 === e;
        if (i &amp;&amp; (e = this.offset), "string" == typeof t &amp;&amp; t.length &gt; 0 &amp;&amp; (t = t.charCodeAt(0)), 
        void 0 === e &amp;&amp; (e = this.offset), void 0 === r &amp;&amp; (r = this.limit), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal value: " + t + " (not an integer)");
            if (t |= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (e &gt;&gt;&gt;= 0, "number" != typeof r || r % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (r &gt;&gt;&gt;= 0, e &lt; 0 || e &gt; r || r &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + e + " &lt;= " + r + " &lt;= " + this.buffer.byteLength);
        }
        if (e &gt;= r) return this;
        for (;e &lt; r; ) this.view[e++] = t;
        return i &amp;&amp; (this.offset = e), this;
    }, e.flip = function() {
        return this.limit = this.offset, this.offset = 0, this;
    }, e.mark = function(t) {
        if (t = void 0 === t ? this.offset : t, !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal offset: " + t + " (not an integer)");
            if ((t &gt;&gt;&gt;= 0) &lt; 0 || t + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + t + " (+0) &lt;= " + this.buffer.byteLength);
        }
        return this.markedOffset = t, this;
    }, e.order = function(t) {
        if (!this.noAssert &amp;&amp; "boolean" != typeof t) throw TypeError("Illegal littleEndian: Not a boolean");
        return this.littleEndian = !!t, this;
    }, e.LE = function(t) {
        return this.littleEndian = void 0 === t || !!t, this;
    }, e.BE = function(t) {
        return this.littleEndian = void 0 !== t &amp;&amp; !t, this;
    }, e.prepend = function(t, e, r) {
        "number" != typeof e &amp;&amp; "string" == typeof e || (r = e, e = void 0);
        var i = void 0 === r;
        if (i &amp;&amp; (r = this.offset), !this.noAssert) {
            if ("number" != typeof r || r % 1 != 0) throw TypeError("Illegal offset: " + r + " (not an integer)");
            if ((r &gt;&gt;&gt;= 0) &lt; 0 || r + 0 &gt; this.buffer.byteLength) throw RangeError("Illegal offset: 0 &lt;= " + r + " (+0) &lt;= " + this.buffer.byteLength);
        }
        t instanceof ByteBuffer || (t = ByteBuffer.wrap(t, e));
        var n = t.limit - t.offset;
        if (n &lt;= 0) return this;
        var f = n - r;
        if (f &gt; 0) {
            var o = new ArrayBuffer(this.buffer.byteLength + f), s = new Uint8Array(o);
            s.set(this.view.subarray(r, this.buffer.byteLength), n), this.buffer = o, this.view = s, 
            this.offset += f, this.markedOffset &gt;= 0 &amp;&amp; (this.markedOffset += f), this.limit += f, 
            r += f;
        } else new Uint8Array(this.buffer);
        return this.view.set(t.view.subarray(t.offset, t.limit), r - n), t.offset = t.limit, 
        i &amp;&amp; (this.offset -= n), this;
    }, e.prependTo = function(t, e) {
        return t.prepend(this, e), this;
    }, e.printDebug = function(t) {
        "function" != typeof t &amp;&amp; (t = console.log.bind(console)), t(this.toString() + "\n-------------------------------------------------------------------\n" + this.toDebug(!0));
    }, e.remaining = function() {
        return this.limit - this.offset;
    }, e.reset = function() {
        return this.markedOffset &gt;= 0 ? (this.offset = this.markedOffset, this.markedOffset = -1) : this.offset = 0, 
        this;
    }, e.resize = function(t) {
        if (!this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal capacity: " + t + " (not an integer)");
            if ((t |= 0) &lt; 0) throw RangeError("Illegal capacity: 0 &lt;= " + t);
        }
        if (this.buffer.byteLength &lt; t) {
            var e = new ArrayBuffer(t), r = new Uint8Array(e);
            r.set(this.view), this.buffer = e, this.view = r;
        }
        return this;
    }, e.reverse = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (e &gt;&gt;&gt;= 0, t &lt; 0 || t &gt; e || e &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + t + " &lt;= " + e + " &lt;= " + this.buffer.byteLength);
        }
        return t === e || Array.prototype.reverse.call(this.view.subarray(t, e)), this;
    }, e.skip = function(t) {
        if (!this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal length: " + t + " (not an integer)");
            t |= 0;
        }
        var e = this.offset + t;
        if (!this.noAssert &amp;&amp; (e &lt; 0 || e &gt; this.buffer.byteLength)) throw RangeError("Illegal length: 0 &lt;= " + this.offset + " + " + t + " &lt;= " + this.buffer.byteLength);
        return this.offset = e, this;
    }, e.slice = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (e &gt;&gt;&gt;= 0, t &lt; 0 || t &gt; e || e &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + t + " &lt;= " + e + " &lt;= " + this.buffer.byteLength);
        }
        var r = this.clone();
        return r.offset = t, r.limit = e, r;
    }, e.toBuffer = function(t) {
        var e = this.offset, i = this.limit;
        if (!this.noAssert) {
            if ("number" != typeof e || e % 1 != 0) throw TypeError("Illegal offset: Not an integer");
            if (e &gt;&gt;&gt;= 0, "number" != typeof i || i % 1 != 0) throw TypeError("Illegal limit: Not an integer");
            if (i &gt;&gt;&gt;= 0, e &lt; 0 || e &gt; i || i &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + e + " &lt;= " + i + " &lt;= " + this.buffer.byteLength);
        }
        if (!t &amp;&amp; 0 === e &amp;&amp; i === this.buffer.byteLength) return this.buffer;
        if (e === i) return r;
        var n = new ArrayBuffer(i - e);
        return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e, i), 0), n;
    }, e.toArrayBuffer = e.toBuffer, e.toString = function(t, e, r) {
        if (void 0 === t) return "ByteBufferAB(offset=" + this.offset + ",markedOffset=" + this.markedOffset + ",limit=" + this.limit + ",capacity=" + this.capacity() + ")";
        switch ("number" == typeof t &amp;&amp; (r = e = t = "utf8"), t) {
          case "utf8":
            return this.toUTF8(e, r);

          case "base64":
            return this.toBase64(e, r);

          case "hex":
            return this.toHex(e, r);

          case "binary":
            return this.toBinary(e, r);

          case "debug":
            return this.toDebug();

          case "columns":
            return this.toColumns();

          default:
            throw Error("Unsupported encoding: " + t);
        }
    };
    var n = function() {
        for (var t = {}, e = [ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 ], r = [], i = 0, n = e.length; i &lt; n; ++i) r[e[i]] = i;
        return t.encode = function(t, r) {
            for (var i, n; null !== (i = t()); ) r(e[i &gt;&gt; 2 &amp; 63]), n = (3 &amp; i) &lt;&lt; 4, null !== (i = t()) ? (r(e[63 &amp; ((n |= i &gt;&gt; 4 &amp; 15) | i &gt;&gt; 4 &amp; 15)]), 
            n = (15 &amp; i) &lt;&lt; 2, null !== (i = t()) ? (r(e[63 &amp; (n | i &gt;&gt; 6 &amp; 3)]), r(e[63 &amp; i])) : (r(e[63 &amp; n]), 
            r(61))) : (r(e[63 &amp; n]), r(61), r(61));
        }, t.decode = function(t, e) {
            var i, n, f;
            function fail(t) {
                throw Error("Illegal character code: " + t);
            }
            for (;null !== (i = t()); ) if (void 0 === (n = r[i]) &amp;&amp; fail(i), null !== (i = t()) &amp;&amp; (void 0 === (f = r[i]) &amp;&amp; fail(i), 
            e(n &lt;&lt; 2 &gt;&gt;&gt; 0 | (48 &amp; f) &gt;&gt; 4), null !== (i = t()))) {
                if (void 0 === (n = r[i])) {
                    if (61 === i) break;
                    fail(i);
                }
                if (e((15 &amp; f) &lt;&lt; 4 &gt;&gt;&gt; 0 | (60 &amp; n) &gt;&gt; 2), null !== (i = t())) {
                    if (void 0 === (f = r[i])) {
                        if (61 === i) break;
                        fail(i);
                    }
                    e((3 &amp; n) &lt;&lt; 6 &gt;&gt;&gt; 0 | f);
                }
            }
        }, t.test = function(t) {
            return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
        }, t;
    }();
    e.toBase64 = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), e |= 0, 
        (t |= 0) &lt; 0 || e &gt; this.capacity || t &gt; e) throw RangeError("begin, end");
        var r;
        return n.encode(function() {
            return t &lt; e ? this.view[t++] : null;
        }.bind(this), r = stringDestination()), r();
    }, ByteBuffer.fromBase64 = function(t, e) {
        if ("string" != typeof t) throw TypeError("str");
        var r = new ByteBuffer(t.length / 4 * 3, e), i = 0;
        return n.decode(stringSource(t), function(t) {
            r.view[i++] = t;
        }), r.limit = i, r;
    }, ByteBuffer.btoa = function(t) {
        return ByteBuffer.fromBinary(t).toBase64();
    }, ByteBuffer.atob = function(t) {
        return ByteBuffer.fromBase64(t).toBinary();
    }, e.toBinary = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), e |= 0, 
        (t |= 0) &lt; 0 || e &gt; this.capacity() || t &gt; e) throw RangeError("begin, end");
        if (t === e) return "";
        for (var r = [], i = []; t &lt; e; ) r.push(this.view[t++]), r.length &gt;= 1024 &amp;&amp; (i.push(String.fromCharCode.apply(String, r)), 
        r = []);
        return i.join("") + String.fromCharCode.apply(String, r);
    }, ByteBuffer.fromBinary = function(t, e) {
        if ("string" != typeof t) throw TypeError("str");
        for (var r, i = 0, n = t.length, f = new ByteBuffer(n, e); i &lt; n; ) {
            if ((r = t.charCodeAt(i)) &gt; 255) throw RangeError("illegal char code: " + r);
            f.view[i++] = r;
        }
        return f.limit = n, f;
    }, e.toDebug = function(t) {
        for (var e, r = -1, i = this.buffer.byteLength, n = "", f = "", o = ""; r &lt; i; ) {
            if (-1 !== r &amp;&amp; (n += (e = this.view[r]) &lt; 16 ? "0" + e.toString(16).toUpperCase() : e.toString(16).toUpperCase(), 
            t &amp;&amp; (f += e &gt; 32 &amp;&amp; e &lt; 127 ? String.fromCharCode(e) : ".")), ++r, t &amp;&amp; r &gt; 0 &amp;&amp; r % 16 == 0 &amp;&amp; r !== i) {
                for (;n.length &lt; 51; ) n += " ";
                o += n + f + "\n", n = f = "";
            }
            r === this.offset &amp;&amp; r === this.limit ? n += r === this.markedOffset ? "!" : "|" : r === this.offset ? n += r === this.markedOffset ? "[" : "&lt;" : r === this.limit ? n += r === this.markedOffset ? "]" : "&gt;" : n += r === this.markedOffset ? "'" : t || 0 !== r &amp;&amp; r !== i ? " " : "";
        }
        if (t &amp;&amp; " " !== n) {
            for (;n.length &lt; 51; ) n += " ";
            o += n + f + "\n";
        }
        return t ? o : n;
    }, ByteBuffer.fromDebug = function(t, e, r) {
        for (var i, n, f = t.length, o = new ByteBuffer((f + 1) / 3 | 0, e, r), s = 0, h = 0, a = !1, l = !1, u = !1, g = !1, w = !1; s &lt; f; ) {
            switch (i = t.charAt(s++)) {
              case "!":
                if (!r) {
                    if (l || u || g) {
                        w = !0;
                        break;
                    }
                    l = u = g = !0;
                }
                o.offset = o.markedOffset = o.limit = h, a = !1;
                break;

              case "|":
                if (!r) {
                    if (l || g) {
                        w = !0;
                        break;
                    }
                    l = g = !0;
                }
                o.offset = o.limit = h, a = !1;
                break;

              case "[":
                if (!r) {
                    if (l || u) {
                        w = !0;
                        break;
                    }
                    l = u = !0;
                }
                o.offset = o.markedOffset = h, a = !1;
                break;

              case "&lt;":
                if (!r) {
                    if (l) {
                        w = !0;
                        break;
                    }
                    l = !0;
                }
                o.offset = h, a = !1;
                break;

              case "]":
                if (!r) {
                    if (g || u) {
                        w = !0;
                        break;
                    }
                    g = u = !0;
                }
                o.limit = o.markedOffset = h, a = !1;
                break;

              case "&gt;":
                if (!r) {
                    if (g) {
                        w = !0;
                        break;
                    }
                    g = !0;
                }
                o.limit = h, a = !1;
                break;

              case "'":
                if (!r) {
                    if (u) {
                        w = !0;
                        break;
                    }
                    u = !0;
                }
                o.markedOffset = h, a = !1;
                break;

              case " ":
                a = !1;
                break;

              default:
                if (!r &amp;&amp; a) {
                    w = !0;
                    break;
                }
                if (n = parseInt(i + t.charAt(s++), 16), !r &amp;&amp; (isNaN(n) || n &lt; 0 || n &gt; 255)) throw TypeError("Illegal str: Not a debug encoded string");
                o.view[h++] = n, a = !0;
            }
            if (w) throw TypeError("Illegal str: Invalid symbol at " + s);
        }
        if (!r) {
            if (!l || !g) throw TypeError("Illegal str: Missing offset or limit");
            if (h &lt; o.buffer.byteLength) throw TypeError("Illegal str: Not a debug encoded string (is it hex?) " + h + " &lt; " + f);
        }
        return o;
    }, e.toHex = function(t, e) {
        if (t = void 0 === t ? this.offset : t, e = void 0 === e ? this.limit : e, !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (e &gt;&gt;&gt;= 0, t &lt; 0 || t &gt; e || e &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + t + " &lt;= " + e + " &lt;= " + this.buffer.byteLength);
        }
        for (var r, i = new Array(e - t); t &lt; e; ) (r = this.view[t++]) &lt; 16 ? i.push("0", r.toString(16)) : i.push(r.toString(16));
        return i.join("");
    }, ByteBuffer.fromHex = function(t, e, r) {
        if (!r) {
            if ("string" != typeof t) throw TypeError("Illegal str: Not a string");
            if (t.length % 2 != 0) throw TypeError("Illegal str: Length not a multiple of 2");
        }
        for (var i, n = t.length, f = new ByteBuffer(n / 2 | 0, e), o = 0, s = 0; o &lt; n; o += 2) {
            if (i = parseInt(t.substring(o, o + 2), 16), !r &amp;&amp; (!isFinite(i) || i &lt; 0 || i &gt; 255)) throw TypeError("Illegal str: Contains non-hex characters");
            f.view[s++] = i;
        }
        return f.limit = s, f;
    };
    var f = function() {
        var t = {
            MAX_CODEPOINT: 1114111,
            encodeUTF8: function(t, e) {
                var r = null;
                for ("number" == typeof t &amp;&amp; (r = t, t = function() {
                    return null;
                }); null !== r || null !== (r = t()); ) r &lt; 128 ? e(127 &amp; r) : r &lt; 2048 ? (e(r &gt;&gt; 6 &amp; 31 | 192), 
                e(63 &amp; r | 128)) : r &lt; 65536 ? (e(r &gt;&gt; 12 &amp; 15 | 224), e(r &gt;&gt; 6 &amp; 63 | 128), e(63 &amp; r | 128)) : (e(r &gt;&gt; 18 &amp; 7 | 240), 
                e(r &gt;&gt; 12 &amp; 63 | 128), e(r &gt;&gt; 6 &amp; 63 | 128), e(63 &amp; r | 128)), r = null;
            },
            decodeUTF8: function(t, e) {
                for (var r, i, n, f, fail = function(t) {
                    t = t.slice(0, t.indexOf(null));
                    var e = Error(t.toString());
                    throw e.name = "TruncatedError", e.bytes = t, e;
                }; null !== (r = t()); ) if (0 == (128 &amp; r)) e(r); else if (192 == (224 &amp; r)) null === (i = t()) &amp;&amp; fail([ r, i ]), 
                e((31 &amp; r) &lt;&lt; 6 | 63 &amp; i); else if (224 == (240 &amp; r)) (null === (i = t()) || null === (n = t())) &amp;&amp; fail([ r, i, n ]), 
                e((15 &amp; r) &lt;&lt; 12 | (63 &amp; i) &lt;&lt; 6 | 63 &amp; n); else {
                    if (240 != (248 &amp; r)) throw RangeError("Illegal starting byte: " + r);
                    (null === (i = t()) || null === (n = t()) || null === (f = t())) &amp;&amp; fail([ r, i, n, f ]), 
                    e((7 &amp; r) &lt;&lt; 18 | (63 &amp; i) &lt;&lt; 12 | (63 &amp; n) &lt;&lt; 6 | 63 &amp; f);
                }
            },
            UTF16toUTF8: function(t, e) {
                for (var r, i = null; null !== (r = null !== i ? i : t()); ) r &gt;= 55296 &amp;&amp; r &lt;= 57343 &amp;&amp; null !== (i = t()) &amp;&amp; i &gt;= 56320 &amp;&amp; i &lt;= 57343 ? (e(1024 * (r - 55296) + i - 56320 + 65536), 
                i = null) : e(r);
                null !== i &amp;&amp; e(i);
            },
            UTF8toUTF16: function(t, e) {
                var r = null;
                for ("number" == typeof t &amp;&amp; (r = t, t = function() {
                    return null;
                }); null !== r || null !== (r = t()); ) r &lt;= 65535 ? e(r) : (e(55296 + ((r -= 65536) &gt;&gt; 10)), 
                e(r % 1024 + 56320)), r = null;
            },
            encodeUTF16toUTF8: function(e, r) {
                t.UTF16toUTF8(e, function(e) {
                    t.encodeUTF8(e, r);
                });
            },
            decodeUTF8toUTF16: function(e, r) {
                t.decodeUTF8(e, function(e) {
                    t.UTF8toUTF16(e, r);
                });
            },
            calculateCodePoint: function(t) {
                return t &lt; 128 ? 1 : t &lt; 2048 ? 2 : t &lt; 65536 ? 3 : 4;
            },
            calculateUTF8: function(t) {
                for (var e, r = 0; null !== (e = t()); ) r += e &lt; 128 ? 1 : e &lt; 2048 ? 2 : e &lt; 65536 ? 3 : 4;
                return r;
            },
            calculateUTF16asUTF8: function(e) {
                var r = 0, i = 0;
                return t.UTF16toUTF8(e, function(t) {
                    ++r, i += t &lt; 128 ? 1 : t &lt; 2048 ? 2 : t &lt; 65536 ? 3 : 4;
                }), [ r, i ];
            }
        };
        return t;
    }();
    return e.toUTF8 = function(t, e) {
        if (void 0 === t &amp;&amp; (t = this.offset), void 0 === e &amp;&amp; (e = this.limit), !this.noAssert) {
            if ("number" != typeof t || t % 1 != 0) throw TypeError("Illegal begin: Not an integer");
            if (t &gt;&gt;&gt;= 0, "number" != typeof e || e % 1 != 0) throw TypeError("Illegal end: Not an integer");
            if (e &gt;&gt;&gt;= 0, t &lt; 0 || t &gt; e || e &gt; this.buffer.byteLength) throw RangeError("Illegal range: 0 &lt;= " + t + " &lt;= " + e + " &lt;= " + this.buffer.byteLength);
        }
        var r;
        try {
            f.decodeUTF8toUTF16(function() {
                return t &lt; e ? this.view[t++] : null;
            }.bind(this), r = stringDestination());
        } catch (r) {
            if (t !== e) throw RangeError("Illegal range: Truncated data, " + t + " != " + e);
        }
        return r();
    }, ByteBuffer.fromUTF8 = function(t, e, r) {
        if (!r &amp;&amp; "string" != typeof t) throw TypeError("Illegal str: Not a string");
        var i = new ByteBuffer(f.calculateUTF16asUTF8(stringSource(t), !0)[1], e, r), n = 0;
        return f.encodeUTF16toUTF8(stringSource(t), function(t) {
            i.view[n++] = t;
        }), i.limit = n, i;
    }, ByteBuffer;
});</pre></body></html>