"use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkM3AZDBPNjs = require('./chunk-M3AZDBPN.js');


var _chunkSQA7G4TEjs = require('./chunk-SQA7G4TE.js');


var _chunk6C3VEZWHjs = require('./chunk-6C3VEZWH.js');

// src/Random.ts
var Random_exports = {};
_chunk6C3VEZWHjs.__export.call(void 0, Random_exports, {
  random: () => random,
  randomBool: () => randomBool,
  randomElem: () => randomElem,
  randomInt: () => randomInt,
  randomRange: () => randomRange
});
var random = () => Math.random();
function randomInt(low, high) {
  return _chunkSQA7G4TEjs.pipe.call(void 0, 
    random,
    _chunkM3AZDBPNjs.map.call(void 0, (n) => Math.floor((high - low + 1) * n + low))
  );
}
function randomRange(min, max) {
  return _chunkSQA7G4TEjs.pipe.call(void 0, 
    random,
    _chunkM3AZDBPNjs.map.call(void 0, (n) => (max - min) * n + min)
  );
}
var randomBool = /* @__PURE__ */ _chunkSQA7G4TEjs.pipe.call(void 0, 
  random,
  _chunkM3AZDBPNjs.map.call(void 0, (n) => n < 0.5)
);
var randomElem = (as) => _chunkSQA7G4TEjs.pipe.call(void 0, 
  randomInt(0, as.length - 1),
  _chunkM3AZDBPNjs.map.call(void 0, (i) => as[i])
);








exports.random = random; exports.randomInt = randomInt; exports.randomRange = randomRange; exports.randomBool = randomBool; exports.randomElem = randomElem; exports.Random_exports = Random_exports;
