react-ui-animate 4.0.0-rc.3 → 4.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/.idea/codeStyles/Project.xml +59 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/modules.xml +8 -0
  4. package/.idea/react-ui-animate.iml +9 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/LICENSE +21 -21
  7. package/README.md +209 -209
  8. package/dist/animation/animationType.d.ts +58 -15
  9. package/dist/animation/controllers/index.d.ts +8 -0
  10. package/dist/animation/controllers/withConfig.d.ts +5 -0
  11. package/dist/animation/controllers/withDecay.d.ts +7 -0
  12. package/dist/animation/controllers/withDelay.d.ts +6 -0
  13. package/dist/animation/controllers/withEase.d.ts +6 -0
  14. package/dist/animation/controllers/withLoop.d.ts +2 -0
  15. package/dist/animation/controllers/withSequence.d.ts +2 -0
  16. package/dist/animation/controllers/withSpring.d.ts +7 -0
  17. package/dist/animation/controllers/withTiming.d.ts +7 -0
  18. package/dist/animation/core/FluidArrayController.d.ts +2 -2
  19. package/dist/animation/core/FluidController.d.ts +5 -3
  20. package/dist/animation/core/useFluidValue.d.ts +2 -2
  21. package/dist/animation/core/useFluidValues.d.ts +3 -0
  22. package/dist/animation/core/useMount.d.ts +3 -3
  23. package/dist/animation/helpers/getToValue.d.ts +2 -0
  24. package/dist/animation/helpers/index.d.ts +1 -0
  25. package/dist/animation/hooks/index.d.ts +3 -0
  26. package/dist/animation/hooks/useMount.d.ts +15 -0
  27. package/dist/animation/hooks/useValue.d.ts +17 -0
  28. package/dist/animation/hooks/useValues.d.ts +8 -0
  29. package/dist/animation/index.d.ts +3 -4
  30. package/dist/animation/interpolation.d.ts +5 -4
  31. package/dist/animation/modules/MountedBlock.d.ts +7 -10
  32. package/dist/animation/modules/ScrollableBlock.d.ts +5 -4
  33. package/dist/animation/modules/TransitionBlock.d.ts +5 -4
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +1 -1
  36. package/dist/index.js.map +1 -1
  37. package/package.json +52 -52
  38. package/dist/animation/useAnimatedValue.d.ts +0 -21
  39. package/dist/animation/useMountedValue.d.ts +0 -15
  40. package/dist/animation/withFunctions.d.ts +0 -107
@@ -0,0 +1,6 @@
1
+ import { type WithOnCallbacks } from './withConfig';
2
+ import type { UpdateValue } from '../core/FluidController';
3
+ interface WithEaseConfig extends WithOnCallbacks {
4
+ }
5
+ export declare const withEase: (toValue: number, config?: WithEaseConfig) => UpdateValue;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { UpdateValue } from '../core/FluidController';
2
+ export declare const withLoop: (updateValue: UpdateValue | UpdateValue[], loop: number) => UpdateValue[];
@@ -0,0 +1,2 @@
1
+ import { type UpdateValue } from '../core/FluidController';
2
+ export declare const withSequence: (animations: Array<UpdateValue | number | Array<UpdateValue | number>>) => UpdateValue[];
@@ -0,0 +1,7 @@
1
+ import { type UseValueConfig } from '../hooks';
2
+ import { type WithOnCallbacks } from './withConfig';
3
+ import type { UpdateValue } from '../core/FluidController';
4
+ interface WithSpringConfig extends Pick<UseValueConfig, 'mass' | 'friction' | 'tension'>, WithOnCallbacks {
5
+ }
6
+ export declare const withSpring: (toValue: number, config?: WithSpringConfig) => UpdateValue;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { type UseValueConfig } from '../hooks';
2
+ import { type WithOnCallbacks } from './withConfig';
3
+ import type { UpdateValue } from '../core/FluidController';
4
+ interface WithTimingConfig extends Pick<UseValueConfig, 'duration' | 'easing'>, WithOnCallbacks {
5
+ }
6
+ export declare const withTiming: (toValue: number, config?: WithTimingConfig) => UpdateValue;
7
+ export {};
@@ -1,7 +1,7 @@
1
- import type { AssignValue, UseFluidValueConfig } from './FluidController';
1
+ import type { UpdateValue, UseFluidValueConfig } from './FluidController';
2
2
  export declare class FluidArrayController {
3
3
  private fluidControllers;
4
4
  constructor(values: number[], config?: UseFluidValueConfig);
5
- setFluid(updateValue: AssignValue[], callback?: () => void): void;
5
+ setFluid(updateValue: Array<UpdateValue | UpdateValue[]>, callback?: () => void): void;
6
6
  getFluid(): import("@raidipesh78/re-motion").FluidValue[];
7
7
  }
@@ -15,18 +15,20 @@ export interface UseFluidValueConfig {
15
15
  decay?: boolean;
16
16
  velocity?: number;
17
17
  deceleration?: number;
18
+ loop?: number;
18
19
  }
19
- type UpdateValue = {
20
+ export type UpdateValue = {
20
21
  toValue?: number;
21
22
  config?: UseFluidValueConfig;
22
23
  };
23
- export type AssignValue = UpdateValue | Fn<Fn<UpdateValue, Promise<any>>, void>;
24
24
  export declare class FluidController {
25
25
  private fluid;
26
26
  private defaultConfig?;
27
+ private iterationsSoFar;
27
28
  constructor(value: number, config?: UseFluidValueConfig);
29
+ private getAnimation;
28
30
  private runAnimation;
29
- setFluid(updateValue: AssignValue, callback?: (value: number) => void): void;
31
+ setFluid(updateValue: UpdateValue | UpdateValue[], callback?: (value: number) => void): void;
30
32
  getFluid(): FluidValue;
31
33
  }
32
34
  export {};
@@ -1,3 +1,3 @@
1
1
  import { FluidValue } from '@raidipesh78/re-motion';
2
- import { AssignValue, UseFluidValueConfig } from './FluidController';
3
- export declare const useFluidValue: <T extends number | number[]>(value: T, config?: UseFluidValueConfig) => [T extends number ? FluidValue : FluidValue[], (updateValue: T extends number ? AssignValue : AssignValue[], callback?: () => void) => void];
2
+ import { UpdateValue, UseFluidValueConfig } from './FluidController';
3
+ export declare const useFluidValue: <T extends number>(value: T, config?: UseFluidValueConfig) => [FluidValue, (updateValue: UpdateValue | UpdateValue[], callback?: () => void) => void];
@@ -0,0 +1,3 @@
1
+ import { FluidValue } from '@raidipesh78/re-motion';
2
+ import { UpdateValue, UseFluidValueConfig } from './FluidController';
3
+ export declare const useFluidValues: <T extends number[]>(value: T, config?: UseFluidValueConfig) => [FluidValue[], (updateValue: Array<UpdateValue | UpdateValue[]>, callback?: () => void) => void];
@@ -1,9 +1,9 @@
1
1
  import { FluidValue } from '@raidipesh78/re-motion';
2
- import type { AssignValue, UseFluidValueConfig } from './FluidController';
2
+ import type { UpdateValue, UseFluidValueConfig } from './FluidController';
3
3
  export interface UseMountConfig {
4
4
  from: number;
5
- enter: number | AssignValue;
6
- exit: number | AssignValue;
5
+ enter: number | UpdateValue | number[] | UpdateValue[];
6
+ exit: number | UpdateValue | number[] | UpdateValue[];
7
7
  config?: UseFluidValueConfig;
8
8
  }
9
9
  /**
@@ -0,0 +1,2 @@
1
+ import { UpdateValue, UseFluidValueConfig } from '../core/FluidController';
2
+ export declare function getToValue(value: number | UpdateValue, config?: UseFluidValueConfig): UpdateValue;
@@ -1,2 +1,3 @@
1
1
  export * from './isDefined';
2
2
  export * from './delay';
3
+ export * from './getToValue';
@@ -0,0 +1,3 @@
1
+ export * from './useValue';
2
+ export * from './useValues';
3
+ export * from './useMount';
@@ -0,0 +1,15 @@
1
+ import { FluidValue } from '@raidipesh78/re-motion';
2
+ import { UseMountConfig as UseInternalMountConfig } from '../core/useMount';
3
+ export interface UseMountConfig extends UseInternalMountConfig {
4
+ }
5
+ /**
6
+ * `useMount` handles mounting and unmounting of a component which captures current state
7
+ * passed as an argument (`state`) and exposes the shadow state which handles the mount and unmount
8
+ * of a component.
9
+ *
10
+ * @param { boolean } state - Boolean indicating the component should mount or unmount.
11
+ * @param { UseMountConfig } config - Animation configuration.
12
+ */
13
+ export declare function useMount(state: boolean, config: UseMountConfig): (cb: (value: {
14
+ value: FluidValue;
15
+ }, mounted: boolean) => React.ReactNode) => import("react").ReactNode;
@@ -0,0 +1,17 @@
1
+ import { FluidValue } from '@raidipesh78/re-motion';
2
+ import type { UpdateValue, UseFluidValueConfig } from '../core/FluidController';
3
+ export interface UseValueConfig extends UseFluidValueConfig {
4
+ }
5
+ /**
6
+ * `useValue` returns an animation value with `.value` and `.currentValue` property which is
7
+ * initialized when passed to argument (`initialValue`). The returned value persist until the lifetime of
8
+ * a component. It doesn't cast any re-renders which can is very good for performance optimization.
9
+ *
10
+ * @param { number } initialValue - Initial value
11
+ * @param { UseValueConfig } config - Animation configuration object.
12
+ */
13
+ export declare function useValue<T extends number>(initialValue: T, config?: UseValueConfig): {
14
+ get value(): FluidValue;
15
+ set value(to: number | UpdateValue | number[] | UpdateValue[]);
16
+ readonly currentValue: number;
17
+ };
@@ -0,0 +1,8 @@
1
+ import { FluidValue } from '@raidipesh78/re-motion';
2
+ import { type UpdateValue } from '../core/FluidController';
3
+ import { type UseValueConfig } from './useValue';
4
+ export declare function useValues<T extends number[]>(initialValue: T, config?: UseValueConfig): {
5
+ get value(): FluidValue[];
6
+ set value(to: Array<number | number[] | UpdateValue | UpdateValue[]>);
7
+ readonly currentValue: number[];
8
+ };
@@ -1,7 +1,6 @@
1
1
  export { interpolate, bInterpolate } from './interpolation';
2
2
  export { MountedBlock, ScrollableBlock, TransitionBlock } from './modules';
3
- export { useAnimatedValue, UseAnimatedValueConfig } from './useAnimatedValue';
4
- export { useMountedValue, UseMountedValueConfig } from './useMountedValue';
5
- export { AnimationConfigUtils } from './animationType';
6
- export { withSpring, withTiming, withSequence, withDelay, withEase, withConfig, withDecay, } from './withFunctions';
3
+ export { useValue, useValues, useMount, type UseValueConfig, type UseMountConfig, } from './hooks';
4
+ export { AnimationConfig } from './animationType';
5
+ export { withSpring, withTiming, withSequence, withDelay, withEase, withConfig, withDecay, withLoop, } from './controllers';
7
6
  export { delay } from './helpers';
@@ -1,25 +1,26 @@
1
+ import { FluidValue } from '@raidipesh78/re-motion';
1
2
  import { ExtrapolateConfig } from './core/inerpolate';
2
3
  /**
3
4
  * Maps the input range to the given output range using the specified extrapolation configuration.
4
5
  * The function ensures that the value is either a number or a FluidValue.
5
6
  *
6
- * @param value - The value to be interpolated, which must be a number or FluidValue.
7
+ * @param value - The value to be interpolated, which must be a FluidValue.
7
8
  * @param inputRange - An array of numbers defining the input range.
8
9
  * @param outputRange - An array of numbers or strings defining the output range.
9
10
  * @param extrapolateConfig - The extrapolation configuration, which can be "clamp", "identity", or "extend".
10
11
  * @returns - The interpolated value, which will be a number or FluidValue.
11
12
  * @throws - Will throw an error if the value is not a number or FluidValue.
12
13
  */
13
- export declare function interpolate(value: any, inputRange: number[], outputRange: number[] | string[], extrapolateConfig?: ExtrapolateConfig): import("@raidipesh78/re-motion/dist/fluids/FluidInterpolation").FluidInterpolation;
14
+ export declare function interpolate(value: FluidValue, inputRange: number[], outputRange: number[] | string[], extrapolateConfig?: ExtrapolateConfig): import("@raidipesh78/re-motion/dist/fluids/FluidInterpolation").FluidInterpolation;
14
15
  /**
15
16
  * A shorthand function for interpolate that maps the input range [0, 1] to the given [minOutput, maxOutput].
16
17
  * The function ensures that the value is either a number or a FluidValue.
17
18
  *
18
- * @param value - The value to be interpolated, which must be a number or FluidValue.
19
+ * @param value - The value to be interpolated, which must be a FluidValue.
19
20
  * @param minOutput - The minimum value of the output range, which can be a number or string.
20
21
  * @param maxOutput - The maximum value of the output range, which can be a number or string.
21
22
  * @param extrapolateConfig - The extrapolation configuration, which can be "clamp", "identity", or "extend".
22
23
  * @returns - The interpolated value, which will be a number or FluidValue.
23
24
  * @throws - Will throw an error if the value is not a number or FluidValue.
24
25
  */
25
- export declare function bInterpolate(value: any, minOutput: number | string, maxOutput: number | string, extrapolateConfig?: ExtrapolateConfig): import("@raidipesh78/re-motion/dist/fluids/FluidInterpolation").FluidInterpolation;
26
+ export declare function bInterpolate(value: FluidValue, minOutput: number | string, maxOutput: number | string, extrapolateConfig?: ExtrapolateConfig): import("@raidipesh78/re-motion/dist/fluids/FluidInterpolation").FluidInterpolation;
@@ -1,23 +1,20 @@
1
1
  import * as React from 'react';
2
- import type { UpdateValue, UseAnimatedValueConfig } from '../useAnimatedValue';
3
- interface MountedBlockProps {
2
+ import { type UseMountConfig } from '../hooks';
3
+ import { FluidValue } from '@raidipesh78/re-motion';
4
+ interface MountedBlockProps extends Partial<UseMountConfig> {
4
5
  state: boolean;
5
6
  children: (animation: {
6
- value: any;
7
+ value: FluidValue;
7
8
  }) => React.ReactNode;
8
- from?: number;
9
- enter?: number | UpdateValue;
10
- exit?: number | UpdateValue;
11
- config?: UseAnimatedValueConfig;
12
9
  }
13
10
  /**
14
11
  * MountedBlock - Higher order component which handles mounting and unmounting of a component.
15
12
  * @param { boolean } state - Boolean indicating the component should mount or unmount.
16
13
  * @param { function } children - Child as a function with `AnimatedValue` on `.value` property.
17
14
  * @param { number } } from - Number that dictates the beginning state for animation.
18
- * @param { number | { toValue: number, config: MountedValueConfig } } enter - Number that dictates the entry state for animation.
19
- * @param { number | { toValue: number, config: MountedValueConfig } } exit - Number that dictates the exit state for animation.
20
- * @param { UseAnimatedValueConfig } config - Animation configuration for overall animation.
15
+ * @param { number } enter - Number that dictates the entry state for animation.
16
+ * @param { number } exit - Number that dictates the exit state for animation.
17
+ * @param { UseValueConfig } config - Animation configuration for overall animation.
21
18
  */
22
19
  export declare const MountedBlock: ({ state, children, from, enter, exit, config, }: MountedBlockProps) => import("react/jsx-runtime").JSX.Element;
23
20
  export {};
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
- import { UseAnimatedValueConfig } from '../useAnimatedValue';
2
+ import { FluidValue } from '@raidipesh78/re-motion';
3
+ import { type UseValueConfig } from '../hooks';
3
4
  interface ScrollableBlockProps {
4
5
  children?: (animation: {
5
- value: any;
6
+ value: FluidValue;
6
7
  }) => React.ReactNode;
7
8
  direction?: 'single' | 'both';
8
9
  threshold?: number;
9
- animationConfig?: UseAnimatedValueConfig;
10
+ animationConfig?: UseValueConfig;
10
11
  }
11
12
  /**
12
13
  * ScrollableBlock - Higher order component to handle the entrance or exit animation
@@ -15,7 +16,7 @@ interface ScrollableBlockProps {
15
16
  * @prop { function } children - child as a function with `AnimatedValue` as its first argument.
16
17
  * @prop { 'single' | 'both' } direction - single applies animation on enter once, both applies on enter and exit.
17
18
  * @prop { number } threshold - should be in range 0 to 1 which equivalent to `IntersectionObserver` threshold.
18
- * @prop { UseAnimatedValueConfig } animationConfig - Animation config
19
+ * @prop { UseValueConfig } animationConfig - Animation config
19
20
  */
20
21
  export declare const ScrollableBlock: (props: ScrollableBlockProps) => import("react/jsx-runtime").JSX.Element;
21
22
  export {};
@@ -1,17 +1,18 @@
1
1
  import * as React from 'react';
2
- import { UseAnimatedValueConfig } from '../useAnimatedValue';
2
+ import { FluidValue } from '@raidipesh78/re-motion';
3
+ import { type UseValueConfig } from '../hooks';
3
4
  interface TransitionBlockProps {
4
5
  state: boolean;
5
6
  children: (animation: {
6
- value: any;
7
+ value: FluidValue;
7
8
  }) => React.ReactNode;
8
- config?: UseAnimatedValueConfig;
9
+ config?: UseValueConfig;
9
10
  }
10
11
  /**
11
12
  * TransitionBlock - Higher order component which animates on state change.
12
13
  * @prop { boolean } state - Boolean indicating the current state of animation, usually `false = 0 and true = 1`.
13
14
  * @prop { function } children - Child as a function with `AnimatedValue` on `.value` property.
14
- * @prop { UseAnimatedValueConfig } config - Animation configuration.
15
+ * @prop { UseValueConfig } config - Animation configuration.
15
16
  */
16
17
  export declare const TransitionBlock: ({ state, children, config, }: TransitionBlockProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { Easing, makeFluid as makeAnimated, fluid as animate, } from '@raidipesh78/re-motion';
2
- export { AnimationConfigUtils, MountedBlock, ScrollableBlock, TransitionBlock, } from './animation';
2
+ export { AnimationConfig, MountedBlock, ScrollableBlock, TransitionBlock, } from './animation';
3
3
  export { bInterpolate, interpolate } from './animation';
4
- export { useAnimatedValue, useMountedValue } from './animation';
5
- export { withSpring, withTiming, withSequence, withDelay, withEase, withConfig, withDecay, delay, } from './animation';
4
+ export { useValue, useMount, useValues } from './animation';
5
+ export { withSpring, withTiming, withSequence, withDelay, withEase, withConfig, withDecay, withLoop, delay, } from './animation';
6
6
  export { useMeasure, useOutsideClick, useWindowDimension } from './hooks';
7
7
  export { useDrag, useGesture, useMouseMove, useScroll, useWheel, } from './gestures/hooks';
8
8
  export { bin, clamp, mix, rubberClamp, move, snapTo } from './gestures/helpers';
9
- export type { UseAnimatedValueConfig, UseMountedValueConfig, } from './animation';
9
+ export type { UseValueConfig, UseMountConfig } from './animation';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var t=require("@raidipesh78/re-motion"),e=require("react/jsx-runtime"),n=require("react");function i(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var r=i(n),o=function(t,e,n,i){return t.interpolate(e,n,i)},s=function(t){return null!=t};function u(e){if(!(s(e)&&e instanceof t.FluidValue))throw console.log(e),new Error("Invalid ".concat(e," type for interpolate function. Expected FluidValue."));return e}var a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},a(t,e)};function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var l=function(){return l=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},l.apply(this,arguments)};function f(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{a(i.next(t))}catch(t){o(t)}}function u(t){try{a(i.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((i=i.apply(t,e||[])).next())}))}function h(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,i&&(r=2&u[0]?i.return:u[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,u[1])).done)return r;switch(i=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,i=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){s.label=u[1];break}if(6===u[0]&&s.label<r[1]){s.label=r[1],r=u;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(u);break}r[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],i=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function v(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function d(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var p=function(){function e(e,n){this.fluid=new t.FluidValue(e),this.defaultConfig=n}return e.prototype.runAnimation=function(e,n){var i=l(l({},this.defaultConfig),e.config);this.fluid.removeAllListeners(),(null==i?void 0:i.onStart)&&i.onStart(this.fluid.get()),(null==i?void 0:i.onChange)&&this.fluid.addListener((function(t){var e;return null===(e=null==i?void 0:i.onChange)||void 0===e?void 0:e.call(i,t)}));var r=function(t){var e,r=t.finished,o=t.value;r&&(null===(e=null==i?void 0:i.onRest)||void 0===e||e.call(i,o),null==n||n(o))};if(s(null==i?void 0:i.duration)||(null==i?void 0:i.immediate)){if(!s(e.toValue))throw new Error("No `toValue` is defined");var o={toValue:e.toValue,delay:null==i?void 0:i.delay,duration:(null==i?void 0:i.immediate)?0:null==i?void 0:i.duration,easing:null==i?void 0:i.easing};t.timing(this.fluid,o).start(r)}else if(null==i?void 0:i.decay){var u={velocity:null==i?void 0:i.velocity,deceleration:null==i?void 0:i.deceleration,delay:null==i?void 0:i.delay};t.decay(this.fluid,u).start(r)}else{if(!s(e.toValue))throw new Error("No `toValue` is defined");var a={toValue:e.toValue,delay:null==i?void 0:i.delay,mass:null==i?void 0:i.mass,tension:null==i?void 0:i.tension,friction:null==i?void 0:i.friction,restDistance:null==i?void 0:i.restDistance};t.spring(this.fluid,a).start(r)}},e.prototype.setFluid=function(t,e){var n=this;t&&("function"==typeof t?t((function(t){return new Promise((function(i){n.runAnimation(t,(function(n){i(t),e&&e(n)}))}))})):this.runAnimation(t,e))},e.prototype.getFluid=function(){return this.fluid},e}(),y=function(){function t(t,e){this.fluidControllers=t.map((function(t){return new p(t,e)}))}return t.prototype.setFluid=function(t,e){this.fluidControllers.map((function(n,i){n.setFluid(t[i],e)}))},t.prototype.getFluid=function(){return this.fluidControllers.map((function(t){return t.getFluid()}))},t}(),g=function(t,e){var i=n.useRef(Array.isArray(t)?new y(t,e):new p(t,e)).current,r=n.useCallback((function(t,e){i.setFluid(t,e)}),[]);return[n.useMemo((function(){return i.getFluid()}),[]),r]};function b(t,e){var i=function(t,e){var i=m(n.useState(!1),2),r=i[0],o=i[1],s=n.useRef(e).current,u=s.from,a=s.enter,c=s.exit,l=s.config,f=m(g(u,l),2),h=f[0],v=f[1];return n.useLayoutEffect((function(){t?(o(!0),queueMicrotask((function(){return v("number"==typeof a?{toValue:a,config:l}:a)}))):v("number"==typeof c?{toValue:c,config:l}:c,(function(){o(!1),h.getSubscriptions().forEach((function(t){return h.removeSubscription(t)}))}))}),[t]),function(t){return t(h,r)}}(t,e);return function(t){return i((function(e,n){return t({value:e},n)}))}}var x=function(e){switch(e){case"elastic":return{mass:1,friction:18,tension:250};case"stiff":return{mass:1,friction:18,tension:350};case"wooble":return{mass:1,friction:8,tension:250};case"bounce":return{duration:500,easing:t.Easing.bounce};case"power1":return{duration:500,easing:t.Easing.bezier(.17,.42,.51,.97)};case"power2":return{duration:500,easing:t.Easing.bezier(.07,.11,.13,1)};case"power3":return{duration:500,easing:t.Easing.bezier(.09,.7,.16,1.04)};case"power4":return{duration:500,easing:t.Easing.bezier(.05,.54,0,1.03)};case"linear":return{duration:500,easing:t.Easing.linear};case"easein":return{duration:500,easing:t.Easing.in(t.Easing.ease)};case"easeout":return{duration:500,easing:t.Easing.out(t.Easing.ease)};case"easeinout":return{duration:500,easing:t.Easing.inOut(t.Easing.ease)};default:return{mass:1,friction:26,tension:170}}},E={ELASTIC:x("elastic"),BOUNCE:x("bounce"),EASE:x("ease"),STIFF:x("stiff"),WOOBLE:x("wooble"),EASE_IN:x("easein"),EASE_OUT:x("easeout"),EASE_IN_OUT:x("easeinout"),POWER1:x("power1"),POWER2:x("power2"),POWER3:x("power3"),POWER4:x("power4"),LINEAR:x("linear")},w=function(t){return"number"==typeof t?{toValue:t}:t};function M(t,e){var i=n.useRef(!0),r=m(g(t,l(l({},E.EASE),e)),2),o=r[0],s=r[1],u=Array.isArray(o)?o.map((function(t){return t.get()})):o.get(),a={value:o,currentValue:u},c=n.useCallback((function(t){var e=w(t);Array.isArray(t)?s(t.map((function(t){return w(t)}))):queueMicrotask((function(){return s(e)}))}),[]);return n.useLayoutEffect((function(){i.current||c(t),i.current=!1}),[t,e]),new Proxy(a,{set:function(t,e,n){if("value"===e)return c(n),!0;throw new Error("You cannot set any other property to animation node.")},get:function(t,e){if("value"===e)return o;if("currentValue"===e)return Array.isArray(o)?o.map((function(t){return t.get()})):o.get();throw new Error("You cannot access any other property from animation node.")}})}function _(t){return t?1:0}function I(t,e,n){return Math.min(Math.max(t,e),n)}function T(t,e,n){return 0===e||Math.abs(e)===1/0?function(t,e){return Math.pow(t,5*e)}(t,n):t*e*n/(e+n*t)}var O=function(t,e){return{toValue:t,config:e}};function C(t,e){var n=new Map;return e.forEach((function(e){var i=m(e,3),r=i[0],o=i[1],s=i[2],u=void 0!==s&&s;n.set(r,function(t,e,n,i){return void 0===i&&(i=!1),t.forEach((function(t){t.addEventListener(e,n,i)})),function(){t.forEach((function(t){t.removeEventListener(e,n,i)}))}}(t,r,o,u))})),function(t){var e,i;try{for(var r=v(n.entries()),o=r.next();!o.done;o=r.next()){var s=m(o.value,2),u=s[0],a=s[1];if(!t)return void a();-1!==t.indexOf(u)&&a()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}}}var A=function(t,e){return{x:t,y:e}},L=function(){function t(){this.lastTimeStamp=Date.now(),this.isActive=!1,this.targetElements=[]}return t.prototype._initEvents=function(){},t.prototype._cancelEvents=function(){this._subscribe&&this._subscribe()},t.prototype.applyCallback=function(t){this.callback=t},t.prototype.applyGesture=function(t){var e=this,n=t.targetElement,i=t.targetElements,r=t.callback,o=t.config;return this.targetElement=n,this.targetElements=i.map((function(t){return t.current})),this.callback=r,this.config=o,this._initEvents(),function(){return e._subscribe&&e._subscribe()}},t._VELOCITY_LIMIT=20,t}(),S=function(t){function e(){var e=t.apply(this,d([],m(arguments),!1))||this;return e.movementStart=A(0,0),e.initialMovement=A(0,0),e.movement=A(0,0),e.previousMovement=A(0,0),e.translation=A(0,0),e.offset=A(0,0),e.velocity=A(0,0),e}return c(e,t),e.prototype._initEvents=function(){(this.targetElement||this.targetElements.length>0)&&(this._subscribe=C([window],[["mousedown",this.pointerDown.bind(this)],["mousemove",this.pointerMove.bind(this)],["mouseup",this.pointerUp.bind(this)],["touchstart",this.pointerDown.bind(this),{passive:!1}],["touchmove",this.pointerMove.bind(this),{passive:!1}],["touchend",this.pointerUp.bind(this)]]))},e.prototype._cancelEvents=function(){this._subscribe&&this._subscribe(["mousedown","mousemove","touchstart","touchmove"])},e.prototype._handleCallback=function(){var t=this;this.callback&&this.callback({args:[this.currentIndex],down:this.isActive,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.translation.x,offsetY:this.translation.y,velocityX:this.velocity.x,velocityY:this.velocity.y,distanceX:Math.abs(this.movement.x),distanceY:Math.abs(this.movement.y),directionX:Math.sign(this.movement.x),directionY:Math.sign(this.movement.y),cancel:function(){t._cancelEvents()}})},e.prototype.pointerDown=function(t){var e;"touchstart"===t.type?this.movementStart={x:t.touches[0].clientX,y:t.touches[0].clientY}:this.movementStart={x:t.clientX,y:t.clientY},this.movement={x:0,y:0},this.offset={x:this.translation.x,y:this.translation.y},this.previousMovement={x:0,y:0},this.velocity={x:0,y:0};var n=this.targetElements.find((function(e){return e===t.target}));if(t.target===this.targetElement||n){this.isActive=!0,t.preventDefault(),n&&(this.currentIndex=this.targetElements.indexOf(n));var i=(null===(e=this.config)||void 0===e?void 0:e.initial)&&this.config.initial(),r=null==i?void 0:i.movementX,o=null==i?void 0:i.movementY;this.initialMovement={x:null!=r?r:0,y:null!=o?o:0},this.movement={x:this.initialMovement.x,y:this.initialMovement.y},this.previousMovement={x:this.initialMovement.x,y:this.initialMovement.y},this._handleCallback()}},e.prototype.pointerMove=function(t){if(this.isActive){t.preventDefault();var e=Date.now(),n=I(e-this.lastTimeStamp,.1,64);this.lastTimeStamp=e;var i=n/1e3;"touchmove"===t.type?this.movement={x:this.initialMovement.x+(t.touches[0].clientX-this.movementStart.x),y:this.initialMovement.y+(t.touches[0].clientY-this.movementStart.y)}:this.movement={x:this.initialMovement.x+(t.clientX-this.movementStart.x),y:this.initialMovement.y+(t.clientY-this.movementStart.y)},this.translation={x:this.offset.x+this.movement.x,y:this.offset.y+this.movement.y},this.velocity={x:I((this.movement.x-this.previousMovement.x)/i/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT),y:I((this.movement.y-this.previousMovement.y)/i/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()}},e.prototype.pointerUp=function(){this.isActive&&(this.isActive=!1,this._handleCallback(),this._cancelEvents(),this._initEvents())},e}(L),k=function(t){function e(){var e=t.apply(this,d([],m(arguments),!1))||this;return e.movement=A(0,0),e.previousMovement=A(0,0),e.velocity=A(0,0),e.direction=A(0,0),e}return c(e,t),e.prototype._initEvents=function(){this.targetElement?this._subscribe=C([this.targetElement],[["mousemove",this.onMouseMove.bind(this)]]):this.targetElements.length>0?this._subscribe=C(this.targetElements,[["mousemove",this.onMouseMove.bind(this)]]):this._subscribe=C([window],[["mousemove",this.onMouseMove.bind(this)]])},e.prototype._handleCallback=function(){var t;this.callback&&this.callback({args:[this.currentIndex],event:this.event,isMoving:this.isActive,target:null===(t=this.event)||void 0===t?void 0:t.target,mouseX:this.movement.x,mouseY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},e.prototype.onMouseMove=function(t){var e=this,n=this.targetElements.find((function(e){return e===t.target}));n&&(this.currentIndex=this.targetElements.indexOf(n)),this.event=t;var i=Date.now(),r=Math.min(i-this.lastTimeStamp,64);this.lastTimeStamp=i;var o=r/1e3,s=t.clientX,u=t.clientY;this.movement={x:s,y:u},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){e.isActive=!1,e.direction={x:0,y:0},e.velocity={x:0,y:0},e._handleCallback()}),250);var a=this.movement.x-this.previousMovement.x,c=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(a),y:Math.sign(c)},this.velocity={x:I(a/o/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT),y:I(c/o/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},e}(L),Y=function(t){function e(){var e=t.apply(this,d([],m(arguments),!1))||this;return e.movement=A(0,0),e.previousMovement=A(0,0),e.direction=A(0,0),e.velocity=A(0,0),e}return c(e,t),e.prototype._initEvents=function(){this.targetElement?this._subscribe=C([this.targetElement],[["scroll",this.scrollElementListener.bind(this)]]):this._subscribe=C([window],[["scroll",this.scrollListener.bind(this)]])},e.prototype._handleCallback=function(){this.callback&&this.callback({isScrolling:this.isActive,scrollX:this.movement.x,scrollY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},e.prototype.onScroll=function(t){var e=this,n=t.x,i=t.y,r=Date.now(),o=Math.min(r-this.lastTimeStamp,64);this.lastTimeStamp=r;var s=o/1e3;this.movement={x:n,y:i},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){e.isActive=!1,e.direction={x:0,y:0},e.velocity={x:0,y:0},e._handleCallback()}),250);var u=this.movement.x-this.previousMovement.x,a=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(u),y:Math.sign(a)},this.velocity={x:I(u/s/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT),y:I(a/s/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},e.prototype.scrollListener=function(){var t=window.pageYOffset,e=window.pageXOffset;this.onScroll({x:e,y:t})},e.prototype.scrollElementListener=function(){var t,e,n=(null===(t=this.targetElement)||void 0===t?void 0:t.scrollLeft)||0,i=(null===(e=this.targetElement)||void 0===e?void 0:e.scrollTop)||0;this.onScroll({x:n,y:i})},e}(L),V=function(t){function e(){var e=t.apply(this,d([],m(arguments),!1))||this;return e.movement=A(0,0),e.previousMovement=A(0,0),e.direction=A(0,0),e.velocity=A(0,0),e.delta=A(0,0),e.offset=A(0,0),e.translation=A(0,0),e}return c(e,t),e.prototype._initEvents=function(){this.targetElement&&(this._subscribe=C([this.targetElement],[["wheel",this.onWheel.bind(this)]]))},e.prototype._handleCallback=function(){this.callback&&this.callback({target:this.targetElement,isWheeling:this.isActive,deltaX:this.delta.x,deltaY:this.delta.y,directionX:this.direction.x,directionY:this.direction.y,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.offset.x,offsetY:this.offset.y,velocityX:this.velocity.x,velocityY:this.velocity.y})},e.prototype.onWheel=function(t){var e=this,n=t.deltaX,i=t.deltaY,r=t.deltaMode,o=Date.now(),s=Math.min(o-this.lastTimeStamp,64);this.lastTimeStamp=o;var u=s/1e3;this.isActive=!0,-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){e.isActive=!1,e.translation={x:e.offset.x,y:e.offset.y},e._handleCallback(),e.velocity={x:0,y:0},e.movement={x:0,y:0}}),200),1===r?(n*=40,i*=40):2===r&&(n*=800,i*=800),this.delta={x:n,y:i},this.movement={x:this.movement.x+n,y:this.movement.y+i},this.offset={x:this.translation.x+this.movement.x,y:this.translation.y+this.movement.y};var a=this.movement.x-this.previousMovement.x,c=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(a),y:Math.sign(c)},this.velocity={x:I(a/u/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT),y:I(c/u/1e3,-1*L._VELOCITY_LIMIT,L._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},e}(L),R=function(t){var e=r.useRef(),n=r.useRef([]),i=r.useRef(new Map).current;return r.useEffect((function(){var e,n;try{for(var r=v(i.entries()),o=r.next();!o.done;o=r.next()){var s=m(o.value,2)[1],u=s.keyIndex,a=s.gesture,c=m(t[u],3)[2];a.applyCallback(c)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),[t]),r.useEffect((function(){return t.forEach((function(t,r){var o=m(t,4),s=o[0],u=o[1],a=o[2],c=o[3];queueMicrotask((function(){return i.set(s,{keyIndex:r,gesture:u,unsubscribe:u.applyGesture({targetElement:e.current,targetElements:n.current,callback:a,config:c})})}))})),function(){var t,e;try{for(var n=v(i.entries()),r=n.next();!r.done;r=n.next()){var o=m(r.value,2)[1].unsubscribe;o&&o()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}}})),function(t){return null==t?{ref:e}:(n.current[t]=n.current[t]||r.createRef(),{ref:n.current[t]})}};Object.defineProperty(exports,"Easing",{enumerable:!0,get:function(){return t.Easing}}),Object.defineProperty(exports,"animate",{enumerable:!0,get:function(){return t.fluid}}),Object.defineProperty(exports,"makeAnimated",{enumerable:!0,get:function(){return t.makeFluid}}),exports.AnimationConfigUtils=E,exports.MountedBlock=function(t){var n=t.state,i=t.children,r=t.from,o=void 0===r?0:r,s=t.enter,u=void 0===s?1:s,a=t.exit,c=b(n,{from:o,enter:u,exit:void 0===a?0:a,config:t.config});return e.jsx(e.Fragment,{children:c((function(t,e){return e&&i({value:t.value})}))})},exports.ScrollableBlock=function(t){var n=t.children,i=t.direction,o=void 0===i?"single":i,s=t.animationConfig,u=t.threshold,a=void 0===u?.2:u,c=r.useRef(null),l=M(0,s);return r.useEffect((function(){var t=c.current,e=new IntersectionObserver((function(t){m(t,1)[0].isIntersecting?l.value=1:"both"===o&&(l.value=0)}),{root:null,threshold:a});return t&&e.observe(t),function(){t&&e.unobserve(t)}}),[]),e.jsx("div",{ref:c,children:n&&n({value:l.value})})},exports.TransitionBlock=function(t){var n=t.state,i=t.children,r=t.config,o=M(_(n),r);return e.jsx(e.Fragment,{children:i({value:o.value})})},exports.bInterpolate=function(t,e,n,i){var r=u(t);return o(r,[0,1],[e,n],i)},exports.bin=_,exports.clamp=I,exports.delay=function(t){return new Promise((function(e){setTimeout((function(){return e(null)}),t)}))},exports.interpolate=function(t,e,n,i){var r=u(t);return o(r,e,n,i)},exports.mix=function(t,e,n){return e*(1-t)+n*t},exports.move=function(t,e,n){var i=t[e],r=t.length,o=e-n;if(o>0)return d(d(d(d([],m(t.slice(0,n)),!1),[i],!1),m(t.slice(n,e)),!1),m(t.slice(e+1,r)),!1);if(o<0){var s=n+1;return d(d(d(d([],m(t.slice(0,e)),!1),m(t.slice(e+1,s)),!1),[i],!1),m(t.slice(s,r)),!1)}return t},exports.rubberClamp=function(t,e,n,i){return void 0===i&&(i=.15),0===i?I(t,e,n):t<e?-T(e-t,n-e,i)+e:t>n?+T(t-n,n-e,i)+n:t},exports.snapTo=function(t,e,n){var i=t+.2*e,r=function(t){return Math.abs(t-i)},o=n.map(r),s=Math.min.apply(Math,d([],m(o),!1));return n.reduce((function(t,e){return r(e)===s?e:t}))},exports.useAnimatedValue=M,exports.useDrag=function(t,e){var n=r.useRef(new S).current;return R([["drag",n,t,e]])},exports.useGesture=function(t){var e=t.onDrag,n=t.onWheel,i=t.onScroll,o=t.onMouseMove,s=r.useRef(new S).current,u=r.useRef(new V).current,a=r.useRef(new Y).current,c=r.useRef(new k).current;return R([["drag",s,e],["wheel",u,n],["scroll",a,i],["move",c,o]])},exports.useMeasure=function(t,e){var i=n.useRef(null),r=n.useRef([]),o=n.useRef(t);return n.useEffect((function(){return o.current=t,function(){o.current=function(){return!1}}}),e),n.useEffect((function(){var t=i.current||document.documentElement,e=r.current,n=new ResizeObserver((function(e){var n=m(e,1)[0].target.getBoundingClientRect(),i=n.left,r=n.top,s=n.width,u=n.height,a=window.pageXOffset,c=window.pageYOffset;if(o){if(t===document.documentElement)return;o.current({left:i+a,top:r+c,width:s,height:u,vLeft:i,vTop:r})}})),s=new ResizeObserver((function(t){var e=[],n=[],i=[],r=[],s=[],u=[];t.forEach((function(t){var o=t.target.getBoundingClientRect(),a=o.left,c=o.top,l=o.width,f=o.height,h=a+window.pageXOffset,v=c+window.pageYOffset;e.push(h),n.push(v),i.push(l),r.push(f),s.push(a),u.push(c)})),o&&o.current({left:e,top:n,width:i,height:r,vLeft:s,vTop:u})}));return t&&(t===document.documentElement&&e.length>0?e.forEach((function(t){s.observe(t.current)})):n.observe(t)),function(){t&&(t===document.documentElement&&e.length>0?e.forEach((function(t){s.unobserve(t.current)})):n.unobserve(t))}}),[]),function(t){return null==t?{ref:i}:(r.current[t]=r.current[t]||n.createRef(),{ref:r.current[t]})}},exports.useMountedValue=b,exports.useMouseMove=function(t){var e=r.useRef(new k).current;return R([["move",e,t]])},exports.useOutsideClick=function(t,e,i){var r=n.useRef();r.current||(r.current=e),n.useEffect((function(){return r.current=e,function(){r.current=function(){return!1}}}),i),n.useEffect((function(){var e=C([document],[["mousedown",function(e){var n=e.target;n&&n.isConnected&&(t.current&&!t.current.contains(n)&&r.current&&r.current(e))}]]);return function(){return e&&e()}}),[])},exports.useScroll=function(t){var e=r.useRef(new Y).current;return R([["scroll",e,t]])},exports.useWheel=function(t){var e=r.useRef(new V).current;return R([["wheel",e,t]])},exports.useWindowDimension=function(t,e){var i=n.useRef({width:0,height:0,innerWidth:0,innerHeight:0}),r=n.useRef(t);n.useEffect((function(){return r.current=t,function(){r.current=function(){return!1}}}),e),n.useEffect((function(){var t=new ResizeObserver((function(t){var e=m(t,1)[0].target,n=e.clientWidth,o=e.clientHeight,s=window.innerWidth,u=window.innerHeight;i.current={width:n,height:o,innerWidth:s,innerHeight:u},r&&r.current(l({},i.current))}));return t.observe(document.documentElement),function(){return t.unobserve(document.documentElement)}}),[])},exports.withConfig=O,exports.withDecay=function(t){return{config:l({decay:!0},t)}},exports.withDelay=function(t,e){return l(l({},e),{config:l(l({},e.config),{delay:t})})},exports.withEase=function(t,e){return O(t,l(l({},E.EASE),e))},exports.withSequence=function(t){return function(e){return f(void 0,void 0,void 0,(function(){var n,i,r,o,s,u;return h(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,6,7]),n=v(t),i=n.next(),a.label=1;case 1:return i.done?[3,4]:(r=i.value,[4,e("number"==typeof r?{toValue:r}:r)]);case 2:a.sent(),a.label=3;case 3:return i=n.next(),[3,1];case 4:return[3,7];case 5:return o=a.sent(),s={error:o},[3,7];case 6:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(s)throw s.error}return[7];case 7:return[2]}}))}))}},exports.withSpring=function(t,e){return O(t,l(l({},E.ELASTIC),e))},exports.withTiming=function(t,e){return O(t,l({duration:250},e))};
1
+ var t=require("@raidipesh78/re-motion"),e=require("react/jsx-runtime"),n=require("react");function i(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var r=i(n),o=function(t,e,n,i){return t.interpolate(e,n,i)},s=function(t){return null!=t};function u(t,e){return"number"==typeof t?{toValue:t,config:e}:t}function a(e){if(!(s(e)&&e instanceof t.FluidValue))throw new Error("Invalid ".concat(e," type for interpolate function. Expected FluidValue."));return e}var c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},c(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return f=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},f.apply(this,arguments)};function h(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function m(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var d=function(){function e(e,n){this.iterationsSoFar=0,this.fluid=new t.FluidValue(e),this.defaultConfig=n}return e.prototype.getAnimation=function(e,n){if(s(null==n?void 0:n.duration)||(null==n?void 0:n.immediate)){if(!s(e.toValue))throw new Error("No `toValue` is defined");var i={toValue:e.toValue,delay:null==n?void 0:n.delay,duration:(null==n?void 0:n.immediate)?0:null==n?void 0:n.duration,easing:null==n?void 0:n.easing};return t.timing(this.fluid,i)}if(null==n?void 0:n.decay){var r={velocity:null==n?void 0:n.velocity,deceleration:null==n?void 0:n.deceleration,delay:null==n?void 0:n.delay};return t.decay(this.fluid,r)}if(!s(e.toValue))throw new Error("No `toValue` is defined");var o={toValue:e.toValue,delay:null==n?void 0:n.delay,mass:null==n?void 0:n.mass,tension:null==n?void 0:n.tension,friction:null==n?void 0:n.friction,restDistance:null==n?void 0:n.restDistance};return t.spring(this.fluid,o)},e.prototype.runAnimation=function(t,e){var n,i=this,r=f(f({},this.defaultConfig),t.config),o=null!==(n=null==r?void 0:r.loop)&&void 0!==n?n:0;this.fluid.removeAllListeners(),(null==r?void 0:r.onStart)&&r.onStart(this.fluid.get()),(null==r?void 0:r.onChange)&&this.fluid.addListener((function(t){var e;return null===(e=null==r?void 0:r.onChange)||void 0===e?void 0:e.call(r,t)}));var u=this.getAnimation(t,r),a=function(t){var n;t.finished&&(null===(n=null==r?void 0:r.onRest)||void 0===n||n.call(r,t.value),null==e||e(t.value))},c=function(t){t.finished&&(i.iterationsSoFar++,-1===o||i.iterationsSoFar<o?(u.reset(),u.start(c)):a(t))};u.start(s(null==r?void 0:r.loop)?c:a)},e.prototype.setFluid=function(t,e){var n=this;if(t)if(Array.isArray(t)){var i=0,r=function(o){++i!==t.length?n.runAnimation(t[i],r):e&&e(o)};this.runAnimation(t[i],r)}else this.runAnimation(t,e)},e.prototype.getFluid=function(){return this.fluid},e}(),p=function(t,e){var i=n.useRef(new d(t,e)).current,r=n.useCallback((function(t,e){i.setFluid(t,e)}),[]);return[n.useMemo((function(){return i.getFluid()}),[]),r]},y={ELASTIC:{mass:1,friction:18,tension:250},BOUNCE:{duration:500,easing:t.Easing.bounce},EASE:{mass:1,friction:26,tension:170},STIFF:{mass:1,friction:18,tension:350},WOOBLE:{mass:1,friction:8,tension:250},EASE_IN:{duration:500,easing:t.Easing.in(t.Easing.ease)},EASE_OUT:{duration:500,easing:t.Easing.out(t.Easing.ease)},EASE_IN_OUT:{duration:500,easing:t.Easing.inOut(t.Easing.ease)},POWER1:{duration:500,easing:t.Easing.bezier(.17,.42,.51,.97)},POWER2:{duration:500,easing:t.Easing.bezier(.07,.11,.13,1)},POWER3:{duration:500,easing:t.Easing.bezier(.09,.7,.16,1.04)},POWER4:{duration:500,easing:t.Easing.bezier(.05,.54,0,1.03)},LINEAR:{duration:500,easing:t.Easing.linear}};function g(t,e){var i=n.useRef(!0),r=v(p(t,f(f({},y.EASE),e)),2),o=r[0],s=r[1],a=n.useCallback((function(t){Array.isArray(t)?queueMicrotask((function(){return s(t.map((function(t){return u(t)})))})):queueMicrotask((function(){return s(u(t))}))}),[]);return n.useLayoutEffect((function(){i.current||a(t),i.current=!1}),[t,e]),{set value(t){a(t)},get value(){return o},get currentValue(){return o.get()}}}var x=function(){function t(t,e){this.fluidControllers=t.map((function(t){return new d(t,e)}))}return t.prototype.setFluid=function(t,e){this.fluidControllers.map((function(n,i){n.setFluid(t[i],e)}))},t.prototype.getFluid=function(){return this.fluidControllers.map((function(t){return t.getFluid()}))},t}();function E(t,e){var i=function(t,e){var i=v(n.useState(!1),2),r=i[0],o=i[1],s=n.useRef(e).current,a=s.from,c=s.enter,l=s.exit,f=s.config,h=v(p(a,f),2),m=h[0],d=h[1];return n.useLayoutEffect((function(){t?(o(!0),queueMicrotask((function(){return d(Array.isArray(c)?c.map((function(t){return u(t,f)})):u(c,f))}))):d(Array.isArray(l)?l.map((function(t){return u(t,f)})):u(l,f),(function(){o(!1),m.getSubscriptions().forEach((function(t){return m.removeSubscription(t)}))}))}),[t]),function(t){return t(m,r)}}(t,e);return function(t){return i((function(e,n){return t({value:e},n)}))}}function b(t){return t?1:0}function M(t,e,n){return Math.min(Math.max(t,e),n)}function w(t,e,n){return 0===e||Math.abs(e)===1/0?function(t,e){return Math.pow(t,5*e)}(t,n):t*e*n/(e+n*t)}var _=function(t,e){return{toValue:t,config:e}},I=function(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,m([],v(I(e)),!1)):t.push(u(e)),t}),[])};function T(t,e){var n=new Map;return e.forEach((function(e){var i=v(e,3),r=i[0],o=i[1],s=i[2],u=void 0!==s&&s;n.set(r,function(t,e,n,i){return void 0===i&&(i=!1),t.forEach((function(t){t.addEventListener(e,n,i)})),function(){t.forEach((function(t){t.removeEventListener(e,n,i)}))}}(t,r,o,u))})),function(t){var e,i;try{for(var r=h(n.entries()),o=r.next();!o.done;o=r.next()){var s=v(o.value,2),u=s[0],a=s[1];if(!t)return void a();-1!==t.indexOf(u)&&a()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}}}var A=function(t,e){return{x:t,y:e}},O=function(){function t(){this.lastTimeStamp=Date.now(),this.isActive=!1,this.targetElements=[]}return t.prototype._initEvents=function(){},t.prototype._cancelEvents=function(){this._subscribe&&this._subscribe()},t.prototype.applyCallback=function(t){this.callback=t},t.prototype.applyGesture=function(t){var e=this,n=t.targetElement,i=t.targetElements,r=t.callback,o=t.config;return this.targetElement=n,this.targetElements=i.map((function(t){return t.current})),this.callback=r,this.config=o,this._initEvents(),function(){return e._subscribe&&e._subscribe()}},t._VELOCITY_LIMIT=20,t}(),C=function(t){function e(){var e=t.apply(this,m([],v(arguments),!1))||this;return e.movementStart=A(0,0),e.initialMovement=A(0,0),e.movement=A(0,0),e.previousMovement=A(0,0),e.translation=A(0,0),e.offset=A(0,0),e.velocity=A(0,0),e}return l(e,t),e.prototype._initEvents=function(){(this.targetElement||this.targetElements.length>0)&&(this._subscribe=T([window],[["mousedown",this.pointerDown.bind(this)],["mousemove",this.pointerMove.bind(this)],["mouseup",this.pointerUp.bind(this)],["touchstart",this.pointerDown.bind(this),{passive:!1}],["touchmove",this.pointerMove.bind(this),{passive:!1}],["touchend",this.pointerUp.bind(this)]]))},e.prototype._cancelEvents=function(){this._subscribe&&this._subscribe(["mousedown","mousemove","touchstart","touchmove"])},e.prototype._handleCallback=function(){var t=this;this.callback&&this.callback({args:[this.currentIndex],down:this.isActive,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.translation.x,offsetY:this.translation.y,velocityX:this.velocity.x,velocityY:this.velocity.y,distanceX:Math.abs(this.movement.x),distanceY:Math.abs(this.movement.y),directionX:Math.sign(this.movement.x),directionY:Math.sign(this.movement.y),cancel:function(){t._cancelEvents()}})},e.prototype.pointerDown=function(t){var e;"touchstart"===t.type?this.movementStart={x:t.touches[0].clientX,y:t.touches[0].clientY}:this.movementStart={x:t.clientX,y:t.clientY},this.movement={x:0,y:0},this.offset={x:this.translation.x,y:this.translation.y},this.previousMovement={x:0,y:0},this.velocity={x:0,y:0};var n=this.targetElements.find((function(e){return e===t.target}));if(t.target===this.targetElement||n){this.isActive=!0,t.preventDefault(),n&&(this.currentIndex=this.targetElements.indexOf(n));var i=(null===(e=this.config)||void 0===e?void 0:e.initial)&&this.config.initial(),r=null==i?void 0:i.movementX,o=null==i?void 0:i.movementY;this.initialMovement={x:null!=r?r:0,y:null!=o?o:0},this.movement={x:this.initialMovement.x,y:this.initialMovement.y},this.previousMovement={x:this.initialMovement.x,y:this.initialMovement.y},this._handleCallback()}},e.prototype.pointerMove=function(t){if(this.isActive){t.preventDefault();var e=Date.now(),n=M(e-this.lastTimeStamp,.1,64);this.lastTimeStamp=e;var i=n/1e3;"touchmove"===t.type?this.movement={x:this.initialMovement.x+(t.touches[0].clientX-this.movementStart.x),y:this.initialMovement.y+(t.touches[0].clientY-this.movementStart.y)}:this.movement={x:this.initialMovement.x+(t.clientX-this.movementStart.x),y:this.initialMovement.y+(t.clientY-this.movementStart.y)},this.translation={x:this.offset.x+this.movement.x,y:this.offset.y+this.movement.y},this.velocity={x:M((this.movement.x-this.previousMovement.x)/i/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT),y:M((this.movement.y-this.previousMovement.y)/i/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()}},e.prototype.pointerUp=function(){this.isActive&&(this.isActive=!1,this._handleCallback(),this._cancelEvents(),this._initEvents())},e}(O),L=function(t){function e(){var e=t.apply(this,m([],v(arguments),!1))||this;return e.movement=A(0,0),e.previousMovement=A(0,0),e.velocity=A(0,0),e.direction=A(0,0),e}return l(e,t),e.prototype._initEvents=function(){this.targetElement?this._subscribe=T([this.targetElement],[["mousemove",this.onMouseMove.bind(this)]]):this.targetElements.length>0?this._subscribe=T(this.targetElements,[["mousemove",this.onMouseMove.bind(this)]]):this._subscribe=T([window],[["mousemove",this.onMouseMove.bind(this)]])},e.prototype._handleCallback=function(){var t;this.callback&&this.callback({args:[this.currentIndex],event:this.event,isMoving:this.isActive,target:null===(t=this.event)||void 0===t?void 0:t.target,mouseX:this.movement.x,mouseY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},e.prototype.onMouseMove=function(t){var e=this,n=this.targetElements.find((function(e){return e===t.target}));n&&(this.currentIndex=this.targetElements.indexOf(n)),this.event=t;var i=Date.now(),r=Math.min(i-this.lastTimeStamp,64);this.lastTimeStamp=i;var o=r/1e3,s=t.clientX,u=t.clientY;this.movement={x:s,y:u},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){e.isActive=!1,e.direction={x:0,y:0},e.velocity={x:0,y:0},e._handleCallback()}),250);var a=this.movement.x-this.previousMovement.x,c=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(a),y:Math.sign(c)},this.velocity={x:M(a/o/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT),y:M(c/o/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},e}(O),S=function(t){function e(){var e=t.apply(this,m([],v(arguments),!1))||this;return e.movement=A(0,0),e.previousMovement=A(0,0),e.direction=A(0,0),e.velocity=A(0,0),e}return l(e,t),e.prototype._initEvents=function(){this.targetElement?this._subscribe=T([this.targetElement],[["scroll",this.scrollElementListener.bind(this)]]):this._subscribe=T([window],[["scroll",this.scrollListener.bind(this)]])},e.prototype._handleCallback=function(){this.callback&&this.callback({isScrolling:this.isActive,scrollX:this.movement.x,scrollY:this.movement.y,velocityX:this.velocity.x,velocityY:this.velocity.y,directionX:this.direction.x,directionY:this.direction.y})},e.prototype.onScroll=function(t){var e=this,n=t.x,i=t.y,r=Date.now(),o=Math.min(r-this.lastTimeStamp,64);this.lastTimeStamp=r;var s=o/1e3;this.movement={x:n,y:i},-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){e.isActive=!1,e.direction={x:0,y:0},e.velocity={x:0,y:0},e._handleCallback()}),250);var u=this.movement.x-this.previousMovement.x,a=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(u),y:Math.sign(a)},this.velocity={x:M(u/s/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT),y:M(a/s/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},e.prototype.scrollListener=function(){var t=window.pageYOffset,e=window.pageXOffset;this.onScroll({x:e,y:t})},e.prototype.scrollElementListener=function(){var t,e,n=(null===(t=this.targetElement)||void 0===t?void 0:t.scrollLeft)||0,i=(null===(e=this.targetElement)||void 0===e?void 0:e.scrollTop)||0;this.onScroll({x:n,y:i})},e}(O),k=function(t){function e(){var e=t.apply(this,m([],v(arguments),!1))||this;return e.movement=A(0,0),e.previousMovement=A(0,0),e.direction=A(0,0),e.velocity=A(0,0),e.delta=A(0,0),e.offset=A(0,0),e.translation=A(0,0),e}return l(e,t),e.prototype._initEvents=function(){this.targetElement&&(this._subscribe=T([this.targetElement],[["wheel",this.onWheel.bind(this)]]))},e.prototype._handleCallback=function(){this.callback&&this.callback({target:this.targetElement,isWheeling:this.isActive,deltaX:this.delta.x,deltaY:this.delta.y,directionX:this.direction.x,directionY:this.direction.y,movementX:this.movement.x,movementY:this.movement.y,offsetX:this.offset.x,offsetY:this.offset.y,velocityX:this.velocity.x,velocityY:this.velocity.y})},e.prototype.onWheel=function(t){var e=this,n=t.deltaX,i=t.deltaY,r=t.deltaMode,o=Date.now(),s=Math.min(o-this.lastTimeStamp,64);this.lastTimeStamp=o;var u=s/1e3;this.isActive=!0,-1!==this.isActiveID&&(this.isActive=!0,clearTimeout(this.isActiveID)),this.isActiveID=setTimeout((function(){e.isActive=!1,e.translation={x:e.offset.x,y:e.offset.y},e._handleCallback(),e.velocity={x:0,y:0},e.movement={x:0,y:0}}),200),1===r?(n*=40,i*=40):2===r&&(n*=800,i*=800),this.delta={x:n,y:i},this.movement={x:this.movement.x+n,y:this.movement.y+i},this.offset={x:this.translation.x+this.movement.x,y:this.translation.y+this.movement.y};var a=this.movement.x-this.previousMovement.x,c=this.movement.y-this.previousMovement.y;this.direction={x:Math.sign(a),y:Math.sign(c)},this.velocity={x:M(a/u/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT),y:M(c/u/1e3,-1*O._VELOCITY_LIMIT,O._VELOCITY_LIMIT)},this.previousMovement={x:this.movement.x,y:this.movement.y},this._handleCallback()},e}(O),Y=function(t){var e=r.useRef(),n=r.useRef([]),i=r.useRef(new Map).current;return r.useEffect((function(){var e,n;try{for(var r=h(i.entries()),o=r.next();!o.done;o=r.next()){var s=v(o.value,2)[1],u=s.keyIndex,a=s.gesture,c=v(t[u],3)[2];a.applyCallback(c)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),[t]),r.useEffect((function(){return t.forEach((function(t,r){var o=v(t,4),s=o[0],u=o[1],a=o[2],c=o[3];queueMicrotask((function(){return i.set(s,{keyIndex:r,gesture:u,unsubscribe:u.applyGesture({targetElement:e.current,targetElements:n.current,callback:a,config:c})})}))})),function(){var t,e;try{for(var n=h(i.entries()),r=n.next();!r.done;r=n.next()){var o=v(r.value,2)[1].unsubscribe;o&&o()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}}})),function(t){return null==t?{ref:e}:(n.current[t]=n.current[t]||r.createRef(),{ref:n.current[t]})}};Object.defineProperty(exports,"Easing",{enumerable:!0,get:function(){return t.Easing}}),Object.defineProperty(exports,"animate",{enumerable:!0,get:function(){return t.fluid}}),Object.defineProperty(exports,"makeAnimated",{enumerable:!0,get:function(){return t.makeFluid}}),exports.AnimationConfig=y,exports.MountedBlock=function(t){var n=t.state,i=t.children,r=t.from,o=void 0===r?0:r,s=t.enter,u=void 0===s?1:s,a=t.exit,c=E(n,{from:o,enter:u,exit:void 0===a?0:a,config:t.config});return e.jsx(e.Fragment,{children:c((function(t,e){return e&&i({value:t.value})}))})},exports.ScrollableBlock=function(t){var n=t.children,i=t.direction,o=void 0===i?"single":i,s=t.animationConfig,u=t.threshold,a=void 0===u?.2:u,c=r.useRef(null),l=g(0,s);return r.useEffect((function(){var t=c.current,e=new IntersectionObserver((function(t){v(t,1)[0].isIntersecting?l.value=1:"both"===o&&(l.value=0)}),{root:null,threshold:a});return t&&e.observe(t),function(){t&&e.unobserve(t)}}),[]),e.jsx("div",{ref:c,children:n&&n({value:l.value})})},exports.TransitionBlock=function(t){var n=t.state,i=t.children,r=t.config,o=g(b(n),r);return e.jsx(e.Fragment,{children:i({value:o.value})})},exports.bInterpolate=function(t,e,n,i){var r=a(t);return o(r,[0,1],[e,n],i)},exports.bin=b,exports.clamp=M,exports.delay=function(t){return new Promise((function(e){setTimeout((function(){return e(null)}),t)}))},exports.interpolate=function(t,e,n,i){var r=a(t);return o(r,e,n,i)},exports.mix=function(t,e,n){return e*(1-t)+n*t},exports.move=function(t,e,n){var i=t[e],r=t.length,o=e-n;if(o>0)return m(m(m(m([],v(t.slice(0,n)),!1),[i],!1),v(t.slice(n,e)),!1),v(t.slice(e+1,r)),!1);if(o<0){var s=n+1;return m(m(m(m([],v(t.slice(0,e)),!1),v(t.slice(e+1,s)),!1),[i],!1),v(t.slice(s,r)),!1)}return t},exports.rubberClamp=function(t,e,n,i){return void 0===i&&(i=.15),0===i?M(t,e,n):t<e?-w(e-t,n-e,i)+e:t>n?+w(t-n,n-e,i)+n:t},exports.snapTo=function(t,e,n){var i=t+.2*e,r=function(t){return Math.abs(t-i)},o=n.map(r),s=Math.min.apply(Math,m([],v(o),!1));return n.reduce((function(t,e){return r(e)===s?e:t}))},exports.useDrag=function(t,e){var n=r.useRef(new C).current;return Y([["drag",n,t,e]])},exports.useGesture=function(t){var e=t.onDrag,n=t.onWheel,i=t.onScroll,o=t.onMouseMove,s=r.useRef(new C).current,u=r.useRef(new k).current,a=r.useRef(new S).current,c=r.useRef(new L).current;return Y([["drag",s,e],["wheel",u,n],["scroll",a,i],["move",c,o]])},exports.useMeasure=function(t,e){var i=n.useRef(null),r=n.useRef([]),o=n.useRef(t);return n.useEffect((function(){return o.current=t,function(){o.current=function(){return!1}}}),e),n.useEffect((function(){var t=i.current||document.documentElement,e=r.current,n=new ResizeObserver((function(e){var n=v(e,1)[0].target.getBoundingClientRect(),i=n.left,r=n.top,s=n.width,u=n.height,a=window.pageXOffset,c=window.pageYOffset;if(o){if(t===document.documentElement)return;o.current({left:i+a,top:r+c,width:s,height:u,vLeft:i,vTop:r})}})),s=new ResizeObserver((function(t){var e=[],n=[],i=[],r=[],s=[],u=[];t.forEach((function(t){var o=t.target.getBoundingClientRect(),a=o.left,c=o.top,l=o.width,f=o.height,h=a+window.pageXOffset,v=c+window.pageYOffset;e.push(h),n.push(v),i.push(l),r.push(f),s.push(a),u.push(c)})),o&&o.current({left:e,top:n,width:i,height:r,vLeft:s,vTop:u})}));return t&&(t===document.documentElement&&e.length>0?e.forEach((function(t){s.observe(t.current)})):n.observe(t)),function(){t&&(t===document.documentElement&&e.length>0?e.forEach((function(t){s.unobserve(t.current)})):n.unobserve(t))}}),[]),function(t){return null==t?{ref:i}:(r.current[t]=r.current[t]||n.createRef(),{ref:r.current[t]})}},exports.useMount=E,exports.useMouseMove=function(t){var e=r.useRef(new L).current;return Y([["move",e,t]])},exports.useOutsideClick=function(t,e,i){var r=n.useRef();r.current||(r.current=e),n.useEffect((function(){return r.current=e,function(){r.current=function(){return!1}}}),i),n.useEffect((function(){var e=T([document],[["mousedown",function(e){var n=e.target;n&&n.isConnected&&(t.current&&!t.current.contains(n)&&r.current&&r.current(e))}]]);return function(){return e&&e()}}),[])},exports.useScroll=function(t){var e=r.useRef(new S).current;return Y([["scroll",e,t]])},exports.useValue=g,exports.useValues=function(t,e){var i=n.useRef(!0),r=v(function(t,e){var i=n.useRef(new x(t,e)).current,r=n.useCallback((function(t,e){i.setFluid(t,e)}),[]);return[n.useMemo((function(){return i.getFluid()}),[]),r]}(t,f(f({},y.EASE),e)),2),o=r[0],s=r[1],a=n.useCallback((function(t){var e=t.map((function(t){return Array.isArray(t)?t.map((function(t){return u(t)})):u(t)}));queueMicrotask((function(){return s(e)}))}),[]);return n.useLayoutEffect((function(){i.current||a(t),i.current=!1}),[t,e]),{set value(t){a(t)},get value(){return o},get currentValue(){return o.map((function(t){return t.get()}))}}},exports.useWheel=function(t){var e=r.useRef(new k).current;return Y([["wheel",e,t]])},exports.useWindowDimension=function(t,e){var i=n.useRef({width:0,height:0,innerWidth:0,innerHeight:0}),r=n.useRef(t);n.useEffect((function(){return r.current=t,function(){r.current=function(){return!1}}}),e),n.useEffect((function(){var t=new ResizeObserver((function(t){var e=v(t,1)[0].target,n=e.clientWidth,o=e.clientHeight,s=window.innerWidth,u=window.innerHeight;i.current={width:n,height:o,innerWidth:s,innerHeight:u},r&&r.current(f({},i.current))}));return t.observe(document.documentElement),function(){return t.unobserve(document.documentElement)}}),[])},exports.withConfig=_,exports.withDecay=function(t){return{config:f({decay:!0},t)}},exports.withDelay=function(t,e){return f(f({},e),{config:f(f({},e.config),{delay:t})})},exports.withEase=function(t,e){return _(t,f(f({},y.EASE),e))},exports.withLoop=function(t,e){if(Array.isArray(t)){for(var n=[],i=0;i<e;i++)n=n.concat(t);return n}return Array(e).fill({toValue:t.toValue,config:f(f({},t.config),{loop:e})})},exports.withSequence=function(t){return I(t)},exports.withSpring=function(t,e){return _(t,f(f({},y.ELASTIC),e))},exports.withTiming=function(t,e){return _(t,f({duration:250},e))};
2
2
  //# sourceMappingURL=index.js.map