text: "use strict";
  
  exports.__esModule = true;
  exports.pick = pick;
  exports.pickElementProps = pickElementProps;
  exports.omitOwn = omitOwn;
  var whitelist = ['style', 'className', 'role', 'id', 'autocomplete', 'size', 'tabIndex', 'maxLength', 'name'];
  var whitelistRegex = [/^aria-/, /^data-/, /^on[A-Z]\w+/];
  
  function pick(props, componentClass) {
    var keys = Object.keys(componentClass.propTypes);
    var result = {};
    Object.keys(props).forEach(function (key) {
      if (keys.indexOf(key) === -1) return;
      result[key] = props[key];
    });
    return result;
  }
  
  function pickElementProps(component) {
    for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      others[_key - 1] = arguments[_key];
    }
  
    var props = omitOwn.apply(void 0, [component].concat(others));
    var result = {};
    Object.keys(props).forEach(function (key) {
      if (whitelist.indexOf(key) !== -1 || whitelistRegex.some(function (r) {
        return !!key.match(r);
      })) result[key] = props[key];
    });
    return result;
  }
  
  function omitOwn(component) {
    var initial = Object.keys(component.constructor.propTypes);
  
    for (var _len2 = arguments.length, others = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      others[_key2 - 1] = arguments[_key2];
    }
  
    var keys = others.reduce(function (arr, compClass) {
      return arr.concat(Object.keys(compClass.propTypes));
    }, initial);
    var result = {};
    Object.keys(component.props).forEach(function (key) {
      if (keys.indexOf(key) !== -1) return;
      result[key] = component.props[key];
    });
    return result;
  }