text: "use strict";exports.__esModule=!0,exports.default=sandboxedEval;var _vm=_interopRequireDefault(require("vm")),_underscore=_interopRequireDefault(require("underscore")),d3array=_interopRequireWildcard(require("d3-array")),colors=_interopRequireWildcard(require("./colors"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;return _getRequireWildcardCache=function(){return a},a}function _interopRequireWildcard(a){if(a&&a.__esModule)return a;var b=_getRequireWildcardCache();if(b&&b.has(a))return b.get(a);var c={};if(null!=a){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}}return c.default=a,b&&b.set(a,c),c}function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}// Objects exposed here should be treated like a public API
  // if `underscore` had backwards incompatible changes in a future release, we'd
  // have to be careful about bumping the library as those changes could break user charts
  var GLOBAL_CONTEXT={console:console,_:_underscore.default,colors:colors,d3array:d3array};// Copied/modified from https://github.com/hacksparrow/safe-eval/blob/master/index.js
  function sandboxedEval(a,b,c){var d={},e="SAFE_EVAL_"+Math.floor(1e6*Math.random());d[e]={};var f=_extends({},GLOBAL_CONTEXT,{},b);Object.keys(f).forEach(function(a){d[a]=f[a]});try{return _vm.default.runInNewContext(e+"="+a,d,c),d[e]}catch(a){return function(){return a}}}