text: var augmentor = (function (exports) {
    'use strict';
  
    var compat = typeof cancelAnimationFrame === 'function';
    var cAF = compat ? cancelAnimationFrame : clearTimeout;
    var rAF = compat ? requestAnimationFrame : setTimeout;
    function reraf(limit) {
      var force, timer, callback, self, args;
      reset();
      return function reschedule(_callback, _self, _args) {
        callback = _callback;
        self = _self;
        args = _args;
        if (!timer) timer = rAF(invoke);
        if (--force < 0) stop(true);
        return stop;
      };
  
      function invoke() {
        reset();
        callback.apply(self, args || []);
      }
  
      function reset() {
        force = limit || Infinity;
        timer = compat ? 0 : null;
      }
  
      function stop(flush) {
        var didStop = !!timer;
  
        if (didStop) {
          cAF(timer);
          if (flush) invoke();
        }
  
        return didStop;
      }
    }
  
    var umap = (function (_) {
      return {
        // About: get: _.get.bind(_)
        // It looks like WebKit/Safari didn't optimize bind at all,
        // so that using bind slows it down by 60%.
        // Firefox and Chrome are just fine in both cases,
        // so let's use the approach that works fast everywhere 👍
        get: function get(key) {
          return _.get(key);
        },
        set: function set(key, value) {
          return _.set(key, value), value;
        }
      };
    });
  
    /*! (c) Andrea Giammarchi - ISC */
    var state = null; // main exports
  
    var augmentor = function augmentor(fn) {
      var stack = [];
      return function hook() {
        var prev = state;
        var after = [];
        state = {
          hook: hook,
          args: arguments,
          stack: stack,
          i: 0,
          length: stack.length,
          after: after
        };
  
        try {
          return fn.apply(null, arguments);
        } finally {
          state = prev;
  
          for (var i = 0, length = after.length; i < length; i++) {
            after[i]();
          }
        }
      };
    };
    var contextual = function contextual(fn) {
      var check = true;
      var context = null;
      var augmented = augmentor(function () {
        return fn.apply(context, arguments);
      });
      return function hook() {
        var result = augmented.apply(context = this, arguments); // perform hasEffect check only once
  
        if (check) {
          check = !check; // and copy same Array if any FX was used
  
          if (hasEffect(augmented)) effects.set(hook, effects.get(augmented));
        }
  
        return result;
      };
    }; // useReducer
  
    var updates = umap(new WeakMap());
  
    var hookdate = function hookdate(hook, ctx, args) {
      hook.apply(ctx, args);
    };
  
    var defaults = {
      async: false,
      always: false
    };
  
    var getValue = function getValue(value, f) {
      return typeof f == 'function' ? f(value) : f;
    };
  
    var useReducer = function useReducer(reducer, value, init, options) {
      var i = state.i++;
      var _state = state,
          hook = _state.hook,
          args = _state.args,
          stack = _state.stack,
          length = _state.length;
      if (i === length) state.length = stack.push({});
      var ref = stack[i];
      ref.args = args;
  
      if (i === length) {
        var fn = typeof init === 'function';
  
        var _ref = (fn ? options : init) || options || defaults,
            asy = _ref.async,
            always = _ref.always;
  
        ref.$ = fn ? init(value) : getValue(void 0, value);
        ref._ = asy ? updates.get(hook) || updates.set(hook, reraf()) : hookdate;
  
        ref.f = function (value) {
          var $value = reducer(ref.$, value);
  
          if (always || ref.$ !== $value) {
            ref.$ = $value;
  
            ref._(hook, null, ref.args);
          }
        };
      }
  
      return [ref.$, ref.f];
    }; // useState
  
    var useState = function useState(value, options) {
      return useReducer(getValue, value, void 0, options);
    }; // useContext
  
    var hooks = new WeakMap();
  
    var invoke = function invoke(_ref2) {
      var hook = _ref2.hook,
          args = _ref2.args;
      hook.apply(null, args);
    };
  
    var createContext = function createContext(value) {
      var context = {
        value: value,
        provide: provide
      };
      hooks.set(context, []);
      return context;
    };
    var useContext = function useContext(context) {
      var _state2 = state,
          hook = _state2.hook,
          args = _state2.args;
      var stack = hooks.get(context);
      var info = {
        hook: hook,
        args: args
      };
      if (!stack.some(update, info)) stack.push(info);
      return context.value;
    };
  
    function provide(value) {
      if (this.value !== value) {
        this.value = value;
        hooks.get(this).forEach(invoke);
      }
    }
  
    function update(_ref3) {
      var hook = _ref3.hook;
      return hook === this.hook;
    } // dropEffect, hasEffect, useEffect, useLayoutEffect
  
  
    var effects = new WeakMap();
    var fx = umap(effects);
  
    var stop = function stop() {};
  
    var createEffect = function createEffect(asy) {
      return function (effect, guards) {
        var i = state.i++;
        var _state3 = state,
            hook = _state3.hook,
            after = _state3.after,
            stack = _state3.stack,
            length = _state3.length;
  
        if (i < length) {
          var info = stack[i];
          var _update = info.update,
              values = info.values,
              _stop = info.stop;
  
          if (!guards || guards.some(different, values)) {
            info.values = guards;
            if (asy) _stop(asy);
            var clean = info.clean;
  
            if (clean) {
              info.clean = null;
              clean();
            }
  
            var _invoke = function _invoke() {
              info.clean = effect();
            };
  
            if (asy) _update(_invoke);else after.push(_invoke);
          }
        } else {
          var _update2 = asy ? reraf() : stop;
  
          var _info = {
            clean: null,
            update: _update2,
            values: guards,
            stop: stop
          };
          state.length = stack.push(_info);
          (fx.get(hook) || fx.set(hook, [])).push(_info);
  
          var _invoke2 = function _invoke2() {
            _info.clean = effect();
          };
  
          if (asy) _info.stop = _update2(_invoke2);else after.push(_invoke2);
        }
      };
    };
  
    var dropEffect = function dropEffect(hook) {
      (effects.get(hook) || []).forEach(function (info) {
        var clean = info.clean,
            stop = info.stop;
        stop();
  
        if (clean) {
          info.clean = null;
          clean();
        }
      });
    };
    var hasEffect = effects.has.bind(effects);
    var useEffect = createEffect(true);
    var useLayoutEffect = createEffect(false); // useMemo, useCallback
  
    var useMemo = function useMemo(memo, guards) {
      var i = state.i++;
      var _state4 = state,
          stack = _state4.stack,
          length = _state4.length;
      if (i === length) state.length = stack.push({
        $: memo(),
        _: guards
      });else if (!guards || guards.some(different, stack[i]._)) stack[i] = {
        $: memo(),
        _: guards
      };
      return stack[i].$;
    };
    var useCallback = function useCallback(fn, guards) {
      return useMemo(function () {
        return fn;
      }, guards);
    }; // useRef
  
    var useRef = function useRef(value) {
      var i = state.i++;
      var _state5 = state,
          stack = _state5.stack,
          length = _state5.length;
      if (i === length) state.length = stack.push({
        current: value
      });
      return stack[i];
    };
  
    function different(value, i) {
      return value !== this[i];
    }
  
    exports.augmentor = augmentor;
    exports.contextual = contextual;
    exports.createContext = createContext;
    exports.dropEffect = dropEffect;
    exports.hasEffect = hasEffect;
    exports.useCallback = useCallback;
    exports.useContext = useContext;
    exports.useEffect = useEffect;
    exports.useLayoutEffect = useLayoutEffect;
    exports.useMemo = useMemo;
    exports.useReducer = useReducer;
    exports.useRef = useRef;
    exports.useState = useState;
  
    return exports;
  
  }({}));
  