@telegraph/modal 0.1.20 → 0.1.22
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/CHANGELOG.md +14 -0
- package/README.md +31 -17
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +481 -466
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Modal/Modal.d.ts +7 -1
- package/dist/types/Modal/Modal.d.ts.map +1 -1
- package/package.json +6 -5
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),$s=require("@radix-ui/react-dialog"),T=require("react"),Us=require("react-dom"),Hs=require("@radix-ui/react-focus-scope"),zs=require("@radix-ui/react-portal"),Gs=require("@radix-ui/react-visually-hidden"),qs=require("@telegraph/button"),Ys=require("@telegraph/helpers"),q=require("@telegraph/layout"),Xs=require("lucide-react");function ge(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=ge($s),v=ge(T),Zs=ge(Us),Js=ge(zs),Qs=ge(Gs);function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Nt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bn(...e){return t=>{let n=!1;const s=e.map(i=>{const r=Nt(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Nt(e[i],null)}}}}function vn(...e){return v.useCallback(bn(...e),e)}function ei(e){const t=ti(e),n=v.forwardRef((s,i)=>{const{children:r,...o}=s,a=v.Children.toArray(r),l=a.find(si);if(l){const u=l.props.children,c=a.map(f=>f===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return A.jsx(t,{...o,ref:i,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return A.jsx(t,{...o,ref:i,children:r})});return n.displayName=`${e}.Slot`,n}function ti(e){const t=v.forwardRef((n,s)=>{const{children:i,...r}=n;if(v.isValidElement(i)){const o=ri(i),a=ii(r,i.props);return i.type!==v.Fragment&&(a.ref=s?bn(s,o):o),v.cloneElement(i,a)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ni=Symbol("radix.slottable");function si(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ni}function ii(e,t){const n={...t};for(const s in t){const i=e[s],r=t[s];/^on[A-Z]/.test(s)?i&&r?n[s]=(...a)=>{const l=r(...a);return i(...a),l}:i&&(n[s]=i):s==="style"?n[s]={...i,...r}:s==="className"&&(n[s]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function ri(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var oi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tn=oi.reduce((e,t)=>{const n=ei(`Primitive.${t}`),s=v.forwardRef((i,r)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(l,{...a,ref:r})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function ai(e,t){e&&Zs.flushSync(()=>e.dispatchEvent(t))}function lt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function ci(e,t=globalThis==null?void 0:globalThis.document){const n=lt(e);v.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var ui="DismissableLayer",$e="dismissableLayer.update",li="dismissableLayer.pointerDownOutside",fi="dismissableLayer.focusOutside",Bt,wn=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:r,onInteractOutside:o,onDismiss:a,...l}=e,u=v.useContext(wn),[c,f]=v.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=vn(t,V=>f(V)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(w),C=c?y.indexOf(c):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=p,x=pi(V=>{const S=V.target,F=[...u.branches].some(R=>R.contains(S));!P||F||(i==null||i(V),o==null||o(V),V.defaultPrevented||a==null||a())},d),M=mi(V=>{const S=V.target;[...u.branches].some(R=>R.contains(S))||(r==null||r(V),o==null||o(V),V.defaultPrevented||a==null||a())},d);return ci(V=>{C===u.layers.size-1&&(s==null||s(V),!V.defaultPrevented&&a&&(V.preventDefault(),a()))},d),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Bt=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),jt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Bt)}},[c,d,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),jt())},[c,u]),v.useEffect(()=>{const V=()=>h({});return document.addEventListener($e,V),()=>document.removeEventListener($e,V)},[]),A.jsx(Tn.div,{...l,ref:g,style:{pointerEvents:m?P?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,x.onPointerDownCapture)})});xn.displayName=ui;var di="DismissableLayerBranch",hi=v.forwardRef((e,t)=>{const n=v.useContext(wn),s=v.useRef(null),i=vn(t,s);return v.useEffect(()=>{const r=s.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),A.jsx(Tn.div,{...e,ref:i})});hi.displayName=di;function pi(e,t=globalThis==null?void 0:globalThis.document){const n=lt(e),s=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const r=a=>{if(a.target&&!s.current){let l=function(){Sn(li,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function mi(e,t=globalThis==null?void 0:globalThis.document){const n=lt(e),s=v.useRef(!1);return v.useEffect(()=>{const i=r=>{r.target&&!s.current&&Sn(fi,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function jt(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Sn(e,t,n,{discrete:s}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?ai(i,r):i.dispatchEvent(r)}var gi=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},yi=v[" useInsertionEffect ".trim().toString()]||gi;function bi({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,r,o]=vi({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const f=c.current;f!==a&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,s])}const u=v.useCallback(c=>{var f;if(a){const d=Ti(c)?c(e):c;d!==e&&((f=o.current)==null||f.call(o,d))}else r(c)},[a,e,r,o]);return[l,u]}function vi({defaultProp:e,onChange:t}){const[n,s]=v.useState(e),i=v.useRef(n),r=v.useRef(t);return yi(()=>{r.current=t},[t]),v.useEffect(()=>{var o;i.current!==n&&((o=r.current)==null||o.call(r,n),i.current=n)},[n,i]),[n,s,r]}function Ti(e){return typeof e=="function"}const wi=T.createContext({});function xi(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const ft=typeof window<"u",Si=ft?T.useLayoutEffect:T.useEffect,Vn=T.createContext(null);function Vi(e,t){e.indexOf(t)===-1&&e.push(t)}function Ci(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Y=(e,t,n)=>n>t?t:n<e?e:n;function Ue(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ye=()=>{},X=()=>{};process.env.NODE_ENV!=="production"&&(ye=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ue(t,n))},X=(e,t,n)=>{if(!e)throw new Error(Ue(t,n))});const K={},Cn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ai(e){return typeof e=="object"&&e!==null}const An=e=>/^0[^.\s]+$/u.test(e);function dt(e){let t;return()=>(t===void 0&&(t=e()),t)}const re=e=>e,Mi=(e,t)=>n=>t(e(n)),De=(...e)=>e.reduce(Mi),Mn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Pn{constructor(){this.subscriptions=[]}add(t){return Vi(this.subscriptions,t),()=>Ci(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const B=e=>e*1e3,j=e=>e/1e3;function En(e,t){return t?e*(1e3/t):0}const Kt=new Set;function Dn(e,t,n){e||Kt.has(t)||(console.warn(Ue(t,n)),Kt.add(t))}const Fn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pi=1e-7,Ei=12;function Di(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=Fn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Pi&&++a<Ei);return o}function be(e,t,n,s){if(e===t&&n===s)return re;const i=r=>Di(r,0,1,e,n);return r=>r===0||r===1?r:Fn(i(r),t,s)}const On=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rn=e=>t=>1-e(1-t),Ln=be(.33,1.53,.69,.99),ht=Rn(Ln),In=On(ht),kn=e=>(e*=2)<1?.5*ht(e):.5*(2-Math.pow(2,-10*(e-1))),pt=e=>1-Math.sin(Math.acos(e)),Fi=Rn(pt),Nn=On(pt),Oi=be(.42,0,1,1),Ri=be(0,0,.58,1),Bn=be(.42,0,.58,1),Li=e=>Array.isArray(e)&&typeof e[0]!="number",jn=e=>Array.isArray(e)&&typeof e[0]=="number",Wt={linear:re,easeIn:Oi,easeInOut:Bn,easeOut:Ri,circIn:pt,circInOut:Nn,circOut:Fi,backIn:ht,backInOut:In,backOut:Ln,anticipate:kn},Ii=e=>typeof e=="string",_t=e=>{if(jn(e)){X(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return be(t,n,s,i)}else if(Ii(e))return X(Wt[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Wt[e];return e},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ki(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const g=d&&i?n:s;return f&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Ni=40;function Kn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Te.reduce((m,P)=>(m[P]=ki(r),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:h,postRender:g}=o,y=()=>{const m=K.useManualTiming?i.timestamp:performance.now();n=!1,K.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Ni),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),h.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},w=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:Te.reduce((m,P)=>{const x=o[P];return m[P]=(M,V=!1,S=!1)=>(n||w(),x.schedule(M,V,S)),m},{}),cancel:m=>{for(let P=0;P<Te.length;P++)o[Te[P]].cancel(m)},state:i,steps:o}}const{schedule:N,cancel:He,state:Ve}=Kn(typeof requestAnimationFrame<"u"?requestAnimationFrame:re,!0);let xe;function Bi(){xe=void 0}const k={now:()=>(xe===void 0&&k.set(Ve.isProcessing||K.useManualTiming?Ve.timestamp:performance.now()),xe),set:e=>{xe=e,queueMicrotask(Bi)}},Wn=e=>t=>typeof t=="string"&&t.startsWith(e),_n=Wn("--"),ji=Wn("var(--"),mt=e=>ji(e)?Ki.test(e.split("/*")[0].trim()):!1,Ki=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,oe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},he={...oe,transform:e=>Y(0,1,e)},we={...oe,default:1},de=e=>Math.round(e*1e5)/1e5,gt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Wi(e){return e==null}const _i=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yt=(e,t)=>n=>!!(typeof n=="string"&&_i.test(n)&&n.startsWith(e)||t&&!Wi(n)&&Object.prototype.hasOwnProperty.call(n,t)),$n=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(gt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$i=e=>Y(0,255,e),ke={...oe,transform:e=>Math.round($i(e))},U={test:yt("rgb","red"),parse:$n("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ke.transform(e)+", "+ke.transform(t)+", "+ke.transform(n)+", "+de(he.transform(s))+")"};function Ui(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ze={test:yt("#"),parse:Ui,transform:U.transform},ve=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),W=ve("deg"),ne=ve("%"),b=ve("px"),Hi=ve("vh"),zi=ve("vw"),$t={...ne,parse:e=>ne.parse(e)/100,transform:e=>ne.transform(e*100)},Q={test:yt("hsl","hue"),parse:$n("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ne.transform(de(t))+", "+ne.transform(de(n))+", "+de(he.transform(s))+")"},D={test:e=>U.test(e)||ze.test(e)||Q.test(e),parse:e=>U.test(e)?U.parse(e):Q.test(e)?Q.parse(e):ze.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?U.transform(e):Q.transform(e),getAnimatableNone:e=>{const t=D.parse(e);return t.alpha=0,D.transform(t)}},Gi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qi(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gt))==null?void 0:t.length)||0)+(((n=e.match(Gi))==null?void 0:n.length)||0)>0}const Un="number",Hn="color",Yi="var",Xi="var(",Ut="${}",Zi=/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 pe(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(Zi,l=>(D.test(l)?(s.color.push(r),i.push(Hn),n.push(D.parse(l))):l.startsWith(Xi)?(s.var.push(r),i.push(Yi),n.push(l)):(s.number.push(r),i.push(Un),n.push(parseFloat(l))),++r,Ut)).split(Ut);return{values:n,split:a,indexes:s,types:i}}function zn(e){return pe(e).values}function Gn(e){const{split:t,types:n}=pe(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=n[o];a===Un?r+=de(i[o]):a===Hn?r+=D.transform(i[o]):r+=i[o]}return r}}const Ji=e=>typeof e=="number"?0:D.test(e)?D.getAnimatableNone(e):e;function Qi(e){const t=zn(e);return Gn(e)(t.map(Ji))}const ae={test:qi,parse:zn,createTransformer:Gn,getAnimatableNone:Qi};function Ne(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function er({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ne(l,a,e+1/3),r=Ne(l,a,e),o=Ne(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Ce(e,t){return n=>n>0?t:e}const Fe=(e,t,n)=>e+(t-e)*n,Be=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},tr=[ze,U,Q],nr=e=>tr.find(t=>t.test(e));function Ht(e){const t=nr(e);if(ye(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Q&&(n=er(n)),n}const zt=(e,t)=>{const n=Ht(e),s=Ht(t);if(!n||!s)return Ce(e,t);const i={...n};return r=>(i.red=Be(n.red,s.red,r),i.green=Be(n.green,s.green,r),i.blue=Be(n.blue,s.blue,r),i.alpha=Fe(n.alpha,s.alpha,r),U.transform(i))},Ge=new Set(["none","hidden"]);function sr(e,t){return Ge.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ir(e,t){return n=>Fe(e,t,n)}function bt(e){return typeof e=="number"?ir:typeof e=="string"?mt(e)?Ce:D.test(e)?zt:ar:Array.isArray(e)?qn:typeof e=="object"?D.test(e)?zt:rr:Ce}function qn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>bt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function rr(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=bt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function or(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],a=e.values[o]??0;n[i]=a,s[r]++}return n}const ar=(e,t)=>{const n=ae.createTransformer(t),s=pe(e),i=pe(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Ge.has(e)&&!i.values.length||Ge.has(t)&&!s.values.length?sr(e,t):De(qn(or(s,i),i.values),n):(ye(!0,`Complex values '${e}' and '${t}' 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.`,"complex-values-different"),Ce(e,t))};function Yn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Fe(e,t,n):bt(e)(e,t)}const cr=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>N.update(t,n),stop:()=>He(t),now:()=>Ve.isProcessing?Ve.timestamp:k.now()}},Xn=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ae=2e4;function vt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ae;)t+=n,s=e.next(t);return t>=Ae?1/0:t}function ur(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(vt(s),Ae);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:j(i)}}const lr=5;function Zn(e,t,n){const s=Math.max(t-lr,0);return En(n-e(s),t-s)}const E={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},je=.001;function fr({duration:e=E.duration,bounce:t=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r;ye(e<=B(E.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Y(E.minDamping,E.maxDamping,o),e=Y(E.minDuration,E.maxDuration,j(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,h=qe(u,o),g=Math.exp(-f);return je-d/h*g},r=u=>{const f=u*o*e,d=f*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),y=qe(Math.pow(u,2),o);return(-i(u)+je>0?-1:1)*((d-h)*g)/y}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-je+c*f},r=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=hr(i,r,a);if(e=B(e),isNaN(l))return{stiffness:E.stiffness,damping:E.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const dr=12;function hr(e,t,n){let s=n;for(let i=1;i<dr;i++)s=s-e(s)/t(s);return s}function qe(e,t){return e*Math.sqrt(1-t*t)}const pr=["duration","bounce"],mr=["stiffness","damping","mass"];function Gt(e,t){return t.some(n=>e[n]!==void 0)}function gr(e){let t={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...e};if(!Gt(e,mr)&&Gt(e,pr))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Y(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:E.mass,stiffness:i,damping:r}}else{const n=fr(e);t={...t,...n,mass:E.mass},t.isResolvedFromDuration=!0}return t}function Me(e=E.visualDuration,t=E.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=gr({...n,velocity:-j(n.velocity||0)}),g=d||0,y=u/(2*Math.sqrt(l*c)),w=o-r,p=j(Math.sqrt(l/c)),C=Math.abs(w)<5;s||(s=C?E.restSpeed.granular:E.restSpeed.default),i||(i=C?E.restDelta.granular:E.restDelta.default);let m;if(y<1){const x=qe(p,y);m=M=>{const V=Math.exp(-y*p*M);return o-V*((g+y*p*w)/x*Math.sin(x*M)+w*Math.cos(x*M))}}else if(y===1)m=x=>o-Math.exp(-p*x)*(w+(g+p*w)*x);else{const x=p*Math.sqrt(y*y-1);m=M=>{const V=Math.exp(-y*p*M),S=Math.min(x*M,300);return o-V*((g+y*p*w)*Math.sinh(S)+x*w*Math.cosh(S))/x}}const P={calculatedDuration:h&&f||null,next:x=>{const M=m(x);if(h)a.done=x>=f;else{let V=x===0?g:0;y<1&&(V=x===0?B(g):Zn(m,x,M));const S=Math.abs(V)<=s,F=Math.abs(o-M)<=i;a.done=S&&F}return a.value=a.done?o:M,a},toString:()=>{const x=Math.min(vt(P),Ae),M=Xn(V=>P.next(x*V).value,x,30);return x+"ms "+M},toTransition:()=>{}};return P}Me.applyToOptions=e=>{const t=ur(e,100,Me);return e.ease=t.ease,e.duration=B(t.duration),e.type="keyframes",e};function Ye({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=S=>a!==void 0&&S<a||l!==void 0&&S>l,g=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let y=n*t;const w=f+y,p=o===void 0?w:o(w);p!==w&&(y=p-f);const C=S=>-y*Math.exp(-S/s),m=S=>p+C(S),P=S=>{const F=C(S),R=m(S);d.done=Math.abs(F)<=u,d.value=d.done?p:R};let x,M;const V=S=>{h(d.value)&&(x=S,M=Me({keyframes:[d.value,g(d.value)],velocity:Zn(m,S,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:S=>{let F=!1;return!M&&x===void 0&&(F=!0,P(S),V(S)),x!==void 0&&S>=x?M.next(S-x):(!F&&P(S),d)}}}function yr(e,t,n){const s=[],i=n||K.mix||Yn,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||re:t;a=De(l,a)}s.push(a)}return s}function br(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(X(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=yr(t,s,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const d=Mn(e[f],e[f+1],c);return a[f](d)};return n?c=>u(Y(e[0],e[r-1],c)):u}function vr(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Mn(0,t,s);e.push(Fe(n,1,i))}}function Tr(e){const t=[0];return vr(t,e.length-1),t}function wr(e,t){return e.map(n=>n*t)}function xr(e,t){return e.map(()=>t||Bn).splice(0,e.length-1)}function ee({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Li(s)?s.map(_t):_t(s),r={done:!1,value:t[0]},o=wr(n&&n.length===t.length?n:Tr(t),e),a=br(o,t,{ease:Array.isArray(i)?i:xr(t,i)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const Sr=e=>e!==null;function Tt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Sr),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Vr={decay:Ye,inertia:Ye,tween:ee,keyframes:ee,spring:Me};function Jn(e){typeof e.type=="string"&&(e.type=Vr[e.type])}class wt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Cr=e=>e/100;class xt extends wt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Jn(t);const{type:n=ee,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||ee;process.env.NODE_ENV!=="production"&&l!==ee&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ee&&typeof a[0]!="number"&&(this.mixKeyframes=De(Cr,Yn(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=vt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:h,type:g,onUpdate:y,finalKeyframe:w}=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)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,P=s;if(f){const S=Math.min(this.currentTime,i)/a;let F=Math.floor(S),R=S%1;!R&&S>=1&&(R=1),R===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(d==="reverse"?(R=1-R,h&&(R-=h/a)):d==="mirror"&&(P=o)),m=Y(0,1,R)*a}const x=C?{done:!1,value:c[0]}:P.next(m);r&&(x.value=r(x.value));let{done:M}=x;!C&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return V&&g!==Ye&&(x.value=Tt(c,this.options,w,this.speed)),y&&y(x.value),V&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return j(this.calculatedDuration)}get time(){return j(this.currentTime)}set time(t){var n;t=B(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(k.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=j(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=cr,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Ar(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const H=e=>e*180/Math.PI,Xe=e=>{const t=H(Math.atan2(e[1],e[0]));return Ze(t)},Mr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xe,rotateZ:Xe,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ze=e=>(e=e%360,e<0&&(e+=360),e),qt=Xe,Yt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xt=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Pr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yt,scaleY:Xt,scale:e=>(Yt(e)+Xt(e))/2,rotateX:e=>Ze(H(Math.atan2(e[6],e[5]))),rotateY:e=>Ze(H(Math.atan2(-e[2],e[0]))),rotateZ:qt,rotate:qt,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Je(e){return e.includes("scale")?1:0}function Qe(e,t){if(!e||e==="none")return Je(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Pr,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Mr,i=a}if(!i)return Je(t);const r=s[t],o=i[1].split(",").map(Dr);return typeof r=="function"?r(o):o[r]}const Er=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qe(n,t)};function Dr(e){return parseFloat(e.trim())}const ce=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ue=new Set(ce),Zt=e=>e===oe||e===b,Fr=new Set(["x","y","z"]),Or=ce.filter(e=>!Fr.has(e));function Rr(e){const t=[];return Or.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const z={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qe(t,"x"),y:(e,{transform:t})=>Qe(t,"y")};z.translateX=z.x;z.translateY=z.y;const G=new Set;let et=!1,tt=!1,nt=!1;function Qn(){if(tt){const e=Array.from(G).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Rr(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}tt=!1,et=!1,G.forEach(e=>e.complete(nt)),G.clear()}function es(){G.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tt=!0)})}function Lr(){nt=!0,es(),Qn(),nt=!1}class St{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(G.add(this),et||(et=!0,N.read(es),N.resolveKeyframes(Qn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}Ar(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),G.delete(this)}cancel(){this.state==="scheduled"&&(G.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ir=e=>e.startsWith("--");function kr(e,t,n){Ir(t)?e.style.setProperty(t,n):e.style[t]=n}const Nr=dt(()=>window.ScrollTimeline!==void 0),Br={};function jr(e,t){const n=dt(e);return()=>Br[t]??n()}const ts=jr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fe=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Jt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fe([0,.65,.55,1]),circOut:fe([.55,0,1,.45]),backIn:fe([.31,.01,.66,-.59]),backOut:fe([.33,1.53,.69,.99])};function ns(e,t){if(e)return typeof e=="function"?ts()?Xn(e,t):"ease-out":jn(e)?fe(e):Array.isArray(e)?e.map(n=>ns(n,t)||Jt.easeOut):Jt[e]}function Kr(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=ns(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}function ss(e){return typeof e=="function"&&"applyToOptions"in e}function Wr({type:e,...t}){return ss(e)&&ts()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class _r extends wt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,X(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Wr(t);this.animation=Kr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=Tt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):kr(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return j(Number(t))}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=B(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Nr()?(this.animation.timeline=t,re):n(this)}}const is={anticipate:kn,backInOut:In,circInOut:Nn};function $r(e){return e in is}function Ur(e){typeof e.ease=="string"&&$r(e.ease)&&(e.ease=is[e.ease])}const Qt=10;class Hr extends _r{constructor(t){Ur(t),Jn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new xt({...o,autoplay:!1}),l=B(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Qt).value,a.sample(l).value,Qt),a.stop()}}const en=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ae.test(e)||e==="0")&&!e.startsWith("url("));function zr(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Gr(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=en(i,t),a=en(r,t);return ye(o===a,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:zr(e)||(n==="spring"||ss(n))&&s}function st(e){e.duration=0,e.type}const qr=new Set(["opacity","clipPath","filter","transform"]),Yr=dt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xr(e){var c;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Yr()&&n&&qr.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Zr=40;class Jr extends wt{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){var g;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=k.now();const d={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...f},h=(c==null?void 0:c.KeyframeResolver)||St;this.keyframeResolver=new h(a,(y,w,p)=>this.onKeyframesResolved(y,w,d,!p),l,u,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=k.now(),Gr(t,r,o,a)||((K.instantAnimations||!l)&&(c==null||c(Tt(t,s,n))),t[0]=t[t.length-1],st(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Zr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!u&&Xr(d)?new Hr({...d,element:d.motionValue.owner.current}):new xt(d);h.finished.then(()=>this.notifyFinished()).catch(re),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Lr()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Qr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eo(e){const t=Qr.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const to=4;function rs(e,t,n=1){X(n<=to,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=eo(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return Cn(o)?parseFloat(o):o}return mt(i)?rs(i,t,n+1):i}function os(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const as=new Set(["width","height","top","left","right","bottom",...ce]),no={test:e=>e==="auto",parse:e=>e},cs=e=>t=>t.test(e),us=[oe,b,ne,W,zi,Hi,no],tn=e=>us.find(cs(e));function so(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||An(e):!0}const io=new Set(["brightness","contrast","saturate","opacity"]);function ro(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(gt)||[];if(!s)return e;const i=n.replace(s,"");let r=io.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const oo=/\b([a-z-]*)\(.*?\)/gu,it={...ae,getAnimatableNone:e=>{const t=e.match(oo);return t?t.map(ro).join(" "):e}},nn={...oe,transform:Math.round},ao={rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:we,scaleX:we,scaleY:we,scaleZ:we,skew:W,skewX:W,skewY:W,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:he,originX:$t,originY:$t,originZ:b},Vt={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,backgroundPositionX:b,backgroundPositionY:b,...ao,zIndex:nn,fillOpacity:he,strokeOpacity:he,numOctaves:nn},co={...Vt,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:it,WebkitFilter:it},ls=e=>co[e];function fs(e,t){let n=ls(e);return n!==it&&(n=ae),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uo=new Set(["auto","none","0"]);function lo(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!uo.has(r)&&pe(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=fs(n,i)}class fo extends St{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),mt(u))){const c=rs(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!as.has(s)||t.length!==2)return;const[i,r]=t,o=tn(i),a=tn(r);if(o!==a)if(Zt(o)&&Zt(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else z[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||so(t[i]))&&s.push(i);s.length&&lo(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=z[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=z[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function ho(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=(n==null?void 0:n[e])??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ds=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function po(e){return Ai(e)&&"offsetHeight"in e}const sn=30,mo=e=>!isNaN(parseFloat(e));class go{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=k.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=k.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mo(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Dn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pn);const s=this.events[t].add(n);return t==="change"?()=>{s(),N.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>sn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,sn);return En(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pe(e,t){return new go(e,t)}const{schedule:yo}=Kn(queueMicrotask,!1),bo={y:!1};function vo(){return bo.y}function hs(e,t){const n=ho(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function rn(e){return!(e.pointerType==="touch"||vo())}function To(e,t,n={}){const[s,i,r]=hs(e,n),o=a=>{if(!rn(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{rn(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const ps=(e,t)=>t?e===t?!0:ps(e,t.parentElement):!1,wo=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function So(e){return xo.has(e.tagName)||e.tabIndex!==-1}const Se=new WeakSet;function on(e){return t=>{t.key==="Enter"&&e(t)}}function Ke(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Vo=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=on(()=>{if(Se.has(n))return;Ke(n,"down");const i=on(()=>{Ke(n,"up")}),r=()=>Ke(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function an(e){return wo(e)&&!0}function Co(e,t,n={}){const[s,i,r]=hs(e,n),o=a=>{const l=a.currentTarget;if(!an(a))return;Se.add(l);const u=t(l,a),c=(h,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Se.has(l)&&Se.delete(l),an(h)&&typeof u=="function"&&u(h,{success:g})},f=h=>{c(h,l===window||l===document||n.useGlobalTarget||ps(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),po(a)&&(a.addEventListener("focus",u=>Vo(u,i)),!So(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const L=e=>!!(e&&e.getVelocity),Ao=[...us,D,ae],Mo=e=>Ao.find(cs(e)),ms=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ct=T.createContext({strict:!1}),cn={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"]},ie={};for(const e in cn)ie[e]={isEnabled:t=>cn[e].some(n=>!!t[n])};function un(e){for(const t in e)ie[t]={...ie[t],...e[t]}}function Po({children:e,features:t,strict:n=!1}){const[,s]=T.useState(!We(t)),i=T.useRef(void 0);if(!We(t)){const{renderer:r,...o}=t;i.current=r,un(o)}return T.useEffect(()=>{We(t)&&t().then(({renderer:r,...o})=>{un(o),i.current=r,s(!0)})},[]),A.jsx(Ct.Provider,{value:{renderer:i.current,strict:n},children:e})}function We(e){return typeof e=="function"}const Eo=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 Ee(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Eo.has(e)}let gs=e=>!Ee(e);function Do(e){typeof e=="function"&&(gs=t=>t.startsWith("on")?!Ee(t):e(t))}try{Do(require("@emotion/is-prop-valid").default)}catch{}function Fo(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(gs(i)||n===!0&&Ee(i)||!t&&!Ee(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Oe=T.createContext({});function Re(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function me(e){return typeof e=="string"||Array.isArray(e)}const At=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mt=["initial",...At];function Le(e){return Re(e.animate)||Mt.some(t=>me(e[t]))}function ys(e){return!!(Le(e)||e.variants)}function Oo(e,t){if(Le(e)){const{initial:n,animate:s}=e;return{initial:n===!1||me(n)?n:void 0,animate:me(s)?s:void 0}}return e.inherit!==!1?t:{}}function Ro(e){const{initial:t,animate:n}=Oo(e,T.useContext(Oe));return T.useMemo(()=>({initial:t,animate:n}),[ln(t),ln(n)])}function ln(e){return Array.isArray(e)?e.join(" "):e}const Lo={};function bs(e,{layout:t,layoutId:n}){return ue.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Lo[e]||e==="opacity")}const Io={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ko=ce.length;function No(e,t,n){let s="",i=!0;for(let r=0;r<ko;r++){const o=ce[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ds(a,Vt[o]);if(!l){i=!1;const c=Io[o]||o;s+=`${c}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Pt(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ue.has(l)){o=!0;continue}else if(_n(l)){i[l]=u;continue}else{const c=ds(u,Vt[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(t.transform||(o||n?s.transform=No(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Et=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vs(e,t,n){for(const s in t)!L(t[s])&&!bs(s,n)&&(e[s]=t[s])}function Bo({transformTemplate:e},t){return T.useMemo(()=>{const n=Et();return Pt(n,t,e),Object.assign({},n.vars,n.style)},[t])}function jo(e,t){const n=e.style||{},s={};return vs(s,n,e),Object.assign(s,Bo(e,t)),s}function Ko(e,t){const n={},s=jo(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const Wo={offset:"stroke-dashoffset",array:"stroke-dasharray"},_o={offset:"strokeDashoffset",array:"strokeDasharray"};function $o(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?Wo:_o;e[r.offset]=b.transform(-s);const o=b.transform(t),a=b.transform(n);e[r.array]=`${o} ${a}`}function Ts(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Pt(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&$o(f,i,r,o,!1)}const ws=()=>({...Et(),attrs:{}}),xs=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Uo(e,t,n,s){const i=T.useMemo(()=>{const r=ws();return Ts(r,t,xs(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};vs(r,e.style,e),i.style={...r,...i.style}}return i}const Ho=["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 Dt(e){return typeof e!="string"||e.includes("-")?!1:!!(Ho.indexOf(e)>-1||/[A-Z]/u.test(e))}function zo(e,t,n,{latestValues:s},i,r=!1){const a=(Dt(e)?Uo:Ko)(t,s,i,e),l=Fo(t,typeof e=="string",r),u=e!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=t,f=T.useMemo(()=>L(c)?c.get():c,[c]);return T.createElement(e,{...u,children:f})}function fn(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Ft(e,t,n,s){if(typeof t=="function"){const[i,r]=fn(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=fn(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function Go(e){return L(e)?e.get():e}function qo({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:Yo(n,s,i,e),renderState:t()}}function Yo(e,t,n,s){const i={},r=s(e,{});for(const d in r)i[d]=Go(r[d]);let{initial:o,animate:a}=e;const l=Le(e),u=ys(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!Re(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const g=Ft(e,d[h]);if(g){const{transitionEnd:y,transition:w,...p}=g;for(const C in p){let m=p[C];if(Array.isArray(m)){const P=c?m.length-1:0;m=m[P]}m!==null&&(i[C]=m)}for(const C in y)i[C]=y[C]}}}return i}const Ss=e=>(t,n)=>{const s=T.useContext(Oe),i=T.useContext(Vn),r=()=>qo(e,t,s,i);return n?r():xi(r)};function Ot(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(L(s[o])||t.style&&L(t.style[o])||bs(o,e)||((r=n==null?void 0:n.getValue(o))==null?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const Xo=Ss({scrapeMotionValuesFromProps:Ot,createRenderState:Et});function Vs(e,t,n){const s=Ot(e,t,n);for(const i in e)if(L(e[i])||L(t[i])){const r=ce.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const Zo=Ss({scrapeMotionValuesFromProps:Vs,createRenderState:ws}),Jo=Symbol.for("motionComponentSymbol");function Cs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Qo(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Cs(n)&&(n.current=s))},[t])}const Rt=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ea="framerAppearId",As="data-"+Rt(ea),ta=T.createContext({});function na(e,t,n,s,i){var y,w;const{visualElement:r}=T.useContext(Oe),o=T.useContext(Ct),a=T.useContext(Vn),l=T.useContext(ms).reducedMotion,u=T.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=T.useContext(ta);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&sa(u.current,n,i,f);const d=T.useRef(!1);T.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const h=n[As],g=T.useRef(!!h&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Si(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),g.current=!1),c.enteringChildren=void 0)}),c}function sa(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ms(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Cs(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Ms(e){if(e)return e.options.allowProjection!==!1?e.projection:Ms(e.parent)}function ia(e,{forwardMotionProps:t=!1}={},n,s){const i=Dt(e)?Zo:Xo;function r(a,l){let u;const c={...T.useContext(ms),...a,layoutId:ra(a)},{isStatic:f}=c,d=Ro(a),h=i(a,f);if(!f&&ft){oa(c,n);const g=aa(c);u=g.MeasureLayout,d.visualElement=na(e,h,c,s,g.ProjectionNode)}return A.jsxs(Oe.Provider,{value:d,children:[u&&d.visualElement?A.jsx(u,{visualElement:d.visualElement,...c}):null,zo(e,a,Qo(h,d.visualElement,l),h,f,t)]})}r.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=T.forwardRef(r);return o[Jo]=e,o}function ra({layoutId:e}){const t=T.useContext(wi).id;return t&&e!==void 0?t+"-"+e:e}function oa(e,t){T.useContext(Ct).strict,process.env.NODE_ENV}function aa(e){const{drag:t,layout:n}=ie;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ca({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function ua(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function la(e,t){return ca(ua(e.getBoundingClientRect(),t))}const dn=()=>({min:0,max:0}),Ps=()=>({x:dn(),y:dn()}),rt={current:null},Es={current:!1};function fa(){if(Es.current=!0,!!ft)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rt.current=e.matches;e.addEventListener("change",t),t()}else rt.current=!1}const da=new WeakMap;function ha(e,t,n){for(const s in t){const i=t[s],r=n[s];if(L(i))e.addValue(s,i);else if(L(r))e.addValue(s,Pe(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,Pe(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const hn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pa{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=St,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 d=k.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,N.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Le(n),this.isVariantNode=ys(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&L(h)&&h.set(l[d])}}mount(t){var n;this.current=t,da.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((s,i)=>this.bindToMotionValue(i,s)),Es.current||fa(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rt.current,process.env.NODE_ENV!=="production"&&Dn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),He(this.notifyUpdate),He(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=ue.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&N.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ie){const n=ie[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ps()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<hn.length;s++){const i=hn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=ha(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Cn(s)||An(s))?s=parseFloat(s):!Mo(s)&&ae.test(n)&&(s=fs(t,n)),this.setBaseTarget(t,L(s)?s.get():s)),L(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Ft(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!L(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){yo.render(this.render)}}class Ds extends pa{constructor(){super(...arguments),this.KeyframeResolver=fo}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;L(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Fs(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ma(e){return window.getComputedStyle(e)}class ga extends Ds{constructor(){super(...arguments),this.type="html",this.renderInstance=Fs}readValueFromInstance(t,n){var s;if(ue.has(n))return(s=this.projection)!=null&&s.isProjecting?Je(n):Er(t,n);{const i=ma(t),r=(_n(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return la(t,n)}build(t,n,s){Pt(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Ot(t,n,s)}}const Os=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"]);function ya(e,t,n,s){Fs(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Os.has(i)?i:Rt(i),t.attrs[i])}class ba extends Ds{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ps}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ue.has(n)){const s=ls(n);return s&&s.default||0}return n=Os.has(n)?n:Rt(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Vs(t,n,s)}build(t,n,s){Ts(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){ya(t,n,s,i)}mount(t){this.isSVGTag=xs(t.tagName),super.mount(t)}}const va=(e,t)=>Dt(e)?new ba(t):new ga(t,{allowProjection:e!==T.Fragment});function se(e,t,n){const s=e.getProps();return Ft(s,t,n!==void 0?n:s.custom,e)}const ot=e=>Array.isArray(e);function Ta(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function wa(e){return ot(e)?e[e.length-1]||0:e}function xa(e,t){const n=se(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=wa(r[o]);Ta(e,o,a)}}function Sa(e){return!!(L(e)&&e.add)}function Va(e,t){const n=e.getValue("willChange");if(Sa(n))return n.add(t);if(!n&&K.WillChange){const s=new K.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Ca(e){return e.props[As]}const Aa=e=>e!==null;function Ma(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Aa),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const Pa={type:"spring",stiffness:500,damping:25,restSpeed:10},Ea=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Da={type:"keyframes",duration:.8},Fa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Oa=(e,{keyframes:t})=>t.length>2?Da:ue.has(e)?e.startsWith("scale")?Ea(t[1]):Pa:Fa;function Ra({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const La=(e,t,n,s={},i,r)=>o=>{const a=os(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-B(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:i};Ra(a)||Object.assign(c,Oa(e,c)),c.duration&&(c.duration=B(c.duration)),c.repeatDelay&&(c.repeatDelay=B(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(st(c),c.delay===0&&(f=!0)),(K.instantAnimations||K.skipAnimations)&&(f=!0,st(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!r&&t.get()!==void 0){const d=Ma(c.keyframes,a);if(d!==void 0){N.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new xt(c):new Jr(c)};function Ia({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Rs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(r=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c,e.latestValues[c]??null),d=a[c];if(d===void 0||u&&Ia(u,c))continue;const h={delay:n,...os(r||{},c)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!h.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const p=Ca(e);if(p){const C=window.MotionHandoffAnimation(p,c,N);C!==null&&(h.startTime=C,y=!0)}}Va(e,c),f.start(La(c,f,d,e.shouldReduceMotion&&as.has(c)?{type:!1}:h,e,y));const w=f.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{N.update(()=>{o&&xa(e,o)})}),l}function Ls(e,t,n,s=0,i=1){const r=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function at(e,t,n={}){var l;const s=se(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Rs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return ka(e,t,u,c,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function ka(e,t,n=0,s=0,i=0,r=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(at(l,t,{...o,delay:n+(typeof s=="function"?0:s)+Ls(e.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Na(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>at(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=at(e,t,n);else{const i=typeof t=="function"?se(e,t,n.custom):t;s=Promise.all(Rs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Is(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Ba=Mt.length;function ks(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ks(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ba;n++){const s=Mt[n],i=e.props[s];(me(i)||i===!1)&&(t[s]=i)}return t}const ja=[...At].reverse(),Ka=At.length;function Wa(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Na(e,n,s)))}function _a(e){let t=Wa(e),n=pn(),s=!0;const i=l=>(u,c)=>{var d;const f=se(e,c,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:g,...y}=f;u={...u,...y,...g}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=ks(e.parent)||{},f=[],d=new Set;let h={},g=1/0;for(let w=0;w<Ka;w++){const p=ja[w],C=n[p],m=u[p]!==void 0?u[p]:c[p],P=me(m),x=p===l?C.isActive:null;x===!1&&(g=w);let M=m===c[p]&&m!==u[p]&&P;if(M&&s&&e.manuallyAnimateOnMount&&(M=!1),C.protectedKeys={...h},!C.isActive&&x===null||!m&&!C.prevProp||Re(m)||typeof m=="boolean")continue;const V=$a(C.prevProp,m);let S=V||p===l&&C.isActive&&!M&&P||w>g&&P,F=!1;const R=Array.isArray(m)?m:[m];let Z=R.reduce(i(p),{});x===!1&&(Z={});const{prevResolvedValues:Lt={}}=C,Ws={...Lt,...Z},It=O=>{S=!0,d.has(O)&&(F=!0,d.delete(O)),C.needsAnimating[O]=!0;const I=e.getValue(O);I&&(I.liveStyle=!1)};for(const O in Ws){const I=Z[O],_=Lt[O];if(h.hasOwnProperty(O))continue;let J=!1;ot(I)&&ot(_)?J=!Is(I,_):J=I!==_,J?I!=null?It(O):d.add(O):I!==void 0&&d.has(O)?It(O):C.protectedKeys[O]=!0}C.prevProp=m,C.prevResolvedValues=Z,C.isActive&&(h={...h,...Z}),s&&e.blockInitialAnimation&&(S=!1);const kt=M&&V;S&&(!kt||F)&&f.push(...R.map(O=>{const I={type:p};if(typeof O=="string"&&s&&!kt&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,J=se(_,O);if(_.enteringChildren&&J){const{delayChildren:_s}=J.transition||{};I.delay=Ls(_.enteringChildren,e,_s)}}return{animation:O,options:I}}))}if(d.size){const w={};if(typeof u.initial!="boolean"){const p=se(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const C=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),w[p]=C??null}),f.push({animation:w})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(f):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=pn(),s=!0}}}function $a(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Is(t,e):!1}function $(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pn(){return{animate:$(!0),whileInView:$(),whileHover:$(),whileTap:$(),whileDrag:$(),whileFocus:$(),exit:$()}}class le{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Ua extends le{constructor(t){super(t),t.animationState||(t.animationState=_a(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Re(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Ha=0;class za extends le{constructor(){super(...arguments),this.id=Ha++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ga={animation:{Feature:Ua},exit:{Feature:za}};function mn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Ns(e){return{point:{x:e.pageX,y:e.pageY}}}function gn(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&N.postRender(()=>r(t,Ns(t)))}class qa extends le{mount(){const{current:t}=this.node;t&&(this.unmount=To(t,(n,s)=>(gn(this.node,s,"Start"),i=>gn(this.node,i,"End"))))}unmount(){}}class Ya extends le{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{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=De(mn(this.node.current,"focus",()=>this.onFocus()),mn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yn(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&N.postRender(()=>r(t,Ns(t)))}class Xa extends le{mount(){const{current:t}=this.node;t&&(this.unmount=Co(t,(n,s)=>(yn(this.node,s,"Start"),(i,{success:r})=>yn(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ct=new WeakMap,_e=new WeakMap,Za=e=>{const t=ct.get(e.target);t&&t(e)},Ja=e=>{e.forEach(Za)};function Qa({root:e,...t}){const n=e||document;_e.has(n)||_e.set(n,{});const s=_e.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(Ja,{root:e,...t})),s[i]}function ec(e,t,n){const s=Qa(t);return ct.set(e,n),s.observe(e),()=>{ct.delete(e),s.unobserve(e)}}const tc={some:0,all:1};class nc extends le{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:tc[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return ec(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(sc(t,n))&&this.startObserver()}unmount(){}}function sc({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ic={inView:{Feature:nc},tap:{Feature:Xa},focus:{Feature:Ya},hover:{Feature:qa}},rc={renderer:va,...Ga,...ic};function oc(e,t){return ia(e,t)}const ut=oc("div"),Bs=T.createContext({layers:[],setLayers:()=>{},addLayer:()=>{},removeLayer:()=>{},removeTopLayer:()=>{}}),ac=({children:e})=>{const[t,n]=T.useState([]),s=o=>{n(a=>[...a,o])},i=o=>{n(t.filter(a=>a!==o))},r=()=>{const o=t[t.length-1];o&&i(o)};return A.jsx(Bs.Provider,{value:{layers:t,setLayers:n,addLayer:s,removeLayer:i,removeTopLayer:r},children:e})},js=()=>T.useContext(Bs),cc=({defaultOpen:e,open:t,onOpenChange:n,...s})=>{const[i,r]=bi({prop:t,onChange:n,defaultProp:e??!1}),o=js(),a=s.a11yTitle;if(T.useEffect(()=>{!i&&o.layers.includes(a)&&o.removeLayer(a)},[a,o,i]),!!i)return A.jsx(uc,{open:i,onOpenChange:r,...s})},uc=({open:e,onOpenChange:t,a11yTitle:n,a11yDescription:s,children:i,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,...l})=>{var y,w;const u=n,c=js();T.useEffect(()=>{!c||!e||c.layers.includes(u)||c.addLayer(u)},[u,c,e]);const f=((y=c.layers)==null?void 0:y.indexOf(u))||0,d=((w=c.layers)==null?void 0:w.length)||0,h=f!==0,g=u===c.layers[c.layers.length-1];return A.jsx(Po,{features:rc,children:A.jsx(xn,{onEscapeKeyDown:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},onPointerDownOutside:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},children:A.jsxs(te.Root,{open:e,onOpenChange:p=>{var m;if(((m=c==null?void 0:c.layers)==null?void 0:m.length)>0)return p===!1&&u===c.layers[c.layers.length-1]?(c.removeLayer(u),t(!1)):void 0;t(p)},children:[A.jsxs(Qs.Root,{children:[A.jsx(te.Title,{children:n}),s&&A.jsx(te.Description,{children:s})]}),e&&A.jsx(Js.Root,{className:"tgph",children:A.jsx(lc,{layer:f,children:A.jsx(Hs.FocusScope,{trapped:typeof r=="boolean"?r:g,onMountAutoFocus:o,onUnmountAutoFocus:a,asChild:!0,children:A.jsx(Ys.RefToTgphRef,{children:A.jsx(q.Stack,{as:ut,initial:{top:`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${d-1})`},animate:{top:h?`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${f} )`:"var(--tgph-spacing-16)"},exit:{top:0},transition:{type:"spring",duration:.3,bounce:0},w:"full",justify:"center",style:{position:"fixed",left:0,maxHeight:"calc(100vh - var(--tgph-spacing-32))",maxWidth:"calc(100vw - var(--tgph-spacing-8))",zIndex:`calc(var(--tgph-zIndex-modal) + ${f})`},children:A.jsx(q.Stack,{direction:"column",as:ut,animate:{scale:1.02-Math.abs(d-f)*.02,transformOrigin:"center center"},transition:{duration:.2,bounce:0,type:"spring"},maxW:l.maxW??"160",w:l.w??"full",bg:"surface-1",border:"px",borderColor:"gray-8",rounded:"4",shadow:"3",...l,children:i},`content-${u}`)},`container-${u}`)})})})})]},u)})})},lc=({layer:e,children:t})=>e>0?t:A.jsxs(te.Overlay,{children:[A.jsx(q.Box,{as:ut,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,bounce:0,type:"spring"},bg:"alpha-black-6",w:"full",h:"full",zIndex:"overlay",style:{position:"fixed",cursor:"pointer",inset:"0px"}}),t]}),fc=T.forwardRef(({children:e,...t},n)=>A.jsx(te.Content,{ref:n,asChild:!0,...t,children:A.jsx(q.Stack,{direction:"column",h:"full",...t,children:e})})),dc=({size:e="1",variant:t="ghost",...n})=>A.jsx(te.Close,{asChild:!0,children:A.jsx(qs.Button,{icon:{icon:Xs.X,alt:"Close Modal"},variant:t,size:e,...n})}),hc=({style:e,children:t,...n})=>A.jsx(q.Stack,{direction:"column",px:"6",py:"4",style:{overflowY:"auto",...e},...n,children:t}),pc=({children:e,...t})=>A.jsx(q.Stack,{direction:"row",justify:"space-between",align:"center",px:"6",py:"4",borderBottom:"px",...t,children:e}),mc=({children:e,...t})=>A.jsx(q.Stack,{direction:"row",align:"center",justify:"flex-end",gap:"2",px:"6",py:"4",borderTop:"px",...t,children:e}),Ks={};Object.assign(Ks,{Root:cc,Content:fc,Close:dc,Body:hc,Header:pc,Footer:mc});exports.Modal=Ks;exports.ModalStackingProvider=ac;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),$s=require("@radix-ui/react-dialog"),T=require("react"),Us=require("react-dom"),Hs=require("@radix-ui/react-focus-scope"),zs=require("@radix-ui/react-portal"),Gs=require("@radix-ui/react-visually-hidden"),qs=require("@telegraph/button"),Ys=require("@telegraph/helpers"),q=require("@telegraph/layout"),Xs=require("@telegraph/typography"),Zs=require("lucide-react");function ge(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=ge($s),v=ge(T),Js=ge(Us),Qs=ge(zs),ei=ge(Gs);function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Nt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bn(...e){return t=>{let n=!1;const s=e.map(i=>{const r=Nt(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():Nt(e[i],null)}}}}function vn(...e){return v.useCallback(bn(...e),e)}function ti(e){const t=ni(e),n=v.forwardRef((s,i)=>{const{children:r,...o}=s,a=v.Children.toArray(r),l=a.find(ii);if(l){const u=l.props.children,c=a.map(f=>f===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return A.jsx(t,{...o,ref:i,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return A.jsx(t,{...o,ref:i,children:r})});return n.displayName=`${e}.Slot`,n}function ni(e){const t=v.forwardRef((n,s)=>{const{children:i,...r}=n;if(v.isValidElement(i)){const o=oi(i),a=ri(r,i.props);return i.type!==v.Fragment&&(a.ref=s?bn(s,o):o),v.cloneElement(i,a)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var si=Symbol("radix.slottable");function ii(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===si}function ri(e,t){const n={...t};for(const s in t){const i=e[s],r=t[s];/^on[A-Z]/.test(s)?i&&r?n[s]=(...a)=>{const l=r(...a);return i(...a),l}:i&&(n[s]=i):s==="style"?n[s]={...i,...r}:s==="className"&&(n[s]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function oi(e){var s,i;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ai=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tn=ai.reduce((e,t)=>{const n=ti(`Primitive.${t}`),s=v.forwardRef((i,r)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(l,{...a,ref:r})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function ci(e,t){e&&Js.flushSync(()=>e.dispatchEvent(t))}function lt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function ui(e,t=globalThis==null?void 0:globalThis.document){const n=lt(e);v.useEffect(()=>{const s=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var li="DismissableLayer",$e="dismissableLayer.update",fi="dismissableLayer.pointerDownOutside",di="dismissableLayer.focusOutside",Bt,wn=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xn=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:r,onInteractOutside:o,onDismiss:a,...l}=e,u=v.useContext(wn),[c,f]=v.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=vn(t,V=>f(V)),y=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(w),C=c?y.indexOf(c):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,P=C>=p,x=mi(V=>{const S=V.target,F=[...u.branches].some(R=>R.contains(S));!P||F||(i==null||i(V),o==null||o(V),V.defaultPrevented||a==null||a())},d),M=gi(V=>{const S=V.target;[...u.branches].some(R=>R.contains(S))||(r==null||r(V),o==null||o(V),V.defaultPrevented||a==null||a())},d);return ui(V=>{C===u.layers.size-1&&(s==null||s(V),!V.defaultPrevented&&a&&(V.preventDefault(),a()))},d),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Bt=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),jt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Bt)}},[c,d,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),jt())},[c,u]),v.useEffect(()=>{const V=()=>h({});return document.addEventListener($e,V),()=>document.removeEventListener($e,V)},[]),A.jsx(Tn.div,{...l,ref:g,style:{pointerEvents:m?P?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,x.onPointerDownCapture)})});xn.displayName=li;var hi="DismissableLayerBranch",pi=v.forwardRef((e,t)=>{const n=v.useContext(wn),s=v.useRef(null),i=vn(t,s);return v.useEffect(()=>{const r=s.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),A.jsx(Tn.div,{...e,ref:i})});pi.displayName=hi;function mi(e,t=globalThis==null?void 0:globalThis.document){const n=lt(e),s=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const r=a=>{if(a.target&&!s.current){let l=function(){Sn(fi,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function gi(e,t=globalThis==null?void 0:globalThis.document){const n=lt(e),s=v.useRef(!1);return v.useEffect(()=>{const i=r=>{r.target&&!s.current&&Sn(di,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function jt(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Sn(e,t,n,{discrete:s}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),s?ci(i,r):i.dispatchEvent(r)}var yi=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},bi=v[" useInsertionEffect ".trim().toString()]||yi;function vi({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[i,r,o]=Ti({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const f=c.current;f!==a&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,s])}const u=v.useCallback(c=>{var f;if(a){const d=wi(c)?c(e):c;d!==e&&((f=o.current)==null||f.call(o,d))}else r(c)},[a,e,r,o]);return[l,u]}function Ti({defaultProp:e,onChange:t}){const[n,s]=v.useState(e),i=v.useRef(n),r=v.useRef(t);return bi(()=>{r.current=t},[t]),v.useEffect(()=>{var o;i.current!==n&&((o=r.current)==null||o.call(r,n),i.current=n)},[n,i]),[n,s,r]}function wi(e){return typeof e=="function"}const xi=T.createContext({});function Si(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const ft=typeof window<"u",Vi=ft?T.useLayoutEffect:T.useEffect,Vn=T.createContext(null);function Ci(e,t){e.indexOf(t)===-1&&e.push(t)}function Ai(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Y=(e,t,n)=>n>t?t:n<e?e:n;function Ue(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ye=()=>{},X=()=>{};process.env.NODE_ENV!=="production"&&(ye=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ue(t,n))},X=(e,t,n)=>{if(!e)throw new Error(Ue(t,n))});const K={},Cn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Mi(e){return typeof e=="object"&&e!==null}const An=e=>/^0[^.\s]+$/u.test(e);function dt(e){let t;return()=>(t===void 0&&(t=e()),t)}const re=e=>e,Pi=(e,t)=>n=>t(e(n)),De=(...e)=>e.reduce(Pi),Mn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Pn{constructor(){this.subscriptions=[]}add(t){return Ci(this.subscriptions,t),()=>Ai(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const B=e=>e*1e3,j=e=>e/1e3;function En(e,t){return t?e*(1e3/t):0}const Kt=new Set;function Dn(e,t,n){e||Kt.has(t)||(console.warn(Ue(t,n)),Kt.add(t))}const Fn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ei=1e-7,Di=12;function Fi(e,t,n,s,i){let r,o,a=0;do o=t+(n-t)/2,r=Fn(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Ei&&++a<Di);return o}function be(e,t,n,s){if(e===t&&n===s)return re;const i=r=>Fi(r,0,1,e,n);return r=>r===0||r===1?r:Fn(i(r),t,s)}const On=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rn=e=>t=>1-e(1-t),Ln=be(.33,1.53,.69,.99),ht=Rn(Ln),In=On(ht),kn=e=>(e*=2)<1?.5*ht(e):.5*(2-Math.pow(2,-10*(e-1))),pt=e=>1-Math.sin(Math.acos(e)),Oi=Rn(pt),Nn=On(pt),Ri=be(.42,0,1,1),Li=be(0,0,.58,1),Bn=be(.42,0,.58,1),Ii=e=>Array.isArray(e)&&typeof e[0]!="number",jn=e=>Array.isArray(e)&&typeof e[0]=="number",Wt={linear:re,easeIn:Ri,easeInOut:Bn,easeOut:Li,circIn:pt,circInOut:Nn,circOut:Oi,backIn:ht,backInOut:In,backOut:Ln,anticipate:kn},ki=e=>typeof e=="string",_t=e=>{if(jn(e)){X(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return be(t,n,s,i)}else if(ki(e))return X(Wt[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Wt[e];return e},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ni(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const g=d&&i?n:s;return f&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const Bi=40;function Kn(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Te.reduce((m,P)=>(m[P]=Ni(r),m),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:h,postRender:g}=o,y=()=>{const m=K.useManualTiming?i.timestamp:performance.now();n=!1,K.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(m-i.timestamp,Bi),1)),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),h.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},w=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:Te.reduce((m,P)=>{const x=o[P];return m[P]=(M,V=!1,S=!1)=>(n||w(),x.schedule(M,V,S)),m},{}),cancel:m=>{for(let P=0;P<Te.length;P++)o[Te[P]].cancel(m)},state:i,steps:o}}const{schedule:N,cancel:He,state:Ve}=Kn(typeof requestAnimationFrame<"u"?requestAnimationFrame:re,!0);let xe;function ji(){xe=void 0}const k={now:()=>(xe===void 0&&k.set(Ve.isProcessing||K.useManualTiming?Ve.timestamp:performance.now()),xe),set:e=>{xe=e,queueMicrotask(ji)}},Wn=e=>t=>typeof t=="string"&&t.startsWith(e),_n=Wn("--"),Ki=Wn("var(--"),mt=e=>Ki(e)?Wi.test(e.split("/*")[0].trim()):!1,Wi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,oe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},he={...oe,transform:e=>Y(0,1,e)},we={...oe,default:1},de=e=>Math.round(e*1e5)/1e5,gt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _i(e){return e==null}const $i=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yt=(e,t)=>n=>!!(typeof n=="string"&&$i.test(n)&&n.startsWith(e)||t&&!_i(n)&&Object.prototype.hasOwnProperty.call(n,t)),$n=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(gt);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ui=e=>Y(0,255,e),ke={...oe,transform:e=>Math.round(Ui(e))},U={test:yt("rgb","red"),parse:$n("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ke.transform(e)+", "+ke.transform(t)+", "+ke.transform(n)+", "+de(he.transform(s))+")"};function Hi(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ze={test:yt("#"),parse:Hi,transform:U.transform},ve=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),W=ve("deg"),ne=ve("%"),b=ve("px"),zi=ve("vh"),Gi=ve("vw"),$t={...ne,parse:e=>ne.parse(e)/100,transform:e=>ne.transform(e*100)},Q={test:yt("hsl","hue"),parse:$n("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ne.transform(de(t))+", "+ne.transform(de(n))+", "+de(he.transform(s))+")"},D={test:e=>U.test(e)||ze.test(e)||Q.test(e),parse:e=>U.test(e)?U.parse(e):Q.test(e)?Q.parse(e):ze.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?U.transform(e):Q.transform(e),getAnimatableNone:e=>{const t=D.parse(e);return t.alpha=0,D.transform(t)}},qi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yi(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gt))==null?void 0:t.length)||0)+(((n=e.match(qi))==null?void 0:n.length)||0)>0}const Un="number",Hn="color",Xi="var",Zi="var(",Ut="${}",Ji=/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 pe(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(Ji,l=>(D.test(l)?(s.color.push(r),i.push(Hn),n.push(D.parse(l))):l.startsWith(Zi)?(s.var.push(r),i.push(Xi),n.push(l)):(s.number.push(r),i.push(Un),n.push(parseFloat(l))),++r,Ut)).split(Ut);return{values:n,split:a,indexes:s,types:i}}function zn(e){return pe(e).values}function Gn(e){const{split:t,types:n}=pe(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=n[o];a===Un?r+=de(i[o]):a===Hn?r+=D.transform(i[o]):r+=i[o]}return r}}const Qi=e=>typeof e=="number"?0:D.test(e)?D.getAnimatableNone(e):e;function er(e){const t=zn(e);return Gn(e)(t.map(Qi))}const ae={test:Yi,parse:zn,createTransformer:Gn,getAnimatableNone:er};function Ne(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tr({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Ne(l,a,e+1/3),r=Ne(l,a,e),o=Ne(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Ce(e,t){return n=>n>0?t:e}const Fe=(e,t,n)=>e+(t-e)*n,Be=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},nr=[ze,U,Q],sr=e=>nr.find(t=>t.test(e));function Ht(e){const t=sr(e);if(ye(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Q&&(n=tr(n)),n}const zt=(e,t)=>{const n=Ht(e),s=Ht(t);if(!n||!s)return Ce(e,t);const i={...n};return r=>(i.red=Be(n.red,s.red,r),i.green=Be(n.green,s.green,r),i.blue=Be(n.blue,s.blue,r),i.alpha=Fe(n.alpha,s.alpha,r),U.transform(i))},Ge=new Set(["none","hidden"]);function ir(e,t){return Ge.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rr(e,t){return n=>Fe(e,t,n)}function bt(e){return typeof e=="number"?rr:typeof e=="string"?mt(e)?Ce:D.test(e)?zt:cr:Array.isArray(e)?qn:typeof e=="object"?D.test(e)?zt:or:Ce}function qn(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>bt(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function or(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=bt(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function ar(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],a=e.values[o]??0;n[i]=a,s[r]++}return n}const cr=(e,t)=>{const n=ae.createTransformer(t),s=pe(e),i=pe(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Ge.has(e)&&!i.values.length||Ge.has(t)&&!s.values.length?ir(e,t):De(qn(ar(s,i),i.values),n):(ye(!0,`Complex values '${e}' and '${t}' 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.`,"complex-values-different"),Ce(e,t))};function Yn(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Fe(e,t,n):bt(e)(e,t)}const ur=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>N.update(t,n),stop:()=>He(t),now:()=>Ve.isProcessing?Ve.timestamp:k.now()}},Xn=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ae=2e4;function vt(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ae;)t+=n,s=e.next(t);return t>=Ae?1/0:t}function lr(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(vt(s),Ae);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:j(i)}}const fr=5;function Zn(e,t,n){const s=Math.max(t-fr,0);return En(n-e(s),t-s)}const E={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},je=.001;function dr({duration:e=E.duration,bounce:t=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r;ye(e<=B(E.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Y(E.minDamping,E.maxDamping,o),e=Y(E.minDuration,E.maxDuration,j(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,h=qe(u,o),g=Math.exp(-f);return je-d/h*g},r=u=>{const f=u*o*e,d=f*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),y=qe(Math.pow(u,2),o);return(-i(u)+je>0?-1:1)*((d-h)*g)/y}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-je+c*f},r=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=pr(i,r,a);if(e=B(e),isNaN(l))return{stiffness:E.stiffness,damping:E.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const hr=12;function pr(e,t,n){let s=n;for(let i=1;i<hr;i++)s=s-e(s)/t(s);return s}function qe(e,t){return e*Math.sqrt(1-t*t)}const mr=["duration","bounce"],gr=["stiffness","damping","mass"];function Gt(e,t){return t.some(n=>e[n]!==void 0)}function yr(e){let t={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...e};if(!Gt(e,gr)&&Gt(e,mr))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Y(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:E.mass,stiffness:i,damping:r}}else{const n=dr(e);t={...t,...n,mass:E.mass},t.isResolvedFromDuration=!0}return t}function Me(e=E.visualDuration,t=E.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=yr({...n,velocity:-j(n.velocity||0)}),g=d||0,y=u/(2*Math.sqrt(l*c)),w=o-r,p=j(Math.sqrt(l/c)),C=Math.abs(w)<5;s||(s=C?E.restSpeed.granular:E.restSpeed.default),i||(i=C?E.restDelta.granular:E.restDelta.default);let m;if(y<1){const x=qe(p,y);m=M=>{const V=Math.exp(-y*p*M);return o-V*((g+y*p*w)/x*Math.sin(x*M)+w*Math.cos(x*M))}}else if(y===1)m=x=>o-Math.exp(-p*x)*(w+(g+p*w)*x);else{const x=p*Math.sqrt(y*y-1);m=M=>{const V=Math.exp(-y*p*M),S=Math.min(x*M,300);return o-V*((g+y*p*w)*Math.sinh(S)+x*w*Math.cosh(S))/x}}const P={calculatedDuration:h&&f||null,next:x=>{const M=m(x);if(h)a.done=x>=f;else{let V=x===0?g:0;y<1&&(V=x===0?B(g):Zn(m,x,M));const S=Math.abs(V)<=s,F=Math.abs(o-M)<=i;a.done=S&&F}return a.value=a.done?o:M,a},toString:()=>{const x=Math.min(vt(P),Ae),M=Xn(V=>P.next(x*V).value,x,30);return x+"ms "+M},toTransition:()=>{}};return P}Me.applyToOptions=e=>{const t=lr(e,100,Me);return e.ease=t.ease,e.duration=B(t.duration),e.type="keyframes",e};function Ye({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=S=>a!==void 0&&S<a||l!==void 0&&S>l,g=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let y=n*t;const w=f+y,p=o===void 0?w:o(w);p!==w&&(y=p-f);const C=S=>-y*Math.exp(-S/s),m=S=>p+C(S),P=S=>{const F=C(S),R=m(S);d.done=Math.abs(F)<=u,d.value=d.done?p:R};let x,M;const V=S=>{h(d.value)&&(x=S,M=Me({keyframes:[d.value,g(d.value)],velocity:Zn(m,S,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:S=>{let F=!1;return!M&&x===void 0&&(F=!0,P(S),V(S)),x!==void 0&&S>=x?M.next(S-x):(!F&&P(S),d)}}}function br(e,t,n){const s=[],i=n||K.mix||Yn,r=e.length-1;for(let o=0;o<r;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||re:t;a=De(l,a)}s.push(a)}return s}function vr(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(X(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=br(t,s,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const d=Mn(e[f],e[f+1],c);return a[f](d)};return n?c=>u(Y(e[0],e[r-1],c)):u}function Tr(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Mn(0,t,s);e.push(Fe(n,1,i))}}function wr(e){const t=[0];return Tr(t,e.length-1),t}function xr(e,t){return e.map(n=>n*t)}function Sr(e,t){return e.map(()=>t||Bn).splice(0,e.length-1)}function ee({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Ii(s)?s.map(_t):_t(s),r={done:!1,value:t[0]},o=xr(n&&n.length===t.length?n:wr(t),e),a=vr(o,t,{ease:Array.isArray(i)?i:Sr(t,i)});return{calculatedDuration:e,next:l=>(r.value=a(l),r.done=l>=e,r)}}const Vr=e=>e!==null;function Tt(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(Vr),a=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Cr={decay:Ye,inertia:Ye,tween:ee,keyframes:ee,spring:Me};function Jn(e){typeof e.type=="string"&&(e.type=Cr[e.type])}class wt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Ar=e=>e/100;class xt extends wt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==k.now()&&this.tick(k.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Jn(t);const{type:n=ee,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const l=n||ee;process.env.NODE_ENV!=="production"&&l!==ee&&X(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ee&&typeof a[0]!="number"&&(this.mixKeyframes=De(Ar,Yn(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=vt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:h,type:g,onUpdate:y,finalKeyframe:w}=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)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,P=s;if(f){const S=Math.min(this.currentTime,i)/a;let F=Math.floor(S),R=S%1;!R&&S>=1&&(R=1),R===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(d==="reverse"?(R=1-R,h&&(R-=h/a)):d==="mirror"&&(P=o)),m=Y(0,1,R)*a}const x=C?{done:!1,value:c[0]}:P.next(m);r&&(x.value=r(x.value));let{done:M}=x;!C&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return V&&g!==Ye&&(x.value=Tt(c,this.options,w,this.speed)),y&&y(x.value),V&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return j(this.calculatedDuration)}get time(){return j(this.currentTime)}set time(t){var n;t=B(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(k.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=j(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:t=ur,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(k.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Mr(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const H=e=>e*180/Math.PI,Xe=e=>{const t=H(Math.atan2(e[1],e[0]));return Ze(t)},Pr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xe,rotateZ:Xe,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ze=e=>(e=e%360,e<0&&(e+=360),e),qt=Xe,Yt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xt=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Er={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yt,scaleY:Xt,scale:e=>(Yt(e)+Xt(e))/2,rotateX:e=>Ze(H(Math.atan2(e[6],e[5]))),rotateY:e=>Ze(H(Math.atan2(-e[2],e[0]))),rotateZ:qt,rotate:qt,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Je(e){return e.includes("scale")?1:0}function Qe(e,t){if(!e||e==="none")return Je(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Er,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Pr,i=a}if(!i)return Je(t);const r=s[t],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const Dr=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qe(n,t)};function Fr(e){return parseFloat(e.trim())}const ce=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ue=new Set(ce),Zt=e=>e===oe||e===b,Or=new Set(["x","y","z"]),Rr=ce.filter(e=>!Or.has(e));function Lr(e){const t=[];return Rr.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const z={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qe(t,"x"),y:(e,{transform:t})=>Qe(t,"y")};z.translateX=z.x;z.translateY=z.y;const G=new Set;let et=!1,tt=!1,nt=!1;function Qn(){if(tt){const e=Array.from(G).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Lr(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}tt=!1,et=!1,G.forEach(e=>e.complete(nt)),G.clear()}function es(){G.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tt=!0)})}function Ir(){nt=!0,es(),Qn(),nt=!1}class St{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(G.add(this),et||(et=!0,N.read(es),N.resolveKeyframes(Qn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i==null?void 0:i.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}Mr(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),G.delete(this)}cancel(){this.state==="scheduled"&&(G.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kr=e=>e.startsWith("--");function Nr(e,t,n){kr(t)?e.style.setProperty(t,n):e.style[t]=n}const Br=dt(()=>window.ScrollTimeline!==void 0),jr={};function Kr(e,t){const n=dt(e);return()=>jr[t]??n()}const ts=Kr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fe=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Jt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fe([0,.65,.55,1]),circOut:fe([.55,0,1,.45]),backIn:fe([.31,.01,.66,-.59]),backOut:fe([.33,1.53,.69,.99])};function ns(e,t){if(e)return typeof e=="function"?ts()?Xn(e,t):"ease-out":jn(e)?fe(e):Array.isArray(e)?e.map(n=>ns(n,t)||Jt.easeOut):Jt[e]}function Wr(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=ns(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}function ss(e){return typeof e=="function"&&"applyToOptions"in e}function _r({type:e,...t}){return ss(e)&&ts()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class $r extends wt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,X(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=_r(t);this.animation=Wr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=Tt(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Nr(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return j(Number(t))}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=B(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Br()?(this.animation.timeline=t,re):n(this)}}const is={anticipate:kn,backInOut:In,circInOut:Nn};function Ur(e){return e in is}function Hr(e){typeof e.ease=="string"&&Ur(e.ease)&&(e.ease=is[e.ease])}const Qt=10;class zr extends $r{constructor(t){Hr(t),Jn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new xt({...o,autoplay:!1}),l=B(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Qt).value,a.sample(l).value,Qt),a.stop()}}const en=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ae.test(e)||e==="0")&&!e.startsWith("url("));function Gr(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function qr(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=en(i,t),a=en(r,t);return ye(o===a,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Gr(e)||(n==="spring"||ss(n))&&s}function st(e){e.duration=0,e.type}const Yr=new Set(["opacity","clipPath","filter","transform"]),Xr=dt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zr(e){var c;const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Xr()&&n&&Yr.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Jr=40;class Qr extends wt{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){var g;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=k.now();const d={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...f},h=(c==null?void 0:c.KeyframeResolver)||St;this.keyframeResolver=new h(a,(y,w,p)=>this.onKeyframesResolved(y,w,d,!p),l,u,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=k.now(),qr(t,r,o,a)||((K.instantAnimations||!l)&&(c==null||c(Tt(t,s,n))),t[0]=t[t.length-1],st(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},h=!u&&Zr(d)?new zr({...d,element:d.motionValue.owner.current}):new xt(d);h.finished.then(()=>this.notifyFinished()).catch(re),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ir()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const eo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function to(e){const t=eo.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const no=4;function rs(e,t,n=1){X(n<=no,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=to(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return Cn(o)?parseFloat(o):o}return mt(i)?rs(i,t,n+1):i}function os(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const as=new Set(["width","height","top","left","right","bottom",...ce]),so={test:e=>e==="auto",parse:e=>e},cs=e=>t=>t.test(e),us=[oe,b,ne,W,Gi,zi,so],tn=e=>us.find(cs(e));function io(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||An(e):!0}const ro=new Set(["brightness","contrast","saturate","opacity"]);function oo(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(gt)||[];if(!s)return e;const i=n.replace(s,"");let r=ro.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const ao=/\b([a-z-]*)\(.*?\)/gu,it={...ae,getAnimatableNone:e=>{const t=e.match(ao);return t?t.map(oo).join(" "):e}},nn={...oe,transform:Math.round},co={rotate:W,rotateX:W,rotateY:W,rotateZ:W,scale:we,scaleX:we,scaleY:we,scaleZ:we,skew:W,skewX:W,skewY:W,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:he,originX:$t,originY:$t,originZ:b},Vt={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,backgroundPositionX:b,backgroundPositionY:b,...co,zIndex:nn,fillOpacity:he,strokeOpacity:he,numOctaves:nn},uo={...Vt,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:it,WebkitFilter:it},ls=e=>uo[e];function fs(e,t){let n=ls(e);return n!==it&&(n=ae),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lo=new Set(["auto","none","0"]);function fo(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!lo.has(r)&&pe(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=fs(n,i)}class ho extends St{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),mt(u))){const c=rs(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!as.has(s)||t.length!==2)return;const[i,r]=t,o=tn(i),a=tn(r);if(o!==a)if(Zt(o)&&Zt(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else z[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||io(t[i]))&&s.push(i);s.length&&fo(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=z[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=z[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function po(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=(n==null?void 0:n[e])??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ds=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mo(e){return Mi(e)&&"offsetHeight"in e}const sn=30,go=e=>!isNaN(parseFloat(e));class yo{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=k.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=k.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=go(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Dn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pn);const s=this.events[t].add(n);return t==="change"?()=>{s(),N.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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=k.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>sn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,sn);return En(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pe(e,t){return new yo(e,t)}const{schedule:bo}=Kn(queueMicrotask,!1),vo={y:!1};function To(){return vo.y}function hs(e,t){const n=po(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function rn(e){return!(e.pointerType==="touch"||To())}function wo(e,t,n={}){const[s,i,r]=hs(e,n),o=a=>{if(!rn(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{rn(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const ps=(e,t)=>t?e===t?!0:ps(e,t.parentElement):!1,xo=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,So=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vo(e){return So.has(e.tagName)||e.tabIndex!==-1}const Se=new WeakSet;function on(e){return t=>{t.key==="Enter"&&e(t)}}function Ke(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Co=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=on(()=>{if(Se.has(n))return;Ke(n,"down");const i=on(()=>{Ke(n,"up")}),r=()=>Ke(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function an(e){return xo(e)&&!0}function Ao(e,t,n={}){const[s,i,r]=hs(e,n),o=a=>{const l=a.currentTarget;if(!an(a))return;Se.add(l);const u=t(l,a),c=(h,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Se.has(l)&&Se.delete(l),an(h)&&typeof u=="function"&&u(h,{success:g})},f=h=>{c(h,l===window||l===document||n.useGlobalTarget||ps(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),mo(a)&&(a.addEventListener("focus",u=>Co(u,i)),!Vo(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}const L=e=>!!(e&&e.getVelocity),Mo=[...us,D,ae],Po=e=>Mo.find(cs(e)),ms=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ct=T.createContext({strict:!1}),cn={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"]},ie={};for(const e in cn)ie[e]={isEnabled:t=>cn[e].some(n=>!!t[n])};function un(e){for(const t in e)ie[t]={...ie[t],...e[t]}}function Eo({children:e,features:t,strict:n=!1}){const[,s]=T.useState(!We(t)),i=T.useRef(void 0);if(!We(t)){const{renderer:r,...o}=t;i.current=r,un(o)}return T.useEffect(()=>{We(t)&&t().then(({renderer:r,...o})=>{un(o),i.current=r,s(!0)})},[]),A.jsx(Ct.Provider,{value:{renderer:i.current,strict:n},children:e})}function We(e){return typeof e=="function"}const Do=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 Ee(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Do.has(e)}let gs=e=>!Ee(e);function Fo(e){typeof e=="function"&&(gs=t=>t.startsWith("on")?!Ee(t):e(t))}try{Fo(require("@emotion/is-prop-valid").default)}catch{}function Oo(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(gs(i)||n===!0&&Ee(i)||!t&&!Ee(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Oe=T.createContext({});function Re(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function me(e){return typeof e=="string"||Array.isArray(e)}const At=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mt=["initial",...At];function Le(e){return Re(e.animate)||Mt.some(t=>me(e[t]))}function ys(e){return!!(Le(e)||e.variants)}function Ro(e,t){if(Le(e)){const{initial:n,animate:s}=e;return{initial:n===!1||me(n)?n:void 0,animate:me(s)?s:void 0}}return e.inherit!==!1?t:{}}function Lo(e){const{initial:t,animate:n}=Ro(e,T.useContext(Oe));return T.useMemo(()=>({initial:t,animate:n}),[ln(t),ln(n)])}function ln(e){return Array.isArray(e)?e.join(" "):e}const Io={};function bs(e,{layout:t,layoutId:n}){return ue.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Io[e]||e==="opacity")}const ko={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},No=ce.length;function Bo(e,t,n){let s="",i=!0;for(let r=0;r<No;r++){const o=ce[r],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=ds(a,Vt[o]);if(!l){i=!1;const c=ko[o]||o;s+=`${c}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Pt(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ue.has(l)){o=!0;continue}else if(_n(l)){i[l]=u;continue}else{const c=ds(u,Vt[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(t.transform||(o||n?s.transform=Bo(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Et=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vs(e,t,n){for(const s in t)!L(t[s])&&!bs(s,n)&&(e[s]=t[s])}function jo({transformTemplate:e},t){return T.useMemo(()=>{const n=Et();return Pt(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ko(e,t){const n=e.style||{},s={};return vs(s,n,e),Object.assign(s,jo(e,t)),s}function Wo(e,t){const n={},s=Ko(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const _o={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function Uo(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?_o:$o;e[r.offset]=b.transform(-s);const o=b.transform(t),a=b.transform(n);e[r.array]=`${o} ${a}`}function Ts(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(Pt(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&Uo(f,i,r,o,!1)}const ws=()=>({...Et(),attrs:{}}),xs=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ho(e,t,n,s){const i=T.useMemo(()=>{const r=ws();return Ts(r,t,xs(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};vs(r,e.style,e),i.style={...r,...i.style}}return i}const zo=["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 Dt(e){return typeof e!="string"||e.includes("-")?!1:!!(zo.indexOf(e)>-1||/[A-Z]/u.test(e))}function Go(e,t,n,{latestValues:s},i,r=!1){const a=(Dt(e)?Ho:Wo)(t,s,i,e),l=Oo(t,typeof e=="string",r),u=e!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=t,f=T.useMemo(()=>L(c)?c.get():c,[c]);return T.createElement(e,{...u,children:f})}function fn(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Ft(e,t,n,s){if(typeof t=="function"){const[i,r]=fn(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=fn(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function qo(e){return L(e)?e.get():e}function Yo({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:Xo(n,s,i,e),renderState:t()}}function Xo(e,t,n,s){const i={},r=s(e,{});for(const d in r)i[d]=qo(r[d]);let{initial:o,animate:a}=e;const l=Le(e),u=ys(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!Re(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const g=Ft(e,d[h]);if(g){const{transitionEnd:y,transition:w,...p}=g;for(const C in p){let m=p[C];if(Array.isArray(m)){const P=c?m.length-1:0;m=m[P]}m!==null&&(i[C]=m)}for(const C in y)i[C]=y[C]}}}return i}const Ss=e=>(t,n)=>{const s=T.useContext(Oe),i=T.useContext(Vn),r=()=>Yo(e,t,s,i);return n?r():Si(r)};function Ot(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(L(s[o])||t.style&&L(t.style[o])||bs(o,e)||((r=n==null?void 0:n.getValue(o))==null?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const Zo=Ss({scrapeMotionValuesFromProps:Ot,createRenderState:Et});function Vs(e,t,n){const s=Ot(e,t,n);for(const i in e)if(L(e[i])||L(t[i])){const r=ce.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}const Jo=Ss({scrapeMotionValuesFromProps:Vs,createRenderState:ws}),Qo=Symbol.for("motionComponentSymbol");function Cs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ea(e,t,n){return T.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Cs(n)&&(n.current=s))},[t])}const Rt=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ta="framerAppearId",As="data-"+Rt(ta),na=T.createContext({});function sa(e,t,n,s,i){var y,w;const{visualElement:r}=T.useContext(Oe),o=T.useContext(Ct),a=T.useContext(Vn),l=T.useContext(ms).reducedMotion,u=T.useRef(null);s=s||o.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=T.useContext(na);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&ia(u.current,n,i,f);const d=T.useRef(!1);T.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const h=n[As],g=T.useRef(!!h&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Vi(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),g.current=!1),c.enteringChildren=void 0)}),c}function ia(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ms(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Cs(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Ms(e){if(e)return e.options.allowProjection!==!1?e.projection:Ms(e.parent)}function ra(e,{forwardMotionProps:t=!1}={},n,s){const i=Dt(e)?Jo:Zo;function r(a,l){let u;const c={...T.useContext(ms),...a,layoutId:oa(a)},{isStatic:f}=c,d=Lo(a),h=i(a,f);if(!f&&ft){aa(c,n);const g=ca(c);u=g.MeasureLayout,d.visualElement=sa(e,h,c,s,g.ProjectionNode)}return A.jsxs(Oe.Provider,{value:d,children:[u&&d.visualElement?A.jsx(u,{visualElement:d.visualElement,...c}):null,Go(e,a,ea(h,d.visualElement,l),h,f,t)]})}r.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=T.forwardRef(r);return o[Qo]=e,o}function oa({layoutId:e}){const t=T.useContext(xi).id;return t&&e!==void 0?t+"-"+e:e}function aa(e,t){T.useContext(Ct).strict,process.env.NODE_ENV}function ca(e){const{drag:t,layout:n}=ie;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ua({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function la(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function fa(e,t){return ua(la(e.getBoundingClientRect(),t))}const dn=()=>({min:0,max:0}),Ps=()=>({x:dn(),y:dn()}),rt={current:null},Es={current:!1};function da(){if(Es.current=!0,!!ft)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rt.current=e.matches;e.addEventListener("change",t),t()}else rt.current=!1}const ha=new WeakMap;function pa(e,t,n){for(const s in t){const i=t[s],r=n[s];if(L(i))e.addValue(s,i);else if(L(r))e.addValue(s,Pe(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,Pe(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const hn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ma{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=St,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 d=k.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,N.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Le(n),this.isVariantNode=ys(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&L(h)&&h.set(l[d])}}mount(t){var n;this.current=t,ha.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((s,i)=>this.bindToMotionValue(i,s)),Es.current||da(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rt.current,process.env.NODE_ENV!=="production"&&Dn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),He(this.notifyUpdate),He(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=ue.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&N.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ie){const n=ie[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ps()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<hn.length;s++){const i=hn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=pa(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Cn(s)||An(s))?s=parseFloat(s):!Po(s)&&ae.test(n)&&(s=fs(t,n)),this.setBaseTarget(t,L(s)?s.get():s)),L(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Ft(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!L(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){bo.render(this.render)}}class Ds extends ma{constructor(){super(...arguments),this.KeyframeResolver=ho}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;L(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Fs(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ga(e){return window.getComputedStyle(e)}class ya extends Ds{constructor(){super(...arguments),this.type="html",this.renderInstance=Fs}readValueFromInstance(t,n){var s;if(ue.has(n))return(s=this.projection)!=null&&s.isProjecting?Je(n):Dr(t,n);{const i=ga(t),r=(_n(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return fa(t,n)}build(t,n,s){Pt(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Ot(t,n,s)}}const Os=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"]);function ba(e,t,n,s){Fs(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Os.has(i)?i:Rt(i),t.attrs[i])}class va extends Ds{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ps}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ue.has(n)){const s=ls(n);return s&&s.default||0}return n=Os.has(n)?n:Rt(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Vs(t,n,s)}build(t,n,s){Ts(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){ba(t,n,s,i)}mount(t){this.isSVGTag=xs(t.tagName),super.mount(t)}}const Ta=(e,t)=>Dt(e)?new va(t):new ya(t,{allowProjection:e!==T.Fragment});function se(e,t,n){const s=e.getProps();return Ft(s,t,n!==void 0?n:s.custom,e)}const ot=e=>Array.isArray(e);function wa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function xa(e){return ot(e)?e[e.length-1]||0:e}function Sa(e,t){const n=se(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=xa(r[o]);wa(e,o,a)}}function Va(e){return!!(L(e)&&e.add)}function Ca(e,t){const n=e.getValue("willChange");if(Va(n))return n.add(t);if(!n&&K.WillChange){const s=new K.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Aa(e){return e.props[As]}const Ma=e=>e!==null;function Pa(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Ma),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}const Ea={type:"spring",stiffness:500,damping:25,restSpeed:10},Da=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fa={type:"keyframes",duration:.8},Oa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ra=(e,{keyframes:t})=>t.length>2?Fa:ue.has(e)?e.startsWith("scale")?Da(t[1]):Ea:Oa;function La({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Ia=(e,t,n,s={},i,r)=>o=>{const a=os(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-B(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:i};La(a)||Object.assign(c,Ra(e,c)),c.duration&&(c.duration=B(c.duration)),c.repeatDelay&&(c.repeatDelay=B(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(st(c),c.delay===0&&(f=!0)),(K.instantAnimations||K.skipAnimations)&&(f=!0,st(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!r&&t.get()!==void 0){const d=Pa(c.keyframes,a);if(d!==void 0){N.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new xt(c):new Qr(c)};function ka({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Rs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(r=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c,e.latestValues[c]??null),d=a[c];if(d===void 0||u&&ka(u,c))continue;const h={delay:n,...os(r||{},c)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!h.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const p=Aa(e);if(p){const C=window.MotionHandoffAnimation(p,c,N);C!==null&&(h.startTime=C,y=!0)}}Ca(e,c),f.start(Ia(c,f,d,e.shouldReduceMotion&&as.has(c)?{type:!1}:h,e,y));const w=f.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{N.update(()=>{o&&Sa(e,o)})}),l}function Ls(e,t,n,s=0,i=1){const r=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function at(e,t,n={}){var l;const s=se(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Rs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return Na(e,t,u,c,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Na(e,t,n=0,s=0,i=0,r=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(at(l,t,{...o,delay:n+(typeof s=="function"?0:s)+Ls(e.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Ba(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>at(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=at(e,t,n);else{const i=typeof t=="function"?se(e,t,n.custom):t;s=Promise.all(Rs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function Is(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const ja=Mt.length;function ks(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ks(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ja;n++){const s=Mt[n],i=e.props[s];(me(i)||i===!1)&&(t[s]=i)}return t}const Ka=[...At].reverse(),Wa=At.length;function _a(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Ba(e,n,s)))}function $a(e){let t=_a(e),n=pn(),s=!0;const i=l=>(u,c)=>{var d;const f=se(e,c,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:g,...y}=f;u={...u,...y,...g}}return u};function r(l){t=l(e)}function o(l){const{props:u}=e,c=ks(e.parent)||{},f=[],d=new Set;let h={},g=1/0;for(let w=0;w<Wa;w++){const p=Ka[w],C=n[p],m=u[p]!==void 0?u[p]:c[p],P=me(m),x=p===l?C.isActive:null;x===!1&&(g=w);let M=m===c[p]&&m!==u[p]&&P;if(M&&s&&e.manuallyAnimateOnMount&&(M=!1),C.protectedKeys={...h},!C.isActive&&x===null||!m&&!C.prevProp||Re(m)||typeof m=="boolean")continue;const V=Ua(C.prevProp,m);let S=V||p===l&&C.isActive&&!M&&P||w>g&&P,F=!1;const R=Array.isArray(m)?m:[m];let Z=R.reduce(i(p),{});x===!1&&(Z={});const{prevResolvedValues:Lt={}}=C,Ws={...Lt,...Z},It=O=>{S=!0,d.has(O)&&(F=!0,d.delete(O)),C.needsAnimating[O]=!0;const I=e.getValue(O);I&&(I.liveStyle=!1)};for(const O in Ws){const I=Z[O],_=Lt[O];if(h.hasOwnProperty(O))continue;let J=!1;ot(I)&&ot(_)?J=!Is(I,_):J=I!==_,J?I!=null?It(O):d.add(O):I!==void 0&&d.has(O)?It(O):C.protectedKeys[O]=!0}C.prevProp=m,C.prevResolvedValues=Z,C.isActive&&(h={...h,...Z}),s&&e.blockInitialAnimation&&(S=!1);const kt=M&&V;S&&(!kt||F)&&f.push(...R.map(O=>{const I={type:p};if(typeof O=="string"&&s&&!kt&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,J=se(_,O);if(_.enteringChildren&&J){const{delayChildren:_s}=J.transition||{};I.delay=Ls(_.enteringChildren,e,_s)}}return{animation:O,options:I}}))}if(d.size){const w={};if(typeof u.initial!="boolean"){const p=se(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const C=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),w[p]=C??null}),f.push({animation:w})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(f):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=pn(),s=!0}}}function Ua(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Is(t,e):!1}function $(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pn(){return{animate:$(!0),whileInView:$(),whileHover:$(),whileTap:$(),whileDrag:$(),whileFocus:$(),exit:$()}}class le{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Ha extends le{constructor(t){super(t),t.animationState||(t.animationState=$a(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Re(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let za=0;class Ga extends le{constructor(){super(...arguments),this.id=za++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const qa={animation:{Feature:Ha},exit:{Feature:Ga}};function mn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Ns(e){return{point:{x:e.pageX,y:e.pageY}}}function gn(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&N.postRender(()=>r(t,Ns(t)))}class Ya extends le{mount(){const{current:t}=this.node;t&&(this.unmount=wo(t,(n,s)=>(gn(this.node,s,"Start"),i=>gn(this.node,i,"End"))))}unmount(){}}class Xa extends le{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{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=De(mn(this.node.current,"focus",()=>this.onFocus()),mn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yn(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&N.postRender(()=>r(t,Ns(t)))}class Za extends le{mount(){const{current:t}=this.node;t&&(this.unmount=Ao(t,(n,s)=>(yn(this.node,s,"Start"),(i,{success:r})=>yn(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ct=new WeakMap,_e=new WeakMap,Ja=e=>{const t=ct.get(e.target);t&&t(e)},Qa=e=>{e.forEach(Ja)};function ec({root:e,...t}){const n=e||document;_e.has(n)||_e.set(n,{});const s=_e.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(Qa,{root:e,...t})),s[i]}function tc(e,t,n){const s=ec(t);return ct.set(e,n),s.observe(e),()=>{ct.delete(e),s.unobserve(e)}}const nc={some:0,all:1};class sc extends le{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:nc[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return tc(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ic(t,n))&&this.startObserver()}unmount(){}}function ic({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rc={inView:{Feature:sc},tap:{Feature:Za},focus:{Feature:Xa},hover:{Feature:Ya}},oc={renderer:Ta,...qa,...rc};function ac(e,t){return ra(e,t)}const ut=ac("div"),Bs=T.createContext({layers:[],setLayers:()=>{},addLayer:()=>{},removeLayer:()=>{},removeTopLayer:()=>{}}),cc=({children:e})=>{const[t,n]=T.useState([]),s=o=>{n(a=>[...a,o])},i=o=>{n(t.filter(a=>a!==o))},r=()=>{const o=t[t.length-1];o&&i(o)};return A.jsx(Bs.Provider,{value:{layers:t,setLayers:n,addLayer:s,removeLayer:i,removeTopLayer:r},children:e})},js=()=>T.useContext(Bs),uc=({defaultOpen:e,open:t,onOpenChange:n,...s})=>{const[i,r]=vi({prop:t,onChange:n,defaultProp:e??!1}),o=js(),a=s.a11yTitle;if(T.useEffect(()=>{!i&&o.layers.includes(a)&&o.removeLayer(a)},[a,o,i]),!!i)return A.jsx(lc,{open:i,onOpenChange:r,...s})},lc=({open:e,onOpenChange:t,a11yTitle:n,a11yDescription:s,children:i,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,...l})=>{var y,w;const u=n,c=js();T.useEffect(()=>{!c||!e||c.layers.includes(u)||c.addLayer(u)},[u,c,e]);const f=((y=c.layers)==null?void 0:y.indexOf(u))||0,d=((w=c.layers)==null?void 0:w.length)||0,h=f!==0,g=u===c.layers[c.layers.length-1];return A.jsx(Eo,{features:oc,children:A.jsx(xn,{onEscapeKeyDown:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},onPointerDownOutside:p=>{g&&(p.preventDefault(),c.removeTopLayer(),t(!1))},children:A.jsxs(te.Root,{open:e,onOpenChange:p=>{var m;if(((m=c==null?void 0:c.layers)==null?void 0:m.length)>0)return p===!1&&u===c.layers[c.layers.length-1]?(c.removeLayer(u),t(!1)):void 0;t(p)},children:[A.jsxs(ei.Root,{children:[A.jsx(te.Title,{children:n}),s&&A.jsx(te.Description,{children:s})]}),e&&A.jsx(Qs.Root,{className:"tgph",children:A.jsx(fc,{layer:f,children:A.jsx(Hs.FocusScope,{trapped:typeof r=="boolean"?r:g,onMountAutoFocus:o,onUnmountAutoFocus:a,asChild:!0,children:A.jsx(Ys.RefToTgphRef,{children:A.jsx(q.Stack,{as:ut,initial:{top:`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${d-1})`},animate:{top:h?`calc(var(--tgph-spacing-16) + var(--tgph-spacing-4) * ${f} )`:"var(--tgph-spacing-16)"},exit:{top:0},transition:{type:"spring",duration:.3,bounce:0},w:"full",justify:"center",style:{position:"fixed",left:0,maxHeight:"calc(100vh - var(--tgph-spacing-32))",maxWidth:"calc(100vw - var(--tgph-spacing-8))",zIndex:`calc(var(--tgph-zIndex-modal) + ${f})`},children:A.jsx(q.Stack,{direction:"column",as:ut,animate:{scale:1.02-Math.abs(d-f)*.02,transformOrigin:"center center"},transition:{duration:.2,bounce:0,type:"spring"},maxW:l.maxW??"160",w:l.w??"full",bg:"surface-1",border:"px",borderColor:"gray-8",rounded:"4",shadow:"3",...l,children:i},`content-${u}`)},`container-${u}`)})})})})]},u)})})},fc=({layer:e,children:t})=>e>0?t:A.jsxs(te.Overlay,{children:[A.jsx(q.Box,{as:ut,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,bounce:0,type:"spring"},bg:"alpha-black-6",w:"full",h:"full",zIndex:"overlay",style:{position:"fixed",cursor:"pointer",inset:"0px"}}),t]}),dc=T.forwardRef(({children:e,...t},n)=>A.jsx(te.Content,{ref:n,asChild:!0,...t,children:A.jsx(q.Stack,{direction:"column",h:"full",...t,children:e})})),hc=({size:e="1",variant:t="ghost",...n})=>A.jsx(te.Close,{asChild:!0,children:A.jsx(qs.Button,{icon:{icon:Zs.X,alt:"Close Modal"},variant:t,size:e,...n})}),pc=({style:e,children:t,...n})=>A.jsx(q.Stack,{direction:"column",px:"6",py:"4",style:{overflowY:"auto",...e},...n,children:t}),mc=({children:e,...t})=>A.jsx(q.Stack,{direction:"row",justify:"space-between",align:"center",px:"6",py:"4",borderBottom:"px",...t,children:e}),gc=({children:e,...t})=>A.jsx(q.Stack,{direction:"row",align:"center",justify:"flex-end",gap:"2",px:"6",py:"4",borderTop:"px",...t,children:e}),yc=({as:e,size:t="3",weight:n="medium",...s})=>A.jsx(Xs.Heading,{as:e||"h2",size:t,weight:n,...s}),Ks={};Object.assign(Ks,{Root:uc,Content:dc,Close:hc,Body:pc,Header:mc,Footer:gc,Heading:yc});exports.Modal=Ks;exports.ModalStackingProvider=cc;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|