UNPKG

stylish-sidebar

Version:
29 lines (25 loc) 136 kB
import t,{createContext as e,createElement as n,Component as r,useCallback as o,useContext as i,useRef as a,Fragment as s,cloneElement as u,forwardRef as c,useState as l,useEffect as f,useMemo as d,Children as p,isValidElement as h,useLayoutEffect as v}from"react";function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */()}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var C=function(t,e){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function E(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var k=function(){return(k=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 S(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&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function A(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function P(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(A(arguments[e]));return t}var O="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(performance.now())}),16.666666666666668)};var T=!0,M=!1,V=!1,D={delta:0,timestamp:0},L=["read","update","preRender","render","postRender"],B=L.reduce((function(t,e){return t[e]=function(t){var e=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(t,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var u=s&&o,c=u?e:n;return a&&i.add(t),-1===c.indexOf(t)&&(c.push(t),u&&o&&(r=e.length)),t},cancel:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1),i.delete(t)},process:function(s){var u;if(o=!0,e=(u=[n,e])[0],(n=u[1]).length=0,r=e.length)for(var c=0;c<r;c++){var l=e[c];l(s),i.has(l)&&(a.schedule(l),t())}o=!1}};return a}((function(){return M=!0})),t}),{}),_=L.reduce((function(t,e){var n=B[e];return t[e]=function(t,e,r){return void 0===e&&(e=!1),void 0===r&&(r=!1),M||j(),n.schedule(t,e,r)},t}),{}),N=L.reduce((function(t,e){return t[e]=B[e].cancel,t}),{}),R=function(t){return B[t].process(D)},I=function(t){M=!1,D.delta=T?16.666666666666668:Math.max(Math.min(t-D.timestamp,40),1),D.timestamp=t,V=!0,L.forEach(R),V=!1,M&&(T=!1,O(I))},j=function(){M=!0,T=!0,V||O(I)},U=function(){return D},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 z(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&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}var H=function(){},Y=function(){};"production"!==process.env.NODE_ENV&&(H=function(t,e){t||"undefined"==typeof console||console.warn(e)},Y=function(t,e){if(!t)throw new Error(e)}) /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */;var W=function(){return(W=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)},q=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},$=function(t){return t%1?Number(t.toFixed(5)):t},X=/(-)?([\d]*\.?[\d])+/g,G=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Z=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function K(t){return"string"==typeof t}var J={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},Q=W(W({},J),{transform:q(0,1)}),tt=W(W({},J),{default:1}),et=function(t){return{test:function(e){return K(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},nt=et("deg"),rt=et("%"),ot=et("px"),it=et("vh"),at=et("vw"),st=W(W({},rt),{parse:function(t){return rt.parse(t)/100},transform:function(t){return rt.transform(100*t)}}),ut=function(t,e){return function(n){return K(n)&&Z.test(n)&&n.startsWith(t)||e&&n.hasOwnProperty(e)}},ct=function(t,e,n){return function(r){var o;if(!K(r))return r;var i=r.match(X),a=i[0],s=i[1],u=i[2],c=i[3];return(o={})[t]=parseFloat(a),o[e]=parseFloat(s),o[n]=parseFloat(u),o.alpha=void 0!==c?parseFloat(c):1,o}},lt={test:ut("hsl","hue"),parse:ct("hue","saturation","lightness"),transform:function(t){var e=t.hue,n=t.saturation,r=t.lightness,o=t.alpha,i=void 0===o?1:o;return"hsla("+Math.round(e)+", "+rt.transform($(n))+", "+rt.transform($(r))+", "+$(Q.transform(i))+")"}},ft=q(0,255),dt=W(W({},J),{transform:function(t){return Math.round(ft(t))}}),pt={test:ut("rgb","red"),parse:ct("red","green","blue"),transform:function(t){var e=t.red,n=t.green,r=t.blue,o=t.alpha,i=void 0===o?1:o;return"rgba("+dt.transform(e)+", "+dt.transform(n)+", "+dt.transform(r)+", "+$(Q.transform(i))+")"}};var ht={test:ut("#"),parse:function(t){var e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:pt.transform},vt={test:function(t){return pt.test(t)||ht.test(t)||lt.test(t)},parse:function(t){return pt.test(t)?pt.parse(t):lt.test(t)?lt.parse(t):ht.parse(t)},transform:function(t){return K(t)?t:t.hasOwnProperty("red")?pt.transform(t):lt.transform(t)}};function mt(t){var e=[],n=0,r=t.match(G);r&&(n=r.length,t=t.replace(G,"${c}"),e.push.apply(e,r.map(vt.parse)));var o=t.match(X);return o&&(t=t.replace(X,"${n}"),e.push.apply(e,o.map(J.parse))),{values:e,numColors:n,tokenised:t}}function gt(t){return mt(t).values}function yt(t){var e=mt(t),n=e.values,r=e.numColors,o=e.tokenised,i=n.length;return function(t){for(var e=o,n=0;n<i;n++)e=e.replace(n<r?"${c}":"${n}",n<r?vt.transform(t[n]):$(t[n]));return e}}var bt=function(t){return"number"==typeof t?0:t};var xt={test:function(t){var e,n,r,o;return isNaN(t)&&K(t)&&(null!==(n=null===(e=t.match(X))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(G))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:gt,createTransformer:yt,getAnimatableNone:function(t){var e=gt(t);return yt(t)(e.map(bt))}},wt=new Set(["brightness","contrast","saturate","opacity"]);function Ct(t){var e=t.slice(0,-1).split("("),n=e[0],r=e[1];if("drop-shadow"===n)return t;var o=(r.match(X)||[])[0];if(!o)return t;var i=r.replace(o,""),a=wt.has(n)?1:0;return o!==r&&(a*=100),n+"("+a+i+")"}var Et=/([a-z-]*)\(.*?\)/g,kt=W(W({},xt),{getAnimatableNone:function(t){var e=t.match(Et);return e?e.map(Ct).join(" "):t}}),St=function(t,e,n){return Math.min(Math.max(n,t),e)};function At(t){var e,n,r=t.duration,o=void 0===r?800:r,i=t.bounce,a=void 0===i?.25:i,s=t.velocity,u=void 0===s?0:s,c=t.mass,l=void 0===c?1:c;H(o<=1e4,"Spring duration must be 10 seconds or less");var f=1-a;f=St(.05,1,f),o=St(.01,10,o/1e3),f<1?(e=function(t){var e=t*f,n=e*o;return.001-(e-u)/Pt(t,f)*Math.exp(-n)},n=function(t){var n=t*f*o,r=n*u+u,i=Math.pow(f,2)*Math.pow(t,2)*o,a=Math.exp(-n),s=Pt(Math.pow(t,2),f);return(.001-e(t)>0?-1:1)*((r-i)*a)/s}):(e=function(t){return Math.exp(-t*o)*((t-u)*o+1)-.001},n=function(t){return Math.exp(-t*o)*(o*o*(u-t))});var d=function(t,e,n){for(var r=n,o=1;o<12;o++)r-=t(r)/e(r);return r}(e,n,5/o);if(isNaN(d))return{stiffness:100,damping:10};var p=Math.pow(d,2)*l;return{stiffness:p,damping:2*f*Math.sqrt(l*p)}}function Pt(t,e){return t*Math.sqrt(1-e*e)}var Ot=["duration","bounce"],Tt=["stiffness","damping","mass"];function Mt(t,e){return e.some((function(e){return void 0!==t[e]}))}function Vt(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.restSpeed,a=void 0===i?2:i,s=t.restDelta,u=z(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},l=function(t){var e=F({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Mt(t,Tt)&&Mt(t,Ot)){var n=At(t);(e=F(F(F({},e),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return e}(u),f=l.stiffness,d=l.damping,p=l.mass,h=l.velocity,v=l.isResolvedFromDuration,m=Dt,g=Dt;function y(){var t=h?-h/1e3:0,e=o-n,r=d/(2*Math.sqrt(f*p)),i=Math.sqrt(f/p)/1e3;if(null!=s||(s=Math.abs(o-n)<=1?.01:.4),r<1){var a=Pt(i,r);m=function(n){var s=Math.exp(-r*i*n);return o-s*((t+r*i*e)/a*Math.sin(a*n)+e*Math.cos(a*n))},g=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(t+r*i*e)/a+e*Math.cos(a*n))-o*(Math.cos(a*n)*(t+r*i*e)-a*e*Math.sin(a*n))}}else if(1===r)m=function(n){return o-Math.exp(-i*n)*(e+(t+i*e)*n)};else{var u=i*Math.sqrt(r*r-1);m=function(n){var a=Math.exp(-r*i*n),s=Math.min(u*n,300);return o-a*((t+r*i*e)*Math.sinh(s)+u*e*Math.cosh(s))/u}}}return y(),{next:function(t){var e=m(t);if(v)c.done=t>=u.duration;else{var n=1e3*g(t),r=Math.abs(n)<=a,i=Math.abs(o-e)<=s;c.done=r&&i}return c.value=c.done?o:e,c},flipTarget:function(){var t;h=-h,n=(t=[o,n])[0],o=t[1],y()}}}Vt.needsInterpolation=function(t,e){return"string"==typeof t||"string"==typeof e};var Dt=function(t){return 0},Lt=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Bt=function(t,e,n){return-n*t+n*e+t},_t=function(t,e,n){var r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},Nt=[ht,pt,lt],Rt=function(t){return Nt.find((function(e){return e.test(t)}))},It=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},jt=function(t,e){var n=Rt(t),r=Rt(e);Y(!!n,It(t)),Y(!!r,It(e)),Y(n.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var o=n.parse(t),i=r.parse(e),a=F({},o),s=n===lt?Bt:_t;return function(t){for(var e in a)"alpha"!==e&&(a[e]=s(o[e],i[e],t));return a.alpha=Bt(o.alpha,i.alpha,t),n.transform(a)}},Ut=function(t){return"number"==typeof t},Ft=function(t,e){return function(n){return e(t(n))}},zt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Ft)};function Ht(t,e){return Ut(t)?function(n){return Bt(t,e,n)}:vt.test(t)?jt(t,e):$t(t,e)}var Yt=function(t,e){var n=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(t),r=n.length,o=t.map((function(t,n){return Ht(t,e[n])}));return function(t){for(var e=0;e<r;e++)n[e]=o[e](t);return n}},Wt=function(t,e){var n=F(F({},t),e),r={};for(var o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=Ht(t[o],e[o]));return function(t){for(var e in r)n[e]=r[e](t);return n}};function qt(t){for(var e=xt.parse(t),n=e.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"==typeof e[a]?r++:void 0!==e[a].hue?i++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:i}}var $t=function(t,e){var n=xt.createTransformer(e),r=qt(t),o=qt(e);return Y(r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers,"Complex values '"+t+"' and '"+e+"' too different to mix. Ensure all colors are of the same type."),zt(Yt(r.parsed,o.parsed),n)},Xt=function(t,e){return function(n){return Bt(t,e,n)}};function Gt(t,e,n){for(var r,o=[],i=n||("number"==typeof(r=t[0])?Xt:"string"==typeof r?vt.test(r)?jt:$t:Array.isArray(r)?Yt:"object"==typeof r?Wt:void 0),a=t.length-1,s=0;s<a;s++){var u=i(t[s],t[s+1]);if(e){var c=Array.isArray(e)?e[s]:e;u=zt(c,u)}o.push(u)}return o}function Zt(t,e,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,u=t.length;Y(u===e.length,"Both input and output ranges must be the same length"),Y(!a||!Array.isArray(a)||a.length===u-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[u-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var c=Gt(e,a,s),l=2===u?function(t,e){var n=t[0],r=t[1],o=e[0];return function(t){return o(Lt(n,r,t))}}(t,c):function(t,e){var n=t.length,r=n-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(t[s]>o||s===r);s++);i=s-1}var u=Lt(t[i],t[i+1],o);return e[i](u)}}(t,c);return i?function(e){return l(St(t[0],t[u-1],e))}:l}var Kt=function(t){return function(e){return 1-t(1-e)}},Jt=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},Qt=function(t){return function(e){return e*e*((t+1)*e-t)}},te=function(t){var e=Qt(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},ee=function(t){return t},ne=function(t){return function(e){return Math.pow(e,t)}}(2),re=Kt(ne),oe=Jt(ne),ie=function(t){return 1-Math.sin(Math.acos(t))},ae=Kt(ie),se=Jt(ae),ue=Qt(1.525),ce=Kt(ue),le=Jt(ue),fe=te(1.525),de=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},pe=Kt(de);function he(t,e){return t.map((function(){return e||oe})).splice(0,t.length-1)}function ve(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,a=t.offset,s=t.duration,u=void 0===s?300:s,c={done:!1,value:n},l=Array.isArray(o)?o:[n,o],f=function(t,e){return t.map((function(t){return t*e}))}(a&&a.length===l.length?a:function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(l),u);function d(){return Zt(f,l,{ease:Array.isArray(i)?i:he(l,i)})}var p=d();return{next:function(t){return c.value=p(t),c.done=t>=u,c},flipTarget:function(){l.reverse(),p=d()}}}var me={keyframes:ve,spring:Vt,decay:function(t){var e=t.velocity,n=void 0===e?0:e,r=t.from,o=void 0===r?0:r,i=t.power,a=void 0===i?.8:i,s=t.timeConstant,u=void 0===s?350:s,c=t.restDelta,l=void 0===c?.5:c,f=t.modifyTarget,d={done:!1,value:o},p=a*n,h=o+p,v=void 0===f?h:f(h);return v!==h&&(p=v-o),{next:function(t){var e=-p*Math.exp(-t/u);return d.done=!(e>l||e<-l),d.value=d.done?v:v+e,d},flipTarget:function(){}}}};function ge(t,e,n){return void 0===n&&(n=0),t-e-n}var ye=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return _.update(e,!0,!0)},stop:function(){return N.update(e)}}};function be(t){var e,n,r,o,i,a=t.from,s=t.autoplay,u=void 0===s||s,c=t.driver,l=void 0===c?ye:c,f=t.elapsed,d=void 0===f?0:f,p=t.repeat,h=void 0===p?0:p,v=t.repeatType,m=void 0===v?"loop":v,g=t.repeatDelay,y=void 0===g?0:g,b=t.onPlay,x=t.onStop,w=t.onComplete,C=t.onRepeat,E=t.onUpdate,k=z(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),S=k.to,A=0,P=k.duration,O=!1,T=!0,M=function(t){if(Array.isArray(t.to))return ve;if(me[t.type])return me[t.type];var e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?ve:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Vt:ve}(k);(null===(n=(e=M).needsInterpolation)||void 0===n?void 0:n.call(e,a,S))&&(i=Zt([0,100],[a,S],{clamp:!1}),a=0,S=100);var V=M(F(F({},k),{from:a,to:S}));function D(){A++,"reverse"===m?d=function(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?ge(e+-t,e,n):e-(t-e)+n}(d,P,y,T=A%2==0):(d=ge(d,P,y),"mirror"===m&&V.flipTarget()),O=!1,C&&C()}function L(t){if(T||(t=-t),d+=t,!O){var e=V.next(Math.max(0,d));o=e.value,i&&(o=i(o)),O=T?e.done:d<=0}null==E||E(o),O&&(0===A&&(null!=P||(P=d)),A<h?function(t,e,n,r){return r?t>=e+n:t<=-n}(d,P,y,T)&&D():(r.stop(),w&&w()))}return u&&(null==b||b(),(r=l(L)).start()),{stop:function(){null==x||x(),r.stop()}}}function xe(t,e){return e?t*(1e3/e):0}var we=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Ce=function(t){return we(t)&&t.hasOwnProperty("z")},Ee=function(t,e){return Math.abs(t-e)};function ke(t,e){if(Ut(t)&&Ut(e))return Ee(t,e);if(we(t)&&we(e)){var n=Ee(t.x,e.x),r=Ee(t.y,e.y),o=Ce(t)&&Ce(e)?Ee(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var Se=function(t,e){return 1-3*e+3*t},Ae=function(t,e){return 3*e-6*t},Pe=function(t){return 3*t},Oe=function(t,e,n){return((Se(e,n)*t+Ae(e,n))*t+Pe(e))*t},Te=function(t,e,n){return 3*Se(e,n)*t*t+2*Ae(e,n)*t+Pe(e)};function Me(t,e,n,r){if(t===e&&n===r)return ee;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Oe(.1*i,t,n);function a(e){for(var r=0,i=1;10!==i&&o[i]<=e;++i)r+=.1;--i;var a=r+.1*((e-o[i])/(o[i+1]-o[i])),s=Te(a,t,n);return s>=.001?function(t,e,n,r){for(var o=0;o<8;++o){var i=Te(e,n,r);if(0===i)return e;e-=(Oe(e,n,r)-t)/i}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){var i,a,s=0;do{(i=Oe(a=e+(n-e)/2,r,o)-t)>0?n=a:e=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return function(t){return 0===t||1===t?t:Oe(a(t),e,r)}}var Ve=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},De=function(){function t(){this.subscriptions=new Set}return t.prototype.add=function(t){var e=this;return this.subscriptions.add(t),function(){e.subscriptions.delete(t)}},t.prototype.notify=function(t,e,n){var r,o;if(this.subscriptions.size)try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.subscriptions),a=i.next();!a.done;a=i.next()){(0,a.value)(t,e,n)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.clear=function(){this.subscriptions.clear()},t}(),Le=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new De,this.renderSubscribers=new De,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t,n.prev!==n.current&&n.updateSubscribers.notify(n.current),e&&n.renderSubscribers.notify(n.current);var r=U(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,_.postRender(n.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return _.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current)},this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?xe(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Be(t){return new Le(t)}var _e=function(){function t(t,e){var n=this;this.children=new Set,this.isHoverEventsEnabled=!0,this.baseTarget={},this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.isMounted=!1,this.update=function(){return n.config.onUpdate(n.latest)},this.triggerRender=function(){return n.render()},this.ref=function(t){t?n.mount(t):n.unmount(),n.externalRef&&("function"==typeof n.externalRef?n.externalRef(t):Ve(n.externalRef)&&(n.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?P(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=e}return t.prototype.suspendHoverEvents=function(){var t=this;this.isHoverEventsEnabled=!1,_.postRender((function(){return setTimeout((function(){return t.isHoverEventsEnabled=!0}),10)}))},t.prototype.getVariantPayload=function(){return this.config.custom},t.prototype.getVariant=function(t){var e;return null===(e=this.config.variants)||void 0===e?void 0:e[t]},t.prototype.addVariantChild=function(t){var e=this;return this.variantChildren||(this.variantChildren=new Set),this.variantChildren.add(t),function(){return e.variantChildren.delete(t)}},t.prototype.addVariantChildOrder=function(t){this.variantChildrenOrder||(this.variantChildrenOrder=new Set),this.variantChildrenOrder.add(t)},t.prototype.onAnimationStart=function(){var t,e;null===(e=(t=this.config).onAnimationStart)||void 0===e||e.call(t)},t.prototype.onAnimationComplete=function(){var t,e;this.isMounted&&(null===(e=(t=this.config).onAnimationComplete)||void 0===e||e.call(t))},t.prototype.getDefaultTransition=function(){return this.config.transition},t.prototype.subscribe=function(t){var e=this;return this.children.add(t),function(){return e.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.setSingleStaticValue(t,e.get()),this.subscribeToValue(t,e)},t.prototype.removeValue=function(t){var e;null===(e=this.valueSubscriptions.get(t))||void 0===e||e(),this.valueSubscriptions.delete(t),this.values.delete(t),delete this.latest[t]},t.prototype.getValue=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new Le(e),this.addValue(t,n)),n},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=k({},t)},t.prototype.getBaseValue=function(t,e){return this.baseTarget[t]},t.prototype.setSingleStaticValue=function(t,e){this.latest[t]=e},t.prototype.setStaticValues=function(t,e){if("string"==typeof t)this.setSingleStaticValue(t,e);else for(var n in t)this.setSingleStaticValue(n,t[n])},t.prototype.scheduleRender=function(){_.render(this.triggerRender,!1,!0)},t.prototype.scheduleUpdateLayoutDelta=function(){_.preRender(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,e){var n=this,r=e.onChange((function(e){n.setSingleStaticValue(t,e),n.element&&n.config.onUpdate&&_.update(n.update,!1,!0)})),o=e.onRenderRequest((function(){n.element&&n.scheduleRender()}));this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){Y(!!t,"No ref found. Ensure components created with motion.custom forward refs using React.forwardRef"),this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t},t.prototype.unmount=function(){var t=this;this.forEachValue((function(e,n){return t.removeValue(n)})),N.update(this.update),N.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function Ne(t){return t}function Re(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function Ie(t){return{x:k({},t.x),y:k({},t.y)}}var je={translate:0,scale:1,origin:0,originPoint:0};function Ue(){return{x:k({},je),y:k({},je)}}var Fe=k(k({},J),{transform:Math.round}),ze={color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,borderWidth:ot,borderTopWidth:ot,borderRightWidth:ot,borderBottomWidth:ot,borderLeftWidth:ot,borderRadius:ot,radius:ot,borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomRightRadius:ot,borderBottomLeftRadius:ot,width:ot,maxWidth:ot,height:ot,maxHeight:ot,size:ot,top:ot,right:ot,bottom:ot,left:ot,padding:ot,paddingTop:ot,paddingRight:ot,paddingBottom:ot,paddingLeft:ot,margin:ot,marginTop:ot,marginRight:ot,marginBottom:ot,marginLeft:ot,rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:nt,skewX:nt,skewY:nt,distance:ot,translateX:ot,translateY:ot,translateZ:ot,x:ot,y:ot,z:ot,perspective:ot,transformPerspective:ot,opacity:Q,originX:st,originY:st,originZ:ot,zIndex:Fe,filter:kt,WebkitFilter:kt,fillOpacity:Q,strokeOpacity:Q,numOctaves:Fe},He=[J,ot,rt,nt,at,it,{test:function(t){return"auto"===t},parse:function(t){return t}}],Ye=function(t){return function(e){return e.test(t)}},We=function(t){return He.find(Ye(t))},qe=P(He,[vt,xt]),$e=function(t){return qe.find(Ye(t))},Xe=function(t){return ze[t]},Ge=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Ze(t,e){var n,r=Xe(t);return r!==kt&&(r=xt),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Ke=["","X","Y","Z"],Je=["transformPerspective","x","y","z"];function Qe(t,e){return Je.indexOf(t)-Je.indexOf(e)}["perspective","translate","scale","rotate","skew"].forEach((function(t){Ke.forEach((function(e){var n=t+e;Je.push(n)}))}));var tn=new Set(Je);function en(t){return tn.has(t)}var nn=new Set(["originX","originY","originZ"]);function rn(t){return nn.has(t)}var on={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function an(t,e,n){var r=t.x,o=t.y,i="translate3d("+r.translate/e.x+"px, "+o.translate/e.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,u=n.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),u&&(i+="rotateY("+u+") ")}return i+="scale("+r.scale+", "+o.scale+")",n||i!==sn?i:""}var sn=an(Ue(),{x:1,y:1});function un(t){return t.startsWith("--")}function cn(t){return"string"==typeof t&&t.startsWith("var(--")}var ln=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fn(t,e,n){void 0===n&&(n=1),Y(n<=4,'Max CSS variable fallback depth detected in property "'+t+'". This may indicate a circular fallback dependency.');var r=A(function(t){var e=ln.exec(t);if(!e)return[,];var n=A(e,3);return[n[1],n[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(e).getPropertyValue(o);return a?a.trim():cn(i)?fn(i,e,n+1):i}}function dn(t,e){return t/(e.max-e.min)*100}var pn={process:function(t,e){if("string"==typeof t){if(!ot.test(t))return t;t=parseFloat(t)}return dn(t,e.x)+"% "+dn(t,e.y)+"%"}},hn={borderRadius:k(k({},pn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:pn,borderTopRightRadius:pn,borderBottomLeftRadius:pn,borderBottomRightRadius:pn,boxShadow:{process:function(t,e,n,r){var o=t,i=t.includes("var("),a=[];i&&(t=t.replace(ln,(function(t){return a.push(t),"_$css"})));var s=xt.parse(t);if(s.length>5)return o;var u=xt.createTransformer(t),c="number"!=typeof s[0]?1:0,l=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=l,s[1+c]/=f;var d=Bt(l,f,.5);"number"==typeof s[2+c]&&(s[2+c]/=d),"number"==typeof s[3+c]&&(s[3+c]/=d);var p=u(s);if(i){var h=0;p=p.replace("_$css",(function(){var t=a[h];return h++,t}))}return p}}};function vn(t,e,n,r,o,i,a,s,u,c,l,f){var d=a.enableHardwareAcceleration,p=a.transformTemplate,h=a.allowTransformNone;i.length=0;var v=!1,m=!1,g=!0;for(var y in t){var b=t[y],x=Xe(y),w=Ge(b,x);if(en(y)){if(v=!0,r[y]=w,i.push(y),!g)continue;b!==(void 0!==x.default?x.default:0)&&(g=!1)}else if(rn(y))o[y]=w,m=!0;else if("transform"!==y||"function"!=typeof b){var C=un(y)?n:e;if(s&&hn[y]){var E=hn[y].process(b,f,u,l),k=hn[y].applyTo;if(k)for(var S=k.length,A=0;A<S;A++)C[k[A]]=E;else C[y]=E}else C[y]=w}}s?(e.transform=an(c,l,v?r:void 0),p&&(e.transform=p(r,e.transform)),e.transformOrigin=function(t){var e=t.x,n=t.y;return 100*e.origin+"% "+100*n.origin+"% 0"}(c)):(v&&(e.transform=function(t,e,n,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!0);var a="";e.sort(Qe);for(var s=!1,u=e.length,c=0;c<u;c++){var l=e[c];a+=(on[l]||l)+"("+t[l]+") ","z"===l&&(s=!0)}return!s&&o?a+="translateZ(0)":a=a.trim(),n?a=n(t,r?"":a):i&&r&&(a="none"),a}(r,i,p,g,d,h)),m&&(e.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,o=void 0===r?"50%":r,i=t.originZ;return n+" "+o+" "+(void 0===i?0:i)}(o)))}function mn(t,e){t.min=e.min,t.max=e.max}function gn(t,e,n){return n+e*(t-n)}function yn(t,e,n,r,o){return void 0!==o&&(t=gn(t,o,r)),gn(t,n,r)+e}function bn(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),t.min=yn(t.min,e,n,r,o),t.max=yn(t.max,e,n,r,o)}function xn(t,e){var n=e.x,r=e.y;bn(t.x,n.translate,n.scale,n.originPoint),bn(t.y,r.translate,r.scale,r.originPoint)}function wn(t,e,n,r){var o=A(r,3),i=o[0],a=o[1],s=o[2];t.min=e.min,t.max=e.max;var u=void 0!==n[s]?n[s]:.5,c=Bt(e.min,e.max,u);bn(t,n[i],n[a],c,n.scale)}var Cn=["x","scaleX","originX"],En=["y","scaleY","originY"];function kn(t,e,n,r,o){return t=gn(t-=e,1/n,r),void 0!==o&&(t=gn(t,1/o,r)),t}function Sn(t,e,n){var r=A(n,3),o=r[0],i=r[1],a=r[2];!function(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5);var i=Bt(t.min,t.max,r)-e;t.min=kn(t.min,e,n,i,o),t.max=kn(t.max,e,n,i,o)}(t,e[o],e[i],e[a],e.scale)}function An(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),ke(t,e)<n}function Pn(t){return t.max-t.min}function On(t,e){var n=.5,r=Pn(t),o=Pn(e);return o>r?n=Lt(e.min,e.max-r,t.min):r>o&&(n=Lt(t.min,t.max-o,e.min)),St(0,1,n)}function Tn(t,e,n,r){t.origin=void 0===r?On(e,n):r,t.originPoint=Bt(e.min,e.max,t.origin),t.scale=Pn(n)/Pn(e),An(t.scale,1,1e-4)&&(t.scale=1),t.translate=Bt(n.min,n.max,t.origin)-t.originPoint,An(t.translate)&&(t.translate=0)}function Mn(t,e,n,r){Tn(t.x,e.x,n.x,r),Tn(t.y,e.y,n.y,r)}function Vn(t){return[t("x"),t("y")]}function Dn(t,e){return Re(function(t,e){var n=t.top,r=t.left,o=t.bottom,i=t.right;void 0===e&&(e=Ne);var a=e({x:r,y:n}),s=e({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}var Ln,Bn=function(t){return Array.isArray(t)},_n=new Set(["width","height","top","left","right","bottom","x","y"]),Nn=function(t){return _n.has(t)},Rn=function(t,e){t.set(e,!1),t.set(e)},In=function(t){return t===J||t===ot};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Ln||(Ln={}));var jn=function(t,e){return parseFloat(t.split(", ")[e])},Un=function(t,e){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return jn(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?jn(a[1],t):0}},Fn=new Set(["x","y","z"]),zn=Je.filter((function(t){return!Fn.has(t)}));var Hn={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:Un(4,13),y:Un(5,14)},Yn=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=k({},e),r=k({},r);var o=Object.keys(e).filter(Nn),i=[],a=!1,s=[];if(o.forEach((function(o){var u=t.getValue(o);if(t.hasValue(o)){var c,l=n[o],f=e[o],d=We(l);if(Bn(f))for(var p=f.length,h=null===f[0]?1:0;h<p;h++)c?Y(We(f[h])===c,"All keyframes must be of the same type"):(c=We(f[h]),Y(c===d||In(d)&&In(c),"Keyframes must be of the same dimension as the current value"));else c=We(f);if(d!==c)if(In(d)&&In(c)){var v=u.get();"string"==typeof v&&u.set(parseFloat(v)),"string"==typeof f?e[o]=parseFloat(f):Array.isArray(f)&&c===ot&&(e[o]=f.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==c?void 0:c.transform)&&(0===l||0===f)?0===l?u.set(c.transform(l)):e[o]=d.transform(f):(a||(i=function(t){var e=[];return zn.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:e[o],Rn(u,f))}})),s.length){var u=function(t,e,n){var r=e.getBoundingBox(),o=e.getComputedStyle(),i=o.display,a={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===i&&e.setStaticValues("display",t.display||"block"),e.render();var s=e.getBoundingBox();return n.forEach((function(n){var i=e.getValue(n);Rn(i,Hn[n](r,a)),t[n]=Hn[n](s,o)})),t}(e,t,s);return i.length&&i.forEach((function(e){var n=A(e,2),r=n[0],o=n[1];t.getValue(r).set(o)})),t.render(),{target:u,transitionEnd:r}}return{target:e,transitionEnd:r}};function Wn(t,e,n,r){return function(t){return Object.keys(t).some(Nn)}(e)?Yn(t,e,n,r):{target:e,transitionEnd:r}}var qn=function(t,e,n,r){var o=function(t,e,n){var r,o=S(e,[]),i=t.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:n};for(var a in n&&(n=k({},n)),t.forEachValue((function(t){var e=t.get();if(cn(e)){var n=fn(e,i);n&&t.set(n)}})),o){var s=o[a];if(cn(s)){var u=fn(s,i);u&&(o[a]=u,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(t,e,r);return Wn(t,e=o.target,n,r=o.transitionEnd)};function $n(t){return Array.isArray(t)}function Xn(t,e,n){return"string"==typeof e&&(e=t.getVariant(e)),"function"==typeof e?e(null!=n?n:t.getVariantPayload(),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t)):e}function Gn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Be(n))}function Zn(t,e){var n,r=Xn(t,e),o=r?t.makeTargetAnimatable(r,!1):{},i=o.transitionEnd,a=void 0===i?{}:i,s=(o.transition,S(o,["transitionEnd","transition"]));for(var u in s=k(k({},s),a)){Gn(t,u,(n=s[u],Bn(n)?n[n.length-1]||0:n))}}function Kn(t,e){P(e).reverse().forEach((function(n){var r;Zn(t,t.getVariant(n)),null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){Kn(t,e)}))}))}function Jn(t,e){return Array.isArray(e)?Kn(t,e):"string"==typeof e?Kn(t,[e]):void Zn(t,e)}function Qn(t,e,n){var r,o,i,a=Object.keys(e).filter((function(e){return!t.hasValue(e)})),s=a.length;if(s)for(var u=0;u<s;u++){var c=a[u],l=e[c],f=null;if(Array.isArray(l)&&(f=l[0]),null===f){var d=null!==(r=n[c])&&void 0!==r?r:t.readNativeValue(c);f=void 0!==d?d:e[c],Y(null!==f,'No initial value for "'+c+'" can be inferred. Ensure an initial value for "'+c+'" is defined on the component.')}"string"==typeof f&&/^\-?\d*\.?\d+$/.test(f)?f=parseFloat(f):!$e(f)&&xt.test(l)&&(f=Ze(c,l)),t.addValue(c,Be(f)),null!==(o=(i=n)[c])&&void 0!==o||(i[c]=f),t.baseTarget[c]=f}}function tr(t,e){if(e)return(e[t]||e.default||e).from}function er(t,e,n){var r,o,i={};for(var a in t)i[a]=null!==(r=tr(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}var nr=function(t){return t instanceof Le},rr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},e.style={},e.reactStyle={},e.vars={},e.transform={},e.transformOrigin={},e.transformKeys=[],e.config=e.defaultConfig,e.isLayoutProjectionEnabled=!1,e.layoutUpdateListeners=new De,e.layoutMeasureListeners=new De,e.viewportBoxUpdateListeners=new De,e.hasViewportBoxUpdated=!1,e.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},e.treeScale={x:1,y:1},e.delta=Ue(),e.deltaFinal=Ue(),e.deltaTransform=sn,e.stopLayoutAxisAnimation={x:function(){},y:function(){}},e.isTargetBoxLocked=!1,e.updateLayoutDelta=function(){e.isLayoutProjectionEnabled&&e.box&&e.updateLayoutDeltas(),e.children.forEach(or)},e}return E(e,t),e.prototype.removeValue=function(e){t.prototype.removeValue.call(this,e),delete this.vars[e],delete this.style[e]},e.prototype.clean=function(){this.style={},this.vars={},this.transform={}},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=k(k({},this.defaultConfig),t)},e.prototype.read=function(t){var e=this.getComputedStyle();return(un(t)?e.getPropertyValue(t):e[t])||0},e.prototype.addValue=function(e,n){t.prototype.addValue.call(this,e,n),e.startsWith("rotate")&&(this.layoutOrigin=.5)},e.prototype.readNativeValue=function(t){if(en(t)){var e=Xe(t);return e&&e.default||0}return this.read(t)},e.prototype.getBaseValue=function(e,n){var r,o=null===(r=n.style)||void 0===r?void 0:r[e];return void 0===o||nr(o)?t.prototype.getBaseValue.call(this,e,n):o},e.prototype.makeTargetAnimatable=function(t,e){void 0===e&&(e=!0);var n=t.transition,r=t.transitionEnd,o=S(t,["transition","transitionEnd"]),i=this.config.transformValues,a=er(o,n||{},this);if(i&&(r&&(r=i(r)),o&&(o=i(o)),a&&(a=i(a))),e){Qn(this,o,a);var s=qn(this,o,a,r);r=s.transitionEnd,o=s.target}return k({transition:n,transitionEnd:r},o)},e.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},e.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},e.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},e.prototype.onLayoutUpdate=function(t){return this.layoutUpdateListeners.add(t)},e.prototype.onLayoutMeasure=function(t){return this.layoutMeasureListeners.add(t)},e.prototype.onViewportBoxUpdate=function(t){return this.viewportBoxUpdateListeners.add(t)},e.prototype.layoutReady=function(t){this.layoutUpdateListeners.notify(this.box,this.prevViewportBox||this.box,t)},e.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return Dn(this.element,t)},e.prototype.getBoundingBoxWithoutTransforms=function(){var t,e,n=this.getBoundingBox();return t=n,e=this.latest,Sn(t.x,e,Cn),Sn(t.y,e,En),n},e.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},e.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms(),this.rebaseTargetBox(!1,this.prevViewportBox)},e.prototype.rebaseTargetBox=function(t,e){var n=this;void 0===t&&(t=!1),void 0===e&&(e=this.box);var r=this.getAxisProgress(),o=r.x,i=r.y,a=this.box&&!this.isTargetBoxLocked&&!o.isAnimating()&&!i.isAnimating();(t||a)&&Vn((function(t){var r=e[t],o=r.min,i=r.max;n.setAxisTarget(t,o,i)}))},e.prototype.measureLayout=function(){var t=this;this.box=this.getBoundingBox(),this.boxCorrected=Ie(this.box),this.targetBox||(this.targetBox=Ie(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box),_.update((function(){return t.rebaseTargetBox()}))},e.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},e.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},e.prototype.resetTransform=function(){this.suspendHoverEvents();var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},e.prototype.setAxisTarget=function(t,e,n){var r=this.targetBox[t];r.min=e,r.max=n,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},e.prototype.getAxisProgress=function(){return this.axisProgress||(this.axisProgress={x:Be(0),y:Be(0)}),this.axisProgress},e.prototype.startLayoutAxisAnimation=function(t,e){var n,r=this,o=this.getAxisProgress()[t],i=this.targetBox[t],a=i.min,s=i.max-a;return o.clearListeners(),o.set(a),o.set(a),o.onChange((function(e){return r.setAxisTarget(t,e,e+s)})),null===(n=this.animateMotionValue)||void 0===n?void 0:n.call(this,t,o,0,e)},e.prototype.stopLayoutAnimation=function(){var t=this;Vn((function(e){return t.getAxisProgress()[e].stop()}))},e.prototype.withoutTransform=function(t){this.isLayoutProjectionEnabled&&this.resetTransform(),this.parent?this.parent.withoutTransform(t):t(),this.isLayoutProjectionEnabled&&(this.element.style.transform=this.style.transform)},e.prototype.updateLayoutDeltas=function(){var t,e;t=this.boxCorrected,e=this.box,mn(t.x,e.x),mn(t.y,e.y);var n=this.treeScale.x,r=this.treeScale.y;!function(t,e,n){var r=n.length;if(r){e.x=e.y=1;for(var o=0;o<r;o++){var i=n[o].delta;e.x*=i.x.scale,e.y*=i.y.scale,xn(t,i)}}}(this.boxCorrected,this.treeScale,this.treePath),Mn(this.delta,this.boxCorrected,this.targetBox,this.layoutOrigin),this.hasViewportBoxUpdated&&this.viewportBoxUpdateListeners.notify(this.targetBox,this.delta),this.hasViewportBoxUpdated=!1;var o=an(this.delta,this.treeScale);o===this.deltaTransform&&n===this.treeScale.x&&r===this.treeScale.y||this.scheduleRender(),this.deltaTransform=o},e.prototype.updateTransformDeltas=function(){var t,e,n;this.isLayoutProjectionEnabled&&this.box&&(t=this.targetBoxFinal,e=this.targetBox,n=this.latest,wn(t.x,e.x,n,Cn),wn(t.y,e.y,n,En),Mn(this.deltaFinal,this.boxCorrected,this.targetBoxFinal,this.layoutOrigin))},e.prototype.build=function(){this.updateTransformDeltas(),void 0!==this.isVisible&&(this.style.visibility=this.isVisible?"visible":"hidden"),vn(this.latest,this.style,this.vars,this.transform,this.transformOrigin,this.transformKeys,this.config,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var t in this.build(),Object.assign(this.element.style,this.style),this.vars)this.element.style.setProperty(t,this.vars[t])},e}(_e),or=function(t){return t.updateLayoutDelta()};function ir(t){var e=a(null);return null===e.current&&(e.current=t()),e.current}function ar(t,e,n){return"string"==typeof t?t:ot.transform(e+n*t)}var sr=function(t,e){return ot.transform(t*e)},ur={offset:"stroke-dashoffset",array:"stroke-dasharray"},cr={offset:"strokeDashoffset",array:"strokeDasharray"};var lr={x:0,y:0,width:0,height:0};function fr(t,e,n,r,o,i,a,s,u,c,l,f,d,p,h){var v=t.attrX,m=t.attrY,g=t.originX,y=t.originY,b=t.pathLength,x=t.pathSpacing,w=void 0===x?1:x,C=t.pathOffset,E=void 0===C?0:C;return vn(S(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,n,o,i,a,s,l,f,d,p,h),r.transform&&(e.transform=r.transform,delete r.transform),(void 0!==g||void 0!==y||e.transform)&&(e.transformOrigin=function(t,e,n){return ar(e,t.x,t.width)+" "+ar(n,t.y,t.height)}(u||lr,void 0!==g?g:.5,void 0!==y?y:.5)),void 0!==v&&(r.x=v),void 0!==m&&(r.y=m),void 0!==c&&void 0!==b&&function(t,e,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?ur:cr;t[a.offset]=sr(-o,e);var s=sr(n,e),u=sr(r,e);t[a.array]=s+" "+u}(r,c,b,w,E,!1),r}var dr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]),pr=/([a-z])([A-Z])/g,hr=function(t){return t.replace(pr,"$1-$2").toLowerCase()},vr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrs={},e.defaultConfig={enableHardwareAcceleration:!1},e.config=e.defaultConfig,e}return E(e,t),e.prototype.mount=function(e){t.prototype.mount.call(this,e),this.measure()},e.prototype.measure=function(){var t=this;try{this.dimensions="function"==typeof this.element.getBBox?this.element.getBBox():this.element.getBoundingClientRect()}catch(t){this.dimensions={x:0,y:0,width:0,height:0}}"path"===this.element.tagName&&(this.totalPathLength=this.element.getTotalLength()),_.render((function(){return t.render()}))},e.prototype.getBaseValue=function(e,n){var r=n[e];return void 0===r||nr(r)?t.prototype.getBaseValue.call(this,e,n):r},e.prototype.clean=function(){t.prototype.clean.call(this),this.attrs={}},e.prototype.read=function(t){return t=dr.has(t)?t:hr(t),this.element.getAttribute(t)},e.prototype.build=function(){this.updateTransformDeltas(),fr(this.latest,this.style,this.vars,this.attrs,this.transform,this.transformOrigin,this.transformKeys,this.config,this.dimensions,this.totalPathLength,this.isLayoutProjectionEnabled&&!!this.box,this.delta,this.deltaFinal,this.treeScale,this.targetBoxFinal)},e.prototype.render=function(){for(var e in t.prototype.render.call(this),this.attrs)this.element.setAttribute(dr.has(e)?e:hr(e),this.attrs[e])},e}(rr);var mr=new Set(["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"]);function gr(t){return"string"==typeof t&&mr.has(t)}var yr=e(null),br=e({variantContext:{}});function xr(){return i(br).variantContext}var wr=e(null),Cr=e({transformPagePoint:function(t){return t},features:[],isStatic:!1});function Er(t){return f((function(){return function(){return t()}}),[])}function kr(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function Sr(t,e,n,r){f((function(){var o=t.current;if(n&&o)return kr(o,e,n,r)}),[t,e,n,r])}function Ar(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Pr(t){return!!t.touches}var Or={pageX:0,pageY:0};function Tr(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||Or;return{x:n[e+"X"],y:n[e+"Y"]}}function Mr(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Vr(t,e){return void 0===e&&(e="page"),{point:Pr(t)?Tr(t,e):Mr(t,e)}}function Dr(t){return Vr(t,"client")}var Lr=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,Vr(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r},Br="undefined"!=typeof window,_r={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Nr={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Rr(t){return Br&&null===window.onpointerdown?t:Br&&null===window.ontouchstart?Nr[t]:Br&&null===window.onmousedown?_r[t]:t}function Ir(t,e,n,r){return kr(t,Rr(e),Lr(n,"pointerdown"===e),r)}function jr(t,e,n,r){return Sr(t,Rr(e),n&&Lr(n,"pointerdown"===e),r)}var Ur=function(t){return 1e3*t},Fr=function(){function t(t,e,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo