text: ;(function (window) {
    if (window.VueDemi) {
      return
    }
    var VueDemi = {}
    var Vue = window.Vue
    if (Vue) {
      if (Vue.version.slice(0, 2) === '2.') {
        var VueCompositionAPI = window.VueCompositionAPI
        if (VueCompositionAPI) {
          for (var key in VueCompositionAPI) {
            VueDemi[key] = VueCompositionAPI[key]
          }
          VueDemi.isVue2 = true
          VueDemi.isVue3 = false
          VueDemi.install = function (){}
          VueDemi.Vue = Vue
          VueDemi.Vue2 = Vue
          VueDemi.version = Vue.version
        } else {
          console.error(
            '[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.'
          )
        }
      } else if (Vue.version.slice(0, 2) === '3.') {
        for (var key in Vue) {
          VueDemi[key] = Vue[key]
        }
        VueDemi.isVue2 = false
        VueDemi.isVue3 = true
        VueDemi.install = function (){}
        VueDemi.Vue = Vue
        VueDemi.Vue2 = undefined
        VueDemi.version = Vue.version
        VueDemi.set = function(target, key, val) {
          if (Array.isArray(target)) {
            target.length = Math.max(target.length, key)
            target.splice(key, 1, val)
            return val
          }
          target[key] = val
          return val
        }
        VueDemi.del = function(target, key) {
          if (Array.isArray(target)) {
            target.splice(key, 1)
            return
          }
          delete target[key]
        }
      } else {
        console.error('[vue-demi] Vue version ' + Vue.version + ' is unsupported.')
      }
    } else {
      console.error(
        '[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.'
      )
    }
    window.VueDemi = VueDemi
  })(window)
  ;
  ;(function (exports, vueDemi) {
    'use strict';
  
    function and(...args) {
      return vueDemi.computed(() => args.every((i) => vueDemi.unref(i)));
    }
  
    function biSyncRef(a, b) {
      const flush = "sync";
      const stop1 = vueDemi.watch(a, (newValue) => {
        b.value = newValue;
      }, {
        flush,
        immediate: true
      });
      const stop2 = vueDemi.watch(b, (newValue) => {
        a.value = newValue;
      }, {
        flush,
        immediate: true
      });
      return () => {
        stop1();
        stop2();
      };
    }
  
    function controlledComputed(source, fn) {
      let v = void 0;
      let track;
      let trigger;
      const dirty = vueDemi.ref(true);
      vueDemi.watch(source, () => {
        dirty.value = true;
        trigger();
      }, { flush: "sync" });
      return vueDemi.customRef((_track, _trigger) => {
        track = _track;
        trigger = _trigger;
        return {
          get() {
            if (dirty.value) {
              v = fn();
              dirty.value = false;
            }
            track();
            return v;
          },
          set() {
          }
        };
      });
    }
  
    function __onlyVue3(name = "this function") {
      if (vueDemi.isVue3)
        return;
      throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
    }
  
    function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
      __onlyVue3();
      for (const [key, value] of Object.entries(extend)) {
        if (key === "value")
          continue;
        if (vueDemi.isRef(value) && unwrap) {
          Object.defineProperty(ref, key, {
            get() {
              return value.value;
            },
            set(v) {
              value.value = v;
            },
            enumerable
          });
        } else {
          Object.defineProperty(ref, key, { value, enumerable });
        }
      }
      return ref;
    }
  
    function controlledRef(initial, options = {}) {
      let source = initial;
      let track;
      let trigger;
      const ref = vueDemi.customRef((_track, _trigger) => {
        track = _track;
        trigger = _trigger;
        return {
          get() {
            return get();
          },
          set(v) {
            set(v);
          }
        };
      });
      function get(tracking = true) {
        if (tracking)
          track();
        return source;
      }
      function set(value, triggering = true) {
        var _a, _b;
        if (value === source)
          return;
        const old = source;
        if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
          return;
        source = value;
        (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
        if (triggering)
          trigger();
      }
      const untrackedGet = () => get(false);
      const silentSet = (v) => set(v, false);
      const peek = () => get(false);
      const lay = (v) => set(v, false);
      return extendRef(ref, {
        get,
        set,
        untrackedGet,
        silentSet,
        peek,
        lay
      }, { enumerable: true });
    }
  
    function createEventHook() {
      const fns = [];
      const off = (fn) => {
        const index = fns.indexOf(fn);
        if (index !== -1)
          fns.splice(index, 1);
      };
      const on = (fn) => {
        fns.push(fn);
        return {
          off: () => off(fn)
        };
      };
      const trigger = (param) => {
        fns.forEach((fn) => fn(param));
      };
      return {
        on,
        off,
        trigger
      };
    }
  
    function createGlobalState(stateFactory) {
      let initialized = false;
      let state;
      const scope = vueDemi.effectScope(true);
      return () => {
        if (!initialized) {
          state = scope.run(stateFactory);
          initialized = true;
        }
        return state;
      };
    }
  
    function reactify(fn) {
      return function(...args) {
        return vueDemi.computed(() => fn.apply(this, args.map((i) => vueDemi.unref(i))));
      };
    }
  
    function tryOnScopeDispose(fn) {
      if (vueDemi.getCurrentScope()) {
        vueDemi.onScopeDispose(fn);
        return true;
      }
      return false;
    }
  
    function createSharedComposable(composable) {
      let subscribers = 0;
      let state;
      let scope;
      const dispose = () => {
        subscribers -= 1;
        if (scope && subscribers <= 0) {
          scope.stop();
          state = void 0;
          scope = void 0;
        }
      };
      return (...args) => {
        subscribers += 1;
        if (!state) {
          scope = vueDemi.effectScope(true);
          state = scope.run(() => composable(...args));
        }
        tryOnScopeDispose(dispose);
        return state;
      };
    }
  
    const isClient = typeof window !== "undefined";
    const isDef = (val) => typeof val !== "undefined";
    const assert = (condition, ...infos) => {
      if (!condition)
        console.warn(...infos);
    };
    const toString = Object.prototype.toString;
    const isBoolean = (val) => typeof val === "boolean";
    const isFunction = (val) => typeof val === "function";
    const isNumber = (val) => typeof val === "number";
    const isString = (val) => typeof val === "string";
    const isObject = (val) => toString.call(val) === "[object Object]";
    const isWindow = (val) => typeof window !== "undefined" && toString.call(val) === "[object Window]";
    const now = () => Date.now();
    const timestamp = () => +Date.now();
    const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
    const noop = () => {
    };
    const rand = (min, max) => {
      min = Math.ceil(min);
      max = Math.floor(max);
      return Math.floor(Math.random() * (max - min + 1)) + min;
    };
  
    function createFilterWrapper(filter, fn) {
      function wrapper(...args) {
        filter(() => fn.apply(this, args), { fn, thisArg: this, args });
      }
      return wrapper;
    }
    const bypassFilter = (invoke) => {
      return invoke();
    };
    function debounceFilter(ms, options = {}) {
      let timer;
      let maxTimer;
      const filter = (invoke) => {
        const duration = vueDemi.unref(ms);
        const maxDuration = vueDemi.unref(options.maxWait);
        if (timer)
          clearTimeout(timer);
        if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
          if (maxTimer) {
            clearTimeout(maxTimer);
            maxTimer = null;
          }
          return invoke();
        }
        if (maxDuration && !maxTimer) {
          maxTimer = setTimeout(() => {
            if (timer)
              clearTimeout(timer);
            maxTimer = null;
            invoke();
          }, maxDuration);
        }
        timer = setTimeout(() => {
          if (maxTimer)
            clearTimeout(maxTimer);
          maxTimer = null;
          invoke();
        }, duration);
      };
      return filter;
    }
    function throttleFilter(ms, trailing = true, leading = true) {
      let lastExec = 0;
      let timer;
      let preventLeading = !leading;
      const clear = () => {
        if (timer) {
          clearTimeout(timer);
          timer = void 0;
        }
      };
      const filter = (invoke) => {
        const duration = vueDemi.unref(ms);
        const elapsed = Date.now() - lastExec;
        clear();
        if (duration <= 0) {
          lastExec = Date.now();
          return invoke();
        }
        if (elapsed > duration) {
          lastExec = Date.now();
          if (preventLeading)
            preventLeading = false;
          else
            invoke();
        }
        if (trailing) {
          timer = setTimeout(() => {
            lastExec = Date.now();
            if (!leading)
              preventLeading = true;
            clear();
            invoke();
          }, duration);
        }
        if (!leading && !timer)
          timer = setTimeout(() => preventLeading = true, duration);
      };
      return filter;
    }
    function pausableFilter(extendFilter = bypassFilter) {
      const isActive = vueDemi.ref(true);
      function pause() {
        isActive.value = false;
      }
      function resume() {
        isActive.value = true;
      }
      const eventFilter = (...args) => {
        if (isActive.value)
          extendFilter(...args);
      };
      return { isActive, pause, resume, eventFilter };
    }
  
    function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
      return new Promise((resolve, reject) => {
        if (throwOnTimeout)
          setTimeout(() => reject(reason), ms);
        else
          setTimeout(resolve, ms);
      });
    }
    function identity(arg) {
      return arg;
    }
    function createSingletonPromise(fn) {
      let _promise;
      function wrapper() {
        if (!_promise)
          _promise = fn();
        return _promise;
      }
      wrapper.reset = async () => {
        const _prev = _promise;
        _promise = void 0;
        if (_prev)
          await _prev;
      };
      return wrapper;
    }
    function invoke(fn) {
      return fn();
    }
    function containsProp(obj, ...props) {
      return props.some((k) => k in obj);
    }
    function increaseWithUnit(target, delta) {
      var _a;
      if (typeof target === "number")
        return target + delta;
      const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
      const unit = target.slice(value.length);
      const result = parseFloat(value) + delta;
      if (Number.isNaN(result))
        return target;
      return result + unit;
    }
    function objectPick(obj, keys, omitUndefined = false) {
      return keys.reduce((n, k) => {
        if (k in obj) {
          if (!omitUndefined || !obj[k] === void 0)
            n[k] = obj[k];
        }
        return n;
      }, {});
    }
  
    function useDebounceFn(fn, ms = 200, options = {}) {
      return createFilterWrapper(debounceFilter(ms, options), fn);
    }
  
    function useDebounce(value, ms = 200, options = {}) {
      if (ms <= 0)
        return value;
      const debounced = vueDemi.ref(value.value);
      const updater = useDebounceFn(() => {
        debounced.value = value.value;
      }, ms, options);
      vueDemi.watch(value, () => updater());
      return debounced;
    }
  
    var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
    var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
    var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
    var __objRest$5 = (source, exclude) => {
      var target = {};
      for (var prop in source)
        if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
          target[prop] = source[prop];
      if (source != null && __getOwnPropSymbols$9)
        for (var prop of __getOwnPropSymbols$9(source)) {
          if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
            target[prop] = source[prop];
        }
      return target;
    };
    function watchWithFilter(source, cb, options = {}) {
      const _a = options, {
        eventFilter = bypassFilter
      } = _a, watchOptions = __objRest$5(_a, [
        "eventFilter"
      ]);
      return vueDemi.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
    }
  
    var __defProp$7 = Object.defineProperty;
    var __defProps$4 = Object.defineProperties;
    var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
    var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
    var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
    var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$7 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$8.call(b, prop))
          __defNormalProp$7(a, prop, b[prop]);
      if (__getOwnPropSymbols$8)
        for (var prop of __getOwnPropSymbols$8(b)) {
          if (__propIsEnum$8.call(b, prop))
            __defNormalProp$7(a, prop, b[prop]);
        }
      return a;
    };
    var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
    var __objRest$4 = (source, exclude) => {
      var target = {};
      for (var prop in source)
        if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
          target[prop] = source[prop];
      if (source != null && __getOwnPropSymbols$8)
        for (var prop of __getOwnPropSymbols$8(source)) {
          if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
            target[prop] = source[prop];
        }
      return target;
    };
    function debouncedWatch(source, cb, options = {}) {
      const _a = options, {
        debounce = 0
      } = _a, watchOptions = __objRest$4(_a, [
        "debounce"
      ]);
      return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$7({}, watchOptions), {
        eventFilter: debounceFilter(debounce)
      }));
    }
  
    function eagerComputed(fn) {
      const result = vueDemi.shallowRef();
      vueDemi.watchSyncEffect(() => {
        result.value = fn();
      });
      return vueDemi.readonly(result);
    }
  
    function get(obj, key) {
      if (key == null)
        return vueDemi.unref(obj);
      return vueDemi.unref(obj)[key];
    }
  
    var __defProp$6 = Object.defineProperty;
    var __defProps$3 = Object.defineProperties;
    var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
    var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
    var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
    var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$6 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$7.call(b, prop))
          __defNormalProp$6(a, prop, b[prop]);
      if (__getOwnPropSymbols$7)
        for (var prop of __getOwnPropSymbols$7(b)) {
          if (__propIsEnum$7.call(b, prop))
            __defNormalProp$6(a, prop, b[prop]);
        }
      return a;
    };
    var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
    var __objRest$3 = (source, exclude) => {
      var target = {};
      for (var prop in source)
        if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
          target[prop] = source[prop];
      if (source != null && __getOwnPropSymbols$7)
        for (var prop of __getOwnPropSymbols$7(source)) {
          if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
            target[prop] = source[prop];
        }
      return target;
    };
    function ignorableWatch(source, cb, options = {}) {
      const _a = options, {
        eventFilter = bypassFilter
      } = _a, watchOptions = __objRest$3(_a, [
        "eventFilter"
      ]);
      const filteredCb = createFilterWrapper(eventFilter, cb);
      let ignoreUpdates;
      let ignorePrevAsyncUpdates;
      let stop;
      if (watchOptions.flush === "sync") {
        const ignore = vueDemi.ref(false);
        ignorePrevAsyncUpdates = () => {
        };
        ignoreUpdates = (updater) => {
          ignore.value = true;
          updater();
          ignore.value = false;
        };
        stop = vueDemi.watch(source, (...args) => {
          if (!ignore.value)
            filteredCb(...args);
        }, watchOptions);
      } else {
        const disposables = [];
        const ignoreCounter = vueDemi.ref(0);
        const syncCounter = vueDemi.ref(0);
        ignorePrevAsyncUpdates = () => {
          ignoreCounter.value = syncCounter.value;
        };
        disposables.push(vueDemi.watch(source, () => {
          syncCounter.value++;
        }, __spreadProps$3(__spreadValues$6({}, watchOptions), { flush: "sync" })));
        ignoreUpdates = (updater) => {
          const syncCounterPrev = syncCounter.value;
          updater();
          ignoreCounter.value += syncCounter.value - syncCounterPrev;
        };
        disposables.push(vueDemi.watch(source, (...args) => {
          const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;
          ignoreCounter.value = 0;
          syncCounter.value = 0;
          if (ignore)
            return;
          filteredCb(...args);
        }, watchOptions));
        stop = () => {
          disposables.forEach((fn) => fn());
        };
      }
      return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
    }
  
    function isDefined(v) {
      return vueDemi.unref(v) != null;
    }
  
    var __defProp$5 = Object.defineProperty;
    var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
    var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
    var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$5 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$6.call(b, prop))
          __defNormalProp$5(a, prop, b[prop]);
      if (__getOwnPropSymbols$6)
        for (var prop of __getOwnPropSymbols$6(b)) {
          if (__propIsEnum$6.call(b, prop))
            __defNormalProp$5(a, prop, b[prop]);
        }
      return a;
    };
    function makeDestructurable(obj, arr) {
      if (typeof Symbol !== "undefined") {
        const clone = __spreadValues$5({}, obj);
        Object.defineProperty(clone, Symbol.iterator, {
          enumerable: false,
          value() {
            let index = 0;
            return {
              next: () => ({
                value: arr[index++],
                done: index > arr.length
              })
            };
          }
        });
        return clone;
      } else {
        return Object.assign([...arr], obj);
      }
    }
  
    function not(v) {
      return vueDemi.computed(() => !vueDemi.unref(v));
    }
  
    function or(...args) {
      return vueDemi.computed(() => args.some((i) => vueDemi.unref(i)));
    }
  
    var __defProp$4 = Object.defineProperty;
    var __defProps$2 = Object.defineProperties;
    var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
    var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
    var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
    var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$4 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$5.call(b, prop))
          __defNormalProp$4(a, prop, b[prop]);
      if (__getOwnPropSymbols$5)
        for (var prop of __getOwnPropSymbols$5(b)) {
          if (__propIsEnum$5.call(b, prop))
            __defNormalProp$4(a, prop, b[prop]);
        }
      return a;
    };
    var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
    var __objRest$2 = (source, exclude) => {
      var target = {};
      for (var prop in source)
        if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
          target[prop] = source[prop];
      if (source != null && __getOwnPropSymbols$5)
        for (var prop of __getOwnPropSymbols$5(source)) {
          if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
            target[prop] = source[prop];
        }
      return target;
    };
    function pausableWatch(source, cb, options = {}) {
      const _a = options, {
        eventFilter: filter
      } = _a, watchOptions = __objRest$2(_a, [
        "eventFilter"
      ]);
      const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
      const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$4({}, watchOptions), {
        eventFilter
      }));
      return { stop, pause, resume, isActive };
    }
  
    function reactifyObject(obj, optionsOrKeys = {}) {
      let keys = [];
      if (Array.isArray(optionsOrKeys)) {
        keys = optionsOrKeys;
      } else {
        const { includeOwnProperties = true } = optionsOrKeys;
        keys.push(...Object.keys(obj));
        if (includeOwnProperties)
          keys.push(...Object.getOwnPropertyNames(obj));
      }
      return Object.fromEntries(keys.map((key) => {
        const value = obj[key];
        return [
          key,
          typeof value === "function" ? reactify(value.bind(obj)) : value
        ];
      }));
    }
  
    function reactivePick(obj, ...keys) {
      return vueDemi.reactive(Object.fromEntries(keys.map((k) => [k, vueDemi.toRef(obj, k)])));
    }
  
    function refDefault(source, defaultValue) {
      return vueDemi.computed({
        get() {
          var _a;
          return (_a = source.value) != null ? _a : defaultValue;
        },
        set(value) {
          source.value = value;
        }
      });
    }
  
    function set(...args) {
      if (args.length === 2) {
        const [ref, value] = args;
        ref.value = value;
      }
      if (args.length === 3) {
        if (vueDemi.isVue2) {
          vueDemi.set(...args);
        } else {
          const [target, key, value] = args;
          target[key] = value;
        }
      }
    }
  
    function syncRef(source, targets, {
      flush = "sync",
      deep = false,
      immediate = true
    } = {}) {
      if (!Array.isArray(targets))
        targets = [targets];
      return vueDemi.watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });
    }
  
    function useThrottleFn(fn, ms = 200, trailing = true, leading = true) {
      return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
    }
  
    function useThrottle(value, delay = 200, trailing = true, leading = true) {
      if (delay <= 0)
        return value;
      const throttled = vueDemi.ref(value.value);
      const updater = useThrottleFn(() => {
        throttled.value = value.value;
      }, delay, trailing, leading);
      vueDemi.watch(value, () => updater());
      return throttled;
    }
  
    var __defProp$3 = Object.defineProperty;
    var __defProps$1 = Object.defineProperties;
    var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
    var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
    var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
    var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$3 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$4.call(b, prop))
          __defNormalProp$3(a, prop, b[prop]);
      if (__getOwnPropSymbols$4)
        for (var prop of __getOwnPropSymbols$4(b)) {
          if (__propIsEnum$4.call(b, prop))
            __defNormalProp$3(a, prop, b[prop]);
        }
      return a;
    };
    var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
    var __objRest$1 = (source, exclude) => {
      var target = {};
      for (var prop in source)
        if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
          target[prop] = source[prop];
      if (source != null && __getOwnPropSymbols$4)
        for (var prop of __getOwnPropSymbols$4(source)) {
          if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
            target[prop] = source[prop];
        }
      return target;
    };
    function throttledWatch(source, cb, options = {}) {
      const _a = options, {
        throttle = 0,
        trailing = true,
        leading = true
      } = _a, watchOptions = __objRest$1(_a, [
        "throttle",
        "trailing",
        "leading"
      ]);
      return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$3({}, watchOptions), {
        eventFilter: throttleFilter(throttle, trailing, leading)
      }));
    }
  
    function toReactive(objectRef) {
      if (!vueDemi.isRef(objectRef))
        return vueDemi.reactive(objectRef);
      const proxy = new Proxy({}, {
        get(_, p, receiver) {
          return Reflect.get(objectRef.value, p, receiver);
        },
        set(_, p, value) {
          objectRef.value[p] = value;
          return true;
        },
        deleteProperty(_, p) {
          return Reflect.deleteProperty(objectRef.value, p);
        },
        has(_, p) {
          return Reflect.has(objectRef.value, p);
        },
        ownKeys() {
          return Object.keys(objectRef.value);
        },
        getOwnPropertyDescriptor() {
          return {
            enumerable: true,
            configurable: true
          };
        }
      });
      return vueDemi.reactive(proxy);
    }
  
    var __defProp$2 = Object.defineProperty;
    var __defProps = Object.defineProperties;
    var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
    var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
    var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
    var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$2 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$3.call(b, prop))
          __defNormalProp$2(a, prop, b[prop]);
      if (__getOwnPropSymbols$3)
        for (var prop of __getOwnPropSymbols$3(b)) {
          if (__propIsEnum$3.call(b, prop))
            __defNormalProp$2(a, prop, b[prop]);
        }
      return a;
    };
    var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
    function toRefs(objectRef) {
      if (!vueDemi.isRef(objectRef))
        return vueDemi.toRefs(objectRef);
      const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};
      for (const key in objectRef.value) {
        result[key] = vueDemi.customRef(() => ({
          get() {
            return objectRef.value[key];
          },
          set(v) {
            if (Array.isArray(objectRef.value)) {
              const copy = [...objectRef.value];
              copy[key] = v;
              objectRef.value = copy;
            } else {
              objectRef.value = __spreadProps(__spreadValues$2({}, objectRef.value), { [key]: v });
            }
          }
        }));
      }
      return result;
    }
  
    function tryOnBeforeUnmount(fn) {
      if (vueDemi.getCurrentInstance())
        vueDemi.onBeforeUnmount(fn);
    }
  
    function tryOnMounted(fn, sync = true) {
      if (vueDemi.getCurrentInstance())
        vueDemi.onMounted(fn);
      else if (sync)
        fn();
      else
        vueDemi.nextTick(fn);
    }
  
    function tryOnUnmounted(fn) {
      if (vueDemi.getCurrentInstance())
        vueDemi.onUnmounted(fn);
    }
  
    function until(r) {
      let isNot = false;
      function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
        let stop = null;
        const watcher = new Promise((resolve) => {
          stop = vueDemi.watch(r, (v) => {
            if (condition(v) === !isNot) {
              stop == null ? void 0 : stop();
              resolve();
            }
          }, {
            flush,
            deep,
            immediate: true
          });
        });
        const promises = [watcher];
        if (timeout) {
          promises.push(promiseTimeout(timeout, throwOnTimeout).finally(() => {
            stop == null ? void 0 : stop();
          }));
        }
        return Promise.race(promises);
      }
      function toBe(value, options) {
        return toMatch((v) => v === vueDemi.unref(value), options);
      }
      function toBeTruthy(options) {
        return toMatch((v) => Boolean(v), options);
      }
      function toBeNull(options) {
        return toBe(null, options);
      }
      function toBeUndefined(options) {
        return toBe(void 0, options);
      }
      function toBeNaN(options) {
        return toMatch(Number.isNaN, options);
      }
      function toContains(value, options) {
        return toMatch((v) => {
          const array = Array.from(v);
          return array.includes(value) || array.includes(vueDemi.unref(value));
        }, options);
      }
      function changed(options) {
        return changedTimes(1, options);
      }
      function changedTimes(n = 1, options) {
        let count = -1;
        return toMatch(() => {
          count += 1;
          return count >= n;
        }, options);
      }
      if (Array.isArray(vueDemi.unref(r))) {
        const instance = {
          toMatch,
          toContains,
          changed,
          changedTimes,
          get not() {
            isNot = !isNot;
            return this;
          }
        };
        return instance;
      } else {
        const instance = {
          toMatch,
          toBe,
          toBeTruthy,
          toBeNull,
          toBeNaN,
          toBeUndefined,
          changed,
          changedTimes,
          get not() {
            isNot = !isNot;
            return this;
          }
        };
        return instance;
      }
    }
  
    function useCounter(initialValue = 0, options = {}) {
      const count = vueDemi.ref(initialValue);
      const {
        max = Infinity,
        min = -Infinity
      } = options;
      const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);
      const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);
      const get = () => count.value;
      const set = (val) => count.value = val;
      const reset = (val = initialValue) => {
        initialValue = val;
        return set(val);
      };
      return { count, inc, dec, get, set, reset };
    }
  
    function useIntervalFn(cb, interval = 1e3, options = {}) {
      const {
        immediate = true,
        immediateCallback = false
      } = options;
      let timer = null;
      const isActive = vueDemi.ref(false);
      function clean() {
        if (timer) {
          clearInterval(timer);
          timer = null;
        }
      }
      function pause() {
        isActive.value = false;
        clean();
      }
      function resume() {
        if (interval <= 0)
          return;
        isActive.value = true;
        if (immediateCallback)
          cb();
        clean();
        timer = setInterval(cb, interval);
      }
      if (immediate && isClient)
        resume();
      tryOnScopeDispose(pause);
      return {
        isActive,
        pause,
        resume
      };
    }
  
    var __defProp$1 = Object.defineProperty;
    var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
    var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
    var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues$1 = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$2.call(b, prop))
          __defNormalProp$1(a, prop, b[prop]);
      if (__getOwnPropSymbols$2)
        for (var prop of __getOwnPropSymbols$2(b)) {
          if (__propIsEnum$2.call(b, prop))
            __defNormalProp$1(a, prop, b[prop]);
        }
      return a;
    };
    function useInterval(interval = 1e3, options = {}) {
      const {
        controls: exposeControls = false,
        immediate = true
      } = options;
      const counter = vueDemi.ref(0);
      const controls = useIntervalFn(() => counter.value += 1, interval, { immediate });
      if (exposeControls) {
        return __spreadValues$1({
          counter
        }, controls);
      } else {
        return counter;
      }
    }
  
    function useLastChanged(source, options = {}) {
      var _a;
      const ms = vueDemi.ref((_a = options.initialValue) != null ? _a : null);
      vueDemi.watch(source, () => ms.value = timestamp(), options);
      return ms;
    }
  
    function useTimeoutFn(cb, interval, options = {}) {
      const {
        immediate = true
      } = options;
      const isPending = vueDemi.ref(false);
      let timer = null;
      function clear() {
        if (timer) {
          clearTimeout(timer);
          timer = null;
        }
      }
      function stop() {
        isPending.value = false;
        clear();
      }
      function start(...args) {
        clear();
        isPending.value = true;
        timer = setTimeout(() => {
          isPending.value = false;
          timer = null;
          cb(...args);
        }, vueDemi.unref(interval));
      }
      if (immediate) {
        isPending.value = true;
        if (isClient)
          start();
      }
      tryOnScopeDispose(stop);
      return {
        isPending,
        start,
        stop
      };
    }
  
    var __defProp = Object.defineProperty;
    var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
    var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
    var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
    var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
    var __spreadValues = (a, b) => {
      for (var prop in b || (b = {}))
        if (__hasOwnProp$1.call(b, prop))
          __defNormalProp(a, prop, b[prop]);
      if (__getOwnPropSymbols$1)
        for (var prop of __getOwnPropSymbols$1(b)) {
          if (__propIsEnum$1.call(b, prop))
            __defNormalProp(a, prop, b[prop]);
        }
      return a;
    };
    function useTimeout(interval = 1e3, options = {}) {
      const {
        controls: exposeControls = false
      } = options;
      const controls = useTimeoutFn(noop, interval, options);
      const ready = vueDemi.computed(() => !controls.isPending.value);
      if (exposeControls) {
        return __spreadValues({
          ready
        }, controls);
      } else {
        return ready;
      }
    }
  
    function useToggle(initialValue = false) {
      if (vueDemi.isRef(initialValue)) {
        return (value) => {
          initialValue.value = typeof value === "boolean" ? value : !initialValue.value;
        };
      } else {
        const boolean = vueDemi.ref(initialValue);
        const toggle = (value) => {
          boolean.value = typeof value === "boolean" ? value : !boolean.value;
        };
        return [boolean, toggle];
      }
    }
  
    var __getOwnPropSymbols = Object.getOwnPropertySymbols;
    var __hasOwnProp = Object.prototype.hasOwnProperty;
    var __propIsEnum = Object.prototype.propertyIsEnumerable;
    var __objRest = (source, exclude) => {
      var target = {};
      for (var prop in source)
        if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
          target[prop] = source[prop];
      if (source != null && __getOwnPropSymbols)
        for (var prop of __getOwnPropSymbols(source)) {
          if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
            target[prop] = source[prop];
        }
      return target;
    };
    function watchAtMost(source, cb, options) {
      const _a = options, {
        count
      } = _a, watchOptions = __objRest(_a, [
        "count"
      ]);
      const current = vueDemi.ref(0);
      const stop = watchWithFilter(source, (...args) => {
        current.value += 1;
        if (current.value >= vueDemi.unref(count))
          stop();
        cb(...args);
      }, watchOptions);
      return { count: current, stop };
    }
  
    function watchOnce(source, cb, options) {
      const stop = vueDemi.watch(source, (...args) => {
        stop();
        return cb(...args);
      }, options);
    }
  
    function whenever(source, cb, options) {
      return vueDemi.watch(source, (v, ov, onInvalidate) => {
        if (v)
          cb(v, ov, onInvalidate);
      }, options);
    }
  
    exports.and = and;
    exports.assert = assert;
    exports.biSyncRef = biSyncRef;
    exports.bypassFilter = bypassFilter;
    exports.clamp = clamp;
    exports.containsProp = containsProp;
    exports.controlledComputed = controlledComputed;
    exports.controlledRef = controlledRef;
    exports.createEventHook = createEventHook;
    exports.createFilterWrapper = createFilterWrapper;
    exports.createGlobalState = createGlobalState;
    exports.createReactiveFn = reactify;
    exports.createSharedComposable = createSharedComposable;
    exports.createSingletonPromise = createSingletonPromise;
    exports.debounceFilter = debounceFilter;
    exports.debouncedRef = useDebounce;
    exports.debouncedWatch = debouncedWatch;
    exports.eagerComputed = eagerComputed;
    exports.extendRef = extendRef;
    exports.get = get;
    exports.identity = identity;
    exports.ignorableWatch = ignorableWatch;
    exports.increaseWithUnit = increaseWithUnit;
    exports.invoke = invoke;
    exports.isBoolean = isBoolean;
    exports.isClient = isClient;
    exports.isDef = isDef;
    exports.isDefined = isDefined;
    exports.isFunction = isFunction;
    exports.isNumber = isNumber;
    exports.isObject = isObject;
    exports.isString = isString;
    exports.isWindow = isWindow;
    exports.makeDestructurable = makeDestructurable;
    exports.noop = noop;
    exports.not = not;
    exports.now = now;
    exports.objectPick = objectPick;
    exports.or = or;
    exports.pausableFilter = pausableFilter;
    exports.pausableWatch = pausableWatch;
    exports.promiseTimeout = promiseTimeout;
    exports.rand = rand;
    exports.reactify = reactify;
    exports.reactifyObject = reactifyObject;
    exports.reactivePick = reactivePick;
    exports.refDefault = refDefault;
    exports.set = set;
    exports.syncRef = syncRef;
    exports.throttleFilter = throttleFilter;
    exports.throttledRef = useThrottle;
    exports.throttledWatch = throttledWatch;
    exports.timestamp = timestamp;
    exports.toReactive = toReactive;
    exports.toRefs = toRefs;
    exports.tryOnBeforeUnmount = tryOnBeforeUnmount;
    exports.tryOnMounted = tryOnMounted;
    exports.tryOnScopeDispose = tryOnScopeDispose;
    exports.tryOnUnmounted = tryOnUnmounted;
    exports.until = until;
    exports.useCounter = useCounter;
    exports.useDebounce = useDebounce;
    exports.useDebounceFn = useDebounceFn;
    exports.useInterval = useInterval;
    exports.useIntervalFn = useIntervalFn;
    exports.useLastChanged = useLastChanged;
    exports.useThrottle = useThrottle;
    exports.useThrottleFn = useThrottleFn;
    exports.useTimeout = useTimeout;
    exports.useTimeoutFn = useTimeoutFn;
    exports.useToggle = useToggle;
    exports.watchAtMost = watchAtMost;
    exports.watchOnce = watchOnce;
    exports.watchWithFilter = watchWithFilter;
    exports.whenever = whenever;
  
    Object.defineProperty(exports, '__esModule', { value: true });
  
  })(this.VueUse = this.VueUse || {}, VueDemi);
  