JSFiddle - React, Tailwind, and code Playground
by juberti
HTML
<button onclick="foo()">
Start
</button>
<button onclick="bar()">
Stop
</button>
JavaScript
(function ()
{
'use strict';
var e = Math.min;
function a()
{
console.log(f, "font-weight: bold; color: #fa066b", ...arguments)
}
function b()
{
console.warn(f, "font-weight: bold; color: #fa066b", ...arguments)
}
function c(b, c)
{
c === void 0 && (c = "");
let d = "";
for (let a = 0, e = b.length; a < e; a++) d += b[a].toString(16).padStart(2, "0").toUpperCase() + " ";
a(c, d)
}
function d(a)
{
let b = new Uint8Array([(4278190080 & a) >> 24, (16711680 & a) >> 16, (65280 & a) >> 8, 255 & a]),
c = [];
for (let d = 0; 4 > d; d++)(0 !== b[d] || c.length) && c.push(b[d]);
return c
}
const f = "%c WebM Parser:",
g = "master",
h = "uint",
i = "bin";
class j
{
constructor(a, b)
{
this.value = a, this.bytesCount = b, this.bytes = []
}
static parse(a)
{
let c = e(a.length, 8),
d = "";
for (let b = 0; b < c; b++) d += a[b].toString(2).padStart(8, "0");
return "0000000111111111111111111111111111111111111111111111111111111111" === d ? new j(-1, 8) : 8 === d.length || "1" === d[0] ? new j(parseInt("0" + d.slice(1, 8), 2), 1) : 16 === d.length || "1" === d[1] ? new j(parseInt("00" + d.slice(2, 16), 2), 2) : 24 === d.length || "1" === d[2] ? new j(parseInt("000" + d.slice(3, 24), 2), 3) : 32 === d.length || "1" === d[3] ? new j(parseInt("0000" + d.slice(4, 32), 2), 4) : "1" === d[4] ? new j(parseInt("00000" + d.slice(5, 40), 2), 5) : (b("Unable to parse VInt (" + d + ")"), new j(parseInt(d, 2), a.length))
}
static createBytes(a)
{
var c = Math.pow;
if (0 > a || a > c(2, 53)) throw new Error("Unrepresentable value: " + a);
for (var d = 1; 8 >= d && !(a < c(2, 7 * d) - 1); d++);
for (var e, f = new Uint8Array(d), g = 1; g <= d; g++) e = 255 & a, f[d - g] = e, a -= e, a /= c(2, 8);
return f[0] |= 1 << 8 - d, f
}
}
class k
{
constructor(a, b)
{
Object.defineProperty(this,...