@vue/reactivity 3.2.41 → 3.2.43
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/reactivity.cjs.js +2 -1
- package/dist/reactivity.cjs.prod.js +2 -1
- package/dist/reactivity.d.ts +6 -4
- package/dist/reactivity.esm-browser.js +6 -1
- package/dist/reactivity.esm-browser.prod.js +1 -1
- package/dist/reactivity.esm-bundler.js +3 -2
- package/dist/reactivity.global.js +6 -1
- package/dist/reactivity.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/reactivity.cjs.js
CHANGED
|
@@ -311,8 +311,9 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
311
311
|
deps = [...depsMap.values()];
|
|
312
312
|
}
|
|
313
313
|
else if (key === 'length' && shared.isArray(target)) {
|
|
314
|
+
const newLength = shared.toNumber(newValue);
|
|
314
315
|
depsMap.forEach((dep, key) => {
|
|
315
|
-
if (key === 'length' || key >=
|
|
316
|
+
if (key === 'length' || key >= newLength) {
|
|
316
317
|
deps.push(dep);
|
|
317
318
|
}
|
|
318
319
|
});
|
|
@@ -292,8 +292,9 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
292
292
|
deps = [...depsMap.values()];
|
|
293
293
|
}
|
|
294
294
|
else if (key === 'length' && shared.isArray(target)) {
|
|
295
|
+
const newLength = shared.toNumber(newValue);
|
|
295
296
|
depsMap.forEach((dep, key) => {
|
|
296
|
-
if (key === 'length' || key >=
|
|
297
|
+
if (key === 'length' || key >= newLength) {
|
|
297
298
|
deps.push(dep);
|
|
298
299
|
}
|
|
299
300
|
});
|
package/dist/reactivity.d.ts
CHANGED
|
@@ -107,9 +107,7 @@ declare type IterableCollections = Map<any, any> | Set<any>;
|
|
|
107
107
|
|
|
108
108
|
export declare const ITERATE_KEY: unique symbol;
|
|
109
109
|
|
|
110
|
-
export declare function markRaw<T extends object>(value: T): T
|
|
111
|
-
[RawSymbol]?: true;
|
|
112
|
-
};
|
|
110
|
+
export declare function markRaw<T extends object>(value: T): Raw<T>;
|
|
113
111
|
|
|
114
112
|
export declare function onScopeDispose(fn: () => void): void;
|
|
115
113
|
|
|
@@ -119,6 +117,10 @@ declare type Primitive = string | number | boolean | bigint | symbol | undefined
|
|
|
119
117
|
|
|
120
118
|
export declare function proxyRefs<T extends object>(objectWithRefs: T): ShallowUnwrapRef<T>;
|
|
121
119
|
|
|
120
|
+
export declare type Raw<T> = T & {
|
|
121
|
+
[RawSymbol]?: true;
|
|
122
|
+
};
|
|
123
|
+
|
|
122
124
|
declare const RawSymbol: unique symbol;
|
|
123
125
|
|
|
124
126
|
/**
|
|
@@ -326,7 +328,7 @@ export declare type UnwrapRef<T> = T extends ShallowRef<infer V> ? V : T extends
|
|
|
326
328
|
|
|
327
329
|
declare type UnwrapRefSimple<T> = T extends Function | CollectionTypes | BaseTypes | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | {
|
|
328
330
|
[RawSymbol]?: true;
|
|
329
|
-
} ? T : T extends
|
|
331
|
+
} ? T : T extends ReadonlyArray<any> ? {
|
|
330
332
|
[K in keyof T]: UnwrapRefSimple<T[K]>;
|
|
331
333
|
} : T extends object & {
|
|
332
334
|
[ShallowReactiveMarker]?: never;
|
|
@@ -56,6 +56,10 @@ const def = (obj, key, value) => {
|
|
|
56
56
|
value
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
+
const toNumber = (val) => {
|
|
60
|
+
const n = parseFloat(val);
|
|
61
|
+
return isNaN(n) ? val : n;
|
|
62
|
+
};
|
|
59
63
|
|
|
60
64
|
function warn(msg, ...args) {
|
|
61
65
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
@@ -361,8 +365,9 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
361
365
|
deps = [...depsMap.values()];
|
|
362
366
|
}
|
|
363
367
|
else if (key === 'length' && isArray(target)) {
|
|
368
|
+
const newLength = toNumber(newValue);
|
|
364
369
|
depsMap.forEach((dep, key) => {
|
|
365
|
-
if (key === 'length' || key >=
|
|
370
|
+
if (key === 'length' || key >= newLength) {
|
|
366
371
|
deps.push(dep);
|
|
367
372
|
}
|
|
368
373
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(t,e)=>s.call(t,e),r=Array.isArray,c=t=>"[object Map]"===a(t),o=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,a=t=>h.call(t),l=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,f=(t,e)=>!Object.is(t,e);let _;class d{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=_,!t&&_&&(this.index=(_.scopes||(_.scopes=[])).push(this)-1)}run(t){if(this.active){const e=_;try{return _=this,t()}finally{_=e}}}on(){_=this}off(){_=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this.active=!1}}}function p(t){return new d(t)}function v(t,e=_){e&&e.active&&e.effects.push(t)}function g(){return _}function y(t){_&&_.cleanups.push(t)}const w=t=>{const e=new Set(t);return e.w=0,e.n=0,e},b=t=>(t.w&k)>0,R=t=>(t.n&k)>0,m=new WeakMap;let S=0,k=1;let j;const O=Symbol(""),x=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=j,e=W;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=j,j=this,W=!0,k=1<<++S,S<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=k})(this):P(this),this.fn()}finally{S<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];b(i)&&!R(i)?i.delete(t):e[n++]=i,i.w&=~k,i.n&=~k}e.length=n}})(this),k=1<<--S,j=this.parent,W=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(P(this),this.onStop&&this.onStop(),this.active=!1)}}function P(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}function M(t,e){t.effect&&(t=t.effect.fn);const s=new E(t);e&&(n(s,e),e.scope&&v(s,e.scope)),e&&e.lazy||s.run();const i=s.run.bind(s);return i.effect=s,i}function z(t){t.effect.stop()}let W=!0;const V=[];function A(){V.push(W),W=!1}function N(){V.push(W),W=!0}function I(){const t=V.pop();W=void 0===t||t}function K(t,e,n){if(W&&j){let e=m.get(t);e||m.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=w()),C(s)}}function C(t,e){let n=!1;S<=30?R(t)||(t.n|=k,n=!b(t)):n=!t.has(j),n&&(t.add(j),j.deps.push(t))}function L(t,e,n,s,i,o){const u=m.get(t);if(!u)return;let h=[];if("clear"===e)h=[...u.values()];else if("length"===n&&r(t))u.forEach(((t,e)=>{("length"===e||e>=s)&&h.push(t)}));else switch(void 0!==n&&h.push(u.get(n)),e){case"add":r(t)?l(n)&&h.push(u.get("length")):(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"delete":r(t)||(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"set":c(t)&&h.push(u.get(O))}if(1===h.length)h[0]&&q(h[0]);else{const t=[];for(const e of h)e&&t.push(...e);q(w(t))}}function q(t,e){const n=r(t)?t:[...t];for(const s of n)s.computed&&B(s);for(const s of n)s.computed||B(s)}function B(t,e){(t!==j||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const D=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(o)),G=X(),H=X(!1,!0),J=X(!0),Q=X(!0,!0),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Ct(this);for(let e=0,i=this.length;e<i;e++)K(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Ct)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A();const n=Ct(this)[e].apply(this,t);return I(),n}})),t}function X(t=!1,e=!1){return function(n,s,c){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&c===(t?e?xt:Ot:e?jt:kt).get(n))return n;const h=r(n);if(!t&&h&&i(T,s))return Reflect.get(T,s,c);const a=Reflect.get(n,s,c);return(o(s)?F.has(s):D(s))?a:(t||K(n,0,s),e?a:Gt(a)?h&&l(s)?a:a.value:u(a)?t?zt(a):Pt(a):a)}}function Y(t=!1){return function(e,n,s,c){let o=e[n];if(Nt(o)&&Gt(o)&&!Gt(s))return!1;if(!t&&(It(s)||Nt(s)||(o=Ct(o),s=Ct(s)),!r(e)&&Gt(o)&&!Gt(s)))return o.value=s,!0;const u=r(e)&&l(n)?Number(n)<e.length:i(e,n),h=Reflect.set(e,n,s,c);return e===Ct(c)&&(u?f(s,o)&&L(e,"set",n,s):L(e,"add",n,s)),h}}const Z={get:G,set:Y(),deleteProperty:function(t,e){const n=i(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&L(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return o(e)&&F.has(e)||K(t,0,e),n},ownKeys:function(t){return K(t,0,r(t)?"length":O),Reflect.ownKeys(t)}},$={get:J,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},tt=n({},Z,{get:H,set:Y(!0)}),et=n({},$,{get:Q}),nt=t=>t,st=t=>Reflect.getPrototypeOf(t);function it(t,e,n=!1,s=!1){const i=Ct(t=t.__v_raw),r=Ct(e);n||(e!==r&&K(i,0,e),K(i,0,r));const{has:c}=st(i),o=s?nt:n?Bt:qt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function rt(t,e=!1){const n=this.__v_raw,s=Ct(n),i=Ct(t);return e||(t!==i&&K(s,0,t),K(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function ct(t,e=!1){return t=t.__v_raw,!e&&K(Ct(t),0,O),Reflect.get(t,"size",t)}function ot(t){t=Ct(t);const e=Ct(this);return st(e).has.call(e,t)||(e.add(t),L(e,"add",t,t)),this}function ut(t,e){e=Ct(e);const n=Ct(this),{has:s,get:i}=st(n);let r=s.call(n,t);r||(t=Ct(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?f(e,c)&&L(n,"set",t,e):L(n,"add",t,e),this}function ht(t){const e=Ct(this),{has:n,get:s}=st(e);let i=n.call(e,t);i||(t=Ct(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&L(e,"delete",t,void 0),r}function at(){const t=Ct(this),e=0!==t.size,n=t.clear();return e&&L(t,"clear",void 0,void 0),n}function lt(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Ct(r),o=e?nt:t?Bt:qt;return!t&&K(c,0,O),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ft(t,e,n){return function(...s){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,h="keys"===t&&o,a=i[t](...s),l=n?nt:e?Bt:qt;return!e&&K(r,0,h?x:O),{next(){const{value:t,done:e}=a.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function _t(t){return function(...e){return"delete"!==t&&this}}function dt(){const t={get(t){return it(this,t)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:at,forEach:lt(!1,!1)},e={get(t){return it(this,t,!1,!0)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:at,forEach:lt(!1,!0)},n={get(t){return it(this,t,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:lt(!0,!1)},s={get(t){return it(this,t,!0,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:lt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ft(i,!1,!1),n[i]=ft(i,!0,!1),e[i]=ft(i,!1,!0),s[i]=ft(i,!0,!0)})),[t,n,e,s]}const[pt,vt,gt,yt]=dt();function wt(t,e){const n=e?t?yt:gt:t?vt:pt;return(e,s,r)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(i(n,s)&&s in e?n:e,s,r)}const bt={get:wt(!1,!1)},Rt={get:wt(!1,!0)},mt={get:wt(!0,!1)},St={get:wt(!0,!0)},kt=new WeakMap,jt=new WeakMap,Ot=new WeakMap,xt=new WeakMap;function Et(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>a(t).slice(8,-1))(t))}function Pt(t){return Nt(t)?t:Vt(t,!1,Z,bt,kt)}function Mt(t){return Vt(t,!1,tt,Rt,jt)}function zt(t){return Vt(t,!0,$,mt,Ot)}function Wt(t){return Vt(t,!0,et,St,xt)}function Vt(t,e,n,s,i){if(!u(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=Et(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function At(t){return Nt(t)?At(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Kt(t){return At(t)||Nt(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Lt(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}const qt=t=>u(t)?Pt(t):t,Bt=t=>u(t)?zt(t):t;function Dt(t){W&&j&&C((t=Ct(t)).dep||(t.dep=w()))}function Ft(t,e){(t=Ct(t)).dep&&q(t.dep)}function Gt(t){return!(!t||!0!==t.__v_isRef)}function Ht(t){return Qt(t,!1)}function Jt(t){return Qt(t,!0)}function Qt(t,e){return Gt(t)?t:new Tt(t,e)}class Tt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:qt(t)}get value(){return Dt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||Nt(t);t=e?t:Ct(t),f(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:qt(t),Ft(this))}}function Ut(t){Ft(t)}function Xt(t){return Gt(t)?t.value:t}const Yt={get:(t,e,n)=>Xt(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Gt(i)&&!Gt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Zt(t){return At(t)?t:new Proxy(t,Yt)}class $t{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Dt(this)),(()=>Ft(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function te(t){return new $t(t)}function ee(t){const e=r(t)?new Array(t.length):{};for(const n in t)e[n]=se(t,n);return e}class ne{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function se(t,e,n){const s=t[e];return Gt(s)?s:new ne(t,e,n)}var ie,re;class ce{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this[ie]=!1,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Ct(this);return Dt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function oe(t,n,s=!1){let i,r;const c="function"==typeof t;c?(i=t,r=e):(i=t.get,r=t.set);return new ce(i,r,c||!r,s)}ie="__v_isReadonly";const ue=Promise.resolve(),he=[];let ae=!1;const le=()=>{for(let t=0;t<he.length;t++)he[t]();he.length=0,ae=!1};class fe{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[re]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,he.push((()=>{this.effect.active&&this._get()!==t&&Ft(this),s=!1})),ae||(ae=!0,ue.then(le))}for(const t of this.dep)t.computed instanceof fe&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Dt(this),Ct(this)._get()}}function _e(t){return new fe(t)}re="__v_isReadonly";export{d as EffectScope,O as ITERATE_KEY,E as ReactiveEffect,oe as computed,te as customRef,_e as deferredComputed,M as effect,p as effectScope,N as enableTracking,g as getCurrentScope,Kt as isProxy,At as isReactive,Nt as isReadonly,Gt as isRef,It as isShallow,Lt as markRaw,y as onScopeDispose,A as pauseTracking,Zt as proxyRefs,Pt as reactive,zt as readonly,Ht as ref,I as resetTracking,Mt as shallowReactive,Wt as shallowReadonly,Jt as shallowRef,z as stop,Ct as toRaw,se as toRef,ee as toRefs,K as track,L as trigger,Ut as triggerRef,Xt as unref};
|
|
1
|
+
function t(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(t,e)=>s.call(t,e),r=Array.isArray,c=t=>"[object Map]"===a(t),o=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,a=t=>h.call(t),l=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,f=(t,e)=>!Object.is(t,e);let _;class d{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=_,!t&&_&&(this.index=(_.scopes||(_.scopes=[])).push(this)-1)}run(t){if(this.active){const e=_;try{return _=this,t()}finally{_=e}}}on(){_=this}off(){_=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this.active=!1}}}function p(t){return new d(t)}function v(t,e=_){e&&e.active&&e.effects.push(t)}function g(){return _}function y(t){_&&_.cleanups.push(t)}const w=t=>{const e=new Set(t);return e.w=0,e.n=0,e},b=t=>(t.w&k)>0,R=t=>(t.n&k)>0,m=new WeakMap;let S=0,k=1;let j;const O=Symbol(""),x=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=j,e=W;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=j,j=this,W=!0,k=1<<++S,S<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=k})(this):P(this),this.fn()}finally{S<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];b(i)&&!R(i)?i.delete(t):e[n++]=i,i.w&=~k,i.n&=~k}e.length=n}})(this),k=1<<--S,j=this.parent,W=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(P(this),this.onStop&&this.onStop(),this.active=!1)}}function P(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}function M(t,e){t.effect&&(t=t.effect.fn);const s=new E(t);e&&(n(s,e),e.scope&&v(s,e.scope)),e&&e.lazy||s.run();const i=s.run.bind(s);return i.effect=s,i}function z(t){t.effect.stop()}let W=!0;const N=[];function V(){N.push(W),W=!1}function A(){N.push(W),W=!0}function I(){const t=N.pop();W=void 0===t||t}function K(t,e,n){if(W&&j){let e=m.get(t);e||m.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=w()),C(s)}}function C(t,e){let n=!1;S<=30?R(t)||(t.n|=k,n=!b(t)):n=!t.has(j),n&&(t.add(j),j.deps.push(t))}function F(t,e,n,s,i,o){const u=m.get(t);if(!u)return;let h=[];if("clear"===e)h=[...u.values()];else if("length"===n&&r(t)){const t=(t=>{const e=parseFloat(t);return isNaN(e)?t:e})(s);u.forEach(((e,n)=>{("length"===n||n>=t)&&h.push(e)}))}else switch(void 0!==n&&h.push(u.get(n)),e){case"add":r(t)?l(n)&&h.push(u.get("length")):(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"delete":r(t)||(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"set":c(t)&&h.push(u.get(O))}if(1===h.length)h[0]&&L(h[0]);else{const t=[];for(const e of h)e&&t.push(...e);L(w(t))}}function L(t,e){const n=r(t)?t:[...t];for(const s of n)s.computed&&q(s);for(const s of n)s.computed||q(s)}function q(t,e){(t!==j||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const B=t("__proto__,__v_isRef,__isVue"),D=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(o)),G=X(),H=X(!1,!0),J=X(!0),Q=X(!0,!0),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Ct(this);for(let e=0,i=this.length;e<i;e++)K(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Ct)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){V();const n=Ct(this)[e].apply(this,t);return I(),n}})),t}function X(t=!1,e=!1){return function(n,s,c){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&c===(t?e?xt:Ot:e?jt:kt).get(n))return n;const h=r(n);if(!t&&h&&i(T,s))return Reflect.get(T,s,c);const a=Reflect.get(n,s,c);return(o(s)?D.has(s):B(s))?a:(t||K(n,0,s),e?a:Gt(a)?h&&l(s)?a:a.value:u(a)?t?zt(a):Pt(a):a)}}function Y(t=!1){return function(e,n,s,c){let o=e[n];if(At(o)&&Gt(o)&&!Gt(s))return!1;if(!t&&(It(s)||At(s)||(o=Ct(o),s=Ct(s)),!r(e)&&Gt(o)&&!Gt(s)))return o.value=s,!0;const u=r(e)&&l(n)?Number(n)<e.length:i(e,n),h=Reflect.set(e,n,s,c);return e===Ct(c)&&(u?f(s,o)&&F(e,"set",n,s):F(e,"add",n,s)),h}}const Z={get:G,set:Y(),deleteProperty:function(t,e){const n=i(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&F(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return o(e)&&D.has(e)||K(t,0,e),n},ownKeys:function(t){return K(t,0,r(t)?"length":O),Reflect.ownKeys(t)}},$={get:J,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},tt=n({},Z,{get:H,set:Y(!0)}),et=n({},$,{get:Q}),nt=t=>t,st=t=>Reflect.getPrototypeOf(t);function it(t,e,n=!1,s=!1){const i=Ct(t=t.__v_raw),r=Ct(e);n||(e!==r&&K(i,0,e),K(i,0,r));const{has:c}=st(i),o=s?nt:n?qt:Lt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function rt(t,e=!1){const n=this.__v_raw,s=Ct(n),i=Ct(t);return e||(t!==i&&K(s,0,t),K(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function ct(t,e=!1){return t=t.__v_raw,!e&&K(Ct(t),0,O),Reflect.get(t,"size",t)}function ot(t){t=Ct(t);const e=Ct(this);return st(e).has.call(e,t)||(e.add(t),F(e,"add",t,t)),this}function ut(t,e){e=Ct(e);const n=Ct(this),{has:s,get:i}=st(n);let r=s.call(n,t);r||(t=Ct(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?f(e,c)&&F(n,"set",t,e):F(n,"add",t,e),this}function ht(t){const e=Ct(this),{has:n,get:s}=st(e);let i=n.call(e,t);i||(t=Ct(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&F(e,"delete",t,void 0),r}function at(){const t=Ct(this),e=0!==t.size,n=t.clear();return e&&F(t,"clear",void 0,void 0),n}function lt(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Ct(r),o=e?nt:t?qt:Lt;return!t&&K(c,0,O),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ft(t,e,n){return function(...s){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,h="keys"===t&&o,a=i[t](...s),l=n?nt:e?qt:Lt;return!e&&K(r,0,h?x:O),{next(){const{value:t,done:e}=a.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function _t(t){return function(...e){return"delete"!==t&&this}}function dt(){const t={get(t){return it(this,t)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:at,forEach:lt(!1,!1)},e={get(t){return it(this,t,!1,!0)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:at,forEach:lt(!1,!0)},n={get(t){return it(this,t,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:lt(!0,!1)},s={get(t){return it(this,t,!0,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:lt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ft(i,!1,!1),n[i]=ft(i,!0,!1),e[i]=ft(i,!1,!0),s[i]=ft(i,!0,!0)})),[t,n,e,s]}const[pt,vt,gt,yt]=dt();function wt(t,e){const n=e?t?yt:gt:t?vt:pt;return(e,s,r)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(i(n,s)&&s in e?n:e,s,r)}const bt={get:wt(!1,!1)},Rt={get:wt(!1,!0)},mt={get:wt(!0,!1)},St={get:wt(!0,!0)},kt=new WeakMap,jt=new WeakMap,Ot=new WeakMap,xt=new WeakMap;function Et(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>a(t).slice(8,-1))(t))}function Pt(t){return At(t)?t:Nt(t,!1,Z,bt,kt)}function Mt(t){return Nt(t,!1,tt,Rt,jt)}function zt(t){return Nt(t,!0,$,mt,Ot)}function Wt(t){return Nt(t,!0,et,St,xt)}function Nt(t,e,n,s,i){if(!u(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=Et(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function Vt(t){return At(t)?Vt(t.__v_raw):!(!t||!t.__v_isReactive)}function At(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Kt(t){return Vt(t)||At(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Ft(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}const Lt=t=>u(t)?Pt(t):t,qt=t=>u(t)?zt(t):t;function Bt(t){W&&j&&C((t=Ct(t)).dep||(t.dep=w()))}function Dt(t,e){(t=Ct(t)).dep&&L(t.dep)}function Gt(t){return!(!t||!0!==t.__v_isRef)}function Ht(t){return Qt(t,!1)}function Jt(t){return Qt(t,!0)}function Qt(t,e){return Gt(t)?t:new Tt(t,e)}class Tt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:Lt(t)}get value(){return Bt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||At(t);t=e?t:Ct(t),f(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Lt(t),Dt(this))}}function Ut(t){Dt(t)}function Xt(t){return Gt(t)?t.value:t}const Yt={get:(t,e,n)=>Xt(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Gt(i)&&!Gt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Zt(t){return Vt(t)?t:new Proxy(t,Yt)}class $t{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Bt(this)),(()=>Dt(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function te(t){return new $t(t)}function ee(t){const e=r(t)?new Array(t.length):{};for(const n in t)e[n]=se(t,n);return e}class ne{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function se(t,e,n){const s=t[e];return Gt(s)?s:new ne(t,e,n)}var ie,re;class ce{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this[ie]=!1,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,Dt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Ct(this);return Bt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function oe(t,n,s=!1){let i,r;const c="function"==typeof t;c?(i=t,r=e):(i=t.get,r=t.set);return new ce(i,r,c||!r,s)}ie="__v_isReadonly";const ue=Promise.resolve(),he=[];let ae=!1;const le=()=>{for(let t=0;t<he.length;t++)he[t]();he.length=0,ae=!1};class fe{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[re]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,he.push((()=>{this.effect.active&&this._get()!==t&&Dt(this),s=!1})),ae||(ae=!0,ue.then(le))}for(const t of this.dep)t.computed instanceof fe&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Bt(this),Ct(this)._get()}}function _e(t){return new fe(t)}re="__v_isReadonly";export{d as EffectScope,O as ITERATE_KEY,E as ReactiveEffect,oe as computed,te as customRef,_e as deferredComputed,M as effect,p as effectScope,A as enableTracking,g as getCurrentScope,Kt as isProxy,Vt as isReactive,At as isReadonly,Gt as isRef,It as isShallow,Ft as markRaw,y as onScopeDispose,V as pauseTracking,Zt as proxyRefs,Pt as reactive,zt as readonly,Ht as ref,I as resetTracking,Mt as shallowReactive,Wt as shallowReadonly,Jt as shallowRef,z as stop,Ct as toRaw,se as toRef,ee as toRefs,K as track,F as trigger,Ut as triggerRef,Xt as unref};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extend, isArray, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';
|
|
1
|
+
import { extend, isArray, toNumber, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';
|
|
2
2
|
|
|
3
3
|
function warn(msg, ...args) {
|
|
4
4
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
@@ -305,8 +305,9 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
305
305
|
deps = [...depsMap.values()];
|
|
306
306
|
}
|
|
307
307
|
else if (key === 'length' && isArray(target)) {
|
|
308
|
+
const newLength = toNumber(newValue);
|
|
308
309
|
depsMap.forEach((dep, key) => {
|
|
309
|
-
if (key === 'length' || key >=
|
|
310
|
+
if (key === 'length' || key >= newLength) {
|
|
310
311
|
deps.push(dep);
|
|
311
312
|
}
|
|
312
313
|
});
|
|
@@ -59,6 +59,10 @@ var VueReactivity = (function (exports) {
|
|
|
59
59
|
value
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
+
const toNumber = (val) => {
|
|
63
|
+
const n = parseFloat(val);
|
|
64
|
+
return isNaN(n) ? val : n;
|
|
65
|
+
};
|
|
62
66
|
|
|
63
67
|
function warn(msg, ...args) {
|
|
64
68
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
@@ -364,8 +368,9 @@ var VueReactivity = (function (exports) {
|
|
|
364
368
|
deps = [...depsMap.values()];
|
|
365
369
|
}
|
|
366
370
|
else if (key === 'length' && isArray(target)) {
|
|
371
|
+
const newLength = toNumber(newValue);
|
|
367
372
|
depsMap.forEach((dep, key) => {
|
|
368
|
-
if (key === 'length' || key >=
|
|
373
|
+
if (key === 'length' || key >= newLength) {
|
|
369
374
|
deps.push(dep);
|
|
370
375
|
}
|
|
371
376
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var VueReactivity=function(t){"use strict";function e(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const n=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===l(t),u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,_=(t,e)=>!Object.is(t,e);let d;class p{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}run(t){if(this.active){const e=d;try{return d=this,t()}finally{d=e}}}on(){d=this}off(){d=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this.active=!1}}}function v(t,e=d){e&&e.active&&e.effects.push(t)}const g=t=>{const e=new Set(t);return e.w=0,e.n=0,e},y=t=>(t.w&S)>0,w=t=>(t.n&S)>0,R=new WeakMap;let b=0,S=1;let m;const k=Symbol(""),j=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=m,e=x;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=m,m=this,x=!0,S=1<<++b,b<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=S})(this):O(this),this.fn()}finally{b<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];y(i)&&!w(i)?i.delete(t):e[n++]=i,i.w&=~S,i.n&=~S}e.length=n}})(this),S=1<<--b,m=this.parent,x=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){m===this?this.deferStop=!0:this.active&&(O(this),this.onStop&&this.onStop(),this.active=!1)}}function O(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let x=!0;const P=[];function M(){P.push(x),x=!1}function z(){const t=P.pop();x=void 0===t||t}function V(t,e,n){if(x&&m){let e=R.get(t);e||R.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=g()),W(s)}}function W(t,e){let n=!1;b<=30?w(t)||(t.n|=S,n=!y(t)):n=!t.has(m),n&&(t.add(m),m.deps.push(t))}function A(t,e,n,s,i,r){const u=R.get(t);if(!u)return;let a=[];if("clear"===e)a=[...u.values()];else if("length"===n&&c(t))u.forEach(((t,e)=>{("length"===e||e>=s)&&a.push(t)}));else switch(void 0!==n&&a.push(u.get(n)),e){case"add":c(t)?f(n)&&a.push(u.get("length")):(a.push(u.get(k)),o(t)&&a.push(u.get(j)));break;case"delete":c(t)||(a.push(u.get(k)),o(t)&&a.push(u.get(j)));break;case"set":o(t)&&a.push(u.get(k))}if(1===a.length)a[0]&&T(a[0]);else{const t=[];for(const e of a)e&&t.push(...e);T(g(t))}}function T(t,e){const n=c(t)?t:[...t];for(const s of n)s.computed&&N(s);for(const s of n)s.computed||N(s)}function N(t,e){(t!==m||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const C=e("__proto__,__v_isRef,__isVue"),I=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),K=F(),D=F(!1,!0),L=F(!0),Y=F(!0,!0),q=B();function B(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Mt(this);for(let e=0,i=this.length;e<i;e++)V(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Mt)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){M();const n=Mt(this)[e].apply(this,t);return z(),n}})),t}function F(t=!1,e=!1){return function(n,s,i){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&i===(t?e?St:bt:e?Rt:wt).get(n))return n;const o=c(n);if(!t&&o&&r(q,s))return Reflect.get(q,s,i);const h=Reflect.get(n,s,i);return(u(s)?I.has(s):C(s))?h:(t||V(n,0,s),e?h:Tt(h)?o&&f(s)?h:h.value:a(h)?t?jt(h):kt(h):h)}}function G(t=!1){return function(e,n,s,i){let o=e[n];if(xt(o)&&Tt(o)&&!Tt(s))return!1;if(!t&&(Pt(s)||xt(s)||(o=Mt(o),s=Mt(s)),!c(e)&&Tt(o)&&!Tt(s)))return o.value=s,!0;const u=c(e)&&f(n)?Number(n)<e.length:r(e,n),a=Reflect.set(e,n,s,i);return e===Mt(i)&&(u?_(s,o)&&A(e,"set",n,s):A(e,"add",n,s)),a}}const H={get:K,set:G(),deleteProperty:function(t,e){const n=r(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&A(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return u(e)&&I.has(e)||V(t,0,e),n},ownKeys:function(t){return V(t,0,c(t)?"length":k),Reflect.ownKeys(t)}},J={get:L,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},Q=s({},H,{get:D,set:G(!0)}),U=s({},J,{get:Y}),X=t=>t,Z=t=>Reflect.getPrototypeOf(t);function $(t,e,n=!1,s=!1){const i=Mt(t=t.__v_raw),r=Mt(e);n||(e!==r&&V(i,0,e),V(i,0,r));const{has:c}=Z(i),o=s?X:n?Vt:zt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function tt(t,e=!1){const n=this.__v_raw,s=Mt(n),i=Mt(t);return e||(t!==i&&V(s,0,t),V(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function et(t,e=!1){return t=t.__v_raw,!e&&V(Mt(t),0,k),Reflect.get(t,"size",t)}function nt(t){t=Mt(t);const e=Mt(this);return Z(e).has.call(e,t)||(e.add(t),A(e,"add",t,t)),this}function st(t,e){e=Mt(e);const n=Mt(this),{has:s,get:i}=Z(n);let r=s.call(n,t);r||(t=Mt(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?_(e,c)&&A(n,"set",t,e):A(n,"add",t,e),this}function it(t){const e=Mt(this),{has:n,get:s}=Z(e);let i=n.call(e,t);i||(t=Mt(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&A(e,"delete",t,void 0),r}function rt(){const t=Mt(this),e=0!==t.size,n=t.clear();return e&&A(t,"clear",void 0,void 0),n}function ct(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Mt(r),o=e?X:t?Vt:zt;return!t&&V(c,0,k),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ot(t,e,n){return function(...s){const i=this.__v_raw,r=Mt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,h=i[t](...s),l=n?X:e?Vt:zt;return!e&&V(r,0,a?j:k),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function ut(t){return function(...e){return"delete"!==t&&this}}function at(){const t={get(t){return $(this,t)},get size(){return et(this)},has:tt,add:nt,set:st,delete:it,clear:rt,forEach:ct(!1,!1)},e={get(t){return $(this,t,!1,!0)},get size(){return et(this)},has:tt,add:nt,set:st,delete:it,clear:rt,forEach:ct(!1,!0)},n={get(t){return $(this,t,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:ct(!0,!1)},s={get(t){return $(this,t,!0,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:ct(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ot(i,!1,!1),n[i]=ot(i,!0,!1),e[i]=ot(i,!1,!0),s[i]=ot(i,!0,!0)})),[t,n,e,s]}const[ht,lt,ft,_t]=at();function dt(t,e){const n=e?t?_t:ft:t?lt:ht;return(e,s,i)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(r(n,s)&&s in e?n:e,s,i)}const pt={get:dt(!1,!1)},vt={get:dt(!1,!0)},gt={get:dt(!0,!1)},yt={get:dt(!0,!0)},wt=new WeakMap,Rt=new WeakMap,bt=new WeakMap,St=new WeakMap;function mt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>l(t).slice(8,-1))(t))}function kt(t){return xt(t)?t:Et(t,!1,H,pt,wt)}function jt(t){return Et(t,!0,J,gt,bt)}function Et(t,e,n,s,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=mt(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function Ot(t){return xt(t)?Ot(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}const zt=t=>a(t)?kt(t):t,Vt=t=>a(t)?jt(t):t;function Wt(t){x&&m&&W((t=Mt(t)).dep||(t.dep=g()))}function At(t,e){(t=Mt(t)).dep&&T(t.dep)}function Tt(t){return!(!t||!0!==t.__v_isRef)}function Nt(t,e){return Tt(t)?t:new Ct(t,e)}class Ct{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Mt(t),this._value=e?t:zt(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||xt(t);t=e?t:Mt(t),_(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:zt(t),At(this))}}function It(t){return Tt(t)?t.value:t}const Kt={get:(t,e,n)=>It(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Tt(i)&&!Tt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};class Dt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Wt(this)),(()=>At(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}class Lt{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Yt(t,e,n){const s=t[e];return Tt(s)?s:new Lt(t,e,n)}var qt,Bt;class Ft{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this[qt]=!1,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,At(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Mt(this);return Wt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}qt="__v_isReadonly";const Gt=Promise.resolve(),Ht=[];let Jt=!1;const Qt=()=>{for(let t=0;t<Ht.length;t++)Ht[t]();Ht.length=0,Jt=!1};class Ut{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[Bt]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,Ht.push((()=>{this.effect.active&&this._get()!==t&&At(this),s=!1})),Jt||(Jt=!0,Gt.then(Qt))}for(const t of this.dep)t.computed instanceof Ut&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Wt(this),Mt(this)._get()}}return Bt="__v_isReadonly",t.EffectScope=p,t.ITERATE_KEY=k,t.ReactiveEffect=E,t.computed=function(t,e,s=!1){let i,r;const c="function"==typeof t;return c?(i=t,r=n):(i=t.get,r=t.set),new Ft(i,r,c||!r,s)},t.customRef=function(t){return new Dt(t)},t.deferredComputed=function(t){return new Ut(t)},t.effect=function(t,e){t.effect&&(t=t.effect.fn);const n=new E(t);e&&(s(n,e),e.scope&&v(n,e.scope)),e&&e.lazy||n.run();const i=n.run.bind(n);return i.effect=n,i},t.effectScope=function(t){return new p(t)},t.enableTracking=function(){P.push(x),x=!0},t.getCurrentScope=function(){return d},t.isProxy=function(t){return Ot(t)||xt(t)},t.isReactive=Ot,t.isReadonly=xt,t.isRef=Tt,t.isShallow=Pt,t.markRaw=function(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){d&&d.cleanups.push(t)},t.pauseTracking=M,t.proxyRefs=function(t){return Ot(t)?t:new Proxy(t,Kt)},t.reactive=kt,t.readonly=jt,t.ref=function(t){return Nt(t,!1)},t.resetTracking=z,t.shallowReactive=function(t){return Et(t,!1,Q,vt,Rt)},t.shallowReadonly=function(t){return Et(t,!0,U,yt,St)},t.shallowRef=function(t){return Nt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Mt,t.toRef=Yt,t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const n in t)e[n]=Yt(t,n);return e},t.track=V,t.trigger=A,t.triggerRef=function(t){At(t)},t.unref=It,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
|
1
|
+
var VueReactivity=function(t){"use strict";function e(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const n=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===l(t),u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,_=(t,e)=>!Object.is(t,e);let d;class p{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=d,!t&&d&&(this.index=(d.scopes||(d.scopes=[])).push(this)-1)}run(t){if(this.active){const e=d;try{return d=this,t()}finally{d=e}}}on(){d=this}off(){d=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this.active=!1}}}function v(t,e=d){e&&e.active&&e.effects.push(t)}const g=t=>{const e=new Set(t);return e.w=0,e.n=0,e},y=t=>(t.w&S)>0,w=t=>(t.n&S)>0,R=new WeakMap;let b=0,S=1;let m;const k=Symbol(""),j=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=m,e=x;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=m,m=this,x=!0,S=1<<++b,b<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=S})(this):O(this),this.fn()}finally{b<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];y(i)&&!w(i)?i.delete(t):e[n++]=i,i.w&=~S,i.n&=~S}e.length=n}})(this),S=1<<--b,m=this.parent,x=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){m===this?this.deferStop=!0:this.active&&(O(this),this.onStop&&this.onStop(),this.active=!1)}}function O(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let x=!0;const P=[];function M(){P.push(x),x=!1}function z(){const t=P.pop();x=void 0===t||t}function V(t,e,n){if(x&&m){let e=R.get(t);e||R.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=g()),W(s)}}function W(t,e){let n=!1;b<=30?w(t)||(t.n|=S,n=!y(t)):n=!t.has(m),n&&(t.add(m),m.deps.push(t))}function N(t,e,n,s,i,r){const u=R.get(t);if(!u)return;let a=[];if("clear"===e)a=[...u.values()];else if("length"===n&&c(t)){const t=(t=>{const e=parseFloat(t);return isNaN(e)?t:e})(s);u.forEach(((e,n)=>{("length"===n||n>=t)&&a.push(e)}))}else switch(void 0!==n&&a.push(u.get(n)),e){case"add":c(t)?f(n)&&a.push(u.get("length")):(a.push(u.get(k)),o(t)&&a.push(u.get(j)));break;case"delete":c(t)||(a.push(u.get(k)),o(t)&&a.push(u.get(j)));break;case"set":o(t)&&a.push(u.get(k))}if(1===a.length)a[0]&&A(a[0]);else{const t=[];for(const e of a)e&&t.push(...e);A(g(t))}}function A(t,e){const n=c(t)?t:[...t];for(const s of n)s.computed&&T(s);for(const s of n)s.computed||T(s)}function T(t,e){(t!==m||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const C=e("__proto__,__v_isRef,__isVue"),I=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),K=B(),D=B(!1,!0),F=B(!0),L=B(!0,!0),Y=q();function q(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Mt(this);for(let e=0,i=this.length;e<i;e++)V(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Mt)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){M();const n=Mt(this)[e].apply(this,t);return z(),n}})),t}function B(t=!1,e=!1){return function(n,s,i){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&i===(t?e?St:bt:e?Rt:wt).get(n))return n;const o=c(n);if(!t&&o&&r(Y,s))return Reflect.get(Y,s,i);const h=Reflect.get(n,s,i);return(u(s)?I.has(s):C(s))?h:(t||V(n,0,s),e?h:At(h)?o&&f(s)?h:h.value:a(h)?t?jt(h):kt(h):h)}}function G(t=!1){return function(e,n,s,i){let o=e[n];if(xt(o)&&At(o)&&!At(s))return!1;if(!t&&(Pt(s)||xt(s)||(o=Mt(o),s=Mt(s)),!c(e)&&At(o)&&!At(s)))return o.value=s,!0;const u=c(e)&&f(n)?Number(n)<e.length:r(e,n),a=Reflect.set(e,n,s,i);return e===Mt(i)&&(u?_(s,o)&&N(e,"set",n,s):N(e,"add",n,s)),a}}const H={get:K,set:G(),deleteProperty:function(t,e){const n=r(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&N(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return u(e)&&I.has(e)||V(t,0,e),n},ownKeys:function(t){return V(t,0,c(t)?"length":k),Reflect.ownKeys(t)}},J={get:F,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},Q=s({},H,{get:D,set:G(!0)}),U=s({},J,{get:L}),X=t=>t,Z=t=>Reflect.getPrototypeOf(t);function $(t,e,n=!1,s=!1){const i=Mt(t=t.__v_raw),r=Mt(e);n||(e!==r&&V(i,0,e),V(i,0,r));const{has:c}=Z(i),o=s?X:n?Vt:zt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function tt(t,e=!1){const n=this.__v_raw,s=Mt(n),i=Mt(t);return e||(t!==i&&V(s,0,t),V(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function et(t,e=!1){return t=t.__v_raw,!e&&V(Mt(t),0,k),Reflect.get(t,"size",t)}function nt(t){t=Mt(t);const e=Mt(this);return Z(e).has.call(e,t)||(e.add(t),N(e,"add",t,t)),this}function st(t,e){e=Mt(e);const n=Mt(this),{has:s,get:i}=Z(n);let r=s.call(n,t);r||(t=Mt(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?_(e,c)&&N(n,"set",t,e):N(n,"add",t,e),this}function it(t){const e=Mt(this),{has:n,get:s}=Z(e);let i=n.call(e,t);i||(t=Mt(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&N(e,"delete",t,void 0),r}function rt(){const t=Mt(this),e=0!==t.size,n=t.clear();return e&&N(t,"clear",void 0,void 0),n}function ct(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Mt(r),o=e?X:t?Vt:zt;return!t&&V(c,0,k),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ot(t,e,n){return function(...s){const i=this.__v_raw,r=Mt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,h=i[t](...s),l=n?X:e?Vt:zt;return!e&&V(r,0,a?j:k),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function ut(t){return function(...e){return"delete"!==t&&this}}function at(){const t={get(t){return $(this,t)},get size(){return et(this)},has:tt,add:nt,set:st,delete:it,clear:rt,forEach:ct(!1,!1)},e={get(t){return $(this,t,!1,!0)},get size(){return et(this)},has:tt,add:nt,set:st,delete:it,clear:rt,forEach:ct(!1,!0)},n={get(t){return $(this,t,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:ct(!0,!1)},s={get(t){return $(this,t,!0,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:ct(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ot(i,!1,!1),n[i]=ot(i,!0,!1),e[i]=ot(i,!1,!0),s[i]=ot(i,!0,!0)})),[t,n,e,s]}const[ht,lt,ft,_t]=at();function dt(t,e){const n=e?t?_t:ft:t?lt:ht;return(e,s,i)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(r(n,s)&&s in e?n:e,s,i)}const pt={get:dt(!1,!1)},vt={get:dt(!1,!0)},gt={get:dt(!0,!1)},yt={get:dt(!0,!0)},wt=new WeakMap,Rt=new WeakMap,bt=new WeakMap,St=new WeakMap;function mt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>l(t).slice(8,-1))(t))}function kt(t){return xt(t)?t:Et(t,!1,H,pt,wt)}function jt(t){return Et(t,!0,J,gt,bt)}function Et(t,e,n,s,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=mt(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function Ot(t){return xt(t)?Ot(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}const zt=t=>a(t)?kt(t):t,Vt=t=>a(t)?jt(t):t;function Wt(t){x&&m&&W((t=Mt(t)).dep||(t.dep=g()))}function Nt(t,e){(t=Mt(t)).dep&&A(t.dep)}function At(t){return!(!t||!0!==t.__v_isRef)}function Tt(t,e){return At(t)?t:new Ct(t,e)}class Ct{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Mt(t),this._value=e?t:zt(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||xt(t);t=e?t:Mt(t),_(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:zt(t),Nt(this))}}function It(t){return At(t)?t.value:t}const Kt={get:(t,e,n)=>It(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return At(i)&&!At(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};class Dt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Wt(this)),(()=>Nt(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}class Ft{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Lt(t,e,n){const s=t[e];return At(s)?s:new Ft(t,e,n)}var Yt,qt;class Bt{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this[Yt]=!1,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,Nt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Mt(this);return Wt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Yt="__v_isReadonly";const Gt=Promise.resolve(),Ht=[];let Jt=!1;const Qt=()=>{for(let t=0;t<Ht.length;t++)Ht[t]();Ht.length=0,Jt=!1};class Ut{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[qt]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,Ht.push((()=>{this.effect.active&&this._get()!==t&&Nt(this),s=!1})),Jt||(Jt=!0,Gt.then(Qt))}for(const t of this.dep)t.computed instanceof Ut&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Wt(this),Mt(this)._get()}}return qt="__v_isReadonly",t.EffectScope=p,t.ITERATE_KEY=k,t.ReactiveEffect=E,t.computed=function(t,e,s=!1){let i,r;const c="function"==typeof t;return c?(i=t,r=n):(i=t.get,r=t.set),new Bt(i,r,c||!r,s)},t.customRef=function(t){return new Dt(t)},t.deferredComputed=function(t){return new Ut(t)},t.effect=function(t,e){t.effect&&(t=t.effect.fn);const n=new E(t);e&&(s(n,e),e.scope&&v(n,e.scope)),e&&e.lazy||n.run();const i=n.run.bind(n);return i.effect=n,i},t.effectScope=function(t){return new p(t)},t.enableTracking=function(){P.push(x),x=!0},t.getCurrentScope=function(){return d},t.isProxy=function(t){return Ot(t)||xt(t)},t.isReactive=Ot,t.isReadonly=xt,t.isRef=At,t.isShallow=Pt,t.markRaw=function(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){d&&d.cleanups.push(t)},t.pauseTracking=M,t.proxyRefs=function(t){return Ot(t)?t:new Proxy(t,Kt)},t.reactive=kt,t.readonly=jt,t.ref=function(t){return Tt(t,!1)},t.resetTracking=z,t.shallowReactive=function(t){return Et(t,!1,Q,vt,Rt)},t.shallowReadonly=function(t){return Et(t,!0,U,yt,St)},t.shallowRef=function(t){return Tt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Mt,t.toRef=Lt,t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const n in t)e[n]=Lt(t,n);return e},t.track=V,t.trigger=N,t.triggerRef=function(t){Nt(t)},t.unref=It,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/reactivity",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.43",
|
|
4
4
|
"description": "@vue/reactivity",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/reactivity.esm-bundler.js",
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@vue/shared": "3.2.
|
|
39
|
+
"@vue/shared": "3.2.43"
|
|
40
40
|
}
|
|
41
41
|
}
|