/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */

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 rules_exports = {};
__export(rules_exports, {
  RUNJS_AUTHORING_RULES: () => RUNJS_AUTHORING_RULES,
  RUNJS_AUTHORING_RULE_BY_REPAIR_CLASS: () => RUNJS_AUTHORING_RULE_BY_REPAIR_CLASS,
  getRunJsAuthoringRule: () => getRunJsAuthoringRule
});
module.exports = __toCommonJS(rules_exports);
var import_blocked_capability_reroute = require("./blocked-capability-reroute");
var import_blocked_global_stop = require("./blocked-global-stop");
var import_ctx_libs_member_mismatch_stop = require("./ctx-libs-member-mismatch-stop");
var import_ctx_root_mismatch_stop = require("./ctx-root-mismatch-stop");
var import_missing_top_level_return = require("./missing-top-level-return");
var import_nested_runjs_stop = require("./nested-runjs-stop");
var import_render_top_level_function_wrapper = require("./render-top-level-function-wrapper");
var import_render_unreachable_render_call = require("./render-unreachable-render-call");
var import_replace_innerhtml_with_render = require("./replace-innerhtml-with-render");
var import_react_runtime_contract_stop = require("./react-runtime-contract-stop");
var import_resource_runtime_contract_stop = require("./resource-runtime-contract-stop");
var import_source_limit_stop = require("./source-limit-stop");
var import_switch_to_resource_api = require("./switch-to-resource-api");
var import_syntax_stop = require("./syntax-stop");
var import_unknown_global_stop = require("./unknown-global-stop");
var import_unknown_model_stop = require("./unknown-model-stop");
var import_unknown_surface_stop = require("./unknown-surface-stop");
var import_value_surface_forbids_render = require("./value-surface-forbids-render");
const RUNJS_AUTHORING_RULES = [
  import_syntax_stop.syntaxStopRule,
  import_nested_runjs_stop.nestedRunjsStopRule,
  import_source_limit_stop.sourceLimitStopRule,
  import_switch_to_resource_api.switchToResourceApiRule,
  import_missing_top_level_return.missingTopLevelReturnRule,
  import_value_surface_forbids_render.valueSurfaceForbidsRenderRule,
  import_unknown_surface_stop.unknownSurfaceStopRule,
  import_unknown_model_stop.unknownModelStopRule,
  import_replace_innerhtml_with_render.replaceInnerHtmlWithRenderRule,
  import_render_top_level_function_wrapper.renderTopLevelFunctionWrapperRule,
  import_render_unreachable_render_call.renderUnreachableRenderCallRule,
  import_blocked_global_stop.blockedGlobalStopRule,
  import_unknown_global_stop.unknownGlobalStopRule,
  import_blocked_capability_reroute.blockedCapabilityRerouteRule,
  import_react_runtime_contract_stop.reactRuntimeContractStopRule,
  import_resource_runtime_contract_stop.resourceRuntimeContractStopRule,
  import_ctx_libs_member_mismatch_stop.ctxLibsMemberMismatchStopRule,
  import_ctx_root_mismatch_stop.ctxRootMismatchStopRule
];
const RUNJS_AUTHORING_RULE_BY_REPAIR_CLASS = RUNJS_AUTHORING_RULES.reduce(
  (memo, rule) => {
    memo[rule.repairClass] = rule;
    return memo;
  },
  {}
);
function getRunJsAuthoringRule(repairClass) {
  return RUNJS_AUTHORING_RULE_BY_REPAIR_CLASS[repairClass];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  RUNJS_AUTHORING_RULES,
  RUNJS_AUTHORING_RULE_BY_REPAIR_CLASS,
  getRunJsAuthoringRule
});
