🔧
This commit is contained in:
96
node_modules/vue/dist/vue.cjs.prod.js
generated
vendored
96
node_modules/vue/dist/vue.cjs.prod.js
generated
vendored
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* vue v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
@@ -6,60 +11,65 @@ var compilerDom = require('@vue/compiler-dom');
|
||||
var runtimeDom = require('@vue/runtime-dom');
|
||||
var shared = require('@vue/shared');
|
||||
|
||||
function _interopNamespace(e) {
|
||||
if (e && e.__esModule) return e;
|
||||
function _interopNamespaceDefault(e) {
|
||||
var n = Object.create(null);
|
||||
if (e) {
|
||||
Object.keys(e).forEach(function (k) {
|
||||
for (var k in e) {
|
||||
n[k] = e[k];
|
||||
});
|
||||
}
|
||||
}
|
||||
n['default'] = e;
|
||||
n.default = e;
|
||||
return Object.freeze(n);
|
||||
}
|
||||
|
||||
var runtimeDom__namespace = /*#__PURE__*/_interopNamespace(runtimeDom);
|
||||
var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
|
||||
|
||||
// This entry is the "full-build" that includes both the runtime
|
||||
const compileCache = Object.create(null);
|
||||
const compileCache = /* @__PURE__ */ new WeakMap();
|
||||
function getCache(options) {
|
||||
let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ);
|
||||
if (!c) {
|
||||
c = /* @__PURE__ */ Object.create(null);
|
||||
compileCache.set(options != null ? options : shared.EMPTY_OBJ, c);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
function compileToFunction(template, options) {
|
||||
if (!shared.isString(template)) {
|
||||
if (template.nodeType) {
|
||||
template = template.innerHTML;
|
||||
}
|
||||
else {
|
||||
return shared.NOOP;
|
||||
}
|
||||
if (!shared.isString(template)) {
|
||||
if (template.nodeType) {
|
||||
template = template.innerHTML;
|
||||
} else {
|
||||
return shared.NOOP;
|
||||
}
|
||||
const key = template;
|
||||
const cached = compileCache[key];
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
if (template[0] === '#') {
|
||||
const el = document.querySelector(template);
|
||||
// __UNSAFE__
|
||||
// Reason: potential execution of JS expressions in in-DOM template.
|
||||
// The user must make sure the in-DOM template is trusted. If it's rendered
|
||||
// by the server, the template should not contain any user data.
|
||||
template = el ? el.innerHTML : ``;
|
||||
}
|
||||
const { code } = compilerDom.compile(template, shared.extend({
|
||||
hoistStatic: true,
|
||||
onError: undefined,
|
||||
onWarn: shared.NOOP
|
||||
}, options));
|
||||
// The wildcard import results in a huge object with every export
|
||||
// with keys that cannot be mangled, and can be quite heavy size-wise.
|
||||
// In the global build we know `Vue` is available globally so we can avoid
|
||||
// the wildcard object.
|
||||
const render = (new Function('Vue', code)(runtimeDom__namespace));
|
||||
render._rc = true;
|
||||
return (compileCache[key] = render);
|
||||
}
|
||||
const key = template;
|
||||
const cache = getCache(options);
|
||||
const cached = cache[key];
|
||||
if (cached) {
|
||||
return cached;
|
||||
}
|
||||
if (template[0] === "#") {
|
||||
const el = document.querySelector(template);
|
||||
template = el ? el.innerHTML : ``;
|
||||
}
|
||||
const opts = shared.extend(
|
||||
{
|
||||
hoistStatic: true,
|
||||
onError: void 0,
|
||||
onWarn: shared.NOOP
|
||||
},
|
||||
options
|
||||
);
|
||||
if (!opts.isCustomElement && typeof customElements !== "undefined") {
|
||||
opts.isCustomElement = (tag) => !!customElements.get(tag);
|
||||
}
|
||||
const { code } = compilerDom.compile(template, opts);
|
||||
const render = new Function("Vue", code)(runtimeDom__namespace);
|
||||
render._rc = true;
|
||||
return cache[key] = render;
|
||||
}
|
||||
runtimeDom.registerRuntimeCompiler(compileToFunction);
|
||||
|
||||
Object.keys(runtimeDom).forEach(function (k) {
|
||||
if (k !== 'default') exports[k] = runtimeDom[k];
|
||||
});
|
||||
exports.compile = compileToFunction;
|
||||
Object.keys(runtimeDom).forEach(function (k) {
|
||||
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user