"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),f=require("../../../_util/raf.js");function c(a){const e=l.shallowRef(),u=l.shallowRef(!1);function n(...o){u.value||(f.default.cancel(e.value),e.value=f.default(()=>{a(...o)}))}return l.onBeforeUnmount(()=>{u.value=!0,f.default.cancel(e.value)}),n}function s(a){const e=l.shallowRef([]),u=l.shallowRef(typeof a=="function"?a():a),n=c(()=>{let t=u.value;e.value.forEach(r=>{t=r(t)}),e.value=[],u.value=t});function o(t){e.value.push(t),n()}return[u,o]}exports.useRafState=s;
