{"version":3,"sources":["../src/index.ts","../src/pluginProvider.ts","../src/const.ts","../src/plugin.ts"],"sourcesContent":["import syntaxTypescript from \"babel-plugin-syntax-typescript-new\"\nimport syntaxDecorators from \"@babel/plugin-syntax-decorators\"\nimport dlight from \"./plugin\"\nimport { type DLightOption } from \"./types\"\nimport { type ConfigAPI, type TransformOptions } from \"@babel/core\"\n\nexport default function (\n  _: ConfigAPI,\n  options: DLightOption\n): TransformOptions {\n  return {\n    plugins: [\n      syntaxTypescript,\n      [syntaxDecorators.default ?? syntaxDecorators, { legacy: true }],\n      [dlight, options],\n    ],\n  }\n}\n\nexport { type DLightOption }\n","import type babel from \"@babel/core\"\nimport { types as t, type NodePath } from \"@babel/core\"\nimport {\n  type PropertyContainer,\n  type HTMLTags,\n  type SnippetPropSubDepMap,\n} from \"./types\"\nimport { minimatch } from \"minimatch\"\nimport { parseView } from \"@dlightjs/view-parser\"\nimport { parseReactivity } from \"@dlightjs/reactivity-parser\"\nimport { generateSnippet, generateView } from \"@dlightjs/view-generator\"\nimport {\n  alterAttributeMap,\n  availableDecoNames,\n  defaultHTMLTags,\n  devMode,\n  dlightDefaultPackageName,\n  importMap,\n  importsToDelete,\n  reactivityFuncNames,\n} from \"./const\"\n\nexport class PluginProvider {\n  private readonly dlightPackageName = dlightDefaultPackageName\n\n  // ---- Plugin Level\n  private readonly babelApi: typeof babel\n  private readonly t: typeof t\n  private readonly traverse: typeof babel.traverse\n  private readonly enableDevTools: boolean\n  private readonly includes: string[]\n  private readonly excludes: string[]\n  private readonly htmlTags: string[]\n  private readonly attributeMap: Record<string, string[]>\n\n  constructor(\n    babelApi: typeof babel,\n    types: typeof t,\n    includes: string[],\n    excludes: string[],\n    enableDevTools: boolean,\n    htmlTags: HTMLTags,\n    attributeMap: Record<string, string[]>\n  ) {\n    this.babelApi = babelApi\n    this.t = types\n    this.traverse = babelApi.traverse\n    this.includes = includes\n    this.excludes = excludes\n    this.enableDevTools = devMode && enableDevTools\n    this.htmlTags =\n      typeof htmlTags === \"function\"\n        ? htmlTags(defaultHTMLTags)\n        : htmlTags.includes(\"*\")\n          ? [...new Set([...defaultHTMLTags, ...htmlTags])].filter(\n              tag => tag !== \"*\"\n            )\n          : htmlTags\n    this.attributeMap = attributeMap\n  }\n\n  // ---- DLight class Level\n  private classDeclarationNode?: t.ClassDeclaration\n  private classBodyNode?: t.ClassBody\n  private propertiesContainer: PropertyContainer = {}\n  private dependencyMap: Record<string, string[]> = {}\n  private enter = true\n  private dLightModel = false\n  private enterClassNode = false\n  private className?: string\n\n  // ---- File Level\n  private programNode?: t.Program\n  private allImports: t.ImportDeclaration[] = []\n  private didAlterImports = false\n\n  /* ---- DLight Class Level Hooks ---- */\n  /**\n   * @brief Clear all DLight Node Level variables after a class is transformed\n   */\n  clearNode() {\n    this.classDeclarationNode = undefined\n    this.classBodyNode = undefined\n    this.propertiesContainer = {}\n    this.dependencyMap = {}\n    this.enter = true\n    this.enterClassNode = false\n    this.dLightModel = false\n    this.className = undefined\n  }\n\n  private get availableProperties(): string[] {\n    return Object.entries(this.propertiesContainer)\n      .filter(\n        ([key, { isWatcher, isStatic, isChildren }]) =>\n          key !== \"_$compName\" && !isWatcher && !isStatic && !isChildren\n      )\n      .map(([key]) => key)\n  }\n\n  /**\n   * @brief Initialize DLight Node Level variables when entering a class\n   * @param path\n   */\n  initNode(path: NodePath<t.ClassDeclaration>): void {\n    const node: t.ClassDeclaration = path.node\n    this.classDeclarationNode = node\n    this.classBodyNode = node.body\n    this.propertiesContainer = {}\n\n    if (!node.id?.name) {\n      node.id = this.t.identifier(`Anonymous_${PluginProvider.uid()}`)\n    }\n    this.className = node.id?.name\n\n    // ---- Custom decorators\n    this.handleClassCustomDecorators()\n\n    // ---- If devtools is enabled, add _$compName property to the class\n    if (this.enableDevTools) {\n      this.classBodyNode.body.unshift(\n        this.t.classProperty(\n          this.t.identifier(\"_$compName\"),\n          this.t.stringLiteral(this.className)\n        )\n      )\n    }\n\n    // ---- Add dlight import and alter import name,\n    //      Only do this when enter the first dlight class\n    if (!this.didAlterImports) {\n      // ---- Get DLight imports\n      const dlightImports = this.allImports.filter(\n        n => n.source.value === dlightDefaultPackageName\n      )\n      // ---- Alter import name, e.g. \"@dlight/dlight-client\"\n      if (this.dlightPackageName !== dlightDefaultPackageName) {\n        dlightImports.forEach(i => {\n          i.source.value = this.dlightPackageName\n        })\n      }\n\n      // ---- remove all tag-import\n      dlightImports.forEach(importNode => {\n        importNode.specifiers = importNode.specifiers.filter(\n          specifier =>\n            !(\n              this.t.isImportSpecifier(specifier) &&\n              this.t.isIdentifier(specifier.imported) &&\n              importsToDelete.includes(specifier.imported.name)\n            )\n        )\n      })\n\n      // ---- Add nodes import to the head of file\n      this.programNode!.body.unshift(\n        this.t.importDeclaration(\n          Object.entries(importMap).map(([key, value]) =>\n            this.t.importSpecifier(\n              this.t.identifier(value),\n              this.t.identifier(key)\n            )\n          ),\n          this.t.stringLiteral(this.dlightPackageName)\n        )\n      )\n      this.didAlterImports = true\n    }\n  }\n\n  /* ---- Babel Visitors ---- */\n  programEnterVisitor(\n    path: NodePath<t.Program>,\n    filename: string | undefined\n  ): void {\n    this.enter = this.fileAllowed(filename)\n    if (!this.enter) return\n    this.allImports = path.node.body.filter(n =>\n      this.t.isImportDeclaration(n)\n    ) as t.ImportDeclaration[]\n    const dlightImports = this.allImports.filter(\n      n => n.source.value === dlightDefaultPackageName\n    )\n    if (dlightImports.length === 0) {\n      this.enter = false\n      return\n    }\n    this.programNode = path.node\n  }\n\n  programExitVisitor(): void {\n    if (!this.enter) return\n    this.didAlterImports = false\n    this.allImports = []\n    this.programNode = undefined\n  }\n\n  classEnter(path: NodePath<t.ClassDeclaration>): void {\n    if (!this.enter) return\n    this.enterClassNode = this.isDLightClass(path)\n    if (!this.enterClassNode) return\n    this.initNode(path)\n    this.resolveMounting(path)\n  }\n\n  classExit(): void {\n    if (!this.enter) return\n    if (!this.enterClassNode) return\n    this.transformDLightClass()\n    this.clearNode()\n    this.enterClassNode = false\n  }\n\n  classMethodVisitor(path: NodePath<t.ClassMethod>): void {\n    if (!this.enterClassNode) return\n    if (!this.t.isIdentifier(path.node.key)) return\n    const key = path.node.key.name\n    if (key === \"Body\") return\n\n    const isSnippet = this.findDecoratorByName(path.node.decorators, \"Snippet\")\n    if (isSnippet) return\n    const node = path.node\n\n    // ---- Handle watcher\n    // ---- Get watcher decorator or watcher function decorator\n    // ---- Watcher auto collect deps:\n    //       @Watch\n    //       watcher() { myFunc() }\n    // ---- Watcher function manual set deps:\n    //       @Watch([\"count\", \"flag\"])\n    //       watcherFunc() { myFunc() }\n    const watchDeco = this.findDecoratorByName(node.decorators, \"Watch\")\n    if (this.t.isIdentifier(node.key, { name: \"constructor\" })) return\n    this.autoBindMethods(node)\n    if (!watchDeco) return\n\n    // ---- Get dependencies from watcher decorator or watcher function decorator\n    let deps: string[] = []\n    let depsNode\n    if (this.t.isIdentifier(watchDeco)) {\n      ;[deps, depsNode] = this.getDependencies(node)\n    } else {\n      const listenDepStrings = watchDeco.arguments\n        .filter(arg => this.t.isStringLiteral(arg))\n        .map(arg => (arg as t.StringLiteral).value)\n      const pseudoMethod = this.t.classMethod(\n        \"method\",\n        node.key,\n        [],\n        this.t.blockStatement([\n          this.t.expressionStatement(\n            this.t.arrayExpression(\n              listenDepStrings.map(str =>\n                this.t.memberExpression(\n                  this.t.thisExpression(),\n                  this.t.identifier(str)\n                )\n              )\n            )\n          ),\n        ])\n      )\n\n      ;[deps, depsNode] = this.getDependencies(pseudoMethod)\n    }\n    // ---- Register watcher to propertiesContainer\n    this.propertiesContainer[key] = {\n      node,\n      deps,\n      depsNode,\n      isWatcher: true,\n    }\n    node.decorators = this.removeDecorators(node.decorators, [\"Watch\"])\n  }\n\n  classPropertyVisitor(path: NodePath<t.ClassProperty>): void {\n    if (!this.enterClassNode) return\n    const node = path.node\n    if (!this.t.isIdentifier(node.key)) return\n    const key = node.key.name\n    if (key === \"Body\") return\n    const decorators = node.decorators\n    const isSnippet = this.findDecoratorByName(decorators, \"Snippet\")\n    if (isSnippet) return\n    // ---- Parse model\n    const isModel = this.parseModel(path)\n\n    const isProp = !!this.findDecoratorByName(decorators, \"Prop\")\n    const isEnv = !!this.findDecoratorByName(decorators, \"Env\")\n\n    const isChildren = !!this.findDecoratorByName(node.decorators, \"Children\")\n\n    const [deps, depsNode] = !isChildren ? this.getDependencies(node) : [[]]\n\n    this.propertiesContainer[key] = {\n      node,\n      deps,\n      depsNode,\n      isStatic: !!this.findDecoratorByName(decorators, \"Static\"),\n      isContent: !!this.findDecoratorByName(decorators, \"Content\"),\n      isChildren,\n      isPropOrEnv: isProp ? \"Prop\" : isEnv ? \"Env\" : undefined,\n      isModel,\n    }\n\n    node.decorators = this.removeDecorators(decorators, availableDecoNames)\n  }\n\n  /* ---- Decorator Resolvers ---- */\n  /**\n   * @brief Decorator resolver: Watcher\n   * Add:\n   * $wW${key}\n   * in watcher:\n   * watchxx() {\n   *  if (this._$cache(${key}, ${deps})) return\n   *  ...\n   * }\n   * @param node\n   */\n  resolveWatcherDecorator(\n    node: t.ClassMethod,\n    depsNode: t.ArrayExpression\n  ): void {\n    if (!this.t.isIdentifier(node.key)) return\n    const key = node.key.name\n    const propertyIdx = this.classBodyNode!.body.indexOf(node)\n    const watcherNode = this.t.classProperty(this.t.identifier(`$w$${key}`))\n    this.classBodyNode!.body.splice(propertyIdx, 0, watcherNode)\n    node.body.body.unshift(\n      this.t.ifStatement(\n        this.t.callExpression(\n          this.t.memberExpression(\n            this.t.thisExpression(),\n            this.t.identifier(\"_$cache\")\n          ),\n          [this.t.stringLiteral(key), depsNode]\n        ),\n        this.t.blockStatement([this.t.returnStatement()])\n      )\n    )\n  }\n\n  /**\n   * @brief Decorator resolver: Children\n   * Add:\n   * get ${key}() {\n   *  return this._$children\n   * }\n   * @param node\n   */\n  resolveChildrenDecorator(node: t.ClassProperty) {\n    if (!this.classBodyNode) return\n    if (!this.t.isIdentifier(node.key)) return\n    const key = node.key.name\n    const propertyIdx = this.classBodyNode.body.indexOf(node)\n\n    const childrenFuncCallNode = this.t.memberExpression(\n      this.t.thisExpression(),\n      this.t.identifier(\"_$children\")\n    )\n\n    const getterNode = this.t.classMethod(\n      \"get\",\n      this.t.identifier(key),\n      [],\n      this.t.blockStatement([this.t.returnStatement(childrenFuncCallNode)])\n    )\n    this.classBodyNode.body.splice(propertyIdx, 1, getterNode)\n  }\n\n  /**\n   * @brief Decorator resolver: Content\n   * Add:\n   * _$contentKey = \"key\"\n   * @param node\n   */\n  resolveContentDecorator(node: t.ClassProperty) {\n    if (!this.classBodyNode) return\n    if (!this.t.isIdentifier(node.key)) return\n\n    // ---- Already has _$contentKey\n    if (\n      this.classBodyNode.body.some(\n        n =>\n          this.t.isClassProperty(n) &&\n          (n.key as t.Identifier).name === \"_$contentKey\"\n      )\n    )\n      return\n    const key = node.key.name\n    const propertyIdx = this.classBodyNode.body.indexOf(node)\n\n    const derivedStatusKey = this.t.classProperty(\n      this.t.identifier(\"_$contentKey\"),\n      this.t.stringLiteral(key)\n    )\n    this.classBodyNode.body.splice(propertyIdx, 0, derivedStatusKey)\n  }\n\n  /**\n   * @brief Decorator resolver: Prop/Env\n   * Add:\n   * $p/e$${key}\n   * @param node\n   */\n  resolvePropDecorator(node: t.ClassProperty, decoratorName: \"Prop\" | \"Env\") {\n    if (!this.classBodyNode) return\n    if (!this.t.isIdentifier(node.key)) return\n    const key = node.key.name\n    const propertyIdx = this.classBodyNode.body.indexOf(node)\n    const tag = decoratorName.toLowerCase() === \"prop\" ? \"p\" : \"e\"\n    const derivedStatusKey = this.t.classProperty(\n      this.t.identifier(`$${tag}$${key}`)\n    )\n    this.classBodyNode.body.splice(propertyIdx, 0, derivedStatusKey)\n  }\n\n  /**\n   * @brief Decorator resolver: State\n   * Add:\n   *  $$${key} = ${depIdx}\n   *  $sub$${key} = [${reversedDeps}]\n   * @param node\n   */\n  resolveStateDecorator(\n    node: t.ClassProperty,\n    idx: number,\n    reverseDeps: Set<string> | undefined\n  ) {\n    if (!this.classBodyNode) return\n    if (!this.t.isIdentifier(node.key)) return\n    const key = node.key.name\n    const propertyIdx = this.classBodyNode.body.indexOf(node)\n\n    const idxNode = !this.dLightModel\n      ? [\n          this.t.classProperty(\n            this.t.identifier(`$$${key}`),\n            this.t.numericLiteral(1 << idx)\n          ),\n        ]\n      : []\n\n    const depsNode = reverseDeps\n      ? [\n          this.t.classProperty(\n            this.t.identifier(`$s$${key}`),\n            this.t.arrayExpression(\n              [...reverseDeps].map(d => this.t.stringLiteral(d))\n            )\n          ),\n        ]\n      : []\n\n    this.classBodyNode.body.splice(propertyIdx + 1, 0, ...idxNode, ...depsNode)\n  }\n\n  /* ---- Helper Functions ---- */\n  handleClassCustomDecorators() {\n    if (!this.classBodyNode) return\n    const decorators = this.classDeclarationNode?.decorators\n    if (!decorators) return\n    // ---- Forward Prop\n    const forwardPropDeco = this.findDecoratorByName(decorators, \"ForwardProps\")\n    /**\n     * _$forwardProp\n     * _$forwardPropMap = new Set()\n     * _$forwardPropsId = []\n     */\n    if (forwardPropDeco) {\n      this.classBodyNode.body.unshift(\n        this.t.classProperty(this.t.identifier(\"_$forwardProps\")),\n        this.t.classProperty(\n          this.t.identifier(\"_$forwardPropsSet\"),\n          this.t.newExpression(this.t.identifier(\"Set\"), [])\n        ),\n        this.t.classProperty(\n          this.t.identifier(\"_$forwardPropsId\"),\n          this.t.arrayExpression([])\n        )\n      )\n      this.classDeclarationNode!.decorators = this.removeDecorators(\n        decorators,\n        [\"ForwardProps\"]\n      )\n    }\n  }\n\n  /**\n   * @brief Transform the whole DLight class when exiting the class\n   *  1. Alter all the state properties\n   *  2. Transform MainView and Snippets with DLight syntax\n   */\n  transformDLightClass(): void {\n    const usedProperties = this.handleView()\n    this.addAutoUpdate(\n      this.dLightModel ? this.availableProperties : usedProperties\n    )\n    const propertyArr = Object.entries(this.propertiesContainer).reverse()\n    const depReversedMap = this.dependencyMapReversed()\n\n    for (const [\n      key,\n      {\n        node,\n        deps,\n        isStatic,\n        isChildren,\n        isPropOrEnv,\n        isWatcher,\n        isContent,\n        isModel,\n        depsNode,\n      },\n    ] of propertyArr) {\n      if (isChildren) {\n        this.resolveChildrenDecorator(node as t.ClassProperty)\n        continue\n      }\n      if (deps.length > 0) {\n        usedProperties.push(...deps)\n        if (isWatcher) {\n          this.resolveWatcherDecorator(node as t.ClassMethod, depsNode!)\n        } else if (!isModel) {\n          this.handleDerivedProperty(node as t.ClassProperty, depsNode!)\n        }\n      }\n      if (isPropOrEnv) {\n        this.resolvePropDecorator(node as t.ClassProperty, isPropOrEnv)\n      }\n      if (isContent) {\n        this.resolvePropDecorator(node as t.ClassProperty, \"Prop\")\n        this.resolveContentDecorator(node as t.ClassProperty)\n      }\n      if (isStatic) continue\n      if (usedProperties.includes(key)) {\n        this.resolveStateDecorator(\n          node as t.ClassProperty,\n          this.availableProperties.indexOf(key),\n          depReversedMap[key]\n        )\n      }\n    }\n  }\n\n  /**\n   * @brief Add updateProp and updateDerived if there's a assignment\n   * @param usedProperties\n   * @returns\n   */\n  private addAutoUpdate(usedProperties: string[]) {\n    if (!this.classBodyNode) return\n    const nonViewNodes = this.classBodyNode.body.filter(\n      n =>\n        !(\n          ((this.t.isClassProperty(n) || this.t.isClassMethod(n)) &&\n            [\"constructor\", \"_$compName\"].includes(\n              (n.key as t.Identifier).name\n            )) ||\n          this.t.isClassMethod(n, { static: true }) ||\n          this.t.isClassProperty(n, { static: true })\n        )\n    )\n    nonViewNodes.forEach(n => {\n      const value = this.t.isClassProperty(n)\n        ? n.value\n        : this.t.isClassMethod(n)\n          ? n.body\n          : null\n      if (!value) return\n      this.addUpdateDerived(value, usedProperties)\n    })\n  }\n\n  /**\n   * @Brief Add updateView and updateDerived to the node\n   * @param node\n   * @param usedProperties\n   */\n  private addUpdateDerived(\n    node: t.Expression | t.BlockStatement,\n    usedProperties: string[]\n  ) {\n    const newUpdateProp = (node: t.Expression, key: string) =>\n      this.t.callExpression(\n        this.t.memberExpression(\n          this.t.thisExpression(),\n          this.t.identifier(\"_$ud\")\n        ),\n        [node, this.t.stringLiteral(key)]\n      )\n    this.traverse(this.valueWrapper(node), {\n      MemberExpression: path => {\n        if (\n          !this.t.isThisExpression(path.node.object) ||\n          !this.t.isIdentifier(path.node.property)\n        )\n          return\n        const key = path.node.property.name\n        if (!usedProperties.includes(key)) return\n        const assignPath = this.isAssignmentExpressionLeft(path)\n        if (!assignPath) return\n        assignPath.replaceWith(\n          newUpdateProp(assignPath.node as t.Expression, key)\n        )\n        assignPath.skip()\n      },\n      CallExpression: path => {\n        if (!this.t.isMemberExpression(path.node.callee)) return\n        const funcNameNode = path.node.callee.property\n        if (!this.t.isIdentifier(funcNameNode)) return\n        if (!reactivityFuncNames.includes(funcNameNode.name)) return\n        let callee = path.get(\"callee\").get(\"object\") as NodePath\n\n        while (this.t.isMemberExpression(callee.node)) {\n          callee = callee.get(\"object\") as NodePath\n        }\n        if (!this.t.isThisExpression(callee?.node)) return\n        const key = (\n          (callee.parentPath!.node as t.MemberExpression)\n            .property as t.Identifier\n        ).name\n        path.replaceWith(newUpdateProp(path.node, key))\n        path.skip()\n      },\n    })\n  }\n\n  /* ---- DLight Class View Handlers ---- */\n  /**\n   * @brief Transform Body and Snippets with DLight syntax\n   * @returns used properties\n   */\n  handleView(): string[] {\n    if (!this.classBodyNode) return []\n    const usedPropertySet = new Set<string>()\n    let mainView: undefined | t.ClassMethod\n    const snippetNodes: t.ClassMethod[] = []\n    for (let viewNode of this.classBodyNode.body) {\n      if (!this.t.isClassProperty(viewNode) && !this.t.isClassMethod(viewNode))\n        continue\n      if (!this.t.isIdentifier(viewNode.key)) continue\n      const isSnippet = this.findDecoratorByName(viewNode.decorators, \"Snippet\")\n      const isMainView = viewNode.key.name === \"Body\"\n      if (!isSnippet && !isMainView) continue\n\n      if (this.t.isClassProperty(viewNode)) {\n        // ---- Handle TSAsExpression, e.g. MyView = (() => {}) as Type1 as Type2\n        let exp = viewNode.value\n        while (this.t.isTSAsExpression(exp)) exp = exp.expression\n        if (!this.t.isArrowFunctionExpression(exp)) continue\n        viewNode.value = exp\n        // ---- Transform arrow function property into method\n        const newViewNode = this.arrowFunctionPropertyToMethod(viewNode)\n        if (!newViewNode) continue\n        viewNode = newViewNode\n      }\n\n      if (isSnippet) {\n        viewNode.decorators = null\n        snippetNodes.push(viewNode)\n      } else {\n        mainView = viewNode\n      }\n    }\n\n    const snippetNames = snippetNodes.map(v => (v.key as t.Identifier).name)\n    const snippetPropSubDepMap: SnippetPropSubDepMap = Object.fromEntries(\n      snippetNodes\n        .map(v => {\n          const prop = v.params[0]\n          if (!prop || !this.t.isObjectPattern(prop)) return [\"-\", null as any]\n          const props = Object.fromEntries(\n            prop.properties\n              .map(p => {\n                if (!this.t.isObjectProperty(p)) return [\"-\", null]\n                const key = (p.key as t.Identifier).name\n                // ---- Get identifiers that depend on this prop\n                const subDeps = this.getIdentifiers(\n                  // ---- Some unimportant value wrapper\n                  this.t.assignmentExpression(\n                    \"=\",\n                    this.t.objectPattern([\n                      this.t.objectProperty(this.t.numericLiteral(0), p.value),\n                    ]),\n                    this.t.numericLiteral(0)\n                  )\n                ).filter(v => v !== key)\n                return [key, subDeps]\n              })\n              .filter(([_, props]) => props)\n          )\n          return [(v.key as t.Identifier).name, props]\n        })\n        .filter(([_, props]) => props)\n    )\n    let templateIdx = -1\n    if (mainView) {\n      let usedProperties\n      ;[usedProperties, templateIdx] = this.alterMainView(\n        mainView,\n        snippetNames,\n        snippetPropSubDepMap\n      )\n      usedProperties.forEach(usedPropertySet.add.bind(usedPropertySet))\n    }\n\n    snippetNodes.forEach(viewNode => {\n      let usedProperties\n      ;[usedProperties, templateIdx] = this.alterSnippet(\n        viewNode,\n        snippetNames,\n        snippetPropSubDepMap,\n        templateIdx\n      )\n      usedProperties.forEach(usedPropertySet.add.bind(usedPropertySet))\n    })\n\n    const usedProperties: string[] = []\n    this.availableProperties.forEach(p => {\n      if (usedPropertySet.has(p)) usedProperties.push(p)\n    })\n    // const usedProperties = usedPropertyDeps.map(dep => dep.slice(1, -4))\n    return usedProperties\n  }\n\n  /**\n   * @brief Transform Views with DLight syntax\n   * @param viewNode\n   * @param snippetNames\n   * @param isSnippet\n   * @returns Used properties\n   */\n  alterMainView(\n    viewNode: t.ClassMethod,\n    snippetNames: string[],\n    snippetPropSubDepMap: SnippetPropSubDepMap\n  ): [Set<string>, number] {\n    const viewUnits = parseView(viewNode.body, {\n      babelApi: this.babelApi,\n      snippetNames: snippetNames,\n      htmlTags: this.htmlTags,\n    })\n\n    const [viewParticles, usedPropertySet] = parseReactivity(viewUnits, {\n      babelApi: this.babelApi,\n      availableProperties: this.availableProperties,\n      dependencyMap: this.dependencyMap,\n      reactivityFuncNames,\n    })\n\n    const [body, classProperties, templateIdx] = generateView(viewParticles, {\n      babelApi: this.babelApi,\n      className: this.className!,\n      importMap,\n      snippetPropMap: Object.fromEntries(\n        Object.entries(snippetPropSubDepMap).map(([key, props]) => [\n          key,\n          Object.keys(props),\n        ])\n      ),\n      templateIdx: -1,\n      attributeMap: this.attributeMap,\n      alterAttributeMap,\n    })\n    viewNode.body = body\n    this.classBodyNode?.body.push(...classProperties)\n\n    return [usedPropertySet, templateIdx]\n  }\n\n  /**\n   * @brief Transform Snippets with DLight syntax\n   * @param viewNode\n   * @param snippetNames\n   * @param snippetPropSubDepMap\n   * @param templateIdx\n   * @returns\n   */\n  alterSnippet(\n    viewNode: t.ClassMethod,\n    snippetNames: string[],\n    snippetPropSubDepMap: SnippetPropSubDepMap,\n    templateIdx: number\n  ): [Set<string>, number] {\n    // ---- Add prop => Sub() => Sub(_$, $snippetNode)\n    if (viewNode.params.length === 0) {\n      viewNode.params.push(\n        this.t.identifier(\"_$\"),\n        this.t.identifier(\"$snippetNode\")\n      )\n    } else if (viewNode.params.length === 1) {\n      viewNode.params.push(this.t.identifier(\"$snippetNode\"))\n    } else {\n      viewNode.params[1] = this.t.identifier(\"$snippetNode\")\n      viewNode.params.length = 2\n    }\n    const viewUnits = parseView(viewNode.body, {\n      babelApi: this.babelApi,\n      snippetNames: snippetNames,\n      htmlTags: this.htmlTags,\n    })\n\n    const snippetProp =\n      snippetPropSubDepMap[(viewNode.key as t.Identifier).name] ?? []\n    const identifierDepMap: Record<string, string[]> = {}\n    Object.entries(snippetProp).forEach(([key, subDeps]) => {\n      subDeps.forEach(dep => {\n        identifierDepMap[dep] = [key]\n      })\n    })\n\n    const [viewParticlesProperty, usedPropertySet] = parseReactivity(\n      viewUnits,\n      {\n        babelApi: this.babelApi,\n        availableProperties: this.availableProperties,\n        availableIdentifiers: Object.keys(snippetProp),\n        dependencyMap: this.dependencyMap,\n        dependencyParseType: \"property\",\n        reactivityFuncNames,\n      }\n    )\n\n    const [viewParticlesIdentifier] = parseReactivity(viewUnits, {\n      babelApi: this.babelApi,\n      availableProperties: Object.keys(snippetProp),\n      dependencyMap: this.dependencyMap,\n      dependencyParseType: \"identifier\",\n      identifierDepMap,\n      reactivityFuncNames,\n    })\n\n    const snippetPropMap = Object.fromEntries(\n      Object.entries(snippetPropSubDepMap).map(([key, props]) => [\n        key,\n        Object.keys(props),\n      ])\n    )\n    const [body, classProperties, newTemplateIdx] = generateSnippet(\n      viewParticlesProperty,\n      viewParticlesIdentifier,\n      viewNode.params[0] as t.ObjectPattern,\n      {\n        babelApi: this.babelApi,\n        className: this.className!,\n        importMap,\n        snippetPropMap,\n        templateIdx,\n        attributeMap: this.attributeMap,\n        alterAttributeMap,\n      }\n    )\n    viewNode.body = body\n    this.classBodyNode?.body.push(...classProperties)\n\n    return [usedPropertySet, newTemplateIdx]\n  }\n\n  /**\n   * @brief Test if the file is allowed to be transformed\n   * @param fileName\n   * @returns is file allowed\n   */\n  private fileAllowed(fileName: string | undefined): boolean {\n    if (this.includes.includes(\"*\")) return true\n    if (!fileName) return false\n    if (this.excludes.some(pattern => minimatch(fileName, pattern)))\n      return false\n    if (!this.includes.some(pattern => minimatch(fileName, pattern)))\n      return false\n    return true\n  }\n\n  /**\n   * @brief Test if the class is a dlight view\n   * @param path\n   * @returns\n   */\n  private isDLightView(path: NodePath<t.ClassDeclaration>): boolean {\n    const node = path.node\n    const decorators = node.decorators ?? []\n    const isViewDecorator = decorators.find((deco: t.Decorator) =>\n      this.t.isIdentifier(deco.expression, { name: \"View\" })\n    )\n    if (isViewDecorator) {\n      node.superClass = this.t.identifier(\"View\")\n      node.decorators = node.decorators?.filter(\n        (deco: t.Decorator) =>\n          !this.t.isIdentifier(deco.expression, { name: \"View\" })\n      )\n    }\n    return this.t.isIdentifier(node.superClass, { name: \"View\" })\n  }\n\n  /**\n   * @brief Test if the class is a dlight model\n   * @param path\n   * @returns\n   */\n  private isDLightModel(path: NodePath<t.ClassDeclaration>): boolean {\n    const node = path.node\n    const decorators = node.decorators ?? []\n    const isModelDecorator = decorators.find((deco: t.Decorator) =>\n      this.t.isIdentifier(deco.expression, { name: \"Model\" })\n    )\n    if (isModelDecorator) {\n      node.superClass = this.t.identifier(\"Model\")\n      node.decorators = node.decorators?.filter(\n        (deco: t.Decorator) =>\n          !this.t.isIdentifier(deco.expression, { name: \"Model\" })\n      )\n    }\n\n    // ---- Add property _$model\n    node.body.body.unshift(this.t.classProperty(this.t.identifier(\"_$model\")))\n\n    // ---- Delete all views\n    node.body.body = node.body.body.filter(\n      n =>\n        !(\n          (this.t.isClassProperty(n) ||\n            this.t.isClassMethod(n, { kind: \"method\" })) &&\n          (this.findDecoratorByName(n.decorators, \"Snippet\") ||\n            (this.t.isIdentifier(n.key) && n.key.name === \"Body\"))\n        )\n    )\n    this.dLightModel = true\n\n    return this.t.isIdentifier(node.superClass, { name: \"Model\" })\n  }\n\n  /**\n   * @brief Test if the class is a dlight class\n   * @param path\n   * @returns\n   */\n  isDLightClass(path: NodePath<t.ClassDeclaration>): boolean {\n    return this.isDLightView(path) || this.isDLightModel(path)\n  }\n\n  /**\n   * @brief Parse any use(Model) inside a property\n   * @param path\n   * @returns\n   */\n  private parseModel(path: NodePath<t.ClassProperty>) {\n    const hasUseImport = this.allImports.some(\n      imp =>\n        imp.source.value === this.dlightPackageName &&\n        imp.specifiers.some(s => {\n          if (\n            this.t.isImportSpecifier(s) &&\n            this.t.isIdentifier(s.imported, { name: \"use\" })\n          ) {\n            return true\n          }\n        })\n    )\n    if (!hasUseImport) return\n    const node = path.node\n    const key = node.key\n    if (!this.t.isIdentifier(key)) return\n    const value = node.value\n    if (!this.t.isCallExpression(value)) return\n    if (!this.t.isIdentifier(value.callee, { name: \"use\" })) return\n    const args = value.arguments\n    const propsArg = args[1]\n    const contentArg = args[2]\n    let propsNode: t.Expression = this.t.nullLiteral()\n    if (propsArg) {\n      const mergedPropsNode: [\n        t.Expression,\n        t.ArrayExpression | t.NullLiteral,\n      ][] = []\n      const spreadPropsNode: [\n        t.Expression,\n        t.Expression,\n        t.ArrayExpression | t.NullLiteral,\n      ][] = []\n      // ---- Get props deps\n      if (this.t.isObjectExpression(propsArg)) {\n        propsArg.properties.forEach(prop => {\n          if (this.t.isSpreadElement(prop)) {\n            const [, depsNode] = this.getDependenciesFromNode(\n              prop.argument as t.Expression\n            )\n            mergedPropsNode.push([\n              prop.argument as t.Expression,\n              depsNode ?? this.t.nullLiteral(),\n            ])\n          } else if (this.t.isObjectProperty(prop)) {\n            const [, depsNode] = this.getDependenciesFromNode(\n              prop.value as t.Expression\n            )\n            spreadPropsNode.push([\n              !prop.computed && this.t.isIdentifier(prop.key)\n                ? this.t.stringLiteral(prop.key.name)\n                : (prop.key as t.Expression),\n              prop.value as t.Expression,\n              depsNode ?? this.t.nullLiteral(),\n            ])\n          } else {\n            spreadPropsNode.push([\n              !prop.computed && this.t.isIdentifier(prop.key)\n                ? this.t.stringLiteral(prop.key.name)\n                : (prop.key as t.Expression),\n              this.t.arrowFunctionExpression([], prop.body),\n              this.t.nullLiteral(),\n            ])\n          }\n        })\n      } else {\n        const [, depsNode] = this.getDependenciesFromNode(\n          propsArg as t.Expression\n        )\n        mergedPropsNode.push([\n          propsArg as t.Expression,\n          depsNode ?? this.t.nullLiteral(),\n        ])\n      }\n      /**\n       * @View { ok: this.count, ...this.props }\n       * {\n       *  m: [[this.props, []]]\n       *  s: [[\"ok\", this.count, [this.count]]]\n       * }\n       */\n      propsNode = this.t.objectExpression([\n        this.t.objectProperty(\n          this.t.identifier(\"m\"),\n          this.t.arrayExpression(\n            mergedPropsNode.map(n => this.t.arrayExpression(n))\n          )\n        ),\n        this.t.objectProperty(\n          this.t.identifier(\"s\"),\n          this.t.arrayExpression(\n            spreadPropsNode.map(n => this.t.arrayExpression(n))\n          )\n        ),\n      ])\n    }\n\n    let contentNode: t.Expression = this.t.nullLiteral()\n    if (contentArg) {\n      const [, depsNode] = this.getDependenciesFromNode(\n        contentArg as t.Expression\n      )\n      contentNode = this.t.arrayExpression([\n        contentArg as t.Expression,\n        depsNode ?? this.t.nullLiteral(),\n      ])\n    }\n    args[1] = this.t.arrowFunctionExpression([], propsNode)\n    args[2] = this.t.arrowFunctionExpression([], contentNode)\n    args[3] = this.t.stringLiteral(key.name)\n    value.callee = this.t.memberExpression(\n      this.t.thisExpression(),\n      this.t.identifier(\"_$injectModel\")\n    )\n    // ---- Wrap a function for lazy evaluation\n    node.value = this.t.arrowFunctionExpression([], value)\n    // ---- Add $md$${key}\n    const propertyIdx = this.classBodyNode!.body.indexOf(node)\n    const modelDecorator = this.t.classProperty(\n      this.t.identifier(`$md$${key.name}`)\n    )\n    this.classBodyNode!.body.splice(propertyIdx, 0, modelDecorator)\n    return true\n  }\n\n  /**\n   * @brief Remove decorators by name\n   *  Only search for Identifier and CallExpression, e.g, @Ok, @Ok()\n   * @param decorators\n   * @param names\n   * @returns new decorators\n   */\n  private removeDecorators(\n    decorators: t.Decorator[] | undefined | null,\n    names: string[]\n  ): t.Decorator[] {\n    if (!decorators) return []\n    return decorators.filter(\n      d =>\n        !(\n          (this.t.isIdentifier(d.expression) &&\n            names.includes(d.expression.name)) ||\n          (this.t.isCallExpression(d.expression) &&\n            this.t.isIdentifier(d.expression.callee) &&\n            names.includes(d.expression.callee.name))\n        )\n    )\n  }\n\n  /**\n   * @brief Find decorator by name,\n   *  Only search for Identifier and CallExpression, e.g, @Ok, @Ok()\n   * @param decorators\n   * @param name\n   * @returns Identifier or CallExpression or nothing\n   */\n  private findDecoratorByName(\n    decorators: t.Decorator[] | undefined | null,\n    name: string\n  ): t.Identifier | t.CallExpression | undefined {\n    if (!decorators) return\n    return decorators.find(\n      deco =>\n        this.t.isIdentifier(deco.expression, { name }) ||\n        (this.t.isCallExpression(deco.expression) &&\n          this.t.isIdentifier(deco.expression.callee, { name }))\n    )?.expression as t.Identifier | t.CallExpression | undefined\n  }\n\n  /**\n   * @brief Generate a dependency node from a dependency identifier,\n   *  loop until the parent node is not a binary expression or a member expression\n   * @param path\n   * @returns\n   */\n  private geneDependencyNode(path: NodePath): t.Node {\n    let parentPath = path\n    while (parentPath?.parentPath) {\n      const pParentPath = parentPath.parentPath\n      if (\n        !(\n          this.t.isMemberExpression(pParentPath.node, { computed: false }) ||\n          this.t.isOptionalMemberExpression(pParentPath.node)\n        )\n      ) {\n        break\n      }\n      parentPath = pParentPath\n    }\n    const depNode = this.t.cloneNode(parentPath.node)\n    // ---- Turn memberExpression to optionalMemberExpression\n    this.traverse(this.valueWrapper(depNode as t.Expression), {\n      MemberExpression: innerPath => {\n        if (this.t.isThisExpression(innerPath.node.object)) return\n        innerPath.node.optional = true\n        innerPath.node.type = \"OptionalMemberExpression\" as any\n      },\n    })\n    return depNode\n  }\n\n  /**\n   * constructor() {\n   *  super()\n   * }\n   */\n  private addConstructor(): t.ClassMethod {\n    let constructor = this.classBodyNode!.body.find(n =>\n      this.t.isClassMethod(n, { kind: \"constructor\" })\n    ) as t.ClassMethod\n    if (constructor) return constructor\n\n    constructor = this.t.classMethod(\n      \"constructor\",\n      this.t.identifier(\"constructor\"),\n      [],\n      this.t.blockStatement([\n        this.t.expressionStatement(this.t.callExpression(this.t.super(), [])),\n      ])\n    )\n\n    this.classBodyNode!.body.unshift(constructor)\n    return constructor\n  }\n\n  private autoBindMethods(node: t.ClassMethod) {\n    const constructorNode = this.addConstructor()\n    constructorNode.body.body.push(\n      this.t.expressionStatement(\n        this.t.assignmentExpression(\n          \"=\",\n          this.t.memberExpression(this.t.thisExpression(), node.key),\n          this.t.callExpression(\n            this.t.memberExpression(\n              this.t.memberExpression(this.t.thisExpression(), node.key),\n              this.t.identifier(\"bind\")\n            ),\n            [this.t.thisExpression()]\n          )\n        )\n      )\n    )\n  }\n\n  /**\n   * ${key}\n   * get $f$${key}() {\n   *  if (this._$cache(${key}, ${deps})) return this.${key}\n   *  return ${value}\n   * }\n   */\n  private handleDerivedProperty(\n    node: t.ClassProperty,\n    depsNode: t.ArrayExpression\n  ) {\n    if (!this.t.isIdentifier(node.key)) return\n    const key = node.key.name\n    const value = node.value\n    const propertyIdx = this.classBodyNode!.body.indexOf(node)\n    const getterNode = this.t.classMethod(\n      \"get\",\n      this.t.identifier(`$f$${key}`),\n      [],\n      this.t.blockStatement([\n        this.t.ifStatement(\n          this.t.callExpression(\n            this.t.memberExpression(\n              this.t.thisExpression(),\n              this.t.identifier(\"_$cache\")\n            ),\n            [this.t.stringLiteral(key), depsNode]\n          ),\n          this.t.blockStatement([\n            this.t.returnStatement(\n              this.t.memberExpression(\n                this.t.thisExpression(),\n                this.t.identifier(key)\n              )\n            ),\n          ])\n        ),\n        this.t.returnStatement(value),\n      ])\n    )\n    this.classBodyNode!.body.splice(propertyIdx + 1, 0, getterNode)\n    node.value = null\n  }\n\n  private getDependenciesFromNode(\n    node: t.Expression | t.ClassDeclaration,\n    isClassLevel = false\n  ): [string[], t.ArrayExpression | undefined] {\n    // ---- Deps: console.log(this.count)\n    const deps = new Set<string>()\n    // ---- Assign deps: this.count = 1 / this.count++\n    const assignDeps = new Set<string>()\n    const depNodes: Record<string, t.Expression[]> = {}\n\n    this.traverse(this.valueWrapper(node), {\n      MemberExpression: innerPath => {\n        if (\n          !this.t.isIdentifier(innerPath.node.property) ||\n          !this.t.isThisExpression(innerPath.node.object)\n        )\n          return\n\n        const propertyKey = innerPath.node.property.name\n        if (\n          this.isAssignmentExpressionLeft(innerPath) ||\n          this.isAssignmentFunction(innerPath)\n        ) {\n          assignDeps.add(propertyKey)\n        } else if (\n          this.availableProperties.includes(propertyKey) &&\n          !this.isMemberInEscapeFunction(\n            innerPath,\n            this.classDeclarationNode!\n          ) &&\n          !this.isMemberInManualFunction(innerPath, this.classDeclarationNode!)\n        ) {\n          deps.add(propertyKey)\n          if (isClassLevel)\n            this.dependencyMap[propertyKey]?.forEach(deps.add.bind(deps))\n          if (!depNodes[propertyKey]) depNodes[propertyKey] = []\n          depNodes[propertyKey].push(this.geneDependencyNode(innerPath))\n        }\n      },\n    })\n\n    // ---- Eliminate deps that are assigned in the same method\n    //      e.g. { console.log(this.count); this.count = 1 }\n    //      this will cause infinite loop\n    //      so we eliminate \"count\" from deps\n    assignDeps.forEach(dep => {\n      deps.delete(dep)\n      delete depNodes[dep]\n    })\n\n    let dependencyNodes = Object.values(depNodes).flat()\n    // ---- deduplicate the dependency nodes\n    dependencyNodes = dependencyNodes.filter((n, i) => {\n      const idx = dependencyNodes.findIndex(m => this.t.isNodesEquivalent(m, n))\n      return idx === i\n    })\n\n    // ---- Add deps to dependencyMap\n    const depArr = [...deps]\n    if (isClassLevel && deps.size > 0) {\n      const propertyKey = (\n        ((node as t.ClassDeclaration).body.body[0] as t.ClassMethod)\n          .key as t.Identifier\n      ).name\n      this.dependencyMap[propertyKey] = depArr\n    }\n\n    return [depArr, this.t.arrayExpression(dependencyNodes)]\n  }\n  /**\n   * @brief Get all valid dependencies of a babel path\n   * @param path\n   * @returns dependencies\n   */\n  private getDependencies(\n    node: t.ClassMethod | t.ClassProperty\n  ): [string[], t.ArrayExpression | undefined] {\n    if (!this.t.isIdentifier(node.key)) return [[], undefined]\n    const wrappedNode = this.t.classDeclaration(\n      null,\n      null,\n      this.t.classBody([node])\n    )\n    return this.getDependenciesFromNode(wrappedNode, true)\n  }\n\n  private dependencyMapReversed() {\n    const reversedMap: Record<string, Set<string>> = {}\n    Object.entries(this.dependencyMap).forEach(([key, deps]) => {\n      deps.forEach(dep => {\n        if (!reversedMap[dep]) reversedMap[dep] = new Set()\n        reversedMap[dep].add(key)\n      })\n    })\n\n    return reversedMap\n  }\n\n  private resolveMounting(path: NodePath<t.ClassDeclaration>) {\n    const node = path.node\n    if (!this.t.isIdentifier(node.id)) return\n    const decorators = node.decorators ?? []\n    const findEntry = (name: string) => {\n      const found = decorators.find(deco =>\n        this.t.isIdentifier(deco.expression, { name })\n      )\n      if (found)\n        decorators.splice(\n          decorators.findIndex(deco => deco === found),\n          1\n        )\n      return found\n    }\n\n    // ---- Find \"@Main\" for mounting \"main\", \"@App\" for mounting \"app\"\n    const entryValue = findEntry(\"Main\")\n      ? \"main\"\n      : findEntry(\"App\")\n        ? \"app\"\n        : null\n    let mountNode: t.Expression\n    if (entryValue) {\n      mountNode = this.t.stringLiteral(entryValue)\n    } else {\n      // ---- Find \"@Mount(\"any-id\")\"\n      const mounting = decorators.find(\n        deco =>\n          this.t.isCallExpression(deco.expression) &&\n          this.t.isIdentifier(deco.expression.callee, { name: \"Mount\" }) &&\n          deco.expression.arguments.length === 1\n      ) as t.Decorator\n      if (!mounting) return\n      decorators.splice(\n        decorators.findIndex(deco => deco === mounting),\n        1\n      )\n      mountNode = (mounting.expression as t.CallExpression)\n        .arguments[0] as t.Expression\n    }\n\n    // ---- ${importMap.render}(\"main\", ${node.id})\n    const parentNode = path.parentPath.node\n    if (!this.t.isBlockStatement(parentNode) && !this.t.isProgram(parentNode))\n      return\n    const idx = parentNode.body.indexOf(node)\n    parentNode.body.splice(\n      idx + 1,\n      0,\n      this.t.expressionStatement(\n        this.t.callExpression(this.t.identifier(importMap.render), [\n          mountNode,\n          node.id as t.Identifier,\n        ])\n      )\n    )\n  }\n\n  /**\n   * @brief Transform arrow function property to method\n   * @param propertyNode\n   * @returns new method node\n   */\n  arrowFunctionPropertyToMethod(\n    propertyNode: t.ClassProperty\n  ): t.ClassMethod | undefined {\n    if (!this.t.isArrowFunctionExpression(propertyNode.value)) return\n    const value = propertyNode.value\n    if (!this.t.isBlockStatement(value.body)) return\n    // ---- Remove property\n    const propertyIdx = this.classBodyNode!.body.indexOf(propertyNode)\n    // ---- Add method\n    const methodNode = this.t.classMethod(\n      \"method\",\n      propertyNode.key,\n      value.params,\n      value.body\n    )\n    this.classBodyNode!.body.splice(propertyIdx, 1, methodNode)\n\n    return methodNode\n  }\n\n  /**\n   * @brief Check if a member expression is a property of a member expression\n   * @param parentNode\n   * @param currentNode\n   * @returns is a property of a member expression\n   */\n  isMemberExpressionProperty(parentNode: t.Node, currentNode: t.Node): boolean {\n    return (\n      this.t.isMemberExpression(parentNode) &&\n      !parentNode.computed &&\n      parentNode.property === currentNode\n    )\n  }\n\n  /**\n   * @brief Check if a member expression is a key of an object\n   * @param parentNode\n   * @param currentNode\n   * @returns is a key of an object\n   */\n  isObjectKey(parentNode: t.Node, currentNode: t.Node): boolean {\n    return this.t.isObjectProperty(parentNode) && parentNode.key === currentNode\n  }\n\n  /**\n   * @brief Add arrow function to property value\n   * @param node\n   */\n  valueWithArrowFunc(node: t.ClassProperty): void {\n    if (!node.value) {\n      node.value = this.t.identifier(\"undefined\")\n    }\n    node.value = this.t.arrowFunctionExpression([], node.value)\n  }\n\n  /**\n   * @brief Get all top level return statements in a block statement,\n   *  ignore nested function returns\n   * @param node\n   * @returns\n   */\n  getAllTopLevelReturnBlock(node: t.BlockStatement): t.BlockStatement[] {\n    const returns: t.BlockStatement[] = []\n\n    let inNestedFunction = false\n    this.traverse(this.valueWrapper(node), {\n      Function: path => {\n        if (inNestedFunction) return\n        inNestedFunction = true\n        path.skip()\n      },\n      ReturnStatement: path => {\n        if (inNestedFunction) return\n        const parentNode = path.parentPath.node\n        if (!this.t.isBlockStatement(parentNode)) {\n          const newNode = this.t.blockStatement([path.node])\n          path.replaceWith(newNode)\n          returns.push(newNode)\n        } else {\n          returns.push(parentNode)\n        }\n        path.skip()\n      },\n      exit: path => {\n        if (this.t.isFunction(path.node)) inNestedFunction = false\n      },\n    })\n\n    return returns\n  }\n\n  /**\n   * @brief Wrap the value in a file\n   * @param node\n   * @returns wrapped value\n   */\n  private valueWrapper(node: t.Expression | t.Statement): t.File {\n    return this.t.file(\n      this.t.program([\n        this.t.isStatement(node) ? node : this.t.expressionStatement(node),\n      ])\n    )\n  }\n\n  /**\n   * @brief check if the identifier is from a function param till the stopNode\n   *  e.g:\n   *  function myFunc1(ok) { // stopNode = functionBody\n   *     const myFunc2 = ok => ok // from function param\n   *     console.log(ok) // not from function param\n   *  }\n   * @param path\n   * @param idName\n   */\n  private isAttrFromFunction(path: NodePath, idName: string) {\n    let reversePath = path.parentPath\n\n    const checkParam: (param: t.Node) => boolean = (param: t.Node) => {\n      // ---- 3 general types:\n      //      * represent allow nesting\n      // ---0 Identifier: (a)\n      // ---1 RestElement: (...a)   *\n      // ---1 Pattern: 3 sub Pattern\n      // -----0   AssignmentPattern: (a=1)   *\n      // -----1   ArrayPattern: ([a, b])   *\n      // -----2   ObjectPattern: ({a, b})\n      if (this.t.isIdentifier(param)) return param.name === idName\n      if (this.t.isAssignmentPattern(param)) return checkParam(param.left)\n      if (this.t.isArrayPattern(param)) {\n        return param.elements\n          .filter(Boolean)\n          .map(el => checkParam(el!))\n          .includes(true)\n      }\n      if (this.t.isObjectPattern(param)) {\n        return (\n          param.properties.filter(\n            prop =>\n              this.t.isObjectProperty(prop) && this.t.isIdentifier(prop.key)\n          ) as t.ObjectProperty[]\n        )\n          .map(prop => (prop.key as t.Identifier).name)\n          .includes(idName)\n      }\n      if (this.t.isRestElement(param)) return checkParam(param.argument)\n\n      return false\n    }\n\n    while (reversePath) {\n      const node = reversePath.node\n      if (\n        this.t.isArrowFunctionExpression(node) ||\n        this.t.isFunctionDeclaration(node)\n      ) {\n        for (const param of node.params) {\n          if (checkParam(param)) return true\n        }\n      }\n      reversePath = reversePath.parentPath\n    }\n\n    return false\n  }\n\n  /**\n   * @brief Check if an identifier is a simple identifier, i.e., not a member expression, or a function param\n   * @param path\n   *  1. not a member expression\n   *  2. not a function param\n   *  3. not in a declaration\n   *  4. not as object property's not computed key\n   */\n  private isStandAloneIdentifier(path: NodePath<t.Identifier>) {\n    const node = path.node\n    const parentNode = path.parentPath?.node\n    const isMemberExpression =\n      this.t.isMemberExpression(parentNode) && parentNode.property === node\n    if (isMemberExpression) return false\n    const isFunctionParam = this.isAttrFromFunction(path, node.name)\n    if (isFunctionParam) return false\n    while (path.parentPath) {\n      if (this.t.isVariableDeclarator(path.parentPath.node)) return false\n      if (\n        this.t.isObjectProperty(path.parentPath.node) &&\n        path.parentPath.node.key === path.node &&\n        !path.parentPath.node.computed\n      )\n        return false\n      path = path.parentPath as any\n    }\n    return true\n  }\n\n  /**\n   * @brief Get all identifiers as strings in a node\n   * @param node\n   * @returns identifiers\n   */\n  private getIdentifiers(node: t.Node): string[] {\n    if (this.t.isIdentifier(node)) return [node.name]\n    const identifierKeys = new Set<string>()\n    this.traverse(this.valueWrapper(node as any), {\n      Identifier: innerPath => {\n        if (!this.isStandAloneIdentifier(innerPath)) return\n        identifierKeys.add(innerPath.node.name)\n      },\n    })\n    return [...identifierKeys]\n  }\n\n  static escapeNamings = [\"escape\", \"$\"]\n\n  /**\n   * @brief Check if it's the left side of an assignment expression, e.g. this.count = 1\n   * @param innerPath\n   * @returns assignment expression\n   */\n  isAssignmentExpressionLeft(innerPath: NodePath): NodePath | null {\n    let parentPath = innerPath.parentPath\n    while (parentPath && !this.t.isStatement(parentPath.node)) {\n      if (this.t.isAssignmentExpression(parentPath.node)) {\n        if (parentPath.node.left === innerPath.node) return parentPath\n        const leftPath = parentPath.get(\"left\") as NodePath\n        if (innerPath.isDescendant(leftPath)) return parentPath\n      } else if (this.t.isUpdateExpression(parentPath.node)) {\n        return parentPath\n      }\n      parentPath = parentPath.parentPath\n    }\n\n    return null\n  }\n\n  /**\n   * @brief Check if it's a reactivity function, e.g. arr.push\n   * @param innerPath\n   * @returns\n   */\n  isAssignmentFunction(innerPath: NodePath): boolean {\n    let parentPath = innerPath.parentPath\n\n    while (parentPath && this.t.isMemberExpression(parentPath.node)) {\n      parentPath = parentPath.parentPath\n    }\n    if (!parentPath) return false\n    return (\n      this.t.isCallExpression(parentPath.node) &&\n      this.t.isMemberExpression(parentPath.node.callee) &&\n      this.t.isIdentifier(parentPath.node.callee.property) &&\n      reactivityFuncNames.includes(parentPath.node.callee.property.name)\n    )\n  }\n\n  /**\n   * @brief Check if it's in an \"escape\" function,\n   *        e.g. escape(() => { console.log(this.count) })\n   *              deps will be empty instead of [\"count\"]\n   * @param innerPath\n   * @param classDeclarationNode\n   * @returns is in escape function\n   */\n  isMemberInEscapeFunction(innerPath: NodePath, stopNode: t.Node): boolean {\n    let isInFunction = false\n    let reversePath = innerPath.parentPath\n    while (reversePath && reversePath.node !== stopNode) {\n      const node = reversePath.node\n      if (\n        this.t.isCallExpression(node) &&\n        this.t.isIdentifier(node.callee) &&\n        PluginProvider.escapeNamings.includes(node.callee.name)\n      ) {\n        isInFunction = true\n        break\n      }\n      reversePath = reversePath.parentPath\n    }\n    return isInFunction\n  }\n\n  /**\n   * @brief Check if it's in a \"manual\" function,\n   *        e.g. manual(() => { console.log(this.count) }, [\"flag\"])\n   *             deps will be [\"flag\"] instead of [\"count\"]\n   * @param innerPath\n   * @param classDeclarationNode\n   * @returns is in manual function\n   */\n  isMemberInManualFunction(innerPath: NodePath, stopNode: t.Node): boolean {\n    let isInFunction = false\n    let reversePath = innerPath.parentPath\n    while (reversePath && reversePath.node !== stopNode) {\n      const node = reversePath.node\n      const parentNode = reversePath.parentPath?.node\n      const isFunction =\n        this.t.isFunctionExpression(node) ||\n        this.t.isArrowFunctionExpression(node)\n      const isManual =\n        this.t.isCallExpression(parentNode) &&\n        this.t.isIdentifier(parentNode.callee) &&\n        parentNode.callee.name === \"manual\"\n      if (isFunction && isManual) {\n        isInFunction = true\n        break\n      }\n      reversePath = reversePath.parentPath\n    }\n\n    return isInFunction\n  }\n\n  /**\n   * @brief Generate a random string\n   * @param length\n   * @returns random string\n   */\n  private static uid(length = 4): string {\n    return Math.random()\n      .toString(32)\n      .slice(2, length + 2)\n  }\n}\n\n/**\n * @brief Change the PluginProvider class for class inheritance\n */\nexport let PluginProviderClass = PluginProvider\nexport function changePluginProviderClass(cls: typeof PluginProvider) {\n  PluginProviderClass = cls\n}\n","export const devMode = process.env.NODE_ENV === \"development\"\n\nexport const alterAttributeMap = {\n  class: \"className\",\n  for: \"htmlFor\",\n}\n\nexport const reactivityFuncNames = [\n  // ---- Array\n  \"push\",\n  \"pop\",\n  \"shift\",\n  \"unshift\",\n  \"splice\",\n  \"sort\",\n  \"reverse\",\n  // ---- Set\n  \"add\",\n  \"delete\",\n  \"clear\",\n  // ---- Map\n  \"set\",\n  \"delete\",\n  \"clear\",\n]\n\nexport const defaultHTMLTags = [\n  \"a\",\n  \"abbr\",\n  \"address\",\n  \"area\",\n  \"article\",\n  \"aside\",\n  \"audio\",\n  \"b\",\n  \"base\",\n  \"bdi\",\n  \"bdo\",\n  \"blockquote\",\n  \"body\",\n  \"br\",\n  \"button\",\n  \"canvas\",\n  \"caption\",\n  \"cite\",\n  \"code\",\n  \"col\",\n  \"colgroup\",\n  \"data\",\n  \"datalist\",\n  \"dd\",\n  \"del\",\n  \"details\",\n  \"dfn\",\n  \"dialog\",\n  \"div\",\n  \"dl\",\n  \"dt\",\n  \"em\",\n  \"embed\",\n  \"fieldset\",\n  \"figcaption\",\n  \"figure\",\n  \"footer\",\n  \"form\",\n  \"h1\",\n  \"h2\",\n  \"h3\",\n  \"h4\",\n  \"h5\",\n  \"h6\",\n  \"head\",\n  \"header\",\n  \"hgroup\",\n  \"hr\",\n  \"html\",\n  \"i\",\n  \"iframe\",\n  \"img\",\n  \"input\",\n  \"ins\",\n  \"kbd\",\n  \"label\",\n  \"legend\",\n  \"li\",\n  \"link\",\n  \"main\",\n  \"map\",\n  \"mark\",\n  \"menu\",\n  \"meta\",\n  \"meter\",\n  \"nav\",\n  \"noscript\",\n  \"object\",\n  \"ol\",\n  \"optgroup\",\n  \"option\",\n  \"output\",\n  \"p\",\n  \"picture\",\n  \"pre\",\n  \"progress\",\n  \"q\",\n  \"rp\",\n  \"rt\",\n  \"ruby\",\n  \"s\",\n  \"samp\",\n  \"script\",\n  \"section\",\n  \"select\",\n  \"slot\",\n  \"small\",\n  \"source\",\n  \"span\",\n  \"strong\",\n  \"style\",\n  \"sub\",\n  \"summary\",\n  \"sup\",\n  \"table\",\n  \"tbody\",\n  \"td\",\n  \"template\",\n  \"textarea\",\n  \"tfoot\",\n  \"th\",\n  \"thead\",\n  \"time\",\n  \"title\",\n  \"tr\",\n  \"track\",\n  \"u\",\n  \"ul\",\n  \"var\",\n  \"video\",\n  \"wbr\",\n  \"acronym\",\n  \"applet\",\n  \"basefont\",\n  \"bgsound\",\n  \"big\",\n  \"blink\",\n  \"center\",\n  \"dir\",\n  \"font\",\n  \"frame\",\n  \"frameset\",\n  \"isindex\",\n  \"keygen\",\n  \"listing\",\n  \"marquee\",\n  \"menuitem\",\n  \"multicol\",\n  \"nextid\",\n  \"nobr\",\n  \"noembed\",\n  \"noframes\",\n  \"param\",\n  \"plaintext\",\n  \"rb\",\n  \"rtc\",\n  \"spacer\",\n  \"strike\",\n  \"tt\",\n  \"xmp\",\n  \"animate\",\n  \"animateMotion\",\n  \"animateTransform\",\n  \"circle\",\n  \"clipPath\",\n  \"defs\",\n  \"desc\",\n  \"ellipse\",\n  \"feBlend\",\n  \"feColorMatrix\",\n  \"feComponentTransfer\",\n  \"feComposite\",\n  \"feConvolveMatrix\",\n  \"feDiffuseLighting\",\n  \"feDisplacementMap\",\n  \"feDistantLight\",\n  \"feDropShadow\",\n  \"feFlood\",\n  \"feFuncA\",\n  \"feFuncB\",\n  \"feFuncG\",\n  \"feFuncR\",\n  \"feGaussianBlur\",\n  \"feImage\",\n  \"feMerge\",\n  \"feMergeNode\",\n  \"feMorphology\",\n  \"feOffset\",\n  \"fePointLight\",\n  \"feSpecularLighting\",\n  \"feSpotLight\",\n  \"feTile\",\n  \"feTurbulence\",\n  \"filter\",\n  \"foreignObject\",\n  \"g\",\n  \"image\",\n  \"line\",\n  \"linearGradient\",\n  \"marker\",\n  \"mask\",\n  \"metadata\",\n  \"mpath\",\n  \"path\",\n  \"pattern\",\n  \"polygon\",\n  \"polyline\",\n  \"radialGradient\",\n  \"rect\",\n  \"set\",\n  \"stop\",\n  \"svg\",\n  \"switch\",\n  \"symbol\",\n  \"text\",\n  \"textPath\",\n  \"tspan\",\n  \"use\",\n  \"view\",\n]\n\nexport const availableDecoNames = [\n  \"Static\",\n  \"Prop\",\n  \"Env\",\n  \"Content\",\n  \"Children\",\n]\nexport const dlightDefaultPackageName = \"@dlightjs/dlight\"\n\nexport const importMap = Object.fromEntries(\n  [\n    \"createElement\",\n    \"setStyle\",\n    \"setDataset\",\n    \"setEvent\",\n    \"delegateEvent\",\n    \"setHTMLProp\",\n    \"setHTMLAttr\",\n    \"setHTMLProps\",\n    \"setHTMLAttrs\",\n    \"createTextNode\",\n    \"updateText\",\n    \"insertNode\",\n    \"ForNode\",\n    \"CondNode\",\n    \"ExpNode\",\n    \"EnvNode\",\n    \"TryNode\",\n    \"SnippetNode\",\n    \"PropView\",\n    \"render\",\n  ].map(name => [name, `$$${name}`])\n)\n\nexport const importsToDelete = [\n  \"Static\",\n  \"Children\",\n  \"Content\",\n  \"Prop\",\n  \"Env\",\n  \"Watch\",\n  \"ForwardProps\",\n  \"Main\",\n  \"App\",\n  \"Mount\",\n  \"_\",\n  \"env\",\n  \"Snippet\",\n  ...defaultHTMLTags.filter(tag => tag !== \"use\"),\n]\n\n/**\n * @brief HTML internal attribute map, can be accessed as js property\n */\nexport const defaultAttributeMap = {\n  // ---- Other property as attribute\n  textContent: [\"*\"],\n  innerHTML: [\"*\"],\n  // ---- Source: https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes\n  accept: [\"form\", \"input\"],\n  // ---- Original: accept-charset\n  acceptCharset: [\"form\"],\n  accesskey: [\"*\"],\n  action: [\"form\"],\n  align: [\n    \"caption\",\n    \"col\",\n    \"colgroup\",\n    \"hr\",\n    \"iframe\",\n    \"img\",\n    \"table\",\n    \"tbody\",\n    \"td\",\n    \"tfoot\",\n    \"th\",\n    \"thead\",\n    \"tr\",\n  ],\n  allow: [\"iframe\"],\n  alt: [\"area\", \"img\", \"input\"],\n  async: [\"script\"],\n  autocapitalize: [\"*\"],\n  autocomplete: [\"form\", \"input\", \"select\", \"textarea\"],\n  autofocus: [\"button\", \"input\", \"select\", \"textarea\"],\n  autoplay: [\"audio\", \"video\"],\n  background: [\"body\", \"table\", \"td\", \"th\"],\n  // ---- Original: base\n  bgColor: [\n    \"body\",\n    \"col\",\n    \"colgroup\",\n    \"marquee\",\n    \"table\",\n    \"tbody\",\n    \"tfoot\",\n    \"td\",\n    \"th\",\n    \"tr\",\n  ],\n  border: [\"img\", \"object\", \"table\"],\n  buffered: [\"audio\", \"video\"],\n  capture: [\"input\"],\n  charset: [\"meta\"],\n  checked: [\"input\"],\n  cite: [\"blockquote\", \"del\", \"ins\", \"q\"],\n  className: [\"*\"],\n  color: [\"font\", \"hr\"],\n  cols: [\"textarea\"],\n  // ---- Original: colspan\n  colSpan: [\"td\", \"th\"],\n  content: [\"meta\"],\n  // ---- Original: contenteditable\n  contentEditable: [\"*\"],\n  contextmenu: [\"*\"],\n  controls: [\"audio\", \"video\"],\n  coords: [\"area\"],\n  crossOrigin: [\"audio\", \"img\", \"link\", \"script\", \"video\"],\n  csp: [\"iframe\"],\n  data: [\"object\"],\n  // ---- Original: datetime\n  dateTime: [\"del\", \"ins\", \"time\"],\n  decoding: [\"img\"],\n  default: [\"track\"],\n  defer: [\"script\"],\n  dir: [\"*\"],\n  dirname: [\"input\", \"textarea\"],\n  disabled: [\n    \"button\",\n    \"fieldset\",\n    \"input\",\n    \"optgroup\",\n    \"option\",\n    \"select\",\n    \"textarea\",\n  ],\n  download: [\"a\", \"area\"],\n  draggable: [\"*\"],\n  enctype: [\"form\"],\n  // ---- Original: enterkeyhint\n  enterKeyHint: [\"textarea\", \"contenteditable\"],\n  htmlFor: [\"label\", \"output\"],\n  form: [\n    \"button\",\n    \"fieldset\",\n    \"input\",\n    \"label\",\n    \"meter\",\n    \"object\",\n    \"output\",\n    \"progress\",\n    \"select\",\n    \"textarea\",\n  ],\n  // ---- Original: formaction\n  formAction: [\"input\", \"button\"],\n  // ---- Original: formenctype\n  formEnctype: [\"button\", \"input\"],\n  // ---- Original: formmethod\n  formMethod: [\"button\", \"input\"],\n  // ---- Original: formnovalidate\n  formNoValidate: [\"button\", \"input\"],\n  // ---- Original: formtarget\n  formTarget: [\"button\", \"input\"],\n  headers: [\"td\", \"th\"],\n  height: [\"canvas\", \"embed\", \"iframe\", \"img\", \"input\", \"object\", \"video\"],\n  hidden: [\"*\"],\n  high: [\"meter\"],\n  href: [\"a\", \"area\", \"base\", \"link\"],\n  hreflang: [\"a\", \"link\"],\n  // ---- Original: http-equiv\n  httpEquiv: [\"meta\"],\n  id: [\"*\"],\n  integrity: [\"link\", \"script\"],\n  // ---- Original: intrinsicsize\n  intrinsicSize: [\"img\"],\n  // ---- Original: inputmode\n  inputMode: [\"textarea\", \"contenteditable\"],\n  ismap: [\"img\"],\n  // ---- Original: itemprop\n  itemProp: [\"*\"],\n  kind: [\"track\"],\n  label: [\"optgroup\", \"option\", \"track\"],\n  lang: [\"*\"],\n  language: [\"script\"],\n  loading: [\"img\", \"iframe\"],\n  list: [\"input\"],\n  loop: [\"audio\", \"marquee\", \"video\"],\n  low: [\"meter\"],\n  manifest: [\"html\"],\n  max: [\"input\", \"meter\", \"progress\"],\n  // ---- Original: maxlength\n  maxLength: [\"input\", \"textarea\"],\n  // ---- Original: minlength\n  minLength: [\"input\", \"textarea\"],\n  media: [\"a\", \"area\", \"link\", \"source\", \"style\"],\n  method: [\"form\"],\n  min: [\"input\", \"meter\"],\n  multiple: [\"input\", \"select\"],\n  muted: [\"audio\", \"video\"],\n  name: [\n    \"button\",\n    \"form\",\n    \"fieldset\",\n    \"iframe\",\n    \"input\",\n    \"object\",\n    \"output\",\n    \"select\",\n    \"textarea\",\n    \"map\",\n    \"meta\",\n    \"param\",\n  ],\n  // ---- Original: novalidate\n  noValidate: [\"form\"],\n  open: [\"details\", \"dialog\"],\n  optimum: [\"meter\"],\n  pattern: [\"input\"],\n  ping: [\"a\", \"area\"],\n  placeholder: [\"input\", \"textarea\"],\n  // ---- Original: playsinline\n  playsInline: [\"video\"],\n  poster: [\"video\"],\n  preload: [\"audio\", \"video\"],\n  readonly: [\"input\", \"textarea\"],\n  // ---- Original: referrerpolicy\n  referrerPolicy: [\"a\", \"area\", \"iframe\", \"img\", \"link\", \"script\"],\n  rel: [\"a\", \"area\", \"link\"],\n  required: [\"input\", \"select\", \"textarea\"],\n  reversed: [\"ol\"],\n  role: [\"*\"],\n  rows: [\"textarea\"],\n  // ---- Original: rowspan\n  rowSpan: [\"td\", \"th\"],\n  sandbox: [\"iframe\"],\n  scope: [\"th\"],\n  scoped: [\"style\"],\n  selected: [\"option\"],\n  shape: [\"a\", \"area\"],\n  size: [\"input\", \"select\"],\n  sizes: [\"link\", \"img\", \"source\"],\n  slot: [\"*\"],\n  span: [\"col\", \"colgroup\"],\n  spellcheck: [\"*\"],\n  src: [\n    \"audio\",\n    \"embed\",\n    \"iframe\",\n    \"img\",\n    \"input\",\n    \"script\",\n    \"source\",\n    \"track\",\n    \"video\",\n  ],\n  srcdoc: [\"iframe\"],\n  srclang: [\"track\"],\n  srcset: [\"img\", \"source\"],\n  start: [\"ol\"],\n  step: [\"input\"],\n  style: [\"*\"],\n  summary: [\"table\"],\n  // ---- Original: tabindex\n  tabIndex: [\"*\"],\n  target: [\"a\", \"area\", \"base\", \"form\"],\n  title: [\"*\"],\n  translate: [\"*\"],\n  type: [\n    \"button\",\n    \"input\",\n    \"embed\",\n    \"object\",\n    \"ol\",\n    \"script\",\n    \"source\",\n    \"style\",\n    \"menu\",\n    \"link\",\n  ],\n  usemap: [\"img\", \"input\", \"object\"],\n  value: [\n    \"button\",\n    \"data\",\n    \"input\",\n    \"li\",\n    \"meter\",\n    \"option\",\n    \"progress\",\n    \"param\",\n    \"text\" /** extra for TextNode */,\n  ],\n  width: [\"canvas\", \"embed\", \"iframe\", \"img\", \"input\", \"object\", \"video\"],\n  wrap: [\"textarea\"],\n  // --- ARIA attributes\n  //     Source: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes\n  ariaAutocomplete: [\"*\"],\n  ariaChecked: [\"*\"],\n  ariaDisabled: [\"*\"],\n  ariaErrorMessage: [\"*\"],\n  ariaExpanded: [\"*\"],\n  ariaHasPopup: [\"*\"],\n  ariaHidden: [\"*\"],\n  ariaInvalid: [\"*\"],\n  ariaLabel: [\"*\"],\n  ariaLevel: [\"*\"],\n  ariaModal: [\"*\"],\n  ariaMultiline: [\"*\"],\n  ariaMultiSelectable: [\"*\"],\n  ariaOrientation: [\"*\"],\n  ariaPlaceholder: [\"*\"],\n  ariaPressed: [\"*\"],\n  ariaReadonly: [\"*\"],\n  ariaRequired: [\"*\"],\n  ariaSelected: [\"*\"],\n  ariaSort: [\"*\"],\n  ariaValuemax: [\"*\"],\n  ariaValuemin: [\"*\"],\n  ariaValueNow: [\"*\"],\n  ariaValueText: [\"*\"],\n  ariaBusy: [\"*\"],\n  ariaLive: [\"*\"],\n  ariaRelevant: [\"*\"],\n  ariaAtomic: [\"*\"],\n  ariaDropEffect: [\"*\"],\n  ariaGrabbed: [\"*\"],\n  ariaActiveDescendant: [\"*\"],\n  ariaColCount: [\"*\"],\n  ariaColIndex: [\"*\"],\n  ariaColSpan: [\"*\"],\n  ariaControls: [\"*\"],\n  ariaDescribedBy: [\"*\"],\n  ariaDescription: [\"*\"],\n  ariaDetails: [\"*\"],\n  ariaFlowTo: [\"*\"],\n  ariaLabelledBy: [\"*\"],\n  ariaOwns: [\"*\"],\n  ariaPosInset: [\"*\"],\n  ariaRowCount: [\"*\"],\n  ariaRowIndex: [\"*\"],\n  ariaRowSpan: [\"*\"],\n  ariaSetSize: [\"*\"],\n}\n","import type babel from \"@babel/core\"\nimport { type PluginObj } from \"@babel/core\"\nimport { PluginProviderClass } from \"./pluginProvider\"\nimport { type DLightOption } from \"./types\"\nimport { defaultAttributeMap } from \"./const\"\n\nexport default function (api: typeof babel, options: DLightOption): PluginObj {\n  const { types } = api\n  const {\n    files = \"**/*.{js,ts}\",\n    excludeFiles = \"**/{dist,node_modules,lib}/*\",\n    enableDevTools = false,\n    htmlTags = defaultHtmlTags => defaultHtmlTags,\n    attributeMap = defaultAttributeMap,\n  } = options\n\n  const pluginProvider = new PluginProviderClass(\n    api,\n    types,\n    Array.isArray(files) ? files : [files],\n    Array.isArray(excludeFiles) ? excludeFiles : [excludeFiles],\n    enableDevTools,\n    htmlTags,\n    attributeMap\n  )\n\n  return {\n    visitor: {\n      Program: {\n        enter(path, { filename }) {\n          return pluginProvider.programEnterVisitor(path, filename)\n        },\n        exit: pluginProvider.programExitVisitor.bind(pluginProvider),\n      },\n      ClassDeclaration: {\n        enter: pluginProvider.classEnter.bind(pluginProvider),\n        exit: pluginProvider.classExit.bind(pluginProvider),\n      },\n      ClassMethod: pluginProvider.classMethodVisitor.bind(pluginProvider),\n      ClassProperty: pluginProvider.classPropertyVisitor.bind(pluginProvider),\n    },\n  }\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA6B,mDAC7BC,EAA6B,gDCM7B,IAAAC,EAA0B,qBAC1BC,EAA0B,iCAC1BC,EAAgC,uCAChCC,EAA8C,oCCVvC,IAAMC,EAAU,QAAQ,IAAI,WAAa,cAEnCC,EAAoB,CAC/B,MAAO,YACP,IAAK,SACP,EAEaC,EAAsB,CAEjC,OACA,MACA,QACA,UACA,SACA,OACA,UAEA,MACA,SACA,QAEA,MACA,SACA,OACF,EAEaC,EAAkB,CAC7B,IACA,OACA,UACA,OACA,UACA,QACA,QACA,IACA,OACA,MACA,MACA,aACA,OACA,KACA,SACA,SACA,UACA,OACA,OACA,MACA,WACA,OACA,WACA,KACA,MACA,UACA,MACA,SACA,MACA,KACA,KACA,KACA,QACA,WACA,aACA,SACA,SACA,OACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,SACA,KACA,OACA,IACA,SACA,MACA,QACA,MACA,MACA,QACA,SACA,KACA,OACA,OACA,MACA,OACA,OACA,OACA,QACA,MACA,WACA,SACA,KACA,WACA,SACA,SACA,IACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,SACA,UACA,SACA,OACA,QACA,SACA,OACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OACA,QACA,KACA,QACA,IACA,KACA,MACA,QACA,MACA,UACA,SACA,WACA,UACA,MACA,QACA,SACA,MACA,OACA,QACA,WACA,UACA,SACA,UACA,UACA,WACA,WACA,SACA,OACA,UACA,WACA,QACA,YACA,KACA,MACA,SACA,SACA,KACA,MACA,UACA,gBACA,mBACA,SACA,WACA,OACA,OACA,UACA,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,eACA,SACA,gBACA,IACA,QACA,OACA,iBACA,SACA,OACA,WACA,QACA,OACA,UACA,UACA,WACA,iBACA,OACA,MACA,OACA,MACA,SACA,SACA,OACA,WACA,QACA,MACA,MACF,EAEaC,EAAqB,CAChC,SACA,OACA,MACA,UACA,UACF,EACaC,EAA2B,mBAE3BC,EAAY,OAAO,YAC9B,CACE,gBACA,WACA,aACA,WACA,gBACA,cACA,cACA,eACA,eACA,iBACA,aACA,aACA,UACA,WACA,UACA,UACA,UACA,cACA,WACA,QACF,EAAE,IAAIC,GAAQ,CAACA,EAAM,KAAKA,CAAI,EAAE,CAAC,CACnC,EAEaC,EAAkB,CAC7B,SACA,WACA,UACA,OACA,MACA,QACA,e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E,CACF,EAEA,MAAO,CACL,QAAS,CACP,QAAS,CACP,MAAMI,EAAM,CAAE,SAAAC,CAAS,EAAG,CACxB,OAAOH,EAAe,oBAAoBE,EAAMC,CAAQ,CAC1D,EACA,KAAMH,EAAe,mBAAmB,KAAKA,CAAc,CAC7D,EACA,iBAAkB,CAChB,MAAOA,EAAe,WAAW,KAAKA,CAAc,EACpD,KAAMA,EAAe,UAAU,KAAKA,CAAc,CACpD,EACA,YAAaA,EAAe,mBAAmB,KAAKA,CAAc,EAClE,cAAeA,EAAe,qBAAqB,KAAKA,CAAc,CACxE,CACF,CACF,CHpCe,SAARI,EACLC,EACAC,EACkB,CAClB,MAAO,CACL,QAAS,CACP,EAAAC,QACA,CAAC,EAAAC,QAAiB,SAAW,EAAAA,QAAkB,CAAE,OAAQ,EAAK,CAAC,EAC/D,CAACC,EAAQH,CAAO,CAClB,CACF,CACF","names":["index_exports","__export","index_default","__toCommonJS","import_babel_plugin_syntax_typescript_new","import_plugin_syntax_decorators","import_minimatch","import_view_parser","import_reactivity_parser","import_view_generator","devMode","alterAttributeMap","reactivityFuncNames","defaultHTMLTags","availableDecoNames","dlightDefaultPackageName","importMap","name","importsToDelete","tag","defaultAttributeMap","PluginProvider","_PluginProvider","dlightDefaultPackageName","babelApi","types","includes","excludes","enableDevTools","htmlTags","attributeMap","devMode","defaultHTMLTags","tag","key","isWatcher","isStatic","isChildren","path","node","dlightImports","n","importNode","specifier","importsToDelete","importMap","value","filename","watchDeco","deps","depsNode","listenDepStrings","arg","pseudoMethod","str","decorators","isModel","isProp","isEnv","availableDecoNames","propertyIdx","watcherNode","childrenFuncCallNode","getterNode","derivedStatusKey","decoratorName","idx","reverseDeps","idxNode","d","usedProperties","propertyArr","depReversedMap","isPropOrEnv","isContent","newUpdateProp","assignPath","funcNameNode","reactivityFuncNames","callee","usedPropertySet","mainView","snippetNodes","viewNode","isSnippet","isMainView","exp","newViewNode","snippetNames","v","snippetPropSubDepMap","prop","props","p","subDeps","_","templateIdx","viewUnits","viewParticles","body","classProperties","alterAttributeMap","snippetProp","identifierDepMap","dep","viewParticlesProperty","viewParticlesIdentifier","snippetPropMap","newTemplateIdx","fileName","pattern","deco","imp","s","args","propsArg","contentArg","propsNode","mergedPropsNode","spreadPropsNode","contentNode","modelDecorator","names","name","parentPath","pParentPath","depNode","innerPath","constructor","isClassLevel","assignDeps","depNodes","propertyKey","dependencyNodes","i","m","depArr","wrappedNode","reversedMap","findEntry","found","entryValue","mountNode","mounting","parentNode","propertyNode","methodNode","currentNode","returns","inNestedFunction","newNode","idName","reversePath","checkParam","param","el","identifierKeys","leftPath","stopNode","isInFunction","isFunction","isManual","length","PluginProviderClass","plugin_default","api","options","types","files","excludeFiles","enableDevTools","htmlTags","defaultHtmlTags","attributeMap","defaultAttributeMap","pluginProvider","PluginProviderClass","path","filename","index_default","_","options","syntaxTypescript","syntaxDecorators","plugin_default"]}