"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; 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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { DEFINE_EMIT: () => DEFINE_EMIT, DEFINE_EMITS: () => DEFINE_EMITS, DEFINE_MODELS: () => DEFINE_MODELS, DEFINE_MODELS_DOLLAR: () => DEFINE_MODELS_DOLLAR, DEFINE_OPTIONS: () => DEFINE_OPTIONS, DEFINE_PROP: () => DEFINE_PROP, DEFINE_PROPS: () => DEFINE_PROPS, DEFINE_PROPS_DOLLAR: () => DEFINE_PROPS_DOLLAR, DEFINE_PROPS_REFS: () => DEFINE_PROPS_REFS, DEFINE_PROP_DOLLAR: () => DEFINE_PROP_DOLLAR, DEFINE_RENDER: () => DEFINE_RENDER, DEFINE_SETUP_COMPONENT: () => DEFINE_SETUP_COMPONENT, DEFINE_SLOTS: () => DEFINE_SLOTS, DEFINE_STYLEX: () => DEFINE_STYLEX, FilterFileType: () => FilterFileType, HELPER_PREFIX: () => HELPER_PREFIX, REGEX_NODE_MODULES: () => REGEX_NODE_MODULES, REGEX_SETUP_SFC: () => REGEX_SETUP_SFC, REGEX_SETUP_SFC_SUB: () => REGEX_SETUP_SFC_SUB, REGEX_SRC_FILE: () => REGEX_SRC_FILE, REGEX_SUPPORTED_EXT: () => REGEX_SUPPORTED_EXT, REGEX_VUE_SFC: () => REGEX_VUE_SFC, REGEX_VUE_SUB: () => REGEX_VUE_SUB, REGEX_VUE_SUB_SETUP: () => REGEX_VUE_SUB_SETUP, REPO_ISSUE_URL: () => REPO_ISSUE_URL, VIRTUAL_ID_PREFIX: () => VIRTUAL_ID_PREFIX, WITH_DEFAULTS: () => WITH_DEFAULTS, addNormalScript: () => addNormalScript, checkInvalidScopeReference: () => checkInvalidScopeReference, createFilter: () => createFilter2, createRollupFilter: () => import_pluginutils2.createFilter, detectVueVersion: () => detectVueVersion, getFileCodeAndLang: () => getFileCodeAndLang, getFilterPattern: () => getFilterPattern, getTransformResult: () => getTransformResult, getVuePluginApi: () => getVuePluginApi, hackViteHMR: () => hackViteHMR, importHelperFn: () => importHelperFn, isStaticExpression: () => isStaticExpression, isStaticObjectKey: () => isStaticObjectKey, normalizePath: () => import_pluginutils2.normalizePath, parseSFC: () => parseSFC, removeMacroImport: () => removeMacroImport, resolveObjectExpression: () => resolveObjectExpression }); module.exports = __toCommonJS(src_exports); __reExport(src_exports, require("magic-string-ast"), module.exports); __reExport(src_exports, require("ast-kit"), module.exports); // src/ast.ts var import_compiler_sfc = require("@vue/compiler-sfc"); var import_ast_kit = require("ast-kit"); function checkInvalidScopeReference(node, method, setupBindings) { if (!node) return; (0, import_compiler_sfc.walkIdentifiers)(node, (id) => { if (setupBindings.includes(id.name)) throw new SyntaxError( `\`${method}()\` in `); } }; } function removeMacroImport(node, s, offset) { if (node.type === "ImportDeclaration" && node.attributes?.some( (attr) => (0, import_ast_kit2.resolveString)(attr.key) === "type" && attr.value.value === "macro" )) { s.removeNode(node, { offset }); return true; } } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { DEFINE_EMIT, DEFINE_EMITS, DEFINE_MODELS, DEFINE_MODELS_DOLLAR, DEFINE_OPTIONS, DEFINE_PROP, DEFINE_PROPS, DEFINE_PROPS_DOLLAR, DEFINE_PROPS_REFS, DEFINE_PROP_DOLLAR, DEFINE_RENDER, DEFINE_SETUP_COMPONENT, DEFINE_SLOTS, DEFINE_STYLEX, FilterFileType, HELPER_PREFIX, REGEX_NODE_MODULES, REGEX_SETUP_SFC, REGEX_SETUP_SFC_SUB, REGEX_SRC_FILE, REGEX_SUPPORTED_EXT, REGEX_VUE_SFC, REGEX_VUE_SUB, REGEX_VUE_SUB_SETUP, REPO_ISSUE_URL, VIRTUAL_ID_PREFIX, WITH_DEFAULTS, addNormalScript, checkInvalidScopeReference, createFilter, createRollupFilter, detectVueVersion, getFileCodeAndLang, getFilterPattern, getTransformResult, getVuePluginApi, hackViteHMR, importHelperFn, isStaticExpression, isStaticObjectKey, normalizePath, parseSFC, removeMacroImport, resolveObjectExpression, ...require("magic-string-ast"), ...require("ast-kit") });