@dcloudio/uni-cli-shared 3.0.0-4080720251210001 → 3.0.0-5000320260312001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/constants.d.ts +3 -0
  2. package/dist/constants.js +6 -1
  3. package/dist/deps.js +6 -1
  4. package/dist/dom2/index.d.ts +1 -0
  5. package/dist/dom2/index.js +17 -0
  6. package/dist/dom2/sharedData.d.ts +2 -0
  7. package/dist/dom2/sharedData.js +19 -0
  8. package/dist/easycom.js +34 -5
  9. package/dist/env/define.d.ts +3 -0
  10. package/dist/env/define.js +12 -0
  11. package/dist/hbx/alias.js +15 -17
  12. package/dist/hbx/index.d.ts +1 -1
  13. package/dist/hbx/index.js +4 -2
  14. package/dist/hbx/log.d.ts +5 -0
  15. package/dist/hbx/log.js +44 -1
  16. package/dist/i18n.js +4 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +1 -0
  19. package/dist/json/app/manifest/index.d.ts +1 -0
  20. package/dist/json/app/manifest/index.js +3 -1
  21. package/dist/json/mp/pages.js +0 -5
  22. package/dist/json/pages.d.ts +2 -2
  23. package/dist/json/pages.js +4 -1
  24. package/dist/json/uni-x/index.d.ts +1 -1
  25. package/dist/json/utils.js +31 -22
  26. package/dist/logs/console.js +1 -1
  27. package/dist/logs/index.d.ts +11 -0
  28. package/dist/logs/index.js +34 -1
  29. package/dist/messages/en.d.ts +6 -3
  30. package/dist/messages/en.js +6 -3
  31. package/dist/messages/index.d.ts +11 -5
  32. package/dist/messages/zh_CN.d.ts +5 -2
  33. package/dist/messages/zh_CN.js +5 -2
  34. package/dist/mp/assets.d.ts +1 -0
  35. package/dist/mp/assets.js +27 -1
  36. package/dist/mp/externalClasses.d.ts +38 -2
  37. package/dist/mp/externalClasses.js +90 -4
  38. package/dist/mp/index.d.ts +4 -3
  39. package/dist/mp/index.js +11 -1
  40. package/dist/mp/plugin.d.ts +1 -0
  41. package/dist/mp/plugin.js +14 -1
  42. package/dist/mp/style.d.ts +1 -0
  43. package/dist/mp/style.js +8 -1
  44. package/dist/mp/usingComponents.d.ts +1 -0
  45. package/dist/mp/usingComponents.js +17 -1
  46. package/dist/postcss/index.d.ts +2 -0
  47. package/dist/postcss/index.js +3 -1
  48. package/dist/postcss/plugins/stylePluginExternal.d.ts +17 -0
  49. package/dist/postcss/plugins/stylePluginExternal.js +127 -0
  50. package/dist/postcss/plugins/stylePluginScoped.js +30 -0
  51. package/dist/preprocess/context.js +2 -0
  52. package/dist/preprocess/index.d.ts +9 -6
  53. package/dist/preprocess/index.js +33 -8
  54. package/dist/resolve.js +5 -1
  55. package/dist/uni_modules.js +20 -4
  56. package/dist/utils.d.ts +2 -2
  57. package/dist/utils.js +9 -6
  58. package/dist/utsUtils.d.ts +1 -0
  59. package/dist/utsUtils.js +2 -1
  60. package/dist/vite/autoImport.js +91 -6
  61. package/dist/vite/plugins/console.js +1 -1
  62. package/dist/vite/plugins/cssScoped.js +2 -1
  63. package/dist/vite/plugins/easycom.js +7 -0
  64. package/dist/vite/plugins/json.js +69 -2
  65. package/dist/vite/plugins/pre.js +4 -2
  66. package/dist/vite/plugins/sfc.js +1 -1
  67. package/dist/vite/plugins/stats.js +32 -0
  68. package/dist/vite/plugins/uts/ext-api.js +1 -1
  69. package/dist/vite/plugins/uts/uni_modules.js +12 -0
  70. package/dist/vite/plugins/uts/uvue.js +7 -2
  71. package/dist/vite/plugins/vitejs/plugins/asset.d.ts +1 -0
  72. package/dist/vite/plugins/vitejs/plugins/asset.js +19 -1
  73. package/dist/vite/plugins/vitejs/plugins/css.d.ts +2 -1
  74. package/dist/vite/plugins/vitejs/plugins/css.js +27 -10
  75. package/dist/vite/utils/ast.d.ts +2 -1
  76. package/dist/vite/utils/ast.js +5 -1
  77. package/dist/vue/parse.d.ts +2 -0
  78. package/dist/vue/parse.js +3 -1
  79. package/dist/vue/transforms/index.d.ts +1 -0
  80. package/dist/vue/transforms/index.js +1 -0
  81. package/dist/vue/transforms/transformLineBreak.d.ts +2 -0
  82. package/dist/vue/transforms/transformLineBreak.js +15 -0
  83. package/dist/vue/transforms/transformTag.d.ts +1 -1
  84. package/dist/vue/transforms/transformTag.js +5 -0
  85. package/dist/vue/transforms/x/transformMPBuiltInTag.js +2 -2
  86. package/dist/vue/utils.js +8 -1
  87. package/lib/@vue/compiler-core/dist/compiler-core.cjs.js +42 -23
  88. package/lib/@vue/compiler-core/dist/compiler-core.cjs.prod.js +42 -23
  89. package/lib/@vue/compiler-core/dist/compiler-core.esm-bundler.js +39 -19
  90. package/lib/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +4635 -1024
  91. package/lib/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +8762 -7849
  92. package/lib/dom2/app/@vitejs/plugin-vue/LICENSE +21 -0
  93. package/lib/dom2/app/@vitejs/plugin-vue/README.md +278 -0
  94. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.cjs +3353 -0
  95. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.cts +113 -0
  96. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.mts +111 -0
  97. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.d.ts +113 -0
  98. package/lib/dom2/app/@vitejs/plugin-vue/dist/index.mjs +3338 -0
  99. package/lib/dom2/app/@vitejs/plugin-vue/package.json +50 -0
  100. package/lib/dom2/app/@vue/compiler-core/LICENSE +21 -0
  101. package/lib/dom2/app/@vue/compiler-core/README.md +1 -0
  102. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +5492 -0
  103. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +5436 -0
  104. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +1187 -0
  105. package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +4335 -0
  106. package/lib/dom2/app/@vue/compiler-core/index.js +7 -0
  107. package/lib/dom2/app/@vue/compiler-core/package.json +58 -0
  108. package/lib/dom2/app/@vue/compiler-dom/LICENSE +21 -0
  109. package/lib/dom2/app/@vue/compiler-dom/README.md +1 -0
  110. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +762 -0
  111. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +736 -0
  112. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.d.ts +73 -0
  113. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +5051 -0
  114. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +11 -0
  115. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +557 -0
  116. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +5234 -0
  117. package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +11 -0
  118. package/lib/dom2/app/@vue/compiler-dom/index.js +7 -0
  119. package/lib/dom2/app/@vue/compiler-dom/package.json +57 -0
  120. package/lib/dom2/app/@vue/compiler-sfc/LICENSE +21 -0
  121. package/lib/dom2/app/@vue/compiler-sfc/README.md +80 -0
  122. package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +15528 -0
  123. package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.d.ts +11595 -0
  124. package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +41525 -0
  125. package/lib/dom2/app/@vue/compiler-sfc/package.json +68 -0
  126. package/lib/dom2/app/@vue/compiler-vapor/LICENSE +21 -0
  127. package/lib/dom2/app/@vue/compiler-vapor/README.md +1 -0
  128. package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +3584 -0
  129. package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +22858 -0
  130. package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +22438 -0
  131. package/lib/dom2/app/@vue/compiler-vapor/package.json +51 -0
  132. package/lib/dom2/app/@vue/compiler-vapor-dom2/dist/compiler-vapor-dom2.cjs.js +1 -0
  133. package/lib/dom2/app/@vue/compiler-vapor-dom2/package.json +56 -0
  134. package/lib/dom2/app/@vue/shared/LICENSE +21 -0
  135. package/lib/dom2/app/@vue/shared/README.md +3 -0
  136. package/lib/dom2/app/@vue/shared/dist/shared.cjs.js +773 -0
  137. package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +773 -0
  138. package/lib/dom2/app/@vue/shared/dist/shared.d.ts +412 -0
  139. package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +688 -0
  140. package/lib/dom2/app/@vue/shared/index.js +7 -0
  141. package/lib/dom2/app/@vue/shared/package.json +47 -0
  142. package/lib/preprocess/lib/preprocess.js +9 -3
  143. package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.js +1 -1
  144. package/lib/vapor/@vue/compiler-core/dist/compiler-core.cjs.prod.js +1 -1
  145. package/package.json +8 -6
@@ -0,0 +1,773 @@
1
+ /**
2
+ * @vue/shared v3.6.0-beta.5
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
6
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
7
+
8
+ //#region packages/shared/src/makeMap.ts
9
+ /**
10
+ * Make a map and return a function for checking if a key
11
+ * is in that map.
12
+ * IMPORTANT: all calls of this function must be prefixed with
13
+ * \/\*#\_\_PURE\_\_\*\/
14
+ * So that they can be tree-shaken if necessary.
15
+ */
16
+ /* @__NO_SIDE_EFFECTS__ */
17
+ function makeMap(str) {
18
+ const map = Object.create(null);
19
+ for (const key of str.split(",")) map[key] = 1;
20
+ return (val) => val in map;
21
+ }
22
+
23
+ //#endregion
24
+ //#region packages/shared/src/general.ts
25
+ const EMPTY_OBJ = Object.freeze({});
26
+ const EMPTY_ARR = Object.freeze([]);
27
+ const NOOP = () => {};
28
+ /**
29
+ * Always return true.
30
+ */
31
+ const YES = () => true;
32
+ /**
33
+ * Always return false.
34
+ */
35
+ const NO = () => false;
36
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
37
+ const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
38
+ const isModelListener = (key) => key.startsWith("onUpdate:");
39
+ const extend = Object.assign;
40
+ const remove = (arr, el) => {
41
+ const i = arr.indexOf(el);
42
+ if (i > -1) arr.splice(i, 1);
43
+ };
44
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
45
+ const hasOwn = (val, key) => hasOwnProperty.call(val, key);
46
+ const isArray = Array.isArray;
47
+ const isMap = (val) => toTypeString(val) === "[object Map]";
48
+ const isSet = (val) => toTypeString(val) === "[object Set]";
49
+ const isDate = (val) => toTypeString(val) === "[object Date]";
50
+ const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
51
+ const isFunction = (val) => typeof val === "function";
52
+ const isString = (val) => typeof val === "string";
53
+ const isSymbol = (val) => typeof val === "symbol";
54
+ const isObject = (val) => val !== null && typeof val === "object";
55
+ const isPromise = (val) => {
56
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
57
+ };
58
+ const objectToString = Object.prototype.toString;
59
+ const toTypeString = (value) => objectToString.call(value);
60
+ const toRawType = (value) => {
61
+ return toTypeString(value).slice(8, -1);
62
+ };
63
+ const isPlainObject = (val) => toTypeString(val) === "[object Object]";
64
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key || typeof key === "number" && Number.isInteger(key) && key >= 0;
65
+ const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,__cid,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
66
+ const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
67
+ const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
68
+ const cacheStringFunction = (fn) => {
69
+ const cache = Object.create(null);
70
+ return ((str) => {
71
+ return cache[str] || (cache[str] = fn(str));
72
+ });
73
+ };
74
+ const camelizeRE = /-(\w)/g;
75
+ const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
76
+ /**
77
+ * @private
78
+ */
79
+ const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
80
+ const hyphenateRE = /\B([A-Z])/g;
81
+ /**
82
+ * @private
83
+ */
84
+ const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
85
+ /**
86
+ * @private
87
+ */
88
+ const capitalize = cacheStringFunction((str) => {
89
+ return str.charAt(0).toUpperCase() + str.slice(1);
90
+ });
91
+ /**
92
+ * @private
93
+ */
94
+ const toHandlerKey = cacheStringFunction((str) => {
95
+ return str ? `on${capitalize(str)}` : ``;
96
+ });
97
+ /**
98
+ * #13070 When v-model and v-model:model directives are used together,
99
+ * they will generate the same modelModifiers prop,
100
+ * so a `$` suffix is added to avoid conflicts.
101
+ * @private
102
+ */
103
+ const getModifierPropName = (name) => {
104
+ return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
105
+ };
106
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
107
+ const invokeArrayFns = (fns, ...arg) => {
108
+ for (let i = 0; i < fns.length; i++) fns[i](...arg);
109
+ };
110
+ const def = (obj, key, value, writable = false) => {
111
+ Object.defineProperty(obj, key, {
112
+ configurable: true,
113
+ enumerable: false,
114
+ writable,
115
+ value
116
+ });
117
+ };
118
+ /**
119
+ * "123-foo" will be parsed to 123
120
+ * This is used for the .number modifier in v-model
121
+ */
122
+ const looseToNumber = (val) => {
123
+ const n = parseFloat(val);
124
+ return isNaN(n) ? val : n;
125
+ };
126
+ /**
127
+ * Only concerns number-like strings
128
+ * "123-foo" will be returned as-is
129
+ */
130
+ const toNumber = (val) => {
131
+ const n = isString(val) ? Number(val) : NaN;
132
+ return isNaN(n) ? val : n;
133
+ };
134
+ let _globalThis;
135
+ const getGlobalThis = () => {
136
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
137
+ };
138
+ const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
139
+ function genPropsAccessExp(name) {
140
+ return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
141
+ }
142
+ function genCacheKey(source, options) {
143
+ return source + JSON.stringify(options, (_, val) => typeof val === "function" ? val.toString() : val);
144
+ }
145
+ function canSetValueDirectly(tagName) {
146
+ return tagName !== "PROGRESS" && !tagName.includes("-");
147
+ }
148
+
149
+ //#endregion
150
+ //#region packages/shared/src/patchFlags.ts
151
+ /**
152
+ * Patch flags are optimization hints generated by the compiler.
153
+ * when a block with dynamicChildren is encountered during diff, the algorithm
154
+ * enters "optimized mode". In this mode, we know that the vdom is produced by
155
+ * a render function generated by the compiler, so the algorithm only needs to
156
+ * handle updates explicitly marked by these patch flags.
157
+ *
158
+ * Patch flags can be combined using the | bitwise operator and can be checked
159
+ * using the & operator, e.g.
160
+ *
161
+ * ```js
162
+ * const flag = TEXT | CLASS
163
+ * if (flag & TEXT) { ... }
164
+ * ```
165
+ *
166
+ * Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the
167
+ * flags are handled during diff.
168
+ */
169
+ const PatchFlags = {
170
+ "TEXT": 1,
171
+ "1": "TEXT",
172
+ "CLASS": 2,
173
+ "2": "CLASS",
174
+ "STYLE": 4,
175
+ "4": "STYLE",
176
+ "PROPS": 8,
177
+ "8": "PROPS",
178
+ "FULL_PROPS": 16,
179
+ "16": "FULL_PROPS",
180
+ "NEED_HYDRATION": 32,
181
+ "32": "NEED_HYDRATION",
182
+ "STABLE_FRAGMENT": 64,
183
+ "64": "STABLE_FRAGMENT",
184
+ "KEYED_FRAGMENT": 128,
185
+ "128": "KEYED_FRAGMENT",
186
+ "UNKEYED_FRAGMENT": 256,
187
+ "256": "UNKEYED_FRAGMENT",
188
+ "NEED_PATCH": 512,
189
+ "512": "NEED_PATCH",
190
+ "DYNAMIC_SLOTS": 1024,
191
+ "1024": "DYNAMIC_SLOTS",
192
+ "DEV_ROOT_FRAGMENT": 2048,
193
+ "2048": "DEV_ROOT_FRAGMENT",
194
+ "CACHED": -1,
195
+ "-1": "CACHED",
196
+ "BAIL": -2,
197
+ "-2": "BAIL"
198
+ };
199
+ /**
200
+ * dev only flag -> name mapping
201
+ */
202
+ const PatchFlagNames = {
203
+ [1]: `TEXT`,
204
+ [2]: `CLASS`,
205
+ [4]: `STYLE`,
206
+ [8]: `PROPS`,
207
+ [16]: `FULL_PROPS`,
208
+ [32]: `NEED_HYDRATION`,
209
+ [64]: `STABLE_FRAGMENT`,
210
+ [128]: `KEYED_FRAGMENT`,
211
+ [256]: `UNKEYED_FRAGMENT`,
212
+ [512]: `NEED_PATCH`,
213
+ [1024]: `DYNAMIC_SLOTS`,
214
+ [2048]: `DEV_ROOT_FRAGMENT`,
215
+ [-1]: `CACHED`,
216
+ [-2]: `BAIL`
217
+ };
218
+
219
+ //#endregion
220
+ //#region packages/shared/src/shapeFlags.ts
221
+ const ShapeFlags = {
222
+ "ELEMENT": 1,
223
+ "1": "ELEMENT",
224
+ "FUNCTIONAL_COMPONENT": 2,
225
+ "2": "FUNCTIONAL_COMPONENT",
226
+ "STATEFUL_COMPONENT": 4,
227
+ "4": "STATEFUL_COMPONENT",
228
+ "TEXT_CHILDREN": 8,
229
+ "8": "TEXT_CHILDREN",
230
+ "ARRAY_CHILDREN": 16,
231
+ "16": "ARRAY_CHILDREN",
232
+ "SLOTS_CHILDREN": 32,
233
+ "32": "SLOTS_CHILDREN",
234
+ "TELEPORT": 64,
235
+ "64": "TELEPORT",
236
+ "SUSPENSE": 128,
237
+ "128": "SUSPENSE",
238
+ "COMPONENT_SHOULD_KEEP_ALIVE": 256,
239
+ "256": "COMPONENT_SHOULD_KEEP_ALIVE",
240
+ "COMPONENT_KEPT_ALIVE": 512,
241
+ "512": "COMPONENT_KEPT_ALIVE",
242
+ "COMPONENT": 6,
243
+ "6": "COMPONENT"
244
+ };
245
+
246
+ //#endregion
247
+ //#region packages/shared/src/slotFlags.ts
248
+ const SlotFlags = {
249
+ "STABLE": 1,
250
+ "1": "STABLE",
251
+ "DYNAMIC": 2,
252
+ "2": "DYNAMIC",
253
+ "FORWARDED": 3,
254
+ "3": "FORWARDED"
255
+ };
256
+ /**
257
+ * Dev only
258
+ */
259
+ const slotFlagsText = {
260
+ [1]: "STABLE",
261
+ [2]: "DYNAMIC",
262
+ [3]: "FORWARDED"
263
+ };
264
+
265
+ //#endregion
266
+ //#region packages/shared/src/globalsAllowList.ts
267
+ const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
268
+ const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
269
+ /** @deprecated use `isGloballyAllowed` instead */
270
+ const isGloballyWhitelisted = isGloballyAllowed;
271
+
272
+ //#endregion
273
+ //#region packages/shared/src/codeframe.ts
274
+ const range = 2;
275
+ function generateCodeFrame(source, start = 0, end = source.length) {
276
+ start = Math.max(0, Math.min(start, source.length));
277
+ end = Math.max(0, Math.min(end, source.length));
278
+ if (start > end) return "";
279
+ let lines = source.split(/(\r?\n)/);
280
+ const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
281
+ lines = lines.filter((_, idx) => idx % 2 === 0);
282
+ let count = 0;
283
+ const res = [];
284
+ for (let i = 0; i < lines.length; i++) {
285
+ count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
286
+ if (count >= start) {
287
+ for (let j = i - range; j <= i + range || end > count; j++) {
288
+ if (j < 0 || j >= lines.length) continue;
289
+ const line = j + 1;
290
+ res.push(`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);
291
+ const lineLength = lines[j].length;
292
+ const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
293
+ if (j === i) {
294
+ const pad = start - (count - (lineLength + newLineSeqLength));
295
+ const length = Math.max(1, end > count ? lineLength - pad : end - start);
296
+ res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
297
+ } else if (j > i) {
298
+ if (end > count) {
299
+ const length = Math.max(Math.min(end - count, lineLength), 1);
300
+ res.push(` | ` + "^".repeat(length));
301
+ }
302
+ count += lineLength + newLineSeqLength;
303
+ }
304
+ }
305
+ break;
306
+ }
307
+ }
308
+ return res.join("\n");
309
+ }
310
+
311
+ //#endregion
312
+ //#region packages/shared/src/normalizeProp.ts
313
+ function normalizeStyle(value) {
314
+ if (isArray(value)) {
315
+ const res = {};
316
+ for (let i = 0; i < value.length; i++) {
317
+ const item = value[i];
318
+ const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
319
+ if (normalized) for (const key in normalized) res[key] = normalized[key];
320
+ }
321
+ return res;
322
+ } else if (isString(value) || isObject(value)) return value;
323
+ }
324
+ const listDelimiterRE = /;(?![^(]*\))/g;
325
+ const propertyDelimiterRE = /:([^]+)/;
326
+ const styleCommentRE = /\/\*[^]*?\*\//g;
327
+ function parseStringStyle(cssText) {
328
+ const ret = {};
329
+ cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
330
+ if (item) {
331
+ const tmp = item.split(propertyDelimiterRE);
332
+ tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
333
+ }
334
+ });
335
+ return ret;
336
+ }
337
+ function stringifyStyle(styles) {
338
+ if (!styles) return "";
339
+ if (isString(styles)) return styles;
340
+ let ret = "";
341
+ for (const key in styles) {
342
+ const value = styles[key];
343
+ if (isString(value) || typeof value === "number") {
344
+ const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
345
+ ret += `${normalizedKey}:${value};`;
346
+ }
347
+ }
348
+ return ret;
349
+ }
350
+ function normalizeClass(value) {
351
+ let res = "";
352
+ if (isString(value)) res = value;
353
+ else if (isArray(value)) for (let i = 0; i < value.length; i++) {
354
+ const normalized = normalizeClass(value[i]);
355
+ if (normalized) res += normalized + " ";
356
+ }
357
+ else if (isObject(value)) {
358
+ for (const name in value) if (value[name]) res += name + " ";
359
+ }
360
+ return res.trim();
361
+ }
362
+ function normalizeProps(props) {
363
+ if (!props) return null;
364
+ let { class: klass, style } = props;
365
+ if (klass && !isString(klass)) props.class = normalizeClass(klass);
366
+ if (style) props.style = normalizeStyle(style);
367
+ return props;
368
+ }
369
+
370
+ //#endregion
371
+ //#region packages/shared/src/domTagConfig.ts
372
+ const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
373
+ const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
374
+ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
375
+ const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
376
+ const FORMATTING_TAGS = "a,b,big,code,em,font,i,nobr,s,small,strike,strong,tt,u";
377
+ const ALWAYS_CLOSE_TAGS = "title,style,script,noscript,template,object,table,button,textarea,select,iframe,fieldset";
378
+ const INLINE_TAGS = "a,abbr,acronym,b,bdi,bdo,big,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,label,map,mark,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,small,span,strong,sub,sup,svg,textarea,time,u,tt,var,video";
379
+ const BLOCK_TAGS = "address,article,aside,blockquote,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,main,menu,nav,ol,p,pre,section,table,ul";
380
+ /**
381
+ * Compiler only.
382
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
383
+ */
384
+ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
385
+ /**
386
+ * Compiler only.
387
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
388
+ */
389
+ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
390
+ /**
391
+ * Compiler only.
392
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
393
+ */
394
+ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
395
+ /**
396
+ * Compiler only.
397
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
398
+ */
399
+ const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
400
+ /**
401
+ * Compiler only.
402
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
403
+ */
404
+ const isFormattingTag = /* @__PURE__ */ makeMap(FORMATTING_TAGS);
405
+ /**
406
+ * Compiler only.
407
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
408
+ */
409
+ const isAlwaysCloseTag = /* @__PURE__ */ makeMap(ALWAYS_CLOSE_TAGS);
410
+ /**
411
+ * Compiler only.
412
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
413
+ */
414
+ const isInlineTag = /* @__PURE__ */ makeMap(INLINE_TAGS);
415
+ /**
416
+ * Compiler only.
417
+ * Do NOT use in runtime code paths unless behind `__DEV__` flag.
418
+ */
419
+ const isBlockTag = /* @__PURE__ */ makeMap(BLOCK_TAGS);
420
+
421
+ //#endregion
422
+ //#region packages/shared/src/domAttrConfig.ts
423
+ /**
424
+ * On the client we only need to offer special cases for boolean attributes that
425
+ * have different names from their corresponding dom properties:
426
+ * - itemscope -> N/A
427
+ * - allowfullscreen -> allowFullscreen
428
+ * - formnovalidate -> formNoValidate
429
+ * - ismap -> isMap
430
+ * - nomodule -> noModule
431
+ * - novalidate -> noValidate
432
+ * - readonly -> readOnly
433
+ */
434
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
435
+ const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
436
+ /**
437
+ * The full list is needed during SSR to produce the correct initial markup.
438
+ */
439
+ const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
440
+ /**
441
+ * Boolean attributes should be included if the value is truthy or ''.
442
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
443
+ */
444
+ function includeBooleanAttr(value) {
445
+ return !!value || value === "";
446
+ }
447
+ const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
448
+ const attrValidationCache = {};
449
+ function isSSRSafeAttrName(name) {
450
+ if (attrValidationCache.hasOwnProperty(name)) return attrValidationCache[name];
451
+ const isUnsafe = unsafeAttrCharRE.test(name);
452
+ if (isUnsafe) console.error(`unsafe attribute name: ${name}`);
453
+ return attrValidationCache[name] = !isUnsafe;
454
+ }
455
+ const propsToAttrMap = {
456
+ acceptCharset: "accept-charset",
457
+ className: "class",
458
+ htmlFor: "for",
459
+ httpEquiv: "http-equiv"
460
+ };
461
+ /**
462
+ * Known attributes, this is used for stringification of runtime static nodes
463
+ * so that we don't stringify bindings that cannot be set from HTML.
464
+ * Don't also forget to allow `data-*` and `aria-*`!
465
+ * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
466
+ */
467
+ const isKnownHtmlAttr = /* @__PURE__ */ makeMap("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap");
468
+ /**
469
+ * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
470
+ */
471
+ const isKnownSvgAttr = /* @__PURE__ */ makeMap("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan");
472
+ /**
473
+ * Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
474
+ */
475
+ const isKnownMathMLAttr = /* @__PURE__ */ makeMap("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");
476
+ /**
477
+ * Shared between server-renderer and runtime-core hydration logic
478
+ */
479
+ function isRenderableAttrValue(value) {
480
+ if (value == null) return false;
481
+ const type = typeof value;
482
+ return type === "string" || type === "number" || type === "boolean";
483
+ }
484
+ function shouldSetAsAttr(tagName, key) {
485
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") return true;
486
+ if (key === "form") return true;
487
+ if (key === "list" && tagName === "INPUT") return true;
488
+ if (key === "type" && tagName === "TEXTAREA") return true;
489
+ if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) return true;
490
+ if (key === "sandbox" && tagName === "IFRAME") return true;
491
+ return false;
492
+ }
493
+
494
+ //#endregion
495
+ //#region packages/shared/src/domNamespace.ts
496
+ const Namespaces = {
497
+ "HTML": 0,
498
+ "0": "HTML",
499
+ "SVG": 1,
500
+ "1": "SVG",
501
+ "MATH_ML": 2,
502
+ "2": "MATH_ML"
503
+ };
504
+
505
+ //#endregion
506
+ //#region packages/shared/src/escapeHtml.ts
507
+ const escapeRE = /["'&<>]/;
508
+ function escapeHtml(string) {
509
+ const str = "" + string;
510
+ const match = escapeRE.exec(str);
511
+ if (!match) return str;
512
+ let html = "";
513
+ let escaped;
514
+ let index;
515
+ let lastIndex = 0;
516
+ for (index = match.index; index < str.length; index++) {
517
+ switch (str.charCodeAt(index)) {
518
+ case 34:
519
+ escaped = "&quot;";
520
+ break;
521
+ case 38:
522
+ escaped = "&amp;";
523
+ break;
524
+ case 39:
525
+ escaped = "&#39;";
526
+ break;
527
+ case 60:
528
+ escaped = "&lt;";
529
+ break;
530
+ case 62:
531
+ escaped = "&gt;";
532
+ break;
533
+ default: continue;
534
+ }
535
+ if (lastIndex !== index) html += str.slice(lastIndex, index);
536
+ lastIndex = index + 1;
537
+ html += escaped;
538
+ }
539
+ return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
540
+ }
541
+ const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
542
+ function escapeHtmlComment(src) {
543
+ return src.replace(commentStripRE, "");
544
+ }
545
+ const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
546
+ function getEscapedCssVarName(key, doubleEscape) {
547
+ return key.replace(cssVarNameEscapeSymbolsRE, (s) => doubleEscape ? s === "\"" ? "\\\\\\\"" : `\\\\${s}` : `\\${s}`);
548
+ }
549
+
550
+ //#endregion
551
+ //#region packages/shared/src/looseEqual.ts
552
+ function looseCompareArrays(a, b) {
553
+ if (a.length !== b.length) return false;
554
+ let equal = true;
555
+ for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
556
+ return equal;
557
+ }
558
+ function looseEqual(a, b) {
559
+ if (a === b) return true;
560
+ let aValidType = isDate(a);
561
+ let bValidType = isDate(b);
562
+ if (aValidType || bValidType) return aValidType && bValidType ? a.getTime() === b.getTime() : false;
563
+ aValidType = isSymbol(a);
564
+ bValidType = isSymbol(b);
565
+ if (aValidType || bValidType) return a === b;
566
+ aValidType = isArray(a);
567
+ bValidType = isArray(b);
568
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;
569
+ aValidType = isObject(a);
570
+ bValidType = isObject(b);
571
+ if (aValidType || bValidType) {
572
+ if (!aValidType || !bValidType) return false;
573
+ if (Object.keys(a).length !== Object.keys(b).length) return false;
574
+ for (const key in a) {
575
+ const aHasKey = a.hasOwnProperty(key);
576
+ const bHasKey = b.hasOwnProperty(key);
577
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
578
+ }
579
+ }
580
+ return String(a) === String(b);
581
+ }
582
+ function looseIndexOf(arr, val) {
583
+ return arr.findIndex((item) => looseEqual(item, val));
584
+ }
585
+
586
+ //#endregion
587
+ //#region packages/shared/src/toDisplayString.ts
588
+ const isRef = (val) => {
589
+ return !!(val && val["__v_isRef"] === true);
590
+ };
591
+ /**
592
+ * For converting {{ interpolation }} values to displayed strings.
593
+ * @private
594
+ */
595
+ const toDisplayString = (val) => {
596
+ switch (typeof val) {
597
+ case "string": return val;
598
+ case "object": if (val) {
599
+ if (isRef(val)) return toDisplayString(val.value);
600
+ else if (isArray(val) || val.toString === objectToString || !isFunction(val.toString)) return JSON.stringify(val, replacer, 2);
601
+ }
602
+ default: return val == null ? "" : String(val);
603
+ }
604
+ };
605
+ const replacer = (_key, val) => {
606
+ if (isRef(val)) return replacer(_key, val.value);
607
+ else if (isMap(val)) return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val], i) => {
608
+ entries[stringifySymbol(key, i) + " =>"] = val;
609
+ return entries;
610
+ }, {}) };
611
+ else if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) };
612
+ else if (isSymbol(val)) return stringifySymbol(val);
613
+ else if (isObject(val) && !isArray(val) && !isPlainObject(val)) return String(val);
614
+ return val;
615
+ };
616
+ const stringifySymbol = (v, i = "") => {
617
+ var _description;
618
+ return isSymbol(v) ? `Symbol(${(_description = v.description) !== null && _description !== void 0 ? _description : i})` : v;
619
+ };
620
+
621
+ //#endregion
622
+ //#region packages/shared/src/subSequence.ts
623
+ function getSequence(arr) {
624
+ const p = arr.slice();
625
+ const result = [0];
626
+ let i, j, u, v, c;
627
+ const len = arr.length;
628
+ for (i = 0; i < len; i++) {
629
+ const arrI = arr[i];
630
+ if (arrI !== 0) {
631
+ j = result[result.length - 1];
632
+ if (arr[j] < arrI) {
633
+ p[i] = j;
634
+ result.push(i);
635
+ continue;
636
+ }
637
+ u = 0;
638
+ v = result.length - 1;
639
+ while (u < v) {
640
+ c = u + v >> 1;
641
+ if (arr[result[c]] < arrI) u = c + 1;
642
+ else v = c;
643
+ }
644
+ if (arrI < arr[result[u]]) {
645
+ if (u > 0) p[i] = result[u - 1];
646
+ result[u] = i;
647
+ }
648
+ }
649
+ }
650
+ u = result.length;
651
+ v = result[u - 1];
652
+ while (u-- > 0) {
653
+ result[u] = v;
654
+ v = p[v];
655
+ }
656
+ return result;
657
+ }
658
+
659
+ //#endregion
660
+ //#region packages/shared/src/cssVars.ts
661
+ /**
662
+ * Normalize CSS var value created by `v-bind` in `<style>` block
663
+ * See https://github.com/vuejs/core/pull/12461#issuecomment-2495804664
664
+ */
665
+ function normalizeCssVarValue(value) {
666
+ if (value == null) return "initial";
667
+ if (typeof value === "string") return value === "" ? " " : value;
668
+ if (typeof value !== "number" || !Number.isFinite(value)) console.warn("[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:", value);
669
+ return String(value);
670
+ }
671
+
672
+ //#endregion
673
+ //#region packages/shared/src/vaporFlags.ts
674
+ /**
675
+ * Flags to optimize vapor `createFor` runtime behavior, shared between the
676
+ * compiler and the runtime
677
+ */
678
+ const VaporVForFlags = {
679
+ "FAST_REMOVE": 1,
680
+ "1": "FAST_REMOVE",
681
+ "IS_COMPONENT": 2,
682
+ "2": "IS_COMPONENT",
683
+ "ONCE": 4,
684
+ "4": "ONCE"
685
+ };
686
+
687
+ //#endregion
688
+ exports.EMPTY_ARR = EMPTY_ARR;
689
+ exports.EMPTY_OBJ = EMPTY_OBJ;
690
+ exports.NO = NO;
691
+ exports.NOOP = NOOP;
692
+ exports.Namespaces = Namespaces;
693
+ exports.PatchFlagNames = PatchFlagNames;
694
+ exports.PatchFlags = PatchFlags;
695
+ exports.ShapeFlags = ShapeFlags;
696
+ exports.SlotFlags = SlotFlags;
697
+ exports.VaporVForFlags = VaporVForFlags;
698
+ exports.YES = YES;
699
+ exports.camelize = camelize;
700
+ exports.canSetValueDirectly = canSetValueDirectly;
701
+ exports.capitalize = capitalize;
702
+ exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;
703
+ exports.def = def;
704
+ exports.escapeHtml = escapeHtml;
705
+ exports.escapeHtmlComment = escapeHtmlComment;
706
+ exports.extend = extend;
707
+ exports.genCacheKey = genCacheKey;
708
+ exports.genPropsAccessExp = genPropsAccessExp;
709
+ exports.generateCodeFrame = generateCodeFrame;
710
+ exports.getEscapedCssVarName = getEscapedCssVarName;
711
+ exports.getGlobalThis = getGlobalThis;
712
+ exports.getModifierPropName = getModifierPropName;
713
+ exports.getSequence = getSequence;
714
+ exports.hasChanged = hasChanged;
715
+ exports.hasOwn = hasOwn;
716
+ exports.hyphenate = hyphenate;
717
+ exports.includeBooleanAttr = includeBooleanAttr;
718
+ exports.invokeArrayFns = invokeArrayFns;
719
+ exports.isAlwaysCloseTag = isAlwaysCloseTag;
720
+ exports.isArray = isArray;
721
+ exports.isBlockTag = isBlockTag;
722
+ exports.isBooleanAttr = isBooleanAttr;
723
+ exports.isBuiltInDirective = isBuiltInDirective;
724
+ exports.isBuiltInTag = isBuiltInTag;
725
+ exports.isDate = isDate;
726
+ exports.isFormattingTag = isFormattingTag;
727
+ exports.isFunction = isFunction;
728
+ exports.isGloballyAllowed = isGloballyAllowed;
729
+ exports.isGloballyWhitelisted = isGloballyWhitelisted;
730
+ exports.isHTMLTag = isHTMLTag;
731
+ exports.isInlineTag = isInlineTag;
732
+ exports.isIntegerKey = isIntegerKey;
733
+ exports.isKnownHtmlAttr = isKnownHtmlAttr;
734
+ exports.isKnownMathMLAttr = isKnownMathMLAttr;
735
+ exports.isKnownSvgAttr = isKnownSvgAttr;
736
+ exports.isMap = isMap;
737
+ exports.isMathMLTag = isMathMLTag;
738
+ exports.isModelListener = isModelListener;
739
+ exports.isNativeOn = isNativeOn;
740
+ exports.isObject = isObject;
741
+ exports.isOn = isOn;
742
+ exports.isPlainObject = isPlainObject;
743
+ exports.isPromise = isPromise;
744
+ exports.isRegExp = isRegExp;
745
+ exports.isRenderableAttrValue = isRenderableAttrValue;
746
+ exports.isReservedProp = isReservedProp;
747
+ exports.isSSRSafeAttrName = isSSRSafeAttrName;
748
+ exports.isSVGTag = isSVGTag;
749
+ exports.isSet = isSet;
750
+ exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
751
+ exports.isString = isString;
752
+ exports.isSymbol = isSymbol;
753
+ exports.isVoidTag = isVoidTag;
754
+ exports.looseEqual = looseEqual;
755
+ exports.looseIndexOf = looseIndexOf;
756
+ exports.looseToNumber = looseToNumber;
757
+ exports.makeMap = makeMap;
758
+ exports.normalizeClass = normalizeClass;
759
+ exports.normalizeCssVarValue = normalizeCssVarValue;
760
+ exports.normalizeProps = normalizeProps;
761
+ exports.normalizeStyle = normalizeStyle;
762
+ exports.objectToString = objectToString;
763
+ exports.parseStringStyle = parseStringStyle;
764
+ exports.propsToAttrMap = propsToAttrMap;
765
+ exports.remove = remove;
766
+ exports.shouldSetAsAttr = shouldSetAsAttr;
767
+ exports.slotFlagsText = slotFlagsText;
768
+ exports.stringifyStyle = stringifyStyle;
769
+ exports.toDisplayString = toDisplayString;
770
+ exports.toHandlerKey = toHandlerKey;
771
+ exports.toNumber = toNumber;
772
+ exports.toRawType = toRawType;
773
+ exports.toTypeString = toTypeString;