/* tslint:disable:no-bitwise
966537
function (cp) {
	        return (cp < 0x10000) ? String.fromCharCode(cp) :
	            String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
	                String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
	    }
793461
function amf0encDate(ts) {
    var buf = new Buffer(11);
    buf.writeUInt8(0x0B, 0);
    buf.writeInt16BE(0, 1);
    buf.writeDoubleBE(ts, 3);
    return buf;
}
550205
function bnpMillerRabin(t) {
var n1 = this.subtract(BigInteger.ONE);
var k = n1.getLowestSetBit();
if(k <= 0) return false;
var r = n1.shiftRight(k);
var prng = bnGetPrng();
var a;
for(var i = 0; i < t; ++i) {
 // select witness 'a' at random from between 1 and n1
 do {
   a = new BigInteger(this.bitLength(), prng);
 }
 while(a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0);
 var y = a.modPow(r,this);
 if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
   var j = 1;
   while(j++ < k && y.compareTo(n1) != 0) {
     y = y.modPowInt(2,this);
     if(y.compareTo(BigInteger.ONE) == 0) return false;
   }
   if(y.compareTo(n1) != 0) return false;
 }
}
return true;
}
1151232
function lintCSS (args = []) {
  if (!Array.isArray(args)) {
    throw new TypeError('arguments has to be an array')
  }

  const command = [
    `node ${resolveBin('stylelint')}`,
    '"src/**/*.?(s)css"',
    '--syntax scss',
    `--custom-formatter ${require.resolve('stylelint-codeframe-formatter')}`,
    ...args
  ].join(' ')

  console.log(chalk`\nCommand:\n{green ${command}}\n`)

  try {
    execSync(command, { stdio: 'inherit' })
  } catch (error) {
    return false
  }

  return true
}
55885
function delimiterMutator(input){
	var delimiter=this.ra([' ','\n','<','>','\"','\'',',','.',';','|'])
//	console.log('Delimiter: '+delimiter)
	var chunks=input.split(delimiter)
	var chunk=this.ra(chunks)
	if(chunk.length>5 && chunk.length<300)
		this.storage.storeKeyValuePair([delimiter,chunk],'delimiterMutator')
	var oldChunk=this.storage.getValueForKey(delimiter,'delimiterMutator')
				
	if(chunks.length<3 || chunks.length<input.length/300){
//		console.log('Fail:'+ (chunks.length)+'<'+(input.length/300) )
		return false
	}
	switch(this.rint(3)) {
    case 0:
//    	console.log('Repeat')
    	return chunkRepeat.call(this,chunks,delimiter,oldChunk)
    case 1:
//    	console.log('Swap')
    	return chunkSwap.call(this,chunks,delimiter,oldChunk)
    case 2:
//    	console.log('Move')
    	return chunkMove.call(this,chunks,delimiter)
    default:
        console.log('WTF?')
	}
}
1166260
function bits( x ) {
	var b;

	// Convert the input value to a bit string:
	b = div2( x );

	// Left pad the bit string to ensure 8 bits are represented:
	b = lpad( b, NBITS, '0' );

	return b;
}
9988
function reverseBits(x, bits) {
      var y = 0;

      for (var i = 0; i < bits; i++) {
        y = (y << 1) | (x & 1);
        x >>>= 1;
      }

      return y;
    }
415205
function tinf_decode_symbol(d, t) {
  while (d.bitcount < 24) {
    d.tag |= d.source[d.sourceIndex++] << d.bitcount;
    d.bitcount += 8;
  }
  
  var sum = 0, cur = 0, len = 0;
  var tag = d.tag;

  /* get more bits while code value is above sum */
  do {
    cur = 2 * cur + (tag & 1);
    tag >>>= 1;
    ++len;

    sum += t.table[len];
    cur -= t.table[len];
  } while (cur >= 0);
  
  d.tag = tag;
  d.bitcount -= len;

  return t.trans[sum + cur];
}
1372171
function binl2rstr(input) {
        var i, output = '',
          l = input.length * 32;
        for (i = 0; i < l; i += 8) {
          output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF);
        }
        return output;
      }
681173
function bin_val() {
    var ret = this.seq(
        this.istringf('b'),
        bitChar,
        this.mightf(
            this.choicef(
                bit_string,
                bit_range)));
    var r3 = ret[3];
    if (r3) {
        if (typeof(r3) === "string") {
            // series of concatenated bit values
            return ret[2] + r3;
        } else {
            // range
            r3.setFirst(ret[2]);
            return r3;
        }
    }
    return ret[2];
}
143604
public boolean isLintSet(String s) {
        // return true if either the specific option is enabled, or
        // they are all enabled without the specific one being
        // disabled
        return
            isSet(XLINT_CUSTOM, s) ||
            (isSet(XLINT) || isSet(XLINT_CUSTOM, "all")) && isUnset(XLINT_CUSTOM, "-" + s);
    }
1055559
function checkInclude7(i) {
  const start = i;
  let l;

  if (tokens[i].type === TokenType.PlusSign) i++;
  else return 0;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkBlock(i)) i += l;
  else return 0;

  return i - start;
}
158907
function tinf_build_bits_base(bits, base, delta, first) {
  var i, sum;

  /* build bits table */
  for (i = 0; i < delta; ++i) bits[i] = 0;
  for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;

  /* build base table */
  for (sum = first, i = 0; i < 30; ++i) {
    base[i] = sum;
    sum += 1 << bits[i];
  }
}
231607
function checkInclude6(i) {
  const start = i;
  let l;

  if (tokens[i].type === TokenType.PlusSign) i++;
  else return 0;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkArguments(i)) i += l;
  else return 0;

  return i - start;
}
1110857
function s2r(t, u = false) {
  // TODO check btoa alternative
  const b64 = u ? b64u : b64s;
  let a;
  let c;

  let l = 0;
  let s = 0;

  return stream.transform(t, value => {
    const r = [];
    const tl = value.length;
    for (let n = 0; n < tl; n++) {
      if (l && (l % 60) === 0 && !u) {
        r.push("\r\n");
      }
      c = value[n];
      if (s === 0) {
        r.push(b64.charAt((c >> 2) & 63));
        a = (c & 3) << 4;
      } else if (s === 1) {
        r.push(b64.charAt(a | ((c >> 4) & 15)));
        a = (c & 15) << 2;
      } else if (s === 2) {
        r.push(b64.charAt(a | ((c >> 6) & 3)));
        l += 1;
        if ((l % 60) === 0 && !u) {
          r.push("\r\n");
        }
        r.push(b64.charAt(c & 63));
      }
      l += 1;
      s += 1;
      if (s === 3) {
        s = 0;
      }
    }
    return r.join('');
  }, () => {
    const r = [];
    if (s > 0) {
      r.push(b64.charAt(a));
      l += 1;
      if ((l % 60) === 0 && !u) {
        r.push("\r\n");
      }
      if (!u) {
        r.push('=');
        l += 1;
      }
    }
    if (s === 1 && !u) {
      if ((l % 60) === 0 && !u) {
        r.push("\r\n");
      }
      r.push('=');
    }
    return r.join('');
  });
}
1285491
function(x) {
      var b = prng.getBytesSync(x.length);
      for(var i = 0; i < x.length; ++i) {
        x[i] = b.charCodeAt(i);
      }
    }
897147
public static void convertSixBitToBits(String str, int padBits, boolean bitSet[],
	        boolean[] calculated, int from, int to) {
		if (str.length() == 0)
			return;
		int index = from - from % 6;
		int strFrom = from / 6;
		int slen = str.length() - 1;
		int strTo = to / 6 + 1;
		for (int i = strFrom; i < Math.min(strTo, slen); i++) {
			if (!calculated[i]) {
				char chr = str.charAt(i);
				int binVal = INT_TO_SIX_BIT[chr];
				if (binVal == -1) {
					throw new SixBitException("Illegal sixbit ascii char: " + chr);
				}
				bitSet[index] = (binVal & 32) > 0;
				bitSet[index + 1] = (binVal & 16) > 0;
				bitSet[index + 2] = (binVal & 8) > 0;
				bitSet[index + 3] = (binVal & 4) > 0;
				bitSet[index + 4] = (binVal & 2) > 0;
				bitSet[index + 5] = (binVal & 1) > 0;

				calculated[i] = true;
			}

			index += 6;
		}
		if (strTo > slen) {
			// Process the last char which might be padded
			char chr = str.charAt(slen);
			int binVal = INT_TO_SIX_BIT[chr];
			if (binVal == -1) {
				throw new SixBitException("Illegal sixbit ascii char: " + chr);
			}
			int bits = 6 - padBits;

			switch (bits) {
			case 6:
				bitSet[index + 5] = (binVal & 1) > 0;
			case 5:
				bitSet[index + 4] = (binVal & 2) > 0;
			case 4:
				bitSet[index + 3] = (binVal & 4) > 0;
			case 3:
				bitSet[index + 2] = (binVal & 8) > 0;
			case 2:
				bitSet[index + 1] = (binVal & 16) > 0;
			case 1:
				bitSet[index] = (binVal & 32) > 0;
			}

			calculated[slen] = true;
		}
	}