module.exports=Behavior({lifetimes:{created(){this._computedCache={},this._originalSetData=this.setData,this.setData=this._setData,this._doingSetData=!1,this._doingSetProps=!1}},definitionFilter(t){const e=t.computed||{},o=Object.keys(e),i=t.properties||{},a=Object.keys(i),s=t=>{const i={},a=t._computedCache||t.data;for(let s=0,n=o.length;s<n;s++){const n=o[s],c=e[n];if("function"==typeof c){const e=c.call(t);a[n]!==e&&(i[n]=e,a[n]=e)}}return i};(()=>{t.data=t.data||{};const e=t.data,o=Object.prototype.hasOwnProperty;a.length&&Object.keys(i).forEach((t=>{const a=i[t];let n;null===a||a===Number||a===String||a===Boolean||a===Object||a===Array?i[t]={type:a}:"object"==typeof a&&(o.call(a,"value")&&(e[t]=a.value),o.call(a,"observer")&&"function"==typeof a.observer&&(n=a.observer)),i[t].observer=function(...t){const e=this._originalSetData;if(this._doingSetProps)return void(n&&n.apply(this,t));if(this._doingSetData)return void console.warn("can't call setData in computed getter function!");this._doingSetData=!0;const o=s(this);e.call(this,o),this._doingSetData=!1,n&&n.apply(this,t)}})),s(t)})(),t.methods=t.methods||{},t.methods._setData=function(t,o){const i=this._originalSetData;if(this._doingSetData)return void console.warn("can't call setData in computed getter function!");this._doingSetData=!0;const n=Object.keys(t);for(let o=0,i=n.length;o<i;o++){const i=n[o];e[i]&&delete t[i],!this._doingSetProps&&a.indexOf(i)>=0&&(this._doingSetProps=!0)}i.call(this,t,o);const c=s(this);i.call(this,c),this._doingSetData=!1,this._doingSetProps=!1}}});