import { __require as requireType } from "../../../es-errors/type.js";
import { __require as requireHasown } from "../../../hasown/index.js";
var propertyDescriptor;
var hasRequiredPropertyDescriptor;
function requirePropertyDescriptor() {
  if (hasRequiredPropertyDescriptor) return propertyDescriptor;
  hasRequiredPropertyDescriptor = 1;
  var $TypeError = requireType();
  var hasOwn = requireHasown();
  var allowed = {
    __proto__: null,
    "[[Configurable]]": true,
    "[[Enumerable]]": true,
    "[[Get]]": true,
    "[[Set]]": true,
    "[[Value]]": true,
    "[[Writable]]": true
  };
  propertyDescriptor = function isPropertyDescriptor(Desc) {
    if (!Desc || typeof Desc !== "object") {
      return false;
    }
    for (var key in Desc) {
      if (hasOwn(Desc, key) && !allowed[key]) {
        return false;
      }
    }
    var isData = hasOwn(Desc, "[[Value]]") || hasOwn(Desc, "[[Writable]]");
    var IsAccessor = hasOwn(Desc, "[[Get]]") || hasOwn(Desc, "[[Set]]");
    if (isData && IsAccessor) {
      throw new $TypeError("Property Descriptors may not be both accessor and data descriptors");
    }
    return true;
  };
  return propertyDescriptor;
}
export {
  requirePropertyDescriptor as __require
};
