botech-library 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import*as i from"react";import s,{createContext as o,useRef as r,useLayoutEffect as a,useEffect as l,useId as c,useContext as h,useInsertionEffect as u,useMemo as d,useCallback as p,Children as m,isValidElement as f,useState as g,forwardRef as y,Fragment as v,createElement as x,Component as w}from"react";const b=({variant:e="primary",onClick:n,children:i,className:s=""})=>t("button",{className:`px-4 py-2 rounded font-medium transition-colors ${{primary:"bg-blue-600 hover:bg-blue-700 text-white",secondary:"bg-gray-200 hover:bg-gray-300 text-gray-800",danger:"bg-red-500 hover:bg-red-600 text-white"}[e]} ${s}`,onClick:n,children:i});var T={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},P=s.createContext&&s.createContext(T),S=["attr","size","title"];function A(t,e){if(null==t)return{};var n,i,s=function(t,e){if(null==t)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function E(){return E=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},E.apply(this,arguments)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function k(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){return t&&t.map((t,e)=>s.createElement(t.tag,M({key:e},t.attr),C(t.child)))}function D(t){return e=>s.createElement(j,E({attr:M({},t.attr)},e),C(t.child))}function j(t){var e=e=>{var n,{attr:i,size:o,title:r}=t,a=A(t,S),l=o||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),s.createElement("svg",E({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,a,{className:n,style:M(M({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),r&&s.createElement("title",null,r),t.children)};return void 0!==P?s.createElement(P.Consumer,null,t=>e(t)):e(T)}function R(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function L(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function O(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function B(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(t)}function N(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function F(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(t)}function I(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}const U=({title:n,description:i,logoUrl:s,logoAlt:o="Logo",systemName:r="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:h="flex items-center justify-between bg-primary-botech text-white p-4 shadow-lg",logoClassName:u="h-10 w-10 object-contain rounded-lg",titleClassName:d="text-xl font-bold",descriptionClassName:p="text-sm opacity-80 hidden sm:block"})=>e("div",{className:h,children:[e("div",{className:"flex items-center gap-4",children:[t("button",{onClick:l,className:"p-2 rounded-lg hover:bg-primary-botech-600 transition-colors focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-20","aria-label":"Abrir menú",children:t(N,{className:"w-6 h-6"})}),e("div",{className:"flex items-center",children:[t("div",{className:"w-10 h-10 flex items-center justify-center mr-3",children:s?t("img",{src:s,alt:o,className:u}):t("div",{className:"w-10 h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-lg",children:r.charAt(0)})})}),e("div",{children:[t("h1",{className:d,children:r}),t("p",{className:p,children:a})]})]})]}),c&&e("div",{className:"text-right hidden md:block",children:[t("h2",{className:"text-lg font-semibold",children:n}),t("p",{className:"text-sm opacity-80",children:i})]})]}),$=o({});function W(t){const e=r(null);return null===e.current&&(e.current=t()),e.current}const z="undefined"!=typeof window,Y=z?a:l,X=o(null);function H(t,e){-1===t.indexOf(e)&&t.push(e)}function K(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const q=(t,e,n)=>n>e?e:n<t?t:n;let G=()=>{},_=()=>{};"production"!==process.env.NODE_ENV&&(G=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},_=(t,e)=>{if(!t)throw new Error(e)});const Z={},J=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Q(t){return"object"==typeof t&&null!==t}const tt=t=>/^0[^.\s]+$/u.test(t);function et(t){let e;return()=>(void 0===e&&(e=t()),e)}const nt=t=>t,it=(t,e)=>n=>e(t(n)),st=(...t)=>t.reduce(it),ot=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class rt{constructor(){this.subscriptions=[]}add(t){return H(this.subscriptions,t),()=>K(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=t=>1e3*t,lt=t=>t/1e3;function ct(t,e){return e?t*(1e3/e):0}const ht=new Set;function ut(t,e,n){t||ht.has(e)||(console.warn(e),n&&console.warn(n),ht.add(e))}const dt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function pt(t,e,n,i){if(t===e&&n===i)return nt;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=dt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:dt(s(t),e,i)}const mt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ft=t=>e=>1-t(1-e),gt=pt(.33,1.53,.69,.99),yt=ft(gt),vt=mt(yt),xt=t=>(t*=2)<1?.5*yt(t):.5*(2-Math.pow(2,-10*(t-1))),wt=t=>1-Math.sin(Math.acos(t)),bt=ft(wt),Tt=mt(wt),Pt=pt(.42,0,1,1),St=pt(0,0,.58,1),At=pt(.42,0,.58,1),Et=t=>Array.isArray(t)&&"number"==typeof t[0],Vt={linear:nt,easeIn:Pt,easeInOut:At,easeOut:St,circIn:wt,circInOut:Tt,circOut:bt,backIn:yt,backInOut:vt,backOut:gt,anticipate:xt},Mt=t=>{if(Et(t)){_(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return pt(e,n,i,s)}return"string"==typeof t?(_(void 0!==Vt[t],`Invalid easing type '${t}'`),Vt[t]):t},kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ct={value:null,addProjectionMetrics:null};function Dt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=kt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(h.schedule(e),t()),l++,e(a)}const h={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&Ct.value&&Ct.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,h.process(t)))}};return h}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:h,update:u,preRender:d,render:p,postRender:m}=r,f=()=>{const o=Z.useManualTiming?s.timestamp:performance.now();n=!1,Z.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),h.process(s),u.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:kt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<kt.length;e++)r[kt[e]].cancel(t)},state:s,steps:r}}const{schedule:jt,cancel:Rt,state:Lt,steps:Ot}=Dt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:nt,!0);let Bt;function Nt(){Bt=void 0}const Ft={now:()=>(void 0===Bt&&Ft.set(Lt.isProcessing||Z.useManualTiming?Lt.timestamp:performance.now()),Bt),set:t=>{Bt=t,queueMicrotask(Nt)}},It=t=>e=>"string"==typeof e&&e.startsWith(t),Ut=It("--"),$t=It("var(--"),Wt=t=>!!$t(t)&&zt.test(t.split("/*")[0].trim()),zt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Xt={...Yt,transform:t=>q(0,1,t)},Ht={...Yt,default:1},Kt=t=>Math.round(1e5*t)/1e5,qt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Gt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_t=(t,e)=>n=>Boolean("string"==typeof n&&Gt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(qt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Jt={...Yt,transform:t=>Math.round((t=>q(0,255,t))(t))},Qt={test:_t("rgb","red"),parse:Zt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Jt.transform(t)+", "+Jt.transform(e)+", "+Jt.transform(n)+", "+Kt(Xt.transform(i))+")"};const te={test:_t("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Qt.transform},ee=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ne=ee("deg"),ie=ee("%"),se=ee("px"),oe=ee("vh"),re=ee("vw"),ae=(()=>({...ie,parse:t=>ie.parse(t)/100,transform:t=>ie.transform(100*t)}))(),le={test:_t("hsl","hue"),parse:Zt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ie.transform(Kt(e))+", "+ie.transform(Kt(n))+", "+Kt(Xt.transform(i))+")"},ce={test:t=>Qt.test(t)||te.test(t)||le.test(t),parse:t=>Qt.test(t)?Qt.parse(t):le.test(t)?le.parse(t):te.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Qt.transform(t):le.transform(t),getAnimatableNone:t=>{const e=ce.parse(t);return e.alpha=0,ce.transform(e)}},he=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ue="number",de="color",pe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function me(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(pe,t=>(ce.test(t)?(i.color.push(o),s.push(de),n.push(ce.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(ue),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function fe(t){return me(t).values}function ge(t){const{split:e,types:n}=me(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===ue?Kt(t[o]):e===de?ce.transform(t[o]):t[o]}return s}}const ye=t=>"number"==typeof t?0:ce.test(t)?ce.getAnimatableNone(t):t;const ve={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(qt)?.length||0)+(t.match(he)?.length||0)>0},parse:fe,createTransformer:ge,getAnimatableNone:function(t){const e=fe(t);return ge(t)(e.map(ye))}};function xe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function we(t,e){return n=>n>0?e:t}const be=(t,e,n)=>t+(e-t)*n,Te=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Pe=[te,Qt,le];function Se(t){const e=(n=t,Pe.find(t=>t.test(n)));var n;if(G(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===le&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=xe(a,i,t+1/3),o=xe(a,i,t),r=xe(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ae=(t,e)=>{const n=Se(t),i=Se(e);if(!n||!i)return we(t,e);const s={...n};return t=>(s.red=Te(n.red,i.red,t),s.green=Te(n.green,i.green,t),s.blue=Te(n.blue,i.blue,t),s.alpha=be(n.alpha,i.alpha,t),Qt.transform(s))},Ee=new Set(["none","hidden"]);function Ve(t,e){return n=>be(t,e,n)}function Me(t){return"number"==typeof t?Ve:"string"==typeof t?Wt(t)?we:ce.test(t)?Ae:De:Array.isArray(t)?ke:"object"==typeof t?ce.test(t)?Ae:Ce:we}function ke(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Me(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Ce(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Me(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const De=(t,e)=>{const n=ve.createTransformer(e),i=me(t),s=me(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ee.has(t)&&!s.values.length||Ee.has(e)&&!i.values.length?function(t,e){return Ee.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):st(ke(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(G(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),we(t,e))};function je(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return be(t,e,n);return Me(t)(t,e)}const Re=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>jt.update(e,t),stop:()=>Rt(e),now:()=>Lt.isProcessing?Lt.timestamp:Ft.now()}},Le=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Oe=2e4;function Be(t){let e=0;let n=t.next(e);for(;!n.done&&e<Oe;)e+=50,n=t.next(e);return e>=Oe?1/0:e}function Ne(t,e,n){const i=Math.max(e-5,0);return ct(n-t(i),e-i)}const Fe=100,Ie=10,Ue=1,$e=0,We=800,ze=.3,Ye=.3,Xe={granular:.01,default:2},He={granular:.005,default:.5},Ke=.01,qe=10,Ge=.05,_e=1,Ze=.001;function Je({duration:t=We,bounce:e=ze,velocity:n=$e,mass:i=Ue}){let s,o;G(t<=at(qe),"Spring duration must be 10 seconds or less");let r=1-e;r=q(Ge,_e,r),t=q(Ke,qe,lt(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=tn(e,r),l=Math.exp(-s);return Ze-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=tn(Math.pow(e,2),r);return(-s(e)+Ze>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<Qe;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=at(t),isNaN(a))return{stiffness:Fe,damping:Ie,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const Qe=12;function tn(t,e){return t*Math.sqrt(1-e*e)}const en=["duration","bounce"],nn=["stiffness","damping","mass"];function sn(t,e){return e.some(e=>void 0!==t[e])}function on(t=Ye,e=ze){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:h,duration:u,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:$e,stiffness:Fe,damping:Ie,mass:Ue,isResolvedFromDuration:!1,...t};if(!sn(t,nn)&&sn(t,en))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*q(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Ue,stiffness:s,damping:o}}else{const n=Je(t);e={...e,...n,mass:Ue},e.isResolvedFromDuration=!0}return e}({...n,velocity:-lt(n.velocity||0)}),m=d||0,f=c/(2*Math.sqrt(l*h)),g=r-o,y=lt(Math.sqrt(l/h)),v=Math.abs(g)<5;let x;if(i||(i=v?Xe.granular:Xe.default),s||(s=v?He.granular:He.default),f<1){const t=tn(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&u||null,next:t=>{const e=x(t);if(p)a.done=t>=u;else{let n=0===t?m:0;f<1&&(n=0===t?at(m):Ne(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Be(w),Oe),e=Le(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function rn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:h}){const u=t[0],d={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===r?f:r(f);g!==f&&(m=g-u);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let w,b;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=on({keyframes:[d.value,p(d.value)],velocity:Ne(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:h}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&x(t),d)}}}function an(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(_(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||Z.mix||je,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||nt:e;o=st(t,o)}i.push(o)}return i}(e,i,s),l=a.length,c=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=ot(t[i],t[i+1],n);return a[i](s)};return n?e=>c(q(t[0],t[o-1],e)):c}function ln(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=ot(0,e,i);t.push(be(n,1,s))}}(e,t.length-1),e}function cn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Mt):Mt(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ln(e),t),a=an(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||At).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}on.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Be(i),Oe);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:lt(s)}}(t,100,on);return t.ease=e.ease,t.duration=at(e.duration),t.type="keyframes",t};const hn=t=>null!==t;function un(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(hn),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const dn={decay:rn,inertia:rn,tween:cn,keyframes:cn,spring:on};function pn(t){"string"==typeof t.type&&(t.type=dn[t.type])}class mn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const fn=t=>t/100;class gn extends mn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Ft.now()&&this.tick(Ft.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;pn(t);const{type:e=cn,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||cn;"production"!==process.env.NODE_ENV&&a!==cn&&_(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),a!==cn&&"number"!=typeof r[0]&&(this.mixKeyframes=st(fn,je(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Be(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:u,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(h){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===u?(n=1-n,d&&(n-=d/r)):"mirror"===u&&(x=o)),v=q(0,1,n)*r}const w=y?{done:!1,value:c[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===a||(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return T&&p!==rn&&(w.value=un(c,this.options,f,this.speed)),m&&m(w.value),T&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return lt(this.calculatedDuration)}get time(){return lt(this.currentTime)}set time(t){t=at(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ft.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=lt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Re,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ft.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const yn=t=>180*t/Math.PI,vn=t=>{const e=yn(Math.atan2(t[1],t[0]));return wn(e)},xn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:vn,rotateZ:vn,skewX:t=>yn(Math.atan(t[1])),skewY:t=>yn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},wn=t=>((t%=360)<0&&(t+=360),t),bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Tn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Pn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bn,scaleY:Tn,scale:t=>(bn(t)+Tn(t))/2,rotateX:t=>wn(yn(Math.atan2(t[6],t[5]))),rotateY:t=>wn(yn(Math.atan2(-t[2],t[0]))),rotateZ:vn,rotate:vn,skewX:t=>yn(Math.atan(t[4])),skewY:t=>yn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Sn(t){return t.includes("scale")?1:0}function An(t,e){if(!t||"none"===t)return Sn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Pn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=xn,s=e}if(!s)return Sn(e);const o=i[e],r=s[1].split(",").map(En);return"function"==typeof o?o(r):r[o]}function En(t){return parseFloat(t.trim())}const Vn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mn=(()=>new Set(Vn))(),kn=t=>t===Yt||t===se,Cn=new Set(["x","y","z"]),Dn=Vn.filter(t=>!Cn.has(t));const jn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};jn.translateX=jn.x,jn.translateY=jn.y;const Rn=new Set;let Ln=!1,On=!1,Bn=!1;function Nn(){if(On){const t=Array.from(Rn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Dn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}On=!1,Ln=!1,Rn.forEach(t=>t.complete(Bn)),Rn.clear()}function Fn(){Rn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(On=!0)})}class In{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Rn.add(this),Ln||(Ln=!0,jt.read(Fn),jt.resolveKeyframes(Nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rn.delete(this)}cancel(){"scheduled"===this.state&&(Rn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Un=et(()=>void 0!==window.ScrollTimeline),$n={};function Wn(t,e){const n=et(t);return()=>$n[e]??n()}const zn=Wn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Yn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Xn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yn([0,.65,.55,1]),circOut:Yn([.55,0,1,.45]),backIn:Yn([.31,.01,.66,-.59]),backOut:Yn([.33,1.53,.69,.99])};function Hn(t,e){return t?"function"==typeof t?zn()?Le(t,e):"ease-out":Et(t)?Yn(t):Array.isArray(t)?t.map(t=>Hn(t,e)||Xn.easeOut):Xn[t]:void 0}function Kn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const h={[e]:n};l&&(h.offset=l);const u=Hn(a,s);Array.isArray(u)&&(h.easing=u);const d={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);return t.animate(h,d)}function qn(t){return"function"==typeof t&&"applyToOptions"in t}class Gn extends mn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,_("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:t,...e}){return qn(t)&&zn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Kn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=un(i,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return lt(Number(t))}get time(){return lt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Un()?(this.animation.timeline=t,nt):e(this)}}const _n={anticipate:xt,backInOut:vt,circInOut:Tt};function Zn(t){"string"==typeof t.ease&&t.ease in _n&&(t.ease=_n[t.ease])}class Jn extends Gn{constructor(t){Zn(t),pn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new gn({...o,autoplay:!1}),a=at(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const Qn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ve.test(t)&&"0"!==t||t.startsWith("url(")));function ti(t){return Q(t)&&"offsetHeight"in t}const ei=new Set(["opacity","clipPath","filter","transform"]),ni=et(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ii extends mn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ft.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...h},d=c?.KeyframeResolver||In;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Ft.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Qn(s,e),a=Qn(o,e);return G(r===a,`You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||qn(n))&&i)}(t,s,o,r)||(!Z.instantAnimations&&a||c?.(un(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const h={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!ti(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return ni()&&n&&ei.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}(h)?new Jn({...h,element:h.motionValue.owner.current}):new gn(h);u.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Bn=!0,Fn(),Nn(),Bn=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const si=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oi(t,e,n=1){_(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=si.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return J(t)?parseFloat(t):t}return Wt(s)?oi(s,e,n+1):s}function ri(t,e){return t?.[e]??t?.default??t}const ai=new Set(["width","height","top","left","right","bottom",...Vn]),li=t=>e=>e.test(t),ci=[Yt,se,ie,ne,re,oe,{test:t=>"auto"===t,parse:t=>t}],hi=t=>ci.find(li(t));function ui(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||tt(t))}const di=new Set(["brightness","contrast","saturate","opacity"]);function pi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(qt)||[];if(!i)return t;const s=n.replace(i,"");let o=di.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const mi=/\b([a-z-]*)\(.*?\)/gu,fi={...ve,getAnimatableNone:t=>{const e=t.match(mi);return e?e.map(pi).join(" "):t}},gi={...Yt,transform:Math.round},yi={borderWidth:se,borderTopWidth:se,borderRightWidth:se,borderBottomWidth:se,borderLeftWidth:se,borderRadius:se,radius:se,borderTopLeftRadius:se,borderTopRightRadius:se,borderBottomRightRadius:se,borderBottomLeftRadius:se,width:se,maxWidth:se,height:se,maxHeight:se,top:se,right:se,bottom:se,left:se,padding:se,paddingTop:se,paddingRight:se,paddingBottom:se,paddingLeft:se,margin:se,marginTop:se,marginRight:se,marginBottom:se,marginLeft:se,backgroundPositionX:se,backgroundPositionY:se,...{rotate:ne,rotateX:ne,rotateY:ne,rotateZ:ne,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:ne,skewX:ne,skewY:ne,distance:se,translateX:se,translateY:se,translateZ:se,x:se,y:se,z:se,perspective:se,transformPerspective:se,opacity:Xt,originX:ae,originY:ae,originZ:se},zIndex:gi,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:gi},vi={...yi,color:ce,backgroundColor:ce,outlineColor:ce,fill:ce,stroke:ce,borderColor:ce,borderTopColor:ce,borderRightColor:ce,borderBottomColor:ce,borderLeftColor:ce,filter:fi,WebkitFilter:fi},xi=t=>vi[t];function wi(t,e){let n=xi(t);return n!==fi&&(n=ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const bi=new Set(["auto","none","0"]);class Ti extends In{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Wt(i))){const s=oi(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ai.has(n)||2!==t.length)return;const[i,s]=t,o=hi(i),r=hi(s);if(o!==r)if(kn(o)&&kn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ui(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!bi.has(e)&&me(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=wi(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=jn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Pi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Si{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ft.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ft.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&ut(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new rt);const n=this.events[t].add(e);return"change"===t?()=>{n(),jt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ft.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ct(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(t,e){return new Si(t,e)}const{schedule:Ei,cancel:Vi}=Dt(queueMicrotask,!1),Mi={x:!1,y:!1};function ki(){return Mi.x||Mi.y}function Ci(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Di(t){return!("touch"===t.pointerType||ki())}const ji=(t,e)=>!!e&&(t===e||ji(t,e.parentElement)),Ri=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Li=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Oi=new WeakSet;function Bi(t){return e=>{"Enter"===e.key&&t(e)}}function Ni(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Fi(t){return Ri(t)&&!ki()}function Ii(t,e,n={}){const[i,s,o]=Ci(t,n),r=t=>{const i=t.currentTarget;if(!Fi(t))return;Oi.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Oi.has(i)&&Oi.delete(i),Fi(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ji(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ti(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bi(()=>{if(Oi.has(n))return;Ni(n,"down");const t=Bi(()=>{Ni(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Ni(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Li.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function Ui(t){return Q(t)&&"ownerSVGElement"in t}const $i=t=>Boolean(t&&t.getVelocity),Wi=[...ci,ce,ve],zi=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Yi extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=ti(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Xi({children:e,isPresent:n,anchorX:s}){const o=c(),a=r(null),l=r({width:0,height:0,top:0,left:0,right:0}),{nonce:d}=h(zi);return u(()=>{const{width:t,height:e,top:i,left:r,right:c}=l.current;if(n||!a.current||!t||!e)return;const h="left"===s?`left: ${r}`:`right: ${c}`;a.current.dataset.motionPopId=o;const u=document.createElement("style");return d&&(u.nonce=d),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${h}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.contains(u)&&document.head.removeChild(u)}},[n]),t(Yi,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Hi=({children:e,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:h})=>{const u=W(Ki),p=c();let m=!0,f=d(()=>(m=!1,{id:p,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[s,u,o]);return a&&m&&(f={...f}),d(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(e=t(Xi,{isPresent:s,anchorX:h,children:e})),t(X.Provider,{value:f,children:e})};function Ki(){return new Map}function qi(t=!0){const e=h(X);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,o=c();l(()=>{if(t)return s(o)},[t]);const r=p(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,r]:[!0]}const Gi=t=>t.key||"";function _i(t){const e=[];return m.forEach(t,t=>{f(t)&&e.push(t)}),e}const Zi=({children:e,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:l="sync",propagate:c=!1,anchorX:u="left"})=>{const[p,m]=qi(c),f=d(()=>_i(e),[e]),y=c&&!p?[]:f.map(Gi),v=r(!0),x=r(f),w=W(()=>new Map),[b,T]=g(f),[P,S]=g(f);Y(()=>{v.current=!1,x.current=f;for(let t=0;t<P.length;t++){const e=Gi(P[t]);y.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}},[P,y.length,y.join("-")]);const A=[];if(f!==b){let t=[...f];for(let e=0;e<P.length;e++){const n=P[e],i=Gi(n);y.includes(i)||(t.splice(e,0,n),A.push(n))}return"wait"===l&&A.length&&(t=A),S(_i(t)),T(f),null}"production"!==process.env.NODE_ENV&&"wait"===l&&P.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:E}=h($);return t(n,{children:P.map(e=>{const n=Gi(e),r=!(c&&!p)&&(f===P||y.includes(n));return t(Hi,{isPresent:r,initial:!(v.current&&!s)&&void 0,custom:i,presenceAffectsLayout:a,mode:l,onExitComplete:r?void 0:()=>{if(!w.has(n))return;w.set(n,!0);let t=!0;w.forEach(e=>{e||(t=!1)}),t&&(E?.(),S(x.current),c&&m?.(),o&&o())},anchorX:u,children:e},n)})})},Ji=o({strict:!1}),Qi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ts={};for(const t in Qi)ts[t]={isEnabled:e=>Qi[t].some(t=>!!e[t])};const es=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ns(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||es.has(t)}let is=t=>!ns(t);try{"function"==typeof(ss=require("@emotion/is-prop-valid").default)&&(is=t=>t.startsWith("on")?!ns(t):ss(t))}catch{}var ss;function os(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&ut(!1,"motion() is deprecated. Use motion.create() instead."),t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const rs=o({});function as(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ls(t){return"string"==typeof t||Array.isArray(t)}const cs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...cs];function us(t){return as(t.animate)||hs.some(e=>ls(t[e]))}function ds(t){return Boolean(us(t)||t.variants)}function ps(t){const{initial:e,animate:n}=function(t,e){if(us(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ls(e)?e:void 0,animate:ls(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,h(rs));return d(()=>({initial:e,animate:n}),[ms(e),ms(n)])}function ms(t){return Array.isArray(t)?t.join(" "):t}const fs=Symbol.for("motionComponentSymbol");function gs(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ys(t,e,n){return p(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):gs(n)&&(n.current=i))},[e])}const vs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xs="data-"+vs("framerAppearId"),ws=o({});function bs(t,e,n,i,s){const{visualElement:o}=h(rs),a=h(Ji),c=h(X),d=h(zi).reducedMotion,p=r(null);i=i||a.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const m=p.current,f=h(ws);!m||m.projection||!s||"html"!==m.type&&"svg"!==m.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ts(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&gs(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:l,layoutRoot:c})}(p.current,n,s,f);const g=r(!1);u(()=>{m&&g.current&&m.update(n,c)});const y=n[xs],v=r(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Y(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Ei.render(m.render),v.current&&m.animationState&&m.animationState.animateChanges())}),l(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1))}),m}function Ts(t){if(t)return!1!==t.options.allowProjection?t.projection:Ts(t.parent)}function Ps({preloadedFeatures:n,createVisualElement:i,useRender:s,useVisualState:o,Component:r}){function a(a,l){let c;const u={...h(zi),...a,layoutId:Ss(a)},{isStatic:d}=u,p=ps(a),m=o(a,d);if(!d&&z){!function(t,e){const n=h(Ji).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?G(!1,e):_(!1,e)}}(u,n);const t=function(t){const{drag:e,layout:n}=ts;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);c=t.MeasureLayout,p.visualElement=bs(r,m,u,i,t.ProjectionNode)}return e(rs.Provider,{value:p,children:[c&&p.visualElement?t(c,{visualElement:p.visualElement,...u}):null,s(r,a,ys(m,p.visualElement,l),m,d,p.visualElement)]})}n&&function(t){for(const e in t)ts[e]={...ts[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof r?r:`create(${r.displayName??r.name??""})`}`;const l=y(a);return l[fs]=r,l}function Ss({layoutId:t}){const e=h($).id;return e&&void 0!==t?e+"-"+t:t}const As={};function Es(t,{layout:e,layoutId:n}){return Mn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!As[t]||"opacity"===t)}const Vs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ms=Vn.length;function ks(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Mn.has(t))r=!0;else if(Ut(t))s[t]=n;else{const e=Pi(n,yi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Ms;o++){const r=Vn[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Pi(a,yi[r]);l||(s=!1,i+=`${Vs[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Cs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ds(t,e,n){for(const i in e)$i(e[i])||Es(i,n)||(t[i]=e[i])}function js(t,e){const n={};return Ds(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return ks(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Rs(t,e){const n={},i=js(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Ls={offset:"stroke-dashoffset",array:"stroke-dasharray"},Os={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,h){if(ks(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=h?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ls:Os;t[o.offset]=se.transform(-i);const r=se.transform(e),a=se.transform(n);t[o.array]=`${r} ${a}`}(u,s,o,r,!1)}const Ns=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Fs=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Is(t,e,n,i){const s=d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Bs(n,e,Fs(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Ds(e,t.style,t),s.style={...e,...s.style}}return s}const Us=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $s(t){return"string"==typeof t&&!t.includes("-")&&!!(Us.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ws(t=!1){return(e,n,i,{latestValues:s},o)=>{const r=($s(e)?Is:Rs)(n,s,o,e),a=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(is(s)||!0===n&&ns(s)||!e&&!ns(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof e,t),l=e!==v?{...a,...r,ref:i}:{},{children:c}=n,h=d(()=>$i(c)?c.get():c,[c]);return x(e,{...l,children:h})}}function zs(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ys(t,e,n,i){if("function"==typeof e){const[s,o]=zs(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=zs(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Xs(t){return $i(t)?t.get():t}const Hs=t=>(e,n)=>{const i=h(rs),s=h(X),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Ks(n,i,s,t),renderState:e()}}(t,e,i,s);return n?o():W(o)};function Ks(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Xs(o[t]);let{initial:r,animate:a}=t;const l=us(t),c=ds(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let h=!!n&&!1===n.initial;h=h||!1===r;const u=h?a:r;if(u&&"boolean"!=typeof u&&!as(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Ys(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[h?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}function qs(t,e,n){const{style:i}=t,s={};for(const o in i)($i(i[o])||e.style&&$i(e.style[o])||Es(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}const Gs={useVisualState:Hs({scrapeMotionValuesFromProps:qs,createRenderState:Cs})};function _s(t,e,n){const i=qs(t,e,n);for(const n in t)if($i(t[n])||$i(e[n])){i[-1!==Vn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Zs={useVisualState:Hs({scrapeMotionValuesFromProps:_s,createRenderState:Ns})};function Js(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Ps({...$s(n)?Zs:Gs,preloadedFeatures:t,useRender:Ws(i),createVisualElement:e,Component:n})}}function Qs(t,e,n){const i=t.getProps();return Ys(i,e,void 0!==n?n:i.custom,t)}const to=t=>Array.isArray(t);function eo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function no(t){return to(t)?t[t.length-1]||0:t}function io(t,e){const n=t.getValue("willChange");if(i=n,Boolean($i(i)&&i.add))return n.add(e);if(!n&&Z.WillChange){const n=new Z.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function so(t){return t.props[xs]}const oo=t=>null!==t;const ro={type:"spring",stiffness:500,damping:25,restSpeed:10},ao={type:"keyframes",duration:.8},lo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},co=(t,{keyframes:e})=>e.length>2?ao:Mn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ro:lo;const ho=(t,e,n,i={},s,o)=>r=>{const a=ri(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=at(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...h}){return!!Object.keys(h).length})(a)||Object.assign(h,co(t,h)),h.duration&&(h.duration=at(h.duration)),h.repeatDelay&&(h.repeatDelay=at(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let u=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(u=!0)),(Z.instantAnimations||Z.skipAnimations)&&(u=!0,h.duration=0,h.delay=0),h.allowFlatten=!a.type&&!a.ease,u&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(oo),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(h.keyframes,a);if(void 0!==t)return void jt.update(()=>{h.onUpdate(t),h.onComplete()})}return a.isSync?new gn(h):new ii(h)};function uo({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function po(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||c&&uo(c,e))continue;const r={delay:n,...ri(o||{},e)},h=i.get();if(void 0!==h&&!i.isAnimating&&!Array.isArray(s)&&s===h&&!r.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=so(t);if(n){const t=window.MotionHandoffAnimation(n,e,jt);null!==t&&(r.startTime=t,u=!0)}}io(t,e),i.start(ho(e,i,s,t.shouldReduceMotion&&ai.has(e)?{type:!1}:r,t,u));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{jt.update(()=>{r&&function(t,e){const n=Qs(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)eo(t,e,no(o[e]))}(t,r)})}),l}function mo(t,e,n={}){const i=Qs(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(po(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(fo).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(mo(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function fo(t,e){return t.sortNodePosition(e)}function go(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const yo=hs.length;function vo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&vo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<yo;n++){const i=hs[n],s=t.props[i];(ls(s)||!1===s)&&(e[i]=s)}return e}const xo=[...cs].reverse(),wo=cs.length;function bo(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>mo(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=mo(t,e,n);else{const s="function"==typeof e?Qs(t,e,n.custom):e;i=Promise.all(po(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function To(t){let e=bo(t),n=Ao(),i=!0;const s=e=>(n,i)=>{const s=Qs(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=vo(t.parent)||{},l=[],c=new Set;let h={},u=1/0;for(let e=0;e<wo;e++){const d=xo[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=ls(m),g=d===o?p.isActive:null;!1===g&&(u=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...h},!p.isActive&&null===g||!m&&!p.prevProp||as(m)||"boolean"==typeof m)continue;const v=Po(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>u&&f,w=!1;const b=Array.isArray(m)?m:[m];let T=b.reduce(s(d),{});!1===g&&(T={});const{prevResolvedValues:P={}}=p,S={...P,...T},A=e=>{x=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=T[t],n=P[t];if(h.hasOwnProperty(t))continue;let i=!1;i=to(e)&&to(n)?!go(e,n):e!==n,i?null!=e?A(t):c.add(t):void 0!==e&&c.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(h={...h,...T}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||w)&&l.push(...b.map(t=>({animation:t,options:{type:d}})))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=Qs(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ao(),i=!0}}}function Po(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!go(e,t)}function So(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ao(){return{animate:So(!0),whileInView:So(),whileHover:So(),whileTap:So(),whileDrag:So(),whileFocus:So(),exit:So()}}class Eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Vo=0;const Mo={animation:{Feature:class extends Eo{constructor(t){super(t),t.animationState||(t.animationState=To(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();as(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Eo{constructor(){super(...arguments),this.id=Vo++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function ko(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Co(t){return{point:{x:t.pageX,y:t.pageY}}}function Do(t,e,n,i){return ko(t,e,(t=>e=>Ri(e)&&t(e,Co(e)))(n),i)}function jo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ro(t){return t.max-t.min}function Lo(t,e,n,i=.5){t.origin=i,t.originPoint=be(e.min,e.max,t.origin),t.scale=Ro(n)/Ro(e),t.translate=be(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Oo(t,e,n,i){Lo(t.x,e.x,n.x,i?i.originX:void 0),Lo(t.y,e.y,n.y,i?i.originY:void 0)}function Bo(t,e,n){t.min=n.min+e.min,t.max=t.min+Ro(e)}function No(t,e,n){t.min=e.min-n.min,t.max=t.min+Ro(e)}function Fo(t,e,n){No(t.x,e.x,n.x),No(t.y,e.y,n.y)}const Io=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Uo(t){return[t("x"),t("y")]}function $o(t){return void 0===t||1===t}function Wo({scale:t,scaleX:e,scaleY:n}){return!$o(t)||!$o(e)||!$o(n)}function zo(t){return Wo(t)||Yo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yo(t){return Xo(t.x)||Xo(t.y)}function Xo(t){return t&&"0%"!==t}function Ho(t,e,n){return n+e*(t-n)}function Ko(t,e,n,i,s){return void 0!==s&&(t=Ho(t,s,i)),Ho(t,n,i)+e}function qo(t,e=0,n=1,i,s){t.min=Ko(t.min,e,n,i,s),t.max=Ko(t.max,e,n,i,s)}function Go(t,{x:e,y:n}){qo(t.x,e.translate,e.scale,e.originPoint),qo(t.y,n.translate,n.scale,n.originPoint)}const _o=.999999999999,Zo=1.0000000000001;function Jo(t,e){t.min=t.min+e,t.max=t.max+e}function Qo(t,e,n,i,s=.5){qo(t,e,n,be(t.min,t.max,s),i)}function tr(t,e){Qo(t.x,e.x,e.scaleX,e.scale,e.originX),Qo(t.y,e.y,e.scaleY,e.scale,e.originY)}function er(t,e){return jo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const nr=({current:t})=>t?t.ownerDocument.defaultView:null,ir=(t,e)=>Math.abs(t-e);class sr{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=ar(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=ir(t.x,e.x),i=ir(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Lt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=or(e,this.transformPagePoint),jt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ar("pointercancel"===t.type?this.lastMoveEventInfo:or(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Ri(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=or(Co(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Lt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ar(o,this.history)),this.removeListeners=st(Do(this.contextWindow,"pointermove",this.handlePointerMove),Do(this.contextWindow,"pointerup",this.handlePointerUp),Do(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rt(this.updatePoint)}}function or(t,e){return e?{point:e(t.point)}:t}function rr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ar({point:t},e){return{point:t,delta:rr(t,cr(e)),offset:rr(t,lr(e)),velocity:hr(e,.1)}}function lr(t){return t[0]}function cr(t){return t[t.length-1]}function hr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=cr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>at(e)));)n--;if(!i)return{x:0,y:0};const o=lt(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ur(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function dr(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const pr=.35;function mr(t,e,n){return{min:fr(t,e),max:fr(t,n)}}function fr(t,e){return"number"==typeof t?t:t[e]||0}const gr=new WeakMap;class yr{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new sr(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Co(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Mi[o]?null:(Mi[o]=!0,()=>{Mi[o]=!1}):Mi.x||Mi.y?null:(Mi.x=Mi.y=!0,()=>{Mi.x=Mi.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Uo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ie.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Ro(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&jt.postRender(()=>s(t,e)),io(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Uo(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:nr(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&jt.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!vr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?be(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?be(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&gs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:ur(t.x,n,s),y:ur(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=pr){return!1===t?t=0:!0===t&&(t=pr),{x:mr(t,"left","right"),y:mr(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Uo(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!gs(t))return!1;const n=t.current;_(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=er(t,n),{scroll:s}=e;return s&&(Jo(i.x,s.offset.x),Jo(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:dr(t.x,e.x),y:dr(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=jo(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Uo(r=>{if(!vr(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,h=i?40:1e7,u={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,u)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return io(this.visualElement,t),n.start(ho(t,n,0,e,this.visualElement,!1))}stopAnimation(){Uo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Uo(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Uo(e=>{const{drag:n}=this.getProps();if(!vr(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-be(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!gs(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Uo(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Ro(t),s=Ro(e);return s>i?n=ot(e.min,e.max-i,t.min):i>s&&(n=ot(t.min,t.max-s,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Uo(e=>{if(!vr(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(be(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;gr.set(this.visualElement,this);const t=Do(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();gs(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),jt.read(e);const s=ko(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Uo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=pr,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function vr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const xr=t=>(e,n)=>{t&&jt.postRender(()=>t(e,n))};const wr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function br(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Tr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!se.test(t))return t;t=parseFloat(t)}return`${br(t,e.target.x)}% ${br(t,e.target.y)}%`}},Pr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ve.parse(t);if(s.length>5)return i;const o=ve.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=be(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};class Sr extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;!function(t){for(const e in t)As[e]=t[e],Ut(e)&&(As[e].isCSSVariable=!0)}(Er),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),wr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||jt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ei.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ar(e){const[n,i]=qi(),s=h($);return t(Sr,{...e,layoutGroup:s,switchLayoutGroup:h(ws),isPresent:n,safeToRemove:i})}const Er={borderRadius:{...Tr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tr,borderTopRightRadius:Tr,borderBottomLeftRadius:Tr,borderBottomRightRadius:Tr,boxShadow:Pr};const Vr=(t,e)=>t.depth-e.depth;class Mr{constructor(){this.children=[],this.isDirty=!1}add(t){H(this.children,t),this.isDirty=!0}remove(t){K(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vr),this.isDirty=!1,this.children.forEach(t)}}const kr=["TopLeft","TopRight","BottomLeft","BottomRight"],Cr=kr.length,Dr=t=>"string"==typeof t?parseFloat(t):t,jr=t=>"number"==typeof t||se.test(t);function Rr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Lr=Br(0,.5,bt),Or=Br(.5,.95,nt);function Br(t,e,n){return i=>i<t?0:i>e?1:n(ot(t,e,i))}function Nr(t,e){t.min=e.min,t.max=e.max}function Fr(t,e){Nr(t.x,e.x),Nr(t.y,e.y)}function Ir(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ur(t,e,n,i,s){return t=Ho(t-=e,1/n,i),void 0!==s&&(t=Ho(t,1/s,i)),t}function $r(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){ie.test(e)&&(e=parseFloat(e),e=be(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=be(o.min,o.max,i);t===o&&(a-=e),t.min=Ur(t.min,e,n,a,s),t.max=Ur(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Wr=["x","scaleX","originX"],zr=["y","scaleY","originY"];function Yr(t,e,n,i){$r(t.x,e,Wr,n?n.x:void 0,i?i.x:void 0),$r(t.y,e,zr,n?n.y:void 0,i?i.y:void 0)}function Xr(t){return 0===t.translate&&1===t.scale}function Hr(t){return Xr(t.x)&&Xr(t.y)}function Kr(t,e){return t.min===e.min&&t.max===e.max}function qr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gr(t,e){return qr(t.x,e.x)&&qr(t.y,e.y)}function _r(t){return Ro(t.x)/Ro(t.y)}function Zr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Jr{constructor(){this.members=[]}add(t){H(this.members,t),t.scheduleRender()}remove(t){if(K(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Qr=["","X","Y","Z"],ta={visibility:"hidden"};let ea=0;function na(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ia(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=so(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",jt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ia(i)}function sa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=ea++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(aa),this.nodes.forEach(ma),this.nodes.forEach(fa),this.nodes.forEach(la)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new rt),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;var n;this.isSVG=Ui(e)&&!(Ui(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Ft.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Rt(i),t(o-e))};return jt.setup(i,!0),()=>Rt(i)}(i,250),wr.hasAnimatedSinceResize&&(wr.hasAnimatedSinceResize=!1,this.nodes.forEach(pa))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||ba,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Gr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ri(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||pa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ga),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ia(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(ua),this.isUpdating=!1,this.nodes.forEach(da),this.nodes.forEach(oa),this.nodes.forEach(ra),this.clearAllSnapshots();const t=Ft.now();Lt.delta=q(0,1e3/60,t-Lt.timestamp),Lt.timestamp=t,Lt.isProcessing=!0,Ot.update.process(Lt),Ot.preRender.process(Lt),Ot.render.process(Lt),Lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ei.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ca),this.sharedNodes.forEach(ya)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,jt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){jt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ro(this.snapshot.measuredBox.x)||Ro(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Hr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||zo(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Sa((i=n).x),Sa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ea))){const{scroll:t}=this.root;t&&(Jo(e.x,t.offset.x),Jo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Fr(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Fr(e,t),Jo(e.x,s.offset.x),Jo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Fr(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&tr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),zo(i.latestValues)&&tr(n,i.latestValues)}return zo(this.latestValues)&&tr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Fr(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!zo(n.latestValues))continue;Wo(n.latestValues)&&n.updateSnapshot();const i=Io();Fr(i,n.measurePageBox()),Yr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return zo(this.latestValues)&&Yr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=Lt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Fo(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,r,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,r=this.relativeTarget,a=this.relativeParent.target,Bo(o.x,r.x,a.x),Bo(o.y,r.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Fr(this.target,this.layout.layoutBox),Go(this.target,this.targetDelta)):Fr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Fo(this.relativeTargetOrigin,this.target,t.target),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Wo(this.parent.latestValues)&&!Yo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Lt.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Fr(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Go(t,r)),i&&zo(o.latestValues)&&tr(t,o.latestValues))}e.x<Zo&&e.x>_o&&(e.x=1),e.y<Zo&&e.y>_o&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Ir(this.prevProjectionDelta.x,this.projectionDelta.x),Ir(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Oo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Zr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Zr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,h=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(wa));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;va(o.x,t.x,n),va(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,xa(p.x,m.x,f.x,g),xa(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,d=u,Kr(l.x,d.x)&&Kr(l.y,d.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),Fr(u,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=be(0,n.opacity??1,Lr(i)),t.opacityExit=be(e.opacity??1,0,Or(i))):o&&(t.opacity=be(e.opacity??1,n.opacity??1,i));for(let s=0;s<Cr;s++){const o=`border${kr[s]}Radius`;let r=Rr(e,o),a=Rr(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||jr(r)===jr(a)?(t[o]=Math.max(be(Dr(r),Dr(a),i),0),(ie.test(a)||ie.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=be(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=jt.update(()=>{wr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=function(t,e,n){const i=$i(t)?t:Ai(t);return i.start(ho("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ro(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ro(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Fr(e,n),tr(e,s),Oo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Jr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&na("z",t,i,this.animationValues);for(let e=0;e<Qr.length;e++)na(`rotate${Qr[e]}`,t,i,this.animationValues),na(`skew${Qr[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ta;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=Xs(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Xs(t?.pointerEvents)||""),this.hasProjected&&!zo(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(e.transform=n(s,e.transform));const{x:o,y:r}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*r.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in As){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:r}=As[t],a="none"===e.transform?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=a}else r?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?Xs(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function oa(t){t.updateLayout()}function ra(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Uo(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Ro(i);i.min=n[t].min,i.max=i.min+s}):Aa(s,e.layoutBox,n)&&Uo(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Ro(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Oo(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Oo(a,t.applyTransform(i,!0),e.measuredBox):Oo(a,n,e.layoutBox);const l=!Hr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Fo(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Fo(a,n,o.layoutBox),Gr(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function aa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function la(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ca(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function ua(t){t.isLayoutDirty=!1}function da(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function pa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ma(t){t.resolveTargetDelta()}function fa(t){t.calcProjection()}function ga(t){t.resetSkewAndRotation()}function ya(t){t.removeLeadSnapshot()}function va(t,e,n){t.translate=be(e.translate,0,n),t.scale=be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function xa(t,e,n,i){t.min=be(e.min,n.min,i),t.max=be(e.max,n.max,i)}function wa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ba={duration:.45,ease:[.4,0,.1,1]},Ta=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Pa=Ta("applewebkit/")&&!Ta("chrome/")?Math.round:nt;function Sa(t){t.min=Pa(t.min),t.max=Pa(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=_r(e),s=_r(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Ea(t){return t!==t.root&&t.scroll?.wasRoot}const Va=sa({attachResizeListener:(t,e)=>ko(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},ka=sa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ca={pan:{Feature:class extends Eo{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new sr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:xr(t),onStart:xr(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&jt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Do(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Eo{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new yr(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ka,MeasureLayout:Ar}};function Da(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&jt.postRender(()=>s(e,Co(e)))}function ja(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&jt.postRender(()=>s(e,Co(e)))}const Ra=new WeakMap,La=new WeakMap,Oa=t=>{const e=Ra.get(t.target);e&&e(t)},Ba=t=>{t.forEach(Oa)};function Na(t,e,n){const i=function({root:t,...e}){const n=t||document;La.has(n)||La.set(n,{});const i=La.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Ba,{root:t,...e})),i[s]}(e);return Ra.set(t,n),i.observe(t),()=>{Ra.delete(t),i.unobserve(t)}}const Fa={some:0,all:1};const Ia={inView:{Feature:class extends Eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Fa[i]};return Na(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Eo{mount(){const{current:t}=this.node;t&&(this.unmount=Ii(t,(t,e)=>(ja(this.node,e,"Start"),(t,{success:e})=>ja(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=st(ko(this.node.current,"focus",()=>this.onFocus()),ko(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Eo{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,o]=Ci(t,n),r=t=>{if(!Di(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Di(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}(t,(t,e)=>(Da(this.node,e,"Start"),t=>Da(this.node,t,"End"))))}unmount(){}}}},Ua={layout:{ProjectionNode:ka,MeasureLayout:Ar}},$a={current:null},Wa={current:!1};const za=new WeakMap;const Ya=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xa{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=In,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Ft.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,jt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=us(e),this.isVariantNode=ds(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&$i(e)&&e.set(a[t],!1)}}mount(t){this.current=t,za.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Wa.current||function(){if(Wa.current=!0,z)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$a.current=t.matches;t.addListener(e),e()}else $a.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||$a.current),"production"!==process.env.NODE_ENV&&ut(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Mn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&jt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ts){const e=ts[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ya.length;e++){const n=Ya[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if($i(s))t.addValue(i,s);else if($i(o))t.addValue(i,Ai(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Ai(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ai(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(J(n)||tt(n))?n=parseFloat(n):(i=n,!Wi.find(li(i))&&ve.test(e)&&(n=wi(t,e))),this.setBaseTarget(t,$i(n)?n.get():n)),$i(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Ys(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||$i(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new rt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Ha extends Xa{constructor(){super(...arguments),this.KeyframeResolver=Ti}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$i(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ka(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}class qa extends Ha{constructor(){super(...arguments),this.type="html",this.renderInstance=Ka}readValueFromInstance(t,e){if(Mn.has(e))return this.projection?.isProjecting?Sn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Ut(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return er(t,e)}build(t,e,n){ks(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return qs(t,e,n)}}const Ga=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class _a extends Ha{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Io}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Mn.has(e)){const t=xi(e);return t&&t.default||0}return e=Ga.has(e)?e:vs(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return _s(t,e,n)}build(t,e,n){Bs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ka(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ga.has(n)?n:vs(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Fs(t.tagName),super.mount(t)}}const Za=(t,e)=>$s(t)?new _a(e):new qa(e,{allowProjection:t!==v}),Ja=os(Js({...Mo,...Ia,...Ca,...Ua},Za)),Qa=({isOpen:i,onClose:s,onToggle:o,menuItems:r,logoUrl:a,logoAlt:l="Logo",systemName:c="PASS",className:h="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:u="fixed inset-0 bg-black bg-opacity-50 z-40",desktopMenuClassName:d="h-full flex flex-col",showBottomMenu:p=!0,bottomMenuItems:m=[{id:"settings",label:"Configuración",icon:F,action:()=>{}},{id:"help",label:"Ayuda",icon:O,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:B,action:()=>{}}],activePath:f="",onNavigate:y,children:v})=>{const[x,w]=g(new Set),b=t=>f.includes(t),T=(n,i=!1)=>e(Ja.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group "+(b(n.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"),onClick:()=>{return t=n.path,y&&y(t),void s();var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(L,{className:"w-4 h-4 transition-transform "+(b(n.path)?"rotate-90":"group-hover:translate-x-1")})]},n.id),P=n=>{const i=x.has(n.id);return e("div",{className:"mb-2",children:[e(Ja.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group text-gray-700 hover:bg-gray-100",onClick:()=>{return t=n.id,void w(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(R,{className:"w-4 h-4 transition-transform "+(i?"rotate-180":"")})]}),t(Zi,{children:i&&t(Ja.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:t("div",{className:"pl-8 space-y-1",children:n.children.map(t=>T(t,!0))})})})]},n.id)};return e(n,{children:[t(Zi,{children:i&&t(Ja.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:u,onClick:s})}),t(Ja.div,{initial:{x:"-100%"},animate:{x:i?0:"-100%"},transition:{type:"spring",stiffness:300,damping:30},className:h,children:e("div",{className:d,children:[e("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-3",children:[a?t("img",{src:a,alt:l,className:"h-8 w-8 object-contain"}):t("div",{className:"h-8 w-8 bg-primary-botech rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-sm",children:c.charAt(0)})}),t("h1",{className:"text-lg font-bold text-gray-800",children:c})]}),t("button",{onClick:s,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t(I,{className:"w-5 h-5"})})]}),t("div",{className:"flex-1 overflow-y-auto p-4",children:t("nav",{className:"space-y-2",children:r.map(t=>"folder"===t.type?P(t.data):T(t.data))})}),p&&t("div",{className:"p-4 border-t border-gray-200",children:t("div",{className:"space-y-2",children:m.map(n=>e("button",{onClick:n.action,className:"w-full flex items-center space-x-3 px-4 py-2 rounded-lg text-gray-700 hover:bg-gray-100 transition-colors",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"text-sm",children:n.label})]},n.id))})}),v&&t("div",{className:"p-4 border-t border-gray-200",children:v})]})})]})};export{b as Button,U as Header,Qa as Sidebar};
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import*as i from"react";import s,{createContext as o,useRef as r,useLayoutEffect as a,useEffect as l,useId as c,useContext as h,useInsertionEffect as u,useMemo as d,useCallback as p,Children as m,isValidElement as f,useState as g,forwardRef as y,Fragment as v,createElement as x,Component as w}from"react";const b=({variant:e="primary",onClick:n,children:i,className:s=""})=>t("button",{className:`px-4 py-2 rounded font-medium transition-colors ${{primary:"bg-blue-600 hover:bg-blue-700 text-white",secondary:"bg-gray-200 hover:bg-gray-300 text-gray-800",danger:"bg-red-500 hover:bg-red-600 text-white"}[e]} ${s}`,onClick:n,children:i});var T={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},P=s.createContext&&s.createContext(T),S=["attr","size","title"];function A(t,e){if(null==t)return{};var n,i,s=function(t,e){if(null==t)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function E(){return E=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},E.apply(this,arguments)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function C(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t){return t&&t.map((t,e)=>s.createElement(t.tag,M({key:e},t.attr),k(t.child)))}function D(t){return e=>s.createElement(j,E({attr:M({},t.attr)},e),k(t.child))}function j(t){var e=e=>{var n,{attr:i,size:o,title:r}=t,a=A(t,S),l=o||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),s.createElement("svg",E({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,a,{className:n,style:M(M({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),r&&s.createElement("title",null,r),t.children)};return void 0!==P?s.createElement(P.Consumer,null,t=>e(t)):e(T)}function R(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function L(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function O(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function B(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(t)}function N(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function F(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(t)}function I(t){return D({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}const U=({title:n,description:i,logoUrl:s,logoAlt:o="Logo",systemName:r="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:h="flex items-center justify-between bg-primary-botech text-white p-4 shadow-lg",logoClassName:u="h-10 w-10 object-contain rounded-lg bg-white bg-opacity-20 p-1",titleClassName:d="text-xl font-bold",descriptionClassName:p="text-sm opacity-80"})=>e("div",{className:h,children:[e("div",{className:"flex items-center gap-4",children:[t("button",{onClick:l,className:"p-2 rounded-lg hover:bg-primary-botech-600 transition-colors focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-20","aria-label":"Abrir menú",children:t(N,{className:"w-6 h-6"})}),e("div",{className:"flex items-center",children:[t("div",{className:"w-10 h-10 flex items-center justify-center mr-3",children:s?t("img",{src:s,alt:o,className:u}):t("div",{className:"w-10 h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t("span",{className:"text-white font-bold text-lg",children:r.charAt(0)})})}),e("div",{children:[t("h1",{className:d,children:r}),t("p",{className:p,children:a})]})]})]}),c&&e("div",{className:"text-right",children:[t("h2",{className:"text-lg font-semibold",children:n}),t("p",{className:"text-sm opacity-80",children:i})]})]}),$=o({});function W(t){const e=r(null);return null===e.current&&(e.current=t()),e.current}const z="undefined"!=typeof window,Y=z?a:l,X=o(null);function H(t,e){-1===t.indexOf(e)&&t.push(e)}function K(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const q=(t,e,n)=>n>e?e:n<t?t:n;let G=()=>{},_=()=>{};"production"!==process.env.NODE_ENV&&(G=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},_=(t,e)=>{if(!t)throw new Error(e)});const Z={},J=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Q(t){return"object"==typeof t&&null!==t}const tt=t=>/^0[^.\s]+$/u.test(t);function et(t){let e;return()=>(void 0===e&&(e=t()),e)}const nt=t=>t,it=(t,e)=>n=>e(t(n)),st=(...t)=>t.reduce(it),ot=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class rt{constructor(){this.subscriptions=[]}add(t){return H(this.subscriptions,t),()=>K(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=t=>1e3*t,lt=t=>t/1e3;function ct(t,e){return e?t*(1e3/e):0}const ht=new Set;function ut(t,e,n){t||ht.has(e)||(console.warn(e),n&&console.warn(n),ht.add(e))}const dt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function pt(t,e,n,i){if(t===e&&n===i)return nt;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=dt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:dt(s(t),e,i)}const mt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ft=t=>e=>1-t(1-e),gt=pt(.33,1.53,.69,.99),yt=ft(gt),vt=mt(yt),xt=t=>(t*=2)<1?.5*yt(t):.5*(2-Math.pow(2,-10*(t-1))),wt=t=>1-Math.sin(Math.acos(t)),bt=ft(wt),Tt=mt(wt),Pt=pt(.42,0,1,1),St=pt(0,0,.58,1),At=pt(.42,0,.58,1),Et=t=>Array.isArray(t)&&"number"==typeof t[0],Vt={linear:nt,easeIn:Pt,easeInOut:At,easeOut:St,circIn:wt,circInOut:Tt,circOut:bt,backIn:yt,backInOut:vt,backOut:gt,anticipate:xt},Mt=t=>{if(Et(t)){_(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return pt(e,n,i,s)}return"string"==typeof t?(_(void 0!==Vt[t],`Invalid easing type '${t}'`),Vt[t]):t},Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],kt={value:null,addProjectionMetrics:null};function Dt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ct.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(h.schedule(e),t()),l++,e(a)}const h={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&kt.value&&kt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,h.process(t)))}};return h}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:h,update:u,preRender:d,render:p,postRender:m}=r,f=()=>{const o=Z.useManualTiming?s.timestamp:performance.now();n=!1,Z.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),h.process(s),u.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:Ct.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<Ct.length;e++)r[Ct[e]].cancel(t)},state:s,steps:r}}const{schedule:jt,cancel:Rt,state:Lt,steps:Ot}=Dt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:nt,!0);let Bt;function Nt(){Bt=void 0}const Ft={now:()=>(void 0===Bt&&Ft.set(Lt.isProcessing||Z.useManualTiming?Lt.timestamp:performance.now()),Bt),set:t=>{Bt=t,queueMicrotask(Nt)}},It=t=>e=>"string"==typeof e&&e.startsWith(t),Ut=It("--"),$t=It("var(--"),Wt=t=>!!$t(t)&&zt.test(t.split("/*")[0].trim()),zt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Xt={...Yt,transform:t=>q(0,1,t)},Ht={...Yt,default:1},Kt=t=>Math.round(1e5*t)/1e5,qt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Gt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_t=(t,e)=>n=>Boolean("string"==typeof n&&Gt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(qt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Jt={...Yt,transform:t=>Math.round((t=>q(0,255,t))(t))},Qt={test:_t("rgb","red"),parse:Zt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Jt.transform(t)+", "+Jt.transform(e)+", "+Jt.transform(n)+", "+Kt(Xt.transform(i))+")"};const te={test:_t("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Qt.transform},ee=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ne=ee("deg"),ie=ee("%"),se=ee("px"),oe=ee("vh"),re=ee("vw"),ae=(()=>({...ie,parse:t=>ie.parse(t)/100,transform:t=>ie.transform(100*t)}))(),le={test:_t("hsl","hue"),parse:Zt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ie.transform(Kt(e))+", "+ie.transform(Kt(n))+", "+Kt(Xt.transform(i))+")"},ce={test:t=>Qt.test(t)||te.test(t)||le.test(t),parse:t=>Qt.test(t)?Qt.parse(t):le.test(t)?le.parse(t):te.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Qt.transform(t):le.transform(t),getAnimatableNone:t=>{const e=ce.parse(t);return e.alpha=0,ce.transform(e)}},he=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ue="number",de="color",pe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function me(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(pe,t=>(ce.test(t)?(i.color.push(o),s.push(de),n.push(ce.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(ue),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function fe(t){return me(t).values}function ge(t){const{split:e,types:n}=me(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===ue?Kt(t[o]):e===de?ce.transform(t[o]):t[o]}return s}}const ye=t=>"number"==typeof t?0:ce.test(t)?ce.getAnimatableNone(t):t;const ve={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(qt)?.length||0)+(t.match(he)?.length||0)>0},parse:fe,createTransformer:ge,getAnimatableNone:function(t){const e=fe(t);return ge(t)(e.map(ye))}};function xe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function we(t,e){return n=>n>0?e:t}const be=(t,e,n)=>t+(e-t)*n,Te=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Pe=[te,Qt,le];function Se(t){const e=(n=t,Pe.find(t=>t.test(n)));var n;if(G(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===le&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=xe(a,i,t+1/3),o=xe(a,i,t),r=xe(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ae=(t,e)=>{const n=Se(t),i=Se(e);if(!n||!i)return we(t,e);const s={...n};return t=>(s.red=Te(n.red,i.red,t),s.green=Te(n.green,i.green,t),s.blue=Te(n.blue,i.blue,t),s.alpha=be(n.alpha,i.alpha,t),Qt.transform(s))},Ee=new Set(["none","hidden"]);function Ve(t,e){return n=>be(t,e,n)}function Me(t){return"number"==typeof t?Ve:"string"==typeof t?Wt(t)?we:ce.test(t)?Ae:De:Array.isArray(t)?Ce:"object"==typeof t?ce.test(t)?Ae:ke:we}function Ce(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Me(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function ke(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Me(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const De=(t,e)=>{const n=ve.createTransformer(e),i=me(t),s=me(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ee.has(t)&&!s.values.length||Ee.has(e)&&!i.values.length?function(t,e){return Ee.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):st(Ce(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(G(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),we(t,e))};function je(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return be(t,e,n);return Me(t)(t,e)}const Re=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>jt.update(e,t),stop:()=>Rt(e),now:()=>Lt.isProcessing?Lt.timestamp:Ft.now()}},Le=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Oe=2e4;function Be(t){let e=0;let n=t.next(e);for(;!n.done&&e<Oe;)e+=50,n=t.next(e);return e>=Oe?1/0:e}function Ne(t,e,n){const i=Math.max(e-5,0);return ct(n-t(i),e-i)}const Fe=100,Ie=10,Ue=1,$e=0,We=800,ze=.3,Ye=.3,Xe={granular:.01,default:2},He={granular:.005,default:.5},Ke=.01,qe=10,Ge=.05,_e=1,Ze=.001;function Je({duration:t=We,bounce:e=ze,velocity:n=$e,mass:i=Ue}){let s,o;G(t<=at(qe),"Spring duration must be 10 seconds or less");let r=1-e;r=q(Ge,_e,r),t=q(Ke,qe,lt(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=tn(e,r),l=Math.exp(-s);return Ze-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=tn(Math.pow(e,2),r);return(-s(e)+Ze>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<Qe;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=at(t),isNaN(a))return{stiffness:Fe,damping:Ie,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const Qe=12;function tn(t,e){return t*Math.sqrt(1-e*e)}const en=["duration","bounce"],nn=["stiffness","damping","mass"];function sn(t,e){return e.some(e=>void 0!==t[e])}function on(t=Ye,e=ze){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:h,duration:u,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:$e,stiffness:Fe,damping:Ie,mass:Ue,isResolvedFromDuration:!1,...t};if(!sn(t,nn)&&sn(t,en))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*q(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Ue,stiffness:s,damping:o}}else{const n=Je(t);e={...e,...n,mass:Ue},e.isResolvedFromDuration=!0}return e}({...n,velocity:-lt(n.velocity||0)}),m=d||0,f=c/(2*Math.sqrt(l*h)),g=r-o,y=lt(Math.sqrt(l/h)),v=Math.abs(g)<5;let x;if(i||(i=v?Xe.granular:Xe.default),s||(s=v?He.granular:He.default),f<1){const t=tn(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&u||null,next:t=>{const e=x(t);if(p)a.done=t>=u;else{let n=0===t?m:0;f<1&&(n=0===t?at(m):Ne(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Be(w),Oe),e=Le(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function rn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:h}){const u=t[0],d={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===r?f:r(f);g!==f&&(m=g-u);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let w,b;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=on({keyframes:[d.value,p(d.value)],velocity:Ne(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:h}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&x(t),d)}}}function an(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(_(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||Z.mix||je,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||nt:e;o=st(t,o)}i.push(o)}return i}(e,i,s),l=a.length,c=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=ot(t[i],t[i+1],n);return a[i](s)};return n?e=>c(q(t[0],t[o-1],e)):c}function ln(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=ot(0,e,i);t.push(be(n,1,s))}}(e,t.length-1),e}function cn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Mt):Mt(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ln(e),t),a=an(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||At).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}on.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Be(i),Oe);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:lt(s)}}(t,100,on);return t.ease=e.ease,t.duration=at(e.duration),t.type="keyframes",t};const hn=t=>null!==t;function un(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(hn),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const dn={decay:rn,inertia:rn,tween:cn,keyframes:cn,spring:on};function pn(t){"string"==typeof t.type&&(t.type=dn[t.type])}class mn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const fn=t=>t/100;class gn extends mn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Ft.now()&&this.tick(Ft.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;pn(t);const{type:e=cn,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||cn;"production"!==process.env.NODE_ENV&&a!==cn&&_(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),a!==cn&&"number"!=typeof r[0]&&(this.mixKeyframes=st(fn,je(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Be(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:u,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(h){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===u?(n=1-n,d&&(n-=d/r)):"mirror"===u&&(x=o)),v=q(0,1,n)*r}const w=y?{done:!1,value:c[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===a||(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return T&&p!==rn&&(w.value=un(c,this.options,f,this.speed)),m&&m(w.value),T&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return lt(this.calculatedDuration)}get time(){return lt(this.currentTime)}set time(t){t=at(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ft.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=lt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Re,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ft.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const yn=t=>180*t/Math.PI,vn=t=>{const e=yn(Math.atan2(t[1],t[0]));return wn(e)},xn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:vn,rotateZ:vn,skewX:t=>yn(Math.atan(t[1])),skewY:t=>yn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},wn=t=>((t%=360)<0&&(t+=360),t),bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Tn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Pn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bn,scaleY:Tn,scale:t=>(bn(t)+Tn(t))/2,rotateX:t=>wn(yn(Math.atan2(t[6],t[5]))),rotateY:t=>wn(yn(Math.atan2(-t[2],t[0]))),rotateZ:vn,rotate:vn,skewX:t=>yn(Math.atan(t[4])),skewY:t=>yn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Sn(t){return t.includes("scale")?1:0}function An(t,e){if(!t||"none"===t)return Sn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Pn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=xn,s=e}if(!s)return Sn(e);const o=i[e],r=s[1].split(",").map(En);return"function"==typeof o?o(r):r[o]}function En(t){return parseFloat(t.trim())}const Vn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mn=(()=>new Set(Vn))(),Cn=t=>t===Yt||t===se,kn=new Set(["x","y","z"]),Dn=Vn.filter(t=>!kn.has(t));const jn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};jn.translateX=jn.x,jn.translateY=jn.y;const Rn=new Set;let Ln=!1,On=!1,Bn=!1;function Nn(){if(On){const t=Array.from(Rn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Dn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}On=!1,Ln=!1,Rn.forEach(t=>t.complete(Bn)),Rn.clear()}function Fn(){Rn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(On=!0)})}class In{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Rn.add(this),Ln||(Ln=!0,jt.read(Fn),jt.resolveKeyframes(Nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rn.delete(this)}cancel(){"scheduled"===this.state&&(Rn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Un=et(()=>void 0!==window.ScrollTimeline),$n={};function Wn(t,e){const n=et(t);return()=>$n[e]??n()}const zn=Wn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Yn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Xn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yn([0,.65,.55,1]),circOut:Yn([.55,0,1,.45]),backIn:Yn([.31,.01,.66,-.59]),backOut:Yn([.33,1.53,.69,.99])};function Hn(t,e){return t?"function"==typeof t?zn()?Le(t,e):"ease-out":Et(t)?Yn(t):Array.isArray(t)?t.map(t=>Hn(t,e)||Xn.easeOut):Xn[t]:void 0}function Kn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const h={[e]:n};l&&(h.offset=l);const u=Hn(a,s);Array.isArray(u)&&(h.easing=u);const d={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);return t.animate(h,d)}function qn(t){return"function"==typeof t&&"applyToOptions"in t}class Gn extends mn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,_("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:t,...e}){return qn(t)&&zn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Kn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=un(i,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return lt(Number(t))}get time(){return lt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Un()?(this.animation.timeline=t,nt):e(this)}}const _n={anticipate:xt,backInOut:vt,circInOut:Tt};function Zn(t){"string"==typeof t.ease&&t.ease in _n&&(t.ease=_n[t.ease])}class Jn extends Gn{constructor(t){Zn(t),pn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new gn({...o,autoplay:!1}),a=at(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const Qn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ve.test(t)&&"0"!==t||t.startsWith("url(")));function ti(t){return Q(t)&&"offsetHeight"in t}const ei=new Set(["opacity","clipPath","filter","transform"]),ni=et(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ii extends mn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ft.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...h},d=c?.KeyframeResolver||In;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Ft.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Qn(s,e),a=Qn(o,e);return G(r===a,`You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||qn(n))&&i)}(t,s,o,r)||(!Z.instantAnimations&&a||c?.(un(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const h={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!ti(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return ni()&&n&&ei.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}(h)?new Jn({...h,element:h.motionValue.owner.current}):new gn(h);u.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Bn=!0,Fn(),Nn(),Bn=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const si=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oi(t,e,n=1){_(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=si.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return J(t)?parseFloat(t):t}return Wt(s)?oi(s,e,n+1):s}function ri(t,e){return t?.[e]??t?.default??t}const ai=new Set(["width","height","top","left","right","bottom",...Vn]),li=t=>e=>e.test(t),ci=[Yt,se,ie,ne,re,oe,{test:t=>"auto"===t,parse:t=>t}],hi=t=>ci.find(li(t));function ui(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||tt(t))}const di=new Set(["brightness","contrast","saturate","opacity"]);function pi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(qt)||[];if(!i)return t;const s=n.replace(i,"");let o=di.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const mi=/\b([a-z-]*)\(.*?\)/gu,fi={...ve,getAnimatableNone:t=>{const e=t.match(mi);return e?e.map(pi).join(" "):t}},gi={...Yt,transform:Math.round},yi={borderWidth:se,borderTopWidth:se,borderRightWidth:se,borderBottomWidth:se,borderLeftWidth:se,borderRadius:se,radius:se,borderTopLeftRadius:se,borderTopRightRadius:se,borderBottomRightRadius:se,borderBottomLeftRadius:se,width:se,maxWidth:se,height:se,maxHeight:se,top:se,right:se,bottom:se,left:se,padding:se,paddingTop:se,paddingRight:se,paddingBottom:se,paddingLeft:se,margin:se,marginTop:se,marginRight:se,marginBottom:se,marginLeft:se,backgroundPositionX:se,backgroundPositionY:se,...{rotate:ne,rotateX:ne,rotateY:ne,rotateZ:ne,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:ne,skewX:ne,skewY:ne,distance:se,translateX:se,translateY:se,translateZ:se,x:se,y:se,z:se,perspective:se,transformPerspective:se,opacity:Xt,originX:ae,originY:ae,originZ:se},zIndex:gi,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:gi},vi={...yi,color:ce,backgroundColor:ce,outlineColor:ce,fill:ce,stroke:ce,borderColor:ce,borderTopColor:ce,borderRightColor:ce,borderBottomColor:ce,borderLeftColor:ce,filter:fi,WebkitFilter:fi},xi=t=>vi[t];function wi(t,e){let n=xi(t);return n!==fi&&(n=ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const bi=new Set(["auto","none","0"]);class Ti extends In{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Wt(i))){const s=oi(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ai.has(n)||2!==t.length)return;const[i,s]=t,o=hi(i),r=hi(s);if(o!==r)if(Cn(o)&&Cn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ui(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!bi.has(e)&&me(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=wi(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=jn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Pi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Si{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ft.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ft.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&ut(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new rt);const n=this.events[t].add(e);return"change"===t?()=>{n(),jt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ft.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ct(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(t,e){return new Si(t,e)}const{schedule:Ei,cancel:Vi}=Dt(queueMicrotask,!1),Mi={x:!1,y:!1};function Ci(){return Mi.x||Mi.y}function ki(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Di(t){return!("touch"===t.pointerType||Ci())}const ji=(t,e)=>!!e&&(t===e||ji(t,e.parentElement)),Ri=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Li=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Oi=new WeakSet;function Bi(t){return e=>{"Enter"===e.key&&t(e)}}function Ni(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Fi(t){return Ri(t)&&!Ci()}function Ii(t,e,n={}){const[i,s,o]=ki(t,n),r=t=>{const i=t.currentTarget;if(!Fi(t))return;Oi.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Oi.has(i)&&Oi.delete(i),Fi(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ji(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ti(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Bi(()=>{if(Oi.has(n))return;Ni(n,"down");const t=Bi(()=>{Ni(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Ni(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Li.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function Ui(t){return Q(t)&&"ownerSVGElement"in t}const $i=t=>Boolean(t&&t.getVelocity),Wi=[...ci,ce,ve],zi=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Yi extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=ti(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Xi({children:e,isPresent:n,anchorX:s}){const o=c(),a=r(null),l=r({width:0,height:0,top:0,left:0,right:0}),{nonce:d}=h(zi);return u(()=>{const{width:t,height:e,top:i,left:r,right:c}=l.current;if(n||!a.current||!t||!e)return;const h="left"===s?`left: ${r}`:`right: ${c}`;a.current.dataset.motionPopId=o;const u=document.createElement("style");return d&&(u.nonce=d),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${h}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.contains(u)&&document.head.removeChild(u)}},[n]),t(Yi,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Hi=({children:e,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:h})=>{const u=W(Ki),p=c();let m=!0,f=d(()=>(m=!1,{id:p,initial:n,isPresent:s,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[s,u,o]);return a&&m&&(f={...f}),d(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),i.useEffect(()=>{!s&&!u.size&&o&&o()},[s]),"popLayout"===l&&(e=t(Xi,{isPresent:s,anchorX:h,children:e})),t(X.Provider,{value:f,children:e})};function Ki(){return new Map}function qi(t=!0){const e=h(X);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,o=c();l(()=>{if(t)return s(o)},[t]);const r=p(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,r]:[!0]}const Gi=t=>t.key||"";function _i(t){const e=[];return m.forEach(t,t=>{f(t)&&e.push(t)}),e}const Zi=({children:e,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:l="sync",propagate:c=!1,anchorX:u="left"})=>{const[p,m]=qi(c),f=d(()=>_i(e),[e]),y=c&&!p?[]:f.map(Gi),v=r(!0),x=r(f),w=W(()=>new Map),[b,T]=g(f),[P,S]=g(f);Y(()=>{v.current=!1,x.current=f;for(let t=0;t<P.length;t++){const e=Gi(P[t]);y.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}},[P,y.length,y.join("-")]);const A=[];if(f!==b){let t=[...f];for(let e=0;e<P.length;e++){const n=P[e],i=Gi(n);y.includes(i)||(t.splice(e,0,n),A.push(n))}return"wait"===l&&A.length&&(t=A),S(_i(t)),T(f),null}"production"!==process.env.NODE_ENV&&"wait"===l&&P.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:E}=h($);return t(n,{children:P.map(e=>{const n=Gi(e),r=!(c&&!p)&&(f===P||y.includes(n));return t(Hi,{isPresent:r,initial:!(v.current&&!s)&&void 0,custom:i,presenceAffectsLayout:a,mode:l,onExitComplete:r?void 0:()=>{if(!w.has(n))return;w.set(n,!0);let t=!0;w.forEach(e=>{e||(t=!1)}),t&&(E?.(),S(x.current),c&&m?.(),o&&o())},anchorX:u,children:e},n)})})},Ji=o({strict:!1}),Qi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ts={};for(const t in Qi)ts[t]={isEnabled:e=>Qi[t].some(t=>!!e[t])};const es=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ns(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||es.has(t)}let is=t=>!ns(t);try{"function"==typeof(ss=require("@emotion/is-prop-valid").default)&&(is=t=>t.startsWith("on")?!ns(t):ss(t))}catch{}var ss;function os(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&ut(!1,"motion() is deprecated. Use motion.create() instead."),t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const rs=o({});function as(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ls(t){return"string"==typeof t||Array.isArray(t)}const cs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...cs];function us(t){return as(t.animate)||hs.some(e=>ls(t[e]))}function ds(t){return Boolean(us(t)||t.variants)}function ps(t){const{initial:e,animate:n}=function(t,e){if(us(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ls(e)?e:void 0,animate:ls(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,h(rs));return d(()=>({initial:e,animate:n}),[ms(e),ms(n)])}function ms(t){return Array.isArray(t)?t.join(" "):t}const fs=Symbol.for("motionComponentSymbol");function gs(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ys(t,e,n){return p(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):gs(n)&&(n.current=i))},[e])}const vs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xs="data-"+vs("framerAppearId"),ws=o({});function bs(t,e,n,i,s){const{visualElement:o}=h(rs),a=h(Ji),c=h(X),d=h(zi).reducedMotion,p=r(null);i=i||a.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const m=p.current,f=h(ws);!m||m.projection||!s||"html"!==m.type&&"svg"!==m.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ts(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&gs(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:l,layoutRoot:c})}(p.current,n,s,f);const g=r(!1);u(()=>{m&&g.current&&m.update(n,c)});const y=n[xs],v=r(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Y(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Ei.render(m.render),v.current&&m.animationState&&m.animationState.animateChanges())}),l(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1))}),m}function Ts(t){if(t)return!1!==t.options.allowProjection?t.projection:Ts(t.parent)}function Ps({preloadedFeatures:n,createVisualElement:i,useRender:s,useVisualState:o,Component:r}){function a(a,l){let c;const u={...h(zi),...a,layoutId:Ss(a)},{isStatic:d}=u,p=ps(a),m=o(a,d);if(!d&&z){!function(t,e){const n=h(Ji).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?G(!1,e):_(!1,e)}}(u,n);const t=function(t){const{drag:e,layout:n}=ts;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);c=t.MeasureLayout,p.visualElement=bs(r,m,u,i,t.ProjectionNode)}return e(rs.Provider,{value:p,children:[c&&p.visualElement?t(c,{visualElement:p.visualElement,...u}):null,s(r,a,ys(m,p.visualElement,l),m,d,p.visualElement)]})}n&&function(t){for(const e in t)ts[e]={...ts[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof r?r:`create(${r.displayName??r.name??""})`}`;const l=y(a);return l[fs]=r,l}function Ss({layoutId:t}){const e=h($).id;return e&&void 0!==t?e+"-"+t:t}const As={};function Es(t,{layout:e,layoutId:n}){return Mn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!As[t]||"opacity"===t)}const Vs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ms=Vn.length;function Cs(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Mn.has(t))r=!0;else if(Ut(t))s[t]=n;else{const e=Pi(n,yi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Ms;o++){const r=Vn[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Pi(a,yi[r]);l||(s=!1,i+=`${Vs[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const ks=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ds(t,e,n){for(const i in e)$i(e[i])||Es(i,n)||(t[i]=e[i])}function js(t,e){const n={};return Ds(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Cs(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Rs(t,e){const n={},i=js(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Ls={offset:"stroke-dashoffset",array:"stroke-dasharray"},Os={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,h){if(Cs(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=h?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ls:Os;t[o.offset]=se.transform(-i);const r=se.transform(e),a=se.transform(n);t[o.array]=`${r} ${a}`}(u,s,o,r,!1)}const Ns=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Fs=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Is(t,e,n,i){const s=d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Bs(n,e,Fs(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Ds(e,t.style,t),s.style={...e,...s.style}}return s}const Us=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $s(t){return"string"==typeof t&&!t.includes("-")&&!!(Us.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ws(t=!1){return(e,n,i,{latestValues:s},o)=>{const r=($s(e)?Is:Rs)(n,s,o,e),a=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(is(s)||!0===n&&ns(s)||!e&&!ns(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof e,t),l=e!==v?{...a,...r,ref:i}:{},{children:c}=n,h=d(()=>$i(c)?c.get():c,[c]);return x(e,{...l,children:h})}}function zs(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ys(t,e,n,i){if("function"==typeof e){const[s,o]=zs(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=zs(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Xs(t){return $i(t)?t.get():t}const Hs=t=>(e,n)=>{const i=h(rs),s=h(X),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Ks(n,i,s,t),renderState:e()}}(t,e,i,s);return n?o():W(o)};function Ks(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Xs(o[t]);let{initial:r,animate:a}=t;const l=us(t),c=ds(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let h=!!n&&!1===n.initial;h=h||!1===r;const u=h?a:r;if(u&&"boolean"!=typeof u&&!as(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Ys(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[h?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}function qs(t,e,n){const{style:i}=t,s={};for(const o in i)($i(i[o])||e.style&&$i(e.style[o])||Es(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}const Gs={useVisualState:Hs({scrapeMotionValuesFromProps:qs,createRenderState:ks})};function _s(t,e,n){const i=qs(t,e,n);for(const n in t)if($i(t[n])||$i(e[n])){i[-1!==Vn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Zs={useVisualState:Hs({scrapeMotionValuesFromProps:_s,createRenderState:Ns})};function Js(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Ps({...$s(n)?Zs:Gs,preloadedFeatures:t,useRender:Ws(i),createVisualElement:e,Component:n})}}function Qs(t,e,n){const i=t.getProps();return Ys(i,e,void 0!==n?n:i.custom,t)}const to=t=>Array.isArray(t);function eo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function no(t){return to(t)?t[t.length-1]||0:t}function io(t,e){const n=t.getValue("willChange");if(i=n,Boolean($i(i)&&i.add))return n.add(e);if(!n&&Z.WillChange){const n=new Z.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function so(t){return t.props[xs]}const oo=t=>null!==t;const ro={type:"spring",stiffness:500,damping:25,restSpeed:10},ao={type:"keyframes",duration:.8},lo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},co=(t,{keyframes:e})=>e.length>2?ao:Mn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ro:lo;const ho=(t,e,n,i={},s,o)=>r=>{const a=ri(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=at(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...h}){return!!Object.keys(h).length})(a)||Object.assign(h,co(t,h)),h.duration&&(h.duration=at(h.duration)),h.repeatDelay&&(h.repeatDelay=at(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let u=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(u=!0)),(Z.instantAnimations||Z.skipAnimations)&&(u=!0,h.duration=0,h.delay=0),h.allowFlatten=!a.type&&!a.ease,u&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(oo),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(h.keyframes,a);if(void 0!==t)return void jt.update(()=>{h.onUpdate(t),h.onComplete()})}return a.isSync?new gn(h):new ii(h)};function uo({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function po(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||c&&uo(c,e))continue;const r={delay:n,...ri(o||{},e)},h=i.get();if(void 0!==h&&!i.isAnimating&&!Array.isArray(s)&&s===h&&!r.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=so(t);if(n){const t=window.MotionHandoffAnimation(n,e,jt);null!==t&&(r.startTime=t,u=!0)}}io(t,e),i.start(ho(e,i,s,t.shouldReduceMotion&&ai.has(e)?{type:!1}:r,t,u));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{jt.update(()=>{r&&function(t,e){const n=Qs(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)eo(t,e,no(o[e]))}(t,r)})}),l}function mo(t,e,n={}){const i=Qs(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(po(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(fo).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(mo(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function fo(t,e){return t.sortNodePosition(e)}function go(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const yo=hs.length;function vo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&vo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<yo;n++){const i=hs[n],s=t.props[i];(ls(s)||!1===s)&&(e[i]=s)}return e}const xo=[...cs].reverse(),wo=cs.length;function bo(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>mo(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=mo(t,e,n);else{const s="function"==typeof e?Qs(t,e,n.custom):e;i=Promise.all(po(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function To(t){let e=bo(t),n=Ao(),i=!0;const s=e=>(n,i)=>{const s=Qs(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=vo(t.parent)||{},l=[],c=new Set;let h={},u=1/0;for(let e=0;e<wo;e++){const d=xo[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=ls(m),g=d===o?p.isActive:null;!1===g&&(u=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...h},!p.isActive&&null===g||!m&&!p.prevProp||as(m)||"boolean"==typeof m)continue;const v=Po(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>u&&f,w=!1;const b=Array.isArray(m)?m:[m];let T=b.reduce(s(d),{});!1===g&&(T={});const{prevResolvedValues:P={}}=p,S={...P,...T},A=e=>{x=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=T[t],n=P[t];if(h.hasOwnProperty(t))continue;let i=!1;i=to(e)&&to(n)?!go(e,n):e!==n,i?null!=e?A(t):c.add(t):void 0!==e&&c.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(h={...h,...T}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||w)&&l.push(...b.map(t=>({animation:t,options:{type:d}})))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=Qs(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ao(),i=!0}}}function Po(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!go(e,t)}function So(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ao(){return{animate:So(!0),whileInView:So(),whileHover:So(),whileTap:So(),whileDrag:So(),whileFocus:So(),exit:So()}}class Eo{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Vo=0;const Mo={animation:{Feature:class extends Eo{constructor(t){super(t),t.animationState||(t.animationState=To(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();as(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Eo{constructor(){super(...arguments),this.id=Vo++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Co(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function ko(t){return{point:{x:t.pageX,y:t.pageY}}}function Do(t,e,n,i){return Co(t,e,(t=>e=>Ri(e)&&t(e,ko(e)))(n),i)}function jo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ro(t){return t.max-t.min}function Lo(t,e,n,i=.5){t.origin=i,t.originPoint=be(e.min,e.max,t.origin),t.scale=Ro(n)/Ro(e),t.translate=be(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Oo(t,e,n,i){Lo(t.x,e.x,n.x,i?i.originX:void 0),Lo(t.y,e.y,n.y,i?i.originY:void 0)}function Bo(t,e,n){t.min=n.min+e.min,t.max=t.min+Ro(e)}function No(t,e,n){t.min=e.min-n.min,t.max=t.min+Ro(e)}function Fo(t,e,n){No(t.x,e.x,n.x),No(t.y,e.y,n.y)}const Io=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Uo(t){return[t("x"),t("y")]}function $o(t){return void 0===t||1===t}function Wo({scale:t,scaleX:e,scaleY:n}){return!$o(t)||!$o(e)||!$o(n)}function zo(t){return Wo(t)||Yo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yo(t){return Xo(t.x)||Xo(t.y)}function Xo(t){return t&&"0%"!==t}function Ho(t,e,n){return n+e*(t-n)}function Ko(t,e,n,i,s){return void 0!==s&&(t=Ho(t,s,i)),Ho(t,n,i)+e}function qo(t,e=0,n=1,i,s){t.min=Ko(t.min,e,n,i,s),t.max=Ko(t.max,e,n,i,s)}function Go(t,{x:e,y:n}){qo(t.x,e.translate,e.scale,e.originPoint),qo(t.y,n.translate,n.scale,n.originPoint)}const _o=.999999999999,Zo=1.0000000000001;function Jo(t,e){t.min=t.min+e,t.max=t.max+e}function Qo(t,e,n,i,s=.5){qo(t,e,n,be(t.min,t.max,s),i)}function tr(t,e){Qo(t.x,e.x,e.scaleX,e.scale,e.originX),Qo(t.y,e.y,e.scaleY,e.scale,e.originY)}function er(t,e){return jo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const nr=({current:t})=>t?t.ownerDocument.defaultView:null,ir=(t,e)=>Math.abs(t-e);class sr{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=ar(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=ir(t.x,e.x),i=ir(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Lt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=or(e,this.transformPagePoint),jt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ar("pointercancel"===t.type?this.lastMoveEventInfo:or(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Ri(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=or(ko(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Lt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ar(o,this.history)),this.removeListeners=st(Do(this.contextWindow,"pointermove",this.handlePointerMove),Do(this.contextWindow,"pointerup",this.handlePointerUp),Do(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rt(this.updatePoint)}}function or(t,e){return e?{point:e(t.point)}:t}function rr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ar({point:t},e){return{point:t,delta:rr(t,cr(e)),offset:rr(t,lr(e)),velocity:hr(e,.1)}}function lr(t){return t[0]}function cr(t){return t[t.length-1]}function hr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=cr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>at(e)));)n--;if(!i)return{x:0,y:0};const o=lt(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ur(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function dr(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const pr=.35;function mr(t,e,n){return{min:fr(t,e),max:fr(t,n)}}function fr(t,e){return"number"==typeof t?t:t[e]||0}const gr=new WeakMap;class yr{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new sr(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ko(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Mi[o]?null:(Mi[o]=!0,()=>{Mi[o]=!1}):Mi.x||Mi.y?null:(Mi.x=Mi.y=!0,()=>{Mi.x=Mi.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Uo(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ie.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Ro(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&jt.postRender(()=>s(t,e)),io(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Uo(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:nr(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&jt.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!vr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?be(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?be(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&gs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:ur(t.x,n,s),y:ur(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=pr){return!1===t?t=0:!0===t&&(t=pr),{x:mr(t,"left","right"),y:mr(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Uo(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!gs(t))return!1;const n=t.current;_(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=er(t,n),{scroll:s}=e;return s&&(Jo(i.x,s.offset.x),Jo(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:dr(t.x,e.x),y:dr(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=jo(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Uo(r=>{if(!vr(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,h=i?40:1e7,u={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,u)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return io(this.visualElement,t),n.start(ho(t,n,0,e,this.visualElement,!1))}stopAnimation(){Uo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Uo(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Uo(e=>{const{drag:n}=this.getProps();if(!vr(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-be(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!gs(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Uo(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Ro(t),s=Ro(e);return s>i?n=ot(e.min,e.max-i,t.min):i>s&&(n=ot(t.min,t.max-s,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Uo(e=>{if(!vr(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(be(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;gr.set(this.visualElement,this);const t=Do(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();gs(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),jt.read(e);const s=Co(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Uo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=pr,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function vr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const xr=t=>(e,n)=>{t&&jt.postRender(()=>t(e,n))};const wr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function br(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Tr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!se.test(t))return t;t=parseFloat(t)}return`${br(t,e.target.x)}% ${br(t,e.target.y)}%`}},Pr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ve.parse(t);if(s.length>5)return i;const o=ve.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=be(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};class Sr extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;!function(t){for(const e in t)As[e]=t[e],Ut(e)&&(As[e].isCSSVariable=!0)}(Er),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),wr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||jt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ei.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ar(e){const[n,i]=qi(),s=h($);return t(Sr,{...e,layoutGroup:s,switchLayoutGroup:h(ws),isPresent:n,safeToRemove:i})}const Er={borderRadius:{...Tr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tr,borderTopRightRadius:Tr,borderBottomLeftRadius:Tr,borderBottomRightRadius:Tr,boxShadow:Pr};const Vr=(t,e)=>t.depth-e.depth;class Mr{constructor(){this.children=[],this.isDirty=!1}add(t){H(this.children,t),this.isDirty=!0}remove(t){K(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vr),this.isDirty=!1,this.children.forEach(t)}}const Cr=["TopLeft","TopRight","BottomLeft","BottomRight"],kr=Cr.length,Dr=t=>"string"==typeof t?parseFloat(t):t,jr=t=>"number"==typeof t||se.test(t);function Rr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Lr=Br(0,.5,bt),Or=Br(.5,.95,nt);function Br(t,e,n){return i=>i<t?0:i>e?1:n(ot(t,e,i))}function Nr(t,e){t.min=e.min,t.max=e.max}function Fr(t,e){Nr(t.x,e.x),Nr(t.y,e.y)}function Ir(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ur(t,e,n,i,s){return t=Ho(t-=e,1/n,i),void 0!==s&&(t=Ho(t,1/s,i)),t}function $r(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){ie.test(e)&&(e=parseFloat(e),e=be(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=be(o.min,o.max,i);t===o&&(a-=e),t.min=Ur(t.min,e,n,a,s),t.max=Ur(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Wr=["x","scaleX","originX"],zr=["y","scaleY","originY"];function Yr(t,e,n,i){$r(t.x,e,Wr,n?n.x:void 0,i?i.x:void 0),$r(t.y,e,zr,n?n.y:void 0,i?i.y:void 0)}function Xr(t){return 0===t.translate&&1===t.scale}function Hr(t){return Xr(t.x)&&Xr(t.y)}function Kr(t,e){return t.min===e.min&&t.max===e.max}function qr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gr(t,e){return qr(t.x,e.x)&&qr(t.y,e.y)}function _r(t){return Ro(t.x)/Ro(t.y)}function Zr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Jr{constructor(){this.members=[]}add(t){H(this.members,t),t.scheduleRender()}remove(t){if(K(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Qr=["","X","Y","Z"],ta={visibility:"hidden"};let ea=0;function na(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ia(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=so(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",jt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ia(i)}function sa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=ea++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(aa),this.nodes.forEach(ma),this.nodes.forEach(fa),this.nodes.forEach(la)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new rt),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;var n;this.isSVG=Ui(e)&&!(Ui(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Ft.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Rt(i),t(o-e))};return jt.setup(i,!0),()=>Rt(i)}(i,250),wr.hasAnimatedSinceResize&&(wr.hasAnimatedSinceResize=!1,this.nodes.forEach(pa))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||ba,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Gr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ri(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||pa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ga),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ia(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(ua),this.isUpdating=!1,this.nodes.forEach(da),this.nodes.forEach(oa),this.nodes.forEach(ra),this.clearAllSnapshots();const t=Ft.now();Lt.delta=q(0,1e3/60,t-Lt.timestamp),Lt.timestamp=t,Lt.isProcessing=!0,Ot.update.process(Lt),Ot.preRender.process(Lt),Ot.render.process(Lt),Lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ei.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ca),this.sharedNodes.forEach(ya)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,jt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){jt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ro(this.snapshot.measuredBox.x)||Ro(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Hr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||zo(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Sa((i=n).x),Sa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ea))){const{scroll:t}=this.root;t&&(Jo(e.x,t.offset.x),Jo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Fr(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Fr(e,t),Jo(e.x,s.offset.x),Jo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Fr(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&tr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),zo(i.latestValues)&&tr(n,i.latestValues)}return zo(this.latestValues)&&tr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Fr(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!zo(n.latestValues))continue;Wo(n.latestValues)&&n.updateSnapshot();const i=Io();Fr(i,n.measurePageBox()),Yr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return zo(this.latestValues)&&Yr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=Lt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Fo(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,r,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,r=this.relativeTarget,a=this.relativeParent.target,Bo(o.x,r.x,a.x),Bo(o.y,r.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Fr(this.target,this.layout.layoutBox),Go(this.target,this.targetDelta)):Fr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Fo(this.relativeTargetOrigin,this.target,t.target),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Wo(this.parent.latestValues)&&!Yo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Lt.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Fr(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&tr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Go(t,r)),i&&zo(o.latestValues)&&tr(t,o.latestValues))}e.x<Zo&&e.x>_o&&(e.x=1),e.y<Zo&&e.y>_o&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Ir(this.prevProjectionDelta.x,this.projectionDelta.x),Ir(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Oo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Zr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Zr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,h=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(wa));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;va(o.x,t.x,n),va(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,xa(p.x,m.x,f.x,g),xa(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,d=u,Kr(l.x,d.x)&&Kr(l.y,d.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),Fr(u,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=be(0,n.opacity??1,Lr(i)),t.opacityExit=be(e.opacity??1,0,Or(i))):o&&(t.opacity=be(e.opacity??1,n.opacity??1,i));for(let s=0;s<kr;s++){const o=`border${Cr[s]}Radius`;let r=Rr(e,o),a=Rr(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||jr(r)===jr(a)?(t[o]=Math.max(be(Dr(r),Dr(a),i),0),(ie.test(a)||ie.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=be(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=jt.update(()=>{wr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=function(t,e,n){const i=$i(t)?t:Ai(t);return i.start(ho("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ro(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ro(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Fr(e,n),tr(e,s),Oo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Jr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&na("z",t,i,this.animationValues);for(let e=0;e<Qr.length;e++)na(`rotate${Qr[e]}`,t,i,this.animationValues),na(`skew${Qr[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ta;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=Xs(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Xs(t?.pointerEvents)||""),this.hasProjected&&!zo(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(e.transform=n(s,e.transform));const{x:o,y:r}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*r.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in As){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:r}=As[t],a="none"===e.transform?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=a}else r?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?Xs(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function oa(t){t.updateLayout()}function ra(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Uo(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Ro(i);i.min=n[t].min,i.max=i.min+s}):Aa(s,e.layoutBox,n)&&Uo(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Ro(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Oo(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Oo(a,t.applyTransform(i,!0),e.measuredBox):Oo(a,n,e.layoutBox);const l=!Hr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Fo(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Fo(a,n,o.layoutBox),Gr(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function aa(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function la(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ca(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function ua(t){t.isLayoutDirty=!1}function da(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function pa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ma(t){t.resolveTargetDelta()}function fa(t){t.calcProjection()}function ga(t){t.resetSkewAndRotation()}function ya(t){t.removeLeadSnapshot()}function va(t,e,n){t.translate=be(e.translate,0,n),t.scale=be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function xa(t,e,n,i){t.min=be(e.min,n.min,i),t.max=be(e.max,n.max,i)}function wa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ba={duration:.45,ease:[.4,0,.1,1]},Ta=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Pa=Ta("applewebkit/")&&!Ta("chrome/")?Math.round:nt;function Sa(t){t.min=Pa(t.min),t.max=Pa(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=_r(e),s=_r(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Ea(t){return t!==t.root&&t.scroll?.wasRoot}const Va=sa({attachResizeListener:(t,e)=>Co(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},Ca=sa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ka={pan:{Feature:class extends Eo{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new sr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:xr(t),onStart:xr(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&jt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Do(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Eo{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new yr(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ca,MeasureLayout:Ar}};function Da(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&jt.postRender(()=>s(e,ko(e)))}function ja(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&jt.postRender(()=>s(e,ko(e)))}const Ra=new WeakMap,La=new WeakMap,Oa=t=>{const e=Ra.get(t.target);e&&e(t)},Ba=t=>{t.forEach(Oa)};function Na(t,e,n){const i=function({root:t,...e}){const n=t||document;La.has(n)||La.set(n,{});const i=La.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Ba,{root:t,...e})),i[s]}(e);return Ra.set(t,n),i.observe(t),()=>{Ra.delete(t),i.unobserve(t)}}const Fa={some:0,all:1};const Ia={inView:{Feature:class extends Eo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Fa[i]};return Na(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Eo{mount(){const{current:t}=this.node;t&&(this.unmount=Ii(t,(t,e)=>(ja(this.node,e,"Start"),(t,{success:e})=>ja(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Eo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=st(Co(this.node.current,"focus",()=>this.onFocus()),Co(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Eo{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,o]=ki(t,n),r=t=>{if(!Di(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Di(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}(t,(t,e)=>(Da(this.node,e,"Start"),t=>Da(this.node,t,"End"))))}unmount(){}}}},Ua={layout:{ProjectionNode:Ca,MeasureLayout:Ar}},$a={current:null},Wa={current:!1};const za=new WeakMap;const Ya=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xa{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=In,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Ft.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,jt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=us(e),this.isVariantNode=ds(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&$i(e)&&e.set(a[t],!1)}}mount(t){this.current=t,za.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Wa.current||function(){if(Wa.current=!0,z)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$a.current=t.matches;t.addListener(e),e()}else $a.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||$a.current),"production"!==process.env.NODE_ENV&&ut(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Mn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&jt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ts){const e=ts[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ya.length;e++){const n=Ya[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if($i(s))t.addValue(i,s);else if($i(o))t.addValue(i,Ai(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Ai(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ai(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(J(n)||tt(n))?n=parseFloat(n):(i=n,!Wi.find(li(i))&&ve.test(e)&&(n=wi(t,e))),this.setBaseTarget(t,$i(n)?n.get():n)),$i(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Ys(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||$i(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new rt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Ha extends Xa{constructor(){super(...arguments),this.KeyframeResolver=Ti}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$i(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ka(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}class qa extends Ha{constructor(){super(...arguments),this.type="html",this.renderInstance=Ka}readValueFromInstance(t,e){if(Mn.has(e))return this.projection?.isProjecting?Sn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Ut(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return er(t,e)}build(t,e,n){Cs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return qs(t,e,n)}}const Ga=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class _a extends Ha{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Io}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Mn.has(e)){const t=xi(e);return t&&t.default||0}return e=Ga.has(e)?e:vs(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return _s(t,e,n)}build(t,e,n){Bs(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ka(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ga.has(n)?n:vs(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Fs(t.tagName),super.mount(t)}}const Za=(t,e)=>$s(t)?new _a(e):new qa(e,{allowProjection:t!==v}),Ja=os(Js({...Mo,...Ia,...ka,...Ua},Za)),Qa=({isOpen:i,onClose:s,onToggle:o,menuItems:r,logoUrl:a,logoAlt:l="Logo",systemName:c="PASS",className:h="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:u="fixed inset-0 bg-black bg-opacity-25 z-40",desktopMenuClassName:d="h-full flex flex-col",showBottomMenu:p=!0,bottomMenuItems:m=[{id:"settings",label:"Configuración",icon:F,action:()=>{}},{id:"help",label:"Ayuda",icon:O,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:B,action:()=>{}}],activePath:f="",onNavigate:y,children:v})=>{const[x,w]=g(new Set),b=t=>f.includes(t),T=(n,i=!1)=>e(Ja.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group "+(b(n.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"),onClick:()=>{return t=n.path,y&&y(t),void s();var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(L,{className:"w-4 h-4 transition-transform "+(b(n.path)?"rotate-90":"group-hover:translate-x-1")})]},n.id),P=n=>{const i=x.has(n.id);return e("div",{className:"mb-2",children:[e(Ja.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group text-gray-700 hover:bg-gray-100",onClick:()=>{return t=n.id,void w(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(R,{className:"w-4 h-4 transition-transform "+(i?"rotate-180":"")})]}),t(Zi,{children:i&&t(Ja.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:t("div",{className:"pl-8 space-y-1",children:n.children.map(t=>T(t,!0))})})})]},n.id)};return e(n,{children:[t(Zi,{children:i&&t(Ja.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:u,onClick:s})}),t(Ja.div,{initial:{x:"-100%"},animate:{x:i?0:"-100%"},transition:{type:"spring",stiffness:300,damping:30},className:h,children:e("div",{className:d,children:[e("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-3",children:[a?t("img",{src:a,alt:l,className:"h-8 w-8 object-contain"}):t("div",{className:"h-8 w-8 bg-primary-botech rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-sm",children:c.charAt(0)})}),t("h1",{className:"text-lg font-bold text-gray-800",children:c})]}),t("button",{onClick:s,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t(I,{className:"w-5 h-5"})})]}),t("div",{className:"flex-1 overflow-y-auto p-4",children:t("nav",{className:"space-y-2",children:r.map(t=>"folder"===t.type?P(t.data):T(t.data))})}),p&&t("div",{className:"p-4 border-t border-gray-200",children:t("div",{className:"space-y-2",children:m.map(n=>e("button",{onClick:n.action,className:"w-full flex items-center space-x-3 px-4 py-2 rounded-lg text-gray-700 hover:bg-gray-100 transition-colors",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"text-sm",children:n.label})]},n.id))})}),v&&t("div",{className:"p-4 border-t border-gray-200",children:v})]})})]})};export{b as Button,U as Header,Qa as Sidebar};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|