framer-motion
Version:
<p align="center"> <img src="https://user-images.githubusercontent.com/38039349/60953119-d3c6f300-a2fc-11e9-9596-4978e5d52180.png" width="176" height="170" alt="Framer Motion" /> </p>
1 lines • 72 kB
JavaScript
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t=t||self).Motion={},t.React)}(this,function(w,W){"use strict";var q=function(){return(q=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function A(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e}function P(t){var n=t&&"function"!=typeof t?t:W.useRef(null);return W.useEffect(function(){if(t&&"function"==typeof t)return t(n.current),function(){return t(null)}},[]),n}var t,n,x=function(){},R=function(){},r=0,e="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var n=Date.now(),e=Math.max(0,16.7-(n-r));r=n+e,setTimeout(function(){return t(r)},e)};(n=t||(t={})).Read="read",n.Update="update",n.Render="render",n.PostRender="postRender",n.FixedUpdate="fixedUpdate";var i=1/60*1e3,o=!0,p=!1,a=!1,u={delta:0,timestamp:0},s=[t.Read,t.Update,t.Render,t.PostRender],v=function(t){return p=t},c=s.reduce(function(t,n){var r,o,a,u,s,i,c,f,l,d=(r=v,o=[],s=!(a=[]),i=u=0,c=new WeakSet,f=new WeakSet,l={cancel:function(t){var n=a.indexOf(t);c.add(t),-1!==n&&a.splice(n,1)},process:function(t){var n,e;if(s=!0,o=(n=[a,o])[0],(a=n[1]).length=0,u=o.length)for(i=0;i<u;i++)(e=o[i])(t),!0!==f.has(e)||c.has(e)||(l.schedule(e),r(!0));s=!1},schedule:function(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1),R("function"==typeof t,"Argument must be a function");var r=e&&s,i=r?o:a;c.delete(t),n&&f.add(t),-1===i.indexOf(t)&&(i.push(t),r&&(u=o.length))}});return t.sync[n]=function(t,n,e){return void 0===n&&(n=!1),void 0===e&&(e=!1),p||h(),d.schedule(t,n,e),t},t.cancelSync[n]=function(t){return d.cancel(t)},t.steps[n]=d,t},{steps:{},sync:{},cancelSync:{}}),f=c.steps,F=c.sync,X=c.cancelSync,l=function(t){return f[t].process(u)},d=function(t){p=!1,u.delta=o?i:Math.max(Math.min(t-u.timestamp,40),1),o||(i=u.delta),u.timestamp=t,a=!0,s.forEach(l),a=!1,p&&(o=!1,e(d))},h=function(){o=p=!0,a||e(d)},S=function(){return u},m=function(){return(m=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)},g=function(n,e){return function(t){return Math.max(Math.min(t,e),n)}},y=function(t){return t%1?Number(t.toFixed(5)):t},b=/(-)?(\d[\d\.]*)/g,E=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,C=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,O={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},T=m({},O,{transform:g(0,1)}),M=m({},O,{default:1}),k=function(n){return{test:function(t){return"string"==typeof t&&t.endsWith(n)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+n}}},V=k("deg"),D=k("%"),L=k("px"),j=k("vh"),Y=k("vw"),H=m({},D,{parse:function(t){return D.parse(t)/100},transform:function(t){return D.transform(100*t)}}),B=g(0,255),z=function(t){return void 0!==t.red},I=function(t){return void 0!==t.hue},N=function(o){return function(t){if("string"!=typeof t)return t;for(var n,e={},r=(n=t,n.substring(n.indexOf("(")+1,n.lastIndexOf(")"))).split(/,\s*/),i=0;i<4;i++)e[o[i]]=void 0!==r[i]?parseFloat(r[i]):1;return e}},U=m({},O,{transform:function(t){return Math.round(B(t))}});function Z(t,n){return t.startsWith(n)&&C.test(t)}var G={test:function(t){return"string"==typeof t?Z(t,"rgb"):z(t)},parse:N(["red","green","blue","alpha"]),transform:function(t){var n,e,r,i,o,a=t.red,u=t.green,s=t.blue,c=t.alpha,f=void 0===c?1:c;return n={red:U.transform(a),green:U.transform(u),blue:U.transform(s),alpha:y(T.transform(f))},e=n.red,r=n.green,i=n.blue,o=n.alpha,"rgba("+e+", "+r+", "+i+", "+(void 0===o?1:o)+")"}},$={test:function(t){return"string"==typeof t?Z(t,"hsl"):I(t)},parse:N(["hue","saturation","lightness","alpha"]),transform:function(t){var n,e,r,i,o,a=t.hue,u=t.saturation,s=t.lightness,c=t.alpha,f=void 0===c?1:c;return n={hue:Math.round(a),saturation:D.transform(y(u)),lightness:D.transform(y(s)),alpha:y(T.transform(f))},e=n.hue,r=n.saturation,i=n.lightness,o=n.alpha,"hsla("+e+", "+r+", "+i+", "+(void 0===o?1:o)+")"}},_=m({},G,{test:function(t){return"string"==typeof t&&Z(t,"#")},parse:function(t){var n="",e="",r="";return 4<t.length?(n=t.substr(1,2),e=t.substr(3,2),r=t.substr(5,2)):(n=t.substr(1,1),e=t.substr(2,1),r=t.substr(3,1),n+=n,e+=e,r+=r),{red:parseInt(n,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:1}}}),K={test:function(t){return"string"==typeof t&&C.test(t)||z(t)||I(t)},parse:function(t){return G.test(t)?G.parse(t):$.test(t)?$.parse(t):_.test(t)?_.parse(t):t},transform:function(t){return z(t)?G.transform(t):I(t)?$.transform(t):t}},J="${c}",Q=function(t){return"number"==typeof t?0:t},tt={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var n=0,e=t.match(b),r=t.match(E);return e&&(n+=e.length),r&&(n+=r.length),0<n},parse:function(t){var n=t,e=[],r=n.match(E);r&&(n=n.replace(E,J),e.push.apply(e,r.map(K.parse)));var i=n.match(b);return i&&e.push.apply(e,i.map(O.parse)),e},createTransformer:function(t){var r=t,i=0,n=t.match(E),o=n?n.length:0;if(n)for(var e=0;e<o;e++)r=r.replace(n[e],J),i++;var a=r.match(b),u=a?a.length:0;if(a)for(e=0;e<u;e++)r=r.replace(a[e],"${n}"),i++;return function(t){for(var n=r,e=0;e<i;e++)n=n.replace(e<o?J:"${n}",e<o?K.transform(t[e]):y(t[e]));return n}},getAnimatableNone:function(t){var n=tt.parse(t);return tt.createTransformer(t)(n.map(Q))}},nt={x:0,y:0,z:0},et=function(t){return"number"==typeof t},rt=function(r){return function(n,e,t){return void 0!==t?r(n,e,t):function(t){return r(n,e,t)}}},it=rt(function(t,n,e){return Math.min(Math.max(e,t),n)}),ot=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},at=function(t){return ot(t)&&t.hasOwnProperty("z")},ut=function(t,n){return Math.abs(t-n)},st=function(t,n){if(void 0===n&&(n=nt),et(t)&&et(n))return ut(t,n);if(ot(t)&&ot(n)){var e=ut(t.x,n.x),r=ut(t.y,n.y),i=at(t)&&at(n)?ut(t.z,n.z):0;return Math.sqrt(Math.pow(e,2)+Math.pow(r,2)+Math.pow(i,2))}return 0},ct=function(t,n,e){var r=n-t;return 0===r?1:(e-t)/r},ft=function(t,n,e){return-e*t+e*n+t},lt=function(){return(lt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)},dt=function(t,n,e){var r=t*t,i=n*n;return Math.sqrt(Math.max(0,e*(i-r)+r))},pt=[_,G,$],vt=function(n){return pt.find(function(t){return t.test(n)})},ht=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},mt=function(t,n){var e=vt(t),r=vt(n);R(!!e,ht(t)),R(!!r,ht(n)),R(e.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var i=e.parse(t),o=r.parse(n),a=lt({},i),u=e===$?ft:dt;return function(t){for(var n in a)"alpha"!==n&&(a[n]=u(i[n],o[n],t));return a.alpha=ft(i.alpha,o.alpha,t),e.transform(a)}},gt=function(n,e){return function(t){return e(n(t))}},yt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce(gt)};function bt(n,e){return et(n)?function(t){return ft(n,e,t)}:K.test(n)?mt(n,e):Ct(n,e)}var wt=function(t,e){var r=t.slice(),i=r.length,o=t.map(function(t,n){return bt(t,e[n])});return function(t){for(var n=0;n<i;n++)r[n]=o[n](t);return r}},xt=function(t,n){var e=lt({},t,n),r={};for(var i in e)void 0!==t[i]&&void 0!==n[i]&&(r[i]=bt(t[i],n[i]));return function(t){for(var n in r)e[n]=r[n](t);return e}};function Et(t){for(var n=tt.parse(t),e=n.length,r=0,i=0,o=0,a=0;a<e;a++)r||"number"==typeof n[a]?r++:void 0!==n[a].hue?o++:i++;return{parsed:n,numNumbers:r,numRGB:i,numHSL:o}}var Ct=function(t,n){var e=tt.createTransformer(n),r=Et(t),i=Et(n);return R(r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers,"Complex values '"+t+"' and '"+n+"' too different to mix. Ensure all colors are of the same type."),yt(wt(r.parsed,i.parsed),e)},St=function(n,e){return function(t){return ft(n,e,t)}};function Ot(t,n,e){for(var r,i=[],o=e||("number"==typeof(r=t[0])?St:"string"==typeof r?K.test(r)?mt:Ct:Array.isArray(r)?wt:"object"==typeof r?xt:void 0),a=t.length-1,u=0;u<a;u++){var s=o(t[u],t[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;s=yt(c,s)}i.push(s)}return i}function Tt(t,n,e){var r=void 0===e?{}:e,i=r.clamp,o=void 0===i||i,a=r.ease,u=r.mixer,s=t.length;R(s===n.length,"Both input and output ranges must be the same length"),R(!a||!Array.isArray(a)||a.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),n=[].concat(n),t.reverse(),n.reverse());var c,f,l,d,p,v,h,m,g,y=Ot(n,a,u),b=2===s?(v=y,h=(p=t)[0],m=p[1],g=v[0],function(t){return g(ct(h,m,t))}):(f=y,l=(c=t).length,d=l-1,function(t){var n=0,e=!1;if(t<=c[0]?e=!0:t>=c[d]&&(n=d-1,e=!0),!e){for(var r=1;r<l&&!(c[r]>t||r===d);r++);n=r-1}var i=ct(c[n],c[n+1],t);return f[n](i)});return o?yt(it(t[0],t[s-1]),b):b}var At=function(t,n){return n?t*(1e3/n):0},Pt=rt(function(t,n,e){var r=n-t;return((e-t)%r+r)%r+t}),Rt=(it(0,1),function(){function e(t,n){var e,o=this,r=void 0===n?{}:n,i=r.transformer,a=r.parent;this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.updateAndNotify=function(t,n){void 0===n&&(n=!0),o.prev=o.current,o.current=o.transformer?o.transformer(t):t,o.updateSubscribers&&o.prev!==o.current&&o.updateSubscribers.forEach(o.notifySubscriber),o.children&&o.children.forEach(o.setChild),n&&o.renderSubscribers&&o.renderSubscribers.forEach(o.notifySubscriber);var e=S(),r=e.delta,i=e.timestamp;o.lastUpdated!==i&&(o.timeDelta=r,o.lastUpdated=i,F.postRender(o.scheduleVelocityCheck))},this.notifySubscriber=function(t){t(o.current)},this.scheduleVelocityCheck=function(){return F.postRender(o.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==o.lastUpdated&&(o.prev=o.current)},this.setChild=function(t){return t.set(o.current)},this.parent=a,this.transformer=i,this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return e.prototype.addChild=function(t){void 0===t&&(t={});var n=new e(this.current,q({parent:this},t));return this.children||(this.children=new Set),this.children.add(n),n},e.prototype.removeChild=function(t){this.children&&this.children.delete(t)},e.prototype.subscribeTo=function(t,n){var e=this,r=function(){return n(e.current)};return t.add(r),function(){return t.delete(r)}},e.prototype.onChange=function(t){return this.updateSubscribers||(this.updateSubscribers=new Set),this.subscribeTo(this.updateSubscribers,t)},e.prototype.onRenderRequest=function(t){return this.renderSubscribers||(this.renderSubscribers=new Set),this.notifySubscriber(t),this.subscribeTo(this.renderSubscribers,t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){void 0===n&&(n=!0),n&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,n)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.canTrackVelocity?At(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(n){var e=this;return this.stop(),new Promise(function(t){e.stopAnimation=n(t)}).then(function(){return e.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers&&this.updateSubscribers.clear(),this.renderSubscribers&&this.renderSubscribers.clear(),this.parent&&this.parent.removeChild(this),this.stop()},e}());function Mt(t,n){return new Rt(t,n)}var kt=function(){return(kt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function Vt(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&(e[r[i]]=t[r[i]])}return e}var Dt,Lt=function(t){var e=t.onRead,n=t.onRender,r=t.uncachedValues,c=void 0===r?new Set:r,i=t.useCache,f=void 0===i||i;return function(t){void 0===t&&(t={});var r=Vt(t,[]),i={},o=[],a=!1;function u(t,n){t.startsWith("--")&&(r.hasCSSVariable=!0);var e=i[t];i[t]=n,i[t]!==e&&(-1===o.indexOf(t)&&o.push(t),a||(a=!0,F.render(s.render)))}var s={get:function(t,n){return void 0===n&&(n=!1),!n&&f&&!c.has(t)&&void 0!==i[t]?i[t]:e(t,r)},set:function(t,n){if("string"==typeof t)u(t,n);else for(var e in t)u(e,t[e]);return this},render:function(t){return void 0===t&&(t=!1),(a||!0===t)&&(n(i,r,o),a=!1,o.length=0),this}};return s}},jt=/([a-z])([A-Z])/g,Ft=function(t){return t.replace(jt,"$1-$2").toLowerCase()},Xt=new Map,Yt=new Map,Ht=["Webkit","Moz","O","ms",""],Bt=Ht.length,zt="undefined"!=typeof document,It=function(t,n){return Yt.set(t,Ft(n))},Nt=function(t,n){void 0===n&&(n=!1);var e,r=n?Yt:Xt;return r.has(t)||(zt?function(t){Dt=Dt||document.createElement("div");for(var n=0;n<Bt;n++){var e=Ht[n],r=""===e,i=r?t:e+t.charAt(0).toUpperCase()+t.slice(1);(i in Dt.style||r)&&(Xt.set(t,i),It(t,(r?"":"-")+Ft(i)))}}(t):It(e=t,e)),r.get(t)||t},Ut=["","X","Y","Z"],Wt=["translate","scale","rotate","skew","transformPerspective"].reduce(function(t,e){return Ut.reduce(function(t,n){return t.push(e+n),t},t)},["x","y","z"]),qt=Wt.reduce(function(t,n){return t[n]=!0,t},{});function Zt(t){return!0===qt[t]}function Gt(t,n){return Wt.indexOf(t)-Wt.indexOf(n)}var $t=new Set(["originX","originY","originZ"]);var _t=kt({},O,{transform:Math.round}),Kt={color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,size:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,rotate:V,rotateX:V,rotateY:V,rotateZ:V,scale:M,scaleX:M,scaleY:M,scaleZ:M,skew:V,skewX:V,skewY:V,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,opacity:T,originX:H,originY:H,originZ:L,zIndex:_t,fillOpacity:T,strokeOpacity:T,numOctaves:_t},Jt=function(t){return Kt[t]},Qt=function(t,n){return n&&"number"==typeof t?n.transform(t):t},tn="scrollLeft",nn="scrollTop",en=new Set([tn,nn]),rn=new Set([tn,nn,"transform"]),on={x:"translateX",y:"translateY",z:"translateZ"};function an(t){return"function"==typeof t}function un(t,n,e,r,i,o,a){void 0===n&&(n=!0),void 0===e&&(e={}),void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=[]),void 0===a&&(a=!1);var u,s=!0,c=!1,f=!1;for(var l in t){var d=t[l],p=Jt(l),v=Qt(d,p);Zt(l)?(c=!0,r[l]=v,o.push(l),s&&(p.default&&d!==p.default||!p.default&&0!==d)&&(s=!1)):(u=l,$t.has(u)?(i[l]=v,f=!0):rn.has(l)&&an(v)||(e[Nt(l,a)]=v))}return(c||"function"==typeof t.transform)&&(e.transform=function(t,n,e,r,i){var o="",a=!1;e.sort(Gt);for(var u=e.length,s=0;s<u;s++){var c=e[s];o+=(on[c]||c)+"("+n[c]+") ",a="z"===c||a}return!a&&i?o+="translateZ(0)":o=o.trim(),an(t.transform)?o=t.transform(n,o):r&&(o="none"),o}(t,r,o,s,n)),f&&(e.transformOrigin=(i.originX||"50%")+" "+(i.originY||"50%")+" "+(i.originZ||0)),e}function sn(n,e){void 0===n&&(n=!0),void 0===e&&(e=!0);var r={},i={},o={},a=[];return function(t){return a.length=0,un(t,n,r,i,o,a,e),r}}var cn=Lt({onRead:function(t,n){var e=n.element,r=n.preparseOutput,i=Jt(t);if(Zt(t))return i&&i.default||0;if(en.has(t))return e[t];var o=window.getComputedStyle(e,null).getPropertyValue(Nt(t,!0))||0;return r&&i&&i.test(o)&&i.parse?i.parse(o):o},onRender:function(t,n,e){var r=n.element,i=n.buildStyles,o=n.hasCSSVariable;if(Object.assign(r.style,i(t)),o)for(var a=e.length,u=0;u<a;u++){var s=e[u];s.startsWith("--")&&r.style.setProperty(s,t[s])}-1!==e.indexOf(tn)&&(r[tn]=t[tn]),-1!==e.indexOf(nn)&&(r[nn]=t[nn])},uncachedValues:en});var fn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),ln=.5,dn=function(){return{style:{}}},pn=function(t,n){return L.transform(t*n)},vn={x:0,y:0,width:0,height:0};function hn(t,n,e){return"string"==typeof t?t:L.transform(n+e*t)}function mn(t,n,e,r,i,o){void 0===n&&(n=vn),void 0===r&&(r=sn(!1,!1)),void 0===i&&(i=dn()),void 0===o&&(o=!0);var a,u,s=t.x,c=t.y,f=(t.z,t.originX),l=t.originY,d=t.pathLength,p=t.pathSpacing,v=void 0===p?1:p,h=t.pathOffset,m=void 0===h?0:h,g=r(Vt(t,["x","y","z","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var y in g){if("transform"===y)i.style.transform=g[y];else i[o&&!fn.has(y)?Ft(y):y]=g[y]}return(void 0!==f||void 0!==l||g.transform)&&(i.style.transformOrigin=(u=void 0!==l?l:ln,hn(void 0!==f?f:ln,(a=n).x,a.width)+" "+hn(u,a.y,a.height))),void 0!==s&&(i.x=s),void 0!==c&&(i.y=c),void 0!==e&&void 0!==d&&(i[o?"stroke-dashoffset":"strokeDashoffset"]=pn(-m,e),i[o?"stroke-dasharray":"strokeDasharray"]=pn(d,e)+" "+pn(v,e)),i}var gn=Lt({onRead:function(t,n){var e=n.element;if(Zt(t=fn.has(t)?t:Ft(t))){var r=Jt(t);return r&&r.default||0}return e.getAttribute(t)},onRender:function(t,n){var e=n.element,r=(0,n.buildAttrs)(t);for(var i in r)"style"===i?Object.assign(e.style,r.style):e.setAttribute(i,r[i])}}),yn=function(t){var n=function(t){try{return"function"==typeof(n=t).getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){return{x:0,y:0,width:0,height:0}}var n}(t),e="path"===t.tagName&&t.getTotalLength?t.getTotalLength():void 0;return gn({element:t,buildAttrs:function(n,e,r){void 0===r&&(r=!0);var i=dn(),o=sn(!1,!1);return function(t){return mn(t,n,e,o,i,r)}}(n,e)})},bn=Lt({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var n=t.scrollTop,e=void 0===n?0:n,r=t.scrollLeft,i=void 0===r?0:r;return window.scrollTo(i,e)}}),wn=new WeakMap,xn=function(t,n){var e;return t instanceof HTMLElement?e=function(t,n){void 0===n&&(n={});var e=n.enableHardwareAcceleration,r=Vt(n,["enableHardwareAcceleration"]);return cn(kt({element:t,buildStyles:sn(e),preparseOutput:!0},r))}(t,n):t instanceof SVGElement?e=yn(t):t===window&&(e=bn(t)),R(void 0!==e,"No valid node provided. Node must be HTMLElement, SVGElement or window."),wn.set(t,e),e},En=function(t,n){return wn.has(t)?wn.get(t):xn(t,n)};function Cn(t,n){var e="string"==typeof t?document.querySelector(t):t;return En(e,n)}function Sn(t){var n=W.useRef(null);return null===n.current&&(n.current=t()),n.current}var On,Tn=function(t){return t instanceof Rt},An=null,Pn=function(){return null!==An},Rn=function(){R(!An,"Sync render session already open"),An=[]},Mn=function(){R(null!==An,"No sync render session found"),An&&An.forEach(function(t){return t.render()}),An=null},kn=function(t){R(null!==An,"No sync render session found"),An&&An.push(t)},Vn=Lt({onRead:function(){return null},onRender:function(t,n){return(0,n.onUpdate)(t)}}),Dn=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,n){this.values.set(t,n),this.hasMounted&&this.bindValueToOutput(t,n)},t.prototype.get=function(t,n){var e=this.values.get(t);return void 0===e&&void 0!==n&&(e=new Rt(n),this.set(t,e)),e},t.prototype.forEach=function(t){return this.values.forEach(t)},t.prototype.bindValueToOutput=function(n,t){var e=this,r=t.onRenderRequest(function(t){return e.output&&e.output(n,t)}),i=t.onChange(function(t){e.onUpdate&&e.onUpdate.set(n,t)});this.unsubscribers.has(n)&&this.unsubscribers.get(n)(),this.unsubscribers.set(n,function(){r(),i()})},t.prototype.setOnUpdate=function(t){this.onUpdate=void 0,t&&(this.onUpdate=Vn({onUpdate:t}))},t.prototype.setTransformTemplate=function(t){this.transformTemplate!==t&&(this.transformTemplate=t,this.updateTransformTemplate())},t.prototype.getTransformTemplate=function(){return this.transformTemplate},t.prototype.updateTransformTemplate=function(){this.output&&this.output("transform",this.transformTemplate)},t.prototype.mount=function(t){var e=this;this.hasMounted=!0,t&&(this.output=t),this.values.forEach(function(t,n){return e.bindValueToOutput(n,t)}),this.updateTransformTemplate()},t.prototype.unmount=function(){var r=this;this.values.forEach(function(t,n){var e=r.unsubscribers.get(n);e&&e()})},t}(),Ln=new Set(["dragOriginX","dragOriginY"]),jn=function(e){var t=Sn(function(){var t=new Dn;for(var n in e)Tn(e[n])&&!Ln.has(n)&&t.set(n,e[n]);return t});return t.setOnUpdate(e.onUpdate),t.setTransformTemplate(e.transformTemplate),t},Fn=W.memo(W.forwardRef(function(t,n){var r=t.values,i=t.isStatic;return W.useEffect(function(){R(n.current instanceof Element,"No `ref` found. Ensure components created with `motion.custom` forward refs using `React.forwardRef`");var e=Cn(n.current,{preparseOutput:!1,enableHardwareAcceleration:!i});return r.mount(function(t,n){e.set(t,n),Pn()&&kn(e)}),function(){return r.unmount()}},[]),null})),Xn=(On=function(t){return t.get()},function(t){var e={};return t.forEach(function(t,n){return e[n]=On(t)}),e}),Yn=new Set(["originX","originY","originZ"]),Hn=function(t){return Array.isArray(t)},Bn=function(t){return Hn(t)?t[t.length-1]||0:t},zn=[O,L,D,V,Y,j,{test:function(t){return"auto"===t},parse:function(t){return t}}],In=zn.concat([K,tt]),Nn=function(n){return function(t){return t.test(n)}},Un=function(t){return zn.find(Nn(t))},Wn=function(n){return function(t){return 1-n(1-t)}},qn=Wn,Zn=function(t){return t},Gn=Wn(function(n){return function(t){return Math.pow(t,n)}}(2)),$n=function(){return function(t,n){var e=this,r=t.middleware,i=t.onComplete;this.isActive=!0,this.update=function(t){e.observer.update&&e.updateObserver(t)},this.complete=function(){e.observer.complete&&e.isActive&&e.observer.complete(),e.onComplete&&e.onComplete(),e.isActive=!1},this.error=function(t){e.observer.error&&e.isActive&&e.observer.error(t),e.isActive=!1},this.observer=n,this.updateObserver=function(t){return n.update(t)},this.onComplete=i,n.update&&r&&r.length&&r.forEach(function(t){return e.updateObserver=t(e.updateObserver,e.complete)})}}(),_n=function(){function n(t){void 0===t&&(t={}),this.props=t}return n.prototype.create=function(t){return new n(t)},n.prototype.start=function(t){void 0===t&&(t={});var n,e,r,i=!1,o={stop:function(){}},a=this.props,u=a.init,s=A(a,["init"]),c=u((n=t,e=function(){i=!0,o.stop()},r=s.middleware,new $n({middleware:r,onComplete:e},"function"==typeof n?{update:n}:n)));return o=c?q({},o,c):o,i&&o.stop(),o},n.prototype.applyMiddleware=function(t){return this.create(q({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},n.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=1===t.length?t[0]:yt.apply(void 0,t);return this.applyMiddleware(function(n){return function(t){return n(e(t))}})},n}(),Kn=function(t){return new _n({init:t})},Jn=[L,D,V,j,Y],Qn=function(n){return Jn.find(function(t){return t.test(n)})},te=function(t,n){return t(n)},ne=function(t,n){var e=n.from,r=n.to,i=A(n,["from","to"]),o=Qn(e)||Qn(r),a=o.transform,u=o.parse;return t(q({},i,{from:"string"==typeof e?u(e):e,to:"string"==typeof r?u(r):r})).pipe(a)},ee=function(o){return function(t,n){var e=n.from,r=n.to,i=A(n,["from","to"]);return t(q({},i,{from:0,to:1})).pipe(o(e,r))}},re=ee(mt),ie=ee(Ct),oe=function(r,t){var e,i,o,n=(e=t,i=Object.keys(e),o=function(t,n){return void 0!==t&&!e[n](t)},{getVectorKeys:function(e){return i.reduce(function(t,n){return o(e[n],n)&&t.push(n),t},[])},testVectorProps:function(n){return n&&i.some(function(t){return o(n[t],t)})}}),a=n.testVectorProps,u=n.getVectorKeys;return function(t){if(!a(t))return r(t);var n=u(t),e=t[n[0]];return ae(e)(r,t,n)}},ae=function(t){return"number"==typeof t?te:Boolean(Qn(t))?ne:K.test(t)?re:tt.test(t)?ie:te},ue=oe(function(b){return void 0===b&&(b={}),Kn(function(t){var i=t.complete,o=t.update,n=b.velocity,e=void 0===n?0:n,r=b.from,a=void 0===r?0:r,u=b.power,s=void 0===u?.8:u,c=b.timeConstant,f=void 0===c?350:c,l=b.restDelta,d=void 0===l?.5:l,p=b.modifyTarget,v=0,h=s*e,m=Math.round(a+h),g=void 0===p?m:p(m),y=F.update(function(t){var n=t.delta;v+=n;var e=-h*Math.exp(-v/f),r=d<e||e<-d;o(r?g+e:g),r||(X.update(y),i())},!0);return{stop:function(){return X.update(y)}}})},{from:O.test,modifyTarget:function(t){return"function"==typeof t},velocity:O.test}),se=oe(function(O){return void 0===O&&(O={}),Kn(function(t){var s=t.update,c=t.complete,n=O.velocity,f=void 0===n?0:n,e=O.from,r=void 0===e?0:e,i=O.to,l=void 0===i?0:i,o=O.stiffness,d=void 0===o?100:o,a=O.damping,p=void 0===a?10:a,u=O.mass,v=void 0===u?1:u,h=O.restSpeed,m=void 0===h?.01:h,g=O.restDelta,y=void 0===g?.01:g,b=f?-f/1e3:0,w=0,x=l-r,E=r,C=E,S=F.update(function(t){var n=t.delta;w+=n;var e=p/(2*Math.sqrt(d*v)),r=Math.sqrt(d/v)/1e3;if(C=E,e<1){var i=Math.exp(-e*r*w),o=r*Math.sqrt(1-e*e);E=l-i*((b+e*r*x)/o*Math.sin(o*w)+x*Math.cos(o*w))}else{i=Math.exp(-r*w);E=l-i*(x+(b+r*x)*w)}f=At(E-C,n);var a=Math.abs(f)<=m,u=Math.abs(l-E)<=y;a&&u?(s(E=l),X.update(S),c()):s(E)},!0);return{stop:function(){return X.update(S)}}})},{from:O.test,to:O.test,stiffness:O.test,damping:O.test,mass:O.test,velocity:O.test}),ce=oe(function(t){var n=t.from,v=void 0===n?0:n,e=t.velocity,h=void 0===e?0:e,m=t.min,g=t.max,r=t.power,y=void 0===r?.8:r,i=t.timeConstant,b=void 0===i?700:i,o=t.bounceStiffness,w=void 0===o?500:o,a=t.bounceDamping,x=void 0===a?10:a,u=t.restDelta,E=void 0===u?1:u,C=t.modifyTarget;return Kn(function(t){var r,i=t.update,e=t.complete,o=v,a=v,u=!1,s=function(t){return void 0!==m&&t<=m},c=function(t){return void 0!==g&&g<=t},n=function(t){return s(t)||c(t)},f=function(t){var n,e;i(t),o=a,h=At((a=t)-o,S().delta),r&&!u&&(e=h,s(n=t)&&e<0||c(n)&&0<e)&&d({from:t,velocity:h})},l=function(t,n){r&&r.stop(),r=t.start({update:f,complete:function(){n?n():e()}})},d=function(t){u=!0,l(se(q({},t,{to:s(t.from)?m:g,stiffness:w,damping:x,restDelta:E})))};if(n(v))d({from:v,velocity:h});else if(0!==h){var p=ue({from:v,velocity:h,timeConstant:b,power:y,restDelta:n(v)?20:E,modifyTarget:C});l(p,function(){n(a)?d({from:a,velocity:h}):e()})}else e();return{stop:function(){return r&&r.stop()}}})},{from:O.test,velocity:O.test,min:O.test,max:O.test,damping:O.test,stiffness:O.test,modifyTarget:function(t){return"function"==typeof t}}),fe=oe(function(t){var n=t.from,e=void 0===n?0:n,r=t.to,i=void 0===r?1:r,o=t.ease,a=void 0===o?Zn:o,u=t.reverseEase;return void 0!==u&&u&&(a=qn(a)),Kn(function(t){var n=t.update;return{seek:function(t){return n(t)}}}).pipe(a,function(t){return ft(e,i,t)})},{ease:function(t){return"function"==typeof t},from:O.test,to:O.test}),le=it(0,1),de=function(j){return void 0===j&&(j={}),Kn(function(t){var r,e=t.update,i=t.complete,n=j.duration,o=void 0===n?300:n,a=j.ease,u=void 0===a?Gn:a,s=j.flip,c=void 0===s?0:s,f=j.loop,l=void 0===f?0:f,d=j.yoyo,p=void 0===d?0:d,v=j.repeatDelay,h=void 0===v?0:v,m=j.from,g=void 0===m?0:m,y=j.to,b=void 0===y?1:y,w=j.elapsed,x=void 0===w?0:w,E=j.flipCount,C=void 0===E?0:E,S=j.yoyoCount,O=void 0===S?0:S,T=j.loopCount,A=void 0===T?0:T,P=fe({from:g,to:b,ease:u}).start(e),R=0,M=!1,k=function(t){var n;void 0===t&&(t=!1),P=fe({from:g=(n=[b,g])[0],to:b=n[1],ease:u,reverseEase:t}).start(e)},V=function(){R=le(ct(0,o,x)),P.seek(R)},D=function(){M=!0,r=F.update(function(t){var n,e=t.delta;x+=e,V(),!(n=M&&o+h<x)||(!n||l||c||p)&&(x=x-o-h,l&&A<l?(A++,1):c&&C<c?(C++,k(),1):p&&O<p&&(k(++O%2!=0),1))||(X.update(r),i&&F.update(i,!1,!0))},!0)},L=function(){M=!1,r&&X.update(r)};return D(),{isActive:function(){return M},getElapsed:function(){return it(0,o,x)},getProgress:function(){return R},stop:function(){L()},pause:function(){return L(),this},resume:function(){return M||D(),this},seek:function(t){return x=ft(0,o,t),F.update(V,!1,!0),this},reverse:function(){return k(),this}}})},pe=it(0,1),ve=function(r,i,o){return Kn(function(t){var n=t.update,e=i.split(" ").map(function(t){return r.addEventListener(t,n,o),t});return{stop:function(){return e.forEach(function(t){return r.removeEventListener(t,n,o)})}}})},he=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},me=function(t,n){return void 0===n&&(n={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),n.clientX=n.x=t.clientX,n.clientY=n.y=t.clientY,n.pageX=t.pageX,n.pageY=t.pageY,n},ge=[he()];if("undefined"!=typeof document){ve(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){for(var n=t.touches,e=n.length,r=ge.length=0;r<e;r++){var i=n[r];ge.push(me(i))}})}var ye=he();if("undefined"!=typeof document){ve(document,"mousedown mousemove",!0).start(function(t){me(t,ye)})}var be=function(r){return Kn(function(t){var n=t.complete,e=setTimeout(n,r);return{stop:function(){return clearTimeout(e)}}})},we=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},xe=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},Ee=function(){return{ease:"linear",duration:.3}},Ce=function(t){return{type:"keyframes",duration:.8,values:t}},Se={x:we,y:we,z:we,rotate:we,rotateX:we,rotateY:we,rotateZ:we,scaleX:xe,scaleY:xe,scale:xe,opacity:Ee,backgroundColor:Ee,color:Ee,default:xe},Oe=function(t){var r=t.to,i=t.duration;return Kn(function(t){var n=t.update,e=t.complete;n(r),i?be(i).start({complete:e}):e()})},Te=function(n){return function(t){return 1-n(1-t)}},Ae=function(n){return function(t){return t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2}},Pe=Te,Re=Ae,Me=function(n){return function(t){return Math.pow(t,n)}},ke=function(n){return function(t){return t*t*((n+1)*t-n)}},Ve=function(t){var n=ke(t);return function(t){return(t*=2)<1?.5*n(t):.5*(2-Math.pow(2,-10*(t-1)))}},De=function(t){return t},Le=Me(2),je=Te(Le),Fe=Ae(Le),Xe=function(t){return 1-Math.sin(Math.acos(t))},Ye=Te(Xe),He=Ae(Ye),Be=ke(1.525),ze=Te(Be),Ie=Ae(Be),Ne=Ve(1.525),Ue=function(t){var n=t*t;return t<4/11?7.5625*n:t<8/11?9.075*n-9.9*t+3.4:t<.9?4356/361*n-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},We="undefined"!=typeof Float32Array,qe=function(t,n){return 1-3*n+3*t},Ze=function(t,n){return 3*n-6*t},Ge=function(t){return 3*t},$e=function(t,n,e){return 3*qe(n,e)*t*t+2*Ze(n,e)*t+Ge(n)},_e=function(t,n,e){return((qe(n,e)*t+Ze(n,e))*t+Ge(n))*t};function Ke(a,n,u,e){var s=We?new Float32Array(11):new Array(11),r=function(t){for(var n,e,r,i=0,o=1;10!==o&&s[o]<=t;++o)i+=.1;return n=(t-s[--o])/(s[o+1]-s[o]),.001<=(r=$e(e=i+.1*n,a,u))?function(t,n){for(var e=0,r=0;e<8;++e){if(0===(r=$e(n,a,u)))return n;n-=(_e(n,a,u)-t)/r}return n}(t,e):0===r?e:function(t,n,e){for(var r,i,o=0;0<(r=_e(i=n+(e-n)/2,a,u)-t)?e=i:n=i,1e-7<Math.abs(r)&&++o<10;);return i}(t,i,i+.1)};!function(){for(var t=0;t<11;++t)s[t]=_e(.1*t,a,u)}();return function(t){return a===n&&u===e?t:0===t?0:1===t?1:_e(r(t),n,e)}}var Je=Object.freeze({reversed:Te,mirrored:Ae,createReversedEasing:Pe,createMirroredEasing:Re,createExpoIn:Me,createBackIn:ke,createAnticipateEasing:Ve,linear:De,easeIn:Le,easeOut:je,easeInOut:Fe,circIn:Xe,circOut:Ye,circInOut:He,backIn:Be,backOut:ze,backInOut:Ie,anticipate:Ne,bounceOut:Ue,bounceIn:function(t){return 1-Ue(1-t)},bounceInOut:function(t){return t<.5?.5*(1-Ue(1-2*t)):.5*Ue(2*t-1)+.5},cubicBezier:Ke}),Qe=function(t){return Array.isArray(t)?(R(4===t.length,"Cubic bezier arrays must contain four numerical values."),Ke(t[0],t[1],t[2],t[3])):"string"==typeof t?(R(void 0!==Je[t],"Invalid easing type '"+t+"'"),Je[t]):t},tr=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},nr=function(t,n){return"zIndex"!==t&&(!("number"!=typeof n&&!Array.isArray(n))||!("string"!=typeof n||!tt.test(n)||n.startsWith("url(")))},er=function(t){return 1e3*t},rr={tween:de,spring:se,keyframes:function(t){var n,e,r,i,o=t.easings,a=t.ease,u=void 0===a?Zn:a,s=t.times,c=t.values,f=A(t,["easings","ease","times","values"]);o=Array.isArray(o)?o:(e=o,(n=c).map(function(){return e||Gn}).splice(0,n.length-1)),s=s||(i=(r=c).length,r.map(function(t,n){return 0!==n?n/(i-1):0}));var l=o.map(function(t,n){return fe({from:c[n],to:c[n+1],ease:t})});return de(q({},f,{ease:u})).applyMiddleware(function(t){return n=l,e=t,i=(r=s).length,a=(o=i-1)-1,u=n.map(function(t){return t.start(e)}),function(t){t<=r[0]&&u[0].seek(0),t>=r[o]&&u[a].seek(1);for(var n=1;n<i&&!(r[n]>t||n===o);n++);var e=ct(r[n-1],r[n],t);u[n-1].seek(pe(e))};var r,n,e,i,o,a,u})},inertia:ce,just:Oe},ir={tween:function(t){if(t.ease){var n=tr(t.ease)?t.ease[0]:t.ease;t.ease=Qe(n)}return t},keyframes:function(t){var n=t.from,e=(t.to,t.velocity,A(t,["from","to","velocity"]));if(e.values&&null===e.values[0]){var r=e.values.slice();r[0]=n,e.values=r}return e.ease&&(e.easings=tr(e.ease)?e.ease.map(Qe):Qe(e.ease)),e.ease=De,e}},or=function(t,n,e){var r,i,o,a=e?e.delay:0;if(void 0===e||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var n=A(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(n).length}(e))return q({delay:a},(r=t,o=Hn(i=n)?Ce:Se[r]||Se.default,q({to:i},o(i))));var u=e[t]||e.default||e;return!1===u.type?{delay:u.hasOwnProperty("delay")?u.delay:a,to:Hn(n)?n[n.length-1]:n,type:"just"}:Hn(n)?q({values:n,duration:.8,delay:a,ease:"linear"},u,{type:"keyframes"}):q({type:"tween",to:n,delay:a},u)},ar=function(t,n,e,r){var i=n.get(),o=nr(t,i),a=nr(t,e);x(o===a,"You are trying to animate "+t+' from "'+i+'" to '+e+'. "'+i+'" is not an animatable value - to enable this animation set '+i+" to a value animatable to "+e+" via the `style` property.");var u,s,c,f=or(t,e,r),l=f.type,d=void 0===l?"tween":l,p=A(f,["type"]),v=o&&a?rr[d]:Oe,h=(u=d,s=q({from:i,velocity:n.getVelocity()},p),ir[u]?ir[u](s):s);return((c=h).hasOwnProperty("duration")||c.hasOwnProperty("repeatDelay"))&&(h.duration&&(h.duration=er(h.duration)),h.repeatDelay&&(h.repeatDelay=er(h.repeatDelay))),[v,h]};function ur(s,c,f,t){var n=t.delay,l=void 0===n?0:n,d=A(t,["delay"]);return c.start(function(n){var e,t=ar(s,c,f,d),r=t[0],i=t[1],o=i.delay,a=A(i,["delay"]);void 0!==o&&(l=o);var u=function(){var t=r(a);e=t.start({update:function(t){return c.set(t)},complete:n})};return l?e=be(er(l)).start({complete:u}):u(),function(){e&&e.stop()}})}var sr=function(){function t(t){var e=this,n=t.values,r=t.readValueFromSource,i=t.makeTargetAnimatable;this.variants={},this.baseTarget={},this.overrides=[],this.resolvedOverrides=[],this.activeOverrides=new Set,this.isAnimating=new Set,this.hasValue=function(t){return!e.values.has(t)},this.values=n,this.readValueFromSource=r,this.makeTargetAnimatable=i,this.values.forEach(function(t,n){return e.baseTarget[n]=t.get()})}return t.prototype.setProps=function(t){this.props=t},t.prototype.setVariants=function(t){t&&(this.variants=t)},t.prototype.setDefaultTransition=function(t){t&&(this.defaultTransition=t)},t.prototype.setValues=function(t,n){var r=this,e=void 0===n?{}:n,i=e.isActive,o=void 0===i?new Set:i,a=e.priority,u=(t.transition,t.transitionEnd),s=A(t,["transition","transitionEnd"]);return s=this.transformValues(q({},s,u)),Object.keys(s).forEach(function(t){if(!o.has(t)){o.add(t);var n=Bn(s[t]);if(r.values.has(t)){var e=r.values.get(t);e&&e.set(n)}else r.values.set(t,Mt(n));a||(r.baseTarget[t]=n)}})},t.prototype.transformValues=function(t){var n=this.props.transformValues;return n?n(t):t},t.prototype.checkForNewValues=function(t){var n,e=Object.keys(t).filter(this.hasValue),r=e.length;if(r)for(var i=0;i<r;i++){var o=e[i],a=t[o],u=null;Array.isArray(a)&&(u=a[0]),null===u&&(u=this.readValueFromSource(o),R(null!==u,'No initial value for "'+o+'" can be inferred. Ensure an initial value for "'+o+'" is defined on the component.')),"string"==typeof u&&/^\d*\.?\d+$/.test(u)?u=parseFloat(u):(n=u,!In.find(Nn(n))&&tt.test(a)&&(u=tt.getAnimatableNone(a))),this.values.set(o,Mt(u)),this.baseTarget[o]=u}},t.prototype.resolveVariant=function(t){if(!t)return{target:void 0,transition:void 0,transitionEnd:void 0};var n,e,r,i;"function"==typeof t&&(t=t(this.props.custom,(r=this.values,i={},r.forEach(function(t,n){return i[n]=t.get()}),i),(n=this.values,e={},n.forEach(function(t,n){return e[n]=t.getVelocity()}),e)));var o=t.transition;return{transition:void 0===o?this.defaultTransition:o,transitionEnd:t.transitionEnd,target:A(t,["transition","transitionEnd"])}},t.prototype.getHighestPriority=function(){return this.activeOverrides.size?Math.max.apply(Math,Array.from(this.activeOverrides)):0},t.prototype.setOverride=function(n,e){this.overrides[e]=n,this.children&&this.children.forEach(function(t){return t.setOverride(n,e)})},t.prototype.startOverride=function(t){var n=this.overrides[t];if(n)return this.start(n,{priority:t})},t.prototype.clearOverride=function(n){var t=this;if(this.children&&this.children.forEach(function(t){return t.clearOverride(n)}),this.overrides[n]){this.activeOverrides.delete(n);var e=this.getHighestPriority();if(this.resetIsAnimating(),e)this.overrides[e]&&this.startOverride(e);var r=this.resolvedOverrides[n];if(r){var i={};for(var o in this.baseTarget)void 0!==r[o]&&(i[o]=this.baseTarget[o]);this.onStart(),this.animate(i).then(function(){return t.onComplete()})}}},t.prototype.apply=function(t){return Array.isArray(t)?this.applyVariantLabels(t):"string"==typeof t?this.applyVariantLabels([t]):void this.setValues(t)},t.prototype.applyVariantLabels=function(i){var o=this,a=new Set;i.slice().reverse().forEach(function(t){var n=o.resolveVariant(o.variants[t]),e=n.target,r=n.transitionEnd;r&&o.setValues(r,{isActive:a}),e&&o.setValues(e,{isActive:a}),o.children&&o.children.size&&o.children.forEach(function(t){return t.applyVariantLabels(i)})})},t.prototype.start=function(t,n){var e,r,i=this;return void 0===n&&(n={}),n.priority&&this.activeOverrides.add(n.priority),this.resetIsAnimating(n.priority),r=t,e=Array.isArray(r)?this.animateVariantLabels(t,n):"string"==typeof t?this.animateVariant(t,n):this.animate(t,n),this.onStart(),e.then(function(){return i.onComplete()})},t.prototype.animate=function(t,n){var e=this,r=void 0===n?{}:n,i=r.delay,o=void 0===i?0:i,a=r.priority,u=void 0===a?0:a,s=r.transitionOverride,c=this.resolveVariant(t),f=c.target,l=c.transition,d=c.transitionEnd;if(s&&(l=s),!f)return Promise.resolve();if(f=this.transformValues(f),d&&(d=this.transformValues(d)),this.checkForNewValues(f),this.makeTargetAnimatable){var p=this.makeTargetAnimatable(f,d);f=p.target,d=p.transitionEnd}u&&(this.resolvedOverrides[u]=f),this.checkForNewValues(f);var v=[];for(var h in f){var m=this.values.get(h);if(m&&f&&void 0!==f[h]){var g=f[h];u||(this.baseTarget[h]=Bn(g)),this.isAnimating.has(h)||(this.isAnimating.add(h),v.push(ur(h,m,g,q({delay:o},l))))}}var y=Promise.all(v);return d?y.then(function(){e.setValues(d,{priority:u})}):y},t.prototype.animateVariantLabels=function(t,n){var e=this,r=t.slice().reverse().map(function(t){return e.animateVariant(t,n)});return Promise.all(r)},t.prototype.animateVariant=function(t,n){var e=this,r=!1,i=0,o=0,a=1,u=n&&n.priority||0,s=this.variants[t],c=s?function(){return e.animate(s,n)}:function(){return Promise.resolve()},f=this.children?function(){return e.animateChildren(t,i,o,a,u)}:function(){return Promise.resolve()};if(s&&this.children){var l=this.resolveVariant(s).transition;l&&(r=l.when||r,i=l.delayChildren||i,o=l.staggerChildren||o,a=l.staggerDirection||a)}if(r){var d="beforeChildren"===r?[c,f]:[f,c],p=d[1];return(0,d[0])().then(p)}return Promise.all([c(),f()])},t.prototype.animateChildren=function(r,i,n,t,o){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===t&&(t=1),void 0===o&&(o=0),!this.children)return Promise.resolve();var a=[],e=(this.children.size-1)*n,u=1===t?function(t){return t*n}:function(t){return e-t*n};return Array.from(this.children).forEach(function(t,n){var e=t.animateVariant(r,{priority:o,delay:i+u(n)});a.push(e)}),Promise.all(a)},t.prototype.onStart=function(){var t=this.props.onAnimationStart;t&&t()},t.prototype.onComplete=function(){var t=this.props.onAnimationComplete;t&&t()},t.prototype.checkOverrideIsAnimating=function(t){for(var n=this.overrides.length,e=t+1;e<n;e++){var r=this.resolvedOverrides[e];if(r)for(var i in r)this.isAnimating.add(i)}},t.prototype.resetIsAnimating=function(n){void 0===n&&(n=0),this.isAnimating.clear(),n<this.getHighestPriority()&&this.checkOverrideIsAnimating(n),this.children&&this.children.forEach(function(t){return t.resetIsAnimating(n)})},t.prototype.stop=function(){this.values.forEach(function(t){return t.stop()})},t.prototype.addChild=function(e){this.children||(this.children=new Set),this.children.add(e),this.overrides.forEach(function(t,n){t&&e.setOverride(t,n)})},t.prototype.removeChild=function(t){this.children&&this.children.delete(t)},t.prototype.resetChildren=function(){this.children&&this.children.clear()},t}();var cr=function(){function t(){this.hasMounted=!1,this.pendingAnimations=[],this.componentControls=new Set}return t.prototype.setVariants=function(n){this.variants=n,this.componentControls.forEach(function(t){return t.setVariants(n)})},t.prototype.setDefaultTransition=function(n){this.defaultTransition=n,this.componentControls.forEach(function(t){return t.setDefaultTransition(n)})},t.prototype.subscribe=function(t){var n=this;return this.componentControls.add(t),this.variants&&t.setVariants(this.variants),this.defaultTransition&&t.setDefaultTransition(this.defaultTransition),function(){return n.componentControls.delete(t)}},t.prototype.start=function(e,r){var n=this;if(this.hasMounted){var i=[];return this.componentControls.forEach(function(t){var n=t.start(e,{transitionOverride:r});i.push(n)}),Promise.all(i)}return new Promise(function(t){n.pendingAnimations.push({animation:[e,r],resolve:t})})},t.prototype.set=function(n){return R(this.hasMounted,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),this.componentControls.forEach(function(t){return t.apply(n)})},t.prototype.stop=function(){this.componentControls.forEach(function(t){return t.stop()})},t.prototype.mount=function(){var r=this;this.hasMounted=!0,this.pendingAnimations.forEach(function(t){var n=t.animation,e=t.resolve;return r.start.apply(r,n).then(e)})},t.prototype.unmount=function(){this.hasMounted=!1,this.stop()},t}(),fr=W.createContext({static:!1}),lr=function(t){return"string"==typeof t||Array.isArray(t)},dr=function(t){return t instanceof cr},pr=function(n,e,t,r,i){void 0===r&&(r=!1);var o,a=i.initial,u=i.animate,s=i.variants,c=i.whileTap,f=i.whileHover;!1!==a||dr(u)?"boolean"!=typeof a&&(o=a):o=u;var l,d,p=W.useRef(!1),v=s||lr(u)||lr(c)||lr(f)||dr(u),h=lr(o)?o:n.initial,m=lr(u)?u:n.animate,g=r?h:null,y=v&&lr(m)?m:null,b=W.useMemo(function(){return{controls:v?e:n.controls,initial:h,animate:m,values:t,hasMounted:p}},[g,y]);return b.static=r,l=function(){var t=o||n.initial;t&&e.apply(t)},void 0===(d=r?1/0:1)&&(d=1),W.useRef(0).current++<d&&l(),W.useEffect(function(){p.current=!0},[]),b};function vr(t,n,e){var r=n.variants,i=n.transition,o=W.useContext(fr).controls,a=Sn(function(){return new sr(t)});return a.resetChildren(),a.setProps(n),a.setVariants(r),a.setDefaultTransition(i),e&&o&&o.addChild(a),W.useEffect(function(){return function(){n.onAnimationComplete;var t=A(n,["onAnimationComplete"]);a.setProps(t),o&&o.removeChild(a)}},[]),a}var hr,mr=function(t){var S=t.getValueControlsConfig,O=t.loadFunctionalityComponents,T=t.renderComponent;return W.forwardRef(function(t,n){var e,r,i,o,a,u,s=P(n),c=W.useContext(fr),f=c.exitProps,l=A(c,["exitProps"]);f&&(e=t,i=(r=f).initial,o=r.isExiting,a=r.custom,u=r.onExitComplete,t=o?(R(!!e.exit,"No exit animation defined."),q({},e,{custom:void 0!==a?a:e.custom,animate:e.exit,onAnimationComplete:function(){u&&u(),e.onAnimationComplete&&e.onAnimationComplete()}})):!1===i?q({},e,{initial:i}):e);var d,p,v,h,m=l.static||t.static||!1,g=jn(t),y=function(t,n,e,r){void 0===n&&(n={});var i,o={},a=W.useRef({}).current;for(var u in n){var s=n[u];Tn(s)?t.set(u,s):e||!Zt(u)&&(i=u,!Yn.has(i))?o[u]=s:(t.has(u)?s!==a[u]&&t.get(u).set(s):t.set(u,Mt(s)),a[u]=s)}return r?r(o):o}(g,t.style,m,t.transformValues),b=(p=(d=t).animate,v=d.variants,(void 0===(h=d.inherit)||h)&&!!v&&(!p||p instanceof cr)),w=vr(Sn(function(){return S(s,g)}),t,b),x=pr(l,w,g,m,t),E=m?null:O(s,g,t,w,b),C=T(s,y,g,t,m);return W.createElement(W.Fragment,null,W.createElement(Fn,{ref:s,values:g,isStatic:m}),E,W.createElement(fr.Provider,{value:x},C))})},gr=["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"];(hr=w.Point||(w.Point={})).subtract=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},hr.relativeTo=function(o){var a;return function(t){var n=t.x,e=t.y,r=void 0!==a?a:a="string"==typeof o?document.getElementById(o):o;if(r){var i=r.getBoundingClientRect();return{x:n-i.left-window.scrollX,y:e-i.top-window.scrollY}}}};var yr=W.createContext({transformPagePoint:function(t){return t}});var br=!1;"undefined"!=typeof window&&window.addEventListener("touchmove",function(t){br&&t.preventDefault()},{passive:!1});var wr=function(){return br=!1};function xr(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Er(t){return!!t.touches}function Cr(t){return W.useEffect(function(){return function(){return t()}},[])}function Sr(t,n,e,r){if(e)return t.addEventListener(n,e,r),function(){return t.removeEventListener(n,e,r)}}function Or(n,e,r,i){W.useEffect(function(){var t=n.current;if(r&&t)return Sr(t,e,r,i)},[n,e,r,i])}var Tr={pageX:0,pageY:0};function Ar(t){return{point:Er(t)?(o=t,a=o.touches[0]||o.changedTouches[0]||Tr,{x:a.pageX,y:a.pageY}):(n=t,e=n.pageX,r=void 0===e?0:e,i=n.pageY,{x:r,y:void 0===i?0:i})};var n,e,r,i,o,a}var Pr=function(n,t){if(void 0===t&&(t=!1),n){var e=function(t){return n(t,Ar(t))};return t?function(e){if(e)return function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}}(e):e}},Rr="undefined"!=typeof window,Mr=function(){return Rr&&null===window.onpointerdown},kr=function(){return Rr&&null===window.ontouchstart},Vr=function(){return Rr&&null===window.onmousedown},Dr={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Lr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function jr(t){return Mr()?t:kr()?Lr[t]:Vr()?Dr[t]:t}function Fr(t,n,e,r){return Sr(t,jr(n),Pr(e,"pointerdown"===n),r)}function Xr(t,n,e,r){return Or(t,jr(n),Pr(e,"pointerdown"===n),r)}function Yr(t){return t.pointHistory[t.pointHistory.length-1]}function Hr(t,n){var e=t.onPan,r=t.onPanStart,i=t.onPanEnd,o=t.onPanSessionStart,a=e||r||i||o,u=W.useRef(null),s=W.useRef(null),c=W.useRef(null),f=W.useContext(yr).transformPagePoint,l=W.useRef(null),d=W.useRef({}).current;function p(){l.current&&l.current(),l.current=null}function v(t){var n,e=t.point,r=u.current;return{point:e,delta:w.Point.subtract(e,Yr(r)),offset:w.Point.subtract(e,(n=r,n.pointHistory[0])),velocity:function(t,n){var e=t.pointHistory;if(e.length<2)return{x:0,y:0};for(var r=e.length-1,i=null,o=Yr(t);0<=r&&(i=e[r],!(o.timestamp-i.timestamp>er(n)));)r--;if(!i)return{x:0,y:0};var a=(o.timestamp-i.timestamp)/1e3;if(0===a)return{x:0,y:0};var u={x:(o.x-i.x)/a,y:(o.y-i.y)/a};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}(r,.1)}}function h(t){return{point:f(t.point)}}function m(){p(),X.update(g),wr()}function g(){if(!u.current||!s.current||!c.current)return x(!1,"onPointerMove fired without pointer session"),void m();var t=v(c.current),n=void 0!==u.current.startEvent,e=3<=st(t.offset,{x:0,y:0});if(n||e){var r=t.point,i=S().timestamp;u.current.pointHistory.push(q({},r,{timestamp:i})),n||(d.onPanStart&&d.onPanStart(s.current,t),u.current.startEvent=s.current),d.onPan&&d.onPan(s.current,t)}}function y(t,n){s.current=t,c.current=h(n),xr(t)&&0===t.buttons?b(t,n):F.update(g,!0)}function b(t,n){m(),u.current?(d.onPanEnd&&d.onPanEnd(t,v(h(n))),u.current=null):x(!1,"onPointerUp fired without pointer session")}d.onPanSessionStart=o,d.onPanStart=r,d.onPan=e,d.onPanEnd=i,Xr(n,"pointerdown",a&&function(t,n){if(!(Er(t)&&1<t.touches.length)){var e=h(n),r=e.point,i=S().timestamp;u.current={target:t.target,pointHistory:[q({},r,{timestamp:i})]},d.onPanSessionStart&&d.onPanSessionStart(t,v(e)),p();var o=Fr(window,"pointermove",y),a=Fr(window,"pointerup",b);l.current=function(){o&&o(),a&&a()}}}),Cr(m)}var Br=function(t,n){return!!n&&(t===n||Br(t,n.parentElement))},zr=["whileHover","whileTap","whileDrag"],Ir=function(t){return zr.indexOf(t)+1};function Nr(t){var n=null;return function(){return null===n&&(n=t,function(){n=nu