| | |
| | | /** |
| | | * @vue/compiler-ssr v3.5.25 |
| | | * @vue/compiler-ssr v3.5.32 |
| | | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| | | * @license MIT |
| | | **/ |
| | |
| | | var compilerDom = require('@vue/compiler-dom'); |
| | | var shared = require('@vue/shared'); |
| | | |
| | | const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); |
| | | const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); |
| | | const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); |
| | | const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); |
| | | const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); |
| | | const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); |
| | | const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); |
| | | const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); |
| | | const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); |
| | | const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); |
| | | const SSR_RENDER_LIST = Symbol(`ssrRenderList`); |
| | | const SSR_INCLUDE_BOOLEAN_ATTR = Symbol( |
| | | const SSR_INTERPOLATE = /* @__PURE__ */ Symbol(`ssrInterpolate`); |
| | | const SSR_RENDER_VNODE = /* @__PURE__ */ Symbol(`ssrRenderVNode`); |
| | | const SSR_RENDER_COMPONENT = /* @__PURE__ */ Symbol(`ssrRenderComponent`); |
| | | const SSR_RENDER_SLOT = /* @__PURE__ */ Symbol(`ssrRenderSlot`); |
| | | const SSR_RENDER_SLOT_INNER = /* @__PURE__ */ Symbol(`ssrRenderSlotInner`); |
| | | const SSR_RENDER_CLASS = /* @__PURE__ */ Symbol(`ssrRenderClass`); |
| | | const SSR_RENDER_STYLE = /* @__PURE__ */ Symbol(`ssrRenderStyle`); |
| | | const SSR_RENDER_ATTRS = /* @__PURE__ */ Symbol(`ssrRenderAttrs`); |
| | | const SSR_RENDER_ATTR = /* @__PURE__ */ Symbol(`ssrRenderAttr`); |
| | | const SSR_RENDER_DYNAMIC_ATTR = /* @__PURE__ */ Symbol(`ssrRenderDynamicAttr`); |
| | | const SSR_RENDER_LIST = /* @__PURE__ */ Symbol(`ssrRenderList`); |
| | | const SSR_INCLUDE_BOOLEAN_ATTR = /* @__PURE__ */ Symbol( |
| | | `ssrIncludeBooleanAttr` |
| | | ); |
| | | const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); |
| | | const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); |
| | | const SSR_RENDER_DYNAMIC_MODEL = Symbol( |
| | | const SSR_LOOSE_EQUAL = /* @__PURE__ */ Symbol(`ssrLooseEqual`); |
| | | const SSR_LOOSE_CONTAIN = /* @__PURE__ */ Symbol(`ssrLooseContain`); |
| | | const SSR_RENDER_DYNAMIC_MODEL = /* @__PURE__ */ Symbol( |
| | | `ssrRenderDynamicModel` |
| | | ); |
| | | const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol( |
| | | const SSR_GET_DYNAMIC_MODEL_PROPS = /* @__PURE__ */ Symbol( |
| | | `ssrGetDynamicModelProps` |
| | | ); |
| | | const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); |
| | | const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); |
| | | const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); |
| | | const SSR_RENDER_TELEPORT = /* @__PURE__ */ Symbol(`ssrRenderTeleport`); |
| | | const SSR_RENDER_SUSPENSE = /* @__PURE__ */ Symbol(`ssrRenderSuspense`); |
| | | const SSR_GET_DIRECTIVE_PROPS = /* @__PURE__ */ Symbol(`ssrGetDirectiveProps`); |
| | | const ssrHelpers = { |
| | | [SSR_INTERPOLATE]: `ssrInterpolate`, |
| | | [SSR_RENDER_VNODE]: `ssrRenderVNode`, |
| | |
| | | } |
| | | |
| | | const wipMap = /* @__PURE__ */ new WeakMap(); |
| | | const WIP_SLOT = Symbol(); |
| | | const WIP_SLOT = /* @__PURE__ */ Symbol(); |
| | | const componentTypeMap = /* @__PURE__ */ new WeakMap(); |
| | | const ssrTransformComponent = (node, context) => { |
| | | if (node.type !== 1 || node.tagType !== 1) { |
| | |
| | | if (value) { |
| | | context.onError( |
| | | compilerDom.createDOMCompilerError( |
| | | 60, |
| | | 61, |
| | | value.loc |
| | | ) |
| | | ); |
| | |
| | | case "file": |
| | | context.onError( |
| | | compilerDom.createDOMCompilerError( |
| | | 59, |
| | | 60, |
| | | dir.loc |
| | | ) |
| | | ); |
| | |
| | | } else { |
| | | context.onError( |
| | | compilerDom.createDOMCompilerError( |
| | | 57, |
| | | 58, |
| | | dir.loc |
| | | ) |
| | | ); |
| | |
| | | const ssrTransformShow = (dir, node, context) => { |
| | | if (!dir.exp) { |
| | | context.onError( |
| | | compilerDom.createDOMCompilerError(61) |
| | | compilerDom.createDOMCompilerError(62) |
| | | ); |
| | | } |
| | | return { |
| | |
| | | }; |
| | | }; |
| | | |
| | | const filterChild = (node) => node.children.filter((n) => n.type !== 3); |
| | | const filterChild = (node) => node.children.filter((n) => !compilerDom.isCommentOrWhitespace(n)); |
| | | const hasSingleChild = (node) => filterChild(node).length === 1; |
| | | const ssrInjectFallthroughAttrs = (node, context) => { |
| | | if (node.type === 0) { |