Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

framer-motion

Package Overview
Dependencies
Maintainers
20
Versions
1157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framer-motion - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

CHANGELOG.md

74

dist/framer-motion.cjs.js

@@ -1047,9 +1047,17 @@ 'use strict';

var getVelocity = function (_a) {
var x = _a.x, y = _a.y;
return ({
x: x.getVelocity(),
y: y.getVelocity(),
});
};
function usePanGesture(_a, ref) {
var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd;
var session = null;
var pointer = React.useRef(null);
var onPointerMove = React.useMemo(function () {
return function (event, _a) {
var point = _a.point, devicePoint = _a.devicePoint;
if (!session) {
if (!session || pointer.current === null) {
console.error("Pointer move without started session");

@@ -1060,6 +1068,8 @@ return;

var offset = Point.subtract(devicePoint, session.startDevicePoint);
pointer.current.x.set(point.x);
pointer.current.y.set(point.y);
if (Math.abs(delta.x) > 0 || Math.abs(delta.y) > 0) {
if (session.startEvent) {
if (onPan) {
onPan({ point: point, devicePoint: devicePoint, delta: delta, offset: offset }, event);
onPan(event, { point: point, devicePoint: devicePoint, delta: delta, offset: offset, velocity: getVelocity(pointer.current) });
}

@@ -1069,3 +1079,9 @@ }

if (onPanStart) {
onPanStart({ point: point, devicePoint: devicePoint, delta: delta, offset: offset }, event);
onPanStart(event, {
point: point,
devicePoint: devicePoint,
delta: delta,
offset: offset,
velocity: getVelocity(pointer.current),
});
}

@@ -1081,3 +1097,3 @@ session.startEvent = event;

var point = _a.point, devicePoint = _a.devicePoint;
if (!session) {
if (!session || pointer.current === null) {
console.error("Pointer end without started session");

@@ -1091,3 +1107,3 @@ return;

if (onPanEnd) {
onPanEnd({ point: point, devicePoint: devicePoint, delta: delta, offset: offset }, event);
onPanEnd(event, { point: point, devicePoint: devicePoint, delta: delta, offset: offset, velocity: getVelocity(pointer.current) });
}

@@ -1101,3 +1117,7 @@ session = null;

return function (event, _a) {
var devicePoint = _a.devicePoint;
var devicePoint = _a.devicePoint, point = _a.point;
pointer.current = {
x: motionValue(point.x),
y: motionValue(point.y),
};
session = {

@@ -1175,10 +1195,22 @@ target: event.target,

var draggableDefaults = {
dragEnabled: false,
dragLocksDirection: false,
dragPropagation: false,
var draggableDefaults = function (props) {
var defaultValues = { dragEnabled: false, dragLocksDirection: false, dragPropagation: false };
var result = defaultValues;
Object.assign(result, props);
if (props.dragEnabled === undefined) {
if (props.dragLocksDirection || props.dragPropagation) {
result.dragEnabled = true;
}
}
return result;
};
function defaults(props, defaultProps) {
var result = defaultProps;
Object.assign(result, props);
var result;
if (typeof defaultProps === "function") {
result = defaultProps(props);
}
else {
result = defaultProps;
Object.assign(result, props);
}
return result;

@@ -1192,12 +1224,6 @@ }

var _a = defaults(props, draggableDefaults), dragEnabled = _a.dragEnabled, dragPropagation = _a.dragPropagation, dragLocksDirection = _a.dragLocksDirection;
var point = {};
var currentDirection = null;
if (shouldDrag("x", dragEnabled, currentDirection)) {
point.x = values.get("x", 0);
}
if (shouldDrag("y", dragEnabled, currentDirection)) {
point.y = values.get("y", 0);
}
var point = React.useRef({ x: values.get("x", 0), y: values.get("y", 0) });
var motionContext = React.useContext(MotionContext);
var openGlobalLock = false;
var currentDirection = null;
var onPanStart = React.useMemo(function () {

@@ -1216,3 +1242,3 @@ return function () {

var onPan = React.useMemo(function () {
return function (_a) {
return function (_event, _a) {
var delta = _a.delta, offset = _a.offset;

@@ -1228,7 +1254,7 @@ if (!dragPropagation && !openGlobalLock) {

}
var x = point.x, y = point.y;
if (shouldDrag("x", dragEnabled, currentDirection) && x) {
var _b = point.current, x = _b.x, y = _b.y;
if (shouldDrag("x", dragEnabled, currentDirection)) {
x.set(x.get() + delta.x);
}
if (shouldDrag("y", dragEnabled, currentDirection) && y) {
if (shouldDrag("y", dragEnabled, currentDirection)) {
y.set(y.get() + delta.y);

@@ -1235,0 +1261,0 @@ }

@@ -1039,9 +1039,17 @@ import sync, { getFrameData, cancelSync } from 'framesync';

var getVelocity = function (_a) {
var x = _a.x, y = _a.y;
return ({
x: x.getVelocity(),
y: y.getVelocity(),
});
};
function usePanGesture(_a, ref) {
var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd;
var session = null;
var pointer = useRef(null);
var onPointerMove = useMemo(function () {
return function (event, _a) {
var point = _a.point, devicePoint = _a.devicePoint;
if (!session) {
if (!session || pointer.current === null) {
console.error("Pointer move without started session");

@@ -1052,6 +1060,8 @@ return;

var offset = Point.subtract(devicePoint, session.startDevicePoint);
pointer.current.x.set(point.x);
pointer.current.y.set(point.y);
if (Math.abs(delta.x) > 0 || Math.abs(delta.y) > 0) {
if (session.startEvent) {
if (onPan) {
onPan({ point: point, devicePoint: devicePoint, delta: delta, offset: offset }, event);
onPan(event, { point: point, devicePoint: devicePoint, delta: delta, offset: offset, velocity: getVelocity(pointer.current) });
}

@@ -1061,3 +1071,9 @@ }

if (onPanStart) {
onPanStart({ point: point, devicePoint: devicePoint, delta: delta, offset: offset }, event);
onPanStart(event, {
point: point,
devicePoint: devicePoint,
delta: delta,
offset: offset,
velocity: getVelocity(pointer.current),
});
}

@@ -1073,3 +1089,3 @@ session.startEvent = event;

var point = _a.point, devicePoint = _a.devicePoint;
if (!session) {
if (!session || pointer.current === null) {
console.error("Pointer end without started session");

@@ -1083,3 +1099,3 @@ return;

if (onPanEnd) {
onPanEnd({ point: point, devicePoint: devicePoint, delta: delta, offset: offset }, event);
onPanEnd(event, { point: point, devicePoint: devicePoint, delta: delta, offset: offset, velocity: getVelocity(pointer.current) });
}

@@ -1093,3 +1109,7 @@ session = null;

return function (event, _a) {
var devicePoint = _a.devicePoint;
var devicePoint = _a.devicePoint, point = _a.point;
pointer.current = {
x: motionValue(point.x),
y: motionValue(point.y),
};
session = {

@@ -1167,10 +1187,22 @@ target: event.target,

var draggableDefaults = {
dragEnabled: false,
dragLocksDirection: false,
dragPropagation: false,
var draggableDefaults = function (props) {
var defaultValues = { dragEnabled: false, dragLocksDirection: false, dragPropagation: false };
var result = defaultValues;
Object.assign(result, props);
if (props.dragEnabled === undefined) {
if (props.dragLocksDirection || props.dragPropagation) {
result.dragEnabled = true;
}
}
return result;
};
function defaults(props, defaultProps) {
var result = defaultProps;
Object.assign(result, props);
var result;
if (typeof defaultProps === "function") {
result = defaultProps(props);
}
else {
result = defaultProps;
Object.assign(result, props);
}
return result;

@@ -1184,12 +1216,6 @@ }

var _a = defaults(props, draggableDefaults), dragEnabled = _a.dragEnabled, dragPropagation = _a.dragPropagation, dragLocksDirection = _a.dragLocksDirection;
var point = {};
var currentDirection = null;
if (shouldDrag("x", dragEnabled, currentDirection)) {
point.x = values.get("x", 0);
}
if (shouldDrag("y", dragEnabled, currentDirection)) {
point.y = values.get("y", 0);
}
var point = useRef({ x: values.get("x", 0), y: values.get("y", 0) });
var motionContext = useContext(MotionContext);
var openGlobalLock = false;
var currentDirection = null;
var onPanStart = useMemo(function () {

@@ -1208,3 +1234,3 @@ return function () {

var onPan = useMemo(function () {
return function (_a) {
return function (_event, _a) {
var delta = _a.delta, offset = _a.offset;

@@ -1220,7 +1246,7 @@ if (!dragPropagation && !openGlobalLock) {

}
var x = point.x, y = point.y;
if (shouldDrag("x", dragEnabled, currentDirection) && x) {
var _b = point.current, x = _b.x, y = _b.y;
if (shouldDrag("x", dragEnabled, currentDirection)) {
x.set(x.get() + delta.x);
}
if (shouldDrag("y", dragEnabled, currentDirection) && y) {
if (shouldDrag("y", dragEnabled, currentDirection)) {
y.set(y.get() + delta.y);

@@ -1227,0 +1253,0 @@ }

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.FramerMotion={},t.React)}(this,function(t,D){"use strict";var e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"],n=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],r=e.concat(n),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(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,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function V(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n}var u,a,s=0,c="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-s));s=e+n,setTimeout(function(){return t(s)},n)};(a=u||(u={})).Read="read",a.Update="update",a.Render="render",a.PostRender="postRender",a.FixedUpdate="fixedUpdate";var f=1/60*1e3,p=!0,d=!1,l=!1,h={delta:0,timestamp:0},v=[u.Read,u.Update,u.Render,u.PostRender],m=function(t){return d=t},g=v.reduce(function(t,e){var r,i,u,a,s,o,c,f,p,l=(r=m,i=[],s=!(u=[]),o=a=0,c=new WeakSet,f=new WeakSet,p={cancel:function(t){var e=u.indexOf(t);c.add(t),-1!==e&&u.splice(e,1)},process:function(t){var e,n;if(s=!0,i=(e=[u,i])[0],(u=e[1]).length=0,a=i.length)for(o=0;o<a;o++)(n=i[o])(t),!0!==f.has(n)||c.has(n)||(p.schedule(n),r(!0));s=!1},schedule:function(t,e,n){var r=n&&s,o=r?i:u;e&&f.add(t),-1===o.indexOf(t)&&(o.push(t),r&&(a=i.length))}});return t.sync[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),d||P(),l.schedule(t,e,n),t},t.cancelSync[e]=function(t){return l.cancel(t)},t.steps[e]=l,t},{steps:{},sync:{},cancelSync:{}}),y=g.steps,U=g.sync,I=g.cancelSync,b=function(t){return y[t].process(h)},w=function(t){d=!1,h.delta=p?f:Math.max(Math.min(t-h.timestamp,40),1),p||(f=h.delta),h.timestamp=t,l=!0,v.forEach(b),l=!1,d&&(p=!1,c(w))},P=function(){p=d=!0,l||c(w)},M=function(){return h},O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},S=function(e,n){return function(t){return Math.max(Math.min(t,n),e)}},x=function(e){return function(t){return"string"==typeof t&&0===t.indexOf(e)}},k=function(t){return t%1?Number(t.toFixed(5)):t},E={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},C=O({},E,{transform:S(0,1)}),A=O({},E,{default:1}),T=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},L=T("deg"),R=T("%"),Y=T("px"),X=T("vh"),j=T("vw"),W=S(0,255),B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,q=function(t){return void 0!==t.red},Z=function(t){return void 0!==t.hue},_=function(u){var a=u.length;return function(t){if("string"!=typeof t)return t;for(var e,n,r={},o="string"==typeof(e=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")))?e.split(/,\s*/):[e],i=0;i<a;i++)r[u[i]]=void 0!==o[i]?parseFloat(o[i]):1;return r}},z=O({},E,{transform:function(t){return Math.round(W(t))}}),N=x("rgb"),G={test:function(t){return"string"==typeof t?N(t):q(t)},parse:_(["red","green","blue","alpha"]),transform:function(t){var e,n,r,o,i,u=t.red,a=t.green,s=t.blue,c=t.alpha;return e={red:z.transform(u),green:z.transform(a),blue:z.transform(s),alpha:k(c)},n=e.red,r=e.green,o=e.blue,i=e.alpha,"rgba("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},H=x("hsl"),$={test:function(t){return"string"==typeof t?H(t):Z(t)},parse:_(["hue","saturation","lightness","alpha"]),transform:function(t){var e,n,r,o,i,u=t.hue,a=t.saturation,s=t.lightness,c=t.alpha;return e={hue:Math.round(u),saturation:R.transform(k(a)),lightness:R.transform(k(s)),alpha:k(c)},n=e.hue,r=e.saturation,o=e.lightness,i=e.alpha,"hsla("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},K=O({},G,{test:x("#"),parse:function(t){var e="",n="",r="";return 4<t.length?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(t){return"string"==typeof t&&B.test(t)||G.test(t)||$.test(t)||K.test(t)},parse:function(t){return G.test(t)?G.parse(t):$.test(t)?$.parse(t):K.test(t)?K.parse(t):t},transform:function(t){return q(t)?G.transform(t):Z(t)?$.transform(t):t}},Q=/(-)?(\d[\d\.]*)/g,tt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,et="${c}",nt=function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(Q),r=t.match(tt);return n&&(e+=n.length),r&&(e+=r.length),0<e},rt=function(t){var e=t,n=[],r=e.match(tt);r&&(e=e.replace(tt,et),n.push.apply(n,r.map(J.parse)));var o=e.match(Q);return o&&n.push.apply(n,o.map(E.parse)),n},ot=function(t){var r=t,o=0,e=t.match(tt),i=e?e.length:0;if(e)for(var n=0;n<i;n++)r=r.replace(e[n],et),o++;var u=r.match(Q),a=u?u.length:0;if(u)for(n=0;n<a;n++)r=r.replace(u[n],"${n}"),o++;return function(t){for(var e=r,n=0;n<o;n++)e=e.replace(n<i?et:"${n}",n<i?J.transform(t[n]):k(t[n]));return e}},it=function(e){return function(t){return 1-e(1-t)}},ut=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},at=function(e){return function(t){return t*t*((e+1)*t-e)}},st=function(t){var e=at(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},ct=function(t){return t},ft=function(e){return function(t){return Math.pow(t,e)}}(2),pt=it(ft),lt=ut(ft),dt=function(t){return 1-Math.sin(Math.acos(t))},ht=it(dt),vt=ut(ht),mt=at(1.525),gt=it(mt),yt=ut(mt),bt=st(1.525),wt="undefined"!=typeof Float32Array,Pt=function(t,e){return 1-3*e+3*t},Mt=function(t,e){return 3*e-6*t},Ot=function(t){return 3*t},St=function(t,e,n){return 3*Pt(e,n)*t*t+2*Mt(e,n)*t+Ot(e)},xt=function(t,e,n){return((Pt(e,n)*t+Mt(e,n))*t+Ot(e))*t};function kt(u,e,a,n){var s=wt?new Float32Array(11):new Array(11),r=function(t){for(var e,n,r,o=0,i=1;10!==i&&s[i]<=t;++i)o+=.1;return e=(t-s[--i])/(s[i+1]-s[i]),.001<=(r=St(n=o+.1*e,u,a))?function(t,e){for(var n=0,r=0;n<8;++n){if(0===(r=St(e,u,a)))return e;e-=(xt(e,u,a)-t)/r}return e}(t,n):0===r?n:function(t,e,n){for(var r,o,i=0;0<(r=xt(o=e+(n-e)/2,u,a)-t)?n=o:e=o,1e-7<Math.abs(r)&&++i<10;);return o}(t,o,o+.1)};!function(){for(var t=0;t<11;++t)s[t]=xt(.1*t,u,a)}();return function(t){return u===e&&a===n?t:0===t?0:1===t?1:xt(r(t),e,n)}}var Et=function(t){return"number"==typeof t},Ct=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},At=Ct(function(t,e,n){return Math.min(Math.max(n,t),e)}),Tt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Lt=function(t,e,n){return-n*t+n*e+t},Rt=function(){return(Rt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yt=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Xt=[K,G,$],jt=function(e){return Xt.find(function(t){return t.test(e)})},Dt=function(t,e){var n=jt(t),r=jt(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=Rt({},o),a=n===$?Lt:Yt;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=Lt(o.alpha,i.alpha,t),n.transform(u)}},Ft=function(e,n){return function(t){return n(e(t))}},Vt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Ft)},Ut=function(t,r){var n=t.slice(),o=n.length,i=t.map(function(e,t){var n=r[t];return Et(e)?function(t){return Lt(e,n,t)}:J.test(e)?Dt(e,n):It(e,n)});return function(t){for(var e=0;e<o;e++)n[e]=i[e](t);return n}},It=function(t,e){var n=ot(t);return n(t),ot(e)(t),Vt(Ut(rt(t),rt(e)),n)},Wt=(Ct(Lt),function(t){return t}),Bt=function(i){return void 0===i&&(i=Wt),Ct(function(t,e,n){var r=e-n,o=-(0-t+1)*(0-i(Math.abs(r)));return r<=0?e+o:e-o})},qt=(Bt(),Bt(Math.sqrt),function(t,e){return Et(t)?t/(1e3/e):0}),Zt=function(t,e){return e?t*(1e3/e):0};Ct(function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t}),At(0,1);var _t=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(F({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:Vt.apply(void 0,t);return this.applyMiddleware(function(e){return function(t){return e(n(t))}})},t.prototype.while=function(r){return this.applyMiddleware(function(e,n){return function(t){return r(t)?e(t):n()}})},t.prototype.filter=function(n){return this.applyMiddleware(function(e){return function(t){return n(t)&&e(t)}})},t}(),zt=function(){return function(t,e){var n=t.middleware,r=t.onComplete,o=this;this.isActive=!0,this.update=function(t){o.observer.update&&o.updateObserver(t)},this.complete=function(){o.observer.complete&&o.isActive&&o.observer.complete(),o.onComplete&&o.onComplete(),o.isActive=!1},this.error=function(t){o.observer.error&&o.isActive&&o.observer.error(t),o.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=r,e.update&&n&&n.length&&n.forEach(function(t){return o.updateObserver=t(o.updateObserver,o.complete)})}}(),Nt=function(t,e,n){var r=e.middleware;return new zt({middleware:r,onComplete:n},"function"==typeof t?{update:t}:t)},Gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,o=r.init,i=V(r,["init"]),u=o(Nt(t,i,function(){e=!0,n.stop()}));return n=u?F({},n,u):n,t.registerParent&&t.registerParent(n),e&&n.stop(),n},e}(_t),Ht=function(t){return new Gt({init:t})},$t=function(t){var f=t.getCount,p=t.getFirst,l=t.getOutput,d=t.mapApi,h=t.setProp,v=t.startActions;return function(c){return Ht(function(t){var e=t.update,r=t.complete,o=t.error,i=f(c),u=l(),a=function(){return e(u)},s=0,n=v(c,function(t,e){var n=!1;return t.start({complete:function(){n||(n=!0,++s===i&&U.update(r))},error:o,update:function(t){h(u,e,t),U.update(a,!1,!0)}})});return Object.keys(p(n)).reduce(function(t,e){return t[e]=d(n,e),t},{})})}},Kt=$t({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(o,i){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return Object.keys(o).reduce(function(t,e){var n;return o[e][i]&&(r[0]&&void 0!==r[0][e]?t[e]=o[e][i](r[0][e]):t[e]=(n=o[e])[i].apply(n,r)),t},{})}},setProp:function(t,e,n){return t[e]=n},startActions:function(n,r){return Object.keys(n).reduce(function(t,e){return t[e]=r(n[e],e),t},{})}}),Jt=$t({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(e,r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.map(function(t,e){if(t[r])return Array.isArray(n[0])?t[r](n[0][e]):t[r].apply(t,n)})}},setProp:function(t,e,n){return t[e]=n},startActions:function(t,n){return t.map(function(t,e){return n(t,e)})}}),Qt=[Y,R,L,X,j],te=function(e){return Qt.find(function(t){return t.test(e)})},ee=function(t,e){return t(e)},ne=function(o,i,u){var t=u[0],e=i[t].map(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return se(t)(o,r)});return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Jt(t)}.apply(void 0,e)},re=function(o,i,u){var a=u[0],t=Object.keys(i[a]).reduce(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return t[e]=se(i[a][e])(o,r),t},{});return Kt(t)},oe=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=te(n)||te(r),u=i.transform,a=i.parse;return t(F({},o,{from:"string"==typeof n?a(n):n,to:"string"==typeof r?a(r):r})).pipe(u)},ie=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]);return t(F({},o,{from:0,to:1})).pipe(Dt(n,r),J.transform)},ue=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=ot(n);return i(n),ot(r)(n),t(F({},o,{from:0,to:1})).pipe(Ut(rt(n),rt(r)),i)},ae=function(r,t){var n,o,i,e=(n=t,o=Object.keys(n),i=function(t,e){return void 0!==t&&!n[e](t)},{getVectorKeys:function(n){return o.reduce(function(t,e){return i(n[e],e)&&t.push(e),t},[])},testVectorProps:function(e){return e&&o.some(function(t){return i(e[t],t)})}}),u=e.testVectorProps,a=e.getVectorKeys;return function(t){if(!u(t))return r(t);var e=a(t),n=t[e[0]];return se(n)(r,t,e)}},se=function(t){var e=ee;return"number"==typeof t?e=ee:Array.isArray(t)?e=ne:Boolean(te(t))?e=oe:J.test(t)?e=ie:nt(t)?e=ue:"object"==typeof t&&(e=re),e},ce=ae(function(b){return void 0===b&&(b={}),Ht(function(t){var o=t.complete,i=t.update,e=b.velocity,n=void 0===e?0:e,r=b.from,u=void 0===r?0:r,a=b.power,s=void 0===a?.8:a,c=b.timeConstant,f=void 0===c?350:c,p=b.restDelta,l=void 0===p?.5:p,d=b.modifyTarget,h=0,v=s*n,m=Math.round(u+v),g=void 0===d?m:d(m),y=U.update(function(t){var e=t.delta;h+=e;var n=-v*Math.exp(-h/f),r=l<n||n<-l;i(r?g+n:g),r||(I.update(y),o())},!0);return{stop:function(){return I.update(y)}}})},{from:E.test,modifyTarget:function(t){return"function"==typeof t},velocity:E.test}),fe=ae(function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,u=void 0===i?ct:i;return Ht(function(t){var e=t.update;return{seek:function(t){return e(t)}}}).pipe(u,function(t){return Lt(n,o,t)})},{ease:function(t){return"function"==typeof t},from:E.test,to:E.test}),pe=At(0,1),le=function(j){return void 0===j&&(j={}),Ht(function(t){var n,r=t.update,o=t.complete,e=j.duration,i=void 0===e?300:e,u=j.ease,a=void 0===u?pt:u,s=j.flip,c=void 0===s?0:s,f=j.loop,p=void 0===f?0:f,l=j.yoyo,d=void 0===l?0:l,h=j.from,v=void 0===h?0:h,m=j.to,g=void 0===m?1:m,y=j.elapsed,b=void 0===y?0:y,w=j.playDirection,P=void 0===w?1:w,M=j.flipCount,O=void 0===M?0:M,S=j.yoyoCount,x=void 0===S?0:S,k=j.loopCount,E=void 0===k?0:k,C=fe({from:v,to:g,ease:a}).start(r),A=0,T=!1,L=function(){return P*=-1},R=function(){A=pe(Tt(0,i,b)),C.seek(A)},Y=function(){T=!0,n=U.update(function(t){var e=t.delta;b+=e*P,R(),function(){var t,e=1===P?T&&i<=b:T&&b<=0;if(!e)return!1;if(e&&!p&&!c&&!d)return!0;var n=!1;return p&&E<p?(E++,n=!(b=0)):c&&O<c?(b=i-b,C=fe({from:v=(t=[g,v])[0],to:g=t[1],ease:a}).start(r),O++,n=!0):d&&x<d&&(L(),x++,n=!0),!n}()&&o&&(I.update(n),U.update(o,!1,!0))},!0)},X=function(){T=!1,n&&I.update(n)};return Y(),{isActive:function(){return T},getElapsed:function(){return At(0,i,b)},getProgress:function(){return A},stop:function(){X()},pause:function(){return X(),this},resume:function(){return T||Y(),this},seek:function(t){return b=Lt(0,i,t),U.update(R,!1,!0),this},reverse:function(){return L(),this}}})},de=At(0,1),he=ae(function(m){return void 0===m&&(m={}),Ht(function(t){var r=t.complete,o=t.update,e=m.acceleration,i=void 0===e?0:e,n=m.friction,u=void 0===n?0:n,a=m.velocity,s=void 0===a?0:a,c=m.springStrength,f=m.to,p=m.restSpeed,l=void 0===p?.001:p,d=m.from,h=void 0===d?0:d,v=U.update(function(t){var e=t.delta,n=Math.max(e,16);(i&&(s+=qt(i,n)),u&&(s*=Math.pow(1-u,n/100)),void 0!==c&&void 0!==f)&&(s+=(f-h)*qt(c,n));h+=qt(s,n),o(h),!1!==l&&(!s||Math.abs(s)<=l)&&(I.update(v),r())},!0);return{set:function(t){return h=t,this},setAcceleration:function(t){return i=t,this},setFriction:function(t){return u=t,this},setSpringStrength:function(t){return c=t,this},setSpringTarget:function(t){return f=t,this},setVelocity:function(t){return s=t,this},stop:function(){return I.update(v)}}})},{acceleration:E.test,friction:E.test,velocity:E.test,from:E.test,to:E.test,springStrength:E.test}),ve=ae(function(x){return void 0===x&&(x={}),Ht(function(t){var s=t.update,c=t.complete,e=x.velocity,f=void 0===e?0:e,n=x.from,r=void 0===n?0:n,o=x.to,p=void 0===o?0:o,i=x.stiffness,l=void 0===i?100:i,u=x.damping,d=void 0===u?10:u,a=x.mass,h=void 0===a?1:a,v=x.restSpeed,m=void 0===v?.01:v,g=x.restDelta,y=void 0===g?.01:g,b=f?-f/1e3:0,w=0,P=p-r,M=r,O=M,S=U.update(function(t){var e=t.delta;w+=e;var n=d/(2*Math.sqrt(l*h)),r=Math.sqrt(l/h)/1e3;if(O=M,n<1){var o=Math.exp(-n*r*w),i=r*Math.sqrt(1-n*n);M=p-o*((b+n*r*P)/i*Math.sin(i*w)+P*Math.cos(i*w))}else{o=Math.exp(-r*w);M=p-o*(P+(b+r*P)*w)}f=Zt(M-O,e);var u=Math.abs(f)<=m,a=Math.abs(p-M)<=y;u&&a?(s(M=p),I.update(S),c()):s(M)},!0);return{stop:function(){return I.update(S)}}})},{from:E.test,to:E.test,stiffness:E.test,damping:E.test,mass:E.test,velocity:E.test}),me=function(r,o,i){return Ht(function(t){var e=t.update,n=o.split(" ").map(function(t){return r.addEventListener(t,e,i),t});return{stop:function(){return n.forEach(function(t){return r.removeEventListener(t,e,i)})}}})},ge=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},ye=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},be=[ge()];if("undefined"!=typeof document){me(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var e=t.touches,n=e.length,r=be.length=0;r<n;r++){var o=e[r];be.push(ye(o))}})}var we=ge();if("undefined"!=typeof document){me(document,"mousedown mousemove",!0).start(function(t){ye(t,we)})}var Pe,Me=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},Oe=Me(function(t,e,n){return Math.min(Math.max(n,t),e)}),Se=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},xe=function(t,e,n){return-n*t+n*e+t},ke=function(){return(ke=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Ee=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Ce=[K,G,$],Ae=function(e){return Ce.find(function(t){return t.test(e)})},Te=function(t,e){var n=Ae(t),r=Ae(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=ke({},o),a=n===$?xe:Ee;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=xe(o.alpha,i.alpha,t),n.transform(u)}},Le=function(e,n){return function(t){return n(e(t))}},Re=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Le)},Ye=function(t,e){var n,r,o,i,u,a=ot(t);return a(t),ot(e)(t),Re((n=rt(t),r=rt(e),o=n.slice(),i=o.length,u=n.map(function(e,t){var n=r[t];return"number"==typeof e?function(t){return xe(e,n,t)}:J.test(e)?Te(e,n):Ye(e,n)}),function(t){for(var e=0;e<i;e++)o[e]=u[e](t);return o}),a)},Xe=Me(xe),je=function(o,i){return Array(o.length-1).fill((t=o[0],"number"==typeof t?Xe:J.test(t)?Te:Ye)).map(function(t,e){var n=t(o[e],o[e+1]);if(i){var r=Array.isArray(i)?i[e]:i;return Re(r,n)}return n});var t},De=function(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,u=r.ease,a=t.length;e.length,!u||!Array.isArray(u)||(u.length,t.length),t[0]>t[a-1]&&(t=t.slice(),e=e.slice(),t.reverse(),e.reverse());var s,c,f,p,l,d,h,v,m,g=je(e,u),y=2===a?(d=g,h=(l=t)[0],v=l[1],m=d[0],function(t){return m(Se(h,v,t))}):(c=g,f=(s=t).length,p=f-1,function(t){var e=0,n=!1;if(t<=s[0]?n=!0:t>=s[p]&&(e=p-1,n=!0),!n){for(var r=1;r<f&&!(s[r]>t||r===p);r++);e=r-1}var o=Se(s[e],s[e+1],t);return c[e](o)});return i?Re(Oe(t[0],t[a-1]),y):y},Fe=(Oe(0,1),function(){function n(t,e){var n,r=void 0===e?{}:e,o=r.transformer,i=r.parent,u=this;this.timeDelta=0,this.lastUpdated=0,this.cancelSubscriber=new Set,this.canTrackVelocity=!1,this.notifySubscriber=function(t){t(u.current)},this.scheduleVelocityCheck=function(){return U.postRender(u.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==u.lastUpdated&&(u.prev=u.current)},this.setChild=function(t){return t.set(u.current)},this.parent=i,this.transformer=o,this.set(t),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return n.prototype.addChild=function(t){var e=new n(this.current,F({parent:this},t));return this.children||(this.children=new Set),this.children.add(e),e},n.prototype.removeChild=function(t){this.children&&this.children.delete(t)},n.prototype.addUpdateSubscription=function(t){var e=this;this.updateSubscribers||(this.updateSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.update(n,!1,!0)};return this.updateSubscribers.add(r),this.cancelSubscriber.add(function(){return I.update(n)}),function(){return e.updateSubscribers.delete(r)}},n.prototype.addRenderSubscription=function(t){var e=this;this.renderSubscribers||(this.renderSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.render(n)};return this.renderSubscribers.add(r),r(),this.cancelSubscriber.add(function(){return I.render(n)}),function(){return e.renderSubscribers.delete(r)}},n.prototype.set=function(t,e){void 0===e&&(e=!0),this.prev=this.current,this.current=this.transformer?this.transformer(t):t,this.updateSubscribers&&this.updateSubscribers.forEach(this.notifySubscriber),this.children&&this.children.forEach(this.setChild),e&&this.renderSubscribers&&this.renderSubscribers.forEach(this.notifySubscriber);var n=M(),r=n.delta,o=n.timestamp;this.timeDelta=r,this.lastUpdated=o,U.postRender(this.scheduleVelocityCheck)},n.prototype.get=function(){return this.current},n.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.prev)-parseFloat(this.current),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},n.prototype.control=function(t,e,n){var r=this,o=e.delay,i=V(e,["delay"]);this.stop();var u,a=t(F({from:this.get(),velocity:this.getVelocity()},i));return n&&(a=a.pipe(n)),o&&(a=function(){for(var u=[],t=0;t<arguments.length;t++)u[t]=arguments[t];return Ht(function(t){var e,n=t.update,r=t.complete,o=0,i=function(){e=u[o].start({complete:function(){++o>=u.length?r():i()},update:n})};return i(),{stop:function(){return e&&e.stop()}}})}((u=o,Ht(function(t){var e=t.complete,n=setTimeout(e,u);return{stop:function(){return clearTimeout(n)}}})),a)),new Promise(function(t){r.controller=a.start({update:function(t){return r.set(t)},complete:t})})},n.prototype.stop=function(){this.controller&&this.controller.stop()},n.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.cancelSubscriber.forEach(function(t){return t()}),this.cancelSubscriber.clear(),this.parent&&this.parent.removeChild(this),this.stop()},n}()),Ve=function(t,e){return new Fe(t,e)},Ue=function(t){var e,n=t instanceof Fe?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))},Ie=function(t){return[t.join(",")]},We=D.createContext({dragging:!1}),Be=function(){return(Be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qe=function(t){var s=t.onRead,e=t.onRender,n=t.aliasMap,c=void 0===n?{}:n,r=t.uncachedValues,f=void 0===r?new Set:r,o=t.useCache,p=void 0===o||o;return function(n){var o={},i=[],u=!1,r=function(t,e){var n=c[t]||t,r=o[n];o[n]=e,o[n]!==r&&(-1===i.indexOf(n)&&i.push(n),u||(u=!0,U.render(a)))};function a(t){return void 0===t&&(t=!1),(!0===t||u)&&(e(o,n,i),u=!1,i.length=0),this}return{get:function(t){var e=c[t]||t;return e?p&&!f.has(e)&&void 0!==o[e]?o[e]:s(e,n):o},set:function(e,t){if("string"==typeof e){if(void 0===t)return function(t){return r(e,t)};r(e,t)}else for(var n in e)e.hasOwnProperty(n)&&r(n,e[n]);return this},render:a}}},Ze=/([a-z])([A-Z])/g,_e=function(t){return t.replace(Ze,"$1-$2").toLowerCase()},ze=new Map,Ne=new Map,Ge=["Webkit","Moz","O","ms",""],He=Ge.length,$e="undefined"!=typeof document,Ke=function(t,e){return Ne.set(t,_e(e))},Je=function(t,e){void 0===e&&(e=!1);var n,r=e?Ne:ze;return r.has(t)||($e?function(t){Pe=Pe||document.createElement("div");for(var e=0;e<He;e++){var n=Ge[e],r=""===n,o=r?t:n+t.charAt(0).toUpperCase()+t.slice(1);(o in Pe.style||r)&&(ze.set(t,o),Ke(t,(r?"":"-")+_e(o)))}}(t):Ke(n=t,n)),r.get(t)||t},Qe=["","X","Y","Z"],tn=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,n){return Qe.reduce(function(t,e){return t.push(n+e),t},t)},["x","y","z"]),en=tn.reduce(function(t,e){return t[e]=!0,t},{}),nn=function(t){return!0===en[t]},rn=function(t,e){return tn.indexOf(t)-tn.indexOf(e)},on={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:A,scaleX:A,scaleY:A,scaleZ:A,skew:L,skewX:L,skewY:L,distance:Y,translateX:Y,translateY:Y,translateZ:Y,perspective:Y,opacity:C,transformOriginX:R,transformOriginY:R,transformOriginZ:Y},un=function(t){return on[t]},an="scrollLeft",sn="scrollTop",cn=new Set([an,sn]),fn={x:"translateX",y:"translateY",z:"translateZ",originX:"transformOriginX",originY:"transformOriginY",originZ:"transformOriginZ",scrollX:an,scrollY:sn},pn=function(t,e,n,r,o,i){void 0===e&&(e=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]);var u,a=!0,s=!1;for(var c in t){var f=fn[c]?fn[c]:c,p=t[c],l=un(f),d="number"==typeof p&&l?l.transform(p):p;nn(f)?(r[f]=d,i.push(f),a&&(l.default&&p!==l.default||!l.default&&0!==p)&&(a=!1)):"transformOriginX"===(u=f)||"transformOriginY"===u?(o[f]=d,s=!0):cn.has(f)||(n[f]=d)}if(a)n.transform="none";else{var h="",v=!1;i.sort(rn);for(var m=i.length,g=0;g<m;g++){h+=(f=i[g])+"("+r[f]+") ",v="z"===f||v}!v&&e&&(h+="translateZ(0)"),n.transform=h}return s&&(n.transformOrigin=(o.transformOriginX||0)+" "+(o.transformOriginY||0)+" "+(o.transformOriginZ||0)),n},ln=qe({onRead:function(t,e){var n=e.element,r=e.preparseOutput,o=un(t);if(nn(t))return o&&o.default||0;if(cn.has(t))return n[t];var i=window.getComputedStyle(n,null).getPropertyValue(Je(t,!0))||0;return r&&o&&o.parse?o.parse(i):i},onRender:function(t,e,n){var r=e.element,o=e.buildStyles;r.style.cssText+=o(t),-1!==n.indexOf(an)&&(r.scrollLeft=t.scrollLeft),-1!==n.indexOf(sn)&&(r.scrollTop=t.scrollTop)},aliasMap:fn,uncachedValues:cn}),dn=function(t,e){return ln(Be({element:t,buildStyles:function(u){void 0===u&&(u=!0);var a={},s={},c={},f={},p=[];return function(t){var e,n,r="";for(var o in p.length=0,a=pn(t,u,a,c,f,p)){var i=a[o];i!==s[o]&&(r+=(n=i,";"+Je(o,!0)+":"+n))}return a=(e=[s,a])[0],s=e[1],r}}(),preparseOutput:!0},e))},hn=function(t,e){return t/100*e+"px"},vn={fill:J,stroke:J,scale:A,scaleX:A,scaleY:A,opacity:C,fillOpacity:C,strokeOpacity:C},mn=qe({onRead:function(t,e){var n=e.element;if(nn(t)){var r=vn[t];return r?r.default:0}return n.getAttribute(t)},onRender:function(t,e,n){var r=e.dimensions;!function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}(e.element,function(t,e,n,r){var o=!1,i=!1,u={},a=n?{pathLength:"0",pathSpacing:""+r}:void 0,s=void 0!==t.scale?t.scale||1e-7:t.scaleX||1,c=void 0!==t.scaleY?t.scaleY||1e-7:s||1,f=e.width*((t.originX||50)/100)+e.x,p=e.height*((t.originY||50)/100)+e.y,l=1*s*-f,d=1*c*-p,h=f/s,v=p/c,m={translate:"translate("+t.translateX+", "+t.translateY+") ",scale:"translate("+l+", "+d+") scale("+s+", "+c+") translate("+h+", "+v+") ",rotate:"rotate("+t.rotate+", "+f+", "+p+") ",skewX:"skewX("+t.skewX+") ",skewY:"skewY("+t.skewY+") "};for(var g in t)if(t.hasOwnProperty(g)){var y=t[g];nn(g)?o=!0:!n||"pathLength"!==g&&"pathSpacing"!==g||"number"!=typeof y?n&&"pathOffset"===g?u["stroke-dashoffset"]=hn(-y,r):u[_e(g)]=y:(i=!0,a[g]=hn(y,r))}if(i&&(u["stroke-dasharray"]=a.pathLength+" "+a.pathSpacing),o)for(var g in u.transform="",m)if(m.hasOwnProperty(g)){var b="scale"===g?"1":"0";u.transform+=m[g].replace(/undefined/g,b)}return u}(t,r,e.isPath,e.pathLength))},aliasMap:{x:"translateX",y:"translateY",background:"fill"}}),gn=qe({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var e=t.scrollTop,n=void 0===e?0:e,r=t.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),yn=new WeakMap,bn=function(t,e){var n,r,o,i;return t instanceof HTMLElement?n=dn(t,e):t instanceof SVGElement?(o=(r=t).getBBox(),i={element:r,dimensions:{x:o.x,y:o.y,width:o.width,height:o.height},isPath:!1},"path"===r.tagName&&(i.isPath=!0,i.pathLength=r.getTotalLength()),n=mn(i)):t===window&&(n=gn(t)),yn.set(t,n),n};function wn(t,e){var n,r,o="string"==typeof t?document.querySelector(t):t;return n=o,r=e,yn.has(n)?yn.get(n):bn(n,r)}var Pn,Mn=function(){function t(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return t.prototype.has=function(t){return this.values.has(t)},t.prototype.set=function(t,e){this.values.set(t,e),this.hasMounted&&this.bindValueToStyler(t,e)},t.prototype.get=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new Fe(e),this.set(t,n)),n},t.prototype.forEach=function(t){return this.values.forEach(t)},t.prototype.bindValueToStyler=function(e,t){var n=this,r=t.addRenderSubscription(function(t){return n.styler.set(e,t)});this.unsubscribers.set(e,r)},t.prototype.mount=function(t){var n=this;this.hasMounted=!0,this.styler=wn(t),this.values.forEach(function(t,e){return n.bindValueToStyler(e,t)})},t.prototype.unmount=function(){var r=this;this.values.forEach(function(t,e){var n=r.unsubscribers.get(e);n&&n()})},t}(),On=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Sn=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},xn=function(){return{ease:"linear",duration:250}},kn={x:On,y:On,z:On,rotate:On,rotateX:On,rotateY:On,rotateZ:On,scaleX:Sn,scaleY:Sn,scale:Sn,opacity:xn,backgroundColor:xn,color:xn,default:Sn},En={tween:le,spring:ve,keyframes:function(t){var e,n,r,o,i=t.easings,u=t.ease,a=void 0===u?ct:u,s=t.times,c=t.values,f=V(t,["easings","ease","times","values"]);i=Array.isArray(i)?i:(n=i,(e=c).map(function(){return n||pt}).splice(0,e.length-1)),s=s||(o=(r=c).length,r.map(function(t,e){return 0!==e?e/(o-1):0}));var p=i.map(function(t,e){return fe({from:c[e],to:c[e+1],ease:t})});return le(F({},f,{ease:a})).applyMiddleware(function(t){return e=p,n=t,o=(r=s).length,u=(i=o-1)-1,a=e.map(function(t){return t.start(n)}),function(t){t<=r[0]&&a[0].seek(0),t>=r[i]&&a[u].seek(1);for(var e=1;e<o&&!(r[e]>t||e===i);e++);var n=Tt(r[e-1],r[e],t);a[e-1].seek(de(n))};var r,e,n,o,i,u,a})},decay:ce,physics:he,just:function(t){var r=t.to;return Ht(function(t){var e=t.update,n=t.complete;e(r),n()})}},Cn={linear:ct,easeIn:ft,easeOut:pt,easeInOut:lt,circIn:dt,circOut:ht,circInOut:vt,backIn:mt,backOut:gt,backInOut:yt,anticipate:bt},An={tween:function(t){var e=t.ease;if(Array.isArray(e)){e.length;var n=e[0],r=e[1],o=e[2],i=e[3];t.ease=kt(n,r,o,i)}else"string"==typeof e&&(t.ease=Cn[e]);return t},keyframes:function(t){t.from,t.to;return V(t,["from","to"])}},Tn=function(t,e,n){if(void 0===n)return F({},(kn[t]||kn.default)(r=e),{to:r});var r,o=n[t]||n.default||n;return!1===o.type?{type:"just",to:e}:F({},o,{to:e})},Ln=function(t,e,n){var r,o,i=Tn(t,e,n),u=i.type,a=void 0===u?"tween":u,s=V(i,["type"]);return[En[a],(o=s,An[r=a]?An[r](o):o)]},Rn=function(n,r,o){return void 0===o&&(o=new Set),Object.keys(n).forEach(function(t){if(!o.has(t))if(o.add(t),r.has(t)){var e=r.get(t);e&&e.set(n[t])}else r.set(t,Ve(n[t]))})},Yn=function(t,e){return void 0===e&&(e={}),t?("function"==typeof t&&(t=t(e)),Array.isArray(t)?t:[t]):[]},Xn=function(){function t(t){this.poses={},this.isAnimating=new Set,this.values=t}return t.prototype.setProps=function(t){this.props=t},t.prototype.setPoses=function(t){this.poses=t},t.prototype.start=function(t,e){return this.resetIsAnimating(),n=t,Array.isArray(n)?this.animateMultiplePoses(t):"string"==typeof t?this.animatePose(t):this.animate([t,e]);var n},t.prototype.set=function(t){var i=this,u=new Set;t.slice().reverse().forEach(function(t){var e=Yn(i.poses[t],i.props),n=e[0],r=e[1];if(r){var o=r.applyOnEnd;o&&Rn(o,i.values,u)}n&&Rn(n,i.values,u)})},t.prototype.animate=function(t,s){var c=this;void 0===s&&(s=0);var e=Yn(t),f=e[0],n=e[1],p=void 0===n?{}:n;if(!f)return Promise.resolve();var r=Object.keys(f).reduce(function(t,e){if(c.isAnimating.has(e))return t;c.values.has(e)||c.values.set(e,Ve(0));var n=c.values.get(e);if(!n)return t;var r,o=f[e];if("number"==typeof(r=o)||nt(r)){var i=Ln(e,o,F({delay:s},p)),u=i[0],a=i[1];t.push(n.control(u,a))}else n.set(o);return c.isAnimating.add(e),t},[]);return Promise.all(r).then(function(){if(p&&p.applyOnEnd){var t=p.applyOnEnd;Rn(t,c.values)}})},t.prototype.animateMultiplePoses=function(t){var e=this,n=t.slice().reverse().map(function(t){return e.animatePose(t)});return Promise.all(n)},t.prototype.animatePose=function(t,e){var n=this;void 0===e&&(e=0);var r=!1,o=!1,i=0,u=this.poses[t],a=u?function(){return n.animate(u,e)}:function(){return Promise.resolve()},s=this.children?function(){return n.animateChildren(t,i,0,1)}:function(){return Promise.resolve()};if(u&&this.children){var c=Yn(u)[1];c&&(r=c.beforeChildren||r,o=c.afterChildren||o,i=c.delayChildren||i)}if(r||o){var f=r?[a,s]:[s,a],p=f[1];return(0,f[0])().then(p)}return Promise.all([a(),s()])},t.prototype.animateChildren=function(r,o,e,t){if(void 0===o&&(o=0),void 0===e&&(e=0),void 0===t&&(t=1),!this.children)return Promise.resolve();var i=[],n=(this.children.size-1)*e,u=1===t?function(t){return t*e}:function(t){return n-t*e};return Array.from(this.children).forEach(function(t,e){var n=t.animatePose(r,o+u(e));i.push(n)}),Promise.all(i)},t.prototype.resetIsAnimating=function(){this.isAnimating.clear(),this.children&&this.children.forEach(function(t){return t.resetIsAnimating()})},t.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t)},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}(),jn=(Pn=function(t){return t.get()},function(t){var n={};return t.forEach(function(t,e){return n[e]=Pn(t)}),n}),Dn=function(n,r){void 0===r&&(r={});var o={};return Object.keys(r).forEach(function(t){var e=r[t];e instanceof Fe?n.get(t)!==e&&n.set(t,e):o[t]=e}),D.useMemo(function(){return F({},o,pn(jn(n)))},[o,n])},Fn=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.subscribers=new Set,this.poses={}}return t.prototype.setPoses=function(e){this.poses=e,this.subscribers.forEach(function(t){return t.setPoses(e)})},t.prototype.subscribe=function(t){var e=this;return this.subscribers.add(t),this.poses&&t.setPoses(this.poses),function(){return e.subscribers.delete(t)}},t.prototype.start=function(n,r){if(this.hasMounted){var o=[];return this.subscribers.forEach(function(t){var e=t.start(n,r);o.push(e)}),Promise.all(o)}return this.pendingAnimations.push([n,r]),Promise.resolve()},t.prototype.stop=function(){this.subscribers.forEach(function(t){return t.stop()})},t.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var e=t[0],n=t[1];return r.start(e,n)})},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),Vn=function(t,e){var n=D.useMemo(function(){return t instanceof Fn&&t.subscribe(e)},[t]);D.useEffect(function(){return function(){return n&&n()}},[n])},Un=function(t,e,n,r,o,i){var u,a=D.useContext(We).pose,s=Ue(e?a:o),c=D.useRef(!1),f=!((u=t)instanceof Fn)&&void 0!==u;f&&n.setPoses(t),D.useMemo(function(){if(f){var t=i?Ue(i):s;n.set(t)}},[f]),D.useEffect(function(){!e&&f&&((c.current||i)&&n.start(s).then(function(){r&&r()}),c.current=!0)},Ie(s))};function In(t){return"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}var Wn,Bn=function(t,e,n,r){return[function(){t&&t.addEventListener(e,n,r)},function(){t&&t.removeEventListener(e,n,r)}]},qn=function(o,i,u,a){var t=void 0;return i&&!In(i)||!u||(t=Bn(i,o,u,a)),D.useEffect(function(){var t=i;if(u&&i&&!In(i)&&t.current){var e=Bn(t.current,o,u,a),n=e[0],r=e[1];return n(),r}},[o,i,u,a]),t},Zn=function(t,e){if(!e)return{x:t.pageX,y:t.pageY};if(window.webkitConvertPointFromPageToNode){var n=new WebKitPoint(t.pageX,t.pageY);return{x:(n=window.webkitConvertPointFromPageToNode(e,n)).x,y:n.y}}var r=e.getBoundingClientRect(),o=1;e.style.width&&""!==e.style.width&&(o=parseFloat(e.style.width)/r.width);var i=1;e.style.height&&""!==e.style.height&&(i=parseFloat(e.style.height)/r.height);var u=i;return{x:o*(t.pageX-r.left-e.clientLeft+e.scrollLeft),y:u*(t.pageY-r.top-e.clientTop+e.scrollTop)}},_n=function(o){if(o){return function(t,e){var n,r;e||(r=(n=t).target instanceof HTMLElement?n.target:null,e={point:Zn(n,r),devicePoint:Zn(n,document.body)}),o(t,e)}}},zn=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(!r.every(function(t){return void 0===t})){return[function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[0]()}},function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[1]()}}]}},Nn=function(t,e,n){var r=t.onPointerDown,o=t.onPointerMove,i=t.onPointerUp,u=t.onPointerCancel,a=t.onPointerOver,s=t.onPointerOut,c=t.onPointerEnter,f=t.onPointerLeave,p={},l={},d={};null===window.onpointerdown&&null===window.onpointermove&&null===window.onpointerup?d=t:null===window.ontouchstart&&null===window.ontouchmove&&null===window.ontouchend?l={onTouchStart:r,onTouchMove:o,onTouchEnd:i,onTouchCancel:u}:null===window.onmousedown&&null===window.onmousemove&&null===window.onmouseup&&(p={onMouseDown:r,onMouseMove:o,onMouseUp:i,onMouseOver:a,onMouseOut:s,onMouseEnter:c,onMouseLeave:f});var h,v,m,g,y,b,w,P,M,O,S,x,k,E,C,A,T,L,R,Y,X,j,D,F,V,U,I,W,B,q,Z,_,z,N,G,H,$,K,J,Q,tt,et,nt,rt,ot,it,ut,at=(v=e,m=n,g=(h=d).onPointerDown,y=h.onPointerMove,b=h.onPointerUp,w=h.onPointerCancel,P=h.onPointerOver,M=h.onPointerOut,O=h.onPointerEnter,S=h.onPointerLeave,x=qn("pointerdown",v,_n(g),m),k=qn("pointermove",v,_n(y),m),E=qn("pointerup",v,_n(b),m),C=qn("pointercancel",v,_n(w),m),A=qn("pointerover",v,_n(P),m),T=qn("pointerout",v,_n(M),m),L=qn("pointerenter",v,_n(O),m),R=qn("pointerleave",v,_n(S),m),zn(x,k,E,C,A,T,L,R)),st=(X=e,j=n,D=(Y=l).onTouchStart,F=Y.onTouchMove,V=Y.onTouchEnd,U=Y.onTouchCancel,I=qn("touchstart",X,_n(D),j),W=qn("touchmove",X,_n(F),j),B=qn("touchend",X,_n(V),j),q=qn("touchcancel",X,_n(U),j),zn(I,W,B,q)),ct=(_=e,z=n,N=(Z=p).onMouseDown,G=Z.onMouseMove,H=Z.onMouseUp,$=Z.onMouseOver,K=Z.onMouseOut,J=Z.onMouseEnter,Q=Z.onMouseLeave,tt=qn("mousedown",_,_n(N),z),et=qn("mousemove",_,_n(G),z),nt=qn("mouseup",_,_n(H),z),rt=qn("mouseover",_,_n($),z),ot=qn("mouseout",_,_n(K),z),it=qn("mouseenter",_,_n(J),z),ut=qn("mouseleave",_,_n(Q),z),zn(tt,et,nt,rt,ot,it,ut));return zn(at,st,ct)},Gn=function(t,e,n){var r,o,i=D.useRef(null);return o=e?(r=e,t):(r=i,{}),Nn(o,r,n),e?void 0:t};function Hn(t,e){var u=t.onPan,a=t.onPanStart,s=t.onPanEnd,c=null,n=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c){var o=Wn.subtract(r,c.lastDevicePoint),i=Wn.subtract(r,c.startDevicePoint);(0<Math.abs(o.x)||0<Math.abs(o.y))&&(c.startEvent?u&&u({point:n,devicePoint:r,delta:o,offset:i},t):(a&&a({point:n,devicePoint:r,delta:o,offset:i},t),c.startEvent=t)),c.lastDevicePoint=r}else console.error("Pointer move without started session")}},[u,a]),r=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c){var o=Wn.subtract(r,c.lastDevicePoint),i=Wn.subtract(r,c.startDevicePoint);d(),f(),s&&s({point:n,devicePoint:r,delta:o,offset:i},t),c=null}else console.error("Pointer end without started session")}},[s,n]),o=Nn({onPointerUp:r},window),i=o[0],f=o[1],p=Nn({onPointerMove:n},window,{capture:!0}),l=p[0],d=p[1],h=D.useMemo(function(){return function(t,e){var n=e.devicePoint;c={target:t.target,lastDevicePoint:n,startDevicePoint:n},l(),i()}},[r,n]);return D.useEffect(function(){return function(){d(),f()}}),Gn({onPointerDown:h},e)}function $n(t,o){var i=t.onTap,u=null,e=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;u&&o&&t.target===o.current&&(i&&i({point:n,devicePoint:r},t),u=null)}},[i]),n=Nn({onPointerUp:e},window),r=n[0],a=n[1];return D.useEffect(function(){return function(){a()}},[o&&o.current,e]),Gn({onPointerDown:function(t){r(),o&&t.target===o.current&&(u={target:t.target})}},o)}(Wn||(Wn={})).subtract=function(t,e){return{x:t.x-e.x,y:t.y-e.y}};var Kn=function(t,e){Hn(t,e),$n(t,e)};function Jn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Qn={dragEnabled:!1,dragLocksDirection:!1,dragPropagation:!1};function tr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function er(t,e,n){var r,o,i=(r=t,o=Qn,Object.assign(o,r),o),u=i.dragEnabled,a=i.dragPropagation,s=i.dragLocksDirection,c={},f=null;tr("x",u,f)&&(c.x=n.get("x",0)),tr("y",u,f)&&(c.y=n.get("y",0));var p=D.useContext(We),l=!1,d=D.useMemo(function(){return function(){(a||(l=function(t){var e=!1;if("y"===t)e=rr();else if("x"===t)e=nr();else{var n=nr(),r=rr();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(u)))&&(f=null,p.dragging=!0)}},[u,a,p]),h=D.useMemo(function(){return function(t){var e=t.delta,n=t.offset;if(a||l)if(s&&null===f)f=function(t){var e=null;10<Math.abs(t.y)?e="y":10<Math.abs(t.x)&&(e="x");return e}(n);else{var r=c.x,o=c.y;tr("x",u,f)&&r&&r.set(r.get()+e.x),tr("y",u,f)&&o&&o.set(o.get()+e.y)}}},[l,u,c]),v=D.useMemo(function(){return function(){!a&&l&&l(),p.dragging=!1}},[l,p,u]),m={};u&&(m={onPanStart:d,onPan:h,onPanEnd:v}),Hn(m,e)}var nr=Jn("dragHorizontal"),rr=Jn("dragVertical");var or=function(j){return D.memo(D.forwardRef(function(t,e){var n,r,o,i,u,a,s,c,f,p,l,d,h,v,m,g,y=t,b=y.animate,w=y.pose,P=void 0===w?"default":w,M=y.style,O=y.onPoseComplete,S=y.inherit,x=void 0!==S&&S,k=y.initialPose,E=y.dragEnabled,C=y.dragLocksDirection,A=y.dragPropagation,T=V(y,["animate","pose","style","onPoseComplete","inherit","initialPose","dragEnabled","dragLocksDirection","dragPropagation"]),L=(r=(n=e)&&"function"!=typeof n?n:D.useRef(null),D.useEffect(function(){if(n&&"function"==typeof n)return n(r.current),function(){return n(null)}}),r),R=(o=L,i=D.useMemo(function(){return new Mn},[]),D.useEffect(function(){return o.current,Element,i.mount(o.current),function(){return i.unmount()}}),i),Y=(u=R,a=x,s=T,c=D.useContext(We).controls,(f=D.useMemo(function(){return new Xn(u)},[])).resetChildren(),a&&c&&c.addChild(f),D.useEffect(function(){return function(){return c&&c.removeChild(f)}},[]),f.setProps(s),f),X=(p=Y,l=x,d=k||P,h=D.useContext(We),v=h.pose,m=h.dragging,(g=D.useMemo(function(){return{controls:p,dragging:m}},Ie(Ue(d)))).pose=l?v:d,g);return Vn(b,Y),Un(b,x,Y,O,P,k),Kn(T,L),er({dragEnabled:E,dragLocksDirection:C,dragPropagation:A},L,R),D.createElement(We.Provider,{value:X},D.createElement(j,F({},T,{ref:L,style:Dn(R,M)})))}))},ir=r.reduce(function(t,e){return t[e]=or(e),t},{custom:or}),ur=Ve(0),ar=Ve(0),sr=Ve(0),cr=Ve(0),fr=0,pr=0,lr=0,dr=0,hr=!1,vr={scrollX:ur,scrollY:ar,scrollXProgress:sr,scrollYProgress:cr};t.motion=ir,t.useMotionValue=function(t){return D.useMemo(function(){return Ve(t)},[])},t.useTransformedValue=function(e,n,r){var o=D.useRef(null);return D.useMemo(function(){o.current&&o.current.destroy();var t=De(n,r);return o.current=e.addChild({transformer:t}),o.current},[e].concat(n,r))},t.useViewportScrollValues=function(){return hr||function(){if(hr=!0,"undefined"!=typeof window){var t=function(){var t=window.pageXOffset,e=window.pageYOffset;ur.set(t),ar.set(e),sr.set(fr-t-lr),cr.set(pr-e-dr)},e=function(){fr=document.body.clientWidth,pr=document.body.clientHeight,lr=window.innerWidth,dr=window.innerHeight};e(),t(),window.addEventListener("resize",e),window.addEventListener("scroll",t,{passive:!0})}}(),vr},t.useAnimation=function(t){var e=D.useMemo(function(){return new Fn},[]);return t&&e.setPoses(t),D.useEffect(function(){return e.mount(),function(){return e.unmount()}},[]),e},t.useTapGesture=$n,t.usePanGesture=Hn,t.useGestures=Kn,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.FramerMotion={},t.React)}(this,function(t,D){"use strict";var e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","webview"],n=["animate","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use","view"],r=e.concat(n),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(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,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function V(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n}var u,a,s=0,c="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-s));s=e+n,setTimeout(function(){return t(s)},n)};(a=u||(u={})).Read="read",a.Update="update",a.Render="render",a.PostRender="postRender",a.FixedUpdate="fixedUpdate";var f=1/60*1e3,l=!0,d=!1,p=!1,h={delta:0,timestamp:0},v=[u.Read,u.Update,u.Render,u.PostRender],m=function(t){return d=t},g=v.reduce(function(t,e){var r,i,u,a,s,o,c,f,l,p=(r=m,i=[],s=!(u=[]),o=a=0,c=new WeakSet,f=new WeakSet,l={cancel:function(t){var e=u.indexOf(t);c.add(t),-1!==e&&u.splice(e,1)},process:function(t){var e,n;if(s=!0,i=(e=[u,i])[0],(u=e[1]).length=0,a=i.length)for(o=0;o<a;o++)(n=i[o])(t),!0!==f.has(n)||c.has(n)||(l.schedule(n),r(!0));s=!1},schedule:function(t,e,n){var r=n&&s,o=r?i:u;e&&f.add(t),-1===o.indexOf(t)&&(o.push(t),r&&(a=i.length))}});return t.sync[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),d||P(),p.schedule(t,e,n),t},t.cancelSync[e]=function(t){return p.cancel(t)},t.steps[e]=p,t},{steps:{},sync:{},cancelSync:{}}),y=g.steps,U=g.sync,I=g.cancelSync,b=function(t){return y[t].process(h)},w=function(t){d=!1,h.delta=l?f:Math.max(Math.min(t-h.timestamp,40),1),l||(f=h.delta),h.timestamp=t,p=!0,v.forEach(b),p=!1,d&&(l=!1,c(w))},P=function(){l=d=!0,p||c(w)},M=function(){return h},O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},x=function(e,n){return function(t){return Math.max(Math.min(t,n),e)}},S=function(e){return function(t){return"string"==typeof t&&0===t.indexOf(e)}},E=function(t){return t%1?Number(t.toFixed(5)):t},k={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},C=O({},k,{transform:x(0,1)}),A=O({},k,{default:1}),T=function(e){return{test:function(t){return"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},L=T("deg"),R=T("%"),Y=T("px"),X=T("vh"),j=T("vw"),W=x(0,255),B=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,q=function(t){return void 0!==t.red},Z=function(t){return void 0!==t.hue},_=function(u){var a=u.length;return function(t){if("string"!=typeof t)return t;for(var e,n,r={},o="string"==typeof(e=(n=t).substring(n.indexOf("(")+1,n.lastIndexOf(")")))?e.split(/,\s*/):[e],i=0;i<a;i++)r[u[i]]=void 0!==o[i]?parseFloat(o[i]):1;return r}},z=O({},k,{transform:function(t){return Math.round(W(t))}}),N=S("rgb"),G={test:function(t){return"string"==typeof t?N(t):q(t)},parse:_(["red","green","blue","alpha"]),transform:function(t){var e,n,r,o,i,u=t.red,a=t.green,s=t.blue,c=t.alpha;return e={red:z.transform(u),green:z.transform(a),blue:z.transform(s),alpha:E(c)},n=e.red,r=e.green,o=e.blue,i=e.alpha,"rgba("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},H=S("hsl"),$={test:function(t){return"string"==typeof t?H(t):Z(t)},parse:_(["hue","saturation","lightness","alpha"]),transform:function(t){var e,n,r,o,i,u=t.hue,a=t.saturation,s=t.lightness,c=t.alpha;return e={hue:Math.round(u),saturation:R.transform(E(a)),lightness:R.transform(E(s)),alpha:E(c)},n=e.hue,r=e.saturation,o=e.lightness,i=e.alpha,"hsla("+n+", "+r+", "+o+", "+(void 0===i?1:i)+")"}},K=O({},G,{test:S("#"),parse:function(t){var e="",n="",r="";return 4<t.length?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),J={test:function(t){return"string"==typeof t&&B.test(t)||G.test(t)||$.test(t)||K.test(t)},parse:function(t){return G.test(t)?G.parse(t):$.test(t)?$.parse(t):K.test(t)?K.parse(t):t},transform:function(t){return q(t)?G.transform(t):Z(t)?$.transform(t):t}},Q=/(-)?(\d[\d\.]*)/g,tt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,et="${c}",nt=function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(Q),r=t.match(tt);return n&&(e+=n.length),r&&(e+=r.length),0<e},rt=function(t){var e=t,n=[],r=e.match(tt);r&&(e=e.replace(tt,et),n.push.apply(n,r.map(J.parse)));var o=e.match(Q);return o&&n.push.apply(n,o.map(k.parse)),n},ot=function(t){var r=t,o=0,e=t.match(tt),i=e?e.length:0;if(e)for(var n=0;n<i;n++)r=r.replace(e[n],et),o++;var u=r.match(Q),a=u?u.length:0;if(u)for(n=0;n<a;n++)r=r.replace(u[n],"${n}"),o++;return function(t){for(var e=r,n=0;n<o;n++)e=e.replace(n<i?et:"${n}",n<i?J.transform(t[n]):E(t[n]));return e}},it=function(e){return function(t){return 1-e(1-t)}},ut=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},at=function(e){return function(t){return t*t*((e+1)*t-e)}},st=function(t){var e=at(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},ct=function(t){return t},ft=function(e){return function(t){return Math.pow(t,e)}}(2),lt=it(ft),pt=ut(ft),dt=function(t){return 1-Math.sin(Math.acos(t))},ht=it(dt),vt=ut(ht),mt=at(1.525),gt=it(mt),yt=ut(mt),bt=st(1.525),wt="undefined"!=typeof Float32Array,Pt=function(t,e){return 1-3*e+3*t},Mt=function(t,e){return 3*e-6*t},Ot=function(t){return 3*t},xt=function(t,e,n){return 3*Pt(e,n)*t*t+2*Mt(e,n)*t+Ot(e)},St=function(t,e,n){return((Pt(e,n)*t+Mt(e,n))*t+Ot(e))*t};function Et(u,e,a,n){var s=wt?new Float32Array(11):new Array(11),r=function(t){for(var e,n,r,o=0,i=1;10!==i&&s[i]<=t;++i)o+=.1;return e=(t-s[--i])/(s[i+1]-s[i]),.001<=(r=xt(n=o+.1*e,u,a))?function(t,e){for(var n=0,r=0;n<8;++n){if(0===(r=xt(e,u,a)))return e;e-=(St(e,u,a)-t)/r}return e}(t,n):0===r?n:function(t,e,n){for(var r,o,i=0;0<(r=St(o=e+(n-e)/2,u,a)-t)?n=o:e=o,1e-7<Math.abs(r)&&++i<10;);return o}(t,o,o+.1)};!function(){for(var t=0;t<11;++t)s[t]=St(.1*t,u,a)}();return function(t){return u===e&&a===n?t:0===t?0:1===t?1:St(r(t),e,n)}}var kt=function(t){return"number"==typeof t},Ct=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},At=Ct(function(t,e,n){return Math.min(Math.max(n,t),e)}),Tt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Lt=function(t,e,n){return-n*t+n*e+t},Rt=function(){return(Rt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Yt=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Xt=[K,G,$],jt=function(e){return Xt.find(function(t){return t.test(e)})},Dt=function(t,e){var n=jt(t),r=jt(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=Rt({},o),a=n===$?Lt:Yt;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=Lt(o.alpha,i.alpha,t),n.transform(u)}},Ft=function(e,n){return function(t){return n(e(t))}},Vt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Ft)},Ut=function(t,r){var n=t.slice(),o=n.length,i=t.map(function(e,t){var n=r[t];return kt(e)?function(t){return Lt(e,n,t)}:J.test(e)?Dt(e,n):It(e,n)});return function(t){for(var e=0;e<o;e++)n[e]=i[e](t);return n}},It=function(t,e){var n=ot(t);return n(t),ot(e)(t),Vt(Ut(rt(t),rt(e)),n)},Wt=(Ct(Lt),function(t){return t}),Bt=function(i){return void 0===i&&(i=Wt),Ct(function(t,e,n){var r=e-n,o=-(0-t+1)*(0-i(Math.abs(r)));return r<=0?e+o:e-o})},qt=(Bt(),Bt(Math.sqrt),function(t,e){return kt(t)?t/(1e3/e):0}),Zt=function(t,e){return e?t*(1e3/e):0};Ct(function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t}),At(0,1);var _t=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(F({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:Vt.apply(void 0,t);return this.applyMiddleware(function(e){return function(t){return e(n(t))}})},t.prototype.while=function(r){return this.applyMiddleware(function(e,n){return function(t){return r(t)?e(t):n()}})},t.prototype.filter=function(n){return this.applyMiddleware(function(e){return function(t){return n(t)&&e(t)}})},t}(),zt=function(){return function(t,e){var n=t.middleware,r=t.onComplete,o=this;this.isActive=!0,this.update=function(t){o.observer.update&&o.updateObserver(t)},this.complete=function(){o.observer.complete&&o.isActive&&o.observer.complete(),o.onComplete&&o.onComplete(),o.isActive=!1},this.error=function(t){o.observer.error&&o.isActive&&o.observer.error(t),o.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=r,e.update&&n&&n.length&&n.forEach(function(t){return o.updateObserver=t(o.updateObserver,o.complete)})}}(),Nt=function(t,e,n){var r=e.middleware;return new zt({middleware:r,onComplete:n},"function"==typeof t?{update:t}:t)},Gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,o=r.init,i=V(r,["init"]),u=o(Nt(t,i,function(){e=!0,n.stop()}));return n=u?F({},n,u):n,t.registerParent&&t.registerParent(n),e&&n.stop(),n},e}(_t),Ht=function(t){return new Gt({init:t})},$t=function(t){var f=t.getCount,l=t.getFirst,p=t.getOutput,d=t.mapApi,h=t.setProp,v=t.startActions;return function(c){return Ht(function(t){var e=t.update,r=t.complete,o=t.error,i=f(c),u=p(),a=function(){return e(u)},s=0,n=v(c,function(t,e){var n=!1;return t.start({complete:function(){n||(n=!0,++s===i&&U.update(r))},error:o,update:function(t){h(u,e,t),U.update(a,!1,!0)}})});return Object.keys(l(n)).reduce(function(t,e){return t[e]=d(n,e),t},{})})}},Kt=$t({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(o,i){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return Object.keys(o).reduce(function(t,e){var n;return o[e][i]&&(r[0]&&void 0!==r[0][e]?t[e]=o[e][i](r[0][e]):t[e]=(n=o[e])[i].apply(n,r)),t},{})}},setProp:function(t,e,n){return t[e]=n},startActions:function(n,r){return Object.keys(n).reduce(function(t,e){return t[e]=r(n[e],e),t},{})}}),Jt=$t({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(e,r){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e.map(function(t,e){if(t[r])return Array.isArray(n[0])?t[r](n[0][e]):t[r].apply(t,n)})}},setProp:function(t,e,n){return t[e]=n},startActions:function(t,n){return t.map(function(t,e){return n(t,e)})}}),Qt=[Y,R,L,X,j],te=function(e){return Qt.find(function(t){return t.test(e)})},ee=function(t,e){return t(e)},ne=function(o,i,u){var t=u[0],e=i[t].map(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return se(t)(o,r)});return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Jt(t)}.apply(void 0,e)},re=function(o,i,u){var a=u[0],t=Object.keys(i[a]).reduce(function(t,e){var n,r=u.reduce((n=e,function(t,e){return t[e]=t[e][n],t}),F({},i));return t[e]=se(i[a][e])(o,r),t},{});return Kt(t)},oe=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=te(n)||te(r),u=i.transform,a=i.parse;return t(F({},o,{from:"string"==typeof n?a(n):n,to:"string"==typeof r?a(r):r})).pipe(u)},ie=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]);return t(F({},o,{from:0,to:1})).pipe(Dt(n,r),J.transform)},ue=function(t,e){var n=e.from,r=e.to,o=V(e,["from","to"]),i=ot(n);return i(n),ot(r)(n),t(F({},o,{from:0,to:1})).pipe(Ut(rt(n),rt(r)),i)},ae=function(r,t){var n,o,i,e=(n=t,o=Object.keys(n),i=function(t,e){return void 0!==t&&!n[e](t)},{getVectorKeys:function(n){return o.reduce(function(t,e){return i(n[e],e)&&t.push(e),t},[])},testVectorProps:function(e){return e&&o.some(function(t){return i(e[t],t)})}}),u=e.testVectorProps,a=e.getVectorKeys;return function(t){if(!u(t))return r(t);var e=a(t),n=t[e[0]];return se(n)(r,t,e)}},se=function(t){var e=ee;return"number"==typeof t?e=ee:Array.isArray(t)?e=ne:Boolean(te(t))?e=oe:J.test(t)?e=ie:nt(t)?e=ue:"object"==typeof t&&(e=re),e},ce=ae(function(b){return void 0===b&&(b={}),Ht(function(t){var o=t.complete,i=t.update,e=b.velocity,n=void 0===e?0:e,r=b.from,u=void 0===r?0:r,a=b.power,s=void 0===a?.8:a,c=b.timeConstant,f=void 0===c?350:c,l=b.restDelta,p=void 0===l?.5:l,d=b.modifyTarget,h=0,v=s*n,m=Math.round(u+v),g=void 0===d?m:d(m),y=U.update(function(t){var e=t.delta;h+=e;var n=-v*Math.exp(-h/f),r=p<n||n<-p;i(r?g+n:g),r||(I.update(y),o())},!0);return{stop:function(){return I.update(y)}}})},{from:k.test,modifyTarget:function(t){return"function"==typeof t},velocity:k.test}),fe=ae(function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,u=void 0===i?ct:i;return Ht(function(t){var e=t.update;return{seek:function(t){return e(t)}}}).pipe(u,function(t){return Lt(n,o,t)})},{ease:function(t){return"function"==typeof t},from:k.test,to:k.test}),le=At(0,1),pe=function(j){return void 0===j&&(j={}),Ht(function(t){var n,r=t.update,o=t.complete,e=j.duration,i=void 0===e?300:e,u=j.ease,a=void 0===u?lt:u,s=j.flip,c=void 0===s?0:s,f=j.loop,l=void 0===f?0:f,p=j.yoyo,d=void 0===p?0:p,h=j.from,v=void 0===h?0:h,m=j.to,g=void 0===m?1:m,y=j.elapsed,b=void 0===y?0:y,w=j.playDirection,P=void 0===w?1:w,M=j.flipCount,O=void 0===M?0:M,x=j.yoyoCount,S=void 0===x?0:x,E=j.loopCount,k=void 0===E?0:E,C=fe({from:v,to:g,ease:a}).start(r),A=0,T=!1,L=function(){return P*=-1},R=function(){A=le(Tt(0,i,b)),C.seek(A)},Y=function(){T=!0,n=U.update(function(t){var e=t.delta;b+=e*P,R(),function(){var t,e=1===P?T&&i<=b:T&&b<=0;if(!e)return!1;if(e&&!l&&!c&&!d)return!0;var n=!1;return l&&k<l?(k++,n=!(b=0)):c&&O<c?(b=i-b,C=fe({from:v=(t=[g,v])[0],to:g=t[1],ease:a}).start(r),O++,n=!0):d&&S<d&&(L(),S++,n=!0),!n}()&&o&&(I.update(n),U.update(o,!1,!0))},!0)},X=function(){T=!1,n&&I.update(n)};return Y(),{isActive:function(){return T},getElapsed:function(){return At(0,i,b)},getProgress:function(){return A},stop:function(){X()},pause:function(){return X(),this},resume:function(){return T||Y(),this},seek:function(t){return b=Lt(0,i,t),U.update(R,!1,!0),this},reverse:function(){return L(),this}}})},de=At(0,1),he=ae(function(m){return void 0===m&&(m={}),Ht(function(t){var r=t.complete,o=t.update,e=m.acceleration,i=void 0===e?0:e,n=m.friction,u=void 0===n?0:n,a=m.velocity,s=void 0===a?0:a,c=m.springStrength,f=m.to,l=m.restSpeed,p=void 0===l?.001:l,d=m.from,h=void 0===d?0:d,v=U.update(function(t){var e=t.delta,n=Math.max(e,16);(i&&(s+=qt(i,n)),u&&(s*=Math.pow(1-u,n/100)),void 0!==c&&void 0!==f)&&(s+=(f-h)*qt(c,n));h+=qt(s,n),o(h),!1!==p&&(!s||Math.abs(s)<=p)&&(I.update(v),r())},!0);return{set:function(t){return h=t,this},setAcceleration:function(t){return i=t,this},setFriction:function(t){return u=t,this},setSpringStrength:function(t){return c=t,this},setSpringTarget:function(t){return f=t,this},setVelocity:function(t){return s=t,this},stop:function(){return I.update(v)}}})},{acceleration:k.test,friction:k.test,velocity:k.test,from:k.test,to:k.test,springStrength:k.test}),ve=ae(function(S){return void 0===S&&(S={}),Ht(function(t){var s=t.update,c=t.complete,e=S.velocity,f=void 0===e?0:e,n=S.from,r=void 0===n?0:n,o=S.to,l=void 0===o?0:o,i=S.stiffness,p=void 0===i?100:i,u=S.damping,d=void 0===u?10:u,a=S.mass,h=void 0===a?1:a,v=S.restSpeed,m=void 0===v?.01:v,g=S.restDelta,y=void 0===g?.01:g,b=f?-f/1e3:0,w=0,P=l-r,M=r,O=M,x=U.update(function(t){var e=t.delta;w+=e;var n=d/(2*Math.sqrt(p*h)),r=Math.sqrt(p/h)/1e3;if(O=M,n<1){var o=Math.exp(-n*r*w),i=r*Math.sqrt(1-n*n);M=l-o*((b+n*r*P)/i*Math.sin(i*w)+P*Math.cos(i*w))}else{o=Math.exp(-r*w);M=l-o*(P+(b+r*P)*w)}f=Zt(M-O,e);var u=Math.abs(f)<=m,a=Math.abs(l-M)<=y;u&&a?(s(M=l),I.update(x),c()):s(M)},!0);return{stop:function(){return I.update(x)}}})},{from:k.test,to:k.test,stiffness:k.test,damping:k.test,mass:k.test,velocity:k.test}),me=function(r,o,i){return Ht(function(t){var e=t.update,n=o.split(" ").map(function(t){return r.addEventListener(t,e,i),t});return{stop:function(){return n.forEach(function(t){return r.removeEventListener(t,e,i)})}}})},ge=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},ye=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},be=[ge()];if("undefined"!=typeof document){me(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var e=t.touches,n=e.length,r=be.length=0;r<n;r++){var o=e[r];be.push(ye(o))}})}var we=ge();if("undefined"!=typeof document){me(document,"mousedown mousemove",!0).start(function(t){ye(t,we)})}var Pe,Me=function(r){return function(e,n,t){return void 0!==t?r(e,n,t):function(t){return r(e,n,t)}}},Oe=Me(function(t,e,n){return Math.min(Math.max(n,t),e)}),xe=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Se=function(t,e,n){return-n*t+n*e+t},Ee=function(){return(Ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ke=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(n*(o-r)+r)},Ce=[K,G,$],Ae=function(e){return Ce.find(function(t){return t.test(e)})},Te=function(t,e){var n=Ae(t),r=Ae(e);n.transform,r.transform;var o=n.parse(t),i=r.parse(e),u=Ee({},o),a=n===$?Se:ke;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=Se(o.alpha,i.alpha,t),n.transform(u)}},Le=function(e,n){return function(t){return n(e(t))}},Re=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Le)},Ye=function(t,e){var n,r,o,i,u,a=ot(t);return a(t),ot(e)(t),Re((n=rt(t),r=rt(e),o=n.slice(),i=o.length,u=n.map(function(e,t){var n=r[t];return"number"==typeof e?function(t){return Se(e,n,t)}:J.test(e)?Te(e,n):Ye(e,n)}),function(t){for(var e=0;e<i;e++)o[e]=u[e](t);return o}),a)},Xe=Me(Se),je=function(o,i){return Array(o.length-1).fill((t=o[0],"number"==typeof t?Xe:J.test(t)?Te:Ye)).map(function(t,e){var n=t(o[e],o[e+1]);if(i){var r=Array.isArray(i)?i[e]:i;return Re(r,n)}return n});var t},De=function(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,u=r.ease,a=t.length;e.length,!u||!Array.isArray(u)||(u.length,t.length),t[0]>t[a-1]&&(t=t.slice(),e=e.slice(),t.reverse(),e.reverse());var s,c,f,l,p,d,h,v,m,g=je(e,u),y=2===a?(d=g,h=(p=t)[0],v=p[1],m=d[0],function(t){return m(xe(h,v,t))}):(c=g,f=(s=t).length,l=f-1,function(t){var e=0,n=!1;if(t<=s[0]?n=!0:t>=s[l]&&(e=l-1,n=!0),!n){for(var r=1;r<f&&!(s[r]>t||r===l);r++);e=r-1}var o=xe(s[e],s[e+1],t);return c[e](o)});return i?Re(Oe(t[0],t[a-1]),y):y},Fe=(Oe(0,1),function(){function n(t,e){var n,r=void 0===e?{}:e,o=r.transformer,i=r.parent,u=this;this.timeDelta=0,this.lastUpdated=0,this.cancelSubscriber=new Set,this.canTrackVelocity=!1,this.notifySubscriber=function(t){t(u.current)},this.scheduleVelocityCheck=function(){return U.postRender(u.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==u.lastUpdated&&(u.prev=u.current)},this.setChild=function(t){return t.set(u.current)},this.parent=i,this.transformer=o,this.set(t),this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return n.prototype.addChild=function(t){var e=new n(this.current,F({parent:this},t));return this.children||(this.children=new Set),this.children.add(e),e},n.prototype.removeChild=function(t){this.children&&this.children.delete(t)},n.prototype.addUpdateSubscription=function(t){var e=this;this.updateSubscribers||(this.updateSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.update(n,!1,!0)};return this.updateSubscribers.add(r),this.cancelSubscriber.add(function(){return I.update(n)}),function(){return e.updateSubscribers.delete(r)}},n.prototype.addRenderSubscription=function(t){var e=this;this.renderSubscribers||(this.renderSubscribers=new Set);var n=function(){return t(e.current)},r=function(){return U.render(n)};return this.renderSubscribers.add(r),r(),this.cancelSubscriber.add(function(){return I.render(n)}),function(){return e.renderSubscribers.delete(r)}},n.prototype.set=function(t,e){void 0===e&&(e=!0),this.prev=this.current,this.current=this.transformer?this.transformer(t):t,this.updateSubscribers&&this.updateSubscribers.forEach(this.notifySubscriber),this.children&&this.children.forEach(this.setChild),e&&this.renderSubscribers&&this.renderSubscribers.forEach(this.notifySubscriber);var n=M(),r=n.delta,o=n.timestamp;this.timeDelta=r,this.lastUpdated=o,U.postRender(this.scheduleVelocityCheck)},n.prototype.get=function(){return this.current},n.prototype.getVelocity=function(){return this.canTrackVelocity?(t=parseFloat(this.prev)-parseFloat(this.current),(e=this.timeDelta)?t*(1e3/e):0):0;var t,e},n.prototype.control=function(t,e,n){var r=this,o=e.delay,i=V(e,["delay"]);this.stop();var u,a=t(F({from:this.get(),velocity:this.getVelocity()},i));return n&&(a=a.pipe(n)),o&&(a=function(){for(var u=[],t=0;t<arguments.length;t++)u[t]=arguments[t];return Ht(function(t){var e,n=t.update,r=t.complete,o=0,i=function(){e=u[o].start({complete:function(){++o>=u.length?r():i()},update:n})};return i(),{stop:function(){return e&&e.stop()}}})}((u=o,Ht(function(t){var e=t.complete,n=setTimeout(e,u);return{stop:function(){return clearTimeout(n)}}})),a)),new Promise(function(t){r.controller=a.start({update:function(t){return r.set(t)},complete:t})})},n.prototype.stop=function(){this.controller&&this.controller.stop()},n.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.cancelSubscriber.forEach(function(t){return t()}),this.cancelSubscriber.clear(),this.parent&&this.parent.removeChild(this),this.stop()},n}()),Ve=function(t,e){return new Fe(t,e)},Ue=function(t){var e,n=t instanceof Fe?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))},Ie=function(t){return[t.join(",")]},We=D.createContext({dragging:!1}),Be=function(){return(Be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},qe=function(t){var s=t.onRead,e=t.onRender,n=t.aliasMap,c=void 0===n?{}:n,r=t.uncachedValues,f=void 0===r?new Set:r,o=t.useCache,l=void 0===o||o;return function(n){var o={},i=[],u=!1,r=function(t,e){var n=c[t]||t,r=o[n];o[n]=e,o[n]!==r&&(-1===i.indexOf(n)&&i.push(n),u||(u=!0,U.render(a)))};function a(t){return void 0===t&&(t=!1),(!0===t||u)&&(e(o,n,i),u=!1,i.length=0),this}return{get:function(t){var e=c[t]||t;return e?l&&!f.has(e)&&void 0!==o[e]?o[e]:s(e,n):o},set:function(e,t){if("string"==typeof e){if(void 0===t)return function(t){return r(e,t)};r(e,t)}else for(var n in e)e.hasOwnProperty(n)&&r(n,e[n]);return this},render:a}}},Ze=/([a-z])([A-Z])/g,_e=function(t){return t.replace(Ze,"$1-$2").toLowerCase()},ze=new Map,Ne=new Map,Ge=["Webkit","Moz","O","ms",""],He=Ge.length,$e="undefined"!=typeof document,Ke=function(t,e){return Ne.set(t,_e(e))},Je=function(t,e){void 0===e&&(e=!1);var n,r=e?Ne:ze;return r.has(t)||($e?function(t){Pe=Pe||document.createElement("div");for(var e=0;e<He;e++){var n=Ge[e],r=""===n,o=r?t:n+t.charAt(0).toUpperCase()+t.slice(1);(o in Pe.style||r)&&(ze.set(t,o),Ke(t,(r?"":"-")+_e(o)))}}(t):Ke(n=t,n)),r.get(t)||t},Qe=["","X","Y","Z"],tn=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,n){return Qe.reduce(function(t,e){return t.push(n+e),t},t)},["x","y","z"]),en=tn.reduce(function(t,e){return t[e]=!0,t},{}),nn=function(t){return!0===en[t]},rn=function(t,e){return tn.indexOf(t)-tn.indexOf(e)},on={color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:A,scaleX:A,scaleY:A,scaleZ:A,skew:L,skewX:L,skewY:L,distance:Y,translateX:Y,translateY:Y,translateZ:Y,perspective:Y,opacity:C,transformOriginX:R,transformOriginY:R,transformOriginZ:Y},un=function(t){return on[t]},an="scrollLeft",sn="scrollTop",cn=new Set([an,sn]),fn={x:"translateX",y:"translateY",z:"translateZ",originX:"transformOriginX",originY:"transformOriginY",originZ:"transformOriginZ",scrollX:an,scrollY:sn},ln=function(t,e,n,r,o,i){void 0===e&&(e=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]);var u,a=!0,s=!1;for(var c in t){var f=fn[c]?fn[c]:c,l=t[c],p=un(f),d="number"==typeof l&&p?p.transform(l):l;nn(f)?(r[f]=d,i.push(f),a&&(p.default&&l!==p.default||!p.default&&0!==l)&&(a=!1)):"transformOriginX"===(u=f)||"transformOriginY"===u?(o[f]=d,s=!0):cn.has(f)||(n[f]=d)}if(a)n.transform="none";else{var h="",v=!1;i.sort(rn);for(var m=i.length,g=0;g<m;g++){h+=(f=i[g])+"("+r[f]+") ",v="z"===f||v}!v&&e&&(h+="translateZ(0)"),n.transform=h}return s&&(n.transformOrigin=(o.transformOriginX||0)+" "+(o.transformOriginY||0)+" "+(o.transformOriginZ||0)),n},pn=qe({onRead:function(t,e){var n=e.element,r=e.preparseOutput,o=un(t);if(nn(t))return o&&o.default||0;if(cn.has(t))return n[t];var i=window.getComputedStyle(n,null).getPropertyValue(Je(t,!0))||0;return r&&o&&o.parse?o.parse(i):i},onRender:function(t,e,n){var r=e.element,o=e.buildStyles;r.style.cssText+=o(t),-1!==n.indexOf(an)&&(r.scrollLeft=t.scrollLeft),-1!==n.indexOf(sn)&&(r.scrollTop=t.scrollTop)},aliasMap:fn,uncachedValues:cn}),dn=function(t,e){return pn(Be({element:t,buildStyles:function(u){void 0===u&&(u=!0);var a={},s={},c={},f={},l=[];return function(t){var e,n,r="";for(var o in l.length=0,a=ln(t,u,a,c,f,l)){var i=a[o];i!==s[o]&&(r+=(n=i,";"+Je(o,!0)+":"+n))}return a=(e=[s,a])[0],s=e[1],r}}(),preparseOutput:!0},e))},hn=function(t,e){return t/100*e+"px"},vn={fill:J,stroke:J,scale:A,scaleX:A,scaleY:A,opacity:C,fillOpacity:C,strokeOpacity:C},mn=qe({onRead:function(t,e){var n=e.element;if(nn(t)){var r=vn[t];return r?r.default:0}return n.getAttribute(t)},onRender:function(t,e,n){var r=e.dimensions;!function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}(e.element,function(t,e,n,r){var o=!1,i=!1,u={},a=n?{pathLength:"0",pathSpacing:""+r}:void 0,s=void 0!==t.scale?t.scale||1e-7:t.scaleX||1,c=void 0!==t.scaleY?t.scaleY||1e-7:s||1,f=e.width*((t.originX||50)/100)+e.x,l=e.height*((t.originY||50)/100)+e.y,p=1*s*-f,d=1*c*-l,h=f/s,v=l/c,m={translate:"translate("+t.translateX+", "+t.translateY+") ",scale:"translate("+p+", "+d+") scale("+s+", "+c+") translate("+h+", "+v+") ",rotate:"rotate("+t.rotate+", "+f+", "+l+") ",skewX:"skewX("+t.skewX+") ",skewY:"skewY("+t.skewY+") "};for(var g in t)if(t.hasOwnProperty(g)){var y=t[g];nn(g)?o=!0:!n||"pathLength"!==g&&"pathSpacing"!==g||"number"!=typeof y?n&&"pathOffset"===g?u["stroke-dashoffset"]=hn(-y,r):u[_e(g)]=y:(i=!0,a[g]=hn(y,r))}if(i&&(u["stroke-dasharray"]=a.pathLength+" "+a.pathSpacing),o)for(var g in u.transform="",m)if(m.hasOwnProperty(g)){var b="scale"===g?"1":"0";u.transform+=m[g].replace(/undefined/g,b)}return u}(t,r,e.isPath,e.pathLength))},aliasMap:{x:"translateX",y:"translateY",background:"fill"}}),gn=qe({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var e=t.scrollTop,n=void 0===e?0:e,r=t.scrollLeft,o=void 0===r?0:r;return window.scrollTo(o,n)}}),yn=new WeakMap,bn=function(t,e){var n,r,o,i;return t instanceof HTMLElement?n=dn(t,e):t instanceof SVGElement?(o=(r=t).getBBox(),i={element:r,dimensions:{x:o.x,y:o.y,width:o.width,height:o.height},isPath:!1},"path"===r.tagName&&(i.isPath=!0,i.pathLength=r.getTotalLength()),n=mn(i)):t===window&&(n=gn(t)),yn.set(t,n),n};function wn(t,e){var n,r,o="string"==typeof t?document.querySelector(t):t;return n=o,r=e,yn.has(n)?yn.get(n):bn(n,r)}var Pn,Mn=function(){function t(){this.hasMounted=!1,this.values=new Map,this.unsubscribers=new Map}return t.prototype.has=function(t){return this.values.has(t)},t.prototype.set=function(t,e){this.values.set(t,e),this.hasMounted&&this.bindValueToStyler(t,e)},t.prototype.get=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new Fe(e),this.set(t,n)),n},t.prototype.forEach=function(t){return this.values.forEach(t)},t.prototype.bindValueToStyler=function(e,t){var n=this,r=t.addRenderSubscription(function(t){return n.styler.set(e,t)});this.unsubscribers.set(e,r)},t.prototype.mount=function(t){var n=this;this.hasMounted=!0,this.styler=wn(t),this.values.forEach(function(t,e){return n.bindValueToStyler(e,t)})},t.prototype.unmount=function(){var r=this;this.values.forEach(function(t,e){var n=r.unsubscribers.get(e);n&&n()})},t}(),On=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},xn=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},Sn=function(){return{ease:"linear",duration:250}},En={x:On,y:On,z:On,rotate:On,rotateX:On,rotateY:On,rotateZ:On,scaleX:xn,scaleY:xn,scale:xn,opacity:Sn,backgroundColor:Sn,color:Sn,default:xn},kn={tween:pe,spring:ve,keyframes:function(t){var e,n,r,o,i=t.easings,u=t.ease,a=void 0===u?ct:u,s=t.times,c=t.values,f=V(t,["easings","ease","times","values"]);i=Array.isArray(i)?i:(n=i,(e=c).map(function(){return n||lt}).splice(0,e.length-1)),s=s||(o=(r=c).length,r.map(function(t,e){return 0!==e?e/(o-1):0}));var l=i.map(function(t,e){return fe({from:c[e],to:c[e+1],ease:t})});return pe(F({},f,{ease:a})).applyMiddleware(function(t){return e=l,n=t,o=(r=s).length,u=(i=o-1)-1,a=e.map(function(t){return t.start(n)}),function(t){t<=r[0]&&a[0].seek(0),t>=r[i]&&a[u].seek(1);for(var e=1;e<o&&!(r[e]>t||e===i);e++);var n=Tt(r[e-1],r[e],t);a[e-1].seek(de(n))};var r,e,n,o,i,u,a})},decay:ce,physics:he,just:function(t){var r=t.to;return Ht(function(t){var e=t.update,n=t.complete;e(r),n()})}},Cn={linear:ct,easeIn:ft,easeOut:lt,easeInOut:pt,circIn:dt,circOut:ht,circInOut:vt,backIn:mt,backOut:gt,backInOut:yt,anticipate:bt},An={tween:function(t){var e=t.ease;if(Array.isArray(e)){e.length;var n=e[0],r=e[1],o=e[2],i=e[3];t.ease=Et(n,r,o,i)}else"string"==typeof e&&(t.ease=Cn[e]);return t},keyframes:function(t){t.from,t.to;return V(t,["from","to"])}},Tn=function(t,e,n){if(void 0===n)return F({},(En[t]||En.default)(r=e),{to:r});var r,o=n[t]||n.default||n;return!1===o.type?{type:"just",to:e}:F({},o,{to:e})},Ln=function(t,e,n){var r,o,i=Tn(t,e,n),u=i.type,a=void 0===u?"tween":u,s=V(i,["type"]);return[kn[a],(o=s,An[r=a]?An[r](o):o)]},Rn=function(n,r,o){return void 0===o&&(o=new Set),Object.keys(n).forEach(function(t){if(!o.has(t))if(o.add(t),r.has(t)){var e=r.get(t);e&&e.set(n[t])}else r.set(t,Ve(n[t]))})},Yn=function(t,e){return void 0===e&&(e={}),t?("function"==typeof t&&(t=t(e)),Array.isArray(t)?t:[t]):[]},Xn=function(){function t(t){this.poses={},this.isAnimating=new Set,this.values=t}return t.prototype.setProps=function(t){this.props=t},t.prototype.setPoses=function(t){this.poses=t},t.prototype.start=function(t,e){return this.resetIsAnimating(),n=t,Array.isArray(n)?this.animateMultiplePoses(t):"string"==typeof t?this.animatePose(t):this.animate([t,e]);var n},t.prototype.set=function(t){var i=this,u=new Set;t.slice().reverse().forEach(function(t){var e=Yn(i.poses[t],i.props),n=e[0],r=e[1];if(r){var o=r.applyOnEnd;o&&Rn(o,i.values,u)}n&&Rn(n,i.values,u)})},t.prototype.animate=function(t,s){var c=this;void 0===s&&(s=0);var e=Yn(t),f=e[0],n=e[1],l=void 0===n?{}:n;if(!f)return Promise.resolve();var r=Object.keys(f).reduce(function(t,e){if(c.isAnimating.has(e))return t;c.values.has(e)||c.values.set(e,Ve(0));var n=c.values.get(e);if(!n)return t;var r,o=f[e];if("number"==typeof(r=o)||nt(r)){var i=Ln(e,o,F({delay:s},l)),u=i[0],a=i[1];t.push(n.control(u,a))}else n.set(o);return c.isAnimating.add(e),t},[]);return Promise.all(r).then(function(){if(l&&l.applyOnEnd){var t=l.applyOnEnd;Rn(t,c.values)}})},t.prototype.animateMultiplePoses=function(t){var e=this,n=t.slice().reverse().map(function(t){return e.animatePose(t)});return Promise.all(n)},t.prototype.animatePose=function(t,e){var n=this;void 0===e&&(e=0);var r=!1,o=!1,i=0,u=this.poses[t],a=u?function(){return n.animate(u,e)}:function(){return Promise.resolve()},s=this.children?function(){return n.animateChildren(t,i,0,1)}:function(){return Promise.resolve()};if(u&&this.children){var c=Yn(u)[1];c&&(r=c.beforeChildren||r,o=c.afterChildren||o,i=c.delayChildren||i)}if(r||o){var f=r?[a,s]:[s,a],l=f[1];return(0,f[0])().then(l)}return Promise.all([a(),s()])},t.prototype.animateChildren=function(r,o,e,t){if(void 0===o&&(o=0),void 0===e&&(e=0),void 0===t&&(t=1),!this.children)return Promise.resolve();var i=[],n=(this.children.size-1)*e,u=1===t?function(t){return t*e}:function(t){return n-t*e};return Array.from(this.children).forEach(function(t,e){var n=t.animatePose(r,o+u(e));i.push(n)}),Promise.all(i)},t.prototype.resetIsAnimating=function(){this.isAnimating.clear(),this.children&&this.children.forEach(function(t){return t.resetIsAnimating()})},t.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},t.prototype.addChild=function(t){this.children||(this.children=new Set),this.children.add(t)},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}(),jn=(Pn=function(t){return t.get()},function(t){var n={};return t.forEach(function(t,e){return n[e]=Pn(t)}),n}),Dn=function(n,r){void 0===r&&(r={});var o={};return Object.keys(r).forEach(function(t){var e=r[t];e instanceof Fe?n.get(t)!==e&&n.set(t,e):o[t]=e}),D.useMemo(function(){return F({},o,ln(jn(n)))},[o,n])},Fn=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.subscribers=new Set,this.poses={}}return t.prototype.setPoses=function(e){this.poses=e,this.subscribers.forEach(function(t){return t.setPoses(e)})},t.prototype.subscribe=function(t){var e=this;return this.subscribers.add(t),this.poses&&t.setPoses(this.poses),function(){return e.subscribers.delete(t)}},t.prototype.start=function(n,r){if(this.hasMounted){var o=[];return this.subscribers.forEach(function(t){var e=t.start(n,r);o.push(e)}),Promise.all(o)}return this.pendingAnimations.push([n,r]),Promise.resolve()},t.prototype.stop=function(){this.subscribers.forEach(function(t){return t.stop()})},t.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var e=t[0],n=t[1];return r.start(e,n)})},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),Vn=function(t,e){var n=D.useMemo(function(){return t instanceof Fn&&t.subscribe(e)},[t]);D.useEffect(function(){return function(){return n&&n()}},[n])},Un=function(t,e,n,r,o,i){var u,a=D.useContext(We).pose,s=Ue(e?a:o),c=D.useRef(!1),f=!((u=t)instanceof Fn)&&void 0!==u;f&&n.setPoses(t),D.useMemo(function(){if(f){var t=i?Ue(i):s;n.set(t)}},[f]),D.useEffect(function(){!e&&f&&((c.current||i)&&n.start(s).then(function(){r&&r()}),c.current=!0)},Ie(s))};function In(t){return"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}var Wn,Bn=function(t,e,n,r){return[function(){t&&t.addEventListener(e,n,r)},function(){t&&t.removeEventListener(e,n,r)}]},qn=function(o,i,u,a){var t=void 0;return i&&!In(i)||!u||(t=Bn(i,o,u,a)),D.useEffect(function(){var t=i;if(u&&i&&!In(i)&&t.current){var e=Bn(t.current,o,u,a),n=e[0],r=e[1];return n(),r}},[o,i,u,a]),t},Zn=function(t,e){if(!e)return{x:t.pageX,y:t.pageY};if(window.webkitConvertPointFromPageToNode){var n=new WebKitPoint(t.pageX,t.pageY);return{x:(n=window.webkitConvertPointFromPageToNode(e,n)).x,y:n.y}}var r=e.getBoundingClientRect(),o=1;e.style.width&&""!==e.style.width&&(o=parseFloat(e.style.width)/r.width);var i=1;e.style.height&&""!==e.style.height&&(i=parseFloat(e.style.height)/r.height);var u=i;return{x:o*(t.pageX-r.left-e.clientLeft+e.scrollLeft),y:u*(t.pageY-r.top-e.clientTop+e.scrollTop)}},_n=function(o){if(o){return function(t,e){var n,r;e||(r=(n=t).target instanceof HTMLElement?n.target:null,e={point:Zn(n,r),devicePoint:Zn(n,document.body)}),o(t,e)}}},zn=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(!r.every(function(t){return void 0===t})){return[function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[0]()}},function(){for(var t=0,e=r;t<e.length;t++){var n=e[t];n&&n[1]()}}]}},Nn=function(t,e,n){var r=t.onPointerDown,o=t.onPointerMove,i=t.onPointerUp,u=t.onPointerCancel,a=t.onPointerOver,s=t.onPointerOut,c=t.onPointerEnter,f=t.onPointerLeave,l={},p={},d={};null===window.onpointerdown&&null===window.onpointermove&&null===window.onpointerup?d=t:null===window.ontouchstart&&null===window.ontouchmove&&null===window.ontouchend?p={onTouchStart:r,onTouchMove:o,onTouchEnd:i,onTouchCancel:u}:null===window.onmousedown&&null===window.onmousemove&&null===window.onmouseup&&(l={onMouseDown:r,onMouseMove:o,onMouseUp:i,onMouseOver:a,onMouseOut:s,onMouseEnter:c,onMouseLeave:f});var h,v,m,g,y,b,w,P,M,O,x,S,E,k,C,A,T,L,R,Y,X,j,D,F,V,U,I,W,B,q,Z,_,z,N,G,H,$,K,J,Q,tt,et,nt,rt,ot,it,ut,at=(v=e,m=n,g=(h=d).onPointerDown,y=h.onPointerMove,b=h.onPointerUp,w=h.onPointerCancel,P=h.onPointerOver,M=h.onPointerOut,O=h.onPointerEnter,x=h.onPointerLeave,S=qn("pointerdown",v,_n(g),m),E=qn("pointermove",v,_n(y),m),k=qn("pointerup",v,_n(b),m),C=qn("pointercancel",v,_n(w),m),A=qn("pointerover",v,_n(P),m),T=qn("pointerout",v,_n(M),m),L=qn("pointerenter",v,_n(O),m),R=qn("pointerleave",v,_n(x),m),zn(S,E,k,C,A,T,L,R)),st=(X=e,j=n,D=(Y=p).onTouchStart,F=Y.onTouchMove,V=Y.onTouchEnd,U=Y.onTouchCancel,I=qn("touchstart",X,_n(D),j),W=qn("touchmove",X,_n(F),j),B=qn("touchend",X,_n(V),j),q=qn("touchcancel",X,_n(U),j),zn(I,W,B,q)),ct=(_=e,z=n,N=(Z=l).onMouseDown,G=Z.onMouseMove,H=Z.onMouseUp,$=Z.onMouseOver,K=Z.onMouseOut,J=Z.onMouseEnter,Q=Z.onMouseLeave,tt=qn("mousedown",_,_n(N),z),et=qn("mousemove",_,_n(G),z),nt=qn("mouseup",_,_n(H),z),rt=qn("mouseover",_,_n($),z),ot=qn("mouseout",_,_n(K),z),it=qn("mouseenter",_,_n(J),z),ut=qn("mouseleave",_,_n(Q),z),zn(tt,et,nt,rt,ot,it,ut));return zn(at,st,ct)},Gn=function(t,e,n){var r,o,i=D.useRef(null);return o=e?(r=e,t):(r=i,{}),Nn(o,r,n),e?void 0:t};(Wn||(Wn={})).subtract=function(t,e){return{x:t.x-e.x,y:t.y-e.y}};var Hn=function(t){var e=t.x,n=t.y;return{x:e.getVelocity(),y:n.getVelocity()}};function $n(t,e){var u=t.onPan,a=t.onPanStart,s=t.onPanEnd,c=null,f=D.useRef(null),n=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c&&null!==f.current){var o=Wn.subtract(r,c.lastDevicePoint),i=Wn.subtract(r,c.startDevicePoint);f.current.x.set(n.x),f.current.y.set(n.y),(0<Math.abs(o.x)||0<Math.abs(o.y))&&(c.startEvent?u&&u(t,{point:n,devicePoint:r,delta:o,offset:i,velocity:Hn(f.current)}):(a&&a(t,{point:n,devicePoint:r,delta:o,offset:i,velocity:Hn(f.current)}),c.startEvent=t)),c.lastDevicePoint=r}else console.error("Pointer move without started session")}},[u,a]),r=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;if(c&&null!==f.current){var o=Wn.subtract(r,c.lastDevicePoint),i=Wn.subtract(r,c.startDevicePoint);h(),l(),s&&s(t,{point:n,devicePoint:r,delta:o,offset:i,velocity:Hn(f.current)}),c=null}else console.error("Pointer end without started session")}},[s,n]),o=Nn({onPointerUp:r},window),i=o[0],l=o[1],p=Nn({onPointerMove:n},window,{capture:!0}),d=p[0],h=p[1],v=D.useMemo(function(){return function(t,e){var n=e.devicePoint,r=e.point;f.current={x:Ve(r.x),y:Ve(r.y)},c={target:t.target,lastDevicePoint:n,startDevicePoint:n},d(),i()}},[r,n]);return D.useEffect(function(){return function(){h(),l()}}),Gn({onPointerDown:v},e)}function Kn(t,o){var i=t.onTap,u=null,e=D.useMemo(function(){return function(t,e){var n=e.point,r=e.devicePoint;u&&o&&t.target===o.current&&(i&&i({point:n,devicePoint:r},t),u=null)}},[i]),n=Nn({onPointerUp:e},window),r=n[0],a=n[1];return D.useEffect(function(){return function(){a()}},[o&&o.current,e]),Gn({onPointerDown:function(t){r(),o&&t.target===o.current&&(u={target:t.target})}},o)}var Jn=function(t,e){$n(t,e),Kn(t,e)};function Qn(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var tr=function(t){var e={dragEnabled:!1,dragLocksDirection:!1,dragPropagation:!1};return Object.assign(e,t),void 0===t.dragEnabled&&(t.dragLocksDirection||t.dragPropagation)&&(e.dragEnabled=!0),e};function er(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function nr(t,e,n){var r,o,i,u=(r=t,"function"==typeof(o=tr)?i=o(r):(i=o,Object.assign(i,r)),i),a=u.dragEnabled,s=u.dragPropagation,c=u.dragLocksDirection,f=D.useRef({x:n.get("x",0),y:n.get("y",0)}),l=D.useContext(We),p=!1,d=null,h=D.useMemo(function(){return function(){(s||(p=function(t){var e=!1;if("y"===t)e=or();else if("x"===t)e=rr();else{var n=rr(),r=or();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}(a)))&&(d=null,l.dragging=!0)}},[a,s,l]),v=D.useMemo(function(){return function(t,e){var n=e.delta,r=e.offset;if(s||p)if(c&&null===d)d=function(t){var e=null;10<Math.abs(t.y)?e="y":10<Math.abs(t.x)&&(e="x");return e}(r);else{var o=f.current,i=o.x,u=o.y;er("x",a,d)&&i.set(i.get()+n.x),er("y",a,d)&&u.set(u.get()+n.y)}}},[p,a,f]),m=D.useMemo(function(){return function(){!s&&p&&p(),l.dragging=!1}},[p,l,a]),g={};a&&(g={onPanStart:h,onPan:v,onPanEnd:m}),$n(g,e)}var rr=Qn("dragHorizontal"),or=Qn("dragVertical");var ir=function(j){return D.memo(D.forwardRef(function(t,e){var n,r,o,i,u,a,s,c,f,l,p,d,h,v,m,g,y=t,b=y.animate,w=y.pose,P=void 0===w?"default":w,M=y.style,O=y.onPoseComplete,x=y.inherit,S=void 0!==x&&x,E=y.initialPose,k=y.dragEnabled,C=y.dragLocksDirection,A=y.dragPropagation,T=V(y,["animate","pose","style","onPoseComplete","inherit","initialPose","dragEnabled","dragLocksDirection","dragPropagation"]),L=(r=(n=e)&&"function"!=typeof n?n:D.useRef(null),D.useEffect(function(){if(n&&"function"==typeof n)return n(r.current),function(){return n(null)}}),r),R=(o=L,i=D.useMemo(function(){return new Mn},[]),D.useEffect(function(){return o.current,Element,i.mount(o.current),function(){return i.unmount()}}),i),Y=(u=R,a=S,s=T,c=D.useContext(We).controls,(f=D.useMemo(function(){return new Xn(u)},[])).resetChildren(),a&&c&&c.addChild(f),D.useEffect(function(){return function(){return c&&c.removeChild(f)}},[]),f.setProps(s),f),X=(l=Y,p=S,d=E||P,h=D.useContext(We),v=h.pose,m=h.dragging,(g=D.useMemo(function(){return{controls:l,dragging:m}},Ie(Ue(d)))).pose=p?v:d,g);return Vn(b,Y),Un(b,S,Y,O,P,E),Jn(T,L),nr({dragEnabled:k,dragLocksDirection:C,dragPropagation:A},L,R),D.createElement(We.Provider,{value:X},D.createElement(j,F({},T,{ref:L,style:Dn(R,M)})))}))},ur=r.reduce(function(t,e){return t[e]=ir(e),t},{custom:ir}),ar=Ve(0),sr=Ve(0),cr=Ve(0),fr=Ve(0),lr=0,pr=0,dr=0,hr=0,vr=!1,mr={scrollX:ar,scrollY:sr,scrollXProgress:cr,scrollYProgress:fr};t.motion=ur,t.useMotionValue=function(t){return D.useMemo(function(){return Ve(t)},[])},t.useTransformedValue=function(e,n,r){var o=D.useRef(null);return D.useMemo(function(){o.current&&o.current.destroy();var t=De(n,r);return o.current=e.addChild({transformer:t}),o.current},[e].concat(n,r))},t.useViewportScrollValues=function(){return vr||function(){if(vr=!0,"undefined"!=typeof window){var t=function(){var t=window.pageXOffset,e=window.pageYOffset;ar.set(t),sr.set(e),cr.set(lr-t-dr),fr.set(pr-e-hr)},e=function(){lr=document.body.clientWidth,pr=document.body.clientHeight,dr=window.innerWidth,hr=window.innerHeight};e(),t(),window.addEventListener("resize",e),window.addEventListener("scroll",t,{passive:!0})}}(),mr},t.useAnimation=function(t){var e=D.useMemo(function(){return new Fn},[]);return t&&e.setPoses(t),D.useEffect(function(){return e.mount(),function(){return e.unmount()}},[]),e},t.useTapGesture=Kn,t.usePanGesture=$n,t.useGestures=Jn,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -8,4 +8,5 @@ import { RefObject } from "react";

offset: Point;
velocity: Point;
}
export declare type PanHandler = (info: PanInfo, event: Event) => void;
export declare type PanHandler = (event: Event, info: PanInfo) => void;
export interface PanHandlers {

@@ -12,0 +13,0 @@ onPan?: PanHandler;

{
"name": "framer-motion",
"version": "0.0.3",
"version": "0.0.4",
"main": "dist/framer-motion.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/framer-motion.es.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc