You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
19 KiB
6 lines
19 KiB
1 month ago
|
/**
|
||
|
* @vue/reactivity v3.5.5
|
||
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
|
* @license MIT
|
||
|
**/var VueReactivity=function(e){"use strict";let t,i,s,r;let n={},l=()=>{},a=Object.assign,o=(e,t)=>{let i=e.indexOf(t);i>-1&&e.splice(i,1)},u=Object.prototype.hasOwnProperty,c=(e,t)=>u.call(e,t),f=Array.isArray,h=e=>"[object Map]"===R(e),p=e=>"[object Set]"===R(e),d=e=>"function"==typeof e,_=e=>"string"==typeof e,v=e=>"symbol"==typeof e,g=e=>null!==e&&"object"==typeof e,y=Object.prototype.toString,R=e=>y.call(e),b=e=>R(e).slice(8,-1),w=e=>"[object Object]"===R(e),S=e=>_(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,E=(e,t)=>!Object.is(e,t),x=(e,t,i,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:i})};class T{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let i=t;try{return t=this,e()}finally{t=i}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}let m=/* @__PURE__ */new WeakSet;class A{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.nextEffect=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,m.has(this)&&(m.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||(this.flags|=8,this.nextEffect=s,s=this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,K(this),O(this);let e=i,t=P;i=this,P=!0;try{return this.fn()}finally{I(this),i=e,P=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)C(e);this.deps=this.depsTail=void 0,K(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?m.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){L(this)&&this.run()}get dirty(){return L(this)}}let k=0;function D(){let e;if(!(--k>0)){for(;s;){let t=s;for(s=void 0;t;){let i=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=i}}if(e)throw e}}function O(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function I(e){let t;let i=e.depsTail,s=i;for(;s;){let e=s.prevDep;-1===s.version?(s===i&&(i=e),C(s),function(e){let{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=e}e.deps=t,e.depsTail=i}function L(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&j(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function j(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===M))return;e.globalVersion=M;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!L(e)){e.flags&=-3;return}let s=i,r=P;i=e,P=!0;try{O(e);let i=e.fn(e._value);(0===t.version||E(i,e._value))&&(e._value=i,t.version++)}catch(e){throw t.version++,e}finally{i=s,P=r,I(e),e.flags&=-3}}function C(e){let{dep:t,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),t.subs===e&&(t.subs=i),!t.subs&&t.computed){t.computed.flags&=-5;for(let e=t.computed.deps;e;e=e.nextDep)C(e)}}let P=!0,W=[];function N(){W.push(P),P=!1}function V(){let e=W.pop();P=void 0===e||e}function K(e){let{cleanup:t}=e;if(e
|