var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
  extend: () => extend,
  get: () => get,
  inBrowser: () => inBrowser,
  isDef: () => isDef,
  isFunction: () => isFunction,
  isObject: () => isObject,
  isPromise: () => isPromise,
  noop: () => noop,
  once: () => once,
  pick: () => pick
});
module.exports = __toCommonJS(stdin_exports);
function noop() {
}
const extend = Object.assign;
const inBrowser = typeof window !== "undefined";
function isDef(val) {
  return val !== void 0 && val !== null;
}
function isFunction(val) {
  return typeof val === "function";
}
function isPromise(val) {
  return isObject(val) && isFunction(val.then) && isFunction(val.catch);
}
function isObject(val) {
  return val !== null && typeof val === "object";
}
function get(object, path) {
  const keys = path.split(".");
  let result = object;
  keys.forEach((key) => {
    var _a;
    result = (_a = result[key]) != null ? _a : "";
  });
  return result;
}
function pick(obj, keys, ignoreUndefined) {
  return keys.reduce((ret, key) => {
    if (!ignoreUndefined || obj[key] !== void 0) {
      ret[key] = obj[key];
    }
    return ret;
  }, {});
}
function once(fn) {
  return (...args) => {
    if (!fn)
      return;
    fn(...args);
    fn = null;
  };
}
