yansu 0.0.0-beta.1

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 (142) hide show
  1. package/README.md +1 -0
  2. package/bin.mjs +18 -0
  3. package/dist/cli.d.mts +2 -0
  4. package/dist/cli.mjs +68 -0
  5. package/dist/dirs.d.mts +4 -0
  6. package/dist/dirs.mjs +6 -0
  7. package/dist/index.d.mts +78 -0
  8. package/dist/index.mjs +121 -0
  9. package/dist/nitro.json +15 -0
  10. package/dist/public/_nuxt/BHIHUtPz.js +4 -0
  11. package/dist/public/_nuxt/CCgOhniq.js +1 -0
  12. package/dist/public/_nuxt/CR6vfq1R.js +1 -0
  13. package/dist/public/_nuxt/DmxzK6E8.js +1 -0
  14. package/dist/public/_nuxt/builds/latest.json +1 -0
  15. package/dist/public/_nuxt/builds/meta/e9079134-f314-434b-b3a7-092c4a1e187d.json +1 -0
  16. package/dist/public/_nuxt/entry.DJ3VOi_0.css +1 -0
  17. package/dist/public/_nuxt/error-404.lC6KBLNm.css +1 -0
  18. package/dist/public/_nuxt/error-500.NtBcR2wE.css +1 -0
  19. package/dist/server/chunks/_/error-500.mjs +9 -0
  20. package/dist/server/chunks/build/_plugin-vue_export-helper-DjsbPc54.mjs +29 -0
  21. package/dist/server/chunks/build/client.precomputed.mjs +3 -0
  22. package/dist/server/chunks/build/error-404-Du0ot2hm.mjs +369 -0
  23. package/dist/server/chunks/build/error-500-Y3RUV6n2.mjs +73 -0
  24. package/dist/server/chunks/build/server.mjs +727 -0
  25. package/dist/server/chunks/nitro/nitro.mjs +5176 -0
  26. package/dist/server/chunks/routes/api/metadata.json.mjs +147 -0
  27. package/dist/server/chunks/routes/api/platform.json.mjs +20 -0
  28. package/dist/server/chunks/routes/renderer.mjs +408 -0
  29. package/dist/server/chunks/virtual/_virtual_spa-template.mjs +3 -0
  30. package/dist/server/index.mjs +9 -0
  31. package/dist/server/node_modules/.nitro/@vue/shared@3.5.25/dist/shared.cjs.prod.js +604 -0
  32. package/dist/server/node_modules/.nitro/@vue/shared@3.5.25/package.json +47 -0
  33. package/dist/server/node_modules/.nitro/@vue/shared@3.5.26/dist/shared.cjs.prod.js +604 -0
  34. package/dist/server/node_modules/.nitro/@vue/shared@3.5.26/package.json +47 -0
  35. package/dist/server/node_modules/@babel/parser/lib/index.js +14662 -0
  36. package/dist/server/node_modules/@babel/parser/package.json +50 -0
  37. package/dist/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
  38. package/dist/server/node_modules/@vue/compiler-core/package.json +58 -0
  39. package/dist/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  40. package/dist/server/node_modules/@vue/compiler-dom/package.json +57 -0
  41. package/dist/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  42. package/dist/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  43. package/dist/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1853 -0
  44. package/dist/server/node_modules/@vue/reactivity/package.json +55 -0
  45. package/dist/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6770 -0
  46. package/dist/server/node_modules/@vue/runtime-core/package.json +52 -0
  47. package/dist/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1732 -0
  48. package/dist/server/node_modules/@vue/runtime-dom/package.json +60 -0
  49. package/dist/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +879 -0
  50. package/dist/server/node_modules/@vue/server-renderer/package.json +55 -0
  51. package/dist/server/node_modules/ansis/index.cjs +1 -0
  52. package/dist/server/node_modules/ansis/index.mjs +1 -0
  53. package/dist/server/node_modules/ansis/package.json +25 -0
  54. package/dist/server/node_modules/birpc/dist/index.mjs +173 -0
  55. package/dist/server/node_modules/birpc/package.json +56 -0
  56. package/dist/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  57. package/dist/server/node_modules/consola/dist/core.mjs +512 -0
  58. package/dist/server/node_modules/consola/dist/index.mjs +651 -0
  59. package/dist/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  60. package/dist/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  61. package/dist/server/node_modules/consola/package.json +136 -0
  62. package/dist/server/node_modules/devalue/index.js +4 -0
  63. package/dist/server/node_modules/devalue/package.json +37 -0
  64. package/dist/server/node_modules/devalue/src/base64.js +110 -0
  65. package/dist/server/node_modules/devalue/src/constants.js +6 -0
  66. package/dist/server/node_modules/devalue/src/parse.js +205 -0
  67. package/dist/server/node_modules/devalue/src/stringify.js +265 -0
  68. package/dist/server/node_modules/devalue/src/uneval.js +407 -0
  69. package/dist/server/node_modules/devalue/src/utils.js +118 -0
  70. package/dist/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  71. package/dist/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  72. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  73. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  74. package/dist/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  75. package/dist/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  76. package/dist/server/node_modules/entities/dist/commonjs/package.json +3 -0
  77. package/dist/server/node_modules/entities/package.json +113 -0
  78. package/dist/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  79. package/dist/server/node_modules/estree-walker/package.json +37 -0
  80. package/dist/server/node_modules/get-port-please/dist/index.mjs +430 -0
  81. package/dist/server/node_modules/get-port-please/package.json +39 -0
  82. package/dist/server/node_modules/hookable/dist/index.mjs +290 -0
  83. package/dist/server/node_modules/hookable/package.json +49 -0
  84. package/dist/server/node_modules/source-map-js/lib/array-set.js +121 -0
  85. package/dist/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  86. package/dist/server/node_modules/source-map-js/lib/base64.js +67 -0
  87. package/dist/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  88. package/dist/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  89. package/dist/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  90. package/dist/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  91. package/dist/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  92. package/dist/server/node_modules/source-map-js/lib/source-node.js +413 -0
  93. package/dist/server/node_modules/source-map-js/lib/util.js +594 -0
  94. package/dist/server/node_modules/source-map-js/package.json +71 -0
  95. package/dist/server/node_modules/source-map-js/source-map.js +8 -0
  96. package/dist/server/node_modules/structured-clone-es/dist/index.mjs +285 -0
  97. package/dist/server/node_modules/structured-clone-es/package.json +56 -0
  98. package/dist/server/node_modules/ufo/dist/index.mjs +638 -0
  99. package/dist/server/node_modules/ufo/package.json +47 -0
  100. package/dist/server/node_modules/unhead/dist/index.mjs +9 -0
  101. package/dist/server/node_modules/unhead/dist/parser.mjs +508 -0
  102. package/dist/server/node_modules/unhead/dist/plugins.mjs +101 -0
  103. package/dist/server/node_modules/unhead/dist/scripts.mjs +30 -0
  104. package/dist/server/node_modules/unhead/dist/server.mjs +182 -0
  105. package/dist/server/node_modules/unhead/dist/shared/unhead.B578PsDV.mjs +266 -0
  106. package/dist/server/node_modules/unhead/dist/shared/unhead.BPM0-cfG.mjs +44 -0
  107. package/dist/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  108. package/dist/server/node_modules/unhead/dist/shared/unhead.BpRRHAhY.mjs +194 -0
  109. package/dist/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
  110. package/dist/server/node_modules/unhead/dist/shared/unhead.DH45uomy.mjs +180 -0
  111. package/dist/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  112. package/dist/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
  113. package/dist/server/node_modules/unhead/dist/shared/unhead.Djo8ep_Y.mjs +166 -0
  114. package/dist/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  115. package/dist/server/node_modules/unhead/dist/utils.mjs +5 -0
  116. package/dist/server/node_modules/unhead/package.json +105 -0
  117. package/dist/server/node_modules/vue/dist/vue.cjs.js +80 -0
  118. package/dist/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  119. package/dist/server/node_modules/vue/index.js +7 -0
  120. package/dist/server/node_modules/vue/index.mjs +1 -0
  121. package/dist/server/node_modules/vue/package.json +112 -0
  122. package/dist/server/node_modules/vue/server-renderer/index.mjs +1 -0
  123. package/dist/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
  124. package/dist/server/node_modules/vue-bundle-renderer/package.json +55 -0
  125. package/dist/server/node_modules/ws/lib/buffer-util.js +131 -0
  126. package/dist/server/node_modules/ws/lib/constants.js +19 -0
  127. package/dist/server/node_modules/ws/lib/event-target.js +292 -0
  128. package/dist/server/node_modules/ws/lib/extension.js +203 -0
  129. package/dist/server/node_modules/ws/lib/limiter.js +55 -0
  130. package/dist/server/node_modules/ws/lib/permessage-deflate.js +528 -0
  131. package/dist/server/node_modules/ws/lib/receiver.js +706 -0
  132. package/dist/server/node_modules/ws/lib/sender.js +602 -0
  133. package/dist/server/node_modules/ws/lib/stream.js +161 -0
  134. package/dist/server/node_modules/ws/lib/subprotocol.js +62 -0
  135. package/dist/server/node_modules/ws/lib/validation.js +152 -0
  136. package/dist/server/node_modules/ws/lib/websocket-server.js +554 -0
  137. package/dist/server/node_modules/ws/lib/websocket.js +1393 -0
  138. package/dist/server/node_modules/ws/package.json +69 -0
  139. package/dist/server/node_modules/ws/wrapper.mjs +8 -0
  140. package/dist/server/package.json +32 -0
  141. package/dist/shared/yansu.DmdNF4qf.mjs +151 -0
  142. package/package.json +50 -0
@@ -0,0 +1,604 @@
1
+ /**
2
+ * @vue/shared v3.5.25
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
6
+ 'use strict';
7
+
8
+ Object.defineProperty(exports, '__esModule', { value: true });
9
+
10
+ // @__NO_SIDE_EFFECTS__
11
+ function makeMap(str) {
12
+ const map = /* @__PURE__ */ Object.create(null);
13
+ for (const key of str.split(",")) map[key] = 1;
14
+ return (val) => val in map;
15
+ }
16
+
17
+ const EMPTY_OBJ = {};
18
+ const EMPTY_ARR = [];
19
+ const NOOP = () => {
20
+ };
21
+ const NO = () => false;
22
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
23
+ (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
24
+ const isModelListener = (key) => key.startsWith("onUpdate:");
25
+ const extend = Object.assign;
26
+ const remove = (arr, el) => {
27
+ const i = arr.indexOf(el);
28
+ if (i > -1) {
29
+ arr.splice(i, 1);
30
+ }
31
+ };
32
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
33
+ const hasOwn = (val, key) => hasOwnProperty.call(val, key);
34
+ const isArray = Array.isArray;
35
+ const isMap = (val) => toTypeString(val) === "[object Map]";
36
+ const isSet = (val) => toTypeString(val) === "[object Set]";
37
+ const isDate = (val) => toTypeString(val) === "[object Date]";
38
+ const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
39
+ const isFunction = (val) => typeof val === "function";
40
+ const isString = (val) => typeof val === "string";
41
+ const isSymbol = (val) => typeof val === "symbol";
42
+ const isObject = (val) => val !== null && typeof val === "object";
43
+ const isPromise = (val) => {
44
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
45
+ };
46
+ const objectToString = Object.prototype.toString;
47
+ const toTypeString = (value) => objectToString.call(value);
48
+ const toRawType = (value) => {
49
+ return toTypeString(value).slice(8, -1);
50
+ };
51
+ const isPlainObject = (val) => toTypeString(val) === "[object Object]";
52
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
53
+ const isReservedProp = /* @__PURE__ */ makeMap(
54
+ // the leading comma is intentional so empty string "" is also included
55
+ ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
56
+ );
57
+ const isBuiltInDirective = /* @__PURE__ */ makeMap(
58
+ "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
59
+ );
60
+ const cacheStringFunction = (fn) => {
61
+ const cache = /* @__PURE__ */ Object.create(null);
62
+ return ((str) => {
63
+ const hit = cache[str];
64
+ return hit || (cache[str] = fn(str));
65
+ });
66
+ };
67
+ const camelizeRE = /-\w/g;
68
+ const camelize = cacheStringFunction(
69
+ (str) => {
70
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
71
+ }
72
+ );
73
+ const hyphenateRE = /\B([A-Z])/g;
74
+ const hyphenate = cacheStringFunction(
75
+ (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
76
+ );
77
+ const capitalize = cacheStringFunction((str) => {
78
+ return str.charAt(0).toUpperCase() + str.slice(1);
79
+ });
80
+ const toHandlerKey = cacheStringFunction(
81
+ (str) => {
82
+ const s = str ? `on${capitalize(str)}` : ``;
83
+ return s;
84
+ }
85
+ );
86
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
87
+ const invokeArrayFns = (fns, ...arg) => {
88
+ for (let i = 0; i < fns.length; i++) {
89
+ fns[i](...arg);
90
+ }
91
+ };
92
+ const def = (obj, key, value, writable = false) => {
93
+ Object.defineProperty(obj, key, {
94
+ configurable: true,
95
+ enumerable: false,
96
+ writable,
97
+ value
98
+ });
99
+ };
100
+ const looseToNumber = (val) => {
101
+ const n = parseFloat(val);
102
+ return isNaN(n) ? val : n;
103
+ };
104
+ const toNumber = (val) => {
105
+ const n = isString(val) ? Number(val) : NaN;
106
+ return isNaN(n) ? val : n;
107
+ };
108
+ let _globalThis;
109
+ const getGlobalThis = () => {
110
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
111
+ };
112
+ const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
113
+ function genPropsAccessExp(name) {
114
+ return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
115
+ }
116
+ function genCacheKey(source, options) {
117
+ return source + JSON.stringify(
118
+ options,
119
+ (_, val) => typeof val === "function" ? val.toString() : val
120
+ );
121
+ }
122
+
123
+ const PatchFlags = {
124
+ "TEXT": 1,
125
+ "1": "TEXT",
126
+ "CLASS": 2,
127
+ "2": "CLASS",
128
+ "STYLE": 4,
129
+ "4": "STYLE",
130
+ "PROPS": 8,
131
+ "8": "PROPS",
132
+ "FULL_PROPS": 16,
133
+ "16": "FULL_PROPS",
134
+ "NEED_HYDRATION": 32,
135
+ "32": "NEED_HYDRATION",
136
+ "STABLE_FRAGMENT": 64,
137
+ "64": "STABLE_FRAGMENT",
138
+ "KEYED_FRAGMENT": 128,
139
+ "128": "KEYED_FRAGMENT",
140
+ "UNKEYED_FRAGMENT": 256,
141
+ "256": "UNKEYED_FRAGMENT",
142
+ "NEED_PATCH": 512,
143
+ "512": "NEED_PATCH",
144
+ "DYNAMIC_SLOTS": 1024,
145
+ "1024": "DYNAMIC_SLOTS",
146
+ "DEV_ROOT_FRAGMENT": 2048,
147
+ "2048": "DEV_ROOT_FRAGMENT",
148
+ "CACHED": -1,
149
+ "-1": "CACHED",
150
+ "BAIL": -2,
151
+ "-2": "BAIL"
152
+ };
153
+ const PatchFlagNames = {
154
+ [1]: `TEXT`,
155
+ [2]: `CLASS`,
156
+ [4]: `STYLE`,
157
+ [8]: `PROPS`,
158
+ [16]: `FULL_PROPS`,
159
+ [32]: `NEED_HYDRATION`,
160
+ [64]: `STABLE_FRAGMENT`,
161
+ [128]: `KEYED_FRAGMENT`,
162
+ [256]: `UNKEYED_FRAGMENT`,
163
+ [512]: `NEED_PATCH`,
164
+ [1024]: `DYNAMIC_SLOTS`,
165
+ [2048]: `DEV_ROOT_FRAGMENT`,
166
+ [-1]: `CACHED`,
167
+ [-2]: `BAIL`
168
+ };
169
+
170
+ const ShapeFlags = {
171
+ "ELEMENT": 1,
172
+ "1": "ELEMENT",
173
+ "FUNCTIONAL_COMPONENT": 2,
174
+ "2": "FUNCTIONAL_COMPONENT",
175
+ "STATEFUL_COMPONENT": 4,
176
+ "4": "STATEFUL_COMPONENT",
177
+ "TEXT_CHILDREN": 8,
178
+ "8": "TEXT_CHILDREN",
179
+ "ARRAY_CHILDREN": 16,
180
+ "16": "ARRAY_CHILDREN",
181
+ "SLOTS_CHILDREN": 32,
182
+ "32": "SLOTS_CHILDREN",
183
+ "TELEPORT": 64,
184
+ "64": "TELEPORT",
185
+ "SUSPENSE": 128,
186
+ "128": "SUSPENSE",
187
+ "COMPONENT_SHOULD_KEEP_ALIVE": 256,
188
+ "256": "COMPONENT_SHOULD_KEEP_ALIVE",
189
+ "COMPONENT_KEPT_ALIVE": 512,
190
+ "512": "COMPONENT_KEPT_ALIVE",
191
+ "COMPONENT": 6,
192
+ "6": "COMPONENT"
193
+ };
194
+
195
+ const SlotFlags = {
196
+ "STABLE": 1,
197
+ "1": "STABLE",
198
+ "DYNAMIC": 2,
199
+ "2": "DYNAMIC",
200
+ "FORWARDED": 3,
201
+ "3": "FORWARDED"
202
+ };
203
+ const slotFlagsText = {
204
+ [1]: "STABLE",
205
+ [2]: "DYNAMIC",
206
+ [3]: "FORWARDED"
207
+ };
208
+
209
+ 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";
210
+ const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
211
+ const isGloballyWhitelisted = isGloballyAllowed;
212
+
213
+ const range = 2;
214
+ function generateCodeFrame(source, start = 0, end = source.length) {
215
+ start = Math.max(0, Math.min(start, source.length));
216
+ end = Math.max(0, Math.min(end, source.length));
217
+ if (start > end) return "";
218
+ let lines = source.split(/(\r?\n)/);
219
+ const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
220
+ lines = lines.filter((_, idx) => idx % 2 === 0);
221
+ let count = 0;
222
+ const res = [];
223
+ for (let i = 0; i < lines.length; i++) {
224
+ count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
225
+ if (count >= start) {
226
+ for (let j = i - range; j <= i + range || end > count; j++) {
227
+ if (j < 0 || j >= lines.length) continue;
228
+ const line = j + 1;
229
+ res.push(
230
+ `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`
231
+ );
232
+ const lineLength = lines[j].length;
233
+ const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
234
+ if (j === i) {
235
+ const pad = start - (count - (lineLength + newLineSeqLength));
236
+ const length = Math.max(
237
+ 1,
238
+ end > count ? lineLength - pad : end - start
239
+ );
240
+ res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
241
+ } else if (j > i) {
242
+ if (end > count) {
243
+ const length = Math.max(Math.min(end - count, lineLength), 1);
244
+ res.push(` | ` + "^".repeat(length));
245
+ }
246
+ count += lineLength + newLineSeqLength;
247
+ }
248
+ }
249
+ break;
250
+ }
251
+ }
252
+ return res.join("\n");
253
+ }
254
+
255
+ function normalizeStyle(value) {
256
+ if (isArray(value)) {
257
+ const res = {};
258
+ for (let i = 0; i < value.length; i++) {
259
+ const item = value[i];
260
+ const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
261
+ if (normalized) {
262
+ for (const key in normalized) {
263
+ res[key] = normalized[key];
264
+ }
265
+ }
266
+ }
267
+ return res;
268
+ } else if (isString(value) || isObject(value)) {
269
+ return value;
270
+ }
271
+ }
272
+ const listDelimiterRE = /;(?![^(]*\))/g;
273
+ const propertyDelimiterRE = /:([^]+)/;
274
+ const styleCommentRE = /\/\*[^]*?\*\//g;
275
+ function parseStringStyle(cssText) {
276
+ const ret = {};
277
+ cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
278
+ if (item) {
279
+ const tmp = item.split(propertyDelimiterRE);
280
+ tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
281
+ }
282
+ });
283
+ return ret;
284
+ }
285
+ function stringifyStyle(styles) {
286
+ if (!styles) return "";
287
+ if (isString(styles)) return styles;
288
+ let ret = "";
289
+ for (const key in styles) {
290
+ const value = styles[key];
291
+ if (isString(value) || typeof value === "number") {
292
+ const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
293
+ ret += `${normalizedKey}:${value};`;
294
+ }
295
+ }
296
+ return ret;
297
+ }
298
+ function normalizeClass(value) {
299
+ let res = "";
300
+ if (isString(value)) {
301
+ res = value;
302
+ } else if (isArray(value)) {
303
+ for (let i = 0; i < value.length; i++) {
304
+ const normalized = normalizeClass(value[i]);
305
+ if (normalized) {
306
+ res += normalized + " ";
307
+ }
308
+ }
309
+ } else if (isObject(value)) {
310
+ for (const name in value) {
311
+ if (value[name]) {
312
+ res += name + " ";
313
+ }
314
+ }
315
+ }
316
+ return res.trim();
317
+ }
318
+ function normalizeProps(props) {
319
+ if (!props) return null;
320
+ let { class: klass, style } = props;
321
+ if (klass && !isString(klass)) {
322
+ props.class = normalizeClass(klass);
323
+ }
324
+ if (style) {
325
+ props.style = normalizeStyle(style);
326
+ }
327
+ return props;
328
+ }
329
+
330
+ 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";
331
+ 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";
332
+ 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";
333
+ const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
334
+ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
335
+ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
336
+ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
337
+ const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
338
+
339
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
340
+ const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
341
+ const isBooleanAttr = /* @__PURE__ */ makeMap(
342
+ specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
343
+ );
344
+ function includeBooleanAttr(value) {
345
+ return !!value || value === "";
346
+ }
347
+ const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
348
+ const attrValidationCache = {};
349
+ function isSSRSafeAttrName(name) {
350
+ if (attrValidationCache.hasOwnProperty(name)) {
351
+ return attrValidationCache[name];
352
+ }
353
+ const isUnsafe = unsafeAttrCharRE.test(name);
354
+ if (isUnsafe) {
355
+ console.error(`unsafe attribute name: ${name}`);
356
+ }
357
+ return attrValidationCache[name] = !isUnsafe;
358
+ }
359
+ const propsToAttrMap = {
360
+ acceptCharset: "accept-charset",
361
+ className: "class",
362
+ htmlFor: "for",
363
+ httpEquiv: "http-equiv"
364
+ };
365
+ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
366
+ `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`
367
+ );
368
+ const isKnownSvgAttr = /* @__PURE__ */ makeMap(
369
+ `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`
370
+ );
371
+ const isKnownMathMLAttr = /* @__PURE__ */ makeMap(
372
+ `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`
373
+ );
374
+ function isRenderableAttrValue(value) {
375
+ if (value == null) {
376
+ return false;
377
+ }
378
+ const type = typeof value;
379
+ return type === "string" || type === "number" || type === "boolean";
380
+ }
381
+
382
+ const escapeRE = /["'&<>]/;
383
+ function escapeHtml(string) {
384
+ const str = "" + string;
385
+ const match = escapeRE.exec(str);
386
+ if (!match) {
387
+ return str;
388
+ }
389
+ let html = "";
390
+ let escaped;
391
+ let index;
392
+ let lastIndex = 0;
393
+ for (index = match.index; index < str.length; index++) {
394
+ switch (str.charCodeAt(index)) {
395
+ case 34:
396
+ escaped = "&quot;";
397
+ break;
398
+ case 38:
399
+ escaped = "&amp;";
400
+ break;
401
+ case 39:
402
+ escaped = "&#39;";
403
+ break;
404
+ case 60:
405
+ escaped = "&lt;";
406
+ break;
407
+ case 62:
408
+ escaped = "&gt;";
409
+ break;
410
+ default:
411
+ continue;
412
+ }
413
+ if (lastIndex !== index) {
414
+ html += str.slice(lastIndex, index);
415
+ }
416
+ lastIndex = index + 1;
417
+ html += escaped;
418
+ }
419
+ return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
420
+ }
421
+ const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
422
+ function escapeHtmlComment(src) {
423
+ return src.replace(commentStripRE, "");
424
+ }
425
+ const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
426
+ function getEscapedCssVarName(key, doubleEscape) {
427
+ return key.replace(
428
+ cssVarNameEscapeSymbolsRE,
429
+ (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
430
+ );
431
+ }
432
+
433
+ function looseCompareArrays(a, b) {
434
+ if (a.length !== b.length) return false;
435
+ let equal = true;
436
+ for (let i = 0; equal && i < a.length; i++) {
437
+ equal = looseEqual(a[i], b[i]);
438
+ }
439
+ return equal;
440
+ }
441
+ function looseEqual(a, b) {
442
+ if (a === b) return true;
443
+ let aValidType = isDate(a);
444
+ let bValidType = isDate(b);
445
+ if (aValidType || bValidType) {
446
+ return aValidType && bValidType ? a.getTime() === b.getTime() : false;
447
+ }
448
+ aValidType = isSymbol(a);
449
+ bValidType = isSymbol(b);
450
+ if (aValidType || bValidType) {
451
+ return a === b;
452
+ }
453
+ aValidType = isArray(a);
454
+ bValidType = isArray(b);
455
+ if (aValidType || bValidType) {
456
+ return aValidType && bValidType ? looseCompareArrays(a, b) : false;
457
+ }
458
+ aValidType = isObject(a);
459
+ bValidType = isObject(b);
460
+ if (aValidType || bValidType) {
461
+ if (!aValidType || !bValidType) {
462
+ return false;
463
+ }
464
+ const aKeysCount = Object.keys(a).length;
465
+ const bKeysCount = Object.keys(b).length;
466
+ if (aKeysCount !== bKeysCount) {
467
+ return false;
468
+ }
469
+ for (const key in a) {
470
+ const aHasKey = a.hasOwnProperty(key);
471
+ const bHasKey = b.hasOwnProperty(key);
472
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
473
+ return false;
474
+ }
475
+ }
476
+ }
477
+ return String(a) === String(b);
478
+ }
479
+ function looseIndexOf(arr, val) {
480
+ return arr.findIndex((item) => looseEqual(item, val));
481
+ }
482
+
483
+ const isRef = (val) => {
484
+ return !!(val && val["__v_isRef"] === true);
485
+ };
486
+ const toDisplayString = (val) => {
487
+ return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
488
+ };
489
+ const replacer = (_key, val) => {
490
+ if (isRef(val)) {
491
+ return replacer(_key, val.value);
492
+ } else if (isMap(val)) {
493
+ return {
494
+ [`Map(${val.size})`]: [...val.entries()].reduce(
495
+ (entries, [key, val2], i) => {
496
+ entries[stringifySymbol(key, i) + " =>"] = val2;
497
+ return entries;
498
+ },
499
+ {}
500
+ )
501
+ };
502
+ } else if (isSet(val)) {
503
+ return {
504
+ [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
505
+ };
506
+ } else if (isSymbol(val)) {
507
+ return stringifySymbol(val);
508
+ } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
509
+ return String(val);
510
+ }
511
+ return val;
512
+ };
513
+ const stringifySymbol = (v, i = "") => {
514
+ var _a;
515
+ return (
516
+ // Symbol.description in es2019+ so we need to cast here to pass
517
+ // the lib: es2016 check
518
+ isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
519
+ );
520
+ };
521
+
522
+ function normalizeCssVarValue(value) {
523
+ if (value == null) {
524
+ return "initial";
525
+ }
526
+ if (typeof value === "string") {
527
+ return value === "" ? " " : value;
528
+ }
529
+ return String(value);
530
+ }
531
+
532
+ exports.EMPTY_ARR = EMPTY_ARR;
533
+ exports.EMPTY_OBJ = EMPTY_OBJ;
534
+ exports.NO = NO;
535
+ exports.NOOP = NOOP;
536
+ exports.PatchFlagNames = PatchFlagNames;
537
+ exports.PatchFlags = PatchFlags;
538
+ exports.ShapeFlags = ShapeFlags;
539
+ exports.SlotFlags = SlotFlags;
540
+ exports.camelize = camelize;
541
+ exports.capitalize = capitalize;
542
+ exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;
543
+ exports.def = def;
544
+ exports.escapeHtml = escapeHtml;
545
+ exports.escapeHtmlComment = escapeHtmlComment;
546
+ exports.extend = extend;
547
+ exports.genCacheKey = genCacheKey;
548
+ exports.genPropsAccessExp = genPropsAccessExp;
549
+ exports.generateCodeFrame = generateCodeFrame;
550
+ exports.getEscapedCssVarName = getEscapedCssVarName;
551
+ exports.getGlobalThis = getGlobalThis;
552
+ exports.hasChanged = hasChanged;
553
+ exports.hasOwn = hasOwn;
554
+ exports.hyphenate = hyphenate;
555
+ exports.includeBooleanAttr = includeBooleanAttr;
556
+ exports.invokeArrayFns = invokeArrayFns;
557
+ exports.isArray = isArray;
558
+ exports.isBooleanAttr = isBooleanAttr;
559
+ exports.isBuiltInDirective = isBuiltInDirective;
560
+ exports.isDate = isDate;
561
+ exports.isFunction = isFunction;
562
+ exports.isGloballyAllowed = isGloballyAllowed;
563
+ exports.isGloballyWhitelisted = isGloballyWhitelisted;
564
+ exports.isHTMLTag = isHTMLTag;
565
+ exports.isIntegerKey = isIntegerKey;
566
+ exports.isKnownHtmlAttr = isKnownHtmlAttr;
567
+ exports.isKnownMathMLAttr = isKnownMathMLAttr;
568
+ exports.isKnownSvgAttr = isKnownSvgAttr;
569
+ exports.isMap = isMap;
570
+ exports.isMathMLTag = isMathMLTag;
571
+ exports.isModelListener = isModelListener;
572
+ exports.isObject = isObject;
573
+ exports.isOn = isOn;
574
+ exports.isPlainObject = isPlainObject;
575
+ exports.isPromise = isPromise;
576
+ exports.isRegExp = isRegExp;
577
+ exports.isRenderableAttrValue = isRenderableAttrValue;
578
+ exports.isReservedProp = isReservedProp;
579
+ exports.isSSRSafeAttrName = isSSRSafeAttrName;
580
+ exports.isSVGTag = isSVGTag;
581
+ exports.isSet = isSet;
582
+ exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
583
+ exports.isString = isString;
584
+ exports.isSymbol = isSymbol;
585
+ exports.isVoidTag = isVoidTag;
586
+ exports.looseEqual = looseEqual;
587
+ exports.looseIndexOf = looseIndexOf;
588
+ exports.looseToNumber = looseToNumber;
589
+ exports.makeMap = makeMap;
590
+ exports.normalizeClass = normalizeClass;
591
+ exports.normalizeCssVarValue = normalizeCssVarValue;
592
+ exports.normalizeProps = normalizeProps;
593
+ exports.normalizeStyle = normalizeStyle;
594
+ exports.objectToString = objectToString;
595
+ exports.parseStringStyle = parseStringStyle;
596
+ exports.propsToAttrMap = propsToAttrMap;
597
+ exports.remove = remove;
598
+ exports.slotFlagsText = slotFlagsText;
599
+ exports.stringifyStyle = stringifyStyle;
600
+ exports.toDisplayString = toDisplayString;
601
+ exports.toHandlerKey = toHandlerKey;
602
+ exports.toNumber = toNumber;
603
+ exports.toRawType = toRawType;
604
+ exports.toTypeString = toTypeString;
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@vue/shared",
3
+ "version": "3.5.25",
4
+ "description": "internal utils shared across @vue packages",
5
+ "main": "index.js",
6
+ "module": "dist/shared.esm-bundler.js",
7
+ "types": "dist/shared.d.ts",
8
+ "files": [
9
+ "index.js",
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/shared.d.ts",
15
+ "node": {
16
+ "production": "./dist/shared.cjs.prod.js",
17
+ "development": "./dist/shared.cjs.js",
18
+ "default": "./dist/shared.cjs.prod.js"
19
+ },
20
+ "module": "./dist/shared.esm-bundler.js",
21
+ "import": "./dist/shared.esm-bundler.js",
22
+ "require": "./index.js"
23
+ },
24
+ "./*": "./*"
25
+ },
26
+ "sideEffects": false,
27
+ "buildOptions": {
28
+ "formats": [
29
+ "esm-bundler",
30
+ "cjs"
31
+ ]
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/vuejs/core.git",
36
+ "directory": "packages/shared"
37
+ },
38
+ "keywords": [
39
+ "vue"
40
+ ],
41
+ "author": "Evan You",
42
+ "license": "MIT",
43
+ "bugs": {
44
+ "url": "https://github.com/vuejs/core/issues"
45
+ },
46
+ "homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme"
47
+ }