| | |
| | | /** |
| | | * @vue/compiler-dom v3.5.25 |
| | | * @vue/compiler-dom v3.5.32 |
| | | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| | | * @license MIT |
| | | **/ |
| | |
| | | const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); |
| | | const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); |
| | | |
| | | const FRAGMENT = Symbol(`Fragment` ); |
| | | const TELEPORT = Symbol(`Teleport` ); |
| | | const SUSPENSE = Symbol(`Suspense` ); |
| | | const KEEP_ALIVE = Symbol(`KeepAlive` ); |
| | | const BASE_TRANSITION = Symbol( |
| | | const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` ); |
| | | const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` ); |
| | | const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` ); |
| | | const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` ); |
| | | const BASE_TRANSITION = /* @__PURE__ */ Symbol( |
| | | `BaseTransition` |
| | | ); |
| | | const OPEN_BLOCK = Symbol(`openBlock` ); |
| | | const CREATE_BLOCK = Symbol(`createBlock` ); |
| | | const CREATE_ELEMENT_BLOCK = Symbol( |
| | | const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` ); |
| | | const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` ); |
| | | const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol( |
| | | `createElementBlock` |
| | | ); |
| | | const CREATE_VNODE = Symbol(`createVNode` ); |
| | | const CREATE_ELEMENT_VNODE = Symbol( |
| | | const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` ); |
| | | const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol( |
| | | `createElementVNode` |
| | | ); |
| | | const CREATE_COMMENT = Symbol( |
| | | const CREATE_COMMENT = /* @__PURE__ */ Symbol( |
| | | `createCommentVNode` |
| | | ); |
| | | const CREATE_TEXT = Symbol( |
| | | const CREATE_TEXT = /* @__PURE__ */ Symbol( |
| | | `createTextVNode` |
| | | ); |
| | | const CREATE_STATIC = Symbol( |
| | | const CREATE_STATIC = /* @__PURE__ */ Symbol( |
| | | `createStaticVNode` |
| | | ); |
| | | const RESOLVE_COMPONENT = Symbol( |
| | | const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol( |
| | | `resolveComponent` |
| | | ); |
| | | const RESOLVE_DYNAMIC_COMPONENT = Symbol( |
| | | const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol( |
| | | `resolveDynamicComponent` |
| | | ); |
| | | const RESOLVE_DIRECTIVE = Symbol( |
| | | const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol( |
| | | `resolveDirective` |
| | | ); |
| | | const RESOLVE_FILTER = Symbol( |
| | | const RESOLVE_FILTER = /* @__PURE__ */ Symbol( |
| | | `resolveFilter` |
| | | ); |
| | | const WITH_DIRECTIVES = Symbol( |
| | | const WITH_DIRECTIVES = /* @__PURE__ */ Symbol( |
| | | `withDirectives` |
| | | ); |
| | | const RENDER_LIST = Symbol(`renderList` ); |
| | | const RENDER_SLOT = Symbol(`renderSlot` ); |
| | | const CREATE_SLOTS = Symbol(`createSlots` ); |
| | | const TO_DISPLAY_STRING = Symbol( |
| | | const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` ); |
| | | const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` ); |
| | | const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` ); |
| | | const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol( |
| | | `toDisplayString` |
| | | ); |
| | | const MERGE_PROPS = Symbol(`mergeProps` ); |
| | | const NORMALIZE_CLASS = Symbol( |
| | | const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` ); |
| | | const NORMALIZE_CLASS = /* @__PURE__ */ Symbol( |
| | | `normalizeClass` |
| | | ); |
| | | const NORMALIZE_STYLE = Symbol( |
| | | const NORMALIZE_STYLE = /* @__PURE__ */ Symbol( |
| | | `normalizeStyle` |
| | | ); |
| | | const NORMALIZE_PROPS = Symbol( |
| | | const NORMALIZE_PROPS = /* @__PURE__ */ Symbol( |
| | | `normalizeProps` |
| | | ); |
| | | const GUARD_REACTIVE_PROPS = Symbol( |
| | | const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol( |
| | | `guardReactiveProps` |
| | | ); |
| | | const TO_HANDLERS = Symbol(`toHandlers` ); |
| | | const CAMELIZE = Symbol(`camelize` ); |
| | | const CAPITALIZE = Symbol(`capitalize` ); |
| | | const TO_HANDLER_KEY = Symbol( |
| | | const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` ); |
| | | const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` ); |
| | | const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` ); |
| | | const TO_HANDLER_KEY = /* @__PURE__ */ Symbol( |
| | | `toHandlerKey` |
| | | ); |
| | | const SET_BLOCK_TRACKING = Symbol( |
| | | const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol( |
| | | `setBlockTracking` |
| | | ); |
| | | const PUSH_SCOPE_ID = Symbol(`pushScopeId` ); |
| | | const POP_SCOPE_ID = Symbol(`popScopeId` ); |
| | | const WITH_CTX = Symbol(`withCtx` ); |
| | | const UNREF = Symbol(`unref` ); |
| | | const IS_REF = Symbol(`isRef` ); |
| | | const WITH_MEMO = Symbol(`withMemo` ); |
| | | const IS_MEMO_SAME = Symbol(`isMemoSame` ); |
| | | const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` ); |
| | | const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` ); |
| | | const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` ); |
| | | const UNREF = /* @__PURE__ */ Symbol(`unref` ); |
| | | const IS_REF = /* @__PURE__ */ Symbol(`isRef` ); |
| | | const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` ); |
| | | const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` ); |
| | | const helperNameMap = { |
| | | [FRAGMENT]: `Fragment`, |
| | | [TELEPORT]: `Teleport`, |
| | |
| | | getPos(index) { |
| | | let line = 1; |
| | | let column = index + 1; |
| | | for (let i = this.newlines.length - 1; i >= 0; i--) { |
| | | const newlineIndex = this.newlines[i]; |
| | | if (index > newlineIndex) { |
| | | line = i + 2; |
| | | column = index - newlineIndex; |
| | | break; |
| | | const length = this.newlines.length; |
| | | let j = -1; |
| | | if (length > 100) { |
| | | let l = -1; |
| | | let r = length; |
| | | while (l + 1 < r) { |
| | | const m = l + r >>> 1; |
| | | this.newlines[m] < index ? l = m : r = m; |
| | | } |
| | | j = l; |
| | | } else { |
| | | for (let i = length - 1; i >= 0; i--) { |
| | | if (index > this.newlines[i]) { |
| | | j = i; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (j >= 0) { |
| | | line = j + 2; |
| | | column = index - this.newlines[j]; |
| | | } |
| | | return { |
| | | column, |
| | |
| | | "43": "X_V_MODEL_ON_SCOPE_VARIABLE", |
| | | "X_V_MODEL_ON_PROPS": 44, |
| | | "44": "X_V_MODEL_ON_PROPS", |
| | | "X_INVALID_EXPRESSION": 45, |
| | | "45": "X_INVALID_EXPRESSION", |
| | | "X_KEEP_ALIVE_INVALID_CHILDREN": 46, |
| | | "46": "X_KEEP_ALIVE_INVALID_CHILDREN", |
| | | "X_PREFIX_ID_NOT_SUPPORTED": 47, |
| | | "47": "X_PREFIX_ID_NOT_SUPPORTED", |
| | | "X_MODULE_MODE_NOT_SUPPORTED": 48, |
| | | "48": "X_MODULE_MODE_NOT_SUPPORTED", |
| | | "X_CACHE_HANDLER_NOT_SUPPORTED": 49, |
| | | "49": "X_CACHE_HANDLER_NOT_SUPPORTED", |
| | | "X_SCOPE_ID_NOT_SUPPORTED": 50, |
| | | "50": "X_SCOPE_ID_NOT_SUPPORTED", |
| | | "X_VNODE_HOOKS": 51, |
| | | "51": "X_VNODE_HOOKS", |
| | | "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52, |
| | | "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", |
| | | "__EXTEND_POINT__": 53, |
| | | "53": "__EXTEND_POINT__" |
| | | "X_V_MODEL_ON_CONST": 45, |
| | | "45": "X_V_MODEL_ON_CONST", |
| | | "X_INVALID_EXPRESSION": 46, |
| | | "46": "X_INVALID_EXPRESSION", |
| | | "X_KEEP_ALIVE_INVALID_CHILDREN": 47, |
| | | "47": "X_KEEP_ALIVE_INVALID_CHILDREN", |
| | | "X_PREFIX_ID_NOT_SUPPORTED": 48, |
| | | "48": "X_PREFIX_ID_NOT_SUPPORTED", |
| | | "X_MODULE_MODE_NOT_SUPPORTED": 49, |
| | | "49": "X_MODULE_MODE_NOT_SUPPORTED", |
| | | "X_CACHE_HANDLER_NOT_SUPPORTED": 50, |
| | | "50": "X_CACHE_HANDLER_NOT_SUPPORTED", |
| | | "X_SCOPE_ID_NOT_SUPPORTED": 51, |
| | | "51": "X_SCOPE_ID_NOT_SUPPORTED", |
| | | "X_VNODE_HOOKS": 52, |
| | | "52": "X_VNODE_HOOKS", |
| | | "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53, |
| | | "53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT", |
| | | "__EXTEND_POINT__": 54, |
| | | "54": "__EXTEND_POINT__" |
| | | }; |
| | | const errorMessages = { |
| | | // parse errors |
| | |
| | | [32]: `v-for has invalid expression.`, |
| | | [33]: `<template v-for> key should be placed on the <template> tag.`, |
| | | [34]: `v-bind is missing expression.`, |
| | | [52]: `v-bind with same-name shorthand only allows static argument.`, |
| | | [53]: `v-bind with same-name shorthand only allows static argument.`, |
| | | [35]: `v-on is missing expression.`, |
| | | [36]: `Unexpected custom directive on <slot> outlet.`, |
| | | [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, |
| | |
| | | [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, |
| | | [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. |
| | | Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, |
| | | [45]: `Error parsing JavaScript expression: `, |
| | | [46]: `<KeepAlive> expects exactly one child component.`, |
| | | [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, |
| | | [45]: `v-model cannot be used on a const binding because it is not writable.`, |
| | | [46]: `Error parsing JavaScript expression: `, |
| | | [47]: `<KeepAlive> expects exactly one child component.`, |
| | | [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, |
| | | // generic errors |
| | | [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, |
| | | [48]: `ES module mode is not supported in this build of compiler.`, |
| | | [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, |
| | | [50]: `"scopeId" option is only supported in module mode.`, |
| | | [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`, |
| | | [49]: `ES module mode is not supported in this build of compiler.`, |
| | | [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, |
| | | [51]: `"scopeId" option is only supported in module mode.`, |
| | | // just to fulfill types |
| | | [53]: `` |
| | | [54]: `` |
| | | }; |
| | | |
| | | function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { |
| | |
| | | } |
| | | context.onError( |
| | | createCompilerError( |
| | | 45, |
| | | 46, |
| | | node.loc, |
| | | void 0, |
| | | message |
| | |
| | | loop.body = createBlockStatement([ |
| | | createCompoundExpression([`const _memo = (`, memo.exp, `)`]), |
| | | createCompoundExpression([ |
| | | `if (_cached`, |
| | | `if (_cached && _cached.el`, |
| | | ...keyExp ? [` && _cached.key === `, keyExp] : [], |
| | | ` && ${context.helperString( |
| | | IS_MEMO_SAME |
| | |
| | | patchFlag |= 1024; |
| | | if (node.children.length > 1) { |
| | | context.onError( |
| | | createCompilerError(46, { |
| | | createCompilerError(47, { |
| | | start: node.children[0].loc.start, |
| | | end: node.children[node.children.length - 1].loc.end, |
| | | source: "" |
| | |
| | | if (arg.isStatic) { |
| | | let rawName = arg.content; |
| | | if (rawName.startsWith("vnode")) { |
| | | context.onError(createCompilerError(51, arg.loc)); |
| | | context.onError(createCompilerError(52, arg.loc)); |
| | | } |
| | | if (rawName.startsWith("vue:")) { |
| | | rawName = `vnode-${rawName.slice(4)}`; |
| | |
| | | context.onError(createCompilerError(44, exp.loc)); |
| | | return createTransformProps(); |
| | | } |
| | | if (bindingType === "literal-const" || bindingType === "setup-const") { |
| | | context.onError(createCompilerError(45, exp.loc)); |
| | | return createTransformProps(); |
| | | } |
| | | if (!expString.trim() || !isMemberExpression(exp) && true) { |
| | | context.onError( |
| | | createCompilerError(42, exp.loc) |
| | |
| | | if (arg.type !== 4 || !arg.isStatic) { |
| | | context.onError( |
| | | createCompilerError( |
| | | 52, |
| | | 53, |
| | | arg.loc |
| | | ) |
| | | ); |
| | |
| | | const isModuleMode = options.mode === "module"; |
| | | { |
| | | if (options.prefixIdentifiers === true) { |
| | | onError(createCompilerError(47)); |
| | | } else if (isModuleMode) { |
| | | onError(createCompilerError(48)); |
| | | } else if (isModuleMode) { |
| | | onError(createCompilerError(49)); |
| | | } |
| | | } |
| | | const prefixIdentifiers = false; |
| | | if (options.cacheHandlers) { |
| | | onError(createCompilerError(49)); |
| | | onError(createCompilerError(50)); |
| | | } |
| | | if (options.scopeId && !isModuleMode) { |
| | | onError(createCompilerError(50)); |
| | | onError(createCompilerError(51)); |
| | | } |
| | | const resolvedOptions = extend({}, options, { |
| | | prefixIdentifiers |
| | |
| | | |
| | | const noopDirectiveTransform = () => ({ props: [] }); |
| | | |
| | | const V_MODEL_RADIO = Symbol(`vModelRadio` ); |
| | | const V_MODEL_CHECKBOX = Symbol( |
| | | const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` ); |
| | | const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol( |
| | | `vModelCheckbox` |
| | | ); |
| | | const V_MODEL_TEXT = Symbol(`vModelText` ); |
| | | const V_MODEL_SELECT = Symbol( |
| | | const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` ); |
| | | const V_MODEL_SELECT = /* @__PURE__ */ Symbol( |
| | | `vModelSelect` |
| | | ); |
| | | const V_MODEL_DYNAMIC = Symbol( |
| | | const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol( |
| | | `vModelDynamic` |
| | | ); |
| | | const V_ON_WITH_MODIFIERS = Symbol( |
| | | const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol( |
| | | `vOnModifiersGuard` |
| | | ); |
| | | const V_ON_WITH_KEYS = Symbol( |
| | | const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol( |
| | | `vOnKeysGuard` |
| | | ); |
| | | const V_SHOW = Symbol(`vShow` ); |
| | | const TRANSITION = Symbol(`Transition` ); |
| | | const TRANSITION_GROUP = Symbol( |
| | | const V_SHOW = /* @__PURE__ */ Symbol(`vShow` ); |
| | | const TRANSITION = /* @__PURE__ */ Symbol(`Transition` ); |
| | | const TRANSITION_GROUP = /* @__PURE__ */ Symbol( |
| | | `TransitionGroup` |
| | | ); |
| | | registerRuntimeHelpers({ |
| | |
| | | ); |
| | | } |
| | | const DOMErrorCodes = { |
| | | "X_V_HTML_NO_EXPRESSION": 53, |
| | | "53": "X_V_HTML_NO_EXPRESSION", |
| | | "X_V_HTML_WITH_CHILDREN": 54, |
| | | "54": "X_V_HTML_WITH_CHILDREN", |
| | | "X_V_TEXT_NO_EXPRESSION": 55, |
| | | "55": "X_V_TEXT_NO_EXPRESSION", |
| | | "X_V_TEXT_WITH_CHILDREN": 56, |
| | | "56": "X_V_TEXT_WITH_CHILDREN", |
| | | "X_V_MODEL_ON_INVALID_ELEMENT": 57, |
| | | "57": "X_V_MODEL_ON_INVALID_ELEMENT", |
| | | "X_V_MODEL_ARG_ON_ELEMENT": 58, |
| | | "58": "X_V_MODEL_ARG_ON_ELEMENT", |
| | | "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, |
| | | "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", |
| | | "X_V_MODEL_UNNECESSARY_VALUE": 60, |
| | | "60": "X_V_MODEL_UNNECESSARY_VALUE", |
| | | "X_V_SHOW_NO_EXPRESSION": 61, |
| | | "61": "X_V_SHOW_NO_EXPRESSION", |
| | | "X_TRANSITION_INVALID_CHILDREN": 62, |
| | | "62": "X_TRANSITION_INVALID_CHILDREN", |
| | | "X_IGNORED_SIDE_EFFECT_TAG": 63, |
| | | "63": "X_IGNORED_SIDE_EFFECT_TAG", |
| | | "__EXTEND_POINT__": 64, |
| | | "64": "__EXTEND_POINT__" |
| | | "X_V_HTML_NO_EXPRESSION": 54, |
| | | "54": "X_V_HTML_NO_EXPRESSION", |
| | | "X_V_HTML_WITH_CHILDREN": 55, |
| | | "55": "X_V_HTML_WITH_CHILDREN", |
| | | "X_V_TEXT_NO_EXPRESSION": 56, |
| | | "56": "X_V_TEXT_NO_EXPRESSION", |
| | | "X_V_TEXT_WITH_CHILDREN": 57, |
| | | "57": "X_V_TEXT_WITH_CHILDREN", |
| | | "X_V_MODEL_ON_INVALID_ELEMENT": 58, |
| | | "58": "X_V_MODEL_ON_INVALID_ELEMENT", |
| | | "X_V_MODEL_ARG_ON_ELEMENT": 59, |
| | | "59": "X_V_MODEL_ARG_ON_ELEMENT", |
| | | "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60, |
| | | "60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", |
| | | "X_V_MODEL_UNNECESSARY_VALUE": 61, |
| | | "61": "X_V_MODEL_UNNECESSARY_VALUE", |
| | | "X_V_SHOW_NO_EXPRESSION": 62, |
| | | "62": "X_V_SHOW_NO_EXPRESSION", |
| | | "X_TRANSITION_INVALID_CHILDREN": 63, |
| | | "63": "X_TRANSITION_INVALID_CHILDREN", |
| | | "X_IGNORED_SIDE_EFFECT_TAG": 64, |
| | | "64": "X_IGNORED_SIDE_EFFECT_TAG", |
| | | "__EXTEND_POINT__": 65, |
| | | "65": "__EXTEND_POINT__" |
| | | }; |
| | | const DOMErrorMessages = { |
| | | [53]: `v-html is missing expression.`, |
| | | [54]: `v-html will override element children.`, |
| | | [55]: `v-text is missing expression.`, |
| | | [56]: `v-text will override element children.`, |
| | | [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, |
| | | [58]: `v-model argument is not supported on plain elements.`, |
| | | [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, |
| | | [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, |
| | | [61]: `v-show is missing expression.`, |
| | | [62]: `<Transition> expects exactly one child element or component.`, |
| | | [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` |
| | | [54]: `v-html is missing expression.`, |
| | | [55]: `v-html will override element children.`, |
| | | [56]: `v-text is missing expression.`, |
| | | [57]: `v-text will override element children.`, |
| | | [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`, |
| | | [59]: `v-model argument is not supported on plain elements.`, |
| | | [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, |
| | | [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, |
| | | [62]: `v-show is missing expression.`, |
| | | [63]: `<Transition> expects exactly one child element or component.`, |
| | | [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` |
| | | }; |
| | | |
| | | const transformVHtml = (dir, node, context) => { |
| | | const { exp, loc } = dir; |
| | | if (!exp) { |
| | | context.onError( |
| | | createDOMCompilerError(53, loc) |
| | | createDOMCompilerError(54, loc) |
| | | ); |
| | | } |
| | | if (node.children.length) { |
| | | context.onError( |
| | | createDOMCompilerError(54, loc) |
| | | createDOMCompilerError(55, loc) |
| | | ); |
| | | node.children.length = 0; |
| | | } |
| | |
| | | const { exp, loc } = dir; |
| | | if (!exp) { |
| | | context.onError( |
| | | createDOMCompilerError(55, loc) |
| | | createDOMCompilerError(56, loc) |
| | | ); |
| | | } |
| | | if (node.children.length) { |
| | | context.onError( |
| | | createDOMCompilerError(56, loc) |
| | | createDOMCompilerError(57, loc) |
| | | ); |
| | | node.children.length = 0; |
| | | } |
| | |
| | | if (dir.arg) { |
| | | context.onError( |
| | | createDOMCompilerError( |
| | | 58, |
| | | 59, |
| | | dir.arg.loc |
| | | ) |
| | | ); |
| | |
| | | if (value && isStaticArgOf(value.arg, "value")) { |
| | | context.onError( |
| | | createDOMCompilerError( |
| | | 60, |
| | | 61, |
| | | value.loc |
| | | ) |
| | | ); |
| | |
| | | isInvalidType = true; |
| | | context.onError( |
| | | createDOMCompilerError( |
| | | 59, |
| | | 60, |
| | | dir.loc |
| | | ) |
| | | ); |
| | |
| | | } else { |
| | | context.onError( |
| | | createDOMCompilerError( |
| | | 57, |
| | | 58, |
| | | dir.loc |
| | | ) |
| | | ); |
| | |
| | | const { exp, loc } = dir; |
| | | if (!exp) { |
| | | context.onError( |
| | | createDOMCompilerError(61, loc) |
| | | createDOMCompilerError(62, loc) |
| | | ); |
| | | } |
| | | return { |
| | |
| | | if (hasMultipleChildren(node)) { |
| | | context.onError( |
| | | createDOMCompilerError( |
| | | 62, |
| | | 63, |
| | | { |
| | | start: node.children[0].loc.start, |
| | | end: node.children[node.children.length - 1].loc.end, |
| | |
| | | if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { |
| | | context.onError( |
| | | createDOMCompilerError( |
| | | 63, |
| | | 64, |
| | | node.loc |
| | | ) |
| | | ); |