@atomic-ui/ui-vue 0.1.0 → 0.1.2

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.
package/dist/index.js CHANGED
@@ -1,3437 +1,5 @@
1
- // node_modules/.pnpm/@vue+shared@3.5.44/node_modules/@vue/shared/dist/shared.esm-bundler.js
2
- // @__NO_SIDE_EFFECTS__
3
- function makeMap(str) {
4
- const map2 = /* @__PURE__ */ Object.create(null);
5
- for (const key of str.split(",")) map2[key] = 1;
6
- return (val) => val in map2;
7
- }
8
- var EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
9
- var EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
10
- var NOOP = () => {
11
- };
12
- var NO = () => false;
13
- var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
14
- (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
15
- var isModelListener = (key) => key.startsWith("onUpdate:");
16
- var extend = Object.assign;
17
- var remove = (arr, el) => {
18
- const i = arr.indexOf(el);
19
- if (i > -1) {
20
- arr.splice(i, 1);
21
- }
22
- };
23
- var hasOwnProperty = Object.prototype.hasOwnProperty;
24
- var hasOwn = (val, key) => hasOwnProperty.call(val, key);
25
- var isArray = Array.isArray;
26
- var isMap = (val) => toTypeString(val) === "[object Map]";
27
- var isSet = (val) => toTypeString(val) === "[object Set]";
28
- var isFunction = (val) => typeof val === "function";
29
- var isString = (val) => typeof val === "string";
30
- var isSymbol = (val) => typeof val === "symbol";
31
- var isObject = (val) => val !== null && typeof val === "object";
32
- var isPromise = (val) => {
33
- return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
34
- };
35
- var objectToString = Object.prototype.toString;
36
- var toTypeString = (value) => objectToString.call(value);
37
- var toRawType = (value) => {
38
- return toTypeString(value).slice(8, -1);
39
- };
40
- var isPlainObject = (val) => toTypeString(val) === "[object Object]";
41
- var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
42
- var cacheStringFunction = (fn) => {
43
- const cache = /* @__PURE__ */ Object.create(null);
44
- return ((str) => {
45
- const hit = cache[str];
46
- return hit || (cache[str] = fn(str));
47
- });
48
- };
49
- var camelizeRE = /-\w/g;
50
- var camelize = cacheStringFunction(
51
- (str) => {
52
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
53
- }
54
- );
55
- var hyphenateRE = /\B([A-Z])/g;
56
- var hyphenate = cacheStringFunction(
57
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
58
- );
59
- var capitalize = cacheStringFunction((str) => {
60
- return str.charAt(0).toUpperCase() + str.slice(1);
61
- });
62
- var toHandlerKey = cacheStringFunction(
63
- (str) => {
64
- const s = str ? `on${capitalize(str)}` : ``;
65
- return s;
66
- }
67
- );
68
- var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
69
- var def = (obj, key, value, writable = false) => {
70
- Object.defineProperty(obj, key, {
71
- configurable: true,
72
- enumerable: false,
73
- writable,
74
- value
75
- });
76
- };
77
- var _globalThis;
78
- var getGlobalThis = () => {
79
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
80
- };
81
- function normalizeStyle(value) {
82
- if (isArray(value)) {
83
- const res = {};
84
- for (let i = 0; i < value.length; i++) {
85
- const item = value[i];
86
- const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
87
- if (normalized) {
88
- for (const key in normalized) {
89
- res[key] = normalized[key];
90
- }
91
- }
92
- }
93
- return res;
94
- } else if (isString(value) || isObject(value)) {
95
- return value;
96
- }
97
- }
98
- var listDelimiterRE = /;(?![^(]*\))/g;
99
- var propertyDelimiterRE = /:([^]+)/;
100
- var styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
101
- function parseStringStyle(cssText) {
102
- const ret = {};
103
- cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
104
- if (item) {
105
- const tmp = item.split(propertyDelimiterRE);
106
- tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
107
- }
108
- });
109
- return ret;
110
- }
111
- function normalizeClass(value) {
112
- let res = "";
113
- if (isString(value)) {
114
- res = value;
115
- } else if (isArray(value)) {
116
- for (let i = 0; i < value.length; i++) {
117
- const normalized = normalizeClass(value[i]);
118
- if (normalized) {
119
- res += normalized + " ";
120
- }
121
- }
122
- } else if (isObject(value)) {
123
- for (const name in value) {
124
- if (value[name]) {
125
- res += name + " ";
126
- }
127
- }
128
- }
129
- return res.trim();
130
- }
131
- var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
132
- var isBooleanAttr = /* @__PURE__ */ makeMap(
133
- specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
134
- );
135
-
136
- // node_modules/.pnpm/@vue+reactivity@3.5.44/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
137
- function warn(msg, ...args) {
138
- console.warn(`[Vue warn] ${msg}`, ...args);
139
- }
140
- var activeEffectScope;
141
- function getCurrentScope() {
142
- return activeEffectScope;
143
- }
144
- var activeSub;
145
- var pausedQueueEffects = /* @__PURE__ */ new WeakSet();
146
- var ReactiveEffect = class {
147
- constructor(fn) {
148
- this.fn = fn;
149
- this.deps = void 0;
150
- this.depsTail = void 0;
151
- this.flags = 1 | 4;
152
- this.next = void 0;
153
- this.cleanup = void 0;
154
- this.scheduler = void 0;
155
- if (activeEffectScope) {
156
- if (activeEffectScope.active) {
157
- activeEffectScope.effects.push(this);
158
- } else {
159
- this.flags &= -2;
160
- }
161
- }
162
- }
163
- pause() {
164
- this.flags |= 64;
165
- }
166
- resume() {
167
- if (this.flags & 64) {
168
- this.flags &= -65;
169
- if (pausedQueueEffects.has(this)) {
170
- pausedQueueEffects.delete(this);
171
- this.trigger();
172
- }
173
- }
174
- }
175
- /**
176
- * @internal
177
- */
178
- notify() {
179
- if (this.flags & 2 && !(this.flags & 32)) {
180
- return;
181
- }
182
- if (!(this.flags & 8)) {
183
- batch(this);
184
- }
185
- }
186
- run() {
187
- if (!(this.flags & 1)) {
188
- return this.fn();
189
- }
190
- this.flags |= 2;
191
- cleanupEffect(this);
192
- prepareDeps(this);
193
- const prevEffect = activeSub;
194
- const prevShouldTrack = shouldTrack;
195
- activeSub = this;
196
- shouldTrack = true;
197
- try {
198
- return this.fn();
199
- } finally {
200
- if (!!(process.env.NODE_ENV !== "production") && activeSub !== this) {
201
- warn(
202
- "Active effect was not restored correctly - this is likely a Vue internal bug."
203
- );
204
- }
205
- cleanupDeps(this);
206
- activeSub = prevEffect;
207
- shouldTrack = prevShouldTrack;
208
- this.flags &= -3;
209
- }
210
- }
211
- stop() {
212
- if (this.flags & 1) {
213
- for (let link = this.deps; link; link = link.nextDep) {
214
- removeSub(link);
215
- }
216
- this.deps = this.depsTail = void 0;
217
- cleanupEffect(this);
218
- this.onStop && this.onStop();
219
- this.flags &= -2;
220
- }
221
- }
222
- trigger() {
223
- if (this.flags & 64) {
224
- pausedQueueEffects.add(this);
225
- } else if (this.scheduler) {
226
- this.scheduler();
227
- } else {
228
- this.runIfDirty();
229
- }
230
- }
231
- /**
232
- * @internal
233
- */
234
- runIfDirty() {
235
- if (isDirty(this)) {
236
- this.run();
237
- }
238
- }
239
- get dirty() {
240
- return isDirty(this);
241
- }
242
- };
243
- var batchDepth = 0;
244
- var batchedSub;
245
- var batchedComputed;
246
- function batch(sub, isComputed = false) {
247
- sub.flags |= 8;
248
- if (isComputed) {
249
- sub.next = batchedComputed;
250
- batchedComputed = sub;
251
- return;
252
- }
253
- sub.next = batchedSub;
254
- batchedSub = sub;
255
- }
256
- function startBatch() {
257
- batchDepth++;
258
- }
259
- function endBatch() {
260
- if (--batchDepth > 0) {
261
- return;
262
- }
263
- if (batchedComputed) {
264
- let e = batchedComputed;
265
- batchedComputed = void 0;
266
- while (e) {
267
- const next = e.next;
268
- e.next = void 0;
269
- e.flags &= -9;
270
- e = next;
271
- }
272
- }
273
- let error;
274
- while (batchedSub) {
275
- let e = batchedSub;
276
- batchedSub = void 0;
277
- while (e) {
278
- const next = e.next;
279
- e.next = void 0;
280
- e.flags &= -9;
281
- if (e.flags & 1) {
282
- try {
283
- ;
284
- e.trigger();
285
- } catch (err) {
286
- if (!error) error = err;
287
- }
288
- }
289
- e = next;
290
- }
291
- }
292
- if (error) throw error;
293
- }
294
- function prepareDeps(sub) {
295
- for (let link = sub.deps; link; link = link.nextDep) {
296
- link.version = -1;
297
- link.prevActiveLink = link.dep.activeLink;
298
- link.dep.activeLink = link;
299
- }
300
- }
301
- function cleanupDeps(sub) {
302
- let head;
303
- let tail = sub.depsTail;
304
- let link = tail;
305
- while (link) {
306
- const prev = link.prevDep;
307
- if (link.version === -1) {
308
- if (link === tail) tail = prev;
309
- removeSub(link);
310
- removeDep(link);
311
- } else {
312
- head = link;
313
- }
314
- link.dep.activeLink = link.prevActiveLink;
315
- link.prevActiveLink = void 0;
316
- link = prev;
317
- }
318
- sub.deps = head;
319
- sub.depsTail = tail;
320
- }
321
- function isDirty(sub) {
322
- for (let link = sub.deps; link; link = link.nextDep) {
323
- if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
324
- return true;
325
- }
326
- }
327
- if (sub._dirty) {
328
- return true;
329
- }
330
- return false;
331
- }
332
- function refreshComputed(computed2) {
333
- if (computed2.flags & 4 && !(computed2.flags & 16)) {
334
- return;
335
- }
336
- computed2.flags &= -17;
337
- if (computed2.globalVersion === globalVersion) {
338
- return;
339
- }
340
- computed2.globalVersion = globalVersion;
341
- if (!computed2.isSSR && computed2.flags & 128 && (!computed2.deps && !computed2._dirty || !isDirty(computed2))) {
342
- return;
343
- }
344
- computed2.flags |= 2;
345
- const dep = computed2.dep;
346
- const prevSub = activeSub;
347
- const prevShouldTrack = shouldTrack;
348
- activeSub = computed2;
349
- shouldTrack = true;
350
- try {
351
- prepareDeps(computed2);
352
- const value = computed2.fn(computed2._value);
353
- if (dep.version === 0 || hasChanged(value, computed2._value)) {
354
- computed2.flags |= 128;
355
- computed2._value = value;
356
- dep.version++;
357
- }
358
- } catch (err) {
359
- dep.version++;
360
- throw err;
361
- } finally {
362
- activeSub = prevSub;
363
- shouldTrack = prevShouldTrack;
364
- cleanupDeps(computed2);
365
- computed2.flags &= -3;
366
- }
367
- }
368
- function removeSub(link, soft = false) {
369
- const { dep, prevSub, nextSub } = link;
370
- if (prevSub) {
371
- prevSub.nextSub = nextSub;
372
- link.prevSub = void 0;
373
- }
374
- if (nextSub) {
375
- nextSub.prevSub = prevSub;
376
- link.nextSub = void 0;
377
- }
378
- if (!!(process.env.NODE_ENV !== "production") && dep.subsHead === link) {
379
- dep.subsHead = nextSub;
380
- }
381
- if (dep.subs === link) {
382
- dep.subs = prevSub;
383
- if (!prevSub && dep.computed) {
384
- dep.computed.flags &= -5;
385
- for (let l = dep.computed.deps; l; l = l.nextDep) {
386
- removeSub(l, true);
387
- }
388
- }
389
- }
390
- if (!soft && !--dep.sc && dep.map) {
391
- dep.map.delete(dep.key);
392
- }
393
- }
394
- function removeDep(link) {
395
- const { prevDep, nextDep } = link;
396
- if (prevDep) {
397
- prevDep.nextDep = nextDep;
398
- link.prevDep = void 0;
399
- }
400
- if (nextDep) {
401
- nextDep.prevDep = prevDep;
402
- link.nextDep = void 0;
403
- }
404
- }
405
- var shouldTrack = true;
406
- var trackStack = [];
407
- function pauseTracking() {
408
- trackStack.push(shouldTrack);
409
- shouldTrack = false;
410
- }
411
- function resetTracking() {
412
- const last = trackStack.pop();
413
- shouldTrack = last === void 0 ? true : last;
414
- }
415
- function cleanupEffect(e) {
416
- const { cleanup } = e;
417
- e.cleanup = void 0;
418
- if (cleanup) {
419
- const prevSub = activeSub;
420
- activeSub = void 0;
421
- try {
422
- cleanup();
423
- } finally {
424
- activeSub = prevSub;
425
- }
426
- }
427
- }
428
- var globalVersion = 0;
429
- var Link = class {
430
- constructor(sub, dep) {
431
- this.sub = sub;
432
- this.dep = dep;
433
- this.version = dep.version;
434
- this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
435
- }
436
- };
437
- var Dep = class {
438
- // TODO isolatedDeclarations "__v_skip"
439
- constructor(computed2) {
440
- this.computed = computed2;
441
- this.version = 0;
442
- this.activeLink = void 0;
443
- this.subs = void 0;
444
- this.map = void 0;
445
- this.key = void 0;
446
- this.sc = 0;
447
- this.__v_skip = true;
448
- if (!!(process.env.NODE_ENV !== "production")) {
449
- this.subsHead = void 0;
450
- }
451
- }
452
- track(debugInfo) {
453
- if (!activeSub || !shouldTrack || activeSub === this.computed) {
454
- return;
455
- }
456
- let link = this.activeLink;
457
- if (link === void 0 || link.sub !== activeSub) {
458
- link = this.activeLink = new Link(activeSub, this);
459
- if (!activeSub.deps) {
460
- activeSub.deps = activeSub.depsTail = link;
461
- } else {
462
- link.prevDep = activeSub.depsTail;
463
- activeSub.depsTail.nextDep = link;
464
- activeSub.depsTail = link;
465
- }
466
- addSub(link);
467
- } else if (link.version === -1) {
468
- link.version = this.version;
469
- if (link.nextDep) {
470
- const next = link.nextDep;
471
- next.prevDep = link.prevDep;
472
- if (link.prevDep) {
473
- link.prevDep.nextDep = next;
474
- }
475
- link.prevDep = activeSub.depsTail;
476
- link.nextDep = void 0;
477
- activeSub.depsTail.nextDep = link;
478
- activeSub.depsTail = link;
479
- if (activeSub.deps === link) {
480
- activeSub.deps = next;
481
- }
482
- }
483
- }
484
- if (!!(process.env.NODE_ENV !== "production") && activeSub.onTrack) {
485
- activeSub.onTrack(
486
- extend(
487
- {
488
- effect: activeSub
489
- },
490
- debugInfo
491
- )
492
- );
493
- }
494
- return link;
495
- }
496
- trigger(debugInfo) {
497
- this.version++;
498
- globalVersion++;
499
- this.notify(debugInfo);
500
- }
501
- notify(debugInfo) {
502
- startBatch();
503
- try {
504
- if (!!(process.env.NODE_ENV !== "production")) {
505
- for (let head = this.subsHead; head; head = head.nextSub) {
506
- if (head.sub.onTrigger && !(head.sub.flags & 8)) {
507
- head.sub.onTrigger(
508
- extend(
509
- {
510
- effect: head.sub
511
- },
512
- debugInfo
513
- )
514
- );
515
- }
516
- }
517
- }
518
- for (let link = this.subs; link; link = link.prevSub) {
519
- if (link.sub.notify()) {
520
- ;
521
- link.sub.dep.notify();
522
- }
523
- }
524
- } finally {
525
- endBatch();
526
- }
527
- }
528
- };
529
- function addSub(link) {
530
- link.dep.sc++;
531
- if (link.sub.flags & 4) {
532
- const computed2 = link.dep.computed;
533
- if (computed2 && !link.dep.subs) {
534
- computed2.flags |= 4 | 16;
535
- for (let l = computed2.deps; l; l = l.nextDep) {
536
- addSub(l);
537
- }
538
- }
539
- const currentTail = link.dep.subs;
540
- if (currentTail !== link) {
541
- link.prevSub = currentTail;
542
- if (currentTail) currentTail.nextSub = link;
543
- }
544
- if (!!(process.env.NODE_ENV !== "production") && link.dep.subsHead === void 0) {
545
- link.dep.subsHead = link;
546
- }
547
- link.dep.subs = link;
548
- }
549
- }
550
- var targetMap = /* @__PURE__ */ new WeakMap();
551
- var ITERATE_KEY = /* @__PURE__ */ Symbol(
552
- !!(process.env.NODE_ENV !== "production") ? "Object iterate" : ""
553
- );
554
- var MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
555
- !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : ""
556
- );
557
- var ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
558
- !!(process.env.NODE_ENV !== "production") ? "Array iterate" : ""
559
- );
560
- function track(target, type, key) {
561
- if (shouldTrack && activeSub) {
562
- let depsMap = targetMap.get(target);
563
- if (!depsMap) {
564
- targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
565
- }
566
- let dep = depsMap.get(key);
567
- if (!dep) {
568
- depsMap.set(key, dep = new Dep());
569
- dep.map = depsMap;
570
- dep.key = key;
571
- }
572
- if (!!(process.env.NODE_ENV !== "production")) {
573
- dep.track({
574
- target,
575
- type,
576
- key
577
- });
578
- } else {
579
- dep.track();
580
- }
581
- }
582
- }
583
- function trigger(target, type, key, newValue, oldValue, oldTarget) {
584
- const depsMap = targetMap.get(target);
585
- if (!depsMap) {
586
- globalVersion++;
587
- return;
588
- }
589
- const run = (dep) => {
590
- if (dep) {
591
- if (!!(process.env.NODE_ENV !== "production")) {
592
- dep.trigger({
593
- target,
594
- type,
595
- key,
596
- newValue,
597
- oldValue,
598
- oldTarget
599
- });
600
- } else {
601
- dep.trigger();
602
- }
603
- }
604
- };
605
- startBatch();
606
- if (type === "clear") {
607
- depsMap.forEach(run);
608
- } else {
609
- const targetIsArray = isArray(target);
610
- const isArrayIndex = targetIsArray && isIntegerKey(key);
611
- if (targetIsArray && key === "length") {
612
- const newLength = Number(newValue);
613
- depsMap.forEach((dep, key2) => {
614
- if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
615
- run(dep);
616
- }
617
- });
618
- } else {
619
- if (key !== void 0 || depsMap.has(void 0)) {
620
- run(depsMap.get(key));
621
- }
622
- if (isArrayIndex) {
623
- run(depsMap.get(ARRAY_ITERATE_KEY));
624
- }
625
- switch (type) {
626
- case "add":
627
- if (!targetIsArray) {
628
- run(depsMap.get(ITERATE_KEY));
629
- if (isMap(target)) {
630
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
631
- }
632
- } else if (isArrayIndex) {
633
- run(depsMap.get("length"));
634
- }
635
- break;
636
- case "delete":
637
- if (!targetIsArray) {
638
- run(depsMap.get(ITERATE_KEY));
639
- if (isMap(target)) {
640
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
641
- }
642
- }
643
- break;
644
- case "set":
645
- if (isMap(target)) {
646
- run(depsMap.get(ITERATE_KEY));
647
- }
648
- break;
649
- }
650
- }
651
- }
652
- endBatch();
653
- }
654
- function reactiveReadArray(array) {
655
- const raw = /* @__PURE__ */ toRaw(array);
656
- if (raw === array) return raw;
657
- track(raw, "iterate", ARRAY_ITERATE_KEY);
658
- if (/* @__PURE__ */ isShallow(array)) return raw;
659
- if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
660
- return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
661
- }
662
- function shallowReadArray(arr) {
663
- track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
664
- return arr;
665
- }
666
- function toWrapped(target, item) {
667
- if (/* @__PURE__ */ isReadonly(target)) {
668
- return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
669
- }
670
- return toReactive(item);
671
- }
672
- var arrayInstrumentations = {
673
- __proto__: null,
674
- [Symbol.iterator]() {
675
- return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
676
- },
677
- concat(...args) {
678
- return reactiveReadArray(this).concat(
679
- ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
680
- );
681
- },
682
- entries() {
683
- return iterator(this, "entries", (value) => {
684
- value[1] = toWrapped(this, value[1]);
685
- return value;
686
- });
687
- },
688
- every(fn, thisArg) {
689
- return apply(this, "every", fn, thisArg, void 0, arguments);
690
- },
691
- filter(fn, thisArg) {
692
- return apply(
693
- this,
694
- "filter",
695
- fn,
696
- thisArg,
697
- (v) => v.map((item) => toWrapped(this, item)),
698
- arguments
699
- );
700
- },
701
- find(fn, thisArg) {
702
- return apply(
703
- this,
704
- "find",
705
- fn,
706
- thisArg,
707
- (item) => toWrapped(this, item),
708
- arguments
709
- );
710
- },
711
- findIndex(fn, thisArg) {
712
- return apply(this, "findIndex", fn, thisArg, void 0, arguments);
713
- },
714
- findLast(fn, thisArg) {
715
- return apply(
716
- this,
717
- "findLast",
718
- fn,
719
- thisArg,
720
- (item) => toWrapped(this, item),
721
- arguments
722
- );
723
- },
724
- findLastIndex(fn, thisArg) {
725
- return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
726
- },
727
- // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
728
- forEach(fn, thisArg) {
729
- return apply(this, "forEach", fn, thisArg, void 0, arguments);
730
- },
731
- includes(...args) {
732
- return searchProxy(this, "includes", args);
733
- },
734
- indexOf(...args) {
735
- return searchProxy(this, "indexOf", args);
736
- },
737
- join(separator) {
738
- return reactiveReadArray(this).join(separator);
739
- },
740
- // keys() iterator only reads `length`, no optimization required
741
- lastIndexOf(...args) {
742
- return searchProxy(this, "lastIndexOf", args);
743
- },
744
- map(fn, thisArg) {
745
- return apply(this, "map", fn, thisArg, void 0, arguments);
746
- },
747
- pop() {
748
- return noTracking(this, "pop");
749
- },
750
- push(...args) {
751
- return noTracking(this, "push", args);
752
- },
753
- reduce(fn, ...args) {
754
- return reduce(this, "reduce", fn, args);
755
- },
756
- reduceRight(fn, ...args) {
757
- return reduce(this, "reduceRight", fn, args);
758
- },
759
- shift() {
760
- return noTracking(this, "shift");
761
- },
762
- // slice could use ARRAY_ITERATE but also seems to beg for range tracking
763
- some(fn, thisArg) {
764
- return apply(this, "some", fn, thisArg, void 0, arguments);
765
- },
766
- splice(...args) {
767
- return noTracking(this, "splice", args);
768
- },
769
- toReversed() {
770
- return reactiveReadArray(this).toReversed();
771
- },
772
- toSorted(comparer) {
773
- return reactiveReadArray(this).toSorted(comparer);
774
- },
775
- toSpliced(...args) {
776
- return reactiveReadArray(this).toSpliced(...args);
777
- },
778
- unshift(...args) {
779
- return noTracking(this, "unshift", args);
780
- },
781
- values() {
782
- return iterator(this, "values", (item) => toWrapped(this, item));
783
- }
784
- };
785
- function iterator(self2, method, wrapValue) {
786
- const arr = shallowReadArray(self2);
787
- const methodFn = arr[method];
788
- const iter = methodFn.call(arr);
789
- if (arr !== self2 && !/* @__PURE__ */ isShallow(self2)) {
790
- if (iter[Symbol.toStringTag] === "Array Iterator") {
791
- const wrapped = Object.create(Object.getPrototypeOf(iter));
792
- wrapped.next = () => wrapResult(iter.next(), wrapValue);
793
- if (methodFn !== arrayProto[method]) {
794
- Object.defineProperties(wrapped, {
795
- return: {
796
- get() {
797
- const fn = iter.return;
798
- return typeof fn === "function" ? fn.bind(iter) : fn;
799
- }
800
- },
801
- throw: {
802
- get() {
803
- const fn = iter.throw;
804
- return typeof fn === "function" ? fn.bind(iter) : fn;
805
- }
806
- }
807
- });
808
- }
809
- return wrapped;
810
- }
811
- iter._next = iter.next;
812
- iter.next = () => wrapResult(iter._next(), wrapValue);
813
- }
814
- return iter;
815
- }
816
- function wrapResult(result, wrapValue) {
817
- if (!result.done) {
818
- result.value = wrapValue(result.value);
819
- }
820
- return result;
821
- }
822
- var arrayProto = Array.prototype;
823
- function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
824
- const arr = shallowReadArray(self2);
825
- const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
826
- const methodFn = arr[method];
827
- if (methodFn !== arrayProto[method]) {
828
- const result2 = methodFn.apply(self2, args);
829
- return needsWrap ? toReactive(result2) : result2;
830
- }
831
- let wrappedFn = fn;
832
- if (arr !== self2) {
833
- if (needsWrap) {
834
- wrappedFn = function(item, index) {
835
- return fn.call(this, toWrapped(self2, item), index, self2);
836
- };
837
- } else if (fn.length > 2) {
838
- wrappedFn = function(item, index) {
839
- return fn.call(this, item, index, self2);
840
- };
841
- }
842
- }
843
- const result = methodFn.call(arr, wrappedFn, thisArg);
844
- return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
845
- }
846
- function reduce(self2, method, fn, args) {
847
- const arr = shallowReadArray(self2);
848
- const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
849
- let wrappedFn = fn;
850
- let wrapInitialAccumulator = false;
851
- if (arr !== self2) {
852
- if (needsWrap) {
853
- wrapInitialAccumulator = args.length === 0;
854
- wrappedFn = function(acc, item, index) {
855
- if (wrapInitialAccumulator) {
856
- wrapInitialAccumulator = false;
857
- acc = toWrapped(self2, acc);
858
- }
859
- return fn.call(this, acc, toWrapped(self2, item), index, self2);
860
- };
861
- } else if (fn.length > 3) {
862
- wrappedFn = function(acc, item, index) {
863
- return fn.call(this, acc, item, index, self2);
864
- };
865
- }
866
- }
867
- const result = arr[method](wrappedFn, ...args);
868
- return wrapInitialAccumulator ? toWrapped(self2, result) : result;
869
- }
870
- function searchProxy(self2, method, args) {
871
- const arr = /* @__PURE__ */ toRaw(self2);
872
- track(arr, "iterate", ARRAY_ITERATE_KEY);
873
- const res = arr[method](...args);
874
- if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
875
- args[0] = /* @__PURE__ */ toRaw(args[0]);
876
- return arr[method](...args);
877
- }
878
- return res;
879
- }
880
- function noTracking(self2, method, args = []) {
881
- pauseTracking();
882
- startBatch();
883
- const res = (/* @__PURE__ */ toRaw(self2))[method].apply(self2, args);
884
- endBatch();
885
- resetTracking();
886
- return res;
887
- }
888
- var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
889
- var builtInSymbols = new Set(
890
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
891
- );
892
- function hasOwnProperty2(key) {
893
- if (!isSymbol(key)) key = String(key);
894
- const obj = /* @__PURE__ */ toRaw(this);
895
- track(obj, "has", key);
896
- return obj.hasOwnProperty(key);
897
- }
898
- var BaseReactiveHandler = class {
899
- constructor(_isReadonly = false, _isShallow = false) {
900
- this._isReadonly = _isReadonly;
901
- this._isShallow = _isShallow;
902
- }
903
- get(target, key, receiver) {
904
- if (key === "__v_skip") return target["__v_skip"];
905
- const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
906
- if (key === "__v_isReactive") {
907
- return !isReadonly2;
908
- } else if (key === "__v_isReadonly") {
909
- return isReadonly2;
910
- } else if (key === "__v_isShallow") {
911
- return isShallow2;
912
- } else if (key === "__v_raw") {
913
- if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
914
- // this means the receiver is a user proxy of the reactive proxy
915
- Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
916
- return target;
917
- }
918
- return;
919
- }
920
- const targetIsArray = isArray(target);
921
- if (!isReadonly2) {
922
- let fn;
923
- if (targetIsArray && (fn = arrayInstrumentations[key])) {
924
- return fn;
925
- }
926
- if (key === "hasOwnProperty") {
927
- return hasOwnProperty2;
928
- }
929
- }
930
- const res = Reflect.get(
931
- target,
932
- key,
933
- // if this is a proxy wrapping a ref, return methods using the raw ref
934
- // as receiver so that we don't have to call `toRaw` on the ref in all
935
- // its class methods
936
- /* @__PURE__ */ isRef(target) ? target : receiver
937
- );
938
- if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
939
- return res;
940
- }
941
- if (!isReadonly2) {
942
- track(target, "get", key);
943
- }
944
- if (isShallow2) {
945
- return res;
946
- }
947
- if (/* @__PURE__ */ isRef(res)) {
948
- const value = targetIsArray && isIntegerKey(key) ? res : res.value;
949
- return isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;
950
- }
951
- if (isObject(res)) {
952
- return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
953
- }
954
- return res;
955
- }
956
- };
957
- var MutableReactiveHandler = class extends BaseReactiveHandler {
958
- constructor(isShallow2 = false) {
959
- super(false, isShallow2);
960
- }
961
- set(target, key, value, receiver) {
962
- let oldValue = target[key];
963
- const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
964
- if (!this._isShallow) {
965
- const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
966
- if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
967
- oldValue = /* @__PURE__ */ toRaw(oldValue);
968
- value = /* @__PURE__ */ toRaw(value);
969
- }
970
- if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
971
- if (isOldValueReadonly) {
972
- if (!!(process.env.NODE_ENV !== "production")) {
973
- warn(
974
- `Set operation on key "${String(key)}" failed: target is readonly.`,
975
- target[key]
976
- );
977
- }
978
- return true;
979
- } else {
980
- oldValue.value = value;
981
- return true;
982
- }
983
- }
984
- }
985
- const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
986
- const result = Reflect.set(
987
- target,
988
- key,
989
- value,
990
- /* @__PURE__ */ isRef(target) ? target : receiver
991
- );
992
- if (target === /* @__PURE__ */ toRaw(receiver) && result) {
993
- if (!hadKey) {
994
- trigger(target, "add", key, value);
995
- } else if (hasChanged(value, oldValue)) {
996
- trigger(target, "set", key, value, oldValue);
997
- }
998
- }
999
- return result;
1000
- }
1001
- deleteProperty(target, key) {
1002
- const hadKey = hasOwn(target, key);
1003
- const oldValue = target[key];
1004
- const result = Reflect.deleteProperty(target, key);
1005
- if (result && hadKey) {
1006
- trigger(target, "delete", key, void 0, oldValue);
1007
- }
1008
- return result;
1009
- }
1010
- has(target, key) {
1011
- const result = Reflect.has(target, key);
1012
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
1013
- track(target, "has", key);
1014
- }
1015
- return result;
1016
- }
1017
- ownKeys(target) {
1018
- track(
1019
- target,
1020
- "iterate",
1021
- isArray(target) ? "length" : ITERATE_KEY
1022
- );
1023
- return Reflect.ownKeys(target);
1024
- }
1025
- };
1026
- var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
1027
- constructor(isShallow2 = false) {
1028
- super(true, isShallow2);
1029
- }
1030
- set(target, key) {
1031
- if (!!(process.env.NODE_ENV !== "production")) {
1032
- warn(
1033
- `Set operation on key "${String(key)}" failed: target is readonly.`,
1034
- target
1035
- );
1036
- }
1037
- return true;
1038
- }
1039
- deleteProperty(target, key) {
1040
- if (!!(process.env.NODE_ENV !== "production")) {
1041
- warn(
1042
- `Delete operation on key "${String(key)}" failed: target is readonly.`,
1043
- target
1044
- );
1045
- }
1046
- return true;
1047
- }
1048
- };
1049
- var mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
1050
- var readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
1051
- var shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
1052
- var toShallow = (value) => value;
1053
- var getProto = (v) => Reflect.getPrototypeOf(v);
1054
- function createIterableMethod(method, isReadonly2, isShallow2) {
1055
- return function(...args) {
1056
- const target = this["__v_raw"];
1057
- const rawTarget = /* @__PURE__ */ toRaw(target);
1058
- const targetIsMap = isMap(rawTarget);
1059
- const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
1060
- const isKeyOnly = method === "keys" && targetIsMap;
1061
- const innerIterator = target[method](...args);
1062
- const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1063
- !isReadonly2 && track(
1064
- rawTarget,
1065
- "iterate",
1066
- isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
1067
- );
1068
- return extend(
1069
- // inheriting all iterator properties
1070
- Object.create(innerIterator),
1071
- {
1072
- // iterator protocol
1073
- next() {
1074
- const { value, done } = innerIterator.next();
1075
- return done ? { value, done } : {
1076
- value: isPair ? [wrap2(value[0]), wrap2(value[1])] : wrap2(value),
1077
- done
1078
- };
1079
- }
1080
- }
1081
- );
1082
- };
1083
- }
1084
- function createReadonlyMethod(type) {
1085
- return function(...args) {
1086
- if (!!(process.env.NODE_ENV !== "production")) {
1087
- const key = args[0] ? `on key "${args[0]}" ` : ``;
1088
- warn(
1089
- `${capitalize(type)} operation ${key}failed: target is readonly.`,
1090
- /* @__PURE__ */ toRaw(this)
1091
- );
1092
- }
1093
- return type === "delete" ? false : type === "clear" ? void 0 : this;
1094
- };
1095
- }
1096
- function createInstrumentations(readonly2, shallow) {
1097
- const instrumentations = {
1098
- get(key) {
1099
- const target = this["__v_raw"];
1100
- const rawTarget = /* @__PURE__ */ toRaw(target);
1101
- const rawKey = /* @__PURE__ */ toRaw(key);
1102
- if (!readonly2) {
1103
- if (hasChanged(key, rawKey)) {
1104
- track(rawTarget, "get", key);
1105
- }
1106
- track(rawTarget, "get", rawKey);
1107
- }
1108
- const { has } = getProto(rawTarget);
1109
- const wrap2 = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
1110
- if (has.call(rawTarget, key)) {
1111
- return wrap2(target.get(key));
1112
- } else if (has.call(rawTarget, rawKey)) {
1113
- return wrap2(target.get(rawKey));
1114
- } else if (target !== rawTarget) {
1115
- target.get(key);
1116
- }
1117
- },
1118
- get size() {
1119
- const target = this["__v_raw"];
1120
- !readonly2 && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
1121
- return target.size;
1122
- },
1123
- has(key) {
1124
- const target = this["__v_raw"];
1125
- const rawTarget = /* @__PURE__ */ toRaw(target);
1126
- const rawKey = /* @__PURE__ */ toRaw(key);
1127
- if (!readonly2) {
1128
- if (hasChanged(key, rawKey)) {
1129
- track(rawTarget, "has", key);
1130
- }
1131
- track(rawTarget, "has", rawKey);
1132
- }
1133
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1134
- },
1135
- forEach(callback, thisArg) {
1136
- const observed = this;
1137
- const target = observed["__v_raw"];
1138
- const rawTarget = /* @__PURE__ */ toRaw(target);
1139
- const wrap2 = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
1140
- !readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
1141
- return target.forEach((value, key) => {
1142
- return callback.call(thisArg, wrap2(value), wrap2(key), observed);
1143
- });
1144
- }
1145
- };
1146
- extend(
1147
- instrumentations,
1148
- readonly2 ? {
1149
- add: createReadonlyMethod("add"),
1150
- set: createReadonlyMethod("set"),
1151
- delete: createReadonlyMethod("delete"),
1152
- clear: createReadonlyMethod("clear")
1153
- } : {
1154
- add(value) {
1155
- const target = /* @__PURE__ */ toRaw(this);
1156
- const proto = getProto(target);
1157
- const rawValue = /* @__PURE__ */ toRaw(value);
1158
- const valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;
1159
- const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
1160
- if (!hadKey) {
1161
- target.add(valueToAdd);
1162
- trigger(target, "add", valueToAdd, valueToAdd);
1163
- }
1164
- return this;
1165
- },
1166
- set(key, value) {
1167
- if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
1168
- value = /* @__PURE__ */ toRaw(value);
1169
- }
1170
- const target = /* @__PURE__ */ toRaw(this);
1171
- const { has, get } = getProto(target);
1172
- let hadKey = has.call(target, key);
1173
- if (!hadKey) {
1174
- key = /* @__PURE__ */ toRaw(key);
1175
- hadKey = has.call(target, key);
1176
- } else if (!!(process.env.NODE_ENV !== "production")) {
1177
- checkIdentityKeys(target, has, key);
1178
- }
1179
- const oldValue = get.call(target, key);
1180
- target.set(key, value);
1181
- if (!hadKey) {
1182
- trigger(target, "add", key, value);
1183
- } else if (hasChanged(value, oldValue)) {
1184
- trigger(target, "set", key, value, oldValue);
1185
- }
1186
- return this;
1187
- },
1188
- delete(key) {
1189
- const target = /* @__PURE__ */ toRaw(this);
1190
- const { has, get } = getProto(target);
1191
- let hadKey = has.call(target, key);
1192
- if (!hadKey) {
1193
- key = /* @__PURE__ */ toRaw(key);
1194
- hadKey = has.call(target, key);
1195
- } else if (!!(process.env.NODE_ENV !== "production")) {
1196
- checkIdentityKeys(target, has, key);
1197
- }
1198
- const oldValue = get ? get.call(target, key) : void 0;
1199
- const result = target.delete(key);
1200
- if (hadKey) {
1201
- trigger(target, "delete", key, void 0, oldValue);
1202
- }
1203
- return result;
1204
- },
1205
- clear() {
1206
- const target = /* @__PURE__ */ toRaw(this);
1207
- const hadItems = target.size !== 0;
1208
- const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0;
1209
- const result = target.clear();
1210
- if (hadItems) {
1211
- trigger(
1212
- target,
1213
- "clear",
1214
- void 0,
1215
- void 0,
1216
- oldTarget
1217
- );
1218
- }
1219
- return result;
1220
- }
1221
- }
1222
- );
1223
- const iteratorMethods = [
1224
- "keys",
1225
- "values",
1226
- "entries",
1227
- Symbol.iterator
1228
- ];
1229
- iteratorMethods.forEach((method) => {
1230
- instrumentations[method] = createIterableMethod(method, readonly2, shallow);
1231
- });
1232
- return instrumentations;
1233
- }
1234
- function createInstrumentationGetter(isReadonly2, shallow) {
1235
- const instrumentations = createInstrumentations(isReadonly2, shallow);
1236
- return (target, key, receiver) => {
1237
- if (key === "__v_isReactive") {
1238
- return !isReadonly2;
1239
- } else if (key === "__v_isReadonly") {
1240
- return isReadonly2;
1241
- } else if (key === "__v_isShallow") {
1242
- return shallow;
1243
- } else if (key === "__v_raw") {
1244
- return target;
1245
- }
1246
- return Reflect.get(
1247
- hasOwn(instrumentations, key) && key in target ? instrumentations : target,
1248
- key,
1249
- receiver
1250
- );
1251
- };
1252
- }
1253
- var mutableCollectionHandlers = {
1254
- get: /* @__PURE__ */ createInstrumentationGetter(false, false)
1255
- };
1256
- var readonlyCollectionHandlers = {
1257
- get: /* @__PURE__ */ createInstrumentationGetter(true, false)
1258
- };
1259
- var shallowReadonlyCollectionHandlers = {
1260
- get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1261
- };
1262
- function checkIdentityKeys(target, has, key) {
1263
- const rawKey = /* @__PURE__ */ toRaw(key);
1264
- if (rawKey !== key && has.call(target, rawKey)) {
1265
- const type = toRawType(target);
1266
- warn(
1267
- `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
1268
- );
1269
- }
1270
- }
1271
- var reactiveMap = /* @__PURE__ */ new WeakMap();
1272
- var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
1273
- var readonlyMap = /* @__PURE__ */ new WeakMap();
1274
- var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
1275
- function targetTypeMap(rawType) {
1276
- switch (rawType) {
1277
- case "Object":
1278
- case "Array":
1279
- return 1;
1280
- case "Map":
1281
- case "Set":
1282
- case "WeakMap":
1283
- case "WeakSet":
1284
- return 2;
1285
- default:
1286
- return 0;
1287
- }
1288
- }
1289
- // @__NO_SIDE_EFFECTS__
1290
- function reactive(target) {
1291
- if (/* @__PURE__ */ isReadonly(target)) {
1292
- return target;
1293
- }
1294
- return createReactiveObject(
1295
- target,
1296
- false,
1297
- mutableHandlers,
1298
- mutableCollectionHandlers,
1299
- reactiveMap
1300
- );
1301
- }
1302
- // @__NO_SIDE_EFFECTS__
1303
- function readonly(target) {
1304
- return createReactiveObject(
1305
- target,
1306
- true,
1307
- readonlyHandlers,
1308
- readonlyCollectionHandlers,
1309
- readonlyMap
1310
- );
1311
- }
1312
- // @__NO_SIDE_EFFECTS__
1313
- function shallowReadonly(target) {
1314
- return createReactiveObject(
1315
- target,
1316
- true,
1317
- shallowReadonlyHandlers,
1318
- shallowReadonlyCollectionHandlers,
1319
- shallowReadonlyMap
1320
- );
1321
- }
1322
- function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
1323
- if (!isObject(target)) {
1324
- if (!!(process.env.NODE_ENV !== "production")) {
1325
- warn(
1326
- `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
1327
- target
1328
- )}`
1329
- );
1330
- }
1331
- return target;
1332
- }
1333
- if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1334
- return target;
1335
- }
1336
- if (target["__v_skip"] || !Object.isExtensible(target)) {
1337
- return target;
1338
- }
1339
- const existingProxy = proxyMap.get(target);
1340
- if (existingProxy) {
1341
- return existingProxy;
1342
- }
1343
- const targetType = targetTypeMap(toRawType(target));
1344
- if (targetType === 0) {
1345
- return target;
1346
- }
1347
- const proxy = new Proxy(
1348
- target,
1349
- targetType === 2 ? collectionHandlers : baseHandlers
1350
- );
1351
- proxyMap.set(target, proxy);
1352
- return proxy;
1353
- }
1354
- // @__NO_SIDE_EFFECTS__
1355
- function isReactive(value) {
1356
- if (/* @__PURE__ */ isReadonly(value)) {
1357
- return /* @__PURE__ */ isReactive(value["__v_raw"]);
1358
- }
1359
- return !!(value && value["__v_isReactive"]);
1360
- }
1361
- // @__NO_SIDE_EFFECTS__
1362
- function isReadonly(value) {
1363
- return !!(value && value["__v_isReadonly"]);
1364
- }
1365
- // @__NO_SIDE_EFFECTS__
1366
- function isShallow(value) {
1367
- return !!(value && value["__v_isShallow"]);
1368
- }
1369
- // @__NO_SIDE_EFFECTS__
1370
- function isProxy(value) {
1371
- return value ? !!value["__v_raw"] : false;
1372
- }
1373
- // @__NO_SIDE_EFFECTS__
1374
- function toRaw(observed) {
1375
- const raw = observed && observed["__v_raw"];
1376
- return raw ? /* @__PURE__ */ toRaw(raw) : observed;
1377
- }
1378
- function markRaw(value) {
1379
- if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
1380
- def(value, "__v_skip", true);
1381
- }
1382
- return value;
1383
- }
1384
- var toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
1385
- var toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1386
- // @__NO_SIDE_EFFECTS__
1387
- function isRef(r) {
1388
- return r ? r["__v_isRef"] === true : false;
1389
- }
1390
- function unref(ref2) {
1391
- return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
1392
- }
1393
- var shallowUnwrapHandlers = {
1394
- get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
1395
- set: (target, key, value, receiver) => {
1396
- const oldValue = target[key];
1397
- if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1398
- oldValue.value = value;
1399
- return true;
1400
- } else {
1401
- return Reflect.set(target, key, value, receiver);
1402
- }
1403
- }
1404
- };
1405
- function proxyRefs(objectWithRefs) {
1406
- return /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
1407
- }
1408
- var INITIAL_WATCHER_VALUE = {};
1409
- var cleanupMap = /* @__PURE__ */ new WeakMap();
1410
- var activeWatcher = void 0;
1411
- function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
1412
- if (owner) {
1413
- let cleanups = cleanupMap.get(owner);
1414
- if (!cleanups) cleanupMap.set(owner, cleanups = []);
1415
- cleanups.push(cleanupFn);
1416
- } else if (!!(process.env.NODE_ENV !== "production") && !failSilently) {
1417
- warn(
1418
- `onWatcherCleanup() was called when there was no active watcher to associate with.`
1419
- );
1420
- }
1421
- }
1422
- function watch(source, cb, options = EMPTY_OBJ) {
1423
- const { immediate, deep, once, scheduler, augmentJob, call } = options;
1424
- const warnInvalidSource = (s) => {
1425
- (options.onWarn || warn)(
1426
- `Invalid watch source: `,
1427
- s,
1428
- `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
1429
- );
1430
- };
1431
- const reactiveGetter = (source2) => {
1432
- if (deep) return source2;
1433
- if (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0)
1434
- return traverse(source2, 1);
1435
- return traverse(source2);
1436
- };
1437
- let effect;
1438
- let getter;
1439
- let cleanup;
1440
- let boundCleanup;
1441
- let forceTrigger = false;
1442
- let isMultiSource = false;
1443
- if (/* @__PURE__ */ isRef(source)) {
1444
- getter = () => source.value;
1445
- forceTrigger = /* @__PURE__ */ isShallow(source);
1446
- } else if (/* @__PURE__ */ isReactive(source)) {
1447
- getter = () => reactiveGetter(source);
1448
- forceTrigger = true;
1449
- } else if (isArray(source)) {
1450
- isMultiSource = true;
1451
- forceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));
1452
- getter = () => source.map((s) => {
1453
- if (/* @__PURE__ */ isRef(s)) {
1454
- return s.value;
1455
- } else if (/* @__PURE__ */ isReactive(s)) {
1456
- return reactiveGetter(s);
1457
- } else if (isFunction(s)) {
1458
- return call ? call(s, 2) : s();
1459
- } else {
1460
- !!(process.env.NODE_ENV !== "production") && warnInvalidSource(s);
1461
- }
1462
- });
1463
- } else if (isFunction(source)) {
1464
- if (cb) {
1465
- getter = call ? () => call(source, 2) : source;
1466
- } else {
1467
- getter = () => {
1468
- if (cleanup) {
1469
- pauseTracking();
1470
- try {
1471
- cleanup();
1472
- } finally {
1473
- resetTracking();
1474
- }
1475
- }
1476
- const currentEffect = activeWatcher;
1477
- activeWatcher = effect;
1478
- try {
1479
- return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
1480
- } finally {
1481
- activeWatcher = currentEffect;
1482
- }
1483
- };
1484
- }
1485
- } else {
1486
- getter = NOOP;
1487
- !!(process.env.NODE_ENV !== "production") && warnInvalidSource(source);
1488
- }
1489
- if (cb && deep) {
1490
- const baseGetter = getter;
1491
- const depth = deep === true ? Infinity : deep;
1492
- getter = () => traverse(baseGetter(), depth);
1493
- }
1494
- const scope = getCurrentScope();
1495
- const watchHandle = () => {
1496
- effect.stop();
1497
- if (scope && scope.active) {
1498
- remove(scope.effects, effect);
1499
- }
1500
- };
1501
- if (once && cb) {
1502
- const _cb = cb;
1503
- cb = (...args) => {
1504
- try {
1505
- return _cb(...args);
1506
- } finally {
1507
- watchHandle();
1508
- }
1509
- };
1510
- }
1511
- let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
1512
- const job = (immediateFirstRun) => {
1513
- if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
1514
- return;
1515
- }
1516
- if (cb) {
1517
- const newValue = effect.run();
1518
- if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
1519
- const currentWatcher = activeWatcher;
1520
- pauseTracking();
1521
- try {
1522
- if (cleanup) {
1523
- cleanup();
1524
- }
1525
- activeWatcher = effect;
1526
- const args = [
1527
- newValue,
1528
- // pass undefined as the old value when it's changed for the first time
1529
- oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
1530
- boundCleanup
1531
- ];
1532
- oldValue = newValue;
1533
- call ? call(cb, 3, args) : (
1534
- // @ts-expect-error
1535
- cb(...args)
1536
- );
1537
- } finally {
1538
- activeWatcher = currentWatcher;
1539
- resetTracking();
1540
- }
1541
- }
1542
- } else {
1543
- effect.run();
1544
- }
1545
- };
1546
- if (augmentJob) {
1547
- augmentJob(job);
1548
- }
1549
- effect = new ReactiveEffect(getter);
1550
- effect.scheduler = scheduler ? () => scheduler(job, false) : job;
1551
- boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);
1552
- cleanup = effect.onStop = () => {
1553
- const cleanups = cleanupMap.get(effect);
1554
- if (cleanups) {
1555
- if (call) {
1556
- call(cleanups, 4);
1557
- } else {
1558
- for (const cleanup2 of cleanups) cleanup2();
1559
- }
1560
- cleanupMap.delete(effect);
1561
- }
1562
- };
1563
- if (!!(process.env.NODE_ENV !== "production")) {
1564
- effect.onTrack = options.onTrack;
1565
- effect.onTrigger = options.onTrigger;
1566
- }
1567
- if (cb) {
1568
- if (immediate) {
1569
- job(true);
1570
- } else {
1571
- oldValue = effect.run();
1572
- }
1573
- } else if (scheduler) {
1574
- scheduler(job.bind(null, true), true);
1575
- } else {
1576
- effect.run();
1577
- }
1578
- watchHandle.pause = effect.pause.bind(effect);
1579
- watchHandle.resume = effect.resume.bind(effect);
1580
- watchHandle.stop = watchHandle;
1581
- return watchHandle;
1582
- }
1583
- function traverse(value, depth = Infinity, seen) {
1584
- if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
1585
- return value;
1586
- }
1587
- seen = seen || /* @__PURE__ */ new Map();
1588
- if ((seen.get(value) || 0) >= depth) {
1589
- return value;
1590
- }
1591
- seen.set(value, depth);
1592
- depth--;
1593
- if (/* @__PURE__ */ isRef(value)) {
1594
- traverse(value.value, depth, seen);
1595
- } else if (isArray(value)) {
1596
- for (let i = 0; i < value.length; i++) {
1597
- traverse(value[i], depth, seen);
1598
- }
1599
- } else if (isSet(value) || isMap(value)) {
1600
- value.forEach((v) => {
1601
- traverse(v, depth, seen);
1602
- });
1603
- } else if (isPlainObject(value)) {
1604
- for (const key in value) {
1605
- traverse(value[key], depth, seen);
1606
- }
1607
- for (const key of Object.getOwnPropertySymbols(value)) {
1608
- if (Object.prototype.propertyIsEnumerable.call(value, key)) {
1609
- traverse(value[key], depth, seen);
1610
- }
1611
- }
1612
- }
1613
- return value;
1614
- }
1615
-
1616
- // node_modules/.pnpm/@vue+runtime-core@3.5.44/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
1617
- var stack = [];
1618
- function pushWarningContext(vnode) {
1619
- stack.push(vnode);
1620
- }
1621
- function popWarningContext() {
1622
- stack.pop();
1623
- }
1624
- var isWarning = false;
1625
- function warn$1(msg, ...args) {
1626
- if (isWarning) return;
1627
- isWarning = true;
1628
- pauseTracking();
1629
- const instance = stack.length ? stack[stack.length - 1].component : null;
1630
- const appWarnHandler = instance && instance.appContext.config.warnHandler;
1631
- const trace = getComponentTrace();
1632
- if (appWarnHandler) {
1633
- callWithErrorHandling(
1634
- appWarnHandler,
1635
- instance,
1636
- 11,
1637
- [
1638
- // eslint-disable-next-line no-restricted-syntax
1639
- msg + args.map((a) => {
1640
- var _a, _b;
1641
- return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
1642
- }).join(""),
1643
- instance && instance.proxy,
1644
- trace.map(
1645
- ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
1646
- ).join("\n"),
1647
- trace
1648
- ]
1649
- );
1650
- } else {
1651
- const warnArgs = [`[Vue warn]: ${msg}`, ...args];
1652
- if (trace.length && // avoid spamming console during tests
1653
- true) {
1654
- warnArgs.push(`
1655
- `, ...formatTrace(trace));
1656
- }
1657
- console.warn(...warnArgs);
1658
- }
1659
- resetTracking();
1660
- isWarning = false;
1661
- }
1662
- function getComponentTrace() {
1663
- let currentVNode = stack[stack.length - 1];
1664
- if (!currentVNode) {
1665
- return [];
1666
- }
1667
- const normalizedStack = [];
1668
- while (currentVNode) {
1669
- const last = normalizedStack[0];
1670
- if (last && last.vnode === currentVNode) {
1671
- last.recurseCount++;
1672
- } else {
1673
- normalizedStack.push({
1674
- vnode: currentVNode,
1675
- recurseCount: 0
1676
- });
1677
- }
1678
- const parentInstance = currentVNode.component && currentVNode.component.parent;
1679
- currentVNode = parentInstance && parentInstance.vnode;
1680
- }
1681
- return normalizedStack;
1682
- }
1683
- function formatTrace(trace) {
1684
- const logs = [];
1685
- trace.forEach((entry, i) => {
1686
- logs.push(...i === 0 ? [] : [`
1687
- `], ...formatTraceEntry(entry));
1688
- });
1689
- return logs;
1690
- }
1691
- function formatTraceEntry({ vnode, recurseCount }) {
1692
- const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
1693
- const isRoot = vnode.component ? vnode.component.parent == null : false;
1694
- const open = ` at <${formatComponentName(
1695
- vnode.component,
1696
- vnode.type,
1697
- isRoot
1698
- )}`;
1699
- const close = `>` + postfix;
1700
- return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
1701
- }
1702
- function formatProps(props) {
1703
- const res = [];
1704
- const keys = Object.keys(props);
1705
- keys.slice(0, 3).forEach((key) => {
1706
- res.push(...formatProp(key, props[key]));
1707
- });
1708
- if (keys.length > 3) {
1709
- res.push(` ...`);
1710
- }
1711
- return res;
1712
- }
1713
- function formatProp(key, value, raw) {
1714
- if (isString(value)) {
1715
- value = JSON.stringify(value);
1716
- return raw ? value : [`${key}=${value}`];
1717
- } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
1718
- return raw ? value : [`${key}=${value}`];
1719
- } else if (isRef(value)) {
1720
- value = formatProp(key, toRaw(value.value), true);
1721
- return raw ? value : [`${key}=Ref<`, value, `>`];
1722
- } else if (isFunction(value)) {
1723
- return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
1724
- } else {
1725
- value = toRaw(value);
1726
- return raw ? value : [`${key}=`, value];
1727
- }
1728
- }
1729
- var ErrorTypeStrings$1 = {
1730
- ["sp"]: "serverPrefetch hook",
1731
- ["bc"]: "beforeCreate hook",
1732
- ["c"]: "created hook",
1733
- ["bm"]: "beforeMount hook",
1734
- ["m"]: "mounted hook",
1735
- ["bu"]: "beforeUpdate hook",
1736
- ["u"]: "updated",
1737
- ["bum"]: "beforeUnmount hook",
1738
- ["um"]: "unmounted hook",
1739
- ["a"]: "activated hook",
1740
- ["da"]: "deactivated hook",
1741
- ["ec"]: "errorCaptured hook",
1742
- ["rtc"]: "renderTracked hook",
1743
- ["rtg"]: "renderTriggered hook",
1744
- [0]: "setup function",
1745
- [1]: "render function",
1746
- [2]: "watcher getter",
1747
- [3]: "watcher callback",
1748
- [4]: "watcher cleanup function",
1749
- [5]: "native event handler",
1750
- [6]: "component event handler",
1751
- [7]: "vnode hook",
1752
- [8]: "directive hook",
1753
- [9]: "transition hook",
1754
- [10]: "app errorHandler",
1755
- [11]: "app warnHandler",
1756
- [12]: "ref function",
1757
- [13]: "async component loader",
1758
- [14]: "scheduler flush",
1759
- [15]: "component update",
1760
- [16]: "app unmount cleanup function"
1761
- };
1762
- function callWithErrorHandling(fn, instance, type, args) {
1763
- try {
1764
- return args ? fn(...args) : fn();
1765
- } catch (err) {
1766
- handleError(err, instance, type);
1767
- }
1768
- }
1769
- function callWithAsyncErrorHandling(fn, instance, type, args) {
1770
- if (isFunction(fn)) {
1771
- const res = callWithErrorHandling(fn, instance, type, args);
1772
- if (res && isPromise(res)) {
1773
- res.catch((err) => {
1774
- handleError(err, instance, type);
1775
- });
1776
- }
1777
- return res;
1778
- }
1779
- if (isArray(fn)) {
1780
- const values = [];
1781
- for (let i = 0; i < fn.length; i++) {
1782
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1783
- }
1784
- return values;
1785
- } else if (!!(process.env.NODE_ENV !== "production")) {
1786
- warn$1(
1787
- `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
1788
- );
1789
- }
1790
- }
1791
- function handleError(err, instance, type, throwInDev = true) {
1792
- const contextVNode = instance ? instance.vnode : null;
1793
- const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
1794
- if (instance) {
1795
- let cur = instance.parent;
1796
- const exposedInstance = instance.proxy;
1797
- const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
1798
- while (cur) {
1799
- const errorCapturedHooks = cur.ec;
1800
- if (errorCapturedHooks) {
1801
- for (let i = 0; i < errorCapturedHooks.length; i++) {
1802
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
1803
- return;
1804
- }
1805
- }
1806
- }
1807
- cur = cur.parent;
1808
- }
1809
- if (errorHandler) {
1810
- pauseTracking();
1811
- callWithErrorHandling(errorHandler, null, 10, [
1812
- err,
1813
- exposedInstance,
1814
- errorInfo
1815
- ]);
1816
- resetTracking();
1817
- return;
1818
- }
1819
- }
1820
- logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
1821
- }
1822
- function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
1823
- if (!!(process.env.NODE_ENV !== "production")) {
1824
- const info = ErrorTypeStrings$1[type];
1825
- if (contextVNode) {
1826
- pushWarningContext(contextVNode);
1827
- }
1828
- warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1829
- if (contextVNode) {
1830
- popWarningContext();
1831
- }
1832
- if (throwInDev) {
1833
- throw err;
1834
- } else {
1835
- console.error(err);
1836
- }
1837
- } else if (throwInProd) {
1838
- throw err;
1839
- } else {
1840
- console.error(err);
1841
- }
1842
- }
1843
- var queue = [];
1844
- var flushIndex = -1;
1845
- var pendingPostFlushCbs = [];
1846
- var activePostFlushCbs = null;
1847
- var postFlushIndex = 0;
1848
- var resolvedPromise = /* @__PURE__ */ Promise.resolve();
1849
- var currentFlushPromise = null;
1850
- var RECURSION_LIMIT = 100;
1851
- function nextTick(fn) {
1852
- const p = currentFlushPromise || resolvedPromise;
1853
- return fn ? p.then(this ? fn.bind(this) : fn) : p;
1854
- }
1855
- function findInsertionIndex(id) {
1856
- let start = flushIndex + 1;
1857
- let end = queue.length;
1858
- while (start < end) {
1859
- const middle = start + end >>> 1;
1860
- const middleJob = queue[middle];
1861
- const middleJobId = getId(middleJob);
1862
- if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
1863
- start = middle + 1;
1864
- } else {
1865
- end = middle;
1866
- }
1867
- }
1868
- return start;
1869
- }
1870
- function queueJob(job) {
1871
- if (!(job.flags & 1)) {
1872
- const jobId = getId(job);
1873
- const lastJob = queue[queue.length - 1];
1874
- if (!lastJob || // fast path when the job id is larger than the tail
1875
- !(job.flags & 2) && jobId >= getId(lastJob)) {
1876
- queue.push(job);
1877
- } else {
1878
- queue.splice(findInsertionIndex(jobId), 0, job);
1879
- }
1880
- job.flags |= 1;
1881
- queueFlush();
1882
- }
1883
- }
1884
- function queueFlush() {
1885
- if (!currentFlushPromise) {
1886
- currentFlushPromise = resolvedPromise.then(flushJobs);
1887
- }
1888
- }
1889
- function queuePostFlushCb(cb) {
1890
- if (!isArray(cb)) {
1891
- if (activePostFlushCbs && cb.id === -1) {
1892
- activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
1893
- } else if (!(cb.flags & 1)) {
1894
- pendingPostFlushCbs.push(cb);
1895
- cb.flags |= 1;
1896
- }
1897
- } else {
1898
- for (let i = 0; i < cb.length; i++) {
1899
- pendingPostFlushCbs.push(cb[i]);
1900
- }
1901
- }
1902
- queueFlush();
1903
- }
1904
- function flushPostFlushCbs(seen, skip, minUid = 0) {
1905
- if (pendingPostFlushCbs.length) {
1906
- let cbs = pendingPostFlushCbs;
1907
- let kept = 0;
1908
- if (skip) {
1909
- cbs = [];
1910
- for (let i = 0; i < pendingPostFlushCbs.length; i++) {
1911
- const cb = pendingPostFlushCbs[i];
1912
- if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
1913
- pendingPostFlushCbs[kept++] = cb;
1914
- } else {
1915
- cbs.push(cb);
1916
- }
1917
- }
1918
- }
1919
- const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
1920
- pendingPostFlushCbs.length = kept;
1921
- if (activePostFlushCbs) {
1922
- for (let i = 0; i < deduped.length; i++) {
1923
- activePostFlushCbs.push(deduped[i]);
1924
- }
1925
- return;
1926
- }
1927
- activePostFlushCbs = deduped;
1928
- if (!!(process.env.NODE_ENV !== "production")) {
1929
- seen = seen || /* @__PURE__ */ new Map();
1930
- }
1931
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
1932
- const cb = activePostFlushCbs[postFlushIndex];
1933
- if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
1934
- continue;
1935
- }
1936
- if (cb.flags & 4) {
1937
- cb.flags &= -2;
1938
- }
1939
- if (!(cb.flags & 8)) cb();
1940
- cb.flags &= -2;
1941
- }
1942
- activePostFlushCbs = null;
1943
- postFlushIndex = 0;
1944
- }
1945
- }
1946
- var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
1947
- function flushJobs(seen) {
1948
- if (!!(process.env.NODE_ENV !== "production")) {
1949
- seen = seen || /* @__PURE__ */ new Map();
1950
- }
1951
- const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
1952
- try {
1953
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
1954
- const job = queue[flushIndex];
1955
- if (job && !(job.flags & 8)) {
1956
- if (!!(process.env.NODE_ENV !== "production") && check(job)) {
1957
- continue;
1958
- }
1959
- if (job.flags & 4) {
1960
- job.flags &= ~1;
1961
- }
1962
- callWithErrorHandling(
1963
- job,
1964
- job.i,
1965
- job.i ? 15 : 14
1966
- );
1967
- if (!(job.flags & 4)) {
1968
- job.flags &= ~1;
1969
- }
1970
- }
1971
- }
1972
- } finally {
1973
- for (; flushIndex < queue.length; flushIndex++) {
1974
- const job = queue[flushIndex];
1975
- if (job) {
1976
- job.flags &= -2;
1977
- }
1978
- }
1979
- flushIndex = -1;
1980
- queue.length = 0;
1981
- flushPostFlushCbs(seen);
1982
- currentFlushPromise = null;
1983
- if (queue.length || pendingPostFlushCbs.length) {
1984
- flushJobs(seen);
1985
- }
1986
- }
1987
- }
1988
- function checkRecursiveUpdates(seen, fn) {
1989
- const count = seen.get(fn) || 0;
1990
- if (count > RECURSION_LIMIT) {
1991
- const instance = fn.i;
1992
- const componentName = instance && getComponentName(instance.type);
1993
- handleError(
1994
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
1995
- null,
1996
- 10
1997
- );
1998
- return true;
1999
- }
2000
- seen.set(fn, count + 1);
2001
- return false;
2002
- }
2003
- var isHmrUpdating = false;
2004
- var hmrDirtyComponents = /* @__PURE__ */ new Map();
2005
- if (!!(process.env.NODE_ENV !== "production")) {
2006
- getGlobalThis().__VUE_HMR_RUNTIME__ = {
2007
- createRecord: tryWrap(createRecord),
2008
- rerender: tryWrap(rerender),
2009
- reload: tryWrap(reload)
2010
- };
2011
- }
2012
- var map = /* @__PURE__ */ new Map();
2013
- function createRecord(id, initialDef) {
2014
- if (map.has(id)) {
2015
- return false;
2016
- }
2017
- map.set(id, {
2018
- initialDef: normalizeClassComponent(initialDef),
2019
- instances: /* @__PURE__ */ new Set()
2020
- });
2021
- return true;
2022
- }
2023
- function normalizeClassComponent(component) {
2024
- return isClassComponent(component) ? component.__vccOpts : component;
2025
- }
2026
- function rerender(id, newRender) {
2027
- const record = map.get(id);
2028
- if (!record) {
2029
- return;
2030
- }
2031
- record.initialDef.render = newRender;
2032
- [...record.instances].forEach((instance) => {
2033
- if (newRender) {
2034
- instance.render = newRender;
2035
- normalizeClassComponent(instance.type).render = newRender;
2036
- }
2037
- instance.renderCache = [];
2038
- isHmrUpdating = true;
2039
- if (!(instance.job.flags & 8)) {
2040
- instance.update();
2041
- }
2042
- isHmrUpdating = false;
2043
- });
2044
- }
2045
- function reload(id, newComp) {
2046
- const record = map.get(id);
2047
- if (!record) return;
2048
- newComp = normalizeClassComponent(newComp);
2049
- updateComponentDef(record.initialDef, newComp);
2050
- const instances = [...record.instances];
2051
- for (let i = 0; i < instances.length; i++) {
2052
- const instance = instances[i];
2053
- const oldComp = normalizeClassComponent(instance.type);
2054
- let dirtyInstances = hmrDirtyComponents.get(oldComp);
2055
- if (!dirtyInstances) {
2056
- if (oldComp !== record.initialDef) {
2057
- updateComponentDef(oldComp, newComp);
2058
- }
2059
- hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2060
- }
2061
- dirtyInstances.add(instance);
2062
- instance.appContext.propsCache.delete(instance.type);
2063
- instance.appContext.emitsCache.delete(instance.type);
2064
- instance.appContext.optionsCache.delete(instance.type);
2065
- if (instance.ceReload) {
2066
- dirtyInstances.add(instance);
2067
- instance.ceReload(newComp.styles);
2068
- dirtyInstances.delete(instance);
2069
- } else if (instance.parent) {
2070
- queueJob(() => {
2071
- if (!(instance.job.flags & 8)) {
2072
- isHmrUpdating = true;
2073
- instance.parent.update();
2074
- isHmrUpdating = false;
2075
- dirtyInstances.delete(instance);
2076
- }
2077
- });
2078
- } else if (instance.appContext.reload) {
2079
- instance.appContext.reload();
2080
- } else if (typeof window !== "undefined") {
2081
- window.location.reload();
2082
- } else {
2083
- console.warn(
2084
- "[HMR] Root or manually mounted instance modified. Full reload required."
2085
- );
2086
- }
2087
- if (instance.root.ce && instance !== instance.root) {
2088
- instance.root.ce._removeChildStyle(oldComp);
2089
- }
2090
- }
2091
- queuePostFlushCb(() => {
2092
- hmrDirtyComponents.clear();
2093
- });
2094
- }
2095
- function updateComponentDef(oldComp, newComp) {
2096
- extend(oldComp, newComp);
2097
- for (const key in oldComp) {
2098
- if (key !== "__file" && !(key in newComp)) {
2099
- delete oldComp[key];
2100
- }
2101
- }
2102
- }
2103
- function tryWrap(fn) {
2104
- return (id, arg) => {
2105
- try {
2106
- return fn(id, arg);
2107
- } catch (e) {
2108
- console.error(e);
2109
- console.warn(
2110
- `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
2111
- );
2112
- }
2113
- };
2114
- }
2115
- var devtools$1;
2116
- var buffer = [];
2117
- var devtoolsNotInstalled = false;
2118
- function setDevtoolsHook$1(hook, target) {
2119
- var _a, _b;
2120
- devtools$1 = hook;
2121
- if (devtools$1) {
2122
- devtools$1.enabled = true;
2123
- buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
2124
- buffer = [];
2125
- } else if (
2126
- // handle late devtools injection - only do this if we are in an actual
2127
- // browser environment to avoid the timer handle stalling test runner exit
2128
- // (#4815)
2129
- typeof window !== "undefined" && // some envs mock window but not fully
2130
- window.HTMLElement && // also exclude jsdom
2131
- // eslint-disable-next-line no-restricted-syntax
2132
- !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
2133
- ) {
2134
- const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
2135
- replay.push((newHook) => {
2136
- setDevtoolsHook$1(newHook, target);
2137
- });
2138
- setTimeout(() => {
2139
- if (!devtools$1) {
2140
- target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
2141
- devtoolsNotInstalled = true;
2142
- buffer = [];
2143
- }
2144
- }, 3e3);
2145
- } else {
2146
- devtoolsNotInstalled = true;
2147
- buffer = [];
2148
- }
2149
- }
2150
- var currentRenderingInstance = null;
2151
- var currentScopeId = null;
2152
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
2153
- const instance = getCurrentInstance();
2154
- if (instance || currentApp) {
2155
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
2156
- if (provides && key in provides) {
2157
- return provides[key];
2158
- } else if (arguments.length > 1) {
2159
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
2160
- } else if (!!(process.env.NODE_ENV !== "production")) {
2161
- warn$1(`injection "${String(key)}" not found.`);
2162
- }
2163
- } else if (!!(process.env.NODE_ENV !== "production")) {
2164
- warn$1(`inject() can only be used inside setup() or functional components.`);
2165
- }
2166
- }
2167
- var ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
2168
- var useSSRContext = () => {
2169
- {
2170
- const ctx = inject(ssrContextKey);
2171
- if (!ctx) {
2172
- !!(process.env.NODE_ENV !== "production") && warn$1(
2173
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
2174
- );
2175
- }
2176
- return ctx;
2177
- }
2178
- };
2179
- function doWatch(source, cb, options = EMPTY_OBJ) {
2180
- const { immediate, deep, flush, once } = options;
2181
- if (!!(process.env.NODE_ENV !== "production") && !cb) {
2182
- if (immediate !== void 0) {
2183
- warn$1(
2184
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
2185
- );
2186
- }
2187
- if (deep !== void 0) {
2188
- warn$1(
2189
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
2190
- );
2191
- }
2192
- if (once !== void 0) {
2193
- warn$1(
2194
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
2195
- );
2196
- }
2197
- }
2198
- const baseWatchOptions = extend({}, options);
2199
- if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
2200
- const runsImmediately = cb && immediate || !cb && flush !== "post";
2201
- let ssrCleanup;
2202
- if (isInSSRComponentSetup) {
2203
- if (flush === "sync") {
2204
- const ctx = useSSRContext();
2205
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
2206
- } else if (!runsImmediately) {
2207
- const watchStopHandle = () => {
2208
- };
2209
- watchStopHandle.stop = NOOP;
2210
- watchStopHandle.resume = NOOP;
2211
- watchStopHandle.pause = NOOP;
2212
- return watchStopHandle;
2213
- }
2214
- }
2215
- const instance = currentInstance;
2216
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
2217
- let isPre = false;
2218
- if (flush === "post") {
2219
- baseWatchOptions.scheduler = (job) => {
2220
- job.i = instance;
2221
- queuePostRenderEffect(job, instance && instance.suspense);
2222
- };
2223
- } else if (flush !== "sync") {
2224
- isPre = true;
2225
- baseWatchOptions.scheduler = (job, isFirstRun) => {
2226
- if (isFirstRun) {
2227
- job();
2228
- } else {
2229
- queueJob(job);
2230
- }
2231
- };
2232
- }
2233
- baseWatchOptions.augmentJob = (job) => {
2234
- if (cb) {
2235
- job.flags |= 4;
2236
- }
2237
- if (isPre) {
2238
- job.flags |= 2;
2239
- if (instance) {
2240
- job.id = instance.uid;
2241
- job.i = instance;
2242
- }
2243
- }
2244
- };
2245
- const watchHandle = watch(source, cb, baseWatchOptions);
2246
- if (isInSSRComponentSetup) {
2247
- if (ssrCleanup) {
2248
- ssrCleanup.push(watchHandle);
2249
- } else if (runsImmediately) {
2250
- watchHandle();
2251
- }
2252
- }
2253
- return watchHandle;
2254
- }
2255
- function instanceWatch(source, value, options) {
2256
- const publicThis = this.proxy;
2257
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
2258
- let cb;
2259
- if (isFunction(value)) {
2260
- cb = value;
2261
- } else {
2262
- cb = value.handler;
2263
- options = value;
2264
- }
2265
- const reset = setCurrentInstance(this);
2266
- const res = doWatch(getter, cb.bind(publicThis), options);
2267
- reset();
2268
- return res;
2269
- }
2270
- function createPathGetter(ctx, path) {
2271
- const segments = path.split(".");
2272
- return () => {
2273
- let cur = ctx;
2274
- for (let i = 0; i < segments.length && cur; i++) {
2275
- cur = cur[segments[i]];
2276
- }
2277
- return cur;
2278
- };
2279
- }
2280
- var isTeleport = (type) => type.__isTeleport;
2281
- function findNonCommentChild(children) {
2282
- let child = children[0];
2283
- if (children.length > 1) {
2284
- let hasFound = false;
2285
- for (const c of children) {
2286
- if (c.type !== Comment) {
2287
- if (!!(process.env.NODE_ENV !== "production") && hasFound) {
2288
- warn$1(
2289
- "<transition> can only be used on a single element or component. Use <transition-group> for lists."
2290
- );
2291
- break;
2292
- }
2293
- child = c;
2294
- hasFound = true;
2295
- if (!!!(process.env.NODE_ENV !== "production")) break;
2296
- }
2297
- }
2298
- }
2299
- return child;
2300
- }
2301
- function getInnerChild$1(vnode) {
2302
- if (!isKeepAlive(vnode)) {
2303
- if (isTeleport(vnode.type) && vnode.children) {
2304
- return findNonCommentChild(vnode.children);
2305
- }
2306
- return vnode;
2307
- }
2308
- if (vnode.component) {
2309
- return vnode.component.subTree;
2310
- }
2311
- const { shapeFlag, children } = vnode;
2312
- if (children) {
2313
- if (shapeFlag & 16) {
2314
- return children[0];
2315
- }
2316
- if (shapeFlag & 32 && isFunction(children.default)) {
2317
- return children.default();
2318
- }
2319
- }
2320
- }
2321
- function setTransitionHooks(vnode, hooks) {
2322
- if (vnode.shapeFlag & 6 && vnode.component) {
2323
- vnode.transition = hooks;
2324
- const subTree = vnode.component.subTree;
2325
- setTransitionHooks(
2326
- isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree,
2327
- hooks
2328
- );
2329
- } else if (vnode.shapeFlag & 128) {
2330
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
2331
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
2332
- } else {
2333
- vnode.transition = hooks;
2334
- if (vnode.type === Fragment && isArray(vnode.children)) {
2335
- const child = filterSingleRoot(vnode.children, false);
2336
- if (child) {
2337
- setTransitionHooks(child, hooks);
2338
- }
2339
- }
2340
- }
2341
- }
2342
- // @__NO_SIDE_EFFECTS__
2343
- function defineComponent(options, extraOptions) {
2344
- return isFunction(options) ? (
2345
- // #8236: extend call and options.name access are considered side-effects
2346
- // by Rollup, so we have to wrap it in a pure-annotated IIFE.
2347
- /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
2348
- ) : options;
2349
- }
2350
- var requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
2351
- var cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
2352
- var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
2353
- function injectHook(type, hook, target = currentInstance, prepend = false) {
2354
- if (target) {
2355
- const hooks = target[type] || (target[type] = []);
2356
- const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
2357
- pauseTracking();
2358
- const reset = setCurrentInstance(target);
2359
- const res = callWithAsyncErrorHandling(hook, target, type, args);
2360
- reset();
2361
- resetTracking();
2362
- return res;
2363
- });
2364
- if (prepend) {
2365
- hooks.unshift(wrappedHook);
2366
- } else {
2367
- hooks.push(wrappedHook);
2368
- }
2369
- return wrappedHook;
2370
- } else if (!!(process.env.NODE_ENV !== "production")) {
2371
- const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
2372
- warn$1(
2373
- `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
2374
- );
2375
- }
2376
- }
2377
- var createHook = (lifecycle) => (hook, target = currentInstance) => {
2378
- if (!isInSSRComponentSetup || lifecycle === "sp") {
2379
- injectHook(lifecycle, (...args) => hook(...args), target);
2380
- }
2381
- };
2382
- var onBeforeMount = createHook("bm");
2383
- var onMounted = createHook("m");
2384
- var onBeforeUpdate = createHook(
2385
- "bu"
2386
- );
2387
- var onUpdated = createHook("u");
2388
- var onBeforeUnmount = createHook(
2389
- "bum"
2390
- );
2391
- var onUnmounted = createHook("um");
2392
- var onServerPrefetch = createHook(
2393
- "sp"
2394
- );
2395
- var onRenderTriggered = createHook("rtg");
2396
- var onRenderTracked = createHook("rtc");
2397
- var NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
2398
- var getPublicInstance = (i) => {
2399
- if (!i) return null;
2400
- if (isStatefulComponent(i)) return getComponentPublicInstance(i);
2401
- return getPublicInstance(i.parent);
2402
- };
2403
- var resolveDevRootEl = (vnode) => {
2404
- let found = false;
2405
- while (true) {
2406
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
2407
- const root = filterSingleRoot(vnode.children);
2408
- if (!root) {
2409
- return;
2410
- }
2411
- vnode = root;
2412
- found = true;
2413
- continue;
2414
- }
2415
- const component = vnode.component;
2416
- if (component && component.subTree) {
2417
- vnode = component.subTree;
2418
- continue;
2419
- }
2420
- const suspense = vnode.suspense;
2421
- if (suspense && suspense.activeBranch) {
2422
- vnode = suspense.activeBranch;
2423
- continue;
2424
- }
2425
- return found ? vnode.el : void 0;
2426
- }
2427
- };
2428
- var getDevRootFragmentEl = (i) => {
2429
- const el = i.subTree && resolveDevRootEl(i.subTree);
2430
- return el === void 0 ? i.vnode.el : el;
2431
- };
2432
- var publicPropertiesMap = (
2433
- // Move PURE marker to new line to workaround compiler discarding it
2434
- // due to type annotation
2435
- /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
2436
- $: (i) => i,
2437
- $el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
2438
- $data: (i) => i.data,
2439
- $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props,
2440
- $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs,
2441
- $slots: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.slots) : i.slots,
2442
- $refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs,
2443
- $parent: (i) => getPublicInstance(i.parent),
2444
- $root: (i) => getPublicInstance(i.root),
2445
- $host: (i) => i.ce,
2446
- $emit: (i) => i.emit,
2447
- $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
2448
- $forceUpdate: (i) => i.f || (i.f = () => {
2449
- queueJob(i.update);
2450
- }),
2451
- $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
2452
- $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
2453
- })
2454
- );
2455
- var isReservedPrefix = (key) => key === "_" || key === "$";
2456
- var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
2457
- var PublicInstanceProxyHandlers = {
2458
- get({ _: instance }, key) {
2459
- if (key === "__v_skip") {
2460
- return true;
2461
- }
2462
- const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
2463
- if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
2464
- return true;
2465
- }
2466
- if (key[0] !== "$") {
2467
- const n = accessCache[key];
2468
- if (n !== void 0) {
2469
- switch (n) {
2470
- case 1:
2471
- return setupState[key];
2472
- case 2:
2473
- return data[key];
2474
- case 4:
2475
- return ctx[key];
2476
- case 3:
2477
- return props[key];
2478
- }
2479
- } else if (hasSetupBinding(setupState, key)) {
2480
- accessCache[key] = 1;
2481
- return setupState[key];
2482
- } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
2483
- accessCache[key] = 2;
2484
- return data[key];
2485
- } else if (hasOwn(props, key)) {
2486
- accessCache[key] = 3;
2487
- return props[key];
2488
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
2489
- accessCache[key] = 4;
2490
- return ctx[key];
2491
- } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
2492
- accessCache[key] = 0;
2493
- }
2494
- }
2495
- const publicGetter = publicPropertiesMap[key];
2496
- let cssModule, globalProperties;
2497
- if (publicGetter) {
2498
- if (key === "$attrs") {
2499
- track(instance.attrs, "get", "");
2500
- !!(process.env.NODE_ENV !== "production") && markAttrsAccessed();
2501
- } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") {
2502
- track(instance, "get", key);
2503
- }
2504
- return publicGetter(instance);
2505
- } else if (
2506
- // css module (injected by vue-loader)
2507
- (cssModule = type.__cssModules) && (cssModule = cssModule[key])
2508
- ) {
2509
- return cssModule;
2510
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
2511
- accessCache[key] = 4;
2512
- return ctx[key];
2513
- } else if (
2514
- // global properties
2515
- globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
2516
- ) {
2517
- {
2518
- return globalProperties[key];
2519
- }
2520
- } else if (!!(process.env.NODE_ENV !== "production") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
2521
- // to infinite warning loop
2522
- key.indexOf("__v") !== 0)) {
2523
- if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
2524
- warn$1(
2525
- `Property ${JSON.stringify(
2526
- key
2527
- )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
2528
- );
2529
- } else if (instance === currentRenderingInstance) {
2530
- warn$1(
2531
- `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
2532
- );
2533
- }
2534
- }
2535
- },
2536
- set({ _: instance }, key, value) {
2537
- const { data, setupState, ctx } = instance;
2538
- if (hasSetupBinding(setupState, key)) {
2539
- setupState[key] = value;
2540
- return true;
2541
- } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
2542
- warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
2543
- return false;
2544
- } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
2545
- data[key] = value;
2546
- return true;
2547
- } else if (hasOwn(instance.props, key)) {
2548
- !!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
2549
- return false;
2550
- }
2551
- if (key[0] === "$" && key.slice(1) in instance) {
2552
- !!(process.env.NODE_ENV !== "production") && warn$1(
2553
- `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
2554
- );
2555
- return false;
2556
- } else {
2557
- if (!!(process.env.NODE_ENV !== "production") && key in instance.appContext.config.globalProperties) {
2558
- Object.defineProperty(ctx, key, {
2559
- enumerable: true,
2560
- configurable: true,
2561
- value
2562
- });
2563
- } else {
2564
- ctx[key] = value;
2565
- }
2566
- }
2567
- return true;
2568
- },
2569
- has({
2570
- _: { data, setupState, accessCache, ctx, appContext, props, type }
2571
- }, key) {
2572
- let cssModules;
2573
- return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || hasOwn(props, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
2574
- },
2575
- defineProperty(target, key, descriptor) {
2576
- if (descriptor.get != null) {
2577
- target._.accessCache[key] = 0;
2578
- } else if (hasOwn(descriptor, "value")) {
2579
- this.set(target, key, descriptor.value, null);
2580
- }
2581
- return Reflect.defineProperty(target, key, descriptor);
2582
- }
2583
- };
2584
- if (!!(process.env.NODE_ENV !== "production") && true) {
2585
- PublicInstanceProxyHandlers.ownKeys = (target) => {
2586
- warn$1(
2587
- `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
2588
- );
2589
- return Reflect.ownKeys(target);
2590
- };
2591
- }
2592
- function normalizePropsOrEmits(props) {
2593
- return isArray(props) ? props.reduce(
2594
- (normalized, p) => (normalized[p] = null, normalized),
2595
- {}
2596
- ) : props;
2597
- }
2598
- var shouldCacheAccess = true;
2599
- function resolveMergedOptions(instance) {
2600
- const base = instance.type;
2601
- const { mixins, extends: extendsOptions } = base;
2602
- const {
2603
- mixins: globalMixins,
2604
- optionsCache: cache,
2605
- config: { optionMergeStrategies }
2606
- } = instance.appContext;
2607
- const cached = cache.get(base);
2608
- let resolved;
2609
- if (cached) {
2610
- resolved = cached;
2611
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
2612
- {
2613
- resolved = base;
2614
- }
2615
- } else {
2616
- resolved = {};
2617
- if (globalMixins.length) {
2618
- globalMixins.forEach(
2619
- (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
2620
- );
2621
- }
2622
- mergeOptions(resolved, base, optionMergeStrategies);
2623
- }
2624
- if (isObject(base)) {
2625
- cache.set(base, resolved);
2626
- }
2627
- return resolved;
2628
- }
2629
- function mergeOptions(to, from, strats, asMixin = false) {
2630
- const { mixins, extends: extendsOptions } = from;
2631
- if (extendsOptions) {
2632
- mergeOptions(to, extendsOptions, strats, true);
2633
- }
2634
- if (mixins) {
2635
- mixins.forEach(
2636
- (m) => mergeOptions(to, m, strats, true)
2637
- );
2638
- }
2639
- for (const key in from) {
2640
- if (asMixin && key === "expose") {
2641
- !!(process.env.NODE_ENV !== "production") && warn$1(
2642
- `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
2643
- );
2644
- } else {
2645
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
2646
- to[key] = strat ? strat(to[key], from[key]) : from[key];
2647
- }
2648
- }
2649
- return to;
2650
- }
2651
- var internalOptionMergeStrats = {
2652
- data: mergeDataFn,
2653
- props: mergeEmitsOrPropsOptions,
2654
- emits: mergeEmitsOrPropsOptions,
2655
- // objects
2656
- methods: mergeObjectOptions,
2657
- computed: mergeObjectOptions,
2658
- // lifecycle
2659
- beforeCreate: mergeAsArray,
2660
- created: mergeAsArray,
2661
- beforeMount: mergeAsArray,
2662
- mounted: mergeAsArray,
2663
- beforeUpdate: mergeAsArray,
2664
- updated: mergeAsArray,
2665
- beforeDestroy: mergeAsArray,
2666
- beforeUnmount: mergeAsArray,
2667
- destroyed: mergeAsArray,
2668
- unmounted: mergeAsArray,
2669
- activated: mergeAsArray,
2670
- deactivated: mergeAsArray,
2671
- errorCaptured: mergeAsArray,
2672
- serverPrefetch: mergeAsArray,
2673
- // assets
2674
- components: mergeObjectOptions,
2675
- directives: mergeObjectOptions,
2676
- // watch
2677
- watch: mergeWatchOptions,
2678
- // provide / inject
2679
- provide: mergeDataFn,
2680
- inject: mergeInject
2681
- };
2682
- function mergeDataFn(to, from) {
2683
- if (!from) {
2684
- return to;
2685
- }
2686
- if (!to) {
2687
- return from;
2688
- }
2689
- return function mergedDataFn() {
2690
- return extend(
2691
- isFunction(to) ? to.call(this, this) : to,
2692
- isFunction(from) ? from.call(this, this) : from
2693
- );
2694
- };
2695
- }
2696
- function mergeInject(to, from) {
2697
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
2698
- }
2699
- function normalizeInject(raw) {
2700
- if (isArray(raw)) {
2701
- const res = {};
2702
- for (let i = 0; i < raw.length; i++) {
2703
- res[raw[i]] = raw[i];
2704
- }
2705
- return res;
2706
- }
2707
- return raw;
2708
- }
2709
- function mergeAsArray(to, from) {
2710
- return to ? [...new Set([].concat(to, from))] : from;
2711
- }
2712
- function mergeObjectOptions(to, from) {
2713
- return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
2714
- }
2715
- function mergeEmitsOrPropsOptions(to, from) {
2716
- if (to) {
2717
- if (isArray(to) && isArray(from)) {
2718
- return [.../* @__PURE__ */ new Set([...to, ...from])];
2719
- }
2720
- return extend(
2721
- /* @__PURE__ */ Object.create(null),
2722
- normalizePropsOrEmits(to),
2723
- normalizePropsOrEmits(from != null ? from : {})
2724
- );
2725
- } else {
2726
- return from;
2727
- }
2728
- }
2729
- function mergeWatchOptions(to, from) {
2730
- if (!to) return from;
2731
- if (!from) return to;
2732
- const merged = extend(/* @__PURE__ */ Object.create(null), to);
2733
- for (const key in from) {
2734
- merged[key] = mergeAsArray(to[key], from[key]);
2735
- }
2736
- return merged;
2737
- }
2738
- function createAppContext() {
2739
- return {
2740
- app: null,
2741
- config: {
2742
- isNativeTag: NO,
2743
- performance: false,
2744
- globalProperties: {},
2745
- optionMergeStrategies: {},
2746
- errorHandler: void 0,
2747
- warnHandler: void 0,
2748
- compilerOptions: {}
2749
- },
2750
- mixins: [],
2751
- components: {},
2752
- directives: {},
2753
- provides: /* @__PURE__ */ Object.create(null),
2754
- optionsCache: /* @__PURE__ */ new WeakMap(),
2755
- propsCache: /* @__PURE__ */ new WeakMap(),
2756
- emitsCache: /* @__PURE__ */ new WeakMap()
2757
- };
2758
- }
2759
- var currentApp = null;
2760
- var accessedAttrs = false;
2761
- function markAttrsAccessed() {
2762
- accessedAttrs = true;
2763
- }
2764
- function filterSingleRoot(children, recurse = true) {
2765
- let singleRoot;
2766
- for (let i = 0; i < children.length; i++) {
2767
- const child = children[i];
2768
- if (isVNode(child)) {
2769
- if (child.type !== Comment || child.children === "v-if") {
2770
- if (singleRoot) {
2771
- return;
2772
- } else {
2773
- singleRoot = child;
2774
- if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
2775
- return filterSingleRoot(singleRoot.children);
2776
- }
2777
- }
2778
- }
2779
- } else {
2780
- return;
2781
- }
2782
- }
2783
- return singleRoot;
2784
- }
2785
- var internalObjectProto = {};
2786
- var isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
2787
- var queuePostRenderEffect = queueEffectWithSuspense;
2788
- var isSuspense = (type) => type.__isSuspense;
2789
- function queueEffectWithSuspense(fn, suspense) {
2790
- if (suspense && suspense.pendingBranch) {
2791
- if (isArray(fn)) {
2792
- suspense.effects.push(...fn);
2793
- } else {
2794
- suspense.effects.push(fn);
2795
- }
2796
- } else {
2797
- queuePostFlushCb(fn);
2798
- }
2799
- }
2800
- var Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
2801
- var Text = /* @__PURE__ */ Symbol.for("v-txt");
2802
- var Comment = /* @__PURE__ */ Symbol.for("v-cmt");
2803
- var currentBlock = null;
2804
- var isBlockTreeEnabled = 1;
2805
- function setBlockTracking(value, inVOnce = false) {
2806
- isBlockTreeEnabled += value;
2807
- if (value < 0 && currentBlock && inVOnce) {
2808
- currentBlock.hasOnce = true;
2809
- }
2810
- }
2811
- function isVNode(value) {
2812
- return value ? value.__v_isVNode === true : false;
2813
- }
2814
- var vnodeArgsTransformer;
2815
- var createVNodeWithArgsTransform = (...args) => {
2816
- return _createVNode(
2817
- ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
2818
- );
2819
- };
2820
- var normalizeKey = ({ key }) => key != null ? key : null;
2821
- var normalizeRef = ({
2822
- ref: ref2,
2823
- ref_key,
2824
- ref_for
2825
- }) => {
2826
- if (typeof ref2 === "number") {
2827
- ref2 = "" + ref2;
2828
- }
2829
- return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
2830
- };
2831
- function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
2832
- const vnode = {
2833
- __v_isVNode: true,
2834
- __v_skip: true,
2835
- type,
2836
- props,
2837
- key: props && normalizeKey(props),
2838
- ref: props && normalizeRef(props),
2839
- scopeId: currentScopeId,
2840
- slotScopeIds: null,
2841
- children,
2842
- component: null,
2843
- suspense: null,
2844
- ssContent: null,
2845
- ssFallback: null,
2846
- dirs: null,
2847
- transition: null,
2848
- el: null,
2849
- anchor: null,
2850
- target: null,
2851
- targetStart: null,
2852
- targetAnchor: null,
2853
- staticCount: 0,
2854
- shapeFlag,
2855
- patchFlag,
2856
- dynamicProps,
2857
- dynamicChildren: null,
2858
- appContext: null,
2859
- ctx: currentRenderingInstance
2860
- };
2861
- if (needFullChildrenNormalization) {
2862
- normalizeChildren(vnode, children);
2863
- if (shapeFlag & 128) {
2864
- type.normalize(vnode);
2865
- }
2866
- } else if (children) {
2867
- vnode.shapeFlag |= isString(children) ? 8 : 16;
2868
- }
2869
- if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
2870
- warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
2871
- }
2872
- if (!!(process.env.NODE_ENV !== "production") && props && vnode.shapeFlag & 1) {
2873
- const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
2874
- if (overwritingProp && hasContentChildren(vnode.children)) {
2875
- warn$1(
2876
- `The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`
2877
- );
2878
- }
2879
- }
2880
- if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
2881
- !isBlockNode && // has current parent block
2882
- currentBlock && // presence of a patch flag indicates this node needs patching on updates.
2883
- // component nodes also should always be patched, because even if the
2884
- // component doesn't need to update, it needs to persist the instance on to
2885
- // the next vnode so that it can be properly unmounted later.
2886
- (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
2887
- // vnode should not be considered dynamic due to handler caching.
2888
- vnode.patchFlag !== 32) {
2889
- currentBlock.push(vnode);
2890
- }
2891
- return vnode;
2892
- }
2893
- function hasContentChildren(children) {
2894
- if (isString(children)) return children !== "";
2895
- if (isArray(children)) return children.length > 0;
2896
- return false;
2897
- }
2898
- var createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
2899
- function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
2900
- if (!type || type === NULL_DYNAMIC_COMPONENT) {
2901
- if (!!(process.env.NODE_ENV !== "production") && !type) {
2902
- warn$1(`Invalid vnode type when creating vnode: ${type}.`);
2903
- }
2904
- type = Comment;
2905
- }
2906
- if (isVNode(type)) {
2907
- const cloned = cloneVNode(
2908
- type,
2909
- props,
2910
- true
2911
- /* mergeRef: true */
2912
- );
2913
- if (children) {
2914
- normalizeChildren(cloned, children);
2915
- }
2916
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
2917
- if (cloned.shapeFlag & 6) {
2918
- currentBlock[currentBlock.indexOf(type)] = cloned;
2919
- } else {
2920
- currentBlock.push(cloned);
2921
- }
2922
- }
2923
- cloned.patchFlag = -2;
2924
- return cloned;
2925
- }
2926
- if (isClassComponent(type)) {
2927
- type = type.__vccOpts;
2928
- }
2929
- if (props) {
2930
- props = guardReactiveProps(props);
2931
- let { class: klass, style } = props;
2932
- if (klass && !isString(klass)) {
2933
- props.class = normalizeClass(klass);
2934
- }
2935
- if (isObject(style)) {
2936
- if (isProxy(style) && !isArray(style)) {
2937
- style = extend({}, style);
2938
- }
2939
- props.style = normalizeStyle(style);
2940
- }
2941
- }
2942
- const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
2943
- if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
2944
- type = toRaw(type);
2945
- warn$1(
2946
- `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
2947
- `
2948
- Component that was made reactive: `,
2949
- type
2950
- );
2951
- }
2952
- return createBaseVNode(
2953
- type,
2954
- props,
2955
- children,
2956
- patchFlag,
2957
- dynamicProps,
2958
- shapeFlag,
2959
- isBlockNode,
2960
- true
2961
- );
2962
- }
2963
- function guardReactiveProps(props) {
2964
- if (!props) return null;
2965
- return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
2966
- }
2967
- function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
2968
- const { props, ref: ref2, patchFlag, children, transition } = vnode;
2969
- const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
2970
- const cloned = {
2971
- __v_isVNode: true,
2972
- __v_skip: true,
2973
- type: vnode.type,
2974
- props: mergedProps,
2975
- key: mergedProps && normalizeKey(mergedProps),
2976
- ref: extraProps && extraProps.ref ? (
2977
- // #2078 in the case of <component :is="vnode" ref="extra"/>
2978
- // if the vnode itself already has a ref, cloneVNode will need to merge
2979
- // the refs so the single vnode can be set on multiple refs
2980
- mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
2981
- ) : ref2,
2982
- scopeId: vnode.scopeId,
2983
- slotScopeIds: vnode.slotScopeIds,
2984
- children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
2985
- target: vnode.target,
2986
- targetStart: vnode.targetStart,
2987
- targetAnchor: vnode.targetAnchor,
2988
- staticCount: vnode.staticCount,
2989
- shapeFlag: vnode.shapeFlag,
2990
- // if the vnode is cloned with extra props, we can no longer assume its
2991
- // existing patch flag to be reliable and need to add the FULL_PROPS flag.
2992
- // note: preserve flag for fragments since they use the flag for children
2993
- // fast paths only.
2994
- patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
2995
- dynamicProps: vnode.dynamicProps,
2996
- dynamicChildren: vnode.dynamicChildren,
2997
- appContext: vnode.appContext,
2998
- dirs: vnode.dirs,
2999
- transition,
3000
- // These should technically only be non-null on mounted VNodes. However,
3001
- // they *should* be copied for kept-alive vnodes. So we just always copy
3002
- // them since them being non-null during a mount doesn't affect the logic as
3003
- // they will simply be overwritten.
3004
- component: vnode.component,
3005
- suspense: vnode.suspense,
3006
- ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
3007
- ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
3008
- placeholder: vnode.placeholder,
3009
- el: vnode.el,
3010
- anchor: vnode.anchor,
3011
- ctx: vnode.ctx,
3012
- ce: vnode.ce,
3013
- cacheIndex: vnode.cacheIndex
3014
- };
3015
- if (transition && cloneTransition) {
3016
- setTransitionHooks(
3017
- cloned,
3018
- transition.clone(cloned)
3019
- );
3020
- }
3021
- return cloned;
3022
- }
3023
- function deepCloneVNode(vnode) {
3024
- const cloned = cloneVNode(vnode);
3025
- if (isArray(vnode.children)) {
3026
- cloned.children = vnode.children.map(deepCloneVNode);
3027
- }
3028
- return cloned;
3029
- }
3030
- function createTextVNode(text = " ", flag = 0) {
3031
- return createVNode(Text, null, text, flag);
3032
- }
3033
- function normalizeChildren(vnode, children) {
3034
- let type = 0;
3035
- const { shapeFlag } = vnode;
3036
- if (children == null) {
3037
- children = null;
3038
- } else if (isArray(children)) {
3039
- type = 16;
3040
- } else if (typeof children === "object") {
3041
- if (shapeFlag & (1 | 64)) {
3042
- const slot = children.default;
3043
- if (slot) {
3044
- slot._c && (slot._d = false);
3045
- normalizeChildren(vnode, slot());
3046
- slot._c && (slot._d = true);
3047
- }
3048
- return;
3049
- } else {
3050
- type = 32;
3051
- const slotFlag = children._;
3052
- if (!slotFlag && !isInternalObject(children)) {
3053
- children._ctx = currentRenderingInstance;
3054
- } else if (slotFlag === 3 && currentRenderingInstance) {
3055
- if (currentRenderingInstance.slots._ === 1) {
3056
- children._ = 1;
3057
- } else {
3058
- children._ = 2;
3059
- vnode.patchFlag |= 1024;
3060
- }
3061
- }
3062
- }
3063
- } else if (isFunction(children)) {
3064
- if (shapeFlag & (1 | 64)) {
3065
- normalizeChildren(vnode, { default: children });
3066
- return;
3067
- }
3068
- children = { default: children, _ctx: currentRenderingInstance };
3069
- type = 32;
3070
- } else {
3071
- children = String(children);
3072
- if (shapeFlag & 64) {
3073
- type = 16;
3074
- children = [createTextVNode(children)];
3075
- } else {
3076
- type = 8;
3077
- }
3078
- }
3079
- vnode.children = children;
3080
- vnode.shapeFlag |= type;
3081
- }
3082
- function mergeProps(...args) {
3083
- const ret = {};
3084
- for (let i = 0; i < args.length; i++) {
3085
- const toMerge = args[i];
3086
- for (const key in toMerge) {
3087
- if (key === "class") {
3088
- if (ret.class !== toMerge.class) {
3089
- ret.class = normalizeClass([ret.class, toMerge.class]);
3090
- }
3091
- } else if (key === "style") {
3092
- ret.style = normalizeStyle([ret.style, toMerge.style]);
3093
- } else if (isOn(key)) {
3094
- const existing = ret[key];
3095
- const incoming = toMerge[key];
3096
- if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
3097
- ret[key] = existing ? [].concat(existing, incoming) : incoming;
3098
- } else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
3099
- // the model listener.
3100
- !isModelListener(key)) {
3101
- ret[key] = incoming;
3102
- }
3103
- } else if (key !== "") {
3104
- ret[key] = toMerge[key];
3105
- }
3106
- }
3107
- }
3108
- return ret;
3109
- }
3110
- var emptyAppContext = createAppContext();
3111
- var currentInstance = null;
3112
- var getCurrentInstance = () => currentInstance || currentRenderingInstance;
3113
- var internalSetCurrentInstance;
3114
- var setInSSRSetupState;
3115
- {
3116
- const g = getGlobalThis();
3117
- const registerGlobalSetter = (key, setter) => {
3118
- let setters;
3119
- if (!(setters = g[key])) setters = g[key] = [];
3120
- setters.push(setter);
3121
- return (v) => {
3122
- if (setters.length > 1) setters.forEach((set) => set(v));
3123
- else setters[0](v);
3124
- };
3125
- };
3126
- internalSetCurrentInstance = registerGlobalSetter(
3127
- `__VUE_INSTANCE_SETTERS__`,
3128
- (v) => currentInstance = v
3129
- );
3130
- setInSSRSetupState = registerGlobalSetter(
3131
- `__VUE_SSR_SETTERS__`,
3132
- (v) => isInSSRComponentSetup = v
3133
- );
3134
- }
3135
- var setCurrentInstance = (instance) => {
3136
- const prev = currentInstance;
3137
- internalSetCurrentInstance(instance);
3138
- instance.scope.on();
3139
- return () => {
3140
- instance.scope.off();
3141
- internalSetCurrentInstance(prev);
3142
- };
3143
- };
3144
- function isStatefulComponent(instance) {
3145
- return instance.vnode.shapeFlag & 4;
3146
- }
3147
- var isInSSRComponentSetup = false;
3148
- var attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
3149
- get(target, key) {
3150
- markAttrsAccessed();
3151
- track(target, "get", "");
3152
- return target[key];
3153
- },
3154
- set() {
3155
- warn$1(`setupContext.attrs is readonly.`);
3156
- return false;
3157
- },
3158
- deleteProperty() {
3159
- warn$1(`setupContext.attrs is readonly.`);
3160
- return false;
3161
- }
3162
- } : {
3163
- get(target, key) {
3164
- track(target, "get", "");
3165
- return target[key];
3166
- }
3167
- };
3168
- function getComponentPublicInstance(instance) {
3169
- if (instance.exposed) {
3170
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
3171
- get(target, key) {
3172
- if (key in target) {
3173
- return target[key];
3174
- } else if (key in publicPropertiesMap) {
3175
- return publicPropertiesMap[key](instance);
3176
- }
3177
- },
3178
- has(target, key) {
3179
- return key in target || key in publicPropertiesMap;
3180
- }
3181
- }));
3182
- } else {
3183
- return instance.proxy;
3184
- }
3185
- }
3186
- var classifyRE = /(?:^|[-_])\w/g;
3187
- var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
3188
- function getComponentName(Component, includeInferred = true) {
3189
- return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
3190
- }
3191
- function formatComponentName(instance, Component, isRoot = false) {
3192
- let name = getComponentName(Component);
3193
- if (!name && Component.__file) {
3194
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
3195
- if (match) {
3196
- name = match[1];
3197
- }
3198
- }
3199
- if (!name && instance) {
3200
- const inferFromRegistry = (registry) => {
3201
- for (const key in registry) {
3202
- if (registry[key] === Component) {
3203
- return key;
3204
- }
3205
- }
3206
- };
3207
- name = inferFromRegistry(instance.components) || instance.parent && inferFromRegistry(
3208
- instance.parent.type.components
3209
- ) || inferFromRegistry(instance.appContext.components);
3210
- }
3211
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
3212
- }
3213
- function isClassComponent(value) {
3214
- return isFunction(value) && "__vccOpts" in value;
3215
- }
3216
- function h(type, propsOrChildren, children) {
3217
- try {
3218
- setBlockTracking(-1);
3219
- const l = arguments.length;
3220
- if (l === 2) {
3221
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
3222
- if (isVNode(propsOrChildren)) {
3223
- return createVNode(type, null, [propsOrChildren]);
3224
- }
3225
- return createVNode(type, propsOrChildren);
3226
- } else {
3227
- return createVNode(type, null, propsOrChildren);
3228
- }
3229
- } else {
3230
- if (l > 3) {
3231
- children = Array.prototype.slice.call(arguments, 2);
3232
- } else if (l === 3 && isVNode(children)) {
3233
- children = [children];
3234
- }
3235
- return createVNode(type, propsOrChildren, children);
3236
- }
3237
- } finally {
3238
- setBlockTracking(1);
3239
- }
3240
- }
3241
- function initCustomFormatter() {
3242
- if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") {
3243
- return;
3244
- }
3245
- const vueStyle = { style: "color:#3ba776" };
3246
- const numberStyle = { style: "color:#1677ff" };
3247
- const stringStyle = { style: "color:#f5222d" };
3248
- const keywordStyle = { style: "color:#eb2f96" };
3249
- const formatter = {
3250
- __vue_custom_formatter: true,
3251
- header(obj) {
3252
- if (!isObject(obj)) {
3253
- return null;
3254
- }
3255
- if (obj.__isVue) {
3256
- return ["div", vueStyle, `VueInstance`];
3257
- } else if (isRef(obj)) {
3258
- pauseTracking();
3259
- const value = obj.value;
3260
- resetTracking();
3261
- return [
3262
- "div",
3263
- {},
3264
- ["span", vueStyle, genRefFlag(obj)],
3265
- "<",
3266
- formatValue(value),
3267
- `>`
3268
- ];
3269
- } else if (isReactive(obj)) {
3270
- return [
3271
- "div",
3272
- {},
3273
- ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
3274
- "<",
3275
- formatValue(obj),
3276
- `>${isReadonly(obj) ? ` (readonly)` : ``}`
3277
- ];
3278
- } else if (isReadonly(obj)) {
3279
- return [
3280
- "div",
3281
- {},
3282
- ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
3283
- "<",
3284
- formatValue(obj),
3285
- ">"
3286
- ];
3287
- }
3288
- return null;
3289
- },
3290
- hasBody(obj) {
3291
- return obj && obj.__isVue;
3292
- },
3293
- body(obj) {
3294
- if (obj && obj.__isVue) {
3295
- return [
3296
- "div",
3297
- {},
3298
- ...formatInstance(obj.$)
3299
- ];
3300
- }
3301
- }
3302
- };
3303
- function formatInstance(instance) {
3304
- const blocks = [];
3305
- if (instance.type.props && instance.props) {
3306
- blocks.push(createInstanceBlock("props", toRaw(instance.props)));
3307
- }
3308
- if (instance.setupState !== EMPTY_OBJ) {
3309
- blocks.push(createInstanceBlock("setup", instance.setupState));
3310
- }
3311
- if (instance.data !== EMPTY_OBJ) {
3312
- blocks.push(createInstanceBlock("data", toRaw(instance.data)));
3313
- }
3314
- const computed2 = extractKeys(instance, "computed");
3315
- if (computed2) {
3316
- blocks.push(createInstanceBlock("computed", computed2));
3317
- }
3318
- const injected = extractKeys(instance, "inject");
3319
- if (injected) {
3320
- blocks.push(createInstanceBlock("injected", injected));
3321
- }
3322
- blocks.push([
3323
- "div",
3324
- {},
3325
- [
3326
- "span",
3327
- {
3328
- style: keywordStyle.style + ";opacity:0.66"
3329
- },
3330
- "$ (internal): "
3331
- ],
3332
- ["object", { object: instance }]
3333
- ]);
3334
- return blocks;
3335
- }
3336
- function createInstanceBlock(type, target) {
3337
- target = extend({}, target);
3338
- if (!Object.keys(target).length) {
3339
- return ["span", {}];
3340
- }
3341
- return [
3342
- "div",
3343
- { style: "line-height:1.25em;margin-bottom:0.6em" },
3344
- [
3345
- "div",
3346
- {
3347
- style: "color:#476582"
3348
- },
3349
- type
3350
- ],
3351
- [
3352
- "div",
3353
- {
3354
- style: "padding-left:1.25em"
3355
- },
3356
- ...Object.keys(target).map((key) => {
3357
- return [
3358
- "div",
3359
- {},
3360
- ["span", keywordStyle, key + ": "],
3361
- formatValue(target[key], false)
3362
- ];
3363
- })
3364
- ]
3365
- ];
3366
- }
3367
- function formatValue(v, asRaw = true) {
3368
- if (typeof v === "number") {
3369
- return ["span", numberStyle, v];
3370
- } else if (typeof v === "string") {
3371
- return ["span", stringStyle, JSON.stringify(v)];
3372
- } else if (typeof v === "boolean") {
3373
- return ["span", keywordStyle, v];
3374
- } else if (isObject(v)) {
3375
- return ["object", { object: asRaw ? toRaw(v) : v }];
3376
- } else {
3377
- return ["span", stringStyle, String(v)];
3378
- }
3379
- }
3380
- function extractKeys(instance, type) {
3381
- const Comp = instance.type;
3382
- if (isFunction(Comp)) {
3383
- return;
3384
- }
3385
- const extracted = {};
3386
- for (const key in instance.ctx) {
3387
- if (isKeyOfType(Comp, key, type)) {
3388
- extracted[key] = instance.ctx[key];
3389
- }
3390
- }
3391
- return extracted;
3392
- }
3393
- function isKeyOfType(Comp, key, type) {
3394
- const opts = Comp[type];
3395
- if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
3396
- return true;
3397
- }
3398
- if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
3399
- return true;
3400
- }
3401
- if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
3402
- return true;
3403
- }
3404
- }
3405
- function genRefFlag(v) {
3406
- if (isShallow(v)) {
3407
- return `ShallowRef`;
3408
- }
3409
- if (v.effect) {
3410
- return `ComputedRef`;
3411
- }
3412
- return `Ref`;
3413
- }
3414
- if (window.devtoolsFormatters) {
3415
- window.devtoolsFormatters.push(formatter);
3416
- } else {
3417
- window.devtoolsFormatters = [formatter];
3418
- }
3419
- }
3420
- var warn2 = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
3421
- var devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
3422
- var setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
3423
-
3424
- // node_modules/.pnpm/vue@3.5.44_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
3425
- function initDev() {
3426
- {
3427
- initCustomFormatter();
3428
- }
3429
- }
3430
- if (!!(process.env.NODE_ENV !== "production")) {
3431
- initDev();
3432
- }
3433
-
3434
1
  // packages/ui-vue/src/index.ts
2
+ import { defineComponent, h } from "vue";
3435
3
  import "@atomic-ui/ui";
3436
4
  function wrap(tag, domProps = [], events = {}) {
3437
5
  return defineComponent({
@@ -3506,34 +74,4 @@ export {
3506
74
  ImpktTextInput,
3507
75
  ImpktTextarea
3508
76
  };
3509
- /*! Bundled license information:
3510
-
3511
- @vue/shared/dist/shared.esm-bundler.js:
3512
- (**
3513
- * @vue/shared v3.5.44
3514
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
3515
- * @license MIT
3516
- **)
3517
-
3518
- @vue/reactivity/dist/reactivity.esm-bundler.js:
3519
- (**
3520
- * @vue/reactivity v3.5.44
3521
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
3522
- * @license MIT
3523
- **)
3524
-
3525
- @vue/runtime-core/dist/runtime-core.esm-bundler.js:
3526
- (**
3527
- * @vue/runtime-core v3.5.44
3528
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
3529
- * @license MIT
3530
- **)
3531
-
3532
- vue/dist/vue.runtime.esm-bundler.js:
3533
- (**
3534
- * vue v3.5.44
3535
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
3536
- * @license MIT
3537
- **)
3538
- */
3539
77
  //# sourceMappingURL=index.js.map