@vue/reactivity
Advanced tools
Comparing version 3.0.0-beta.17 to 3.0.0-beta.18
@@ -118,3 +118,2 @@ 'use strict'; | ||
const effects = new Set(); | ||
const computedRunners = new Set(); | ||
const add = (effectsToAdd) => { | ||
@@ -124,8 +123,3 @@ if (effectsToAdd) { | ||
if (effect !== activeEffect || !shouldTrack) { | ||
if (effect.options.computed) { | ||
computedRunners.add(effect); | ||
} | ||
else { | ||
effects.add(effect); | ||
} | ||
effects.add(effect); | ||
} | ||
@@ -182,5 +176,2 @@ }); | ||
}; | ||
// Important: computed effects must be run first so that computed getters | ||
// can be invalidated before any normal effects that depend on them are run. | ||
computedRunners.forEach(run); | ||
effects.forEach(run); | ||
@@ -750,3 +741,2 @@ } | ||
// mark effect as computed so that it gets priority during trigger | ||
computed: true, | ||
scheduler: () => { | ||
@@ -753,0 +743,0 @@ if (!dirty) { |
@@ -110,3 +110,2 @@ 'use strict'; | ||
const effects = new Set(); | ||
const computedRunners = new Set(); | ||
const add = (effectsToAdd) => { | ||
@@ -116,8 +115,3 @@ if (effectsToAdd) { | ||
if (effect !== activeEffect || !shouldTrack) { | ||
if (effect.options.computed) { | ||
computedRunners.add(effect); | ||
} | ||
else { | ||
effects.add(effect); | ||
} | ||
effects.add(effect); | ||
} | ||
@@ -163,5 +157,2 @@ }); | ||
}; | ||
// Important: computed effects must be run first so that computed getters | ||
// can be invalidated before any normal effects that depend on them are run. | ||
computedRunners.forEach(run); | ||
effects.forEach(run); | ||
@@ -691,3 +682,2 @@ } | ||
// mark effect as computed so that it gets priority during trigger | ||
computed: true, | ||
scheduler: () => { | ||
@@ -694,0 +684,0 @@ if (!dirty) { |
@@ -239,3 +239,3 @@ | ||
declare type UnwrapRefSimple<T> = T extends Function | CollectionTypes | BaseTypes | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] ? T : T extends Array<any> ? { | ||
[K in keyof T]: T[K] extends Ref ? T[K] : UnwrapRefSimple<T[K]>; | ||
[K in keyof T]: UnwrapRefSimple<T[K]>; | ||
} : T extends object ? UnwrappedObject<T> : T; | ||
@@ -242,0 +242,0 @@ |
@@ -162,3 +162,2 @@ /** | ||
const effects = new Set(); | ||
const computedRunners = new Set(); | ||
const add = (effectsToAdd) => { | ||
@@ -168,8 +167,3 @@ if (effectsToAdd) { | ||
if (effect !== activeEffect || !shouldTrack) { | ||
if (effect.options.computed) { | ||
computedRunners.add(effect); | ||
} | ||
else { | ||
effects.add(effect); | ||
} | ||
effects.add(effect); | ||
} | ||
@@ -226,5 +220,2 @@ }); | ||
}; | ||
// Important: computed effects must be run first so that computed getters | ||
// can be invalidated before any normal effects that depend on them are run. | ||
computedRunners.forEach(run); | ||
effects.forEach(run); | ||
@@ -794,3 +785,2 @@ } | ||
// mark effect as computed so that it gets priority during trigger | ||
computed: true, | ||
scheduler: () => { | ||
@@ -797,0 +787,0 @@ if (!dirty) { |
@@ -1,1 +0,1 @@ | ||
function e(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t={},n=()=>{},r=Object.assign,o=Object.prototype.hasOwnProperty,c=(e,t)=>o.call(e,t),u=Array.isArray,s=e=>"symbol"==typeof e,i=e=>null!==e&&"object"==typeof e,l=Object.prototype.toString,a=e=>(e=>l.call(e))(e).slice(8,-1),f=(e,t)=>e!==t&&(e==e||t==t),_=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},v=new WeakMap,d=[];let h;const p=Symbol(""),g=Symbol("");function y(e,n=t){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const r=function(e,t){const n=function(...r){if(!n.active)return t.scheduler?void 0:e(...r);if(!d.includes(n)){b(n);try{return O(),d.push(n),h=n,e(...r)}finally{d.pop(),j(),h=d[d.length-1]}}};return n.id=w++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,n);return n.lazy||r(),r}function R(e){e.active&&(b(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let w=0;function b(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let S=!0;const m=[];function E(){m.push(S),S=!1}function O(){m.push(S),S=!0}function j(){const e=m.pop();S=void 0===e||e}function k(e,t,n){if(!S||void 0===h)return;let r=v.get(e);r||v.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(h)||(o.add(h),h.deps.push(o))}function M(e,t,n,r,o,c){const s=v.get(e);if(!s)return;const i=new Set,l=new Set,a=e=>{e&&e.forEach(e=>{e===h&&S||(e.options.computed?l.add(e):i.add(e))})};if("clear"===t)s.forEach(a);else if("length"===n&&u(e))s.forEach((e,t)=>{("length"===t||t>=r)&&a(e)});else{void 0!==n&&a(s.get(n));const r="add"===t||"delete"===t&&!u(e);(r||"set"===t&&e instanceof Map)&&a(s.get(u(e)?"length":p)),r&&e instanceof Map&&a(s.get(g))}const f=e=>{e.options.scheduler?e.options.scheduler(e):e()};l.forEach(f),i.forEach(f)}const z=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(s)),P=C(),x=C(!1,!0),W=C(!0),A=C(!0,!0),K={};function C(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_raw"===r&&o===(e?n.__v_readonly:n.__v_reactive))return n;const l=u(n);if(l&&c(K,r))return Reflect.get(K,r,o);const a=Reflect.get(n,r,o);return(s(r)?z.has(r):"__proto__"===r||"__v_isRef"===r)?a:(e||k(n,0,r),t?a:me(a)?l?a:a.value:i(a)?e?de(a):_e(a):a)}}["includes","indexOf","lastIndexOf"].forEach(e=>{K[e]=function(...t){const n=we(this);for(let e=0,t=this.length;e<t;e++)k(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(we)):r}});function F(e=!1){return function(t,n,r,o){const s=t[n];if(!e&&(r=we(r),!u(t)&&me(s)&&!me(r)))return s.value=r,!0;const i=c(t,n),l=Reflect.set(t,n,r,o);return t===we(o)&&(i?f(r,s)&&M(t,"set",n,r):M(t,"add",n,r)),l}}function I(e,t){const n=Reflect.has(e,t);return k(e,0,t),n}function L(e){return k(e,0,p),Reflect.ownKeys(e)}const N={get:P,set:F(),deleteProperty:function(e,t){const n=c(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&M(e,"delete",t,void 0),r},has:I,ownKeys:L},q={get:W,has:I,ownKeys:L,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},B=r({},N,{get:x,set:F(!0)}),D=r({},q,{get:A}),G=e=>i(e)?_e(e):e,H=e=>i(e)?de(e):e,J=e=>e,Q=e=>Reflect.getPrototypeOf(e);function T(e,t,n){e=we(e);const r=we(t);t!==r&&k(e,0,t),k(e,0,r);const{has:o,get:c}=Q(e);return o.call(e,t)?n(c.call(e,t)):o.call(e,r)?n(c.call(e,r)):void 0}function U(e){const t=we(this),n=we(e);e!==n&&k(t,0,e),k(t,0,n);const r=Q(t).has;return r.call(t,e)||r.call(t,n)}function V(e){return k(e=we(e),0,p),Reflect.get(Q(e),"size",e)}function X(e){e=we(e);const t=we(this),n=Q(t),r=n.has.call(t,e),o=n.add.call(t,e);return r||M(t,"add",e,e),o}function Y(e,t){t=we(t);const n=we(this),{has:r,get:o,set:c}=Q(n);let u=r.call(n,e);u||(e=we(e),u=r.call(n,e));const s=o.call(n,e),i=c.call(n,e,t);return u?f(t,s)&&M(n,"set",e,t):M(n,"add",e,t),i}function Z(e){const t=we(this),{has:n,get:r,delete:o}=Q(t);let c=n.call(t,e);c||(e=we(e),c=n.call(t,e));r&&r.call(t,e);const u=o.call(t,e);return c&&M(t,"delete",e,void 0),u}function $(){const e=we(this),t=0!==e.size,n=Q(e).clear.call(e);return t&&M(e,"clear",void 0,void 0),n}function ee(e,t){return function(n,r){const o=this,c=we(o),u=e?H:t?J:G;return!e&&k(c,0,p),Q(c).forEach.call(c,(function(e,t){return n.call(r,u(e),u(t),o)}))}}function te(e,t,n){return function(...r){const o=we(this),c=o instanceof Map,u="entries"===e||e===Symbol.iterator&&c,s="keys"===e&&c,i=Q(o)[e].apply(o,r),l=t?H:n?J:G;return!t&&k(o,0,s?g:p),{next(){const{value:e,done:t}=i.next();return t?{value:e,done:t}:{value:u?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function ne(e){return function(...t){return"delete"!==e&&this}}const re={get(e){return T(this,e,G)},get size(){return V(this)},has:U,add:X,set:Y,delete:Z,clear:$,forEach:ee(!1,!1)},oe={get(e){return T(this,e,J)},get size(){return V(this)},has:U,add:X,set:Y,delete:Z,clear:$,forEach:ee(!1,!0)},ce={get(e){return T(this,e,H)},get size(){return V(this)},has:U,add:ne("add"),set:ne("set"),delete:ne("delete"),clear:ne("clear"),forEach:ee(!0,!1)};function ue(e,t){const n=t?oe:e?ce:re;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(c(n,r)&&r in t?n:t,r,o)}["keys","values","entries",Symbol.iterator].forEach(e=>{re[e]=te(e,!1,!1),ce[e]=te(e,!0,!1),oe[e]=te(e,!1,!0)});const se={get:ue(!1,!1)},ie={get:ue(!1,!0)},le={get:ue(!0,!1)},ae=new Set([Set,Map,WeakMap,WeakSet]),fe=e("Object,Array,Map,Set,WeakMap,WeakSet");function _e(e){return e&&e.__v_isReadonly?e:pe(e,!1,N,se)}function ve(e){return pe(e,!1,B,ie)}function de(e){return pe(e,!0,q,le)}function he(e){return pe(e,!0,D,le)}function pe(e,t,n,r){if(!i(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;if(c(e,t?"__v_readonly":"__v_reactive"))return t?e.__v_readonly:e.__v_reactive;if((o=e).__v_skip||!fe(a(o))||Object.isFrozen(o))return e;var o;const u=new Proxy(e,ae.has(e.constructor)?r:n);return _(e,t?"__v_readonly":"__v_reactive",u),u}function ge(e){return ye(e)?ge(e.__v_raw):!(!e||!e.__v_isReactive)}function ye(e){return!(!e||!e.__v_isReadonly)}function Re(e){return ge(e)||ye(e)}function we(e){return e&&we(e.__v_raw)||e}function be(e){return _(e,"__v_skip",!0),e}const Se=e=>i(e)?_e(e):e;function me(e){return!!e&&!0===e.__v_isRef}function Ee(e){return je(e)}function Oe(e){return je(e,!0)}function je(e,t=!1){if(me(e))return e;let n=t?e:Se(e);const r={__v_isRef:!0,get value(){return k(r,0,"value"),n},set value(o){f(we(o),e)&&(e=o,n=t?o:Se(o),M(r,"set","value",void 0))}};return r}function ke(e){M(e,"set","value",void 0)}function Me(e){return me(e)?e.value:e}function ze(e){const{get:t,set:n}=e(()=>k(r,0,"value"),()=>M(r,"set","value")),r={__v_isRef:!0,get value(){return t()},set value(e){n(e)}};return r}function Pe(e){const t={};for(const n in e)t[n]=xe(e,n);return t}function xe(e,t){return{__v_isRef:!0,get value(){return e[t]},set value(n){e[t]=n}}}function We(e){let t,r;"function"==typeof e?(t=e,r=n):(t=e.get,r=e.set);let o,c,u=!0;const s=y(t,{lazy:!0,computed:!0,scheduler:()=>{u||(u=!0,M(c,"set","value"))}});return c={__v_isRef:!0,effect:s,get value(){return u&&(o=s(),u=!1),k(c,0,"value"),o},set value(e){r(e)}},c}export{p as ITERATE_KEY,We as computed,ze as customRef,y as effect,O as enableTracking,Re as isProxy,ge as isReactive,ye as isReadonly,me as isRef,be as markRaw,E as pauseTracking,_e as reactive,de as readonly,Ee as ref,j as resetTracking,ve as shallowReactive,he as shallowReadonly,Oe as shallowRef,R as stop,we as toRaw,xe as toRef,Pe as toRefs,k as track,M as trigger,ke as triggerRef,Me as unref}; | ||
function e(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t={},n=()=>{},r=Object.assign,o=Object.prototype.hasOwnProperty,c=(e,t)=>o.call(e,t),u=Array.isArray,i=e=>"symbol"==typeof e,s=e=>null!==e&&"object"==typeof e,l=Object.prototype.toString,a=e=>(e=>l.call(e))(e).slice(8,-1),f=(e,t)=>e!==t&&(e==e||t==t),_=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},v=new WeakMap,d=[];let h;const p=Symbol(""),g=Symbol("");function y(e,n=t){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const r=function(e,t){const n=function(...r){if(!n.active)return t.scheduler?void 0:e(...r);if(!d.includes(n)){b(n);try{return E(),d.push(n),h=n,e(...r)}finally{d.pop(),j(),h=d[d.length-1]}}};return n.id=w++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,n);return n.lazy||r(),r}function R(e){e.active&&(b(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let w=0;function b(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let S=!0;const O=[];function m(){O.push(S),S=!1}function E(){O.push(S),S=!0}function j(){const e=O.pop();S=void 0===e||e}function k(e,t,n){if(!S||void 0===h)return;let r=v.get(e);r||v.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(h)||(o.add(h),h.deps.push(o))}function M(e,t,n,r,o,c){const i=v.get(e);if(!i)return;const s=new Set,l=e=>{e&&e.forEach(e=>{e===h&&S||s.add(e)})};if("clear"===t)i.forEach(l);else if("length"===n&&u(e))i.forEach((e,t)=>{("length"===t||t>=r)&&l(e)});else{void 0!==n&&l(i.get(n));const r="add"===t||"delete"===t&&!u(e);(r||"set"===t&&e instanceof Map)&&l(i.get(u(e)?"length":p)),r&&e instanceof Map&&l(i.get(g))}s.forEach(e=>{e.options.scheduler?e.options.scheduler(e):e()})}const z=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(i)),P=C(),x=C(!1,!0),W=C(!0),A=C(!0,!0),K={};function C(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_raw"===r&&o===(e?n.__v_readonly:n.__v_reactive))return n;const l=u(n);if(l&&c(K,r))return Reflect.get(K,r,o);const a=Reflect.get(n,r,o);return(i(r)?z.has(r):"__proto__"===r||"__v_isRef"===r)?a:(e||k(n,0,r),t?a:Oe(a)?l?a:a.value:s(a)?e?de(a):_e(a):a)}}["includes","indexOf","lastIndexOf"].forEach(e=>{K[e]=function(...t){const n=we(this);for(let e=0,t=this.length;e<t;e++)k(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(we)):r}});function F(e=!1){return function(t,n,r,o){const i=t[n];if(!e&&(r=we(r),!u(t)&&Oe(i)&&!Oe(r)))return i.value=r,!0;const s=c(t,n),l=Reflect.set(t,n,r,o);return t===we(o)&&(s?f(r,i)&&M(t,"set",n,r):M(t,"add",n,r)),l}}function I(e,t){const n=Reflect.has(e,t);return k(e,0,t),n}function L(e){return k(e,0,p),Reflect.ownKeys(e)}const N={get:P,set:F(),deleteProperty:function(e,t){const n=c(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&M(e,"delete",t,void 0),r},has:I,ownKeys:L},q={get:W,has:I,ownKeys:L,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},B=r({},N,{get:x,set:F(!0)}),D=r({},q,{get:A}),G=e=>s(e)?_e(e):e,H=e=>s(e)?de(e):e,J=e=>e,Q=e=>Reflect.getPrototypeOf(e);function T(e,t,n){e=we(e);const r=we(t);t!==r&&k(e,0,t),k(e,0,r);const{has:o,get:c}=Q(e);return o.call(e,t)?n(c.call(e,t)):o.call(e,r)?n(c.call(e,r)):void 0}function U(e){const t=we(this),n=we(e);e!==n&&k(t,0,e),k(t,0,n);const r=Q(t).has;return r.call(t,e)||r.call(t,n)}function V(e){return k(e=we(e),0,p),Reflect.get(Q(e),"size",e)}function X(e){e=we(e);const t=we(this),n=Q(t),r=n.has.call(t,e),o=n.add.call(t,e);return r||M(t,"add",e,e),o}function Y(e,t){t=we(t);const n=we(this),{has:r,get:o,set:c}=Q(n);let u=r.call(n,e);u||(e=we(e),u=r.call(n,e));const i=o.call(n,e),s=c.call(n,e,t);return u?f(t,i)&&M(n,"set",e,t):M(n,"add",e,t),s}function Z(e){const t=we(this),{has:n,get:r,delete:o}=Q(t);let c=n.call(t,e);c||(e=we(e),c=n.call(t,e));r&&r.call(t,e);const u=o.call(t,e);return c&&M(t,"delete",e,void 0),u}function $(){const e=we(this),t=0!==e.size,n=Q(e).clear.call(e);return t&&M(e,"clear",void 0,void 0),n}function ee(e,t){return function(n,r){const o=this,c=we(o),u=e?H:t?J:G;return!e&&k(c,0,p),Q(c).forEach.call(c,(function(e,t){return n.call(r,u(e),u(t),o)}))}}function te(e,t,n){return function(...r){const o=we(this),c=o instanceof Map,u="entries"===e||e===Symbol.iterator&&c,i="keys"===e&&c,s=Q(o)[e].apply(o,r),l=t?H:n?J:G;return!t&&k(o,0,i?g:p),{next(){const{value:e,done:t}=s.next();return t?{value:e,done:t}:{value:u?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function ne(e){return function(...t){return"delete"!==e&&this}}const re={get(e){return T(this,e,G)},get size(){return V(this)},has:U,add:X,set:Y,delete:Z,clear:$,forEach:ee(!1,!1)},oe={get(e){return T(this,e,J)},get size(){return V(this)},has:U,add:X,set:Y,delete:Z,clear:$,forEach:ee(!1,!0)},ce={get(e){return T(this,e,H)},get size(){return V(this)},has:U,add:ne("add"),set:ne("set"),delete:ne("delete"),clear:ne("clear"),forEach:ee(!0,!1)};function ue(e,t){const n=t?oe:e?ce:re;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(c(n,r)&&r in t?n:t,r,o)}["keys","values","entries",Symbol.iterator].forEach(e=>{re[e]=te(e,!1,!1),ce[e]=te(e,!0,!1),oe[e]=te(e,!1,!0)});const ie={get:ue(!1,!1)},se={get:ue(!1,!0)},le={get:ue(!0,!1)},ae=new Set([Set,Map,WeakMap,WeakSet]),fe=e("Object,Array,Map,Set,WeakMap,WeakSet");function _e(e){return e&&e.__v_isReadonly?e:pe(e,!1,N,ie)}function ve(e){return pe(e,!1,B,se)}function de(e){return pe(e,!0,q,le)}function he(e){return pe(e,!0,D,le)}function pe(e,t,n,r){if(!s(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;if(c(e,t?"__v_readonly":"__v_reactive"))return t?e.__v_readonly:e.__v_reactive;if((o=e).__v_skip||!fe(a(o))||Object.isFrozen(o))return e;var o;const u=new Proxy(e,ae.has(e.constructor)?r:n);return _(e,t?"__v_readonly":"__v_reactive",u),u}function ge(e){return ye(e)?ge(e.__v_raw):!(!e||!e.__v_isReactive)}function ye(e){return!(!e||!e.__v_isReadonly)}function Re(e){return ge(e)||ye(e)}function we(e){return e&&we(e.__v_raw)||e}function be(e){return _(e,"__v_skip",!0),e}const Se=e=>s(e)?_e(e):e;function Oe(e){return!!e&&!0===e.__v_isRef}function me(e){return je(e)}function Ee(e){return je(e,!0)}function je(e,t=!1){if(Oe(e))return e;let n=t?e:Se(e);const r={__v_isRef:!0,get value(){return k(r,0,"value"),n},set value(o){f(we(o),e)&&(e=o,n=t?o:Se(o),M(r,"set","value",void 0))}};return r}function ke(e){M(e,"set","value",void 0)}function Me(e){return Oe(e)?e.value:e}function ze(e){const{get:t,set:n}=e(()=>k(r,0,"value"),()=>M(r,"set","value")),r={__v_isRef:!0,get value(){return t()},set value(e){n(e)}};return r}function Pe(e){const t={};for(const n in e)t[n]=xe(e,n);return t}function xe(e,t){return{__v_isRef:!0,get value(){return e[t]},set value(n){e[t]=n}}}function We(e){let t,r;"function"==typeof e?(t=e,r=n):(t=e.get,r=e.set);let o,c,u=!0;const i=y(t,{lazy:!0,scheduler:()=>{u||(u=!0,M(c,"set","value"))}});return c={__v_isRef:!0,effect:i,get value(){return u&&(o=i(),u=!1),k(c,0,"value"),o},set value(e){r(e)}},c}export{p as ITERATE_KEY,We as computed,ze as customRef,y as effect,E as enableTracking,Re as isProxy,ge as isReactive,ye as isReadonly,Oe as isRef,be as markRaw,m as pauseTracking,_e as reactive,de as readonly,me as ref,j as resetTracking,ve as shallowReactive,he as shallowReadonly,Ee as shallowRef,R as stop,we as toRaw,xe as toRef,Pe as toRefs,k as track,M as trigger,ke as triggerRef,Me as unref}; |
@@ -114,3 +114,2 @@ import { EMPTY_OBJ, isArray, isSymbol, extend, hasOwn, isObject, hasChanged, capitalize, toRawType, def, makeMap, isFunction, NOOP } from '@vue/shared'; | ||
const effects = new Set(); | ||
const computedRunners = new Set(); | ||
const add = (effectsToAdd) => { | ||
@@ -120,8 +119,3 @@ if (effectsToAdd) { | ||
if (effect !== activeEffect || !shouldTrack) { | ||
if (effect.options.computed) { | ||
computedRunners.add(effect); | ||
} | ||
else { | ||
effects.add(effect); | ||
} | ||
effects.add(effect); | ||
} | ||
@@ -178,5 +172,2 @@ }); | ||
}; | ||
// Important: computed effects must be run first so that computed getters | ||
// can be invalidated before any normal effects that depend on them are run. | ||
computedRunners.forEach(run); | ||
effects.forEach(run); | ||
@@ -748,3 +739,2 @@ } | ||
// mark effect as computed so that it gets priority during trigger | ||
computed: true, | ||
scheduler: () => { | ||
@@ -751,0 +741,0 @@ if (!dirty) { |
@@ -165,3 +165,2 @@ var VueReactivity = (function (exports) { | ||
const effects = new Set(); | ||
const computedRunners = new Set(); | ||
const add = (effectsToAdd) => { | ||
@@ -171,8 +170,3 @@ if (effectsToAdd) { | ||
if (effect !== activeEffect || !shouldTrack) { | ||
if (effect.options.computed) { | ||
computedRunners.add(effect); | ||
} | ||
else { | ||
effects.add(effect); | ||
} | ||
effects.add(effect); | ||
} | ||
@@ -229,5 +223,2 @@ }); | ||
}; | ||
// Important: computed effects must be run first so that computed getters | ||
// can be invalidated before any normal effects that depend on them are run. | ||
computedRunners.forEach(run); | ||
effects.forEach(run); | ||
@@ -797,3 +788,2 @@ } | ||
// mark effect as computed so that it gets priority during trigger | ||
computed: true, | ||
scheduler: () => { | ||
@@ -800,0 +790,0 @@ if (!dirty) { |
@@ -1,1 +0,1 @@ | ||
var VueReactivity=function(e){"use strict";function t(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n={},r=()=>{},o=Object.assign,c=Object.prototype.hasOwnProperty,i=(e,t)=>c.call(e,t),s=Array.isArray,u=e=>"symbol"==typeof e,a=e=>null!==e&&"object"==typeof e,l=Object.prototype.toString,f=e=>(e=>l.call(e))(e).slice(8,-1),_=(e,t)=>e!==t&&(e==e||t==t),v=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},d=new WeakMap,h=[];let p;const g=Symbol(""),y=Symbol("");function R(e,t=n){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const r=function(e,t){const n=function(...r){if(!n.active)return t.scheduler?void 0:e(...r);if(!h.includes(n)){b(n);try{return E(),h.push(n),p=n,e(...r)}finally{h.pop(),k(),p=h[h.length-1]}}};return n.id=w++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||r(),r}let w=0;function b(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let S=!0;const m=[];function E(){m.push(S),S=!0}function k(){const e=m.pop();S=void 0===e||e}function O(e,t,n){if(!S||void 0===p)return;let r=d.get(e);r||d.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(p)||(o.add(p),p.deps.push(o))}function j(e,t,n,r,o,c){const i=d.get(e);if(!i)return;const u=new Set,a=new Set,l=e=>{e&&e.forEach(e=>{e===p&&S||(e.options.computed?a.add(e):u.add(e))})};if("clear"===t)i.forEach(l);else if("length"===n&&s(e))i.forEach((e,t)=>{("length"===t||t>=r)&&l(e)});else{void 0!==n&&l(i.get(n));const r="add"===t||"delete"===t&&!s(e);(r||"set"===t&&e instanceof Map)&&l(i.get(s(e)?"length":g)),r&&e instanceof Map&&l(i.get(y))}const f=e=>{e.options.scheduler?e.options.scheduler(e):e()};a.forEach(f),u.forEach(f)}const M=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(u)),P=A(),z=A(!1,!0),x=A(!0),T=A(!0,!0),W={};function A(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_raw"===r&&o===(e?n.__v_readonly:n.__v_reactive))return n;const c=s(n);if(c&&i(W,r))return Reflect.get(W,r,o);const l=Reflect.get(n,r,o);return(u(r)?M.has(r):"__proto__"===r||"__v_isRef"===r)?l:(e||O(n,0,r),t?l:ye(l)?c?l:l.value:a(l)?e?_e(l):fe(l):l)}}["includes","indexOf","lastIndexOf"].forEach(e=>{W[e]=function(...t){const n=pe(this);for(let e=0,t=this.length;e<t;e++)O(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(pe)):r}});function K(e=!1){return function(t,n,r,o){const c=t[n];if(!e&&(r=pe(r),!s(t)&&ye(c)&&!ye(r)))return c.value=r,!0;const u=i(t,n),a=Reflect.set(t,n,r,o);return t===pe(o)&&(u?_(r,c)&&j(t,"set",n,r):j(t,"add",n,r)),a}}function I(e,t){const n=Reflect.has(e,t);return O(e,0,t),n}function C(e){return O(e,0,g),Reflect.ownKeys(e)}const F={get:P,set:K(),deleteProperty:function(e,t){const n=i(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&j(e,"delete",t,void 0),r},has:I,ownKeys:C},L={get:x,has:I,ownKeys:C,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},N=o({},F,{get:z,set:K(!0)}),V=o({},L,{get:T}),Y=e=>a(e)?fe(e):e,q=e=>a(e)?_e(e):e,B=e=>e,D=e=>Reflect.getPrototypeOf(e);function G(e,t,n){e=pe(e);const r=pe(t);t!==r&&O(e,0,t),O(e,0,r);const{has:o,get:c}=D(e);return o.call(e,t)?n(c.call(e,t)):o.call(e,r)?n(c.call(e,r)):void 0}function H(e){const t=pe(this),n=pe(e);e!==n&&O(t,0,e),O(t,0,n);const r=D(t).has;return r.call(t,e)||r.call(t,n)}function J(e){return O(e=pe(e),0,g),Reflect.get(D(e),"size",e)}function Q(e){e=pe(e);const t=pe(this),n=D(t),r=n.has.call(t,e),o=n.add.call(t,e);return r||j(t,"add",e,e),o}function U(e,t){t=pe(t);const n=pe(this),{has:r,get:o,set:c}=D(n);let i=r.call(n,e);i||(e=pe(e),i=r.call(n,e));const s=o.call(n,e),u=c.call(n,e,t);return i?_(t,s)&&j(n,"set",e,t):j(n,"add",e,t),u}function X(e){const t=pe(this),{has:n,get:r,delete:o}=D(t);let c=n.call(t,e);c||(e=pe(e),c=n.call(t,e));r&&r.call(t,e);const i=o.call(t,e);return c&&j(t,"delete",e,void 0),i}function Z(){const e=pe(this),t=0!==e.size,n=D(e).clear.call(e);return t&&j(e,"clear",void 0,void 0),n}function $(e,t){return function(n,r){const o=this,c=pe(o),i=e?q:t?B:Y;return!e&&O(c,0,g),D(c).forEach.call(c,(function(e,t){return n.call(r,i(e),i(t),o)}))}}function ee(e,t,n){return function(...r){const o=pe(this),c=o instanceof Map,i="entries"===e||e===Symbol.iterator&&c,s="keys"===e&&c,u=D(o)[e].apply(o,r),a=t?q:n?B:Y;return!t&&O(o,0,s?y:g),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:i?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function te(e){return function(...t){return"delete"!==e&&this}}const ne={get(e){return G(this,e,Y)},get size(){return J(this)},has:H,add:Q,set:U,delete:X,clear:Z,forEach:$(!1,!1)},re={get(e){return G(this,e,B)},get size(){return J(this)},has:H,add:Q,set:U,delete:X,clear:Z,forEach:$(!1,!0)},oe={get(e){return G(this,e,q)},get size(){return J(this)},has:H,add:te("add"),set:te("set"),delete:te("delete"),clear:te("clear"),forEach:$(!0,!1)};function ce(e,t){const n=t?re:e?oe:ne;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(i(n,r)&&r in t?n:t,r,o)}["keys","values","entries",Symbol.iterator].forEach(e=>{ne[e]=ee(e,!1,!1),oe[e]=ee(e,!0,!1),re[e]=ee(e,!1,!0)});const ie={get:ce(!1,!1)},se={get:ce(!1,!0)},ue={get:ce(!0,!1)},ae=new Set([Set,Map,WeakMap,WeakSet]),le=t("Object,Array,Map,Set,WeakMap,WeakSet");function fe(e){return e&&e.__v_isReadonly?e:ve(e,!1,F,ie)}function _e(e){return ve(e,!0,L,ue)}function ve(e,t,n,r){if(!a(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;if(i(e,t?"__v_readonly":"__v_reactive"))return t?e.__v_readonly:e.__v_reactive;if((o=e).__v_skip||!le(f(o))||Object.isFrozen(o))return e;var o;const c=new Proxy(e,ae.has(e.constructor)?r:n);return v(e,t?"__v_readonly":"__v_reactive",c),c}function de(e){return he(e)?de(e.__v_raw):!(!e||!e.__v_isReactive)}function he(e){return!(!e||!e.__v_isReadonly)}function pe(e){return e&&pe(e.__v_raw)||e}const ge=e=>a(e)?fe(e):e;function ye(e){return!!e&&!0===e.__v_isRef}function Re(e,t=!1){if(ye(e))return e;let n=t?e:ge(e);const r={__v_isRef:!0,get value(){return O(r,0,"value"),n},set value(o){_(pe(o),e)&&(e=o,n=t?o:ge(o),j(r,"set","value",void 0))}};return r}function we(e,t){return{__v_isRef:!0,get value(){return e[t]},set value(n){e[t]=n}}}return e.ITERATE_KEY=g,e.computed=function(e){let t,n;"function"==typeof e?(t=e,n=r):(t=e.get,n=e.set);let o,c,i=!0;const s=R(t,{lazy:!0,computed:!0,scheduler:()=>{i||(i=!0,j(c,"set","value"))}});return c={__v_isRef:!0,effect:s,get value(){return i&&(o=s(),i=!1),O(c,0,"value"),o},set value(e){n(e)}},c},e.customRef=function(e){const{get:t,set:n}=e(()=>O(r,0,"value"),()=>j(r,"set","value")),r={__v_isRef:!0,get value(){return t()},set value(e){n(e)}};return r},e.effect=R,e.enableTracking=E,e.isProxy=function(e){return de(e)||he(e)},e.isReactive=de,e.isReadonly=he,e.isRef=ye,e.markRaw=function(e){return v(e,"__v_skip",!0),e},e.pauseTracking=function(){m.push(S),S=!1},e.reactive=fe,e.readonly=_e,e.ref=function(e){return Re(e)},e.resetTracking=k,e.shallowReactive=function(e){return ve(e,!1,N,se)},e.shallowReadonly=function(e){return ve(e,!0,V,ue)},e.shallowRef=function(e){return Re(e,!0)},e.stop=function(e){e.active&&(b(e),e.options.onStop&&e.options.onStop(),e.active=!1)},e.toRaw=pe,e.toRef=we,e.toRefs=function(e){const t={};for(const n in e)t[n]=we(e,n);return t},e.track=O,e.trigger=j,e.triggerRef=function(e){j(e,"set","value",void 0)},e.unref=function(e){return ye(e)?e.value:e},e}({}); | ||
var VueReactivity=function(e){"use strict";function t(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n={},r=()=>{},o=Object.assign,c=Object.prototype.hasOwnProperty,i=(e,t)=>c.call(e,t),s=Array.isArray,u=e=>"symbol"==typeof e,a=e=>null!==e&&"object"==typeof e,l=Object.prototype.toString,f=e=>(e=>l.call(e))(e).slice(8,-1),_=(e,t)=>e!==t&&(e==e||t==t),v=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},d=new WeakMap,h=[];let g;const p=Symbol(""),y=Symbol("");function R(e,t=n){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const r=function(e,t){const n=function(...r){if(!n.active)return t.scheduler?void 0:e(...r);if(!h.includes(n)){b(n);try{return E(),h.push(n),g=n,e(...r)}finally{h.pop(),k(),g=h[h.length-1]}}};return n.id=w++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||r(),r}let w=0;function b(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let S=!0;const m=[];function E(){m.push(S),S=!0}function k(){const e=m.pop();S=void 0===e||e}function O(e,t,n){if(!S||void 0===g)return;let r=d.get(e);r||d.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(g)||(o.add(g),g.deps.push(o))}function j(e,t,n,r,o,c){const i=d.get(e);if(!i)return;const u=new Set,a=e=>{e&&e.forEach(e=>{e===g&&S||u.add(e)})};if("clear"===t)i.forEach(a);else if("length"===n&&s(e))i.forEach((e,t)=>{("length"===t||t>=r)&&a(e)});else{void 0!==n&&a(i.get(n));const r="add"===t||"delete"===t&&!s(e);(r||"set"===t&&e instanceof Map)&&a(i.get(s(e)?"length":p)),r&&e instanceof Map&&a(i.get(y))}u.forEach(e=>{e.options.scheduler?e.options.scheduler(e):e()})}const M=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(u)),P=A(),z=A(!1,!0),x=A(!0),T=A(!0,!0),W={};function A(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_raw"===r&&o===(e?n.__v_readonly:n.__v_reactive))return n;const c=s(n);if(c&&i(W,r))return Reflect.get(W,r,o);const l=Reflect.get(n,r,o);return(u(r)?M.has(r):"__proto__"===r||"__v_isRef"===r)?l:(e||O(n,0,r),t?l:ye(l)?c?l:l.value:a(l)?e?_e(l):fe(l):l)}}["includes","indexOf","lastIndexOf"].forEach(e=>{W[e]=function(...t){const n=ge(this);for(let e=0,t=this.length;e<t;e++)O(n,0,e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(ge)):r}});function K(e=!1){return function(t,n,r,o){const c=t[n];if(!e&&(r=ge(r),!s(t)&&ye(c)&&!ye(r)))return c.value=r,!0;const u=i(t,n),a=Reflect.set(t,n,r,o);return t===ge(o)&&(u?_(r,c)&&j(t,"set",n,r):j(t,"add",n,r)),a}}function I(e,t){const n=Reflect.has(e,t);return O(e,0,t),n}function C(e){return O(e,0,p),Reflect.ownKeys(e)}const F={get:P,set:K(),deleteProperty:function(e,t){const n=i(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&j(e,"delete",t,void 0),r},has:I,ownKeys:C},L={get:x,has:I,ownKeys:C,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},N=o({},F,{get:z,set:K(!0)}),V=o({},L,{get:T}),Y=e=>a(e)?fe(e):e,q=e=>a(e)?_e(e):e,B=e=>e,D=e=>Reflect.getPrototypeOf(e);function G(e,t,n){e=ge(e);const r=ge(t);t!==r&&O(e,0,t),O(e,0,r);const{has:o,get:c}=D(e);return o.call(e,t)?n(c.call(e,t)):o.call(e,r)?n(c.call(e,r)):void 0}function H(e){const t=ge(this),n=ge(e);e!==n&&O(t,0,e),O(t,0,n);const r=D(t).has;return r.call(t,e)||r.call(t,n)}function J(e){return O(e=ge(e),0,p),Reflect.get(D(e),"size",e)}function Q(e){e=ge(e);const t=ge(this),n=D(t),r=n.has.call(t,e),o=n.add.call(t,e);return r||j(t,"add",e,e),o}function U(e,t){t=ge(t);const n=ge(this),{has:r,get:o,set:c}=D(n);let i=r.call(n,e);i||(e=ge(e),i=r.call(n,e));const s=o.call(n,e),u=c.call(n,e,t);return i?_(t,s)&&j(n,"set",e,t):j(n,"add",e,t),u}function X(e){const t=ge(this),{has:n,get:r,delete:o}=D(t);let c=n.call(t,e);c||(e=ge(e),c=n.call(t,e));r&&r.call(t,e);const i=o.call(t,e);return c&&j(t,"delete",e,void 0),i}function Z(){const e=ge(this),t=0!==e.size,n=D(e).clear.call(e);return t&&j(e,"clear",void 0,void 0),n}function $(e,t){return function(n,r){const o=this,c=ge(o),i=e?q:t?B:Y;return!e&&O(c,0,p),D(c).forEach.call(c,(function(e,t){return n.call(r,i(e),i(t),o)}))}}function ee(e,t,n){return function(...r){const o=ge(this),c=o instanceof Map,i="entries"===e||e===Symbol.iterator&&c,s="keys"===e&&c,u=D(o)[e].apply(o,r),a=t?q:n?B:Y;return!t&&O(o,0,s?y:p),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:i?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function te(e){return function(...t){return"delete"!==e&&this}}const ne={get(e){return G(this,e,Y)},get size(){return J(this)},has:H,add:Q,set:U,delete:X,clear:Z,forEach:$(!1,!1)},re={get(e){return G(this,e,B)},get size(){return J(this)},has:H,add:Q,set:U,delete:X,clear:Z,forEach:$(!1,!0)},oe={get(e){return G(this,e,q)},get size(){return J(this)},has:H,add:te("add"),set:te("set"),delete:te("delete"),clear:te("clear"),forEach:$(!0,!1)};function ce(e,t){const n=t?re:e?oe:ne;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(i(n,r)&&r in t?n:t,r,o)}["keys","values","entries",Symbol.iterator].forEach(e=>{ne[e]=ee(e,!1,!1),oe[e]=ee(e,!0,!1),re[e]=ee(e,!1,!0)});const ie={get:ce(!1,!1)},se={get:ce(!1,!0)},ue={get:ce(!0,!1)},ae=new Set([Set,Map,WeakMap,WeakSet]),le=t("Object,Array,Map,Set,WeakMap,WeakSet");function fe(e){return e&&e.__v_isReadonly?e:ve(e,!1,F,ie)}function _e(e){return ve(e,!0,L,ue)}function ve(e,t,n,r){if(!a(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;if(i(e,t?"__v_readonly":"__v_reactive"))return t?e.__v_readonly:e.__v_reactive;if((o=e).__v_skip||!le(f(o))||Object.isFrozen(o))return e;var o;const c=new Proxy(e,ae.has(e.constructor)?r:n);return v(e,t?"__v_readonly":"__v_reactive",c),c}function de(e){return he(e)?de(e.__v_raw):!(!e||!e.__v_isReactive)}function he(e){return!(!e||!e.__v_isReadonly)}function ge(e){return e&&ge(e.__v_raw)||e}const pe=e=>a(e)?fe(e):e;function ye(e){return!!e&&!0===e.__v_isRef}function Re(e,t=!1){if(ye(e))return e;let n=t?e:pe(e);const r={__v_isRef:!0,get value(){return O(r,0,"value"),n},set value(o){_(ge(o),e)&&(e=o,n=t?o:pe(o),j(r,"set","value",void 0))}};return r}function we(e,t){return{__v_isRef:!0,get value(){return e[t]},set value(n){e[t]=n}}}return e.ITERATE_KEY=p,e.computed=function(e){let t,n;"function"==typeof e?(t=e,n=r):(t=e.get,n=e.set);let o,c,i=!0;const s=R(t,{lazy:!0,scheduler:()=>{i||(i=!0,j(c,"set","value"))}});return c={__v_isRef:!0,effect:s,get value(){return i&&(o=s(),i=!1),O(c,0,"value"),o},set value(e){n(e)}},c},e.customRef=function(e){const{get:t,set:n}=e(()=>O(r,0,"value"),()=>j(r,"set","value")),r={__v_isRef:!0,get value(){return t()},set value(e){n(e)}};return r},e.effect=R,e.enableTracking=E,e.isProxy=function(e){return de(e)||he(e)},e.isReactive=de,e.isReadonly=he,e.isRef=ye,e.markRaw=function(e){return v(e,"__v_skip",!0),e},e.pauseTracking=function(){m.push(S),S=!1},e.reactive=fe,e.readonly=_e,e.ref=function(e){return Re(e)},e.resetTracking=k,e.shallowReactive=function(e){return ve(e,!1,N,se)},e.shallowReadonly=function(e){return ve(e,!0,V,ue)},e.shallowRef=function(e){return Re(e,!0)},e.stop=function(e){e.active&&(b(e),e.options.onStop&&e.options.onStop(),e.active=!1)},e.toRaw=ge,e.toRef=we,e.toRefs=function(e){const t={};for(const n in e)t[n]=we(e,n);return t},e.track=O,e.trigger=j,e.triggerRef=function(e){j(e,"set","value",void 0)},e.unref=function(e){return ye(e)?e.value:e},e}({}); |
{ | ||
"name": "@vue/reactivity", | ||
"version": "3.0.0-beta.17", | ||
"version": "3.0.0-beta.18", | ||
"description": "@vue/reactivity", | ||
@@ -38,4 +38,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.0.0-beta.17" | ||
"@vue/shared": "3.0.0-beta.18" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157277
4144
+ Added@vue/shared@3.0.0-beta.18(transitive)
- Removed@vue/shared@3.0.0-beta.17(transitive)
Updated@vue/shared@3.0.0-beta.18